Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/subprojects/framework.h @ 4650

Last change on this file since 4650 was 4650, checked in by bensch, 20 years ago

orxonox/trunk: Now the Subprojects get the DataDirectory from the ~/orxonox/orxonox.conf file

File size: 1.3 KB
RevLine 
[2931]1#ifndef _FRAMEWORK_H
2#define _FRAMEWORK_H
[4554]3
[3656]4#include "vector.h"
[4293]5#include "glincl.h"
[4334]6#include "SDL_events.h"
[4343]7#include "debug.h"
[2931]8
[4343]9#ifdef GUI_MODULE
[4333]10#include "gui_gtk.h"
[4554]11#endif
[4297]12
[4650]13#define MOUSE_BUTTON_COUNT 3
[4295]14
[4297]15class Camera;
[2952]16
[4297]17class Framework {
18 private:
[4317]19  Framework();
20  static Framework* singletonRef;
[4554]21
[4297]22  Camera* camera;
[4554]23
[4331]24  bool isFinished;
[4317]25
[4300]26  int movement [4];
[4374]27  float backgroundColor[4];
28
[4297]29  Uint32 lastFrame;
30  Uint32 currFrame;
[4554]31
[4333]32  Uint8* keys;        // This variable will be used in the keyboard routine
[4306]33  bool mouseDown[MOUSE_BUTTON_COUNT];
[2931]34
[4297]35 public:
[4554]36  ~Framework();
37
[4519]38  /** \returns a Pointer to the only object of this Class */
39  inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework();  return singletonRef; };
[4317]40
[4331]41
[4343]42  void moduleInit(int argc, char** argv);
43#ifdef GUI_MODULE
44  void moduleInitGui(int argc, char** argv);
45#endif
[4334]46  void moduleEventHandler(SDL_Event* event);
47  void moduleTick(float dt);
[4349]48  void moduleDraw(void) const;
[4554]49
[4333]50  void moduleHelp(void) const;
51
52
[4650]53  void init(void);
[4330]54  static void* mainLoop(void* tmp);
[4297]55  bool draw(float dt);
56  float tick();
[4334]57  bool eventHandler();
[4331]58  void quit();
[4307]59
[4330]60  static void* mainloopGui(void* tmp);
[4316]61
[4307]62  void printHelp(void) const;
[4297]63};
[4330]64
[4343]65#ifdef GUI_MODULE
[4333]66int quitGui(GtkWidget* widget, void* data);
[4343]67#endif
[4333]68
[2931]69#endif /* _FRAMEWORK_H */
Note: See TracBrowser for help on using the repository browser.