| 
                Last change
                  on this file since 4883 was
                  4662,
                  checked in by bensch, 20 years ago
           | 
        
        
          | 
               
orxonox/trunk: safer compile support 
 
           | 
        
        | 
            File size:
            1.7 KB
           | 
      
      
        
  | Line |   | 
|---|
| 1 | #ifndef _FRAMEWORK_H | 
|---|
| 2 | #define _FRAMEWORK_H | 
|---|
| 3 |  | 
|---|
| 4 | #include "vector.h" | 
|---|
| 5 | #include "glincl.h" | 
|---|
| 6 | #include "debug.h" | 
|---|
| 7 | #include "graphics_engine.h" | 
|---|
| 8 |  | 
|---|
| 9 | #ifdef GUI_MODULE | 
|---|
| 10 | #include "gui_gtk.h" | 
|---|
| 11 | #endif | 
|---|
| 12 |  | 
|---|
| 13 | #define MOUSE_BUTTON_COUNT 3 | 
|---|
| 14 |  | 
|---|
| 15 | class Camera; | 
|---|
| 16 |  | 
|---|
| 17 | class Framework { | 
|---|
| 18 |   public: | 
|---|
| 19 |     ~Framework(); | 
|---|
| 20 |  | 
|---|
| 21 |     /** \returns a Pointer to the only object of this Class */ | 
|---|
| 22 |     inline static    Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework();  return singletonRef; }; | 
|---|
| 23 |  | 
|---|
| 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; | 
|---|
| 32 |  | 
|---|
| 33 |   void               moduleHelp(void) const; | 
|---|
| 34 |  | 
|---|
| 35 |  | 
|---|
| 36 |   void               init(void); | 
|---|
| 37 |   static void*       mainLoop(void* tmp); | 
|---|
| 38 |   bool               draw(float dt); | 
|---|
| 39 |   float              tick(); | 
|---|
| 40 |   bool               eventHandler(); | 
|---|
| 41 |   void               quit(); | 
|---|
| 42 |  | 
|---|
| 43 |   static void*       mainloopGui(void* tmp); | 
|---|
| 44 |  | 
|---|
| 45 |   void               printHelp(void) const; | 
|---|
| 46 |  | 
|---|
| 47 |  | 
|---|
| 48 |   private: | 
|---|
| 49 |     Framework(); | 
|---|
| 50 |  | 
|---|
| 51 |   private: | 
|---|
| 52 |     static Framework*           singletonRef; | 
|---|
| 53 |  | 
|---|
| 54 |     Camera*                     camera; | 
|---|
| 55 |  | 
|---|
| 56 |     bool                        isFinished; | 
|---|
| 57 |  | 
|---|
| 58 |     int                         movement [4]; | 
|---|
| 59 |     float                       backgroundColor[4]; | 
|---|
| 60 |  | 
|---|
| 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 |  | 
|---|
| 67 | }; | 
|---|
| 68 |  | 
|---|
| 69 | #ifdef GUI_MODULE | 
|---|
| 70 | int quitGui(GtkWidget* widget, void* data); | 
|---|
| 71 | #endif | 
|---|
| 72 |  | 
|---|
| 73 | #endif /* _FRAMEWORK_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.