- Timestamp:
- Jun 17, 2005, 11:26:21 AM (19 years ago)
- Location:
- orxonox/trunk/src/subprojects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/framework.cc
r4650 r4651 21 21 #include "state.h" 22 22 #include "debug.h" 23 #include "graphics_engine.h"24 23 #include "light.h" 25 24 #include "resource_manager.h" -
orxonox/trunk/src/subprojects/framework.h
r4650 r4651 6 6 #include "SDL_events.h" 7 7 #include "debug.h" 8 #include "graphics_engine.h" 8 9 9 10 #ifdef GUI_MODULE … … 16 17 17 18 class Framework { 18 private: 19 Framework(); 20 static Framework* singletonRef; 19 public: 20 ~Framework(); 21 21 22 Camera* camera; 22 /** \returns a Pointer to the only object of this Class */ 23 inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework(); return singletonRef; }; 23 24 24 bool isFinished; 25 public: 26 void moduleInit(int argc, char** argv); 27 #ifdef GUI_MODULE 28 void moduleInitGui(int argc, char** argv); 29 #endif 30 void moduleEventHandler(SDL_Event* event); 31 void moduleTick(float dt); 32 void moduleDraw(void) const; 25 33 26 int movement [4]; 27 float backgroundColor[4]; 28 29 Uint32 lastFrame; 30 Uint32 currFrame; 31 32 Uint8* keys; // This variable will be used in the keyboard routine 33 bool mouseDown[MOUSE_BUTTON_COUNT]; 34 35 public: 36 ~Framework(); 37 38 /** \returns a Pointer to the only object of this Class */ 39 inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework(); return singletonRef; }; 34 void moduleHelp(void) const; 40 35 41 36 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; 37 void init(void); 38 static void* mainLoop(void* tmp); 39 bool draw(float dt); 40 float tick(); 41 bool eventHandler(); 42 void quit(); 49 43 50 void moduleHelp(void) const; 44 static void* mainloopGui(void* tmp); 45 46 void printHelp(void) const; 51 47 52 48 53 void init(void); 54 static void* mainLoop(void* tmp); 55 bool draw(float dt); 56 float tick(); 57 bool eventHandler(); 58 void quit(); 49 private: 50 Framework(); 59 51 60 static void* mainloopGui(void* tmp); 52 private: 53 static Framework* singletonRef; 61 54 62 void printHelp(void) const; 55 Camera* camera; 56 57 bool isFinished; 58 59 int movement [4]; 60 float backgroundColor[4]; 61 62 Uint32 lastFrame; 63 Uint32 currFrame; 64 65 Uint8* keys; // This variable will be used in the keyboard routine 66 bool mouseDown[MOUSE_BUTTON_COUNT]; 67 63 68 }; 64 69
Note: See TracChangeset
for help on using the changeset viewer.