diff options
author | Paul Gilbert | 2013-06-12 22:43:54 -0400 |
---|---|---|
committer | Paul Gilbert | 2013-06-12 22:43:54 -0400 |
commit | 0fe067ba4a2d0eea71ad91eaad1d537f1b42e97c (patch) | |
tree | 9ce3c83d91ea71f2f1b087e2064134fe9f886ba0 | |
parent | e24e181a2a7ca734550c75905ea6e8c079d4a20d (diff) | |
download | scummvm-rg350-0fe067ba4a2d0eea71ad91eaad1d537f1b42e97c.tar.gz scummvm-rg350-0fe067ba4a2d0eea71ad91eaad1d537f1b42e97c.tar.bz2 scummvm-rg350-0fe067ba4a2d0eea71ad91eaad1d537f1b42e97c.zip |
VOYEUR: Lock screen background now correctly showing
-rw-r--r-- | engines/voyeur/files.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 26 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 1 |
3 files changed, 28 insertions, 1 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index b2f4d4f58c..74da77dda1 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -295,6 +295,8 @@ PictureResource *BoltFile::getPictureResource(uint32 id) { if ((int32)id == -1) return NULL; + if (id & 0xffff) + id <<= 16; return getBoltEntry(id)._picResource; } diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index 9f547c65ca..ace4b35718 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -344,7 +344,31 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des // loc_2615E if (srcFlags & 2) { - error("TODO: sDrawPic"); + srcP = srcImgData + srcOffset; + + if (destFlags & 8) { + error("TODO: sDrawPic"); + } else { + // loc_25773 + // Copy from screen to surface with transparency + destP = destImgData + screenOffset; + srcP = (byte *)_screenSurface.pixels + srcOffset; + + if (srcFlags & 2) { + for (int yp = 0; yp < height1; ++yp) { + for (int xp = 0; xp < width2; ++xp, ++destP) { + byte srcPixel = *srcP++; + if (srcPixel) + *destP = srcPixel; + } + + destP += widthDiff2; + srcP += widthDiff; + } + } else { + error("TODO: sDrawPic"); + } + } } else { if (srcFlags & 0x100) { srcP = srcImgData; diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index c2e99076af..83e5d80802 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -214,6 +214,7 @@ bool VoyeurEngine::doLock() { Common::String password = lock._password; srcPic = _bVoy->getPictureResource(0x702); + assert(srcPic); // Get the mappings of keys on the keypad keyData = _bVoy->memberAddr(0x705); |