diff options
author | Travis Howell | 2007-06-23 07:40:25 +0000 |
---|---|---|
committer | Travis Howell | 2007-06-23 07:40:25 +0000 |
commit | ee143c01edb01b5e99a0e2d392d5d7275b56b90b (patch) | |
tree | 0ed97f11112d8a2c3739f9f924520ad63c2a12ca /engines | |
parent | f311ca82ce10688246747f0db00a48ab10c9a365 (diff) | |
download | scummvm-rg350-ee143c01edb01b5e99a0e2d392d5d7275b56b90b.tar.gz scummvm-rg350-ee143c01edb01b5e99a0e2d392d5d7275b56b90b.tar.bz2 scummvm-rg350-ee143c01edb01b5e99a0e2d392d5d7275b56b90b.zip |
Minor cleanup.
svn-id: r27646
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/vga_e2.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index 45c70256ee..6919302f7e 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -69,40 +69,36 @@ void AGOSEngine::vc44_ifBitClear() { } void AGOSEngine::vc45_setWindowPalette() { - uint num = vcReadNextWord(); - uint color = vcReadNextWord(); + uint16 num = vcReadNextWord(); + uint16 color = vcReadNextWord(); + + const uint16 *vlut = &_videoWindows[num * 4]; + uint8 width = vlut[2] * 8; + uint8 height = vlut[3]; if (num == 4) { - const uint16 *vlut = &_videoWindows[num * 4]; byte *dst = _window4BackScn; - uint width = vlut[2] * 16; - uint height = vlut[3]; - for (uint h = 0; h < height; h++) { - for (uint w = 0; w < width; w++) { + for (uint8 h = 0; h < height; h++) { + for (uint8 w = 0; w < width; w++) { uint16 val = READ_LE_UINT16(dst + w * 2); val &= 0xF0F; val |= color * 16; WRITE_LE_UINT16(dst + w * 2, val); } - dst += width; + dst += width * 2; } } else { - const uint16 *vlut = &_videoWindows[num * 4]; - Graphics::Surface *screen = _system->lockScreen(); byte *dst = (byte *)screen->pixels + vlut[0] * 16 + vlut[1] * _dxSurfacePitch; - uint width = vlut[2] * 16 / 2; - uint height = vlut[3]; - if (getGameType() == GType_ELVIRA2 && num == 7) { dst -= 4; width += 4; } - for (uint h = 0; h < height; h++) { - for (uint w = 0; w < width; w++) { + for (uint8 h = 0; h < height; h++) { + for (uint8 w = 0; w < width; w++) { uint16 val = READ_LE_UINT16(dst + w * 2); val &= 0xF0F; val |= color * 16; |