| 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 "~/orxonox/repos/trunk/data/" | 
|---|
| 14 | #define MOUSE_BUTTON_COUNT 8 | 
|---|
| 15 |  | 
|---|
| 16 | class Camera; | 
|---|
| 17 |  | 
|---|
| 18 | class 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 |   /** \returns a Pointer to the only object of this Class */ | 
|---|
| 40 |   inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework();  return singletonRef; }; | 
|---|
| 41 |  | 
|---|
| 42 |  | 
|---|
| 43 |   void moduleInit(int argc, char** argv); | 
|---|
| 44 | #ifdef GUI_MODULE | 
|---|
| 45 |   void moduleInitGui(int argc, char** argv); | 
|---|
| 46 | #endif | 
|---|
| 47 |   void moduleEventHandler(SDL_Event* event); | 
|---|
| 48 |   void moduleTick(float dt); | 
|---|
| 49 |   void moduleDraw(void) const; | 
|---|
| 50 |  | 
|---|
| 51 |   void moduleHelp(void) const; | 
|---|
| 52 |  | 
|---|
| 53 |  | 
|---|
| 54 |  | 
|---|
| 55 |   static void* mainLoop(void* tmp); | 
|---|
| 56 |   bool draw(float dt); | 
|---|
| 57 |   float tick(); | 
|---|
| 58 |   bool eventHandler(); | 
|---|
| 59 |   void quit(); | 
|---|
| 60 |  | 
|---|
| 61 |   static void* mainloopGui(void* tmp); | 
|---|
| 62 |  | 
|---|
| 63 |   void printHelp(void) const; | 
|---|
| 64 | }; | 
|---|
| 65 |  | 
|---|
| 66 | #ifdef GUI_MODULE | 
|---|
| 67 | int quitGui(GtkWidget* widget, void* data); | 
|---|
| 68 | #endif | 
|---|
| 69 |  | 
|---|
| 70 | #endif /* _FRAMEWORK_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.