X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMap.h;h=a985d8491f44928335ba06a618677d095da6079f;hb=7c43158af1abf38fa896a442cb3c6d8a5bc630e7;hp=57337605f3f0ed58b66bef01f75fccd27028c73f;hpb=4d4b40f06357392931cb309d0284875c40c2f2f0;p=l2e.git diff --git a/src/map/Map.h b/src/map/Map.h index 5733760..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" @@ -23,18 +24,33 @@ public: ~Map() { } public: + const graphics::Sprite *Tileset() const { return tileset; } + 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(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; };