source:
orxonox.OLD/orxonox/trunk/src/subprojects/framework.h
@
5037
Last change on this file since 5037 was 4662, checked in by bensch, 19 years ago | |
---|---|
File size: 1.7 KB |
Rev | Line | |
---|---|---|
[2931] | 1 | #ifndef _FRAMEWORK_H |
2 | #define _FRAMEWORK_H | |
[4554] | 3 | |
[3656] | 4 | #include "vector.h" |
[4293] | 5 | #include "glincl.h" |
[4343] | 6 | #include "debug.h" |
[4651] | 7 | #include "graphics_engine.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] | 15 | class Camera; |
[2952] | 16 | |
[4297] | 17 | class Framework { |
[4651] | 18 | public: |
19 | ~Framework(); | |
[4554] | 20 | |
[4651] | 21 | /** \returns a Pointer to the only object of this Class */ |
22 | inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework(); return singletonRef; }; | |
[4554] | 23 | |
[4651] | 24 | public: |
25 | void moduleInit(int argc, char** argv); | |
26 | #ifdef GUI_MODULE | |
27 | void moduleInitGui(int argc, char** argv); | |
28 | #endif | |
29 | void moduleEventHandler(SDL_Event* event); | |
30 | void moduleTick(float dt); | |
31 | void moduleDraw(void) const; | |
[4317] | 32 | |
[4651] | 33 | void moduleHelp(void) const; |
[4374] | 34 | |
[4554] | 35 | |
[4651] | 36 | void init(void); |
37 | static void* mainLoop(void* tmp); | |
38 | bool draw(float dt); | |
39 | float tick(); | |
40 | bool eventHandler(); | |
41 | void quit(); | |
[2931] | 42 | |
[4651] | 43 | static void* mainloopGui(void* tmp); |
[4554] | 44 | |
[4651] | 45 | void printHelp(void) const; |
[4317] | 46 | |
[4331] | 47 | |
[4651] | 48 | private: |
49 | Framework(); | |
[4554] | 50 | |
[4651] | 51 | private: |
52 | static Framework* singletonRef; | |
[4333] | 53 | |
[4651] | 54 | Camera* camera; |
[4333] | 55 | |
[4651] | 56 | bool isFinished; |
[4307] | 57 | |
[4651] | 58 | int movement [4]; |
59 | float backgroundColor[4]; | |
[4316] | 60 | |
[4651] | 61 | Uint32 lastFrame; |
62 | Uint32 currFrame; | |
63 | ||
64 | Uint8* keys; // This variable will be used in the keyboard routine | |
65 | bool mouseDown[MOUSE_BUTTON_COUNT]; | |
66 | ||
[4297] | 67 | }; |
[4330] | 68 | |
[4343] | 69 | #ifdef GUI_MODULE |
[4333] | 70 | int quitGui(GtkWidget* widget, void* data); |
[4343] | 71 | #endif |
[4333] | 72 | |
[2931] | 73 | #endif /* _FRAMEWORK_H */ |
Note: See TracBrowser
for help on using the repository browser.