diff options
author | Joost Peters | 2005-04-10 14:30:24 +0000 |
---|---|---|
committer | Joost Peters | 2005-04-10 14:30:24 +0000 |
commit | 53a64266c8963f46be68f54fcd1fb89432a02826 (patch) | |
tree | a99cea66bf08a5c5951f71e09538f310961932ae /gob | |
parent | 0553720ca0cf56b5d755bd824a7f0afd79db3060 (diff) | |
download | scummvm-rg350-53a64266c8963f46be68f54fcd1fb89432a02826.tar.gz scummvm-rg350-53a64266c8963f46be68f54fcd1fb89432a02826.tar.bz2 scummvm-rg350-53a64266c8963f46be68f54fcd1fb89432a02826.zip |
Apply "correct handling of transp in drawSprite()" patch by wjp.
(Colour 0 should only be skipped when transp is set)
Fixes wrong colour in intro and clearing of buffer after fades.
svn-id: r17511
Diffstat (limited to 'gob')
-rw-r--r-- | gob/driver_vga.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gob/driver_vga.cpp b/gob/driver_vga.cpp index ab870926fb..12add0bf9f 100644 --- a/gob/driver_vga.cpp +++ b/gob/driver_vga.cpp @@ -37,8 +37,13 @@ void VGAVideoDriver::drawSprite(SurfaceDesc *source, SurfaceDesc *dest, int16 le byte *srcPos = source->vidPtr + (top * source->width) + left; byte *destPos = dest->vidPtr + (y * dest->width) + x; while (height--) { - for (int16 i = 0; i < width; ++i) { - if (srcPos[i]) + if (transp) { + for (int16 i = 0; i < width; ++i) { + if (srcPos[i]) + destPos[i] = srcPos[i]; + } + } else { + for (int16 i = 0; i < width; ++i) destPos[i] = srcPos[i]; } |