[Scummvm-cvs-logs] SF.net SVN: scummvm: [26988] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Mon May 28 10:54:14 CEST 2007
Revision: 26988
http://scummvm.svn.sourceforge.net/scummvm/?rev=26988&view=rev
Author: Kirben
Date: 2007-05-28 01:54:13 -0700 (Mon, 28 May 2007)
Log Message:
-----------
Fix glitches caused by interface differences in the AtariST verison of Elvira 2.
Modified Paths:
--------------
scummvm/trunk/engines/agos/event.cpp
scummvm/trunk/engines/agos/script_e2.cpp
scummvm/trunk/engines/agos/vga.cpp
Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp 2007-05-28 08:02:10 UTC (rev 26987)
+++ scummvm/trunk/engines/agos/event.cpp 2007-05-28 08:54:13 UTC (rev 26988)
@@ -362,10 +362,11 @@
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::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 @@
}
} 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::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 @@
}
} else if (_opcode178Var2) {
_opcode178Var2--;
- drawStuff(_image4, 43475 + _opcode178Var2 * 4);
+ drawStuff(_image4, 275 + _opcode178Var2 * 4);
vte->delay = 3;
} else {
deleteVgaEvent(vte);
Modified: scummvm/trunk/engines/agos/script_e2.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e2.cpp 2007-05-28 08:02:10 UTC (rev 26987)
+++ scummvm/trunk/engines/agos/script_e2.cpp 2007-05-28 08:54:13 UTC (rev 26988)
@@ -498,6 +498,7 @@
// 161: print stats
WindowBlock *window = _dummyWindow;
int val;
+ const uint8 y = (getPlatform() == Common::kPlatformAtariST) ? 131 : 134;
window->flags = 1;
@@ -509,7 +510,7 @@
val = -99;
if (val > 99)
val = 99;
- writeChar(window, 10, 134, 0, val);
+ writeChar(window, 10, y, 0, val);
// PP
val = _variableArray[22];
@@ -517,7 +518,7 @@
val = -99;
if (val > 99)
val = 99;
- writeChar(window, 16, 134, 6, val);
+ writeChar(window, 16, y, 6, val);
// HP
val = _variableArray[23];
@@ -525,7 +526,7 @@
val = -99;
if (val > 99)
val = 99;
- writeChar(window, 23, 134, 4, val);
+ writeChar(window, 23, y, 4, val);
// Experience
val = _variableArray[21];
@@ -533,8 +534,8 @@
val = -99;
if (val > 9999)
val = 9999;
- writeChar(window, 30, 134, 6, val / 100);
- writeChar(window, 32, 134, 2, val / 10);
+ writeChar(window, 30, y, 6, val / 100);
+ writeChar(window, 32, y, 2, val / 10);
mouseOn();
}
Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp 2007-05-28 08:02:10 UTC (rev 26987)
+++ scummvm/trunk/engines/agos/vga.cpp 2007-05-28 08:54:13 UTC (rev 26988)
@@ -606,6 +606,13 @@
flags = vcReadNextWord();
}
+ if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformAtariST) {
+ if (((image >= 11 && image <= 16) || (image >= 195 && image <= 198)) &&
+ _vgaCurSpriteId == 100) {
+ y += 75;
+ }
+ }
+
drawImage_init(image, palette, x, y, flags);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list