Subversion Repositories eduke32

Rev

Rev 4811 | Rev 4887 | 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 {
4790 hendricks2 45
    INSTPATH_STEAM_DUKE3D,
46
    INSTPATH_GOG_DUKE3D,
47
    INSTPATH_3DR_DUKE3D,
48
    INSTPATH_3DR_ANTH,
49
    INSTPATH_STEAM_NAM,
3637 terminx 50
    NUMINSTPATHS
51
};
52
 
4886 hendricks2 53
enum searchpathtypes_t {
54
    SEARCHPATH_REMOVE = 1<<0,
55
    SEARCHPATH_NAM    = 1<<1,
56
};
57
 
4560 hendricks2 58
typedef enum basepal_ {
59
    BASEPAL = 0,
60
    WATERPAL,
61
    SLIMEPAL,
62
    DREALMSPAL,
63
    TITLEPAL,
64
    ENDINGPAL,  // 5
65
    ANIMPAL,
66
    BASEPALCOUNT
67
} basepal_t;
68
 
4557 hendricks2 69
extern const char *g_gameNamePtr;
70
 
2726 hendricks2 71
extern char *g_grpNamePtr;
72
extern char *g_scriptNamePtr;
73
 
2796 helixhorne 74
extern const char *G_DefaultGrpFile(void);
75
extern const char *G_GrpFile(void);
2726 hendricks2 76
 
2796 helixhorne 77
extern const char *G_DefaultConFile(void);
78
extern const char *G_ConFile(void);
2726 hendricks2 79
 
4128 hendricks2 80
extern char **g_scriptModules;
81
extern int32_t g_scriptModulesNum;
82
 
83
extern void G_AddCon(const char *buffer);
84
extern void G_AddConModule(const char *buffer);
85
 
2726 hendricks2 86
extern void clearGrpNamePtr(void);
87
extern void clearScriptNamePtr(void);
88
 
4557 hendricks2 89
extern int32_t loaddefinitions_game(const char *, int32_t);
90
extern int32_t g_groupFileHandle;
91
 
3220 hendricks2 92
//////////
93
 
3976 helixhorne 94
extern void G_InitMultiPsky(int32_t CLOUDYOCEAN__DYN, int32_t MOONSKY1__DYN, int32_t BIGORBIT1__DYN, int32_t LA__DYN);
95
extern void G_SetupGlobalPsky(void);
3220 hendricks2 96
 
3581 hendricks2 97
//////////
98
 
4557 hendricks2 99
extern char g_modDir[BMAX_PATH];
4668 terminx 100
extern int32_t kopen4loadfrommod(const char *filename, char searchfirst);
3581 hendricks2 101
extern void G_AddSearchPaths(void);
3654 terminx 102
extern void G_CleanupSearchPaths(void);
3581 hendricks2 103
 
4557 hendricks2 104
extern void G_ExtPreInit(int32_t argc,const char **argv);
105
extern void G_ExtInit(void);
106
extern void G_ExtPreStartupWindow(void);
107
extern void G_ExtPostStartupWindow(int32_t autoload);
108
 
3637 terminx 109
extern const char * G_GetInstallPath(int32_t insttype);
110
 
4559 hendricks2 111
//////////
112
 
113
void G_LoadGroupsInDir(const char *dirname);
114
void G_DoAutoload(const char *dirname);
115
 
4564 hendricks2 116
//////////
117
 
118
extern uint8_t *basepaltable[BASEPALCOUNT];
119
 
120
extern int32_t G_LoadLookups(void);
121
 
4766 hendricks2 122
#ifdef __cplusplus
123
}
2726 hendricks2 124
#endif
4766 hendricks2 125
 
126
#endif