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
34 implementation
36 uses
38 {$IFDEF ENABLE_HOLMES}
40 {$ENDIF}
49 const
52 var
62 begin
66 {$IFNDEF HEADLESS}
67 var
69 {$ENDIF}
72 var
73 {$IFNDEF HEADLESS}
74 // ev: TSDL_Event;
76 {$ENDIF}
77 begin
78 // FillChar(ev, sizeof(ev), 0);
81 // while (SDL_PollEvent(@ev) > 0) do
82 // begin
83 // EventHandler(ev);
84 // if (ev.type_ = SDL_QUITEV) then break;
85 // end;
86 //e_PollJoysticks();
88 // if (ev.type_ = SDL_QUITEV) or (gExit = EXIT_QUIT) then
89 // begin
90 // wLoadingProgress := false;
91 // exit;
92 // end;
94 {$IFNDEF HEADLESS}
96 begin
98 begin
100 forceUpdate := (stt < prevLoadingUpdateTime) or (stt-prevLoadingUpdateTime >= ProgressUpdateMSecs);
104 begin
110 sys_Repaint;
114 {$ENDIF}
119 begin
121 end
122 else
123 begin
124 if (NetMode = NET_CLIENT) and (NetState <> NET_STATE_AUTH) then g_Net_Client_UpdateWhileLoading();
132 var
134 begin
143 begin
153 begin
156 begin
161 end
162 else
163 begin
174 begin
180 begin
182 exit;
185 // Âðåìÿ ïðåäûäóùåãî îáíîâëåíèÿ
187 begin
190 begin
191 Draw;
192 sys_Repaint
193 end
194 end
195 else
196 begin
204 var
206 {$IF not DEFINED(HEADLESS)}
208 {$ENDIF}
211 {$IFDEF ENABLE_HOLMES}
214 {$ENDIF}
215 begin
216 {$IFDEF HEADLESS}
218 {$ELSE}
219 {$IFDEF ENABLE_HOLMES}
221 begin
225 {$ENDIF}
226 {$ENDIF}
230 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 Init;
314 // Êîìàíäíàÿ ñòðîêà
317 {$IFNDEF HEADLESS}
318 // Çàïðîñ ÿçûêà
320 {$ENDIF}
324 // main loop
332 initialization