added missing files
[ltanks.git] / mainApp.h
blobae8484bd8ff83892bfd105aa2cb343df15ba7837
1 #ifndef MAINAPP_DEFINED
2 #define MAINAPP_DEFINED
4 #include <Ogre.h>
5 #include "game.h"
7 #define DEF_WIDTH 800
8 #define DEF_HEIGHT 600
9 #define DEF_FS false
11 using namespace Ogre;
13 class MainApp : public WindowEventListener {
14 private:
15 Root *root;
16 RenderSystem *rSys;
17 RenderWindow *win;
18 Game *game;
20 bool createRenderSystem();
21 void createRenderWindow(const std::string &title, int w, int h, bool fs);
22 void createResources();
24 public:
25 MainApp();
26 ~MainApp();
28 bool init(const std::string& title, int w = DEF_WIDTH, int h = DEF_HEIGHT, bool fs = DEF_FS);
29 void destroy();
31 void run();
33 void windowResized(RenderWindow *rw);
34 void windowClosed(RenderWindow *rw);
35 void windowMoved(RenderWindow *rw) {};
36 void windowFocusChange(RenderWindow *rw) {};
40 #endif