diff options
author | Travis Howell | 2003-07-30 16:25:05 +0000 |
---|---|---|
committer | Travis Howell | 2003-07-30 16:25:05 +0000 |
commit | e739a9644cf2d4e39b45928dd9713427e45bb179 (patch) | |
tree | 4e429fbe4b94c9af0fd3f93d36b7780bad7e652c | |
parent | 2ddd3a989598b1840bf109c948e5779d72695639 (diff) | |
download | scummvm-rg350-e739a9644cf2d4e39b45928dd9713427e45bb179.tar.gz scummvm-rg350-e739a9644cf2d4e39b45928dd9713427e45bb179.tar.bz2 scummvm-rg350-e739a9644cf2d4e39b45928dd9713427e45bb179.zip |
Fix Golum Ring causes graphic glitches, bug #777966
svn-id: r9294
-rw-r--r-- | simon/vga.cpp | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/simon/vga.cpp b/simon/vga.cpp index c7b77953f9..12e0c06126 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -748,8 +748,6 @@ void SimonEngine::vc_10_draw() { vc_10_skip_cols(&state); - /* XXX: implement transparency */ - w = 0; do { mask = vc_10_depack_column(&state); /* esi */ @@ -757,15 +755,33 @@ void SimonEngine::vc_10_draw() { dst = state.surf_addr + w * 2; /* edi */ h = state.draw_height; - do { - if (mask[0] & 0xF0) - dst[0] = src[0]; - if (mask[0] & 0x0F) - dst[1] = src[1]; - mask++; - dst += state.surf_pitch; - src += state.surf2_pitch; - } while (--h); + if (!(_game & GF_SIMON2) && vc_get_bit(88)) { + /* transparency */ + do { + if (mask[0] & 0xF0) { + if ((dst[0] & 0x0F0) == 0x20) + dst[0] = src[0]; + } + if (mask[0] & 0x0F) { + if ((dst[1] & 0x0F0) == 0x20) + dst[1] = src[1]; + } + mask++; + dst += state.surf_pitch; + src += state.surf2_pitch; + } while (--h); + } else { + /* no transparency */ + do { + if (mask[0] & 0xF0) + dst[0] = src[0]; + if (mask[0] & 0x0F) + dst[1] = src[1]; + mask++; + dst += state.surf_pitch; + src += state.surf2_pitch; + } while (--h); + } } while (++w != state.draw_width); /* vc_10_helper_5 */ |