XenevaOS
Loading...
Searching...
No Matches
d_mode.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// DESCRIPTION:
16// Functions and definitions relating to the game type and operational
17// mode.
18//
19
20#ifndef __D_MODE__
21#define __D_MODE__
22
23#include "doomtype.h"
24
25// The "mission" controls what game we are playing.
26
27typedef enum
28{
29 doom, // Doom 1
30 doom2, // Doom 2
31 pack_tnt, // Final Doom: TNT: Evilution
32 pack_plut, // Final Doom: The Plutonia Experiment
33 pack_chex, // Chex Quest (modded doom)
34 pack_hacx, // Hacx (modded doom2)
35 heretic, // Heretic
36 hexen, // Hexen
37 strife, // Strife
38
39 none
41
42// The "mode" allows more accurate specification of the game mode we are
43// in: eg. shareware vs. registered. So doom1.wad and doom.wad are the
44// same mission, but a different mode.
45
46typedef enum
47{
48 shareware, // Doom/Heretic shareware
49 registered, // Doom/Heretic registered
50 commercial, // Doom II/Hexen
51 retail, // Ultimate Doom
52 indetermined // Unknown.
54
55// What version are we emulating?
56
57typedef enum
58{
59 exe_doom_1_2, // Doom 1.2: shareware and registered
60 exe_doom_1_666, // Doom 1.666: for shareware, registered and commercial
61 exe_doom_1_7, // Doom 1.7/1.7a: "
62 exe_doom_1_8, // Doom 1.8: "
63 exe_doom_1_9, // Doom 1.9: "
64 exe_hacx, // Hacx
65 exe_ultimate, // Ultimate Doom (retail)
66 exe_final, // Final Doom
67 exe_final2, // Final Doom (alternate exe)
68 exe_chex, // Chex Quest executable (based on Final Doom)
69
70 exe_heretic_1_3, // Heretic 1.3
71
72 exe_hexen_1_1, // Hexen 1.1
73 exe_strife_1_2, // Strife v1.2
74 exe_strife_1_31 // Strife v1.31
76
77// Skill level.
78
79typedef enum
80{
81 sk_noitems = -1, // the "-skill 0" hack
88
92 int episode, int map);
96
97#endif /* #ifndef __D_MODE__ */
98
GameVersion_t version
Definition d_main.c:943
int map
Definition d_mode.c:31
int episode
Definition d_mode.c:30
GameMission_t mission
Definition d_mode.c:28
boolean D_IsEpisodeMap(GameMission_t mission)
Definition d_mode.c:161
GameMission_t
Definition d_mode.h:28
@ pack_tnt
Definition d_mode.h:31
@ pack_chex
Definition d_mode.h:33
@ strife
Definition d_mode.h:37
@ doom
Definition d_mode.h:29
@ heretic
Definition d_mode.h:35
@ pack_plut
Definition d_mode.h:32
@ none
Definition d_mode.h:39
@ hexen
Definition d_mode.h:36
@ doom2
Definition d_mode.h:30
@ pack_hacx
Definition d_mode.h:34
GameVersion_t
Definition d_mode.h:58
@ exe_doom_1_9
Definition d_mode.h:63
@ exe_doom_1_2
Definition d_mode.h:59
@ exe_doom_1_7
Definition d_mode.h:61
@ exe_hacx
Definition d_mode.h:64
@ exe_final
Definition d_mode.h:66
@ exe_chex
Definition d_mode.h:68
@ exe_heretic_1_3
Definition d_mode.h:70
@ exe_doom_1_8
Definition d_mode.h:62
@ exe_final2
Definition d_mode.h:67
@ exe_doom_1_666
Definition d_mode.h:60
@ exe_ultimate
Definition d_mode.h:65
@ exe_hexen_1_1
Definition d_mode.h:72
@ exe_strife_1_31
Definition d_mode.h:74
@ exe_strife_1_2
Definition d_mode.h:73
boolean D_ValidEpisodeMap(GameMission_t mission, GameMode_t mode, int episode, int map)
Definition d_mode.c:65
skill_t
Definition d_mode.h:80
@ sk_nightmare
Definition d_mode.h:86
@ sk_medium
Definition d_mode.h:84
@ sk_baby
Definition d_mode.h:82
@ sk_noitems
Definition d_mode.h:81
@ sk_easy
Definition d_mode.h:83
@ sk_hard
Definition d_mode.h:85
boolean D_ValidGameMode(GameMission_t mission, GameMode_t mode)
Definition d_mode.c:50
int D_GetNumEpisodes(GameMission_t mission, GameMode_t mode)
Definition d_mode.c:103
GameMode_t
Definition d_mode.h:47
@ retail
Definition d_mode.h:51
@ indetermined
Definition d_mode.h:52
@ commercial
Definition d_mode.h:50
@ shareware
Definition d_mode.h:48
@ registered
Definition d_mode.h:49
boolean D_ValidGameVersion(GameMission_t mission, GameVersion_t version)
Definition d_mode.c:135
char * D_GameMissionString(GameMission_t mission)
Definition d_mode.c:182
#define mode(x)