Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 873 for code


Ignore:
Timestamp:
Mar 9, 2008, 5:27:07 PM (17 years ago)
Author:
landauf
Message:

simplified core2 branch

Location:
code/branches/core2/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/CMakeLists.txt

    r871 r873  
    44ADD_SUBDIRECTORY(util)
    55ADD_SUBDIRECTORY(orxonox/core)
    6 ADD_SUBDIRECTORY(audio)
    7 ADD_SUBDIRECTORY(network)
     6#ADD_SUBDIRECTORY(audio)
     7#ADD_SUBDIRECTORY(network)
    88#ADD_SUBDIRECTORY(loader)
    99ADD_SUBDIRECTORY(orxonox)
  • code/branches/core2/src/orxonox/CMakeLists.txt

    r871 r873  
    44  Orxonox.cc
    55  objects/Tickable.cc
    6   SpaceshipSteering.cc
    7   hud/HUD.cc
     6#  SpaceshipSteering.cc
     7#  hud/HUD.cc
    88  particle/ParticleInterface.cc
    99  tools/BillboardSet.cc
    10   tools/Light.cc
     10#  tools/Light.cc
    1111  tools/Mesh.cc
    1212  tools/Timer.cc
    1313  objects/Ambient.cc
    14   objects/Camera.cc
     14#  objects/Camera.cc
    1515  objects/Explosion.cc
    16   objects/Fighter.cc
     16#  objects/Fighter.cc
    1717  objects/Model.cc
    18   objects/NPC.cc
     18#  objects/NPC.cc
    1919  objects/Projectile.cc
    2020  objects/Skybox.cc
    2121  objects/SpaceShip.cc
    2222#  objects/SpaceshipSteeringObject.cc
    23 #  objects/test1.cc
    24 #  objects/test2.cc
    25 #  objects/test3.cc
     23  objects/test1.cc
     24  objects/test2.cc
     25  objects/test3.cc
    2626  objects/WorldEntity.cc
    27   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
     27#  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
    3333)
    3434
     
    4242  util
    4343  core
    44   audio
    45   network
     44#  audio
     45#  network
    4646#  loader
    4747)
  • code/branches/core2/src/orxonox/Orxonox.cc

    r871 r873  
    5858// loader and audio
    5959//#include "loader/LevelLoader.h"
    60 #include "audio/AudioManager.h"
     60//#include "audio/AudioManager.h"
    6161
    6262// 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"
    6666
    6767// objects
    6868#include "objects/Tickable.h"
    6969#include "tools/Timer.h"
    70 #include "objects/NPC.h"
     70//#include "objects/NPC.h"
    7171#include "core/ArgReader.h"
    7272#include "core/Factory.h"
    7373#include "core/Debug.h"
    7474#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"
    7777#include "GraphicsEngine.h"
    7878
     
    8585  {
    8686    public:
    87       OrxListener(OIS::Keyboard *keyboard, audio::AudioManager*  auMan, gameMode mode)
     87      OrxListener(OIS::Keyboard *keyboard/*, audio::AudioManager*  auMan*/, gameMode mode)
    8888      {
    8989        mKeyboard = keyboard;
    9090        mode_=mode;
    91         auMan_ = auMan;
     91//        auMan_ = auMan;
    9292      }
    9393
    9494      bool frameStarted(const Ogre::FrameEvent& evt)
    9595      {
    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);
    103103
    104104        usleep(10);
     
    107107        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
    108108      }
    109 
     109/*
    110110      void updateAI()
    111111      {
     
    115115        }
    116116      }
    117 
     117*/
    118118    private:
    119119      gameMode mode_;
    120120      OIS::Keyboard *mKeyboard;
    121       audio::AudioManager*  auMan_;
     121//      audio::AudioManager*  auMan_;
    122122  };
    123123
     
    133133    this->dataPath_ = "";
    134134//    this->loader_ = 0;
    135     this->auMan_ = 0;
     135//    this->auMan_ = 0;
    136136    this->singletonRef_ = 0;
    137137    this->keyboard_ = 0;
     
    214214      //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener());
    215215      //std::cout << "could not add framelistener" << std::endl;
    216       server_g->open();
     216//      server_g->open();
    217217      break;
    218218    case CLIENT:
    219       client_g->establishConnection();
     219//      client_g->establishConnection();
    220220      break;
    221221    case SERVER:
     
    280280    createFrameListener();
    281281    try{
    282       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
     282//      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
    286286      COUT(3) << "Info: network framelistener added" << std::endl;
    287287    }
     
    304304    ogre_->setConfigPath(path);
    305305    ogre_->setup();
    306     server_g = new network::Server(); // FIXME add some settings if wanted
     306//    server_g = new network::Server(); // FIXME add some settings if wanted
    307307    if(!ogre_->load()) die(/* unable to load */);
    308308    // FIXME add network framelistener
     
    314314    ogre_->setConfigPath(path);
    315315    ogre_->setup();
    316     if(serverIp_.compare("")==0)
    317       client_g = new network::Client();
    318     else
    319       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);
    320320    if(!ogre_->load()) die(/* unable to load */);
    321     ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());
     321//    ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());
    322322  }
    323323
     
    375375  {
    376376        // Init audio
    377     auMan_ = new audio::AudioManager();
    378 
    379     bulletMgr_ = new BulletManager();
     377//    auMan_ = new audio::AudioManager();
     378
     379//    bulletMgr_ = new BulletManager();
    380380
    381381    // load this file from config
     
    385385    Loader::open(startlevel);
    386386
    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();
    393393
    394394        /*
     
    461461
    462462    //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_);
    464464    ogre_->getRoot()->addFrameListener(frameListener_);
    465465  }
  • code/branches/core2/src/orxonox/Orxonox.h

    r871 r873  
    1515#include "OrxonoxPrereqs.h"
    1616//#include "loader/LoaderPrereqs.h"
    17 #include "audio/AudioPrereqs.h"
     17//#include "audio/AudioPrereqs.h"
    1818
    1919#include "GraphicsEngine.h"
     
    4141      inline Ogre::SceneManager* getSceneManager()         { return ogre_->getSceneManager(); };
    4242      inline GraphicsEngine* getOgrePointer()              { return ogre_; };
    43       inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
     43//      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
    4444      inline OIS::Keyboard* getKeyboard()                  { return this->keyboard_; }
    4545      inline OIS::Mouse* getMouse()                        { return this->mouse_; }
    46       inline BulletManager* getBulletMgr()                 { return this->bulletMgr_; }
     46//      inline BulletManager* getBulletMgr()                 { return this->bulletMgr_; }
    4747
    4848    private:
     
    7070      std::string           dataPath_;      //!< path to data
    7171//      loader::LevelLoader*  loader_;        //!< level loader builds the scene
    72       audio::AudioManager*  auMan_;         //!< audio manager
    73       BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
     72//      audio::AudioManager*  auMan_;         //!< audio manager
     73//      BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
    7474      static Orxonox*       singletonRef_;
    7575      OIS::Keyboard*        keyboard_;
Note: See TracChangeset for help on using the changeset viewer.