Subversion Repositories eduke32

Rev

Rev 4555 | Rev 4559 | 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
 
4557 hendricks2 46
extern const char *g_gameNamePtr;
47
 
2796 helixhorne 48
extern const char *defaultgamegrp[GAMECOUNT];
49
extern const char *defaultdeffilename[GAMECOUNT];
50
extern const char *defaultconfilename;
51
extern const char *defaultgameconfilename[GAMECOUNT];
2726 hendricks2 52
 
53
extern char *g_grpNamePtr;
54
extern char *g_scriptNamePtr;
55
 
2796 helixhorne 56
extern const char *G_DefaultGrpFile(void);
57
extern const char *G_GrpFile(void);
2726 hendricks2 58
 
2796 helixhorne 59
extern const char *G_DefaultConFile(void);
60
extern const char *G_ConFile(void);
2726 hendricks2 61
 
4128 hendricks2 62
extern char **g_scriptModules;
63
extern int32_t g_scriptModulesNum;
64
 
65
extern void G_AddCon(const char *buffer);
66
extern void G_AddConModule(const char *buffer);
67
 
2726 hendricks2 68
extern void clearGrpNamePtr(void);
69
extern void clearDefNamePtr(void);
70
extern void clearScriptNamePtr(void);
71
 
4557 hendricks2 72
extern int32_t loaddefinitions_game(const char *, int32_t);
73
extern int32_t g_groupFileHandle;
74
 
3220 hendricks2 75
//////////
76
 
3976 helixhorne 77
extern void G_InitMultiPsky(int32_t CLOUDYOCEAN__DYN, int32_t MOONSKY1__DYN, int32_t BIGORBIT1__DYN, int32_t LA__DYN);
78
extern void G_SetupGlobalPsky(void);
3220 hendricks2 79
 
3581 hendricks2 80
//////////
81
 
4557 hendricks2 82
extern char g_modDir[BMAX_PATH];
83
 
3581 hendricks2 84
extern void G_AddSearchPaths(void);
3654 terminx 85
extern void G_CleanupSearchPaths(void);
3581 hendricks2 86
 
4557 hendricks2 87
extern void G_ExtPreInit(int32_t argc,const char **argv);
88
extern void G_ExtInit(void);
89
extern void G_ExtPreStartupWindow(void);
90
extern void G_ExtPostStartupWindow(int32_t autoload);
91
 
3637 terminx 92
extern const char * G_GetInstallPath(int32_t insttype);
93
 
2726 hendricks2 94
#endif