Rev 4668 | Rev 4789 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2726 | hendricks2 | 1 | // |
2 | // Definitions of common game-only data structures/functions |
||
3 | // (and declarations of data appearing in both) |
||
4 | // for EDuke32 and Mapster32 |
||
5 | // |
||
6 | |||
7 | #ifndef EDUKE32_COMMON_GAME_H_ |
||
8 | #define EDUKE32_COMMON_GAME_H_ |
||
9 | |||
4766 | hendricks2 | 10 | #ifdef __cplusplus |
11 | extern "C" { |
||
12 | #endif |
||
13 | |||
4557 | hendricks2 | 14 | extern int32_t usecwd; |
15 | |||
2726 | hendricks2 | 16 | #define GAMEFLAG_DUKE 0x00000001 |
17 | #define GAMEFLAG_NAM 0x00000002 |
||
18 | #define GAMEFLAG_NAPALM 0x00000004 |
||
19 | #define GAMEFLAG_WW2GI 0x00000008 |
||
3654 | terminx | 20 | #define GAMEFLAG_ADDON 0x00000010 |
3803 | terminx | 21 | #define GAMEFLAG_SHAREWARE 0x00000020 |
22 | #define GAMEFLAG_DUKEBETA 0x00000060 // includes 0x20 since it's a shareware beta |
||
2726 | hendricks2 | 23 | |
24 | extern int32_t g_gameType; |
||
25 | |||
4557 | hendricks2 | 26 | extern int32_t g_usingAddon; |
27 | extern int32_t g_dependencyCRC; |
||
28 | |||
2726 | hendricks2 | 29 | #define DUKE (g_gameType & GAMEFLAG_DUKE) |
30 | #define NAM (g_gameType & GAMEFLAG_NAM) |
||
31 | #define NAPALM (g_gameType & GAMEFLAG_NAPALM) |
||
32 | #define WW2GI (g_gameType & GAMEFLAG_WW2GI) |
||
3803 | terminx | 33 | #define SHAREWARE (g_gameType & GAMEFLAG_SHAREWARE) |
3886 | terminx | 34 | #define DUKEBETA ((g_gameType & GAMEFLAG_DUKEBETA) == GAMEFLAG_DUKEBETA) |
2726 | hendricks2 | 35 | |
36 | enum Games_t { |
||
37 | GAME_DUKE = 0, |
||
38 | GAME_NAM, |
||
39 | GAME_NAPALM, |
||
40 | GAME_WW2GI, |
||
41 | GAMECOUNT |
||
42 | }; |
||
43 | |||
3637 | terminx | 44 | enum instpath_t { |
45 | INSTPATH_STEAM, |
||
46 | INSTPATH_GOG, |
||
47 | NUMINSTPATHS |
||
48 | }; |
||
49 | |||
4560 | hendricks2 | 50 | typedef enum basepal_ { |
51 | BASEPAL = 0, |
||
52 | WATERPAL, |
||
53 | SLIMEPAL, |
||
54 | DREALMSPAL, |
||
55 | TITLEPAL, |
||
56 | ENDINGPAL, // 5 |
||
57 | ANIMPAL, |
||
58 | BASEPALCOUNT |
||
59 | } basepal_t; |
||
60 | |||
4557 | hendricks2 | 61 | extern const char *g_gameNamePtr; |
62 | |||
2796 | helixhorne | 63 | extern const char *defaultgamegrp[GAMECOUNT]; |
64 | extern const char *defaultdeffilename[GAMECOUNT]; |
||
65 | extern const char *defaultconfilename; |
||
66 | extern const char *defaultgameconfilename[GAMECOUNT]; |
||
2726 | hendricks2 | 67 | |
68 | extern char *g_grpNamePtr; |
||
69 | extern char *g_scriptNamePtr; |
||
70 | |||
2796 | helixhorne | 71 | extern const char *G_DefaultGrpFile(void); |
72 | extern const char *G_GrpFile(void); |
||
2726 | hendricks2 | 73 | |
2796 | helixhorne | 74 | extern const char *G_DefaultConFile(void); |
75 | extern const char *G_ConFile(void); |
||
2726 | hendricks2 | 76 | |
4128 | hendricks2 | 77 | extern char **g_scriptModules; |
78 | extern int32_t g_scriptModulesNum; |
||
79 | |||
80 | extern void G_AddCon(const char *buffer); |
||
81 | extern void G_AddConModule(const char *buffer); |
||
82 | |||
2726 | hendricks2 | 83 | extern void clearGrpNamePtr(void); |
84 | extern void clearScriptNamePtr(void); |
||
85 | |||
4557 | hendricks2 | 86 | extern int32_t loaddefinitions_game(const char *, int32_t); |
87 | extern int32_t g_groupFileHandle; |
||
88 | |||
3220 | hendricks2 | 89 | ////////// |
90 | |||
3976 | helixhorne | 91 | extern void G_InitMultiPsky(int32_t CLOUDYOCEAN__DYN, int32_t MOONSKY1__DYN, int32_t BIGORBIT1__DYN, int32_t LA__DYN); |
92 | extern void G_SetupGlobalPsky(void); |
||
3220 | hendricks2 | 93 | |
3581 | hendricks2 | 94 | ////////// |
95 | |||
4557 | hendricks2 | 96 | extern char g_modDir[BMAX_PATH]; |
4668 | terminx | 97 | extern int32_t kopen4loadfrommod(const char *filename, char searchfirst); |
3581 | hendricks2 | 98 | extern void G_AddSearchPaths(void); |
3654 | terminx | 99 | extern void G_CleanupSearchPaths(void); |
3581 | hendricks2 | 100 | |
4557 | hendricks2 | 101 | extern void G_ExtPreInit(int32_t argc,const char **argv); |
102 | extern void G_ExtInit(void); |
||
103 | extern void G_ExtPreStartupWindow(void); |
||
104 | extern void G_ExtPostStartupWindow(int32_t autoload); |
||
105 | |||
3637 | terminx | 106 | extern const char * G_GetInstallPath(int32_t insttype); |
107 | |||
4559 | hendricks2 | 108 | ////////// |
109 | |||
110 | void G_LoadGroupsInDir(const char *dirname); |
||
111 | void G_DoAutoload(const char *dirname); |
||
112 | |||
4564 | hendricks2 | 113 | ////////// |
114 | |||
115 | extern uint8_t *basepaltable[BASEPALCOUNT]; |
||
116 | |||
117 | extern int32_t g_firstFogPal; |
||
118 | extern int32_t G_LoadLookups(void); |
||
119 | |||
4766 | hendricks2 | 120 | #ifdef __cplusplus |
121 | } |
||
2726 | hendricks2 | 122 | #endif |
4766 | hendricks2 | 123 | |
124 | #endif |