Subversion Repositories eduke32

Rev

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