summaryrefslogtreecommitdiff
path: root/src/resources/ambientlayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-26 22:09:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-26 23:49:56 +0300
commit91998bfc4631cd305062bf9bedd56083a2b2cbde (patch)
tree68b9924a69d4ee27ae41eb0d5f2ec4af2a86fb4e /src/resources/ambientlayer.cpp
parentb0167b595a952e1decc48c239c95c52e1bc057d7 (diff)
downloadplus-91998bfc4631cd305062bf9bedd56083a2b2cbde.tar.gz
plus-91998bfc4631cd305062bf9bedd56083a2b2cbde.tar.bz2
plus-91998bfc4631cd305062bf9bedd56083a2b2cbde.tar.xz
plus-91998bfc4631cd305062bf9bedd56083a2b2cbde.zip
allow load and use mask in ambient layers.
default layer mask is 1.
Diffstat (limited to 'src/resources/ambientlayer.cpp')
-rw-r--r--src/resources/ambientlayer.cpp14
1 files changed, 10 insertions, 4 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)