diff options
author | Paul Gilbert | 2019-08-30 21:50:14 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-08-30 21:50:14 -0700 |
commit | 9213920ac12198ab96dd804111b93d6b38e900c8 (patch) | |
tree | 9aefe673b3f1fab285f36af055e3170fa765b9b9 /engines/xeen/sprites.cpp | |
parent | 0f1722ebce2105485f48f6903c7b02a56ff63a06 (diff) | |
download | scummvm-rg350-9213920ac12198ab96dd804111b93d6b38e900c8.tar.gz scummvm-rg350-9213920ac12198ab96dd804111b93d6b38e900c8.tar.bz2 scummvm-rg350-9213920ac12198ab96dd804111b93d6b38e900c8.zip |
XEEN: Cleanup of sprite drawer 3
Diffstat (limited to 'engines/xeen/sprites.cpp')
-rw-r--r-- | engines/xeen/sprites.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp index 25b6a04100..76bd74285b 100644 --- a/engines/xeen/sprites.cpp +++ b/engines/xeen/sprites.cpp @@ -28,6 +28,8 @@ #include "xeen/screen.h" #include "xeen/sprites.h" +#include "graphics/palette.h" + namespace Xeen { #define SCENE_CLIP_LEFT 8 @@ -438,7 +440,7 @@ void SpriteDrawer1::drawPixel(byte *dest, byte pixel) { /*------------------------------------------------------------------------*/ -const uint16 DRAWER3_MASK[4] = { 0xF01, 0xF03, 0xF07, 0xF0F }; +const uint16 DRAWER3_MASK[4] = { 1, 3, 7, 15 }; const uint16 DRAWER3_OFFSET[4] = { 1, 2, 4, 8 }; SpriteDrawer3::SpriteDrawer3(byte *data, size_t filesize, int index) : SpriteDrawer(data, filesize) { @@ -447,10 +449,8 @@ SpriteDrawer3::SpriteDrawer3(byte *data, size_t filesize, int index) : SpriteDra } void SpriteDrawer3::drawPixel(byte *dest, byte pixel) { - uint16 val = (int)*dest << 8 | pixel; - val = (val & _mask) - _offset; + byte level = (pixel & _mask) - _offset + (*dest & 0xf); - byte level = (val & 0xff) + (val >> 8); if (level >= 0x80) { *dest &= 0xf0; } else if (level <= 0xf) { |