X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMap.h;h=40cce1c497259e31a719a4bcf3114c2ded2478b7;hb=978ccdf2644bc445c864dbe581ead365b238cff8;hp=9fb24afc9dd305e67d9e27d108e70621806dea11;hpb=59c4aea0762cbc5f1bf74c5b1b35629408fb92af;p=l2e.git diff --git a/src/map/Map.h b/src/map/Map.h index 9fb24af..40cce1c 100644 --- a/src/map/Map.h +++ b/src/map/Map.h @@ -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 -namespace graphics { - class Sprite; -} - namespace map { -class Area; - class Map { public: @@ -27,18 +24,39 @@ 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 SetBattleBackground(SDL_Surface *bg) { battlebg = bg; } + void SetAreas(Area *a, int num) { areas = a; numAreas = num; } + void SetTriggers(Trigger *t, int num) { triggers = t; numTriggers = num; } + void SetEntities(Entity *e, int num) { entities = e; numEntities = num; } void SetWidth(int w) { width = w; } 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; };