aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorjohndoe1232013-01-29 12:07:38 +0000
committerWillem Jan Palenstijn2013-05-08 20:47:43 +0200
commitbdac28929f7ebcab6ae758e57c24c32493e46f76 (patch)
tree86b7f12af319935bfde6b2070ff4e4e60ea8837e /engines
parent70fdfd9d572b4c395dfa4d3fbff791e064d4079d (diff)
downloadscummvm-rg350-bdac28929f7ebcab6ae758e57c24c32493e46f76.tar.gz
scummvm-rg350-bdac28929f7ebcab6ae758e57c24c32493e46f76.tar.bz2
scummvm-rg350-bdac28929f7ebcab6ae758e57c24c32493e46f76.zip
NEVERHOOD: Add Y-flipping to unpackSpriteNormal
Diffstat (limited to 'engines')
-rw-r--r--engines/neverhood/graphics.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp
index 913954532f..5099c7a00e 100644
--- a/engines/neverhood/graphics.cpp
+++ b/engines/neverhood/graphics.cpp
@@ -315,9 +315,12 @@ void unpackSpriteRle(const byte *source, int width, int height, byte *dest, int
void unpackSpriteNormal(const byte *source, int width, int height, byte *dest, int destPitch, bool flipX, bool flipY) {
- // TODO: Flip Y
-
- int sourcePitch = (width + 3) & 0xFFFC;
+ const int sourcePitch = (width + 3) & 0xFFFC;
+
+ if (flipY) {
+ dest += destPitch * (height - 1);
+ destPitch = -destPitch;
+ }
if (!flipX) {
while (height-- > 0) {