summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1268da6)
raw | patch | inline | side by side (parent: 1268da6)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 26 Jul 2022 21:42:43 +0000 (00:42 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:03:26 +0000 (12:03 +0300) |
src/game/renders/opengl/r_common.pas | patch | blob | history | |
src/game/renders/opengl/r_render.pas | patch | blob | history |
index eb81170038204432031f8e08e89d60c0982a7cda..448458903b26b9061ac04e097d32f2e764fa2fb9 100644 (file)
{$ENDIF}
if p <> nil then
begin
+ // TODO look up/down
r_Common_GetPlayerPos(p, x, y);
if center then
begin
index 0b67e2d0b1561f92ed89ef24fb9b63ac7cca6944..f9c0024381a16880c14abfc6562dacba33435386 100644 (file)
hudrflag, hudrflags, hudrflagd: TGLTexture;
hudbflag, hudbflags, hudbflagd: TGLTexture;
+ FPS, FPSCounter, FPSTime: LongWord;
+
procedure r_Render_LoadTextures;
begin
r_Map_LoadTextures;
end;
procedure r_Render_Draw;
- var p1, p2: TPlayer;
+ var p1, p2: TPlayer; time: LongWord;
begin
if gExit = EXIT_QUIT then
exit;
+ INC(FPSCounter);
+ time := GetTickCount64();
+ if time - FPSTime >= 1000 then
+ begin
+ FPS := FPSCounter;
+ FPSCounter := 0;
+ FPSTime := time;
+ end;
+
r_Draw_Setup(gScreenWidth, gScreenHeight);
glClearColor(0.0, 0.0, 0.0, 0.0);
if gGameOn or ((gState in [STATE_FOLD]) and (EndingGameCounter < 255)) then
begin
- // TODO setup player hear point
-
if gSpectMode = SPECT_MAPVIEW then
begin
r_Render_DrawMapView(0, 0, gScreenWidth, gScreenHeight, gSpectX + gScreenWidth div 2, gSpectY + gScreenHeight div 2);
if not gGameOn then
begin
+ // TODO F key handle
case gState of
STATE_NONE: (* do nothing *) ;
STATE_MENU: r_Render_DrawBackground(GameWad + ':TEXTURES/TITLE');
r_Console_Draw(false);
+ // TODO g_debug_Sounds
+
+ if gShowFPS then
+ begin
+ r_Common_DrawText('FPS: ' + IntToStr(FPS), 0, 0, 255, 255, 255, 255, stdfont, TBasePoint.BP_LEFTUP);
+ r_Common_DrawText('UPS: ' + IntToStr(UPS), 0, 16, 255, 255, 255, 255, stdfont, TBasePoint.BP_LEFTUP);
+ end;
+
+ // TODO gShowTime
+ // TODO draw profilers
+
// TODO draw holmes interface
+ // TODO draw touch screen controls
+
glFlush();
glFinish();
sys_Repaint;
function r_Render_WriteScreenShot (filename: String): Boolean;
begin
+ // TODO write screenshot file
Result := False;
end;
{$IFDEF ENABLE_TOUCH}
procedure r_Render_GetKeyRect (key: Integer; out x, y, w, h: Integer; out founded: Boolean);
begin
+ // TODO implement touchscreen
founded := False;
end;
{$ENDIF}