aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFlorian Kagerer2009-10-09 21:35:48 +0000
committerFlorian Kagerer2009-10-09 21:35:48 +0000
commit0d7d2b8371e5d903fe0390de8656e33bf0fabdb2 (patch)
treeb382e3aabfc51c1974b0d91c6f02647464b8469b /engines
parente0b1ef6e463f4d817a87a9eeb85f4760c4980218 (diff)
downloadscummvm-rg350-0d7d2b8371e5d903fe0390de8656e33bf0fabdb2.tar.gz
scummvm-rg350-0d7d2b8371e5d903fe0390de8656e33bf0fabdb2.tar.bz2
scummvm-rg350-0d7d2b8371e5d903fe0390de8656e33bf0fabdb2.zip
LOL/PC-98: fixed monster drawing bug (some wrong pixels)
svn-id: r44847
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/scene_lol.cpp5
-rw-r--r--engines/kyra/sprites_lol.cpp20
2 files changed, 18 insertions, 7 deletions
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index eee2d066ab..e0c22f6888 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -2173,6 +2173,11 @@ void LoLEngine::drawBlockEffects(int index, int type) {
uint16 drawFlag = (type == 3) ? 0x80 : 0x20;
uint8 *ovl = (type == 3) ? _screen->_grayOverlay : 0;
+ if (_flags.use16ColorMode) {
+ ovl = 0;
+ drawFlag = (type == 0 || type == 3) ? 0 : 0x20;
+ }
+
calcCoordinatesAddDirectionOffset(x, y, _currentDirection);
x |= ((_visibleBlockIndex[index] & 0x1f) << 8);
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index 2dfff893e8..26e47894a0 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -691,11 +691,11 @@ void LoLEngine::drawMonster(uint16 id) {
int bloodType = m->properties->flags & 0xc000;
if (bloodType == 0x4000)
- bloodType = 63;
+ bloodType = _flags.use16ColorMode ? 0xbb : 63;
else if (bloodType == 0x8000)
- bloodType = 15;
+ bloodType = _flags.use16ColorMode ? 0x55 : 15;
else if (bloodType == 0xc000)
- bloodType = 74;
+ bloodType = _flags.use16ColorMode ? 0x33 : 74;
else
bloodType = 0;
@@ -1021,11 +1021,17 @@ uint8 *LoLEngine::drawItemOrMonster(uint8 *shape, uint8 *table, int x, int y, in
if (flags & 0x40)
flg |= 2;
- if (_currentLevel == 22) {
- if (ovl)
- ovl[255] = 0;
+ if (_flags.use16ColorMode) {
+ if (_currentLevel = 22)
+ flg &= 0xdfff;
+
} else {
- flg |= 0x2000;
+ if (_currentLevel == 22) {
+ if (ovl)
+ ovl[255] = 0;
+ } else {
+ flg |= 0x2000;
+ }
}
_shpDmX += ((_dmScaleW * fineX) >> 8);