bfd4377830c271bc278fe5480357782093cec5f7
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
20 uses
21 utils;
27 var
33 implementation
35 uses
37 {$IFDEF ENABLE_HOLMES}
39 {$ENDIF}
47 var
55 begin
56 // remember old mobj positions, prepare for update
58 // server: receive client commands for new frame
59 // client: receive game state changes from server
62 // think
64 // server: send any accumulated outgoing data to clients
70 begin
76 var
78 begin
79 Randomize;
81 {$IFDEF HEADLESS}
82 {$IFDEF USE_SDLMIXER}
84 {$ELSE}
86 {$ENDIF}
87 {$ELSE}
89 {$ENDIF}
91 g_Touch_Init;
93 (*
94 if (e_JoysticksAvailable > 0) then
95 e_WriteLog('Input: Joysticks available.', TMsgType.Notify)
96 else
97 e_WriteLog('Input: No Joysticks.', TMsgType.Notify);
98 *)
101 begin
109 // FillChar(charbuff, sizeof(charbuff), ' ');
113 begin
121 begin
128 begin
133 begin
135 Exit;
137 {$IFNDEF HEADLESS}
139 {$ENDIF}
151 var
153 begin
162 begin
173 begin
183 begin
189 begin
191 exit;
194 // Âðåìÿ ïðåäûäóùåãî îáíîâëåíèÿ
198 // don't wait if VSync is on, GL already probably waits enough
203 begin
206 else
208 Draw;
209 sys_Repaint;
210 Frame := Time
211 end
212 else
219 var
223 {$IFDEF ENABLE_HOLMES}
226 {$ENDIF}
227 begin
231 begin
234 //if arg = '--twinkletwinkle' then gwin_k8_enable_light_experiments := true;
252 {.$IF DEFINED(D2F_DEBUG)}
254 {.$ENDIF}
256 {$IFDEF ENABLE_HOLMES}
260 begin
262 begin
269 begin
271 begin
274 {$IFNDEF HEADLESS}
276 begin
283 {$ELSE}
284 // fuck off, fpc!
287 {$ENDIF}
291 {$ENDIF}
294 begin
296 begin
303 begin
311 begin
313 begin
320 r_Window_Initialize;
322 Init;
327 // Êîìàíäíàÿ ñòðîêà
330 {$IFNDEF HEADLESS}
331 // Çàïðîñ ÿçûêà
333 {$ENDIF}
337 // main loop
349 initialization