summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2006-08-21 16:06:50 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2006-08-21 16:06:50 +0000
commit7eef0aaedefc5d3c73301bcb02834e165124c7e6 (patch)
tree3ac39dbb0bc92db2cdf9d90db700662627f6d8df /src/map.h
parente8c3de13e9f850498b9ab2dfaca758c851566d3a (diff)
downloadmana-7eef0aaedefc5d3c73301bcb02834e165124c7e6.tar.gz
mana-7eef0aaedefc5d3c73301bcb02834e165124c7e6.tar.bz2
mana-7eef0aaedefc5d3c73301bcb02834e165124c7e6.tar.xz
mana-7eef0aaedefc5d3c73301bcb02834e165124c7e6.zip
added overlays and smooth scrolling. (someone who knows what he is doing has to create the makefiles for the unix users)
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/map.h b/src/map.h
index a91b815f..51756ee7 100644
--- a/src/map.h
+++ b/src/map.h
@@ -63,6 +63,16 @@ 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.
*/
@@ -80,11 +90,21 @@ class Map : public Properties
~Map();
/**
- * Draws the map to the given graphics output.
+ * Draws a map layer to the given graphics output.
*/
void draw(Graphics *graphics, int scrollX, int scrollY, int layer);
/**
+ * Sets Overlay Graphic and Scrollspeed
+ */
+ void setOverlay(Image *image, float speedX, float speedY, float parallax);
+
+ /**
+ * Draws the overlay graphic to the given graphics output.
+ */
+ void drawOverlay(Graphics *graphics, float scrollX, float scrollY);
+
+ /**
* Sets the size of the map. This will destroy any existing map data.
*/
void setSize(int width, int height);
@@ -198,6 +218,12 @@ class Map : public Properties
// Pathfinding members
int mOnClosedList, mOnOpenList;
+
+ //overlay Data
+ AmbientOverlay mFoo;
+ std::list<AmbientOverlay> mOverlays;
+ float mLastScrollX;
+ float mLastScrollY;
};
#endif