1 /**\file h_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 © 2006-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  * jHeretic configuration.
27  *
28  * Global settings. Most of these are console variables.
29  */
30 
31 #ifndef __JHERETIC_CONFIG_H__
32 #define __JHERETIC_CONFIG_H__
33 
34 #ifndef __JHERETIC__
35 #  error "Using jHeretic headers without __JHERETIC__"
36 #endif
37 
38 #include "doomsday.h"
39 #include "doomdef.h"
40 //#include "hu_lib.h"
41 #include "../../common/include/config.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 enum {
48     HUD_AMMO,
49     HUD_ARMOR,
50     HUD_KEYS,
51     HUD_HEALTH,
52     HUD_READYITEM,
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     HUE_ON_PICKUP_INVITEM,
68     NUMHUDUNHIDEEVENTS
69 } hueevent_t;
70 
71 // Counter Cheat flags.
72 #define CCH_KILLS           0x01
73 #define CCH_ITEMS           0x02
74 #define CCH_SECRETS         0x04
75 #define CCH_KILLS_PRCNT     0x08
76 #define CCH_ITEMS_PRCNT     0x10
77 #define CCH_SECRETS_PRCNT   0x20
78 
79 typedef struct jheretic_config_s {
80     libcommon_config_t common;
81 
82     byte            secretMsg;
83     byte            bobWeaponLower;
84     byte            hudShown[NUMHUDDISPLAYS]; // HUD data visibility.
85     byte            hudUnHide[NUMHUDUNHIDEEVENTS]; // when the hud/statusbar unhides.
86 
87     byte            moveCheckZ;    // if true, mobjs can move over/under each other.
88     byte            slidingCorpses;
89     byte            allowMonsterFloatOverBlocking; // if true, floating mobjs are allowed to climb over mobjs blocking the way.
90 
91     byte            noCoopDamage;
92     byte            noTeamDamage;
93     byte            respawnMonstersNightmare;
94     int             corpseTime;
95 
96     byte            netRespawn;
97     byte            netSlot;
98 
99     playerclass_t   playerClass[MAXPLAYERS];
100     int             playerColor[MAXPLAYERS];
101 
102     /**
103      * Compatibility options.
104      * \todo Put these into an array so we can use a bit array to change
105      * multiple options based on a compatibility mode (ala PrBoom).
106      */
107     byte            monstersStuckInDoors;
108     byte            avoidDropoffs;
109     byte            moveBlock; // Dont handle large negative movement in P_TryMoveXY.
110     byte            wallRunNorthOnly; // If handle large make exception for wallrunning
111 
112     byte            fallOff; // Objects fall under their own weight.
113     byte            fixFloorFire; // Fix Heretic bug; explode Maulotaur floor fire when feetclipped.
114     byte            fixPlaneScrollMaterialsEastOnly; // Fix Heretic bug; plane materials would only scroll east.
115 
116     // jHeretic specific
117     int             ringFilter;
118     float           inventoryTimer; // Number of seconds until the invetory auto-hides.
119     byte            inventoryWrap;
120     byte            inventoryUseNext;
121     byte            inventoryUseImmediate;
122     int             inventorySlotMaxVis;
123     byte            inventorySlotShowEmpty;
124     byte            inventorySelectMode;
125     int             tomeCounter;
126     int             tomeSound;
127     byte            staffPowerDamageToGhosts;
128 } game_config_t;
129 
130 extern game_config_t cfg;      // in g_game.c
131 
132 #ifdef __cplusplus
133 } // extern "C"
134 #endif
135 
136 #endif
137