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
32 implementation
34 uses
35 {$INCLUDE ../../nogl/noGLuses.inc}
41 ;
43 var
47 begin
49 begin
50 {$IFDEF NOGL_INIT}
51 nogl_Init;
53 begin
57 {$ELSE}
59 begin
63 {$ENDIF}
65 end
69 begin
71 begin
72 {$IFDEF NOGL_INIT}
73 nogl_Quit;
74 {$ENDIF}
76 end
80 begin
81 r_Map_Load;
82 r_PlayerModel_Load;
83 r_Monsters_Load;
84 r_Weapon_Load;
85 r_Items_Load;
86 r_GFX_Load;
90 begin
91 r_GFX_Free;
92 r_Items_Free;
93 r_Weapon_Free;
94 r_Monsters_Free;
95 r_PlayerModel_Free;
96 r_Map_Free;
100 begin
103 LoadGL;
104 r_Window_Initialize;
105 r_Console_Init;
106 r_PlayerModel_Initialize;
107 r_Map_Initialize;
111 begin
112 r_Map_Finalize;
113 r_PlayerModel_Finalize;
114 FreeGL;
115 e_ReleaseEngine
119 begin
120 r_Map_Update;
121 r_PlayerModel_Update;
125 begin
126 LoadGL;
132 begin
133 // store real window size in gWinSize, downscale resolution now
137 begin
147 e_InitGL
151 begin
152 if sys_SetDisplayMode(Max(1, gRC_Width), Max(1, gRC_Height), Max(1, gBPP), gRC_FullScreen, gRC_Maximized) then
154 else