Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4433 was 4408, checked in by patrick, 20 years ago

orxonox/trunk: integrating the event handler into orxonox mainclass

File size: 1.9 KB
RevLine 
[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]14class CommandNode;
15class WorldEntity;
[2036]16class World;
[2190]17class Camera;
[2636]18class GameLoader;
[3655]19class ResourceManager;
[4286]20class ObjectManager;
[4408]21class EventHandler;
22class Event;
[1850]23
[2190]24//! Orxonox core singleton class
25/**
26*/
[4408]27class Orxonox : public EventListener {
[1803]28
[1850]29 private:
[3226]30  static Orxonox* singletonRef;
[1850]31  Orxonox ();
[3543]32
[3449]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
[3655]38  ResourceManager* resourceManager; //!< The ResourceManager
[4286]39  ObjectManager* objectManager; //!< the object manager of the game
[4408]40  EventHandler* eventHandler;
[2190]41 
[3449]42  bool bQuitOrxonox;          //!< If Orxonox should Quit
43  bool pause;                 //!< Pause mode
44  Uint32 lastframe;           //!< Time of the last Frame
[2636]45 
[4135]46  unsigned int argc;          //!< Count of Arguments of orxonox
47  char** argv;                //!< Values of th Arguments of orxonox.
48 
[3226]49  void getConfigFile (int argc, char** argv);
[2636]50 
[4135]51  // subsystem initialization
[3226]52  int initVideo ();
53  int initSound ();
54  int initInput ();
55  int initNetworking ();
56  int initResources ();
57  int initWorld ();
[2190]58 
59 public:
60  static Orxonox* getInstance ();
[3660]61  virtual ~Orxonox ();
62
[2636]63  void start();
[2190]64  void quitGame();
[1879]65
[4408]66  void graphicsHandler (SDL_Event* event);
[3226]67  bool systemCommand (Command* cmd);
[4408]68  void process(const Event  &event);
[1897]69
[2190]70  int init (int argc, char** argv);
[2636]71 
[3226]72  CommandNode* getLocalInput();
73  World* getWorld();
[3365]74  SDL_Surface* getScreen ();
[2636]75 
[3214]76  //void mainLoop();
[1803]77};
78
[4132]79int startHelp(int argc, char** argv);
[3648]80int startOrxonox(int argc, char** argv);
81
[3224]82#endif /* _ORXONOX_H */
[1850]83
Note: See TracBrowser for help on using the repository browser.