aboutsummaryrefslogtreecommitdiff
path: root/src/GameDraw.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-09-13 21:34:54 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-09-14 00:01:12 +0700
commit6d4ca13591d78d302e961b781302d0eec85cd717 (patch)
tree3fc6c7a423fe7676de9558515418928c70e2207a /src/GameDraw.cpp
parent7ee1701de3faa287c6d013bd14cefb2cded25bfc (diff)
downloadblackshades-6d4ca13591d78d302e961b781302d0eec85cd717.tar.gz
Simplify FPS calculation
Diffstat (limited to 'src/GameDraw.cpp')
-rw-r--r--src/GameDraw.cpp13
1 files changed, 2 insertions, 11 deletions
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;
}