Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/orxonox.h @ 4436

Last change on this file since 4436 was 4408, checked in by patrick, 19 years ago

orxonox/trunk: integrating the event handler into orxonox mainclass

File size: 1.9 KB
Line 
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
14class CommandNode;
15class WorldEntity;
16class World;
17class Camera;
18class GameLoader;
19class ResourceManager;
20class ObjectManager;
21class EventHandler;
22class Event;
23
24//! Orxonox core singleton class
25/**
26*/
27class 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
79int startHelp(int argc, char** argv);
80int startOrxonox(int argc, char** argv);
81
82#endif /* _ORXONOX_H */
83
Note: See TracBrowser for help on using the repository browser.