1 /* KJL 11:10:15 28/01/98 -
2
3 This file contains game-specific console variables
4
5 */
6 //#include "rentrntq.h"
7 #include "3dc.h"
8 #include "module.h"
9 #include "inline.h"
10
11 #include "stratdef.h"
12 #include "gamedef.h"
13
14 #include "davehook.h"
15
16
17 #include "r2base.h"
18 // hooks to R2 code
19
20 #include "gadget.h"
21 // hooks to gadgets code
22
23 #include "daemon.h"
24 // hooks to daemon code
25
26 #include "rentrntq.h"
27
28 //#include "ammo666.hpp"
29
30 //#include "iofocus.h"
31
32 //#include "statpane.h"
33
34 //#include "font.h"
35
36 //#include "hudgadg.hpp"
37
38 #include "consvar.hpp"
39 #include "conscmnd.hpp"
40
41 #include "equipmnt.h"
42 #include "pldnet.h"
43 #include "avp_menus.h"
44
45 extern "C"
46 {
47
48 /* KJL 11:48:45 28/01/98 - used to scale NormalFrameTime, so the game can be slowed down */
49 extern int TimeScale;
50 extern int MotionTrackerScale;
51 extern int LeanScale;
52
53 extern int CrouchIsToggleKey;
54 extern int CloakingMode;
55 extern int LogConsoleTextToFile;
56
57 extern int PlanarGravity;
58
59
60 extern int GlobalLevelOfDetail_Hierarchical;
61 extern int JoystickEnabled;
62
63 extern int SkyColour_R;
64 extern int SkyColour_G;
65 extern int SkyColour_B;
66
67 extern int DrawCompanyLogos;
68
69 extern int QuantumObjectDieRollOveride;
70
71 extern int WireFrameMode;
72 extern int LightScale;
73
74 extern int MotionTrackerSpeed;
75 extern int MotionTrackerVolume;
76
77 extern int DrawFullBright;
78
79 extern void ChangeToMarine();
80 extern void ChangeToAlien();
81 extern void ChangeToPredator();
82
83 extern int SentrygunSpread;
84 int PlaySounds;
85 int DopplerShiftIsOn;
86
87 extern int UseExtrapolation;
88
89 extern int DebuggingCommandsActive;
90
91 extern int AutoWeaponChangeOn;
92
CreateGameSpecificConsoleVariables(void)93 void CreateGameSpecificConsoleVariables(void)
94 {
95 TimeScale = 65536;
96 if (AvP.PlayerType==I_Alien)
97 {
98 LeanScale=ONE_FIXED*3;
99 }
100 else
101 {
102 LeanScale=ONE_FIXED;
103 }
104 CrouchIsToggleKey = 0;
105 CloakingMode=0;
106 LogConsoleTextToFile=0;
107 JoystickEnabled=0;
108 GlobalLevelOfDetail_Hierarchical = ONE_FIXED;
109 DrawCompanyLogos=0;
110 LightScale = ONE_FIXED;
111 DopplerShiftIsOn=1;
112 PlaySounds=1;
113 DrawFullBright=0;
114
115 #ifndef AVP_DEBUG_VERSION // allow debug commands without -debug
116 BOOL IsACheat = TRUE;
117 #else
118 BOOL IsACheat = FALSE;
119 #endif
120
121 #ifndef AVP_DEBUG_VERSION // allow debug commands without -debug
122 #ifndef AVP_DEBUG_FOR_FOX // allow debug commands without -debug
123 if (DebuggingCommandsActive)
124 #endif
125 #endif
126 {
127 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
128 (
129 TimeScale, // int& Value_ToUse,
130 "TIMESCALE", // ProjChar* pProjCh_ToUse,
131 "1.0 IS NORMAL", // ProjChar* pProjCh_Description_ToUse
132 655, // int MinVal_New,
133 65536*4, // int MaxVal_New
134 IsACheat
135 );
136 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
137 (
138 LeanScale, // int& Value_ToUse,
139 "LEANSCALE", // ProjChar* pProjCh_ToUse,
140 "1.0 IS DEFAULT, HIGHER MEANS MORE TILT", // ProjChar* pProjCh_Description_ToUse
141 0, // int MinVal_New,
142 65536*10, // int MaxVal_New
143 IsACheat
144 );
145
146 ConsoleVariable :: MakeSimpleConsoleVariable_Int
147 (
148 WireFrameMode, // int& Value_ToUse,
149 "WIREFRAMEMODE", // ProjChar* pProjCh_ToUse,
150 "0 = OFF, 1 = ENVIRONMENT, 2 = OBJECTS, 3 = EVERYTHING", // ProjChar* pProjCh_Description_ToUse
151 0, // int MinVal_New,
152 3, // int MaxVal_New
153 IsACheat
154 );
155 ConsoleVariable :: MakeSimpleConsoleVariable_Int
156 (
157 (int&)DopplerShiftIsOn, // int& Value_ToUse,
158 "DOPPLERSHIFT", // ProjChar* pProjCh_ToUse,
159 "", // ProjChar* pProjCh_Description_ToUse
160 0, // int MinVal_New,
161 1, // int MaxVal_New
162 IsACheat
163 );
164 ConsoleVariable :: MakeSimpleConsoleVariable_Int
165 (
166 SkyColour_R, // int& Value_ToUse,
167 "SKY_RED", // ProjChar* pProjCh_ToUse,
168 "SET RED COMPONENT OF SKY COLOUR", // ProjChar* pProjCh_Description_ToUse
169 0, // int MinVal_New,
170 255, // int MaxVal_New
171 IsACheat
172 );
173
174 ConsoleVariable :: MakeSimpleConsoleVariable_Int
175 (
176 SkyColour_G, // int& Value_ToUse,
177 "SKY_GREEN", // ProjChar* pProjCh_ToUse,
178 "SET GREEN COMPONENT OF SKY COLOUR", // ProjChar* pProjCh_Description_ToUse
179 0, // int MinVal_New,
180 255, // int MaxVal_New
181 IsACheat
182 );
183
184 ConsoleVariable :: MakeSimpleConsoleVariable_Int
185 (
186 SkyColour_B, // int& Value_ToUse,
187 "SKY_BLUE", // ProjChar* pProjCh_ToUse,
188 "SET BLUE COMPONENT OF SKY COLOUR", // ProjChar* pProjCh_Description_ToUse
189 0, // int MinVal_New,
190 255, // int MaxVal_New
191 IsACheat
192 );
193 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
194 (
195 MotionTrackerSpeed, // int& Value_ToUse,
196 "MOTIONTRACKERSPEED", // ProjChar* pProjCh_ToUse,
197 "1.0 IS NORMAL", // ProjChar* pProjCh_Description_ToUse
198 0, // int MinVal_New,
199 65536*16, // int MaxVal_New
200 IsACheat
201 );
202 }
203
204 #if CONSOLE_DEBUGGING_COMMANDS_ACTIVATED
205 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
206 (
207 MotionTrackerScale, // int& Value_ToUse,
208 "MOTIONTRACKERSCALE", // ProjChar* pProjCh_ToUse,
209 "1.0 IS FULL SIZE", // ProjChar* pProjCh_Description_ToUse
210 26214, // int MinVal_New,
211 655360 // int MaxVal_New
212 );
213
214
215
216 ConsoleVariable :: MakeSimpleConsoleVariable_Int
217 (
218 CloakingMode, // int& Value_ToUse,
219 "CLOAKINGMODE", // ProjChar* pProjCh_ToUse,
220 "0 MEANS TRANSLUCENCY WAVES, 1 MEANS SPECKLED", // ProjChar* pProjCh_Description_ToUse
221 0, // int MinVal_New,
222 1 // int MaxVal_New
223 );
224
225 ConsoleVariable :: MakeSimpleConsoleVariable_Int
226 (
227 LogConsoleTextToFile, // int& Value_ToUse,
228 "LOGCONSOLE", // ProjChar* pProjCh_ToUse,
229 "ENABLE/DISABLE LOGGING CONSOLE TEXT TO FILE", // ProjChar* pProjCh_Description_ToUse
230 0, // int MinVal_New,
231 1 // int MaxVal_New
232 );
233
234 ConsoleVariable :: MakeSimpleConsoleVariable_Int
235 (
236 JoystickEnabled, // int& Value_ToUse,
237 "JOYSTICKENABLED", // ProjChar* pProjCh_ToUse,
238 "ENABLE/DISABLE JOYSTICK", // ProjChar* pProjCh_Description_ToUse
239 0, // int MinVal_New,
240 1 // int MaxVal_New
241 );
242
243 ConsoleVariable :: MakeSimpleConsoleVariable_Int
244 (
245 PlanarGravity,
246 "PLANARGRAVITY",
247 "",
248 0,
249 1
250 );
251
252 ConsoleVariable :: MakeSimpleConsoleVariable_Int
253 (
254 DrawCompanyLogos,
255 "DRAW_LOGOS",
256 "",
257 0,
258 1
259 );
260
261 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
262 (
263 GlobalLevelOfDetail_Hierarchical, // int& Value_ToUse,
264 "LOD_HIERARCHICAL", // ProjChar* pProjCh_ToUse,
265 "1.0 IS NORMAL, 0 MEANS ALWAYS USE MOST DETAILED LEVEL, HIGHER NUMBERS MEAN LOWER DETAIL MODELS ARE USED AT CLOSER DISTANCES", // ProjChar* pProjCh_Description_ToUse
266 0, // int MinVal_New,
267 65536*100 // int MaxVal_New
268 );
269
270 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
271 (
272 LightScale, // int& Value_ToUse,
273 "LIGHTSCALE", // ProjChar* pProjCh_ToUse,
274 "1.0 IS NORMAL", // ProjChar* pProjCh_Description_ToUse
275 0, // int MinVal_New,
276 65536*100 // int MaxVal_New
277 );
278
279
280
281
282 ConsoleVariable :: MakeSimpleConsoleVariable_Int
283 (
284 QuantumObjectDieRollOveride, // int& Value_ToUse,
285 "QUANTUM_ROLL", // ProjChar* pProjCh_ToUse,
286 "FORCE QUANTUM OBJECT DIE ROLL (-1 MEANS DON'T FORCE ROLL)", // ProjChar* pProjCh_Description_ToUse
287 -1, // int MinVal_New,
288 65535 // int MaxVal_New
289 );
290
291 ConsoleCommand :: Make
292 (
293 "MORPH_ALIEN",
294 "BECOME AN ALIEN",
295 ChangeToAlien
296 );
297 ConsoleCommand :: Make
298 (
299 "MORPH_MARINE",
300 "BECOME A MARINE",
301 ChangeToMarine
302 );
303 ConsoleCommand :: Make
304 (
305 "MORPH_PREDATOR",
306 "BECOME A PREDATOR",
307 ChangeToPredator
308 );
309
310 //various network scoring options
311
312 ConsoleVariable :: MakeSimpleConsoleVariable_Int
313 (
314 netGameData.baseKillValue, // int& Value_ToUse,
315 "NETSCORE_BASEKILLVALUE", // ProjChar* pProjCh_ToUse,
316 "SET BASE VALUE FOR KILL/SUICIDE", // ProjChar* pProjCh_Description_ToUse
317 0, // int MinVal_New,
318 255 // int MaxVal_New
319 );
320 ConsoleVariable :: MakeSimpleConsoleVariable_Int
321 (
322 netGameData.characterKillValues[NGCT_Marine], // int& Value_ToUse,
323 "NETSCORE_MARINEVALUE", // ProjChar* pProjCh_ToUse,
324 "SET RELATIVE VALUE OF MARINE", // ProjChar* pProjCh_Description_ToUse
325 1, // int MinVal_New,
326 255 // int MaxVal_New
327 );
328 ConsoleVariable :: MakeSimpleConsoleVariable_Int
329 (
330 netGameData.characterKillValues[NGCT_Predator], // int& Value_ToUse,
331 "NETSCORE_PREDATORVALUE", // ProjChar* pProjCh_ToUse,
332 "SET RELATIVE VALUE OF PREDATOR", // ProjChar* pProjCh_Description_ToUse
333 1, // int MinVal_New,
334 255 // int MaxVal_New
335 );
336 ConsoleVariable :: MakeSimpleConsoleVariable_Int
337 (
338 netGameData.characterKillValues[NGCT_Alien], // int& Value_ToUse,
339 "NETSCORE_ALIENVALUE", // ProjChar* pProjCh_ToUse,
340 "SET RELATIVE VALUE OF ALIEN", // ProjChar* pProjCh_Description_ToUse
341 1, // int MinVal_New,
342 255 // int MaxVal_New
343 );
344 ConsoleVariable :: MakeSimpleConsoleVariable_Int
345 (
346 netGameData.useDynamicScoring, // int& Value_ToUse,
347 "NETSCORE_USEDYNAMICSCORING", // ProjChar* pProjCh_ToUse,
348 "TURN DYNAMIC SCORING ON AND OFF", // ProjChar* pProjCh_Description_ToUse
349 0, // int MinVal_New,
350 1 // int MaxVal_New
351 );
352 ConsoleVariable :: MakeSimpleConsoleVariable_Int
353 (
354 netGameData.useCharacterKillValues, // int& Value_ToUse,
355 "NETSCORE_USECHARVALUES", // ProjChar* pProjCh_ToUse,
356 "TURN RELATIVE SCORES FOR CHARACTER TYPES ON AND OFF", // ProjChar* pProjCh_Description_ToUse
357 0, // int MinVal_New,
358 1 // int MaxVal_New
359 );
360 ConsoleVariable :: MakeSimpleConsoleVariable_Int
361 (
362 netGameData.invulnerableTime, // int& Value_ToUse,
363 "NETSTAT_INVULNERABLETIME", // ProjChar* pProjCh_ToUse,
364 "SET INVULNERABILITY TIME AFTER RESPAWN (IN SECONDS)", // ProjChar* pProjCh_Description_ToUse
365 0, // int MinVal_New,
366 255 // int MaxVal_New
367 );
368
369 ConsoleVariable :: MakeSimpleConsoleVariable_Int
370 (
371 (int&)AvP.Difficulty, // int& Value_ToUse,
372 "DIFFICULTY", // ProjChar* pProjCh_ToUse,
373 "SET DIFFICULTY LEVEL (WILL REQUIRE LEVEL RESTART)", // ProjChar* pProjCh_Description_ToUse
374 0, // int MinVal_New,
375 2 // int MaxVal_New
376 );
377
378 ConsoleVariable :: MakeSimpleConsoleVariable_Int
379 (
380 (int&)netGameData.sendDecals, // int& Value_ToUse,
381 "NETOPTION_SENDDECALS", // ProjChar* pProjCh_ToUse,
382 "SHOULD DECALS BE SENT ACROSS THE NETWORK?", // ProjChar* pProjCh_Description_ToUse
383 0, // int MinVal_New,
384 1 // int MaxVal_New
385 );
386
387 ConsoleVariable :: MakeSimpleConsoleVariable_Int
388 (
389 (int&)SentrygunSpread, // int& Value_ToUse,
390 "SENTRYGUN_SPREAD", // ProjChar* pProjCh_ToUse,
391 "Angle in degrees for random deviation in direction", // ProjChar* pProjCh_Description_ToUse
392 0, // int MinVal_New,
393 360 // int MaxVal_New
394 );
395 ConsoleVariable :: MakeSimpleConsoleVariable_Int
396 (
397 (int&)PlaySounds, // int& Value_ToUse,
398 "PLAYSOUNDS", // ProjChar* pProjCh_ToUse,
399 "", // ProjChar* pProjCh_Description_ToUse
400 0, // int MinVal_New,
401 1 // int MaxVal_New
402 );
403
404 ConsoleVariable :: MakeSimpleConsoleVariable_Int
405 (
406 (int&)DrawFullBright, // int& Value_ToUse,
407 "DRAWFULLBRIGHT", // ProjChar* pProjCh_ToUse,
408 "", // ProjChar* pProjCh_Description_ToUse
409 0, // int MinVal_New,
410 1 // int MaxVal_New
411 );
412
413 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
414 (
415 netGameData.sendFrequency, // int& Value_ToUse,
416 "NETSENDFREQUENCY", // ProjChar* pProjCh_ToUse,
417 "0 MEANS SEND EVERY FRAME", // ProjChar* pProjCh_Description_ToUse
418 0, // int MinVal_New,
419 65536 // int MaxVal_New
420 );
421 #endif
422 /*
423 MakeSimpleConsoleVariable_Int
424 (
425 bEnableTextprint, // int& Value_ToUse,
426 "TEXT", // ProjChar* pProjCh_ToUse,
427 "(ENABLE/DISABLE DIAGNOSTIC TEXT)", // ProjChar* pProjCh_Description_ToUse
428 0, // int MinVal_New,
429 1 // int MaxVal_New
430 );
431 */
432
433 ConsoleVariable :: MakeSimpleConsoleVariable_FixP
434 (
435 MotionTrackerVolume, // int& Value_ToUse,
436 "MOTIONTRACKERVOLUME", // ProjChar* pProjCh_ToUse,
437 "1.0 IS NORMAL", // ProjChar* pProjCh_Description_ToUse
438 0, // int MinVal_New,
439 65536 // int MaxVal_New
440 );
441 ConsoleVariable :: MakeSimpleConsoleVariable_Int
442 (
443 (int&)UseExtrapolation, // int& Value_ToUse,
444 "EXTRAPOLATE_MOVEMENT", // ProjChar* pProjCh_ToUse,
445 "TURN EXTRAPOLATION FOR MOVEMENT OF NETWORK OPPONENTS ON AND OFF", // ProjChar* pProjCh_Description_ToUse
446 0, // int MinVal_New,
447 1 // int MaxVal_New
448 );
449 ConsoleVariable :: MakeSimpleConsoleVariable_Int
450 (
451 CrouchIsToggleKey, // int& Value_ToUse,
452 "CROUCHMODE", // ProjChar* pProjCh_ToUse,
453 "0 MEANS HOLD DOWN MODE, 1 MEANS TOGGLE MODE", // ProjChar* pProjCh_Description_ToUse
454 0, // int MinVal_New,
455 1 // int MaxVal_New
456 );
457
458 ConsoleVariable :: MakeSimpleConsoleVariable_Int
459 (
460 AutoWeaponChangeOn,
461 "AUTOWEAPONCHANGE",
462 "SET TO 0 IF YOU DON'T WANT TO CHANGE TO NEWLY GAINED WEAPONS AUTOMATICALLY. OTHERWISE SET TO 1.",
463 0,
464 1
465 );
466
467
468 }
469
470 }; // extern "C"
471