X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FArea.h;h=a044c8ba01a010866d617e4aa32ede2eeb8e4693;hb=978ccdf2644bc445c864dbe581ead365b238cff8;hp=9bca341c11fdbd6d977f7a042e8da98e63e10a12;hpb=59c4aea0762cbc5f1bf74c5b1b35629408fb92af;p=l2e.git diff --git a/src/map/Area.h b/src/map/Area.h index 9bca341..a044c8b 100644 --- a/src/map/Area.h +++ b/src/map/Area.h @@ -8,18 +8,14 @@ #ifndef MAP_AREA_H_ #define MAP_AREA_H_ +#include "fwd.h" #include "../geometry/Vector.h" +#include "../graphics/Sprite.h" #include -namespace graphics { - class Sprite; -} - namespace map { -class Tile; - class Area { public: @@ -29,16 +25,23 @@ 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; // 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;