DEADSOFTWARE

9d14f24fcaa45a3740b1f74a551b418bcd236c62
[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;
42 sys_ScreenResize: procedure (w, h: Integer) = nil;
44 implementation
46 uses SysUtils;
48 (* --------- Utils --------- *)
50 function sys_GetTicks (): Int64;
51 begin
52 Result := Round(TimeStampToMSecs(DateTimeToTimeStamp(Now())))
53 end;
55 procedure sys_Delay (ms: Integer);
56 begin
57 Sleep(ms)
58 end;
60 (* --------- Graphics --------- *)
62 procedure sys_Repaint;
63 begin
64 end;
66 procedure sys_EnableVSync (yes: Boolean);
67 begin
68 end;
70 function sys_GetDisplayModes (bpp: Integer): SSArray;
71 begin
72 result := nil
73 end;
75 function sys_SetDisplayMode (w, h, bpp: Integer; fullscreen, maximized: Boolean): Boolean;
76 begin
77 result := true
78 end;
80 (* --------- Input --------- *)
82 function sys_HandleInput (): Boolean;
83 begin
84 result := false
85 end;
87 procedure sys_RequestQuit;
88 begin
89 end;
91 (* --------- Init --------- *)
93 procedure sys_Init;
94 begin
95 end;
97 procedure sys_Final;
98 begin
99 end;
101 end.