[Orxonox-commit 1132] r5853 - code/branches/core5/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Oct 1 17:07:26 CEST 2009
Author: rgrieder
Date: 2009-10-01 17:07:26 +0200 (Thu, 01 Oct 2009)
New Revision: 5853
Modified:
code/branches/core5/src/libraries/core/Game.cc
Log:
Added two little console commands: printFPS and printTickTime for dedicated programs.
Modified: code/branches/core5/src/libraries/core/Game.cc
===================================================================
--- code/branches/core5/src/libraries/core/Game.cc 2009-10-01 14:56:11 UTC (rev 5852)
+++ code/branches/core5/src/libraries/core/Game.cc 2009-10-01 15:07:26 UTC (rev 5853)
@@ -56,6 +56,12 @@
static void stop_game()
{ Game::getInstance().stop(); }
SetConsoleCommandShortcutExternAlias(stop_game, "exit");
+ static void printFPS()
+ { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; }
+ SetConsoleCommandShortcutExternAlias(printFPS, "printFPS");
+ static void printTickTime()
+ { COUT(0) << Game::getInstance().getAvgTickTime() << std::endl; }
+ SetConsoleCommandShortcutExternAlias(printTickTime, "printTickTime");
std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s;
Game* Game::singletonPtr_s = 0;
More information about the Orxonox-commit
mailing list