]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Area.h
closed the gap between battle and map state (yay)
[l2e.git] / src / map / Area.h
index 9834f5c270bc916dfbe5da947301afc7cda7bce0..a044c8ba01a010866d617e4aa32ede2eeb8e4693 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "fwd.h"
 #include "../geometry/Vector.h"
-#include "../graphics/fwd.h"
+#include "../graphics/Sprite.h"
 
 #include <SDL.h>
 
@@ -25,16 +25,23 @@ public:
 public:
        int Width() const { return width; }
        int Height() const { return numTiles / width + (numTiles % width ? 1 : 0); }
+       geometry::Vector<int> Size() const { return geometry::Vector<int>(Width(), Height()); }
+       Tile *TileAt(const geometry::Vector<int> &);
+       const Tile *TileAt(const geometry::Vector<int> &) const;
+
+       SDL_Surface *BattleBackground() { return battlebg; }
 
        void Render(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector<int> &offset) const;
+       void RenderDebug(SDL_Surface *dest, const graphics::Sprite *tileset, const geometry::Vector<int> &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;