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
20 uses
21 {$IFDEF ENABLE_MENU}
22 g_gui,
23 {$ENDIF}
24 g_base // TRectWH
25 ;
27 (* render startup *)
31 (* load globally used textures *)
35 (* load map specific textures *)
47 {$IFDEF ENABLE_GIBS}
49 {$ENDIF}
51 {$IFDEF ENABLE_GFX}
53 {$ENDIF}
55 {$IFDEF ENABLE_TOUCH}
56 // touch screen button location and size
58 {$ENDIF}
60 {$IFDEF ENABLE_MENU}
65 {$ENDIF}
69 implementation
71 uses
72 {$IFDEF USE_GLES1}
73 GLES11,
74 {$ELSE}
76 {$ENDIF}
77 {$IFDEF ENABLE_SYSTEM}
78 g_system,
79 {$ENDIF}
84 ;
86 var
93 begin
94 r_Map_LoadTextures;
98 begin
99 r_Map_FreeTextures;
104 begin
108 result := r_Textures_LoadFontFromFile(GameWad + ':FONTS/' + name + 'FONT', info, skiphack, true);
114 begin
119 r_Map_Load;
123 begin
124 r_Map_Free;
131 {$IFDEF ENABLE_SYSTEM}
134 begin
146 {$ENDIF}
149 begin
150 {$IFDEF ENABLE_SYSTEM}
154 {$ENDIF}
155 r_Textures_Initialize;
156 r_Map_Initialize;
160 begin
161 r_Map_Finalize;
162 r_Textures_Finalize;
166 begin
167 r_Map_Update;
171 begin
175 glLoadIdentity;
178 glLoadIdentity;
182 begin
184 exit;
186 SetupMatrix;
193 //e_LogWritefln('r_render_draw: %sx%s', [gScreenWidth, gScreenHeight]);
196 begin
197 // TODO setup player view
198 // TODO setup sectator mode
199 // TODO setup player hear point
200 // TODO setup player view siz
202 // TODO draw player view + setup screen coords
203 r_Map_Draw(0, 0, gScreenWidth, gScreenHeight, gPlayer1.obj.x + 32, gPlayer1.obj.y + 32, gPlayer1); // !!! remove unnamed consts
205 // TODO draw holmes inspector
207 // TODO draw messages
208 // TODO draw stats (?)
209 // TODO draw spectator hud
213 begin
214 // TODO draw pause screen
218 begin
221 STATE_FOLD: ;
222 STATE_INTERCUSTOM: ;
223 STATE_INTERSINGLE: ;
224 STATE_ENDPIC: ;
225 STATE_SLIST: ;
229 {$IFDEF ENABLE_MENU}
231 begin
232 // TODO draw menu widgets
234 {$ENDIF}
236 // TODO draw console
238 // TODO draw holmes interface
242 sys_Repaint;
246 begin
256 begin
257 {$IFDEF ENABLE_SYSTEM}
260 else
263 {$ENDIF}
267 begin
271 {$IFDEF ENABLE_GIBS}
273 begin
276 {$ENDIF}
278 {$IFDEF ENABLE_GFX}
280 begin
283 {$ENDIF}
285 {$IFDEF ENABLE_TOUCH}
287 begin
290 {$ENDIF}
292 {$IFDEF ENABLE_MENU}
294 begin
299 begin
304 begin
309 begin
312 {$ENDIF}
315 begin