diff -r 1a03ff151abc -r 41fd46cffc52 src/Graphics/GameView.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Graphics/GameView.hh Wed Jan 21 01:57:24 2009 +0200 @@ -0,0 +1,48 @@ +#ifndef GRAPHICS_GAME_VIEW_HH +#define GRAPHICS_GAME_VIEW_HH + +#include "Drawable.hh" +#include "../GameState.hh" + +namespace graphics +{ + +/** + * This is the main in-game view, which is what the player sees when they are playing + */ +class GameView : public Drawable { +protected: + /** The GameState that we're drawing */ + GameState &state; + + /** The player that we are controlling, if any */ + LocalPlayer *player; + +public: + /** + * Constructed once the game is running + */ + GameView (GameState &state, LocalPlayer *player) : + state(state), player(player) + { + + } + + /** + * Set a player where none was set before + */ + void setPlayer (LocalPlayer *player) { + assert(!this->player); + + // remember it + this->player = player; + } + + /** + * Draw this view onto the given display + */ + void draw (Display *display); +}; + +} +#endif