X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmap%2FMap.h;h=595e62b35c5926bb6776b516195d8517d575759b;hb=c49d46cbfbd7720627af2414e94963850fe8eed6;hp=b751d5ece04f97b33a431b6f8df78e8024ba24e7;hpb=fb9bd716a1740e41efbb08a3bfa42e441d64c693;p=l2e.git diff --git a/src/map/Map.h b/src/map/Map.h index b751d5e..595e62b 100644 --- a/src/map/Map.h +++ b/src/map/Map.h @@ -1,16 +1,9 @@ -/* - * Map.h - * - * Created on: Sep 29, 2012 - * Author: holy - */ - #ifndef MAP_MAP_H_ #define MAP_MAP_H_ #include "Entity.h" #include "fwd.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include "../graphics/fwd.h" #include @@ -28,6 +21,9 @@ namespace map { /// extending to the right and down respectively. class Map { +public: + static const int TYPE_ID = 602; + public: Map(); ~Map() { } @@ -36,29 +32,29 @@ public: /// The sprite used as the tileset. const graphics::Sprite *Tileset() const { return tileset; } /// Returns the Area at given pixel coordinates or 0 if off the map. - Area *AreaAt(const geometry::Vector &); - const Area *AreaAt(const geometry::Vector &) const; + Area *AreaAt(const math::Vector &); + const Area *AreaAt(const math::Vector &) const; /// Returns the Tile at given pixel coordinates or 0 if off the map. - Tile *TileAt(const geometry::Vector &); - const Tile *TileAt(const geometry::Vector &) const; + Tile *TileAt(const math::Vector &); + const Tile *TileAt(const math::Vector &) const; /// Returns the Trigger at given pixel coordinates or 0 if off the map. /// Multiple triggers are not supported. The first one found is returned. - Trigger *TriggerAt(const geometry::Vector &); + Trigger *TriggerAt(const math::Vector &); /// The battle background image for this map if neither the tile nor the /// area has one specified. - SDL_Surface *BattleBackgroundAt(const geometry::Vector &); + SDL_Surface *BattleBackgroundAt(const math::Vector &); /// Convert coordinates pixel to tile. - geometry::Vector TileCoordinates(const geometry::Vector &) const; + math::Vector TileCoordinates(const math::Vector &) const; Entity *EntitiesBegin() { return entities; } Entity *EntitiesEnd() { return entities + numEntities; } /// Render the map. /// Entities are not rendered by this function. - void Render(SDL_Surface *dest, const geometry::Vector &offset) const; + void Render(SDL_Surface *dest, const math::Vector &offset) const; /// Render a debugging overlay that includes collision and trigger /// information. - void RenderDebug(SDL_Surface *dest, const geometry::Vector &offset) const; + void RenderDebug(SDL_Surface *dest, const math::Vector &offset) const; static void CreateTypeDescription(); static void Construct(void *);