aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-05-08 09:09:39 +0000
committerJames Brown2002-05-08 09:09:39 +0000
commit41a843d7620838fbaff1d26242c04127f66427c8 (patch)
tree0ec52fac15bc5f80f6df65f80f05e161bceb67d8
parent2676b82833cb20ff9bc287e9f6e82760143f3948 (diff)
downloadscummvm-rg350-41a843d7620838fbaff1d26242c04127f66427c8.tar.gz
scummvm-rg350-41a843d7620838fbaff1d26242c04127f66427c8.tar.bz2
scummvm-rg350-41a843d7620838fbaff1d26242c04127f66427c8.zip
Fix next to last Zak bugs.
Zak256 is now completable apart from getting stuck in the shop (walkbox issue) svn-id: r4242
-rw-r--r--script_v1.cpp20
-rw-r--r--scummvm.cpp2
2 files changed, 5 insertions, 17 deletions
diff --git a/script_v1.cpp b/script_v1.cpp
index aaf2de02c0..daae2c75a2 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -900,9 +900,6 @@ void Scumm::o5_chainScript()
cur = _currentScript;
- if (vm.slot[cur].cutsceneOverride != 0)
- error("Script %d chaining with active cutscene/override");
-
vm.slot[cur].number = 0;
vm.slot[cur].status = 0;
_currentScript = 0xFF;
@@ -1012,6 +1009,7 @@ void Scumm::o5_delay()
delay |= fetchScriptByte() << 16;
vm.slot[_currentScript].delay = delay;
vm.slot[_currentScript].status = 1;
+
o5_breakHere();
}
@@ -1398,6 +1396,8 @@ void Scumm::o5_getDist()
&& r < 60)
r = 60;
+ if (r > 0) // FIXME: Fixes several off-by-one errors (eg,
+ r--; // zak's tv). Find real cause of bug.
setResult(r);
}
@@ -1606,13 +1606,6 @@ void Scumm::o5_loadRoom()
{
int room;
- /* Begin: Autosave
- _saveLoadSlot = 0;
- sprintf(_saveLoadName, "Autosave", _saveLoadSlot);
- _saveLoadFlag = 1;
- _saveLoadCompatible = false;
- End: Autosave */
-
room = getVarOrDirectByte(0x80);
startScene(room, 0, 0);
_fullRedraw = 1;
@@ -1623,13 +1616,6 @@ void Scumm::o5_loadRoomWithEgo()
int obj, room, x, y;
Actor *a;
- /* Begin: Autosave
- _saveLoadSlot = 0;
- sprintf(_saveLoadName, "Autosave", _saveLoadSlot);
- _saveLoadFlag = 1;
- _saveLoadCompatible = false;
- End: Autosave */
-
obj = getVarOrDirectWord(0x80);
room = getVarOrDirectByte(0x40);
diff --git a/scummvm.cpp b/scummvm.cpp
index 30f1b151a3..79226584f1 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -1287,6 +1287,8 @@ void Scumm::mainRun()
delta = 5;
} else {
delta = scummLoop(delta);
+ if (delta < 1) // Ensure we don't get into a loop
+ delta = 1; // by not decreasing sleepers.
}
}
}