Rally X
ELEN3009 Project by Justin Wernick and David Schneider
|
00001 #ifndef GAME_H 00002 #define GAME_H 00003 00004 #include <list> 00005 #include <algorithm> 00006 using namespace std; 00007 00008 #include <allegro5/allegro.h> 00009 00010 #include "../presentation/Screen.h" 00011 #include "../presentation/BitmapStore.h" 00012 00013 #include "../logic/Maze.h" 00014 #include "../logic/PlayerCar.h" 00015 #include "../logic/EnemyCar.h" 00016 #include "../logic/Checkpoint.h" 00017 #include "../logic/Rock.h" 00018 #include "../logic/Smokescreen.h" 00019 #include "../logic/DestroyedObjectPopup.h" 00020 #include "../logic/AllegroWrappers.h" 00021 #include "../logic/CollisionDetector.h" 00022 00023 #include "../data/LevelReader.h" 00024 #include "../data/Config.h" 00025 00036 class Game 00037 { 00038 public: 00039 static const unsigned int FPS = 30; 00040 00044 Game(); 00045 00049 ~Game(); 00050 00054 void start(); 00055 00056 private: 00062 Game(const Game& ref); 00068 Game& operator=(const Game& rhs); 00069 00075 void initLevel(const string& levelFile); 00076 00088 void runloop(); 00089 00093 void update(); 00097 void cleanup(); 00098 00104 void clearLists(); 00105 00106 AllegroInit _allegro; 00107 00108 Config _config; 00109 Screen _screen; 00110 ALLEGRO_TIMER* _timer; 00111 ALLEGRO_EVENT_QUEUE* _timerEvents; 00112 00113 Maze _maze; 00114 00124 list<PlayerCar> _players; 00125 00126 list<EnemyCar> _enemies; 00127 list<Checkpoint> _checkpoints; 00128 list<Rock> _rocks; 00129 list<Smokescreen> _smokescreens; 00130 list<DestroyedObjectPopup> _popups; 00131 00132 CollisionDetector _collisionDetector; 00133 }; 00134 00135 #endif // GAME_H