Changeset 1897 in orxonox.OLD for orxonox/trunk
- Timestamp:
- May 20, 2004, 1:35:53 AM (21 years ago)
- Location:
- orxonox/trunk/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/core/orxonox.cc
r1896 r1897 56 56 bool Orxonox::leftWeGo = false; 57 57 bool Orxonox::shoot1 = false; 58 int Orxonox::fps = 0; 58 59 int Orxonox::alpha = 0; 59 60 int Orxonox::beta = 0; … … 84 85 glutKeyboardFunc(keyboard); 85 86 glutKeyboardUpFunc(upKeyboard); 87 88 glutTimerFunc(1000, timeSlice, 0); 86 89 } 87 90 … … 110 113 //cout << "Orxonox::gameInit" << endl; 111 114 } 115 116 117 /* this is the time triggered function. heart beat*/ 118 119 void Orxonox::timeSlice(int value) 120 { 121 cout << "fps: " << fps << endl; 122 fps = 0; 123 glutTimerFunc(1000, timeSlice, 0); 124 } 125 112 126 113 127 … … 232 246 void Orxonox::continousRedraw() 233 247 { 248 /* increment the frames-per-second counter*/ 249 fps++; 234 250 /* check for input to pass it over */ 235 251 if ( !pause && (rightWeGo || leftWeGo || upWeGo || downWeGo || shoot1)) { -
orxonox/trunk/core/orxonox.h
r1896 r1897 36 36 static bool leftWeGo; 37 37 static bool shoot1; 38 static int fps; 38 39 39 40 static int alpha; … … 41 42 static int offsetX; 42 43 static int offsetY; 44 45 static void timeSlice(int value); 43 46 44 47 public:
Note: See TracChangeset
for help on using the changeset viewer.