[Scummvm-cvs-logs] SF.net SVN: scummvm: [27547] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Tue Jun 19 13:50:24 CEST 2007
Revision: 27547
http://scummvm.svn.sourceforge.net/scummvm/?rev=27547&view=rev
Author: Kirben
Date: 2007-06-19 04:50:22 -0700 (Tue, 19 Jun 2007)
Log Message:
-----------
Cleanup, could cause regressions.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/gfx.cpp
scummvm/trunk/engines/agos/input.cpp
scummvm/trunk/engines/agos/res_snd.cpp
scummvm/trunk/engines/agos/script.cpp
scummvm/trunk/engines/agos/script_s2.cpp
scummvm/trunk/engines/agos/string.cpp
scummvm/trunk/engines/agos/vga.cpp
scummvm/trunk/engines/agos/vga_ww.cpp
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/agos.h 2007-06-19 11:50:22 UTC (rev 27547)
@@ -672,8 +672,8 @@
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 @@
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);
Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/gfx.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -1008,12 +1008,8 @@
else
vsp->palette = palette;
vsp->id = vgaSpriteId;
+ vsp->zoneNum = zoneNum;
- if (getGameType() == GType_SIMON2 || getGameType() == GType_FF || getGameType() == GType_PP)
- vsp->zoneNum = zoneNum;
- else
- vsp->zoneNum = zoneNum = vgaSpriteId / 100;
-
for (;;) {
vpe = &_vgaBufferPointers[zoneNum];
_curVgaFile1 = vpe->vgaFile1;
Modified: scummvm/trunk/engines/agos/input.cpp
===================================================================
--- scummvm/trunk/engines/agos/input.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/input.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -274,28 +274,28 @@
_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);
}
}
Modified: scummvm/trunk/engines/agos/res_snd.cpp
===================================================================
--- scummvm/trunk/engines/agos/res_snd.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/res_snd.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -41,7 +41,7 @@
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 @@
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);
}
}
Modified: scummvm/trunk/engines/agos/script.cpp
===================================================================
--- scummvm/trunk/engines/agos/script.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/script.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -1000,7 +1000,7 @@
_lockWord &= ~0x8000;
}
-void AGOSEngine::stopAnimate(uint a) {
+void AGOSEngine::stopAnimate(uint16 a) {
uint16 b = to16Wrapper(a);
_lockWord |= 0x8000;
_vcPtr = (byte *)&b;
Modified: scummvm/trunk/engines/agos/script_s2.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s2.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/script_s2.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -323,8 +323,8 @@
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 @@
waitForMark(i);
}
-void AGOSEngine::stopAnimateSimon2(uint a, uint b) {
+void AGOSEngine::stopAnimateSimon2(uint16 a, uint16 b) {
uint16 items[2];
items[0] = to16Wrapper(a);
Modified: scummvm/trunk/engines/agos/string.cpp
===================================================================
--- scummvm/trunk/engines/agos/string.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/string.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -364,16 +364,16 @@
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
Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/vga.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -215,7 +215,7 @@
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 @@
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 @@
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;
Modified: scummvm/trunk/engines/agos/vga_ww.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_ww.cpp 2007-06-19 11:41:06 UTC (rev 27546)
+++ scummvm/trunk/engines/agos/vga_ww.cpp 2007-06-19 11:50:22 UTC (rev 27547)
@@ -88,7 +88,7 @@
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 @@
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 @@
zoneNum = vcReadNextWord();
sprite = vcReadNextWord();
} else {
- zoneNum = _vgaCurZoneNum;
sprite = vcReadNextWord();
+ zoneNum = sprite / 100;
}
vcStopAnimation(zoneNum, sprite);
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