1 /**\file d_config.h
2  *\section License
3  * License: GPL
4  * Online License Link: http://www.gnu.org/licenses/gpl.html
5  *
6  *\author Copyright © 2003-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
7  *\author Copyright © 2005-2013 Daniel Swanson <danij@dengine.net>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor,
22  * Boston, MA  02110-1301  USA
23  */
24 
25 /**
26  * jDoom configuration.
27  * Global settings. Most of these are console variables.
28  */
29 
30 #ifndef __JDOOM_SETTINGS_H__
31 #define __JDOOM_SETTINGS_H__
32 
33 #ifndef __JDOOM__
34 #  error "Using jDoom headers without __JDOOM__"
35 #endif
36 
37 #include "api_uri.h"
38 #include "doomdef.h"
39 //#include "hu_lib.h"
40 #include "../../common/include/config.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 enum {
47     HUD_HEALTH,
48     HUD_ARMOR,
49     HUD_AMMO,
50     HUD_KEYS,
51     HUD_FRAGS,
52     HUD_FACE,
53     HUD_LOG,
54     NUMHUDDISPLAYS
55 };
56 
57 // Hud Unhide Events (the hud will unhide on these events if enabled).
58 typedef enum {
59     HUE_FORCE = -1,
60     HUE_ON_DAMAGE,
61     HUE_ON_PICKUP_HEALTH,
62     HUE_ON_PICKUP_ARMOR,
63     HUE_ON_PICKUP_POWER,
64     HUE_ON_PICKUP_WEAPON,
65     HUE_ON_PICKUP_AMMO,
66     HUE_ON_PICKUP_KEY,
67     NUMHUDUNHIDEEVENTS
68 } hueevent_t;
69 
70 // Counter Cheat flags.
71 #define CCH_KILLS           0x01
72 #define CCH_ITEMS           0x02
73 #define CCH_SECRETS         0x04
74 #define CCH_KILLS_PRCNT     0x08
75 #define CCH_ITEMS_PRCNT     0x10
76 #define CCH_SECRETS_PRCNT   0x20
77 
78 typedef struct jdoom_config_s {
79     libcommon_config_t common;
80 
81     int             menuQuitSound;
82     byte            secretMsg;
83     byte            hudKeysCombine; // One icon per color (e.g. if red key and red skull is owned only show red key).
84     byte            bobWeaponLower;
85     byte            hudShown[NUMHUDDISPLAYS]; // HUD data visibility.
86     byte            hudUnHide[NUMHUDUNHIDEEVENTS]; // when the hud/statusbar unhides.
87 
88     byte            berserkAutoSwitch;
89     byte            deathLookUp;    // look up when killed
90 
91     byte            moveCheckZ;     // if true, mobjs can move over/under each other.
92     byte            slidingCorpses;
93     byte            allowMonsterFloatOverBlocking; // if true, floating mobjs are allowed to climb over mobjs blocking the way.
94     byte            respawnMonstersNightmare;
95     int             corpseTime;
96 
97     byte            noCoopDamage;
98     byte            noTeamDamage;
99     byte            noCoopWeapons;
100     byte            noCoopAnything; // disable all multiplayer objects in co-op
101     byte            coopRespawnItems;
102     byte            noNetBFG;
103     byte            netBFGFreeLook; // Allow free-aim with BFG.
104     byte            netRespawn;
105     byte            netSlot;
106     byte            killMessages;
107 
108     int             playerColor[MAXPLAYERS];
109 
110     /**
111      * Compatibility options:
112      * @todo Put these into an array so we can use a bit array to change
113      * multiple options based on a compatibility mode (ala PrBoom).
114      */
115     byte            raiseGhosts;
116     byte            vileChaseUseVileRadius;
117     byte            maxSkulls;
118     byte            allowSkullsInWalls;
119     byte            anyBossDeath;
120     byte            monstersStuckInDoors;
121     byte            avoidDropoffs;
122     byte            moveBlock; // Dont handle large negative movement in P_TryMoveXY.
123     byte            wallRunNorthOnly; // If handle large make exception for wallrunning
124     byte            zombiesCanExit; // Zombie players can exit levels.
125     byte            fallOff; // Objects fall under their own weight.
126     byte            gibCrushedNonBleeders;
127     byte            fixOuchFace;
128     byte            fixStatusbarOwnedWeapons;
129 } game_config_t;
130 
131 extern game_config_t cfg;
132 
133 #ifdef __cplusplus
134 } // extern "C"
135 #endif
136 
137 #endif
138