source:
orxonox.OLD/orxonox/trunk/src/subprojects/framework.h
@
4344
Last change on this file since 4344 was 4343, checked in by bensch, 20 years ago | |
---|---|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[2931] | 1 | #ifndef _FRAMEWORK_H |
2 | #define _FRAMEWORK_H | |
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" |
[4343] | 11 | #endif |
[4297] | 12 | |
[4295] | 13 | #define DATA_DIRECTORY "~/svn/data/" |
[4306] | 14 | #define MOUSE_BUTTON_COUNT 8 |
[4295] | 15 | |
[4297] | 16 | class Camera; |
[2952] | 17 | |
[4297] | 18 | class Framework { |
19 | private: | |
[4317] | 20 | Framework(); |
21 | static Framework* singletonRef; | |
[4331] | 22 | |
[4297] | 23 | Camera* camera; |
24 | ||
[4331] | 25 | bool isFinished; |
[4317] | 26 | |
[4300] | 27 | int movement [4]; |
[4297] | 28 | |
29 | Uint32 lastFrame; | |
30 | Uint32 currFrame; | |
[4300] | 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: |
[4333] | 36 | ~Framework(); |
[4297] | 37 | |
[4317] | 38 | static Framework* getInstance(void); |
39 | ||
[4331] | 40 | |
[4343] | 41 | void moduleInit(int argc, char** argv); |
42 | #ifdef GUI_MODULE | |
43 | void moduleInitGui(int argc, char** argv); | |
44 | #endif | |
[4334] | 45 | void moduleEventHandler(SDL_Event* event); |
46 | void moduleTick(float dt); | |
[4333] | 47 | void moduleDraw(float dt); |
48 | ||
49 | void moduleHelp(void) const; | |
50 | ||
51 | ||
52 | ||
[4330] | 53 | static void* mainLoop(void* tmp); |
[4297] | 54 | bool draw(float dt); |
55 | float tick(); | |
[4334] | 56 | bool eventHandler(); |
[4331] | 57 | void quit(); |
[4307] | 58 | |
[4330] | 59 | static void* mainloopGui(void* tmp); |
[4316] | 60 | |
[4307] | 61 | void printHelp(void) const; |
[4297] | 62 | }; |
[4330] | 63 | |
[4343] | 64 | #ifdef GUI_MODULE |
[4333] | 65 | int quitGui(GtkWidget* widget, void* data); |
[4343] | 66 | #endif |
[4333] | 67 | |
[2931] | 68 | #endif /* _FRAMEWORK_H */ |
Note: See TracBrowser
for help on using the repository browser.