c424e51771c8efddda4b51d51fa391f053d6ad8b
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}
37 r_weapons, r_items
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;
83 begin
84 r_Items_Free;
85 r_Weapon_Free;
89 begin
92 LoadGL;
93 r_Window_Initialize;
94 r_Console_Init;
95 r_PlayerModel_Initialize;
99 begin
100 FreeGL;
101 r_PlayerModel_Finalize;
102 e_ReleaseEngine
106 begin
107 LoadGL;
113 begin
114 // store real window size in gWinSize, downscale resolution now
118 begin
128 e_InitGL
132 begin
133 if sys_SetDisplayMode(Max(1, gRC_Width), Max(1, gRC_Height), Max(1, gBPP), gRC_FullScreen, gRC_Maximized) then
135 else