[Scummvm-git-logs] scummvm master -> d4f9c0e361cb85d9674e44c6762722ac84be0d2d

sev- sev at scummvm.org
Fri Sep 2 23:38:43 CEST 2016


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
13f810f57f SCUMM: Ignore SetOwnerOf call in specific case, fixes bug #6802
b9b96e8991 SCUMM: Correct the raft position for PUTTZOO, fixes bug #6097
940bb41526 SCUMM HE: Compensate timers for pauses, fixes bug #6352
d4f9c0e361 Merge pull request #821 from BenCastricum/bugfixes


Commit: 13f810f57f8661ad3af567277abcf5da31f32bb0
    https://github.com/scummvm/scummvm/commit/13f810f57f8661ad3af567277abcf5da31f32bb0
Author: Ben Castricum (github at bencastricum.nl)
Date: 2016-08-30T09:06:43+02:00

Commit Message:
SCUMM: Ignore SetOwnerOf call in specific case, fixes bug #6802

Changed paths:
    engines/scumm/object.cpp



diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index da94a34..cbc24a8 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -110,6 +110,16 @@ void ScummEngine::setOwnerOf(int obj, int owner) {
 	// This causes it to try to remove object 0 from the inventory.
 	if (_game.id == GID_PASS && obj == 0 && vm.slot[_currentScript].number == 94)
 		return;
+
+	// WORKAROUND for bug #6802: assert() was triggered in freddi2.
+ 	// Bug is in room 39. Problem is script 10, in the localvar2==78 case;
+	// this only sets the obj id if var198 is non-zero, but in the asserting
+	// case, it is obj 0. That means two setOwnerOf calls are made with obj 0.
+	// The correct setOwnerOf calls are made afterwards, so just ignoring this
+	// seems to work just fine.
+	if (_game.id == GID_HEGAME && obj == 0 && _currentRoom == 39 && vm.slot[_currentScript].number == 10)
+		return;
+
 	assert(obj > 0);
 
 	if (owner == 0) {


Commit: b9b96e8991bcdd4e61dc56b7d0a5afc4d80d225d
    https://github.com/scummvm/scummvm/commit/b9b96e8991bcdd4e61dc56b7d0a5afc4d80d225d
Author: Ben Castricum (github at bencastricum.nl)
Date: 2016-08-30T09:07:30+02:00

Commit Message:
SCUMM: Correct the raft position for PUTTZOO, fixes bug #6097

Changed paths:
    engines/scumm/script_v6.cpp



diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 6c81f17..62c62c0 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -707,6 +707,17 @@ void ScummEngine_v6::o6_ifNot() {
 void ScummEngine_v6::o6_jump() {
 	int offset = fetchScriptWordSigned();
 
+	// WORKAROUND bug #6097: Pressing escape at the lake side entrance of
+	// the cave while Putt Putt is not on solid ground and still talking
+	// will cause the raft to disappear. This is a script bug in the
+	// original game and affects several versions.
+	if (_game.id == GID_PUTTZOO) {
+		if (_game.heversion == 73 && vm.slot[_currentScript].number == 206 && offset == 176 && !isScriptRunning(202))
+			_scummVars[244] = 35;
+		if (_game.features & GF_HE_985 && vm.slot[_currentScript].number == 2054 && offset == 178 && !isScriptRunning(2050))
+			_scummVars[202] = 35;
+	}
+
 	// WORKAROUND bug #2826144: Talking to the guard at the bigfoot party, after
 	// he's let you inside, will cause the game to hang, if you end the conversation.
 	// This is a script bug, due to a missing jump in one segment of the script.


Commit: 940bb41526da8e16889effc803f029128043b5d8
    https://github.com/scummvm/scummvm/commit/940bb41526da8e16889effc803f029128043b5d8
Author: Ben Castricum (github at bencastricum.nl)
Date: 2016-08-30T09:09:21+02:00

Commit Message:
SCUMM HE: Compensate timers for pauses, fixes bug #6352

Changed paths:
    engines/scumm/he/intern_he.h
    engines/scumm/scumm.cpp



diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index c6abac3..72c3e38 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -56,9 +56,11 @@ public:
 	Common::Rect _actorClipOverride;	// HE specific
 
 	int _heTimers[16];
+	uint32 _pauseStartTime;
 
 	int getHETimer(int timer);
 	void setHETimer(int timer);
+	void pauseHETimers(bool pause);
 
 public:
 	ScummEngine_v60he(OSystem *syst, const DetectorResult &dr);
@@ -94,6 +96,7 @@ protected:
 	Common::WriteStream *openSaveFileForAppending(const byte *fileName);
 	void deleteSaveFile(const byte *fileName);
 	void renameSaveFile(const byte *from, const byte *to);
+	void pauseEngineIntern(bool pause);
 
 	Common::SeekableReadStream *openSaveFileForReading(int slot, bool compat, Common::String &fileName);
 	Common::WriteStream *openSaveFileForWriting(int slot, bool compat, Common::String &fileName);
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 72c6909..1072284 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2589,6 +2589,30 @@ void ScummEngine_v60he::setHETimer(int timer) {
 	_heTimers[timer] = _system->getMillis();
 }
 
+void ScummEngine_v60he::pauseHETimers(bool pause) {
+	// The HE timers rely on system time which of course doesn't pause when
+	// the engine does. By adding the elapsed time we compensate for this.
+	// Fixes bug #6352
+	if (pause) {
+		// Pauses can be layered, we only need the start of the first
+		if (!_pauseStartTime)
+			_pauseStartTime = _system->getMillis();
+	} else {
+		int elapsedTime = _system->getMillis() - _pauseStartTime;
+		for (int i = 0; i < ARRAYSIZE(_heTimers); i++) {
+			if (_heTimers[i] != 0)
+				_heTimers[i] += elapsedTime;
+		}
+		_pauseStartTime = 0;
+	}
+}
+
+void ScummEngine_v60he::pauseEngineIntern(bool pause) {
+	pauseHETimers(pause);
+
+	ScummEngine::pauseEngineIntern(pause);
+}
+
 void ScummEngine::pauseGame() {
 	pauseDialog();
 }


Commit: d4f9c0e361cb85d9674e44c6762722ac84be0d2d
    https://github.com/scummvm/scummvm/commit/d4f9c0e361cb85d9674e44c6762722ac84be0d2d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-02T23:38:39+02:00

Commit Message:
Merge pull request #821 from BenCastricum/bugfixes

SCUMM: Bugfixes

Changed paths:
    engines/scumm/he/intern_he.h
    engines/scumm/object.cpp
    engines/scumm/script_v6.cpp
    engines/scumm/scumm.cpp








More information about the Scummvm-git-logs mailing list