]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Map.h
renamed app::State's Resize -> OnResize
[l2e.git] / src / map / Map.h
index 9fb24afc9dd305e67d9e27d108e70621806dea11..a985d8491f44928335ba06a618677d095da6079f 100644 (file)
@@ -8,18 +8,15 @@
 #ifndef MAP_MAP_H_
 #define MAP_MAP_H_
 
+#include "Entity.h"
+#include "fwd.h"
 #include "../geometry/Vector.h"
+#include "../graphics/fwd.h"
 
 #include <SDL.h>
 
-namespace graphics {
-       class Sprite;
-}
-
 namespace map {
 
-class Area;
-
 class Map {
 
 public:
@@ -27,18 +24,33 @@ public:
        ~Map() { }
 
 public:
+       const graphics::Sprite *Tileset() const { return tileset; }
+       Area *AreaAt(const geometry::Vector<int> &);
+       const Area *AreaAt(const geometry::Vector<int> &) const;
+       Tile *TileAt(const geometry::Vector<int> &);
+       const Tile *TileAt(const geometry::Vector<int> &) const;
+       Trigger *TriggerAt(const geometry::Vector<int> &);
+       SDL_Surface *BattleBackgroundAt(const geometry::Vector<int> &);
+       geometry::Vector<int> TileCoordinates(const geometry::Vector<int> &) const;
+
+       Entity *EntitiesBegin() { return entities; }
+       Entity *EntitiesEnd() { return entities + numEntities; }
+
        void Render(SDL_Surface *dest, const geometry::Vector<int> &offset) const;
+       void RenderDebug(SDL_Surface *dest, const geometry::Vector<int> &offset) const;
 
-// temporary setters
-public:
-       void SetTileset(const graphics::Sprite *t) { tileset = t; }
-       void SetAreas(const Area *a, int num) { areas = a; numAreas = num; }
-       void SetWidth(int w) { width = w; }
+       static void CreateTypeDescription();
+       static void Construct(void *);
 
 private:
        const graphics::Sprite *tileset;
-       const Area *areas;
+       SDL_Surface *battlebg;
+       Area *areas;
        int numAreas;
+       Trigger *triggers;
+       int numTriggers;
+       Entity *entities;
+       int numEntities;
        int width;
 
 };