diff options
author | Travis Howell | 2007-05-28 08:54:13 +0000 |
---|---|---|
committer | Travis Howell | 2007-05-28 08:54:13 +0000 |
commit | 0d789e074e6ff1ed76e75619eae9d337d3faad29 (patch) | |
tree | 87cbc892c1a23eeff3f6690f4e474f0a2cf80f15 /engines/agos/event.cpp | |
parent | bd67214c96c1bb1b194cfc31abf05a08afc9cf64 (diff) | |
download | scummvm-rg350-0d789e074e6ff1ed76e75619eae9d337d3faad29.tar.gz scummvm-rg350-0d789e074e6ff1ed76e75619eae9d337d3faad29.tar.bz2 scummvm-rg350-0d789e074e6ff1ed76e75619eae9d337d3faad29.zip |
Fix glitches caused by interface differences in the AtariST verison of Elvira 2.
svn-id: r26988
Diffstat (limited to 'engines/agos/event.cpp')
-rw-r--r-- | engines/agos/event.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 9fc8cb72e5..a46661c205 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -362,10 +362,11 @@ static const byte _image4[32] = { 0x3A, 0x3A, 0x3B, 0x3A, }; -void AGOSEngine::drawStuff(const byte *src, uint offs) { - byte *dst = getFrontBuf() + offs; +void AGOSEngine::drawStuff(const byte *src, uint xoffs) { + const uint8 y = (getPlatform() == Common::kPlatformAtariST) ? 132 : 135; + byte *dst = getFrontBuf() + y * _screenWidth + xoffs; - for (uint y = 0; y < 6; y++) { + for (uint h = 0; h < 6; h++) { memcpy(dst, src, 4); src += 4; dst += _screenWidth; @@ -373,11 +374,11 @@ void AGOSEngine::drawStuff(const byte *src, uint offs) { } void AGOSEngine::imageEvent2(VgaTimerEntry * vte, uint dx) { - // Draws damage indicator gauge + // Draws damage indicator gauge when player hit _nextVgaTimerToProcess = vte + 1; if (!_opcode177Var1) { - drawStuff(_image1, 43204 + _opcode177Var2 * 4); + drawStuff(_image1, 4 + _opcode177Var2 * 4); _opcode177Var2++; if (_opcode177Var2 == dx) { _opcode177Var1 = 1; @@ -387,7 +388,7 @@ void AGOSEngine::imageEvent2(VgaTimerEntry * vte, uint dx) { } } else if (_opcode177Var2) { _opcode177Var2--; - drawStuff(_image2, 43204 + _opcode177Var2 * 4); + drawStuff(_image2, 4 + _opcode177Var2 * 4); vte->delay = 3; } else { deleteVgaEvent(vte); @@ -395,10 +396,11 @@ void AGOSEngine::imageEvent2(VgaTimerEntry * vte, uint dx) { } void AGOSEngine::imageEvent3(VgaTimerEntry * vte, uint dx) { + // Draws damage indicator gauge when monster hit _nextVgaTimerToProcess = vte + 1; if (!_opcode178Var1) { - drawStuff(_image3, 43475 + _opcode178Var2 * 4); + drawStuff(_image3, 275 + _opcode178Var2 * 4); _opcode178Var2++; if (_opcode178Var2 >= 10 || _opcode178Var2 == dx) { _opcode178Var1 = 1; @@ -408,7 +410,7 @@ void AGOSEngine::imageEvent3(VgaTimerEntry * vte, uint dx) { } } else if (_opcode178Var2) { _opcode178Var2--; - drawStuff(_image4, 43475 + _opcode178Var2 * 4); + drawStuff(_image4, 275 + _opcode178Var2 * 4); vte->delay = 3; } else { deleteVgaEvent(vte); |