[Scummvm-git-logs] scummvm master -> b44b297a8466a1e518502072dc60ede27da459e3
sev-
sev at scummvm.org
Tue Feb 21 23:32:15 CET 2017
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9e07738b52 SCUMM: Fix bug #4112. If you enter the lab while Dr. Fred has the power off, the power won't be turned back on as the sc
56caa6f0a7 SCUMM: Cleanup Maniac Mansion workarounds
b44b297a84 Merge pull request #903 from segrax/Fix_4112
Commit: 9e07738b525f99eb30fb871296573d76e1135e8a
https://github.com/scummvm/scummvm/commit/9e07738b525f99eb30fb871296573d76e1135e8a
Author: Robert Crossfield (robcrossfield at gmail.com)
Date: 2017-02-14T18:28:58+11:00
Commit Message:
SCUMM: Fix bug #4112. If you enter the lab while Dr. Fred has the power off, the power won't be turned back on as the script is killed
Changed paths:
engines/scumm/script_v2.cpp
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 756e0b4..1814b00 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1192,7 +1192,28 @@ void ScummEngine_v2::o2_startScript() {
runScript(script, 0, 0, 0);
}
+// Helper functions for ManiacMansion workarounds
+#define MM_SCRIPT(script) (script + (_game.version == 0 ? 0 : 5))
+#define MM_VALUE(v0,v1) (_game.version == 0 ? v0 : v1)
+
void ScummEngine_v2::stopScriptCommon(int script) {
+
+ // WORKAROUND bug #4112: If you enter the lab while Dr. Fred has the powered turned off
+ // to repair the Zom-B-Matic, the script will be stopped and the power will never turn
+ // back on. This fix forces the power on, when the player enters the lab,
+ // if the script which turned it off is running
+ if (_game.id == GID_MANIAC && _roomResource == 4 && isScriptRunning(MM_SCRIPT(138))) {
+
+ if (vm.slot[_currentScript].number == MM_VALUE(130, 163)) {
+
+ if (script == MM_SCRIPT(138)) {
+
+ int obj = MM_VALUE(124, 157);
+ putState(obj, getState(obj) & ~kObjectState_08 );
+ }
+ }
+ }
+
if (_game.id == GID_MANIAC && _roomResource == 26 && vm.slot[_currentScript].number == 10001) {
// FIXME: Nasty hack for bug #915575
// Don't let the exit script for room 26 stop the script (116), when
Commit: 56caa6f0a7669cf14798148b995031e3f681a4bf
https://github.com/scummvm/scummvm/commit/56caa6f0a7669cf14798148b995031e3f681a4bf
Author: Robert Crossfield (robcrossfield at gmail.com)
Date: 2017-02-14T19:26:11+11:00
Commit Message:
SCUMM: Cleanup Maniac Mansion workarounds
Changed paths:
engines/scumm/script_v2.cpp
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 1814b00..8160c5e 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -31,6 +31,10 @@
namespace Scumm {
+ // Helper functions for ManiacMansion workarounds
+#define MM_SCRIPT(script) (script + (_game.version == 0 ? 0 : 5))
+#define MM_VALUE(v0,v1) (_game.version == 0 ? v0 : v1)
+
#define OPCODE(i, x) _opcodes[i]._OPCODE(ScummEngine_v2, x)
void ScummEngine_v2::setupOpcodes() {
@@ -1178,13 +1182,8 @@ void ScummEngine_v2::o2_startScript() {
// (which makes Ted go answer the door bell) is simply ignored. This
// way, the door bell still chimes, but Ted ignores it.
if (_game.id == GID_MANIAC) {
- if (_game.version >= 1 && script == 87) {
- if (isScriptRunning(88) || isScriptRunning(89))
- return;
- }
- // Script numbers are different in V0
- if (_game.version == 0 && script == 82) {
- if (isScriptRunning(83) || isScriptRunning(84))
+ if (script == MM_SCRIPT(82)) {
+ if (isScriptRunning(MM_SCRIPT(83)) || isScriptRunning(MM_SCRIPT(84)))
return;
}
}
@@ -1192,10 +1191,6 @@ void ScummEngine_v2::o2_startScript() {
runScript(script, 0, 0, 0);
}
-// Helper functions for ManiacMansion workarounds
-#define MM_SCRIPT(script) (script + (_game.version == 0 ? 0 : 5))
-#define MM_VALUE(v0,v1) (_game.version == 0 ? v0 : v1)
-
void ScummEngine_v2::stopScriptCommon(int script) {
// WORKAROUND bug #4112: If you enter the lab while Dr. Fred has the powered turned off
@@ -1209,7 +1204,7 @@ void ScummEngine_v2::stopScriptCommon(int script) {
if (script == MM_SCRIPT(138)) {
int obj = MM_VALUE(124, 157);
- putState(obj, getState(obj) & ~kObjectState_08 );
+ putState(obj, getState(obj) & ~kObjectState_08);
}
}
}
@@ -1218,10 +1213,7 @@ void ScummEngine_v2::stopScriptCommon(int script) {
// FIXME: Nasty hack for bug #915575
// Don't let the exit script for room 26 stop the script (116), when
// switching to the dungeon (script 89)
- if (_game.version >= 1 && script == 116 && isScriptRunning(89))
- return;
- // Script numbers are different in V0
- if (_game.version == 0 && script == 111 && isScriptRunning(84))
+ if (script == MM_SCRIPT(111) && isScriptRunning(MM_SCRIPT(84)))
return;
}
Commit: b44b297a8466a1e518502072dc60ede27da459e3
https://github.com/scummvm/scummvm/commit/b44b297a8466a1e518502072dc60ede27da459e3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-21T23:32:10+01:00
Commit Message:
Merge pull request #903 from segrax/Fix_4112
SCUMM: Fix bug #4112 (MANIAC: Power never returns)
Changed paths:
engines/scumm/script_v2.cpp
More information about the Scummvm-git-logs
mailing list