Made lua run under MSWin with Dev-Cpp 4.9.9.2
[sdlbotor.git] / Game.h
blob21308363b24e0bdf06fd4952a23d43fcb5b977bf
1 #ifndef GAME_H
2 #define GAME_H
4 #include <map>
5 #include <string>
6 #include <time.h>
8 #include "luainclude.h"
9 #include "SDLVideoOut.h"
12 namespace botor
16 class Map;
17 class Player;
18 class ObjectClass;
20 class Game
23 static SDLVideoOut *video;
24 // static Tileset tileset;
25 static Map map;
26 static Player player;
30 bool game_is_running;
32 static const int TICKS_PER_SECOND = 50;
33 static const int MAX_FRAMESKIP = 10;
34 static const int SKIP_FRAMES = (CLOCKS_PER_SEC/1000) / TICKS_PER_SECOND;
37 public:
39 static lua_State *LUA;
41 static std::map<std::string,ObjectClass> objectTypes;
43 Game();
44 ~Game();
46 private:
48 void Initialize();
49 void DeInitialize();
51 void LoadContent();
52 int LoadObjects();
54 void Update();
55 void HandleInput( SDL_Event *event );
56 void Draw();
58 public:
60 void run();
62 static SDLVideoOut *getVideo();
63 // static Tileset *getTileset();
64 static Map *getMap();
65 static Player *getPlayer();
75 #endif