1 (* Copyright (C) Doom 2D: Forever Developers
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.
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.
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/>.
15 {$INCLUDE ../../shared/a_modes.inc}
20 procedure r_Window_DrawLoading (forceUpdate
: Boolean);
25 {$INCLUDE ../nogl/noGLuses.inc}
28 r_graphics
, r_game
, r_console
, g_system
,
29 g_options
, g_game
, g_console
,
34 ProgressUpdateMSecs
= 35; //1;//100;
37 prevLoadingUpdateTime
: UInt64;
39 procedure r_Window_DrawLoading (forceUpdate
: Boolean);
42 if e_NoGraphics
= False then
44 if not forceUpdate
then
46 stt
:= getTimeMilli();
47 forceUpdate
:= (stt
< prevLoadingUpdateTime
) or (stt
-prevLoadingUpdateTime
>= ProgressUpdateMSecs
);
52 e_SetRendertarget(True);
53 e_SetViewPort(0, 0, gScreenWidth
, gScreenHeight
);
55 r_Game_DrawMenuBackground('INTER');
56 e_DarkenQuadWH(0, 0, gScreenWidth
, gScreenHeight
, 150);
57 r_Game_DrawLoadingStat();
60 e_SetRendertarget(False);
61 e_SetViewPort(0, 0, gWinSizeX
, gWinSizeY
);
62 e_BlitFramebuffer(gWinSizeX
, gWinSizeY
);
65 prevLoadingUpdateTime
:= getTimeMilli();