/
common.h
73 lines (60 loc) · 2.11 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* @file common.h
*
* @authors Copyright © 2011-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2013 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA</small>
*/
#ifndef LIBCOMMON_GAME_INCLUDES
#define LIBCOMMON_GAME_INCLUDES
#include <de/mathutil.h>
#include <de/timer.h>
#ifdef UNIX
# include <strings.h>
#endif
#define WEAPONBOTTOM (128) // from p_pspr.c
#define IS_NETWORK_SERVER (DD_GetInteger(DD_SERVER) && DD_GetInteger(DD_NETGAME))
#define IS_NETWORK_CLIENT (DD_GetInteger(DD_CLIENT) && DD_GetInteger(DD_NETGAME))
#if __JDOOM__
# include "jdoom.h"
#elif __JDOOM64__
# include "jdoom64.h"
#elif __JHERETIC__
# include "jheretic.h"
#elif __JHEXEN__
# include "jhexen.h"
#endif
#include "gamerules.h"
#include "g_defs.h"
#include "pause.h"
#ifdef __cplusplus
# include <doomsday/filesys/lumpindex.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
int Common_GetInteger(int id);
#ifdef __cplusplus
} // extern "C"
/**
* Returns the central LumpIndex from the engine. For use with old subsystems
* which still depend on this old fashioned mechanism for file access.
*
* @deprecated Implement file access without depending on this specialized behavior.
*/
inline de::LumpIndex const &CentralLumpIndex() { return *reinterpret_cast<de::LumpIndex const *>(F_LumpIndex()); }
#endif
#endif // LIBCOMMON_GAME_INCLUDES