- Timestamp:
- Mar 9, 2008, 5:27:07 PM (17 years ago)
- Location:
- code/branches/core2/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/CMakeLists.txt
r871 r873 4 4 ADD_SUBDIRECTORY(util) 5 5 ADD_SUBDIRECTORY(orxonox/core) 6 ADD_SUBDIRECTORY(audio)7 ADD_SUBDIRECTORY(network)6 #ADD_SUBDIRECTORY(audio) 7 #ADD_SUBDIRECTORY(network) 8 8 #ADD_SUBDIRECTORY(loader) 9 9 ADD_SUBDIRECTORY(orxonox) -
code/branches/core2/src/orxonox/CMakeLists.txt
r871 r873 4 4 Orxonox.cc 5 5 objects/Tickable.cc 6 SpaceshipSteering.cc7 hud/HUD.cc6 # SpaceshipSteering.cc 7 # hud/HUD.cc 8 8 particle/ParticleInterface.cc 9 9 tools/BillboardSet.cc 10 tools/Light.cc10 # tools/Light.cc 11 11 tools/Mesh.cc 12 12 tools/Timer.cc 13 13 objects/Ambient.cc 14 objects/Camera.cc14 # objects/Camera.cc 15 15 objects/Explosion.cc 16 objects/Fighter.cc16 # objects/Fighter.cc 17 17 objects/Model.cc 18 objects/NPC.cc18 # objects/NPC.cc 19 19 objects/Projectile.cc 20 20 objects/Skybox.cc 21 21 objects/SpaceShip.cc 22 22 # objects/SpaceshipSteeringObject.cc 23 #objects/test1.cc24 #objects/test2.cc25 #objects/test3.cc23 objects/test1.cc 24 objects/test2.cc 25 objects/test3.cc 26 26 objects/WorldEntity.cc 27 objects/weapon/AmmunitionDump.cc28 objects/weapon/BarrelGun.cc29 objects/weapon/BaseWeapon.cc30 objects/weapon/Bullet.cc31 objects/weapon/BulletManager.cc32 objects/weapon/WeaponStation.cc27 # objects/weapon/AmmunitionDump.cc 28 # objects/weapon/BarrelGun.cc 29 # objects/weapon/BaseWeapon.cc 30 # objects/weapon/Bullet.cc 31 # objects/weapon/BulletManager.cc 32 # objects/weapon/WeaponStation.cc 33 33 ) 34 34 … … 42 42 util 43 43 core 44 audio45 network44 # audio 45 # network 46 46 # loader 47 47 ) -
code/branches/core2/src/orxonox/Orxonox.cc
r871 r873 58 58 // loader and audio 59 59 //#include "loader/LevelLoader.h" 60 #include "audio/AudioManager.h"60 //#include "audio/AudioManager.h" 61 61 62 62 // network 63 #include "network/Server.h"64 #include "network/Client.h"65 #include "network/NetworkFrameListener.h"63 //#include "network/Server.h" 64 //#include "network/Client.h" 65 //#include "network/NetworkFrameListener.h" 66 66 67 67 // objects 68 68 #include "objects/Tickable.h" 69 69 #include "tools/Timer.h" 70 #include "objects/NPC.h"70 //#include "objects/NPC.h" 71 71 #include "core/ArgReader.h" 72 72 #include "core/Factory.h" 73 73 #include "core/Debug.h" 74 74 #include "core/Loader.h" 75 #include "hud/HUD.h"76 #include "objects/weapon/BulletManager.h"75 //#include "hud/HUD.h" 76 //#include "objects/weapon/BulletManager.h" 77 77 #include "GraphicsEngine.h" 78 78 … … 85 85 { 86 86 public: 87 OrxListener(OIS::Keyboard *keyboard , audio::AudioManager* auMan, gameMode mode)87 OrxListener(OIS::Keyboard *keyboard/*, audio::AudioManager* auMan*/, gameMode mode) 88 88 { 89 89 mKeyboard = keyboard; 90 90 mode_=mode; 91 auMan_ = auMan;91 // auMan_ = auMan; 92 92 } 93 93 94 94 bool frameStarted(const Ogre::FrameEvent& evt) 95 95 { 96 auMan_->update();97 updateAI();98 99 if(mode_ == PRESENTATION)100 server_g->tick(evt.timeSinceLastFrame);101 else if(mode_ == CLIENT)102 client_g->tick(evt.timeSinceLastFrame);96 // auMan_->update(); 97 // updateAI(); 98 99 // if(mode_ == PRESENTATION) 100 // server_g->tick(evt.timeSinceLastFrame); 101 // else if(mode_ == CLIENT) 102 // client_g->tick(evt.timeSinceLastFrame); 103 103 104 104 usleep(10); … … 107 107 return !mKeyboard->isKeyDown(OIS::KC_ESCAPE); 108 108 } 109 109 /* 110 110 void updateAI() 111 111 { … … 115 115 } 116 116 } 117 117 */ 118 118 private: 119 119 gameMode mode_; 120 120 OIS::Keyboard *mKeyboard; 121 audio::AudioManager* auMan_;121 // audio::AudioManager* auMan_; 122 122 }; 123 123 … … 133 133 this->dataPath_ = ""; 134 134 // this->loader_ = 0; 135 this->auMan_ = 0;135 // this->auMan_ = 0; 136 136 this->singletonRef_ = 0; 137 137 this->keyboard_ = 0; … … 214 214 //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); 215 215 //std::cout << "could not add framelistener" << std::endl; 216 server_g->open();216 // server_g->open(); 217 217 break; 218 218 case CLIENT: 219 client_g->establishConnection();219 // client_g->establishConnection(); 220 220 break; 221 221 case SERVER: … … 280 280 createFrameListener(); 281 281 try{ 282 server_g = new network::Server(); //!< add port and bindadress283 server_g->open(); //!< open server and create listener thread284 if(ogre_ && ogre_->getRoot())285 ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server282 // server_g = new network::Server(); //!< add port and bindadress 283 // server_g->open(); //!< open server and create listener thread 284 // if(ogre_ && ogre_->getRoot()) 285 // ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server 286 286 COUT(3) << "Info: network framelistener added" << std::endl; 287 287 } … … 304 304 ogre_->setConfigPath(path); 305 305 ogre_->setup(); 306 server_g = new network::Server(); // FIXME add some settings if wanted306 // server_g = new network::Server(); // FIXME add some settings if wanted 307 307 if(!ogre_->load()) die(/* unable to load */); 308 308 // FIXME add network framelistener … … 314 314 ogre_->setConfigPath(path); 315 315 ogre_->setup(); 316 if(serverIp_.compare("")==0)317 client_g = new network::Client();318 else319 client_g = new network::Client(serverIp_, 55556);316 // if(serverIp_.compare("")==0) 317 // client_g = new network::Client(); 318 // else 319 // client_g = new network::Client(serverIp_, 55556); 320 320 if(!ogre_->load()) die(/* unable to load */); 321 ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());321 // ogre_->getRoot()->addFrameListener(new network::ClientFrameListener()); 322 322 } 323 323 … … 375 375 { 376 376 // Init audio 377 auMan_ = new audio::AudioManager();378 379 bulletMgr_ = new BulletManager();377 // auMan_ = new audio::AudioManager(); 378 379 // bulletMgr_ = new BulletManager(); 380 380 381 381 // load this file from config … … 385 385 Loader::open(startlevel); 386 386 387 Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");388 HUD* orxonoxHud;389 orxonoxHud = new HUD();390 orxonoxHud->setEnergyValue(20);391 orxonoxHud->setEnergyDistr(20,20,60);392 hudOverlay->show();387 // Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); 388 // HUD* orxonoxHud; 389 // orxonoxHud = new HUD(); 390 // orxonoxHud->setEnergyValue(20); 391 // orxonoxHud->setEnergyDistr(20,20,60); 392 // hudOverlay->show(); 393 393 394 394 /* … … 461 461 462 462 //if(mode_!=CLIENT) // FIXME just a hack ------- remove this in future 463 frameListener_ = new OrxListener(keyboard_ , auMan_, mode_);463 frameListener_ = new OrxListener(keyboard_/*, auMan_*/, mode_); 464 464 ogre_->getRoot()->addFrameListener(frameListener_); 465 465 } -
code/branches/core2/src/orxonox/Orxonox.h
r871 r873 15 15 #include "OrxonoxPrereqs.h" 16 16 //#include "loader/LoaderPrereqs.h" 17 #include "audio/AudioPrereqs.h"17 //#include "audio/AudioPrereqs.h" 18 18 19 19 #include "GraphicsEngine.h" … … 41 41 inline Ogre::SceneManager* getSceneManager() { return ogre_->getSceneManager(); }; 42 42 inline GraphicsEngine* getOgrePointer() { return ogre_; }; 43 inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };43 // inline audio::AudioManager* getAudioManagerPointer() { return auMan_; }; 44 44 inline OIS::Keyboard* getKeyboard() { return this->keyboard_; } 45 45 inline OIS::Mouse* getMouse() { return this->mouse_; } 46 inline BulletManager* getBulletMgr() { return this->bulletMgr_; }46 // inline BulletManager* getBulletMgr() { return this->bulletMgr_; } 47 47 48 48 private: … … 70 70 std::string dataPath_; //!< path to data 71 71 // loader::LevelLoader* loader_; //!< level loader builds the scene 72 audio::AudioManager* auMan_; //!< audio manager73 BulletManager* bulletMgr_; //!< Keeps track of the thrown bullets72 // audio::AudioManager* auMan_; //!< audio manager 73 // BulletManager* bulletMgr_; //!< Keeps track of the thrown bullets 74 74 static Orxonox* singletonRef_; 75 75 OIS::Keyboard* keyboard_;
Note: See TracChangeset
for help on using the changeset viewer.