aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamieson Christian2003-08-16 21:45:00 +0000
committerJamieson Christian2003-08-16 21:45:00 +0000
commit0914e57d214cd47e8f9cd7b915e8476bc77f7e19 (patch)
tree25312a235e36552b419e2b7e7592953b74a4209a
parentd7fae3d1cb5921e1256c9313d0ea0bf74db3523d (diff)
downloadscummvm-rg350-0914e57d214cd47e8f9cd7b915e8476bc77f7e19.tar.gz
scummvm-rg350-0914e57d214cd47e8f9cd7b915e8476bc77f7e19.tar.bz2
scummvm-rg350-0914e57d214cd47e8f9cd7b915e8476bc77f7e19.zip
Changed fix for hanging MI1 EGA Demo after
finding GFX regressions in Indy3. New fix runs exit script immediately when nuking the resource for the current room, and resets the current room to 0 (nothing). Again, a warning is output in case other cases of nuking the current room are found and have undesirable behavior as a result of this change. svn-id: r9731
-rw-r--r--scumm/script_v5.cpp15
-rw-r--r--scumm/scummvm.cpp3
2 files changed, 10 insertions, 8 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 9fab799e60..c5f3c95fa6 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1461,12 +1461,7 @@ void Scumm_v5::o5_putActorInRoom() {
int room = getVarOrDirectByte(0x40);
a = derefActor(act, "o5_putActorInRoom");
-
- if (room == 0 && a->room != _currentRoom && a->room != room && _currentRoom != room) {
- warning ("o5_putActorInRoom (%d [%d], %d) ignored", act, a->room, room);
- return;
- }
-
+
if (a->visible && _currentRoom != room && VAR(VAR_TALK_ACTOR) == a->number) {
clearMsgQueue();
}
@@ -1529,10 +1524,16 @@ void Scumm_v5::o5_resourceRoutines() {
ensureResourceLoaded(rtRoom, resid);
break;
+ case 8: // nuke room
+ if (resid == _currentRoom) {
+ warning ("Nuking current room %d - exit script called early", resid);
+ runExitScript();
+ _currentRoom = 0;
+ }
+ // Fall through
case 5: // nuke script
case 6: // nuke sound
case 7: // nuke costume
- case 8: // nuke room
if (_gameId == GID_ZAK256)
warning("o5_resourceRoutines %d should not occur in Zak256", op);
else
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 8ed884612c..db2ea574f6 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1761,7 +1761,8 @@ void Scumm::startScene(int room, Actor *a, int objectNr) {
if (!(_features & GF_SMALL_HEADER) && VAR_NEW_ROOM != 0xFF) // Disable for SH games. Overwrites
VAR(VAR_NEW_ROOM) = room; // gamevars, eg Zak cashcards
- runExitScript();
+ if (_currentRoom)
+ runExitScript();
killScriptsAndResources();
clearEnqueue();
stopCycle(0);