From 6d4ca13591d78d302e961b781302d0eec85cd717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Mon, 13 Sep 2021 21:34:54 +0700 Subject: Simplify FPS calculation --- src/GameDraw.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/GameDraw.cpp') diff --git a/src/GameDraw.cpp b/src/GameDraw.cpp index 9848232..a3d9fe7 100644 --- a/src/GameDraw.cpp +++ b/src/GameDraw.cpp @@ -39,7 +39,7 @@ extern float sinefluctprog; extern int environment; extern Decals decals; -int Game::DrawGLScene(void) +void Game::DrawGLScene(void) { //Main menu if (mainmenu == 1) { @@ -1505,7 +1505,7 @@ int Game::DrawGLScene(void) if(debug){ - sprintf (string, "The framespersecond is %d out of maximum %d.",(int)framespersecond+1,maxfps); + sprintf (string, "FPS: %.0f", 1.0f / multiplier); text.glPrint(10,30,string,0,.8,screenwidth,screenheight); @@ -1530,14 +1530,5 @@ int Game::DrawGLScene(void) text.glPrint(10,80,string,0,.8,screenwidth,screenheight); } - - /* - sprintf (string, ""); - - text.glPrint(10,80,string,0,.8,screenwidth,screenheight); - */ - } - - return 1; } -- cgit v1.2.3