diff options
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 32 |
1 files changed, 10 insertions, 22 deletions
@@ -29,6 +29,7 @@ #include "properties.h" +class AmbientOverlay; class Graphics; class Image; class Tileset; @@ -65,16 +66,6 @@ struct MetaTile bool walkable; /**< Can beings walk on this tile */ }; -struct AmbientOverlay -{ - Image *image; - float parallax; - float scrollX; - float scrollY; - float scrollSpeedX; - float scrollSpeedY; -}; - /** * A tile map. */ @@ -92,24 +83,22 @@ class Map : public Properties ~Map(); /** - * Draws a map layer to the given graphics output. + * Initialize map overlays. Should be called after all the properties + * are set. */ - void draw(Graphics *graphics, int scrollX, int scrollY, int layer); + void initializeOverlays(); /** - * Sets Overlay Graphic and Scrollspeed + * Draws a map layer to the given graphics output. */ - void setOverlay(Image *image, float speedX, float speedY, float parallax); + void draw(Graphics *graphics, int scrollX, int scrollY, int layer); /** * Draws the overlay graphic to the given graphics output. */ - void drawOverlay(Graphics *graphics, float scrollX, float scrollY, int detail); - - /** - * Sets the size of the map. This will destroy any existing map data. - */ - void setSize(int width, int height); + void + drawOverlay(Graphics *graphics, float scrollX, float scrollY, + int detail); /** * Adds a tileset to this map. @@ -222,8 +211,7 @@ class Map : public Properties int mOnClosedList, mOnOpenList; //overlay Data - AmbientOverlay mFoo; - std::list<AmbientOverlay> mOverlays; + std::list<AmbientOverlay*> mOverlays; float mLastScrollX; float mLastScrollY; }; |