[2190] | 1 | /*! |
---|
| 2 | \file orxonox.h |
---|
| 3 | \brief Orxonox core functions |
---|
| 4 | */ |
---|
[1856] | 5 | |
---|
[3224] | 6 | #ifndef _ORXONOX_H |
---|
| 7 | #define _ORXONOX_H |
---|
[1803] | 8 | |
---|
[3608] | 9 | #include "comincl.h" |
---|
| 10 | #include "glincl.h" |
---|
[4408] | 11 | #include "event_listener.h" |
---|
[2190] | 12 | |
---|
[4408] | 13 | |
---|
[2190] | 14 | class WorldEntity; |
---|
[2036] | 15 | class World; |
---|
[2190] | 16 | class Camera; |
---|
[2636] | 17 | class GameLoader; |
---|
[3655] | 18 | class ResourceManager; |
---|
[4286] | 19 | class ObjectManager; |
---|
[4408] | 20 | class EventHandler; |
---|
| 21 | class Event; |
---|
[1850] | 22 | |
---|
[2190] | 23 | //! Orxonox core singleton class |
---|
| 24 | /** |
---|
| 25 | */ |
---|
[4408] | 26 | class Orxonox : public EventListener { |
---|
[1803] | 27 | |
---|
[1850] | 28 | private: |
---|
[3226] | 29 | static Orxonox* singletonRef; |
---|
[1850] | 30 | Orxonox (); |
---|
[3543] | 31 | |
---|
[3449] | 32 | char configfilename[256]; //!< Filename of the configuration-file. |
---|
| 33 | World* world; //!< Reference to the current running world. |
---|
| 34 | SDL_Surface* screen; //!< The current Screen |
---|
| 35 | GameLoader* gameLoader; //!< The gameLoader |
---|
[3655] | 36 | ResourceManager* resourceManager; //!< The ResourceManager |
---|
[4286] | 37 | ObjectManager* objectManager; //!< the object manager of the game |
---|
[4408] | 38 | EventHandler* eventHandler; |
---|
[2190] | 39 | |
---|
[3449] | 40 | bool bQuitOrxonox; //!< If Orxonox should Quit |
---|
| 41 | bool pause; //!< Pause mode |
---|
| 42 | Uint32 lastframe; //!< Time of the last Frame |
---|
[2636] | 43 | |
---|
[4135] | 44 | unsigned int argc; //!< Count of Arguments of orxonox |
---|
| 45 | char** argv; //!< Values of th Arguments of orxonox. |
---|
| 46 | |
---|
[3226] | 47 | void getConfigFile (int argc, char** argv); |
---|
[2636] | 48 | |
---|
[4135] | 49 | // subsystem initialization |
---|
[3226] | 50 | int initVideo (); |
---|
| 51 | int initSound (); |
---|
| 52 | int initInput (); |
---|
| 53 | int initNetworking (); |
---|
| 54 | int initResources (); |
---|
| 55 | int initWorld (); |
---|
[2190] | 56 | |
---|
| 57 | public: |
---|
| 58 | static Orxonox* getInstance (); |
---|
[3660] | 59 | virtual ~Orxonox (); |
---|
| 60 | |
---|
[2636] | 61 | void start(); |
---|
[2190] | 62 | void quitGame(); |
---|
[1879] | 63 | |
---|
[4408] | 64 | void graphicsHandler (SDL_Event* event); |
---|
| 65 | void process(const Event &event); |
---|
[1897] | 66 | |
---|
[2190] | 67 | int init (int argc, char** argv); |
---|
[2636] | 68 | |
---|
[4442] | 69 | |
---|
[3226] | 70 | World* getWorld(); |
---|
[3365] | 71 | SDL_Surface* getScreen (); |
---|
[2636] | 72 | |
---|
[3214] | 73 | //void mainLoop(); |
---|
[1803] | 74 | }; |
---|
| 75 | |
---|
[4132] | 76 | int startHelp(int argc, char** argv); |
---|
[3648] | 77 | int startOrxonox(int argc, char** argv); |
---|
| 78 | |
---|
[3224] | 79 | #endif /* _ORXONOX_H */ |
---|
[1850] | 80 | |
---|