X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FArea.h;h=3c370abc0acf88afb6ee8c78217cd88d4971bb83;hb=2ccc2369d32fb680a3047519d79c17de34c4e10a;hp=9834f5c270bc916dfbe5da947301afc7cda7bce0;hpb=4d4b40f06357392931cb309d0284875c40c2f2f0;p=l2e.git diff --git a/src/map/Area.h b/src/map/Area.h index 9834f5c..3c370ab 100644 --- a/src/map/Area.h +++ b/src/map/Area.h @@ -10,7 +10,7 @@ #include "fwd.h" #include "../geometry/Vector.h" -#include "../graphics/fwd.h" +#include "../graphics/Sprite.h" #include @@ -25,16 +25,26 @@ public: public: int Width() const { return width; } int Height() const { return numTiles / width + (numTiles % width ? 1 : 0); } + geometry::Vector Size() const { return geometry::Vector(Width(), Height()); } + Tile *TileAt(const geometry::Vector &); + const Tile *TileAt(const geometry::Vector &) const; + + SDL_Surface *BattleBackground() { return battlebg; } void Render(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector &offset) const; + void RenderDebug(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector &offset) const; + + static void CreateTypeDescription(); + static void Construct(void *); // temporary setters public: - void SetTiles(const Tile *t, int num) { tiles = t; numTiles = num; } + void SetTiles(Tile *t, int num) { tiles = t; numTiles = num; } void SetWidth(int w) { width = w; } private: - const Tile *tiles; + SDL_Surface *battlebg; + Tile *tiles; int numTiles; int width;