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
29 implementation
31 uses
32 {$INCLUDE ../../nogl/noGLuses.inc}
38 ;
40 var
44 begin
46 begin
47 {$IFDEF NOGL_INIT}
48 nogl_Init;
50 begin
54 {$ELSE}
56 begin
60 {$ENDIF}
62 end
66 begin
68 begin
69 {$IFDEF NOGL_INIT}
70 nogl_Quit;
71 {$ENDIF}
73 end
77 begin
78 r_Weapon_Load;
79 r_Items_Load;
80 r_GFX_Load;
84 begin
85 r_GFX_Free;
86 r_Items_Free;
87 r_Weapon_Free;
91 begin
94 LoadGL;
95 r_Window_Initialize;
96 r_Console_Init;
97 r_PlayerModel_Initialize;
101 begin
102 FreeGL;
103 r_PlayerModel_Finalize;
104 e_ReleaseEngine
108 begin
109 LoadGL;
115 begin
116 // store real window size in gWinSize, downscale resolution now
120 begin
130 e_InitGL
134 begin
135 if sys_SetDisplayMode(Max(1, gRC_Width), Max(1, gRC_Height), Max(1, gBPP), gRC_FullScreen, gRC_Maximized) then
137 else