diff options
author | Bertram <bertram@cegetel.net> | 2009-07-27 01:02:27 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-07-27 01:02:27 +0200 |
commit | fa1a3ab995f037ddf33817a1b2ce143130a457f8 (patch) | |
tree | 4cfc52364c271a9a318a2fee4b611514d7941476 /src/resources/ambientoverlay.h | |
parent | 7bc30f545784b26594803b559f1d76d5434027ea (diff) | |
download | mana-fa1a3ab995f037ddf33817a1b2ce143130a457f8.tar.gz mana-fa1a3ab995f037ddf33817a1b2ce143130a457f8.tar.bz2 mana-fa1a3ab995f037ddf33817a1b2ce143130a457f8.tar.xz mana-fa1a3ab995f037ddf33817a1b2ce143130a457f8.zip |
Added the ability to ask a ambient layer to keep its ratio when the resolution isn't the default.
You'll have to add this in map properties, for instance if you're want to keep ratio on overlay 0:
<map version="1.0" orientation="orthogonal" width="128" height="128" tilewidth="32" tileheight="32">
<properties>
...
<property name="overlay0keepratio" value="true"/>
...
</properties>
</map>
Diffstat (limited to 'src/resources/ambientoverlay.h')
-rw-r--r-- | src/resources/ambientoverlay.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resources/ambientoverlay.h b/src/resources/ambientoverlay.h index 756d0eb7..f2d2e588 100644 --- a/src/resources/ambientoverlay.h +++ b/src/resources/ambientoverlay.h @@ -35,9 +35,11 @@ class AmbientOverlay * @param parallax scroll factor based on camera position * @param speedX scrolling speed in x-direction * @param speedY scrolling speed in y-direction + * @param keepRatio rescale the image to keep + * the same ratio than in 800x600 resolution mode. */ AmbientOverlay(Image *img, float parallax, - float speedX, float speedY); + float speedX, float speedY, bool keepRatio = false); ~AmbientOverlay(); @@ -52,6 +54,7 @@ class AmbientOverlay float mPosY; /**< Current layer Y position. */ float mSpeedX; /**< Scrolling speed in X direction. */ float mSpeedY; /**< Scrolling speed in Y direction. */ + bool mKeepRatio; /**< Keep overlay ratio on every resolution */ }; #endif |