diff options
author | Travis Howell | 2007-05-08 05:39:50 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-08 05:39:50 +0000 |
commit | ce70442c2e6d8ce2f7e3a029e4da3c518e7902dd (patch) | |
tree | 33c5bc26a1af0af17d8c2422f161771b6bf5c8ff /engines/agos | |
parent | 50800d596973d5bf5a21f92f8f196c2103b9900e (diff) | |
download | scummvm-rg350-ce70442c2e6d8ce2f7e3a029e4da3c518e7902dd.tar.gz scummvm-rg350-ce70442c2e6d8ce2f7e3a029e4da3c518e7902dd.tar.bz2 scummvm-rg350-ce70442c2e6d8ce2f7e3a029e4da3c518e7902dd.zip |
Add palette difference when drawing images in Elvira 1.
svn-id: r26783
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/gfx.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index d7e9f65b57..9f7a543e39 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -478,7 +478,7 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { } while (--h); } while (++w != state->draw_width); } - } else if ((((_lockWord & 0x20) && state->palette == 0) || state->palette == 0xC0)) { + } else if (((_lockWord & 0x20) && state->palette == 0) || state->palette == 0xC0) { const byte *src; byte *dst; uint h, i; @@ -644,13 +644,10 @@ void AGOSEngine::drawImage(VC10_state *state) { xoffs = (vlut[0] * 2 + state->x) * 8; yoffs = vlut[1] + state->y; //} - } else { - xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8; - yoffs = (vlut[1] - _videoWindows[17] + state->y); } - state->surf2_addr += xoffs + yoffs * state->surf_pitch; - state->surf_addr += xoffs + yoffs * state->surf2_pitch; + state->surf_addr += xoffs + yoffs * state->surf_pitch; + state->surf2_addr += xoffs + yoffs * state->surf2_pitch; if (state->flags & kDFUseFrontBuf) { state->surf_addr = state->surf2_addr; @@ -701,13 +698,17 @@ void AGOSEngine::drawImage(VC10_state *state) { dst = state->surf_addr; state->x_skip *= 4; + uint8 extraPal = 0; + if (getGameType() == GType_ELVIRA1 && (state->flags & kDFNonTrans) && yoffs > 133) + extraPal = 16; + do { for (count = 0; count != state->draw_width; count++) { byte color; - color = (src[count + state->x_skip] / 16); + color = (src[count + state->x_skip] / 16) + extraPal; if ((state->flags & kDFNonTrans) || color) dst[count * 2] = color | state->palette; - color = (src[count + state->x_skip] & 15); + color = (src[count + state->x_skip] & 15) + extraPal; if ((state->flags & kDFNonTrans) || color) dst[count * 2 + 1] = color | state->palette; } |