Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: ability to change background color

File size: 1.2 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 DATA_DIRECTORY "~/svn/data/"
14#define MOUSE_BUTTON_COUNT 8
15
16class Camera;
17
18class Framework {
19 private:
20  Framework();
21  static Framework* singletonRef;
22 
23  Camera* camera;
24 
25  bool isFinished;
26
27  int movement [4];
28  float backgroundColor[4];
29
30  Uint32 lastFrame;
31  Uint32 currFrame;
32   
33  Uint8* keys;        // This variable will be used in the keyboard routine
34  bool mouseDown[MOUSE_BUTTON_COUNT];
35
36 public:
37  ~Framework(); 
38 
39  static Framework* getInstance(void);
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
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.