[Scummvm-git-logs] scummvm master -> 668bee336ce3fdb79082109bb3fa779531dc8be3

sev- noreply at scummvm.org
Sun Feb 23 23:27:52 UTC 2025


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:
f56e232b75 VIDEO: QTVR: Reset clicked hotspot before click processing
a960464cd9 VIDEO: QTVR: Properly process Zoom 0
668bee336c VIDEO: QTVR: Added hotspot-related debug output


Commit: f56e232b757e6501fe17cdc3ffb20b0185290775
    https://github.com/scummvm/scummvm/commit/f56e232b757e6501fe17cdc3ffb20b0185290775
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-24T00:27:37+01:00

Commit Message:
VIDEO: QTVR: Reset clicked hotspot before click processing

This ensures we do not have "sticky" hotspots

Changed paths:
    video/qtvr_decoder.cpp


diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index f5ff32b0921..4161baa05fd 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -1125,8 +1125,7 @@ void QuickTimeDecoder::handlePanoMouseButton(bool isDown, int16 x, int16 y, bool
 		_mouseDrag.x = x;
 		_mouseDrag.y = y;
 
-		if (_rolloverHotspot)
-			_clickedHotspot = _rolloverHotspot;
+		_clickedHotspot = _rolloverHotspot;
 	}
 
 	if (!repeat && !isDown && _rolloverHotspot && _rolloverHotspot->type == MKTAG('l','i','n','k') && _prevMouse == _mouseDrag) {


Commit: a960464cd91013a9164ae34d8493803a08c57728
    https://github.com/scummvm/scummvm/commit/a960464cd91013a9164ae34d8493803a08c57728
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-24T00:27:37+01:00

Commit Message:
VIDEO: QTVR: Properly process Zoom 0

That is default, or "no change"

Changed paths:
    video/qtvr_decoder.cpp


diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 4161baa05fd..1844c117f11 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -333,6 +333,9 @@ bool QuickTimeDecoder::setFOV(float fov) {
 	PanoSampleDesc *desc = (PanoSampleDesc *)_panoTrack->sampleDescs[0];
 	bool success = true;
 
+	if (fov == 0.0f) // No change
+		return true;
+
 	if (fov <= desc->_minimumZoom) {
 		fov = desc->_minimumZoom;
 		success = false;


Commit: 668bee336ce3fdb79082109bb3fa779531dc8be3
    https://github.com/scummvm/scummvm/commit/668bee336ce3fdb79082109bb3fa779531dc8be3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-24T00:27:37+01:00

Commit Message:
VIDEO: QTVR: Added hotspot-related debug output

Changed paths:
    video/qtvr_decoder.cpp


diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 1844c117f11..5519f27aee2 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -963,10 +963,14 @@ void QuickTimeDecoder::lookupHotspot(int16 x, int16 y) {
 	} else {
 		int hotspotId = (int)(((PanoTrackHandler *)getTrack(_panoTrack->targetTrack))->_constructedHotspots->getPixel(hotspotPoint.y, hotspotPoint.x));
 
-
 		if (hotspotId && _currentSample != -1) {
 			if (!_rolloverHotspot || _rolloverHotspot->id != hotspotId)
 				_rolloverHotspot = _panoTrack->panoSamples[_currentSample].hotSpotTable.get(hotspotId);
+
+			if (!_rolloverHotspot)
+				debugC(1, kDebugLevelGVideo, "Hotspot id: %d has no data", hotspotId);
+			else
+				debugC(1, kDebugLevelGVideo, "Hotspot id: %d is of type '%s'", hotspotId, tag2str(_rolloverHotspot->type));
 		} else {
 			_rolloverHotspot = nullptr;
 		}
@@ -1131,15 +1135,19 @@ void QuickTimeDecoder::handlePanoMouseButton(bool isDown, int16 x, int16 y, bool
 		_clickedHotspot = _rolloverHotspot;
 	}
 
-	if (!repeat && !isDown && _rolloverHotspot && _rolloverHotspot->type == MKTAG('l','i','n','k') && _prevMouse == _mouseDrag) {
-		PanoLink *link = _panoTrack->panoSamples[_currentSample].linkTable.get(_rolloverHotspot->typeData);
+	if (!repeat && !isDown && _rolloverHotspot && _prevMouse == _mouseDrag) {
+		if (_rolloverHotspot->type == MKTAG('l','i','n','k')) {
+			PanoLink *link = _panoTrack->panoSamples[_currentSample].linkTable.get(_rolloverHotspot->typeData);
 
-		if (link) {
-			goToNode(link->toNodeID);
+			if (link) {
+				goToNode(link->toNodeID);
 
-			setPanAngle(link->toHPan);
-			setTiltAngle(link->toVPan);
-			setFOV(link->toZoom);
+				setPanAngle(link->toHPan);
+				setTiltAngle(link->toVPan);
+				setFOV(link->toZoom);
+			}
+		} else if (_rolloverHotspot->type == MKTAG('n','a','v','g')) {
+			warning("navg hotpot id #%d not processed", _rolloverHotspot->id);
 		}
 	}
 




More information about the Scummvm-git-logs mailing list