Changeset 10379 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Jan 26, 2007, 10:58:31 AM (18 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r10376 r10379 449 449 450 450 /* update tick the rest */ 451 this->dataTank->localCamera->tick(this->dtS);451 State::getCamera()->tick(this->dtS); 452 452 AnimationPlayer::getInstance()->tick(this->dtS); 453 453 PhysicsEngine::getInstance()->tick(this->dtS); … … 578 578 void GameWorld::applyCameraSettings() 579 579 { 580 this->dataTank->localCamera->apply (); 581 this->dataTank->localCamera->project (); 580 581 State::getCamera()->apply (); 582 State::getCamera()->project (); 582 583 GraphicsEngine::storeMatrices(); 583 584 } -
trunk/src/story_entities/game_world_data.cc
r10317 r10379 30 30 #include "player.h" 31 31 #include "camera.h" 32 #include "cameraman.h" 32 33 #include "terrain.h" 33 34 #include "skybox.h" … … 70 71 this->glmis = NULL; 71 72 72 this->localCamera = NULL; 73 73 74 this->localPlayer = NULL; 74 75 this->sky = NULL; … … 98 99 99 100 PNode::getNullParent(); 100 this->localCamera = new Camera(); 101 this->localCamera->setName ("GameWorld-Camera"); 102 State::setCamera(this->localCamera, this->localCamera->getTarget()); 103 101 Camera* localCamera = new Camera(); 102 localCamera->setName ("GameWorld-Camera"); 103 State::setCamera(localCamera, localCamera->getTarget()); 104 CameraMan* camMan = new CameraMan(); 105 State::setCameraman(camMan); 104 106 LightManager::getInstance(); 105 107 … … 283 285 State::setPlayer(NULL); 284 286 this->localPlayer = NULL; 285 this->localCamera = NULL;286 287 State::setCamera(NULL, NULL); 287 288 this->sky = NULL; … … 333 334 LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule); 334 335 335 LoadParam(root, "clip-region", this->localCamera, Camera, setClipRegion);336 LoadParam(root, "clip-region", State::getCameraman(), CameraMan, setClipRegion); 336 337 337 338 … … 339 340 //LoadParamXML(root, "PhysicsEngine", PhysicsEngine::getInstance(), PhysicsEngine, loadParams); 340 341 341 if( this->sky != NULL) 342 this->localCamera->addChild(this->sky); 343 OrxSound::SoundEngine::getInstance()->setListener(this->localCamera); 342 343 OrxSound::SoundEngine::getInstance()->setListener(State::getCamera()); 344 344 345 345 return ErrorMessage(); -
trunk/src/story_entities/game_world_data.h
r9869 r10379 56 56 GLMenuImageScreen* glmis; //!< The Level-Loader Display 57 57 58 Camera* localCamera; //!< The current camera 58 59 59 Player* localPlayer; //!< The player, you fly through the level. 60 60 WorldEntity* sky; //!< The environmental sky of orxonox -
trunk/src/story_entities/menu/game_menu.cc
r10368 r10379 110 110 this->subscribeEvent(ES_MENU, SDLK_ESCAPE); 111 111 112 this->dataTank->localCamera->setRelCoor(this->cameraVector);112 State::getCamera()->setRelCoor(this->cameraVector); 113 113 //this->dataTank->localCamera->setFovy(60); 114 114 … … 391 391 Quaternion q(/*0.00005*/ dt * .1, Vector(0.0, 1.0, 0.0)); 392 392 this->cameraVector = q.apply(this->cameraVector); 393 this->dataTank->localCamera->setRelCoor(this->cameraVector);394 this->dataTank->localCamera->getTarget()->setRelCoorSoft(0,0,0);393 State::getCamera()->setRelCoor(this->cameraVector); 394 State::getCamera()->getTarget()->setRelCoorSoft(0,0,0); 395 395 } 396 396
Note: See TracChangeset
for help on using the changeset viewer.