Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/script/src/orxonox/Orxonox.h @ 931

Last change on this file since 931 was 911, checked in by bknecht, 18 years ago

applied some old changes (compiles, but may fail running)

File size: 2.6 KB
RevLine 
[612]1/**
2 @file  Orxonox.h
3 @brief Main Orxonox Class File
4 @author Benjamin Knecht <beni_at_orxonox.net>
5 */
6
[673]7#ifndef _Orxonox_H__
8#define _Orxonox_H__
[612]9
[715]10#include <string>
11
[612]12#include <OgrePrerequisites.h>
[911]13#include <OIS/OISPrereqs.h>
[612]14
15#include "OrxonoxPrereqs.h"
[871]16//#include "loader/LoaderPrereqs.h"
[777]17#include "audio/AudioPrereqs.h"
[729]18
[612]19#include "GraphicsEngine.h"
20
21
22// TODO: Orxonox should maybe derive from BaseObject
23//! Orxonox singleton class
24namespace orxonox {
25
26  enum gameMode{
27    STANDALONE,
28    SERVER,
29    CLIENT,
30    PRESENTATION
31  };
32
[729]33  class _OrxonoxExport Orxonox
[612]34  {
35    public:
[715]36      void init(int argc, char **argv, std::string path);
[612]37      void start();
38      // not sure if this should be private
39      void die(/* some error code */);
40      static Orxonox* getSingleton();
[637]41      inline Ogre::SceneManager* getSceneManager()         { return ogre_->getSceneManager(); };
42      inline GraphicsEngine* getOgrePointer()              { return ogre_; };
[911]43      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
44      inline OIS::Keyboard* getKeyboard()                  { return this->keyboard_; }
45      inline OIS::Mouse* getMouse()                        { return this->mouse_; }
46      inline BulletManager* getBulletMgr()                 { return this->bulletMgr_; }
[612]47
48    private:
49      Orxonox();
50      virtual ~Orxonox();
51      // init functions
[715]52      void serverInit(std::string path);
53      void clientInit(std::string path);
54      void standaloneInit(std::string path);
[612]55      // run functions
[715]56      void playableServer(std::string path);
[612]57      void standalone();
[911]58      //void setupRenderSystem();
59      //void createRenderWindow();
60      //void initializeResourceGroups();
[612]61      void createScene(void);
62      void setupScene();
63      void setupInputSystem();
64      void createFrameListener();
[911]65      void startRenderLoop();
[612]66
67    private:
[717]68      GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
69      std::string           dataPath_;      //!< path to data
[871]70//      loader::LevelLoader*  loader_;        //!< level loader builds the scene
[717]71      audio::AudioManager*  auMan_;         //!< audio manager
72      BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
[612]73      static Orxonox*       singletonRef_;
74      OIS::Keyboard*        keyboard_;
75      OIS::Mouse*           mouse_;
76      OIS::InputManager*    inputManager_;
77      OrxListener*          frameListener_;
78      Ogre::Root*           root_;
79
80      // this is used to identify the mode (server/client/...) we're in
81      gameMode              mode_;
[715]82      std::string           serverIp_;
[612]83  };
84}
[673]85#endif /* _Orxonox_H__ */
Note: See TracBrowser for help on using the repository browser.