[Scummvm-git-logs] scummvm master -> 8054ef2c779a846a59695699ba5115d942b2bf6c

Die4Ever noreply at scummvm.org
Tue Jan 4 04:17:34 UTC 2022


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

Summary:
8054ef2c77 GROOVIE: ROQ fix overlay clearing for train and jewelry puzzles


Commit: 8054ef2c779a846a59695699ba5115d942b2bf6c
    https://github.com/scummvm/scummvm/commit/8054ef2c779a846a59695699ba5115d942b2bf6c
Author: Die4Ever (die4ever2005 at gmail.com)
Date: 2022-01-03T22:17:18-06:00

Commit Message:
GROOVIE: ROQ fix overlay clearing for train and jewelry puzzles

Changed paths:
    engines/groovie/video/roq.cpp
    engines/groovie/video/roq.h


diff --git a/engines/groovie/video/roq.cpp b/engines/groovie/video/roq.cpp
index 82237d424fd..5f1ef95b5af 100644
--- a/engines/groovie/video/roq.cpp
+++ b/engines/groovie/video/roq.cpp
@@ -150,6 +150,10 @@ uint16 ROQPlayer::loadInternal() {
 	_altMotionDecoder = ((_flags & (1 << 14)) != 0);
 	_flagMasked = ((_flags & (1 << 10)) != 0);
 
+	if (!_flagOverlay && _flagNoPlay) {
+		clearOverlay();
+	}
+
 	// Read the file header
 	ROQBlockHeader blockHeader;
 	if (!readBlockHeader(blockHeader)) {
@@ -197,6 +201,12 @@ uint16 ROQPlayer::loadInternal() {
 	}
 }
 
+void ROQPlayer::clearOverlay() {
+	debugC(1, kDebugVideo, "Groovie::ROQ: Clear overlay buffer");
+	if (_overBuf->w) {
+		_overBuf->fillRect(Common::Rect(0, 0, _overBuf->w, _overBuf->h), _overBuf->format.ARGBToColor(0, 0, 0, 0));
+	}
+}
 
 // Calculate the overlapping area for the rendered frame to the visible frame. The game can use an origin to
 // place the rendered image at different places.
@@ -378,11 +388,6 @@ bool ROQPlayer::playFrameInternal() {
 		_dirty = false;
 	}
 
-	if (_file->eos()) {
-		debugC(1, kDebugVideo, "Groovie::ROQ: Clear overlay buffer");
-		_overBuf->fillRect(Common::Rect(0, 0, _overBuf->w, _overBuf->h), _overBuf->format.ARGBToColor(0, 0, 0, 0));
-	}
-
 	// Report the end of the video if we reached the end of the file or if we
 	// just wanted to play one frame. Also reset origin for next video / image
 	if (_file->eos() || playFirstFrame()) {
diff --git a/engines/groovie/video/roq.h b/engines/groovie/video/roq.h
index 7ae6705fe6b..12e22da5077 100644
--- a/engines/groovie/video/roq.h
+++ b/engines/groovie/video/roq.h
@@ -71,6 +71,7 @@ private:
 	bool processBlockSoundStereo(ROQBlockHeader &blockHeader);
 	bool processBlockAudioContainer(ROQBlockHeader &blockHeader);
 	bool playFirstFrame() { return _flagNoPlay; }; // _alpha && !_flagOverlay; }
+	void clearOverlay();
 
 	void paint2(byte i, int destx, int desty);
 	void paint4(byte i, int destx, int desty);




More information about the Scummvm-git-logs mailing list