mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-24 02:36:27 +00:00
XEEN: Fix to use correct drawer for shades, drawer cleanup
This commit is contained in:
parent
1588218f6f
commit
0f1722ebce
@ -2668,7 +2668,7 @@ void InterfaceScene::setMonsterSprite(DrawStruct &drawStruct, MazeMonster &monst
|
||||
|
||||
drawStruct._flags &= ~0xFFF;
|
||||
if (monster._effect2)
|
||||
drawStruct._flags = Res.MONSTER_EFFECT_FLAGS[monster._effect2][monster._effect3];
|
||||
drawStruct._flags = Res.MONSTER_EFFECT_FLAGS[monster._effect2 - 1][monster._effect3];
|
||||
}
|
||||
|
||||
void InterfaceScene::setIndoorsObjects() {
|
||||
|
@ -475,10 +475,10 @@ void SpriteDrawer4::drawPixel(byte *dest, byte pixel) {
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
const uint16 DRAWER5_MASK[4] = { 0x3333, 0x6666, 0x999A, 0xCCCD };
|
||||
const uint16 DRAWER5_THRESHOLD[4] = { 0x3333, 0x6666, 0x999A, 0xCCCD };
|
||||
|
||||
SpriteDrawer5::SpriteDrawer5(byte *data, size_t filesize, int index) : SpriteDrawer(data, filesize) {
|
||||
_mask = DRAWER5_MASK[index];
|
||||
_threshold = DRAWER5_THRESHOLD[index];
|
||||
_random1 = g_vm->getRandomNumber(0xffff);
|
||||
_random2 = g_vm->getRandomNumber(0xffff);
|
||||
}
|
||||
@ -491,7 +491,7 @@ void SpriteDrawer5::drawPixel(byte *dest, byte pixel) {
|
||||
rcr(_random2, flag);
|
||||
_random2 ^= _random1;
|
||||
|
||||
if (_random2 > _mask)
|
||||
if (_random2 > _threshold)
|
||||
*dest = pixel;
|
||||
}
|
||||
|
||||
|
@ -218,6 +218,9 @@ public:
|
||||
SpriteDrawer1(byte *data, size_t filesize, int index);
|
||||
};
|
||||
|
||||
/**
|
||||
* Draws the sprite as faint ghostly, see-through.
|
||||
*/
|
||||
class SpriteDrawer3 : public SpriteDrawer {
|
||||
private:
|
||||
uint16 _offset, _mask;
|
||||
@ -248,9 +251,12 @@ public:
|
||||
SpriteDrawer4(byte *data, size_t filesize, int index);
|
||||
};
|
||||
|
||||
/**
|
||||
* Draws a sprite with a fuzziness effect where only some pixels of the sprite are randomly drawn
|
||||
*/
|
||||
class SpriteDrawer5 : public SpriteDrawer {
|
||||
private:
|
||||
uint16 _mask, _random1, _random2;
|
||||
uint16 _threshold, _random1, _random2;
|
||||
private:
|
||||
/**
|
||||
* Roll carry right opcode emulation
|
||||
|
Loading…
Reference in New Issue
Block a user