X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMap.h;h=a985d8491f44928335ba06a618677d095da6079f;hb=2ccc2369d32fb680a3047519d79c17de34c4e10a;hp=dd0185cdeacca199f5018f17826f4a429b7c2e86;hpb=c055b357c50dd871b49c38191a9d867ff42ea420;p=l2e.git diff --git a/src/map/Map.h b/src/map/Map.h index dd0185c..a985d84 100644 --- a/src/map/Map.h +++ b/src/map/Map.h @@ -8,6 +8,7 @@ #ifndef MAP_MAP_H_ #define MAP_MAP_H_ +#include "Entity.h" #include "fwd.h" #include "../geometry/Vector.h" #include "../graphics/fwd.h" @@ -24,25 +25,32 @@ public: public: const graphics::Sprite *Tileset() const { return tileset; } - const Area &AreaAt(const geometry::Vector &) const; - const Tile &TileAt(const geometry::Vector &) const; + Area *AreaAt(const geometry::Vector &); + const Area *AreaAt(const geometry::Vector &) const; + Tile *TileAt(const geometry::Vector &); + const Tile *TileAt(const geometry::Vector &) const; Trigger *TriggerAt(const geometry::Vector &); + SDL_Surface *BattleBackgroundAt(const geometry::Vector &); + geometry::Vector TileCoordinates(const geometry::Vector &) const; + + Entity *EntitiesBegin() { return entities; } + Entity *EntitiesEnd() { return entities + numEntities; } void Render(SDL_Surface *dest, const geometry::Vector &offset) const; + void RenderDebug(SDL_Surface *dest, const geometry::Vector &offset) const; -// temporary setters -public: - void SetTileset(const graphics::Sprite *t) { tileset = t; } - void SetAreas(Area *a, int num) { areas = a; numAreas = num; } - void SetTriggers(Trigger *t, int num) { triggers = t; numTriggers = num; } - void SetWidth(int w) { width = w; } + static void CreateTypeDescription(); + static void Construct(void *); private: const graphics::Sprite *tileset; + SDL_Surface *battlebg; Area *areas; int numAreas; Trigger *triggers; int numTriggers; + Entity *entities; + int numEntities; int width; };