Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

Game.h

Go to the documentation of this file.
00001 
00007 #ifndef _GAME_H_
00008 #define _GAME_H_
00009 
00010 #include "KeyboardController.h"
00011 
00012 class Entity;
00013 class Controller;
00014 class GameLogic;
00015 class Map;
00016 class Character;
00017 class Effect;
00018 
00023 class Game {
00024 
00025 public:
00026 
00030     Game();
00031 
00035     ~Game();
00036 
00043     void update( float dt );
00044 
00048     void draw();
00049 
00056     bool control( float dt );
00057 
00063     Map* getMap() const;
00064 
00071     void addEntity( Entity* e );
00072 
00079     void addController( Controller* c );
00080 
00087     void addLogic( GameLogic* g );
00088 
00095     void addEffect( Effect* e );
00096 
00104     bool startNewGame( int mapNum );
00105 
00110     void resetMap();
00111 
00112 private:
00113 
00118     void clear();
00119 
00120 private:
00121 
00125     std::list<Entity *> entities;
00126 
00130     std::list<Controller *> ctrls;
00131 
00135     std::list<Entity *>::iterator entityIt;
00136 
00140     std::list<Controller *>::iterator ctrlIt;
00141 
00145     std::list<GameLogic *> logics;
00146 
00150     std::list<GameLogic *>::iterator logicIt;
00151 
00155     std::list<Effect *> effects;
00156 
00160     std::list<Effect *>::iterator effectIt;
00161 
00165     Map* map;
00166 
00170     KeyboardSettings keys1;
00171 
00175     KeyboardSettings keys2;
00176 
00181     int keyPressed;
00182 
00186     Character* player1;
00187 
00191     Character* player2;
00192 
00196     int currMap;
00197 
00201     bool resetMapFlag;
00202 
00206     int numWins1;
00207 
00211     int numWins2;
00212 
00213 };
00214 
00215 #endif

Generated on Tue Mar 4 02:29:25 2003 for SuperIsoBomb by doxygen1.2.18