DEADSOFTWARE

cleanup: remove g_main.pas
[d2df-sdl.git] / src / game / stub / g_system.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_system;
18 interface
20 uses Utils;
22 (* --- Utils --- *)
23 function sys_GetTicks (): Int64;
24 procedure sys_Delay (ms: Integer);
26 (* --- Graphics --- *)
27 function sys_GetDisplayModes (bpp: Integer): SSArray;
28 function sys_SetDisplayMode (w, h, bpp: Integer; fullscreen, maximized: Boolean): Boolean;
29 procedure sys_EnableVSync (yes: Boolean);
30 procedure sys_Repaint;
32 (* --- Input --- *)
33 function sys_HandleInput (): Boolean;
34 procedure sys_RequestQuit;
36 (* --- Init --- *)
37 procedure sys_Init;
38 procedure sys_Final;
40 var (* hooks *)
41 sys_CharPress: procedure (ch: AnsiChar) = nil;
43 implementation
45 uses SysUtils;
47 (* --------- Utils --------- *)
49 function sys_GetTicks (): Int64;
50 begin
51 Result := Round(TimeStampToMSecs(DateTimeToTimeStamp(Now())))
52 end;
54 procedure sys_Delay (ms: Integer);
55 begin
56 Sleep(ms)
57 end;
59 (* --------- Graphics --------- *)
61 procedure sys_Repaint;
62 begin
63 end;
65 procedure sys_EnableVSync (yes: Boolean);
66 begin
67 end;
69 function sys_GetDisplayModes (bpp: Integer): SSArray;
70 begin
71 result := nil
72 end;
74 function sys_SetDisplayMode (w, h, bpp: Integer; fullscreen, maximized: Boolean): Boolean;
75 begin
76 result := true
77 end;
79 (* --------- Input --------- *)
81 function sys_HandleInput (): Boolean;
82 begin
83 result := false
84 end;
86 procedure sys_RequestQuit;
87 begin
88 end;
90 (* --------- Init --------- *)
92 procedure sys_Init;
93 begin
94 end;
96 procedure sys_Final;
97 begin
98 end;
100 end.