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