summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/ambientlayer.cpp14
-rw-r--r--src/resources/ambientlayer.h6
2 files changed, 15 insertions, 5 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp
index 6814b0365..cc9ebdaec 100644
--- a/src/resources/ambientlayer.cpp
+++ b/src/resources/ambientlayer.cpp
@@ -21,6 +21,8 @@
#include "resources/ambientlayer.h"
+#include "map.h"
+
#include "render/graphics.h"
#include "resources/image.h"
@@ -31,10 +33,14 @@
AmbientLayer::AmbientLayer(Image *const img, const float parallax,
const float speedX, const float speedY,
- const bool keepRatio) :
- mImage(img), mParallax(parallax),
- mPosX(0), mPosY(0),
- mSpeedX(speedX), mSpeedY(speedY),
+ const bool keepRatio, int mask) :
+ mImage(img),
+ mParallax(parallax),
+ mPosX(0),
+ mPosY(0),
+ mSpeedX(speedX),
+ mSpeedY(speedY),
+ mMask(mask),
mKeepRatio(keepRatio)
{
if (!mImage)
diff --git a/src/resources/ambientlayer.h b/src/resources/ambientlayer.h
index 18bbfb69a..1ab54fd9f 100644
--- a/src/resources/ambientlayer.h
+++ b/src/resources/ambientlayer.h
@@ -26,10 +26,13 @@
class Graphics;
class Image;
+class Map;
class AmbientLayer final
{
public:
+ friend Map;
+
/**
* Constructor.
*
@@ -42,7 +45,7 @@ class AmbientLayer final
*/
AmbientLayer(Image *const img, const float parallax,
const float speedX, const float speedY,
- const bool keepRatio = false);
+ const bool keepRatio, int mask);
A_DELETE_COPY(AmbientLayer)
@@ -59,6 +62,7 @@ class AmbientLayer final
float mPosY; /**< Current layer Y position. */
float mSpeedX; /**< Scrolling speed in X direction. */
float mSpeedY; /**< Scrolling speed in Y direction. */
+ int mMask;
bool mKeepRatio; /**< Keep overlay ratio on every resolution */
};