From 91998bfc4631cd305062bf9bedd56083a2b2cbde Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 26 Oct 2013 22:09:03 +0300 Subject: allow load and use mask in ambient layers. default layer mask is 1. --- src/resources/ambientlayer.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/resources/ambientlayer.cpp') 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) -- cgit v1.2.3-70-g09d2