terom@185: #ifndef GAMESTATE_HH terom@185: #define GAMESTATE_HH terom@185: ekku@196: class GameState; ekku@196: ekku@196: #include "PhysicsWorld.hh" ekku@196: #include "Player.hh" ekku@196: #include "Projectile.hh" ekku@225: #include "Rope.hh" terom@185: #include "Input.hh" terom@233: #include "GraphicsPointer.hh" terom@185: #include "Config.hh" terom@185: terom@185: #include terom@185: #include terom@185: #include terom@185: saiam@199: class GameState { terom@185: public: terom@185: std::list player_list; ekku@222: std::list projectiles; saiam@199: PhysicsWorld world; terom@185: terom@274: /** terom@274: * The one LocalPlayer that *we* control terom@274: */ terom@185: LocalPlayer *local_player; terom@274: terom@274: /** terom@274: * ... terom@274: * terom@274: * This should take some arguments terom@274: */ saiam@199: GameState (void); ekku@222: terom@274: /** terom@274: * Adds projectile to our list of projectiles to draw terom@274: */ ekku@222: void addProjectile(Projectile *projectile); terom@185: terom@274: /** terom@274: * Get our current LocalPlayer if we have one, else return NULL (client hasn't connected yet) terom@185: */ saiam@199: LocalPlayer *getLocalPlayer (void); terom@274: terom@274: /** terom@274: * Check that local_player is NULL, and sets it to the given player terom@274: */ terom@274: void setLocalPlayer (LocalPlayer *player); terom@185: terom@274: /** terom@274: * Add the given player to our player_list terom@274: */ terom@274: void addPlayer (Player *player); terom@274: terom@274: /** terom@274: * Removes the given player from player_list. If the given player was the local_player, set that to NULL terom@274: */ saiam@199: void removePlayer (Player *player); terom@274: terom@274: /** terom@274: * Draws the terrain, players and projectiles terom@274: */ terom@266: virtual void draw (Graphics *g, PixelCoordinate camera, bool displayWeapon); terom@185: }; terom@185: terom@185: #endif