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

sev- noreply at scummvm.org
Mon Feb 17 22:59:57 UTC 2025


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:
ca239ea057 JANITORIAL: Remove obsolete TODO
aca60a8427 VIDEO: QTVR: Exposed hotspot name via API
3e0202855c VIDEO: QTVR: Expose hotspots via API
e42d41f0f8 DIRECTOR: XTRAS: Implement hotspot-related methods in QTVR Xtra


Commit: ca239ea057ded45e2a47d2153df2eb6b78c8ccd7
    https://github.com/scummvm/scummvm/commit/ca239ea057ded45e2a47d2153df2eb6b78c8ccd7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-17T23:59:45+01:00

Commit Message:
JANITORIAL: Remove obsolete TODO

Changed paths:
    engines/director/lingo/xtras/qtvrxtra.cpp


diff --git a/engines/director/lingo/xtras/qtvrxtra.cpp b/engines/director/lingo/xtras/qtvrxtra.cpp
index a34f68940d1..47f133c42a7 100644
--- a/engines/director/lingo/xtras/qtvrxtra.cpp
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -583,9 +583,6 @@ void QtvrxtraXtra::m_QTVRMouseOver(int nargs) {
 
 				if (me->_exitMouseOver)
 					break;
-
-				// TODO We need to redraw current frame because the handler could change
-				// some fields etc. FIXME
 			}
 		}
 


Commit: aca60a84278504b462d469742645a74ec1f6f141
    https://github.com/scummvm/scummvm/commit/aca60a84278504b462d469742645a74ec1f6f141
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-17T23:59:48+01:00

Commit Message:
VIDEO: QTVR: Exposed hotspot name via API

Changed paths:
    video/qt_decoder.h
    video/qtvr_decoder.cpp


diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index b1048f7537b..e798198c7b2 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -99,6 +99,7 @@ public:
 
 	const PanoHotSpot *getRolloverHotspot() { return _rolloverHotspot; }
 	const PanoHotSpot *getClickedHotspot() { return _clickedHotspot; }
+	Common::String getHotSpotName(int id);
 
 	void nudge(const Common::String &direction);
 
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 2faa7ad87a0..63a181a3afa 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -1039,6 +1039,15 @@ void QuickTimeDecoder::lookupHotspot(int16 x, int16 y) {
 	}
 }
 
+Common::String QuickTimeDecoder::getHotSpotName(int id) {
+	if (id <= 0)
+		return "";
+
+	PanoHotSpot *hotspot = _panoTrack->panoSamples[_currentSample].hotSpotTable.get(id);
+
+	return _panoTrack->panoSamples[_currentSample].strTable.getString(hotspot->nameStrOffset);
+}
+
 enum {
 	kCurHand = 129,
 	kCurGrab = 130,


Commit: 3e0202855c88f435b78fc4a6790446bbf98642be
    https://github.com/scummvm/scummvm/commit/3e0202855c88f435b78fc4a6790446bbf98642be
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-17T23:59:48+01:00

Commit Message:
VIDEO: QTVR: Expose hotspots via API

Changed paths:
    video/qt_decoder.h
    video/qtvr_decoder.cpp


diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index e798198c7b2..1cffc9638f3 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -100,6 +100,8 @@ public:
 	const PanoHotSpot *getRolloverHotspot() { return _rolloverHotspot; }
 	const PanoHotSpot *getClickedHotspot() { return _clickedHotspot; }
 	Common::String getHotSpotName(int id);
+	void setClickedHotSpot(int id);
+	const PanoHotSpot *getHotSpotByID(int id);
 
 	void nudge(const Common::String &direction);
 
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 63a181a3afa..228a0e8cba8 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -1048,6 +1048,14 @@ Common::String QuickTimeDecoder::getHotSpotName(int id) {
 	return _panoTrack->panoSamples[_currentSample].strTable.getString(hotspot->nameStrOffset);
 }
 
+const QuickTimeDecoder::PanoHotSpot *QuickTimeDecoder::getHotSpotByID(int id) {
+	return _panoTrack->panoSamples[_currentSample].hotSpotTable.get(id);
+}
+
+void QuickTimeDecoder::setClickedHotSpot(int id) {
+	_clickedHotspot = getHotSpotByID(id);
+}
+
 enum {
 	kCurHand = 129,
 	kCurGrab = 130,


Commit: e42d41f0f838cb07222c1ec4e05a08f99e4acfd1
    https://github.com/scummvm/scummvm/commit/e42d41f0f838cb07222c1ec4e05a08f99e4acfd1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-17T23:59:48+01:00

Commit Message:
DIRECTOR: XTRAS: Implement hotspot-related methods in QTVR Xtra

Changed paths:
    engines/director/lingo/xtras/qtvrxtra.cpp


diff --git a/engines/director/lingo/xtras/qtvrxtra.cpp b/engines/director/lingo/xtras/qtvrxtra.cpp
index 47f133c42a7..27faec2a01f 100644
--- a/engines/director/lingo/xtras/qtvrxtra.cpp
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -667,11 +667,63 @@ XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickLoc, 0)
 XOBJSTUB(QtvrxtraXtra::m_QTVRSetClickLoc, 0)
 XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickPanAngles, 0)
 XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickPanLoc, 0)
-XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotID, 0)
-XOBJSTUB(QtvrxtraXtra::m_QTVRSetHotSpotID, 0)
-XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotName, 0)
-XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotType, 0)
-XOBJSTUB(QtvrxtraXtra::m_QTVRGetHotSpotViewAngles, 0)
+
+void QtvrxtraXtra::m_QTVRGetHotSpotID(int nargs) {
+	ARGNUMCHECK(1);
+
+	QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+	me->_video->setClickedHotSpot(g_lingo->pop().asInt());
+}
+
+void QtvrxtraXtra::m_QTVRSetHotSpotID(int nargs) {
+	ARGNUMCHECK(1);
+
+	QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+	const Common::QuickTimeParser::PanoHotSpot *hotspot = me->_video->getClickedHotspot();
+
+	g_lingo->push(hotspot ? hotspot->id : 0);
+}
+
+void QtvrxtraXtra::m_QTVRGetHotSpotName(int nargs) {
+	ARGNUMCHECK(0);
+
+	QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+	const Common::QuickTimeParser::PanoHotSpot *hotspot = me->_video->getClickedHotspot();
+
+	if (!hotspot) {
+		g_lingo->push(Common::String(""));
+		return;
+	}
+
+	g_lingo->push(me->_video->getHotSpotName(hotspot->id));
+}
+
+void QtvrxtraXtra::m_QTVRGetHotSpotType(int nargs) {
+	ARGNUMCHECK(0);
+
+	QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+	const Common::QuickTimeParser::PanoHotSpot *hotspot = me->_video->getClickedHotspot();
+
+	g_lingo->push(hotspot ? Common::tag2string((uint32)hotspot->type) : "undf");
+}
+
+void QtvrxtraXtra::m_QTVRGetHotSpotViewAngles(int nargs) {
+	ARGNUMCHECK(0);
+
+	QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+	const Common::QuickTimeParser::PanoHotSpot *hotspot = me->_video->getClickedHotspot();
+
+	if (hotspot)
+		g_lingo->push(Common::String::format("%.4f,%.4f,%.4f", hotspot->viewHPan, hotspot->viewVPan, hotspot->viewZoom);
+	else
+		g_lingo->push(Common::String(""));
+}
+
 XOBJSTUB(QtvrxtraXtra::m_QTVRGetObjectViewAngles, 0)
 XOBJSTUB(QtvrxtraXtra::m_QTVRGetObjectZoomRect, 0)
 




More information about the Scummvm-git-logs mailing list