VOYEUR: Lock screen background now correctly showing

This commit is contained in:
Paul Gilbert 2013-06-12 22:43:54 -04:00
parent e24e181a2a
commit 0fe067ba4a
3 changed files with 28 additions and 1 deletions

View file

@ -295,6 +295,8 @@ PictureResource *BoltFile::getPictureResource(uint32 id) {
if ((int32)id == -1)
return NULL;
if (id & 0xffff)
id <<= 16;
return getBoltEntry(id)._picResource;
}

View file

@ -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;

View file

@ -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);