4 * Created on: Sep 26, 2012
12 #include "../geometry/Vector.h"
13 #include "../graphics/Sprite.h"
26 int Width() const { return width; }
27 int Height() const { return numTiles / width + (numTiles % width ? 1 : 0); }
28 geometry::Vector<int> Size() const { return geometry::Vector<int>(Width(), Height()); }
29 Tile *TileAt(const geometry::Vector<int> &);
30 const Tile *TileAt(const geometry::Vector<int> &) const;
32 SDL_Surface *BattleBackground() { return battlebg; }
34 void Render(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector<int> &offset) const;
35 void RenderDebug(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector<int> &offset) const;
37 static void CreateTypeDescription();
38 static void Construct(void *);
42 void SetTiles(Tile *t, int num) { tiles = t; numTiles = num; }
43 void SetWidth(int w) { width = w; }
46 SDL_Surface *battlebg;
55 #endif /* MAP_AREA_H_ */