Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4651 in orxonox.OLD for orxonox/trunk/src/subprojects/framework.h


Ignore:
Timestamp:
Jun 17, 2005, 11:26:21 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: code-design

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/framework.h

    r4650 r4651  
    66#include "SDL_events.h"
    77#include "debug.h"
     8#include "graphics_engine.h"
    89
    910#ifdef GUI_MODULE
     
    1617
    1718class Framework {
    18  private:
    19   Framework();
    20   static Framework* singletonRef;
     19  public:
     20    ~Framework();
    2121
    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; };
    2324
    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;
    2533
    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;
    4035
    4136
    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();
    4943
    50   void moduleHelp(void) const;
     44  static void*       mainloopGui(void* tmp);
     45
     46  void               printHelp(void) const;
    5147
    5248
    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();
    5951
    60   static void* mainloopGui(void* tmp);
     52  private:
     53    static Framework*           singletonRef;
    6154
    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
    6368};
    6469
Note: See TracChangeset for help on using the changeset viewer.