[chocolate-doom] 26/83: Display FPS on quit

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:06:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.0.1
in repository chocolate-doom.

commit 554bbec0671545b5df29bc6cb0db570586eea910
Author: Simon Howard <fraggle at gmail.com>
Date:   Wed Aug 3 22:20:09 2005 +0000

    Display FPS on quit
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 32
---
 src/g_game.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/g_game.c b/src/g_game.c
index c12f484..ce1af51 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: g_game.c 32 2005-08-03 22:20:09Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.3  2005/08/03 22:20:09  fraggle
+// Display FPS on quit
+//
 // Revision 1.2  2005/07/23 16:44:55  fraggle
 // Update copyright to GNU GPL
 //
@@ -35,7 +38,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 8 2005-07-23 16:44:57Z fraggle $";
+rcsid[] = "$Id: g_game.c 32 2005-08-03 22:20:09Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -1663,9 +1666,15 @@ boolean G_CheckDemoStatus (void)
 	 
     if (timingdemo) 
     { 
+        float fps;
+        int realtics;
+
 	endtime = I_GetTime (); 
-	I_Error ("timed %i gametics in %i realtics",gametic 
-		 , endtime-starttime); 
+        realtics = endtime - starttime;
+        fps = ((float) gametic * 35) / realtics;
+
+	I_Error ("timed %i gametics in %i realtics (%f fps)",
+                 gametic, realtics, fps);
     } 
 	 
     if (demoplayback) 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list