| 1 | /*! | 
|---|
| 2 | \file orxonox.h | 
|---|
| 3 | \brief Orxonox core functions | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _ORXONOX_H | 
|---|
| 7 | #define _ORXONOX_H | 
|---|
| 8 |  | 
|---|
| 9 | #include "comincl.h" | 
|---|
| 10 | #include "glincl.h" | 
|---|
| 11 |  | 
|---|
| 12 | class CommandNode; | 
|---|
| 13 | class WorldEntity; | 
|---|
| 14 | class DataTank; | 
|---|
| 15 | class World; | 
|---|
| 16 | class Camera; | 
|---|
| 17 | class GameLoader; | 
|---|
| 18 | class ResourceManager; | 
|---|
| 19 |  | 
|---|
| 20 | //! Orxonox core singleton class | 
|---|
| 21 | /** | 
|---|
| 22 | */ | 
|---|
| 23 | class Orxonox { | 
|---|
| 24 |  | 
|---|
| 25 | private: | 
|---|
| 26 | static Orxonox* singletonRef; | 
|---|
| 27 | Orxonox (); | 
|---|
| 28 |  | 
|---|
| 29 | char configfilename[256];   //!< Filename of the configuration-file. | 
|---|
| 30 | World* world;               //!< Reference to the current running world. | 
|---|
| 31 | DataTank* resources;        //!< DataContainer | 
|---|
| 32 | CommandNode* localinput;    //!< Command Handler | 
|---|
| 33 | SDL_Surface* screen;        //!< The current Screen | 
|---|
| 34 | GameLoader* gameLoader;     //!< The gameLoader | 
|---|
| 35 | ResourceManager* resourceManager; //!< The ResourceManager | 
|---|
| 36 |  | 
|---|
| 37 | bool bQuitOrxonox;          //!< If Orxonox should Quit | 
|---|
| 38 | bool pause;                 //!< Pause mode | 
|---|
| 39 | Uint32 lastframe;           //!< Time of the last Frame | 
|---|
| 40 |  | 
|---|
| 41 | unsigned int argc;          //!< Count of Arguments of orxonox | 
|---|
| 42 | char** argv;                //!< Values of th Arguments of orxonox. | 
|---|
| 43 |  | 
|---|
| 44 | void getConfigFile (int argc, char** argv); | 
|---|
| 45 |  | 
|---|
| 46 | // subsystem initialization | 
|---|
| 47 | int initVideo (); | 
|---|
| 48 | int initSound (); | 
|---|
| 49 | int initInput (); | 
|---|
| 50 | int initNetworking (); | 
|---|
| 51 | int initResources (); | 
|---|
| 52 | int initWorld (); | 
|---|
| 53 |  | 
|---|
| 54 | public: | 
|---|
| 55 | static Orxonox* getInstance (); | 
|---|
| 56 | virtual ~Orxonox (); | 
|---|
| 57 |  | 
|---|
| 58 | void start(); | 
|---|
| 59 | void quitGame(); | 
|---|
| 60 |  | 
|---|
| 61 | void eventHandler (SDL_Event* event); | 
|---|
| 62 | bool systemCommand (Command* cmd); | 
|---|
| 63 |  | 
|---|
| 64 | int init (int argc, char** argv); | 
|---|
| 65 |  | 
|---|
| 66 | CommandNode* getLocalInput(); | 
|---|
| 67 | World* getWorld(); | 
|---|
| 68 | SDL_Surface* getScreen (); | 
|---|
| 69 |  | 
|---|
| 70 | //void mainLoop(); | 
|---|
| 71 | }; | 
|---|
| 72 |  | 
|---|
| 73 | int startHelp(int argc, char** argv); | 
|---|
| 74 | int startOrxonox(int argc, char** argv); | 
|---|
| 75 |  | 
|---|
| 76 | #endif /* _ORXONOX_H */ | 
|---|
| 77 |  | 
|---|