]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - com_game.h
sys: work around incomplete POSIX support in MacOS
[xonotic/darkplaces.git] / com_game.h
1 /*
2 Copyright (C) 2000-2021 DarkPlaces contributors
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 See the GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
19 */
20
21 #ifndef COM_GAME_H
22 #define COM_GAME_H
23
24 #include "qdefs.h"
25
26 typedef enum gamemode_e
27 {
28         GAME_NORMAL,
29         GAME_HIPNOTIC,
30         GAME_ROGUE,
31         GAME_QUOTH,
32         GAME_NEHAHRA,
33         GAME_NEXUIZ,
34         GAME_XONOTIC,
35         GAME_TRANSFUSION,
36         GAME_GOODVSBAD2,
37         GAME_TEU,
38         GAME_BATTLEMECH,
39         GAME_ZYMOTIC,
40         GAME_SETHERAL,
41         GAME_TENEBRAE, // full of evil hackery
42         GAME_NEOTERIC,
43         GAME_OPENQUARTZ, //this game sucks
44         GAME_PRYDON,
45         GAME_DELUXEQUAKE,
46         GAME_THEHUNTED,
47         GAME_DEFEATINDETAIL2,
48         GAME_DARSANA,
49         GAME_CONTAGIONTHEORY,
50         GAME_EDU2P,
51         GAME_PROPHECY,
52         GAME_BLOODOMNICIDE,
53         GAME_STEELSTORM, // added by motorsep
54         GAME_STEELSTORM2, // added by motorsep
55         GAME_SSAMMO, // added by motorsep
56         GAME_STEELSTORMREVENANTS, // added by motorsep 07/19/2015
57         GAME_TOMESOFMEPHISTOPHELES, // added by motorsep
58         GAME_STRAPBOMB, // added by motorsep for Urre
59         GAME_MOONHELM,
60         GAME_VORETOURNAMENT,
61         GAME_DOOMBRINGER, // added by Cloudwalk for kristus
62         GAME_BATTLEMETAL, // added by Cloudwalk for Subject9x
63         GAME_QUAKE15, // added by bones_was_here as it depends on an old bug and a workaround
64         GAME_AD, // added by bones_was_here as it depends on old DP behaviour or csqc_lowres
65         GAME_COUNT
66 }
67 gamemode_t;
68
69 // Master switch for some hacks/changes that eventually should become cvars.
70 #define IS_NEXUIZ_DERIVED(g) ((g) == GAME_NEXUIZ || (g) == GAME_XONOTIC || (g) == GAME_VORETOURNAMENT)
71 // Pre-csqcmodels era.
72 #define IS_OLDNEXUIZ_DERIVED(g) ((g) == GAME_NEXUIZ || (g) == GAME_VORETOURNAMENT)
73
74 extern gamemode_t gamemode;
75 extern const char *gamename;
76 extern const char *gamenetworkfiltername;
77 extern const char *gamedirname1;
78 extern const char *gamedirname2;
79 extern const char *gamescreenshotname;
80 extern const char *gameuserdirname;
81 extern char com_modname[MAX_OSPATH];
82
83 extern gamemode_t com_startupgamegroup;
84
85 void COM_InitGameType (void);
86 int COM_ChangeGameTypeForGameDirs(unsigned numgamedirs, const char *gamedirs[], qbool failmissing, qbool init);
87
88 #endif