aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/agos.h6
-rw-r--r--engines/agos/gfx.cpp6
-rw-r--r--engines/agos/input.cpp16
-rw-r--r--engines/agos/res_snd.cpp6
-rw-r--r--engines/agos/script.cpp2
-rw-r--r--engines/agos/script_s2.cpp6
-rw-r--r--engines/agos/string.cpp6
-rw-r--r--engines/agos/vga.cpp20
-rw-r--r--engines/agos/vga_ww.cpp6
9 files changed, 30 insertions, 44 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 1d1c0eb890..79a8bc0567 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -672,8 +672,8 @@ protected:
void setItemParent(Item *item, Item *parent);
void setItemState(Item *item, int value);
- void stopAnimate(uint a);
- void stopAnimateSimon2(uint a, uint b);
+ void stopAnimate(uint16 a);
+ void stopAnimateSimon2(uint16 a, uint16 b);
void enableBox(uint hitarea);
void disableBox(uint hitarea);
@@ -1491,7 +1491,7 @@ protected:
virtual void addArrows(WindowBlock *window, uint8 num);
virtual uint setupIconHitArea(WindowBlock *window, uint num, uint x, uint y, Item *item_ptr);
- virtual void playSpeech(uint speech_id, uint vga_sprite_id);
+ virtual void playSpeech(uint16 speech_id, uint16 vga_sprite_id);
virtual void listSaveGames(char *dst);
virtual void userGame(bool load);
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index cbdff30818..2ce6b03b03 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -1008,11 +1008,7 @@ void AGOSEngine::animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, i
else
vsp->palette = palette;
vsp->id = vgaSpriteId;
-
- if (getGameType() == GType_SIMON2 || getGameType() == GType_FF || getGameType() == GType_PP)
- vsp->zoneNum = zoneNum;
- else
- vsp->zoneNum = zoneNum = vgaSpriteId / 100;
+ vsp->zoneNum = zoneNum;
for (;;) {
vpe = &_vgaBufferPointers[zoneNum];
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index 4a0cd03664..ef0791dc10 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -274,28 +274,28 @@ void AGOSEngine::waitForInput() {
_verbHitArea = 236;
if (ha->id == 98) {
- animate(2, 0, 110, 0, 0, 0);
+ animate(2, 1, 110, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 108) {
- animate(2, 0, 106, 0, 0, 0);
+ animate(2, 1, 106, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 109) {
- animate(2, 0, 107, 0, 0, 0);
+ animate(2, 1, 107, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 115) {
- animate(2, 0, 109, 0, 0, 0);
+ animate(2, 1, 109, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 116) {
- animate(2, 0, 113, 0, 0, 0);
+ animate(2, 1, 113, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 117) {
- animate(2, 0, 112, 0, 0, 0);
+ animate(2, 1, 112, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 118) {
- animate(2, 0, 108, 0, 0, 0);
+ animate(2, 1, 108, 0, 0, 0);
waitForSync(34);
} else if (ha->id == 119) {
- animate(2, 0, 111, 0, 0, 0);
+ animate(2, 1, 111, 0, 0, 0);
waitForSync(34);
}
}
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index b890f293ed..64bf19570f 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -41,7 +41,7 @@ using Common::File;
namespace AGOS {
-void AGOSEngine_Simon1::playSpeech(uint speech_id, uint vgaSpriteId) {
+void AGOSEngine_Simon1::playSpeech(uint16 speech_id, uint16 vgaSpriteId) {
if (speech_id == 9999) {
if (_subtitles)
return;
@@ -59,12 +59,12 @@ void AGOSEngine_Simon1::playSpeech(uint speech_id, uint vgaSpriteId) {
stopAnimate(204);
}
if (vgaSpriteId < 100)
- stopAnimate(vgaSpriteId + 201);
+ stopAnimate(201 + vgaSpriteId);
loadVoice(speech_id);
if (vgaSpriteId < 100)
- animate(4, 2, vgaSpriteId + 201, 0, 0, 0);
+ animate(4, 2, 201 + vgaSpriteId, 0, 0, 0);
}
}
diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp
index 4541f3d002..d083e0251b 100644
--- a/engines/agos/script.cpp
+++ b/engines/agos/script.cpp
@@ -1000,7 +1000,7 @@ void AGOSEngine::sendSync(uint a) {
_lockWord &= ~0x8000;
}
-void AGOSEngine::stopAnimate(uint a) {
+void AGOSEngine::stopAnimate(uint16 a) {
uint16 b = to16Wrapper(a);
_lockWord |= 0x8000;
_vcPtr = (byte *)&b;
diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp
index 9041a99662..dfc1200d7c 100644
--- a/engines/agos/script_s2.cpp
+++ b/engines/agos/script_s2.cpp
@@ -323,8 +323,8 @@ void AGOSEngine_Simon2::os2_animate() {
void AGOSEngine_Simon2::os2_stopAnimate() {
// 99: kill sprite
- uint a = getVarOrWord();
- uint b = getVarOrWord();
+ uint16 a = getVarOrWord();
+ uint16 b = getVarOrWord();
stopAnimateSimon2(a, b);
}
@@ -469,7 +469,7 @@ void AGOSEngine_Simon2::os2_waitMark() {
waitForMark(i);
}
-void AGOSEngine::stopAnimateSimon2(uint a, uint b) {
+void AGOSEngine::stopAnimateSimon2(uint16 a, uint16 b) {
uint16 items[2];
items[0] = to16Wrapper(a);
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 8c5e911c39..d9249d3305 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -364,16 +364,16 @@ void AGOSEngine::printScreenText(uint vgaSpriteId, uint color, const char *strin
renderString(vgaSpriteId, color, width, height, convertedString);
}
- int b = (!getBitFlag(133)) ? 3 : 4;
+ uint16 windowNum = (!getBitFlag(133)) ? 3 : 4;
x /= 8;
if (y < 2)
y = 2;
if (getGameType() == GType_SIMON1)
- animate(b, 2, vgaSpriteId + 199, x, y, 12);
+ animate(windowNum, 2, 199 + vgaSpriteId, x, y, 12);
else
- animate(b, 2, vgaSpriteId, x, y, 12);
+ animate(windowNum, 2, vgaSpriteId, x, y, 12);
}
// The Feeble Files specific
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index a618ba8dd3..9e1f913410 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -215,7 +215,7 @@ bool AGOSEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
void AGOSEngine::dirtyBackGround() {
AnimTable *animTable = _screenAnim1;
while (animTable->srcPtr) {
- if (animTable->id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || animTable->zoneNum == _vgaCurZoneNum)) {
+ if (animTable->id == _vgaCurSpriteId && animTable->zoneNum == _vgaCurZoneNum) {
animTable->windowNum |= 0x8000;
break;
}
@@ -226,13 +226,8 @@ void AGOSEngine::dirtyBackGround() {
VgaSprite *AGOSEngine::findCurSprite() {
VgaSprite *vsp = _vgaSprites;
while (vsp->id) {
- if (getGameType() == GType_SIMON2 || getGameType() == GType_FF || getGameType() == GType_PP) {
- if (vsp->id == _vgaCurSpriteId && vsp->zoneNum == _vgaCurZoneNum)
- break;
- } else {
- if (vsp->id == _vgaCurSpriteId)
- break;
- }
+ if (vsp->id == _vgaCurSpriteId && vsp->zoneNum == _vgaCurZoneNum)
+ break;
vsp++;
}
return vsp;
@@ -241,13 +236,8 @@ VgaSprite *AGOSEngine::findCurSprite() {
bool AGOSEngine::isSpriteLoaded(uint16 id, uint16 zoneNum) {
VgaSprite *vsp = _vgaSprites;
while (vsp->id) {
- if (getGameType() == GType_SIMON2 || getGameType() == GType_FF || getGameType() == GType_PP) {
- if (vsp->id == id && vsp->zoneNum == zoneNum)
- return true;
- } else {
- if (vsp->id == id)
- return true;
- }
+ if (vsp->id == id && vsp->zoneNum == zoneNum)
+ return true;
vsp++;
}
return false;
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index 571dc25cec..09b51ecfe1 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -88,7 +88,7 @@ void AGOSEngine_Simon1::vcStopAnimation(uint zone, uint sprite) {
vfs = _waitSyncTable;
while (vfs->ident != 0) {
- if (vfs->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vfs->cur_vga_file == _vgaCurZoneNum)) {
+ if (vfs->sprite_id == _vgaCurSpriteId && vfs->cur_vga_file == _vgaCurZoneNum) {
while (vfs->ident != 0) {
memcpy(vfs, vfs + 1, sizeof(VgaSleepStruct));
vfs++;
@@ -104,7 +104,7 @@ void AGOSEngine_Simon1::vcStopAnimation(uint zone, uint sprite) {
vte = _vgaTimerList;
while (vte->delay) {
- if (vte->sprite_id == _vgaCurSpriteId && (getGameType() == GType_SIMON1 || vte->cur_vga_file == _vgaCurZoneNum)) {
+ if (vte->sprite_id == _vgaCurSpriteId && vte->cur_vga_file == _vgaCurZoneNum) {
deleteVgaEvent(vte);
break;
}
@@ -127,8 +127,8 @@ void AGOSEngine::vc60_stopAnimation() {
zoneNum = vcReadNextWord();
sprite = vcReadNextWord();
} else {
- zoneNum = _vgaCurZoneNum;
sprite = vcReadNextWord();
+ zoneNum = sprite / 100;
}
vcStopAnimation(zoneNum, sprite);