- Timestamp:
- Feb 9, 2008, 10:55:17 PM (17 years ago)
- Location:
- code/branches/core
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/bin/levels/sample.oxw
r790 r793 11 11 12 12 13 13 <!-- 14 14 <audio> 15 15 <ambient> … … 21 21 </ambient> 22 22 </audio> 23 23 --> 24 24 <!-- Keep a minimum distance of >100 to the object, otherwise the camara thinks it's in the object --> 25 25 <!-- the value has to negative, as we want the camara behind the object --> -
code/branches/core/src/CMakeLists.txt
r790 r793 4 4 ADD_SUBDIRECTORY(util) 5 5 ADD_SUBDIRECTORY(orxonox/core) 6 ADD_SUBDIRECTORY(audio)7 ADD_SUBDIRECTORY(network)8 ADD_SUBDIRECTORY(loader)6 #ADD_SUBDIRECTORY(audio) 7 #ADD_SUBDIRECTORY(network) 8 #ADD_SUBDIRECTORY(loader) 9 9 ADD_SUBDIRECTORY(orxonox) -
code/branches/core/src/loader/CMakeLists.txt
r790 r793 13 13 TARGET_LINK_LIBRARIES( loader 14 14 util 15 core 15 16 ) -
code/branches/core/src/loader/LevelLoader.cc
r790 r793 35 35 #include "core/CoreIncludes.h" 36 36 37 #include "audio/AudioManager.h"37 //#include "audio/AudioManager.h" 38 38 #include "core/BaseObject.h" 39 39 #include "orxonox/Orxonox.h" … … 99 99 { 100 100 TiXmlElement* loadElem; 101 TiXmlElement* audioElem;101 // TiXmlElement* audioElem; 102 102 TiXmlElement* worldElem; 103 103 TiXmlElement* tElem; … … 139 139 140 140 } 141 141 /* 142 142 // Load audio 143 143 audio::AudioManager* auMan = orxonox::Orxonox::getSingleton()->getAudioManagerPointer(); … … 169 169 } 170 170 } 171 171 */ 172 172 // Load world 173 173 worldElem = rootElement_->FirstChildElement("world"); -
code/branches/core/src/orxonox/CMakeLists.txt
r790 r793 3 3 Main.cc 4 4 Orxonox.cc 5 SpaceshipSteering.cc6 hud/HUD.cc7 particle/ParticleInterface.cc8 tools/BillboardSet.cc9 tools/Light.cc5 # SpaceshipSteering.cc 6 # hud/HUD.cc 7 # particle/ParticleInterface.cc 8 # tools/BillboardSet.cc 9 # tools/Light.cc 10 10 tools/Mesh.cc 11 objects/Ambient.cc12 objects/Camera.cc13 objects/Explosion.cc14 objects/Fighter.cc11 # objects/Ambient.cc 12 # objects/Camera.cc 13 # objects/Explosion.cc 14 # objects/Fighter.cc 15 15 objects/Model.cc 16 objects/NPC.cc17 objects/Projectile.cc18 objects/Skybox.cc19 objects/SpaceShip.cc20 # objects/SpaceshipSteeringObject.cc21 #objects/test1.cc22 #objects/test2.cc23 #objects/test3.cc16 # objects/NPC.cc 17 # objects/Projectile.cc 18 # objects/Skybox.cc 19 # objects/SpaceShip.cc 20 # objects/SpaceshipSteeringObject.cc 21 objects/test1.cc 22 objects/test2.cc 23 objects/test3.cc 24 24 objects/WorldEntity.cc 25 objects/weapon/AmmunitionDump.cc26 objects/weapon/BarrelGun.cc27 objects/weapon/BaseWeapon.cc28 objects/weapon/Bullet.cc29 objects/weapon/BulletManager.cc30 objects/weapon/WeaponStation.cc25 # objects/weapon/AmmunitionDump.cc 26 # objects/weapon/BarrelGun.cc 27 # objects/weapon/BaseWeapon.cc 28 # objects/weapon/Bullet.cc 29 # objects/weapon/BulletManager.cc 30 # objects/weapon/WeaponStation.cc 31 31 ) 32 32 … … 40 40 util 41 41 core 42 audio43 network44 loader42 # audio 43 # network 44 # loader 45 45 ) 46 46 -
code/branches/core/src/orxonox/Orxonox.cc
r790 r793 57 57 58 58 // loader and audio 59 #include "loader/LevelLoader.h"60 #include "audio/AudioManager.h"59 //#include "loader/LevelLoader.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 #include "hud/HUD.h"75 #include "objects/weapon/BulletManager.h"74 //#include "hud/HUD.h" 75 //#include "objects/weapon/BulletManager.h" 76 76 #include "GraphicsEngine.h" 77 77 … … 84 84 { 85 85 public: 86 OrxListener(OIS::Keyboard *keyboard , audio::AudioManager* auMan, gameMode mode)86 OrxListener(OIS::Keyboard *keyboard/*, audio::AudioManager* auMan*/, gameMode mode) 87 87 { 88 88 mKeyboard = keyboard; 89 89 mode_=mode; 90 auMan_ = auMan;90 // auMan_ = auMan; 91 91 } 92 92 93 93 bool frameStarted(const Ogre::FrameEvent& evt) 94 94 { 95 auMan_->update();95 // auMan_->update(); 96 96 updateAI(); 97 97 98 if(mode_ == PRESENTATION)98 /* if(mode_ == PRESENTATION) 99 99 server_g->tick(evt.timeSinceLastFrame); 100 100 else if(mode_ == CLIENT) 101 101 client_g->tick(evt.timeSinceLastFrame); 102 102 */ 103 103 usleep(10); 104 104 … … 108 108 109 109 void updateAI() 110 { 110 {/* 111 111 for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) 112 112 { 113 113 it->update(); 114 } 114 }*/ 115 115 } 116 116 … … 118 118 gameMode mode_; 119 119 OIS::Keyboard *mKeyboard; 120 audio::AudioManager* auMan_;120 // audio::AudioManager* auMan_; 121 121 }; 122 122 … … 131 131 this->ogre_ = new GraphicsEngine(); 132 132 this->dataPath_ = ""; 133 this->loader_ = 0;134 this->auMan_ = 0;133 // this->loader_ = 0; 134 // this->auMan_ = 0; 135 135 this->singletonRef_ = 0; 136 136 this->keyboard_ = 0; … … 213 213 //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); 214 214 //std::cout << "could not add framelistener" << std::endl; 215 server_g->open();215 // server_g->open(); 216 216 break; 217 217 case CLIENT: 218 client_g->establishConnection();218 // client_g->establishConnection(); 219 219 break; 220 220 case SERVER: … … 279 279 createFrameListener(); 280 280 try{ 281 server_g = new network::Server(); //!< add port and bindadress282 server_g->open(); //!< open server and create listener thread283 if(ogre_ && ogre_->getRoot())284 ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server281 // server_g = new network::Server(); //!< add port and bindadress 282 // server_g->open(); //!< open server and create listener thread 283 // if(ogre_ && ogre_->getRoot()) 284 // ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server 285 285 COUT(3) << "Info: network framelistener added" << std::endl; 286 286 } … … 303 303 ogre_->setConfigPath(path); 304 304 ogre_->setup(); 305 server_g = new network::Server(); // FIXME add some settings if wanted305 // server_g = new network::Server(); // FIXME add some settings if wanted 306 306 if(!ogre_->load()) die(/* unable to load */); 307 307 // FIXME add network framelistener … … 313 313 ogre_->setConfigPath(path); 314 314 ogre_->setup(); 315 if(serverIp_.compare("")==0)315 /* if(serverIp_.compare("")==0) 316 316 client_g = new network::Client(); 317 317 else 318 client_g = new network::Client(serverIp_, 55556); 318 client_g = new network::Client(serverIp_, 55556);*/ 319 319 if(!ogre_->load()) die(/* unable to load */); 320 ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());320 // ogre_->getRoot()->addFrameListener(new network::ClientFrameListener()); 321 321 } 322 322 … … 374 374 { 375 375 // Init audio 376 auMan_ = new audio::AudioManager();377 378 bulletMgr_ = new BulletManager();376 // auMan_ = new audio::AudioManager(); 377 378 // bulletMgr_ = new BulletManager(); 379 379 380 380 // load this file from config 381 loader_ = new loader::LevelLoader("sample.oxw");382 loader_->loadLevel();383 384 Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");385 HUD* orxonoxHud;386 orxonoxHud = new HUD();387 orxonoxHud->setEnergyValue(20);388 orxonoxHud->setEnergyDistr(20,20,60);389 hudOverlay->show();381 // loader_ = new loader::LevelLoader("sample.oxw"); 382 // loader_->loadLevel(); 383 384 // Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); 385 // HUD* orxonoxHud; 386 // orxonoxHud = new HUD(); 387 // orxonoxHud->setEnergyValue(20); 388 // orxonoxHud->setEnergyDistr(20,20,60); 389 // hudOverlay->show(); 390 390 391 391 /* … … 458 458 459 459 //if(mode_!=CLIENT) // FIXME just a hack ------- remove this in future 460 frameListener_ = new OrxListener(keyboard_ , auMan_, mode_);460 frameListener_ = new OrxListener(keyboard_/*, auMan_*/, mode_); 461 461 ogre_->getRoot()->addFrameListener(frameListener_); 462 462 } -
code/branches/core/src/orxonox/Orxonox.h
r790 r793 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: … … 69 69 GraphicsEngine* ogre_; //!< our dearest graphics engine <3 70 70 std::string dataPath_; //!< path to data 71 loader::LevelLoader* loader_; //!< level loader builds the scene72 audio::AudioManager* auMan_; //!< audio manager73 BulletManager* bulletMgr_; //!< Keeps track of the thrown bullets71 // loader::LevelLoader* loader_; //!< level loader builds the scene 72 // audio::AudioManager* auMan_; //!< audio manager 73 // BulletManager* bulletMgr_; //!< Keeps track of the thrown bullets 74 74 static Orxonox* singletonRef_; 75 75 OIS::Keyboard* keyboard_; -
code/branches/core/src/orxonox/objects/Model.cc
r790 r793 71 71 72 72 void Model::registerAllVariables(){ 73 registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);73 // registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING); 74 74 } 75 75 } -
code/branches/core/src/orxonox/objects/WorldEntity.cc
r790 r793 163 163 void WorldEntity::registerAllVariables() 164 164 { 165 // register coordinates165 /* // register coordinates 166 166 registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA); 167 167 registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA); … … 171 171 registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA); 172 172 registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA); 173 registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA); 173 registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA);*/ 174 174 // not needed at the moment, because we don't have prediction yet 175 175 /*// register velocity_ -
code/branches/core/src/orxonox/objects/WorldEntity.h
r790 r793 17 17 namespace orxonox 18 18 { 19 class _OrxonoxExport WorldEntity : public BaseObject, public Tickable , public network::Synchronisable19 class _OrxonoxExport WorldEntity : public BaseObject, public Tickable//, public network::Synchronisable 20 20 { 21 21 public: -
code/branches/core/src/orxonox/objects/test3.cc
r790 r793 51 51 SetConfigValue(value_bool_, 1); 52 52 SetConfigValue(value_string_, "This is a test"); 53 SetConfigValue(value_constchar_, "This is another test");53 // SetConfigValue(value_constchar_, "This is another test"); 54 54 SetConfigValue(value_vector2_, Vector2(101, 202)); 55 55 SetConfigValue(value_vector3_, Vector3(13, 26, 39));
Note: See TracChangeset
for help on using the changeset viewer.