[Scummvm-cvs-logs] scummvm master -> 6bd180646df50af6de80612f8c500dc6b473c345
fingolfin
max at quendi.de
Mon Apr 4 13:05:31 CEST 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0725be325f SCUMM: Extend workaround for bug #1668393 (see bug #3267665)
6bd180646d SCUMM: Extend debug command 'object' to allow querying state
Commit: 0725be325f60fa578b918aaaaef1d5f4008d310a
https://github.com/scummvm/scummvm/commit/0725be325f60fa578b918aaaaef1d5f4008d310a
Author: Max Horn (max at quendi.de)
Date: 2011-04-04T04:04:17-07:00
Commit Message:
SCUMM: Extend workaround for bug #1668393 (see bug #3267665)
Changed paths:
engines/scumm/script_v5.cpp
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 9e245aa..ee790f7 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -530,11 +530,20 @@ void ScummEngine_v5::o5_actorOps() {
void ScummEngine_v5::o5_setClass() {
int obj = getVarOrDirectWord(PARAM_1);
- int newClass;
+ int cls;
while ((_opcode = fetchScriptByte()) != 0xFF) {
- newClass = getVarOrDirectWord(PARAM_1);
- if (newClass == 0) {
+ cls = getVarOrDirectWord(PARAM_1);
+
+ // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is
+ // used to test and set the state of various objects (e.g. the inside
+ // door (object 465) of the of the Hostel on Mars), when opening the
+ // Hostel door from the outside.
+ if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns &&
+ vm.slot[_currentScript].number == 205 && _currentRoom == 185 &&
+ (cls == 0 || cls == 1)) {
+ putState(obj, cls);
+ } else if (cls == 0) {
// Class '0' means: clean all class data
_classData[obj] = 0;
if ((_game.features & GF_SMALL_HEADER) && obj <= _numActors) {
@@ -543,7 +552,7 @@ void ScummEngine_v5::o5_setClass() {
a->_forceClip = 0;
}
} else
- putClass(obj, newClass, (newClass & 0x80) ? true : false);
+ putClass(obj, cls, (cls & 0x80) ? true : false);
}
}
@@ -1148,9 +1157,10 @@ void ScummEngine_v5::o5_ifClassOfIs() {
while ((_opcode = fetchScriptByte()) != 0xFF) {
cls = getVarOrDirectWord(PARAM_1);
- // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is used
- // to check the state of the inside door (object 465) of the Hostel on Mars,
- // when opening the Hostel door from the outside.
+ // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is
+ // used to test and set the state of various objects (e.g. the inside
+ // door (object 465) of the of the Hostel on Mars), when opening the
+ // Hostel door from the outside.
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns &&
vm.slot[_currentScript].number == 205 && _currentRoom == 185 &&
obj == 465 && cls == 0) {
Commit: 6bd180646df50af6de80612f8c500dc6b473c345
https://github.com/scummvm/scummvm/commit/6bd180646df50af6de80612f8c500dc6b473c345
Author: Max Horn (max at quendi.de)
Date: 2011-04-04T04:04:17-07:00
Commit Message:
SCUMM: Extend debug command 'object' to allow querying state
Changed paths:
engines/scumm/debugger.cpp
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index cf0ee0f..63188c1 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -479,7 +479,7 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) {
//is BgNeedsRedraw enough?
_vm->_bgNeedsRedraw = true;
} else {
- DebugPrintf("object command 'state' requires a parameter\n");
+ DebugPrintf("State of object %d: %d\n", obj, _vm->getState(obj));
}
} else if (!strcmp(argv[2], "name")) {
DebugPrintf("Name of object %d: %s\n", obj, _vm->getObjOrActorName(obj));
More information about the Scummvm-git-logs
mailing list