[Scummvm-git-logs] scummvm master -> 1f94d83a7f516bf8d7e6a7d97d77f8443ec94e1d
sev-
noreply at scummvm.org
Tue Feb 18 09:45:46 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:
d821c4c5a3 VIDEO: QTVR: Expose last mouse click
08410efb69 DIRECTOR: XTRAS: Implement GetClickLoc/SetClickLoc in QTVR Xtra
1f94d83a7f Revert "M4: Burger: Fix CID 1532973"
Commit: d821c4c5a3d304b86e556fad02cfbf516359fe35
https://github.com/scummvm/scummvm/commit/d821c4c5a3d304b86e556fad02cfbf516359fe35
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-18T10:39:24+01:00
Commit Message:
VIDEO: QTVR: Expose last mouse click
Changed paths:
video/qt_decoder.h
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index 1cffc9638f3..5c644f0ee0a 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -82,6 +82,8 @@ public:
void handleMouseButton(bool isDown, int16 x = -1, int16 y = -1, bool repeat = false);
void handleKey(Common::KeyState &state, bool down, bool repeat = false);
+ Common::Point getLastClick() { return _mouseDrag; }
+
float getPanAngle() const { return _panAngle; }
void setPanAngle(float panAngle);
float getTiltAngle() const { return _tiltAngle; }
Commit: 08410efb69d80adc87d977e4f804c780c0571419
https://github.com/scummvm/scummvm/commit/08410efb69d80adc87d977e4f804c780c0571419
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-18T10:42:17+01:00
Commit Message:
DIRECTOR: XTRAS: Implement GetClickLoc/SetClickLoc 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 4cf3b8f879e..7012db871c0 100644
--- a/engines/director/lingo/xtras/qtvrxtra.cpp
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -315,7 +315,7 @@ static Common::Rect stringToRect(const Common::String &rectStr) {
Common::StringArray tokens(tokenizer.split());
if (tokens.size() != 4) {
- error("stringToRect(): The string should contain exactly 4 numbers separated by commas!");
+ error("stringToRect(): The string should contain exactly 4 numbers separated by commas");
return {};
}
@@ -328,6 +328,22 @@ static Common::Rect stringToRect(const Common::String &rectStr) {
return rect;
}
+static Common::Point stringToPoint(const Common::String &pointStr) {
+ Common::StringTokenizer tokenizer(pointStr, Common::String(','));
+ Common::StringArray tokens(tokenizer.split());
+
+ if (tokens.size() != 2) {
+ error("stringToPoint(): The string should contain exactly 2 numbers separated by commas");
+ return {};
+ }
+
+ Common::Point point;
+ point.x = atoi(tokens[0].c_str());
+ point.y = atoi(tokens[1].c_str());
+
+ return point;
+}
+
void QtvrxtraXtra::m_QTVROpen(int nargs) {
g_lingo->printArgs("QtvrxtraXtra::m_QTVROpen", nargs);
ARGNUMCHECK(3);
@@ -663,8 +679,26 @@ void QtvrxtraXtra::m_QTVRSetFOV(int nargs) {
me->_video->setFOV(atof(g_lingo->pop().asString().c_str()));
}
-XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickLoc, 0)
-XOBJSTUB(QtvrxtraXtra::m_QTVRSetClickLoc, 0)
+void QtvrxtraXtra::m_QTVRGetClickLoc(int nargs) {
+ ARGNUMCHECK(0);
+
+ QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+ Common::Point pos = me->_video->getLastClick();
+
+ g_lingo->push(Common::String::format("%d,%d", pos.x, pos.y));
+}
+
+void QtvrxtraXtra::m_QTVRSetClickLoc(int nargs) {
+ ARGNUMCHECK(1);
+
+ QtvrxtraXtraObject *me = (QtvrxtraXtraObject *)g_lingo->_state->me.u.obj;
+
+ Common::Point pos = stringToPoint(g_lingo->pop().asString());
+
+ me->_video->handleMouseButton(true, pos.x, pos.y);
+}
+
XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickPanAngles, 0)
XOBJSTUB(QtvrxtraXtra::m_QTVRGetClickPanLoc, 0)
Commit: 1f94d83a7f516bf8d7e6a7d97d77f8443ec94e1d
https://github.com/scummvm/scummvm/commit/1f94d83a7f516bf8d7e6a7d97d77f8443ec94e1d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-18T10:44:34+01:00
Commit Message:
Revert "M4: Burger: Fix CID 1532973"
This reverts commit aa0976392469b4e053ad645e3d5d15b00b0d193e.
The commit now requires constructor (which was missing, so
compilation is broken). Adding a constructor in return introduces
global constructors and leads to incompatibilities with number of
other code places.
Changed paths:
engines/m4/burger/rooms/section3/mine.h
diff --git a/engines/m4/burger/rooms/section3/mine.h b/engines/m4/burger/rooms/section3/mine.h
index f446209e76e..0a9df9fdd8f 100644
--- a/engines/m4/burger/rooms/section3/mine.h
+++ b/engines/m4/burger/rooms/section3/mine.h
@@ -72,10 +72,10 @@ struct EntranceInfo {
};
struct Rectangle {
- int16 x1 = 0;
- int16 y1 = 0;
- int16 x2 = 0;
- int16 y2 = 0;
+ int16 x1;
+ int16 y1;
+ int16 x2;
+ int16 y2;
};
class Mine : public Section3Room {
More information about the Scummvm-git-logs
mailing list