diff options
author | Travis Howell | 2008-03-25 08:03:32 +0000 |
---|---|---|
committer | Travis Howell | 2008-03-25 08:03:32 +0000 |
commit | 48fac2f9dc4bf608d9568c4c626f4fabc98160c8 (patch) | |
tree | d64c584b7c2c2db71827e4bdb1a3d9c62b667a52 /engines/agos | |
parent | 1bb41bf225e3f8e8595bc2c9ffce9c3a51bf70e0 (diff) | |
download | scummvm-rg350-48fac2f9dc4bf608d9568c4c626f4fabc98160c8.tar.gz scummvm-rg350-48fac2f9dc4bf608d9568c4c626f4fabc98160c8.tar.bz2 scummvm-rg350-48fac2f9dc4bf608d9568c4c626f4fabc98160c8.zip |
Fix palette glitches in Amiga OCS version of Simon the Sorcerer 1.
svn-id: r31233
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/gfx.cpp | 6 | ||||
-rw-r--r-- | engines/agos/icons.cpp | 2 | ||||
-rw-r--r-- | engines/agos/verb.cpp | 25 | ||||
-rw-r--r-- | engines/agos/vga_s1.cpp | 48 | ||||
-rw-r--r-- | engines/agos/window.cpp | 2 |
5 files changed, 74 insertions, 9 deletions
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index f2b6e06a34..193b7347d6 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -629,7 +629,7 @@ void AGOSEngine_Simon1::draw32ColorImage(VC10_state *state) { do { for (i = 0; i != state->draw_width; i++) if ((state->flags & kDFNonTrans) || src[i]) - dst[i] = src[i]; + dst[i] = src[i] + state->paletteMod; dst += _screenWidth; src += state->width * 16; } while (--h); @@ -726,6 +726,10 @@ void AGOSEngine_Simon1::drawImage(VC10_state *state) { state->surf_addr += xoffs + yoffs * state->surf_pitch; state->surf2_addr += xoffs + yoffs * state->surf2_pitch; + if ((getFeatures() & GF_32COLOR) && !_window3Flag && yoffs > 133) { + state->paletteMod = 208; + } + if (_backFlag == 1) { drawBackGroundImage(state); } else if (state->flags & kDFMasked) { diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index f38828f086..7875347d4a 100644 --- a/engines/agos/icons.cpp +++ b/engines/agos/icons.cpp @@ -233,7 +233,7 @@ void AGOSEngine_Simon1::drawIcon(WindowBlock *window, uint icon, uint x, uint y) if (getPlatform() == Common::kPlatformAmiga) { src = _iconFilePtr; src += READ_BE_UINT32(src + icon * 4); - uint8 color = (getFeatures() & GF_32COLOR) ? 16 : 240; + uint8 color = (getFeatures() & GF_32COLOR) ? 224 : 240; decompressIconPlanar(dst, src, 24, 12, color, _dxSurfacePitch); } else { src = _iconFilePtr; diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp index 7938cec0ab..2c1af3c243 100644 --- a/engines/agos/verb.cpp +++ b/engines/agos/verb.cpp @@ -584,13 +584,23 @@ void AGOSEngine::setVerb(HitArea *ha) { if (getGameType() == GType_SIMON1) { if (tmp != NULL) { tmp->flags |= kBFInvertTouch; - invertBox(tmp, 213, 208, 213, 10); + if (getFeatures() & GF_32COLOR) + invertBox(tmp, 212, 208, 212, 8); + else + invertBox(tmp, 213, 208, 213, 10); } - if (ha->flags & kBFBoxSelected) - invertBox(ha, 218, 213, 213, 5); - else - invertBox(ha, 223, 218, 218, 10); + if (ha->flags & kBFBoxSelected) { + if (getFeatures() & GF_32COLOR) + invertBox(ha, 216, 212, 212, 4); + else + invertBox(ha, 218, 213, 213, 5); + } else { + if (getFeatures() & GF_32COLOR) + invertBox(ha, 220, 216, 216, 8); + else + invertBox(ha, 223, 218, 218, 10); + } ha->flags &= ~(kBFBoxSelected + kBFInvertTouch); } else { @@ -610,7 +620,10 @@ void AGOSEngine::hitarea_leave(HitArea *ha, bool state) { if (getGameType() == GType_SIMON2) { invertBox(ha, 231, 229, 230, 1); } else { - invertBox(ha, 223, 213, 218, 5); + if (getFeatures() & GF_32COLOR) + invertBox(ha, 220, 212, 216, 4); + else + invertBox(ha, 223, 213, 218, 5); } } diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp index f99c8afb83..b3ee374595 100644 --- a/engines/agos/vga_s1.cpp +++ b/engines/agos/vga_s1.cpp @@ -61,6 +61,41 @@ void AGOSEngine::vc17_setPathfinderItem() { _vcPtr += 2; } +static const uint8 customPalette[96] = { + 0x00, 0x00, 0x00, + 0x99, 0x22, 0xFF, + 0x66, 0xCC, 0xFF, + 0xFF, 0x99, 0xFF, + 0xFF, 0xFF, 0xFF, + 0x66, 0x44, 0xBB, + 0x77, 0x55, 0xCC, + 0x88, 0x77, 0xCC, + 0xCC, 0xAA, 0xDD, + 0x33, 0x00, 0x09, + 0x66, 0x44, 0xCC, + 0x88, 0x55, 0xCC, + 0xAA, 0x77, 0xEE, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, + 0x33, 0x00, 0x00, + 0xCC, 0xCC, 0xDD, + 0x88, 0x99, 0xBB, + 0x44, 0x77, 0xAA, + 0x44, 0x44, 0x66, + 0x44, 0x44, 0x00, + 0x44, 0x66, 0x00, + 0x88, 0x99, 0x00, + 0x99, 0x44, 0x00, + 0xBB, 0x44, 0x22, + 0xFF, 0x55, 0x33, + 0xFF, 0x88, 0x88, + 0xFF, 0xBB, 0x33, + 0xFF, 0xFF, 0x77, +}; + void AGOSEngine::vc22_setPaletteNew() { byte *offs, *palptr = 0, *src; uint16 a = 0, b, num, palSize = 0; @@ -93,6 +128,19 @@ void AGOSEngine::vc22_setPaletteNew() { src += 3; } while (--num); + if (getFeatures() & GF_32COLOR) { + // Custom palette used for verb area + palptr = &_displayPalette[(13 * 64)]; + for (uint8 c = 0; c < 32; c++) { + palptr[0] = customPalette[c * 3 + 0]; + palptr[1] = customPalette[c * 3 + 1]; + palptr[2] = customPalette[c * 3 + 2]; + palptr[3] = 0; + + palptr += 4; + }; + } + _paletteFlag = 2; _vgaSpriteChanged++; } diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp index f59af0daaa..e25bd6b438 100644 --- a/engines/agos/window.cpp +++ b/engines/agos/window.cpp @@ -259,7 +259,7 @@ void AGOSEngine::setTextColor(uint color) { if (window->fill_color == 17) color = 25; else - color = 12; + color = 220; } window->text_color = color; |