Changeset 1382 for GTP/trunk/App/Games/Jungle_Rumble
- Timestamp:
- 09/15/06 21:27:38 (18 years ago)
- Location:
- GTP/trunk/App/Games/Jungle_Rumble
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Games/Jungle_Rumble/doc/readme.txt
r1378 r1382 17 17 5 Icethrower - Slow down your opponent to toast it with the firethrower 18 18 19 F1 Display help19 F1 Display Help 20 20 F2 FPS on/off 21 21 F3 Enable PhysX Debugger (Note: you only can switch it on/off wenn you turn it on in the config.xml file) … … 24 24 F10 Raytracer on/off 25 25 F11 Enable/Disable fire of the opponents (Not for cheating! ;-) 26 Pause Pause Game -
GTP/trunk/App/Games/Jungle_Rumble/src/GameManager.cpp
r1378 r1382 67 67 if( bKeyDown ) 68 68 { 69 switch( nChar ) 70 { 71 case VK_ESCAPE: 72 break; 73 case VK_F1: 74 if(activeScene == &this->gs) { 75 this->gs.getHUD()->message("HELP:\n drive: w-a-s-d\n shoot: left mouse\n F2: show FPS\n F3: PhysX Debugger\n F4: Music On/Off\n F9: Depth Imposters On/Off\n F10: Raytracer On/Off\n F11 Opponent Fire On/Off\n 1 Standard weapon\n 2 Bombs - explode late, but do cause lots of damage!\n 3 Alien weapon - just shoot!\n 4 Firethrower - Toast your opponent\n 5 Icethrower - Slow down your opponent", 2, 0.01f, true); 76 } 77 //this->gs.hasWon(); 78 break; 79 case VK_F2: 80 this->gs.showFPS = !this->gs.showFPS; 81 break; 82 case VK_F3: 83 if(!this->activeScene->usePhysXDebugger) 84 this->activeScene->usePhysXDebugger = true; 85 else 86 this->activeScene->usePhysXDebugger = false; 87 break; 88 case VK_F4: 89 this->gs.setBackgroundSoundMute(!this->gs.getBackgroundSoundMute()); 90 this->ms.setBackgroundSoundMute(!this->ms.getBackgroundSoundMute()); 91 break; 92 case VK_F5: 93 //this->gs.getHUD()->displayToasted(3, 0.01f); 94 break; 95 case VK_F6: 96 //this->gs.getHUD()->message("hallo martin", 3, 0.01f); 97 break; 98 case VK_F7: 99 //this->gs.getHUD()->displayLose(3, 0.01f); 100 break; 101 case VK_F8: 102 this->gs.drawBBoxes = !this->gs.drawBBoxes; 103 break; 104 case VK_F9: 105 this->gs.useDepthImposter = !this->gs.useDepthImposter; 106 break; 107 case VK_F10: 108 this->gs.useRaytracer = !this->gs.useRaytracer; 109 break; 110 case VK_F11: 111 this->gs.aiPlayerFireEnable = !this->gs.aiPlayerFireEnable; 112 break; 113 } 69 //if(nChar == VK_PAUSE || nChar == VK_F9 || nChar == VK_F10 || !this->gs.preparepaused) { 70 switch( nChar ) 71 { 72 case VK_ESCAPE: 73 break; 74 case VK_F1: 75 if(activeScene == &this->gs) { 76 this->gs.getHUD()->message("HELP:\n drive: w-a-s-d\n shoot: left mouse\n F2: show FPS\n F3: PhysX Debugger\n F4: Music On/Off\n F9: Depth Imposters On/Off\n F10: Raytracer On/Off\n F11 Opponent Fire On/Off\n Pause: Pause Game\n 1 Standard weapon\n 2 Bombs - explode late, but do cause lots of damage!\n 3 Alien weapon - just shoot!\n 4 Firethrower - Toast your opponent\n 5 Icethrower - Slow down your opponent", 2, 0.01f, true); 77 } 78 //this->gs.hasWon(); 79 break; 80 case VK_F2: 81 this->gs.showFPS = !this->gs.showFPS; 82 break; 83 case VK_F3: 84 if(!this->activeScene->usePhysXDebugger) 85 this->activeScene->usePhysXDebugger = true; 86 else 87 this->activeScene->usePhysXDebugger = false; 88 break; 89 case VK_F4: 90 this->gs.setBackgroundSoundMute(!this->gs.getBackgroundSoundMute()); 91 this->ms.setBackgroundSoundMute(!this->ms.getBackgroundSoundMute()); 92 break; 93 case VK_F5: 94 //this->gs.getHUD()->displayToasted(3, 0.01f); 95 break; 96 case VK_F6: 97 //this->gs.getHUD()->message("hallo martin", 3, 0.01f); 98 break; 99 case VK_F7: 100 //this->gs.getHUD()->displayLose(3, 0.01f); 101 break; 102 case VK_F8: 103 this->gs.drawBBoxes = !this->gs.drawBBoxes; 104 break; 105 case VK_F9: 106 this->gs.useDepthImposter = !this->gs.useDepthImposter; 107 break; 108 case VK_F10: 109 this->gs.useRaytracer = !this->gs.useRaytracer; 110 break; 111 case VK_F11: 112 this->gs.aiPlayerFireEnable = !this->gs.aiPlayerFireEnable; 113 break; 114 case VK_PAUSE: 115 if(activeScene == &this->gs) { 116 if(!this->gs.preparepaused) { 117 this->gs.getHUD()->message("Game paused. Press Pause to Continue...", 1, 0.01f); 118 } else { 119 this->gs.currentlypaused = false; 120 this->gs.getHUD()->message("", 1, 0.01f); 121 } 122 this->gs.preparepaused= !this->gs.preparepaused; 123 } 124 break; 125 } 126 //} 114 127 115 128 } … … 325 338 //show mouse cursor: 326 339 ShowCursor(true); 340 this->gs.currentlypaused = false; 341 this->gs.preparepaused = false; 327 342 } 328 343 … … 340 355 //hide mouse cursor: 341 356 ShowCursor(false); 357 358 this->gs.currentlypaused = false; 359 this->gs.preparepaused = false; 342 360 } 343 361 } -
GTP/trunk/App/Games/Jungle_Rumble/src/GameScene.cpp
r1378 r1382 44 44 45 45 this->recalcTransformations = true; 46 47 this->currentlypaused = false; 48 this->preparepaused = false; 46 49 } 47 50 … … 110 113 this->sadSound = NULL; 111 114 this->happySound = NULL; 115 this->currentlypaused = false; 116 this->preparepaused = false; 112 117 113 118 Scene::clearScene(); … … 124 129 this->setNotifyReport(&this->userNotify); 125 130 this->descSet = false; 131 this->currentlypaused = false; 132 this->preparepaused = false; 126 133 Scene::initScene(_manager); 127 134 … … 194 201 } 195 202 203 if(this->preparepaused) { 204 this->currentlypaused = true; 205 } 206 196 207 //this->device->SetRenderTarget(0, this->finalImageSurface); 197 208 //this->manager->printToConsole("renderScene"); … … 205 216 } 206 217 207 this->takeTime(); 218 if(!this->currentlypaused) { 219 this->takeTime(); 220 } 221 208 222 //ClearScreen 209 223 //this->clearRenderTargetAndZBuffer(); … … 211 225 this->clearSharedResources(); 212 226 //Fetch Physic Results 213 if(this->recalcTransformations) {227 if(this->recalcTransformations && !this->currentlypaused) { 214 228 this->fetchPhysicResults(); 215 229 } 216 230 //Fading Stuff 217 this->doFade(); 218 //FIRST GAME UPDATE 219 this->updateGameFirst(); 220 //Trigger updates 221 this->updateTrigger(); 222 //Update Nodes 223 this->updateNodes(); 224 //Calculate Transformations 225 if(this->recalcTransformations) { 226 this->calculateTransformations(); 227 } 228 //SECOND GAME UPDATE 229 this->updateGameSecond(); 231 if(!this->currentlypaused) { 232 this->doFade(); 233 //FIRST GAME UPDATE 234 this->updateGameFirst(); 235 //Trigger updates 236 this->updateTrigger(); 237 //Update Nodes 238 this->updateNodes(); 239 //Calculate Transformations 240 if(this->recalcTransformations) { 241 this->calculateTransformations(); 242 } 243 //SECOND GAME UPDATE 244 this->updateGameSecond(); 245 } 246 230 247 //startRenderPasses 231 248 this->startRenderPasses(); … … 233 250 //Cleanup Memory 234 251 this->cleanUpScene(); 235 //Start Physic 236 if(this->recalcTransformations) { 237 this->startPhysic(); 252 253 if(!this->currentlypaused) { 254 //Start Physic 255 if(this->recalcTransformations) { 256 this->startPhysic(); 257 } 238 258 } 239 259 this->cnt = 0; -
GTP/trunk/App/Games/Jungle_Rumble/src/GameScene.h
r1378 r1382 108 108 void reduceHealthOnPlayers(Bullet* bullet); 109 109 110 bool preparepaused; 111 bool currentlypaused; 112 110 113 void hasWon(); 111 114 protected:
Note: See TracChangeset
for help on using the changeset viewer.