From bdac28929f7ebcab6ae758e57c24c32493e46f76 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Tue, 29 Jan 2013 12:07:38 +0000 Subject: NEVERHOOD: Add Y-flipping to unpackSpriteNormal --- engines/neverhood/graphics.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines') 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) { -- cgit v1.2.3