222002baa53a1a312be411a51bcc1a3f6253431a
1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License ONLY.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *)
15 {$INCLUDE ../shared/a_modes.inc}
18 interface
28 var
36 implementation
38 uses
39 {$INCLUDE ../nogl/noGLuses.inc}
40 {$IFDEF ENABLE_HOLMES}
42 {$ENDIF}
49 xparser;
52 var
56 var
58 {$IF not DEFINED(HEADLESS) and DEFINED(ENABLE_HOLMES)}
60 {$ENDIF}
61 begin
75 TMsgType.Notify
76 );
79 TMsgType.Notify
80 );
82 {$IFDEF HEADLESS}
84 {$ENDIF}
88 e_InitInput;
92 g_Console_SysInit;
94 //GetSystemDefaultLCID()
96 //e_WriteLog('Read language file', MSG_NOTIFY);
97 //g_Language_Load(DataDir + gLanguage + '.txt');
101 sys_Init;
103 {$IF not DEFINED(HEADLESS) and DEFINED(ENABLE_HOLMES)}
106 begin
109 try
116 begin
119 //raise;
121 else
122 begin
124 //raise;
128 begin
129 try
133 begin
135 //raise;
138 else
139 begin
140 //raise;
146 {$ENDIF}
148 //g_Res_CreateDatabases(); // it will be done before connecting to the server for the first time
152 {$WARNINGS OFF}
154 {$WARNINGS ON}
156 sys_Final;
160 var
162 begin
163 Randomize;
165 {$IFDEF HEADLESS}
166 {$IFDEF USE_SDLMIXER}
168 {$ELSE}
170 {$ENDIF}
171 {$ELSE}
173 {$ENDIF}
175 g_Touch_Init;
177 (*
178 if (e_JoysticksAvailable > 0) then
179 e_WriteLog('Input: Joysticks available.', TMsgType.Notify)
180 else
181 e_WriteLog('Input: No Joysticks.', TMsgType.Notify);
182 *)
185 begin
198 begin
206 begin
214 begin
220 begin
226 var
228 begin
231 begin
271 var
273 begin
278 result :=
283 {
284 if ct = I_GAME_CHEAT_JETPACK then
285 begin
286 e_WriteLog('ls1: ['+ls1+']', MSG_NOTIFY);
287 e_WriteLog('ls2: ['+ls2+']', MSG_NOTIFY);
288 e_WriteLog('bf0: ['+Copy(charbuff, 17-Length(ls1)-eofs, Length(ls1))+']', MSG_NOTIFY);
289 e_WriteLog('bf1: ['+Translit(Copy(charbuff, 17-Length(ls1)-eofs, Length(ls1)))+']', MSG_NOTIFY);
290 e_WriteLog('bf2: ['+Copy(charbuff, 17-Length(ls2)-eofs, Length(ls2))+']', MSG_NOTIFY);
291 e_WriteLog('bf3: ['+Translit(Copy(charbuff, 17-Length(ls2)-eofs, Length(ls2)))+']', MSG_NOTIFY);
292 end;
293 }
298 const
300 label
301 Cheated;
302 var
306 begin
307 {
308 if (not gGameOn) or (not gCheats) or ((gGameSettings.GameType <> GT_SINGLE) and
309 (gGameSettings.GameMode <> GM_COOP) and (not gDebugMode))
310 or g_Game_IsNet then Exit;
311 }
317 //
319 begin
324 // RAMBO
326 begin
331 // TANK
333 begin
338 // IDDQD
340 begin
346 //
348 begin
352 // GOODBYE
354 begin
358 begin
360 //g_Game_ExitLevel(gTriggers[a].Data.MapName);
362 Break;
366 //
368 if CheckCheat(I_GAME_CHEAT_CHANGEMAP, 2) and (s2[1] >= '0') and (s2[1] <= '9') and (s2[2] >= '0') and (s2[2] <= '9') then
369 begin
371 begin
377 //
379 begin
383 // BULLFROG
385 begin
389 // FORMULA1
391 begin
395 // CONDOM
397 begin
402 //
404 begin
409 // PURELOVE
411 begin
416 //
418 begin
423 // CASPER
425 begin
430 //
432 begin
437 // INFERNO
439 begin
445 begin
450 begin
454 Exit;
456 Cheated:
462 {$IFNDEF HEADLESS}
463 var
465 {$ENDIF}
466 begin
467 {$IFNDEF HEADLESS}
470 begin
472 begin
476 if (not g_Game_IsNet) and (g_ActiveWindow = nil) then g_Game_Pause(false); //Fn loves to do this
477 end
479 begin
481 begin
483 end
485 begin
487 begin
489 begin
491 g_Game_Free;
493 Exit;
505 begin
520 else
521 begin
524 begin
526 end
528 begin
532 end
534 begin
540 {$ENDIF}
545 var
548 begin
550 begin
552 end
554 begin
558 end
559 else
560 begin