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

mgerhardy martin.gerhardy at gmail.com
Mon Jul 12 20:58:05 UTC 2021


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:
7a172206d5 EVENTRECORDER: don't execute getMillis while resolving the random seed in playback mode
b44e025bbe TWINE: fixed logic error in Interface::drawFilledRect


Commit: 7a172206d533edb2876f23af2275f88fccd9accd
    https://github.com/scummvm/scummvm/commit/7a172206d533edb2876f23af2275f88fccd9accd
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-07-12T22:56:02+02:00

Commit Message:
EVENTRECORDER: don't execute getMillis while resolving the random seed in playback mode

Changed paths:
    common/recorderfile.cpp
    gui/EventRecorder.cpp


diff --git a/common/recorderfile.cpp b/common/recorderfile.cpp
index bb2e1116a1..e7f85ef344 100644
--- a/common/recorderfile.cpp
+++ b/common/recorderfile.cpp
@@ -259,7 +259,7 @@ bool PlaybackFile::processChunk(ChunkHeader &nextChunk) {
 		}
 		break;
 	default:
-			return false;
+		return false;
 	}
 	return true;
 }
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 2a0eef8dac..e0344ae14f 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -284,11 +284,12 @@ void EventRecorder::RegisterEventSource() {
 }
 
 uint32 EventRecorder::getRandomSeed(const Common::String &name) {
+	if (_recordMode == kRecorderPlayback) {
+		return _playbackFile->getHeader().randomSourceRecords[name];
+	}
 	uint32 result = g_system->getMillis();
 	if (_recordMode == kRecorderRecord) {
 		_playbackFile->getHeader().randomSourceRecords[name] = result;
-	} else if (_recordMode == kRecorderPlayback) {
-		result = _playbackFile->getHeader().randomSourceRecords[name];
 	}
 	return result;
 }


Commit: b44e025bbe5d167dde6213ad3dd0cddce529a812
    https://github.com/scummvm/scummvm/commit/b44e025bbe5d167dde6213ad3dd0cddce529a812
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-07-12T22:56:02+02:00

Commit Message:
TWINE: fixed logic error in Interface::drawFilledRect

Changed paths:
    engines/twine/menu/interface.cpp


diff --git a/engines/twine/menu/interface.cpp b/engines/twine/menu/interface.cpp
index c613d3076f..e20322689f 100644
--- a/engines/twine/menu/interface.cpp
+++ b/engines/twine/menu/interface.cpp
@@ -174,7 +174,7 @@ void Interface::drawTransparentBox(const Common::Rect &rect, int32 colorAdj) {
 }
 
 void Interface::drawFilledRect(const Common::Rect &rect, uint8 colorIndex) {
-	if (rect.isValidRect()) {
+	if (!rect.isValidRect()) {
 		return;
 	}
 	_engine->frontVideoBuffer.fillRect(Common::Rect(rect.left, rect.top, rect.right + 1, rect.bottom + 1), colorIndex);




More information about the Scummvm-git-logs mailing list