1 //
2 // Copyright(C) 1993-1996 Id Software, Inc.
3 // Copyright(C) 2005-2014 Simon Howard
4 // Copyright(C) 2014-2017 Fabian Greffrath
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // DESCRIPTION:
17 //	Crispy Doom specific variables.
18 //
19 
20 
21 #ifndef __CRISPY_H__
22 #define __CRISPY_H__
23 
24 #include "doomtype.h"
25 
26 #ifndef MIN
27 #define MIN(a,b) (((a)<(b))?(a):(b))
28 #endif
29 #ifndef MAX
30 #define MAX(a,b) (((a)>(b))?(a):(b))
31 #endif
32 #ifndef BETWEEN
33 #define BETWEEN(l,u,x) (((l)>(x))?(l):((x)>(u))?(u):(x))
34 #endif
35 
36 typedef struct
37 {
38 	// [crispy] "crispness" config variables
39 	int automapoverlay;
40 	int automaprotate;
41 	int automapstats;
42 	int bobfactor;
43 	int brightmaps;
44 	int btusetimer;
45 	int centerweapon;
46 	int coloredblood;
47 	int coloredhud;
48 	int crosshair;
49 	int crosshairhealth;
50 	int crosshairtarget;
51 	int crosshairtype;
52 	int demotimer;
53 	int demotimerdir;
54 	int demobar;
55 	int extautomap;
56 	int extsaveg;
57 	int flipcorpses;
58 	int freeaim;
59 	int freelook;
60 	int hires;
61 	int jump;
62 	int leveltime;
63 	int mouselook;
64 	int neghealth;
65 	int overunder;
66 	int pitch;
67 	int playercoords;
68 	int recoil;
69 	int secretmessage;
70 	int smoothlight;
71 	int smoothmap;
72 	int smoothscaling;
73 	int soundfix;
74 	int soundfull;
75 	int soundmono;
76 	int translucency;
77 #ifdef CRISPY_TRUECOLOR
78 	int truecolor;
79 #endif
80 	int uncapped;
81 	int vsync;
82 	int weaponsquat;
83 	int widescreen;
84 
85 	// [crispy] in-game switches and variables
86 	int screenshotmsg;
87 	int cleanscreenshot;
88 	int demowarp;
89 	int fps;
90 
91 	boolean flashinghom;
92 	boolean fliplevels;
93 	boolean flipweapons;
94 	boolean haved1e5;
95 	boolean havee1m10;
96 	boolean havemap33;
97 	boolean havessg;
98 	boolean pistolstart;
99 	boolean singleplayer;
100 	boolean stretchsky;
101 
102 	char *havenerve;
103 	char *havemaster;
104 
105 	const char *sdlversion;
106 	const char *platform;
107 
108 	void (*post_rendering_hook) (void);
109 } crispy_t;
110 
111 extern crispy_t *const crispy;
112 extern const crispy_t *critical;
113 
114 extern void CheckCrispySingleplayer (boolean singleplayer);
115 
116 enum
117 {
118 	REINIT_FRAMEBUFFERS = 1,
119 	REINIT_RENDERER = 2,
120 	REINIT_TEXTURES = 4,
121 	REINIT_ASPECTRATIO = 8,
122 };
123 
124 enum
125 {
126     BOBFACTOR_FULL,
127     BOBFACTOR_75,
128     BOBFACTOR_OFF,
129     NUM_BOBFACTORS,
130 };
131 
132 enum
133 {
134     BRIGHTMAPS_OFF,
135     BRIGHTMAPS_TEXTURES,
136     BRIGHTMAPS_SPRITES,
137     BRIGHTMAPS_BOTH,
138     NUM_BRIGHTMAPS,
139 };
140 
141 enum
142 {
143     CENTERWEAPON_OFF,
144     CENTERWEAPON_CENTER,
145     CENTERWEAPON_BOB,
146     NUM_CENTERWEAPON,
147 };
148 
149 enum
150 {
151     COLOREDHUD_OFF,
152     COLOREDHUD_BAR,
153     COLOREDHUD_TEXT,
154     COLOREDHUD_BOTH,
155     NUM_COLOREDHUD
156 };
157 
158 enum
159 {
160     CROSSHAIR_OFF,
161     CROSSHAIR_STATIC,
162     CROSSHAIR_PROJECTED,
163     NUM_CROSSHAIRS,
164     CROSSHAIR_INTERCEPT = 0x10
165 };
166 
167 enum
168 {
169     DEMOTIMER_OFF,
170     DEMOTIMER_RECORD,
171     DEMOTIMER_PLAYBACK,
172     DEMOTIMER_BOTH,
173     NUM_DEMOTIMERS
174 };
175 
176 enum
177 {
178     FREEAIM_AUTO,
179     FREEAIM_DIRECT,
180     FREEAIM_BOTH,
181     NUM_FREEAIMS
182 };
183 
184 enum
185 {
186     FREELOOK_OFF,
187     FREELOOK_SPRING,
188     FREELOOK_LOCK,
189     NUM_FREELOOKS
190 };
191 
192 enum
193 {
194     JUMP_OFF,
195     JUMP_LOW,
196     JUMP_HIGH,
197     NUM_JUMPS
198 };
199 
200 enum
201 {
202     TRANSLUCENCY_OFF,
203     TRANSLUCENCY_MISSILE,
204     TRANSLUCENCY_ITEM,
205     TRANSLUCENCY_BOTH,
206     NUM_TRANSLUCENCY
207 };
208 
209 enum
210 {
211     SECRETMESSAGE_OFF,
212     SECRETMESSAGE_ON,
213     SECRETMESSAGE_COUNT,
214     NUM_SECRETMESSAGE
215 };
216 
217 enum
218 {
219     WIDGETS_OFF,
220     WIDGETS_AUTOMAP,
221     WIDGETS_ALWAYS,
222     NUM_WIDGETS
223 };
224 
225 enum
226 {
227     RATIO_4_3,
228     RATIO_MATCH_SCREEN,
229     RATIO_16_10,
230     RATIO_16_9,
231     RATIO_21_9,
232     NUM_RATIOS
233 };
234 
235 #endif
236