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