DEADSOFTWARE

92ee3b97161f475f88d1b9acf04528fa566c813d
[d2df-sdl.git] / src / game / g_window.pas
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}
16 unit g_window;
18 interface
20 procedure g_Game_ClearLoading;
21 procedure g_Game_SetLoadingText (const text: String; maxval: Integer; rewrite: Boolean);
22 procedure g_Game_StepLoading (value: Integer = -1);
24 procedure ProcessLoading (forceUpdate: Boolean=false);
26 implementation
28 uses
29 {$IFDEF ENABLE_RENDER}
30 r_render,
31 {$ENDIF}
32 {$IFDEF ENABLE_SYSTEM}
33 g_system,
34 {$ENDIF}
35 e_sound, g_net
36 ;
38 procedure ProcessLoading (forceUpdate: Boolean = False);
39 begin
40 {$IFDEF ENABLE_RENDER}
41 r_Render_DrawLoading(forceUpdate);
42 {$ENDIF}
43 end;
45 procedure g_Game_ClearLoading;
46 begin
47 {$IFDEF ENABLE_RENDER}
48 r_Render_ClearLoading;
49 {$ENDIF}
50 end;
52 procedure g_Game_SetLoadingText (const text: String; maxval: Integer; rewrite: Boolean);
53 begin
54 {$IFDEF ENABLE_RENDER}
55 if maxval < 0 then maxval := 0;
56 r_Render_SetLoading(text, maxval);
57 {$ENDIF}
58 end;
60 procedure g_Game_StepLoading (value: Integer = -1);
61 begin
62 {$IFDEF ENABLE_RENDER}
63 if value < 0 then value := 1;
64 r_Render_StepLoading(value);
65 {$ENDIF}
66 end;
68 end.