]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Map.h
better accessibility of map-related properties
[l2e.git] / src / map / Map.h
index 101689f72c43f9ecece1748100f90b9aa4bfc5ed..6b2eea4030e9f642d2bf855e0c449970124371e3 100644 (file)
@@ -21,8 +21,8 @@ namespace map {
 /// Maps are made up of uniform areas of tiles.
 /// The looks of a tile is defined by the Tileset() sprite with Tile::Offset()
 /// as the column and row in the sprite.
-/// Maps can be propulated with triggers and entities. Those are or use with
-/// MapState and are not handled by the map itself.
+/// Maps can be propulated with triggers and entities. Those are for use with
+/// MapState and are not handled by the map itself.
 /// Positions are expressed either as pixel or tile coordinates depending on
 /// function purpose with (0|0) being the top left corner and positive values
 /// extending to the right and down respectively.
@@ -50,15 +50,20 @@ public:
        /// The battle background image for this map if neither the tile nor the
        /// area has one specified.
        SDL_Surface *BattleBackgroundAt(const math::Vector<int> &);
-       /// Convert coordinates pixel to tile.
+       /// Convert coordinates from pixel to tile.
        math::Vector<int> TileCoordinates(const math::Vector<int> &) const;
+       /// Convert coordinates from tile to pixel.
+       math::Vector<int> PixelCoordinates(const math::Vector<int> &) 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 math::Vector<int> &offset) const;
+       void Render(
+                       SDL_Surface *dest,
+                       const math::Vector<int> &offset,
+                       unsigned int frame) const;
        /// Render a debugging overlay that includes collision and trigger
        /// information.
        void RenderDebug(SDL_Surface *dest, const math::Vector<int> &offset) const;
@@ -81,4 +86,4 @@ private:
 
 }
 
-#endif /* MAP_MAP_H_ */
+#endif