[Scummvm-git-logs] scummvm master -> 7ce499aab3b214eb7c83aad2c345338b1323832f
sev-
noreply at scummvm.org
Sun Feb 9 23:43:32 UTC 2025
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:
7ce499aab3 VIDEO: QTVR: More fixes for hotspot vector computations
Commit: 7ce499aab3b214eb7c83aad2c345338b1323832f
https://github.com/scummvm/scummvm/commit/7ce499aab3b214eb7c83aad2c345338b1323832f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-10T00:43:05+01:00
Commit Message:
VIDEO: QTVR: More fixes for hotspot vector computations
Changed paths:
video/qtvr_decoder.cpp
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 7de54693f58..ec0eaa4d6b4 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -475,7 +475,7 @@ int QuickTimeDecoder::PanoTrackHandler::lookupHotspot(int16 mx, int16 my) {
// Compute the side edge vector by interpolating between topRightVector and
// bottomRightVector based on the mouse Y position
- float yRatio = (float)(my - h / 2) / (float)h;
+ float yRatio = (float)my / (float)h;
mousePixelVector[0] = topRightVector[0] + yRatio * (bottomRightVector[0] - topRightVector[0]);
mousePixelVector[1] = topRightVector[1] + yRatio * (bottomRightVector[1] - topRightVector[1]);
mousePixelVector[2] = topRightVector[2] + yRatio * (bottomRightVector[2] - topRightVector[2]);
@@ -498,7 +498,7 @@ int QuickTimeDecoder::PanoTrackHandler::lookupHotspot(int16 mx, int16 my) {
// then compute projectedY = mousePixelVector[1] / xzVectorLen
int hotY = (int)((float)mousePixelVector[1] / (float)xzVectorLen * (float)_constructedPano->w);
- warning("x: %d y: %d (min: %f max: %f) m: [%f, %f, %f] vectorLen: %f", hotX, hotY, minTiltY, maxTiltY, mousePixelVector[0], mousePixelVector[1], mousePixelVector[2], xzVectorLen);
+ warning("x: %d y: %d (yRatio: %f) (min: %f max: %f) m: [%f, %f, %f] vectorLen: %f", hotX, hotY, yRatio, minTiltY, maxTiltY, mousePixelVector[0], mousePixelVector[1], mousePixelVector[2], xzVectorLen);
return hotspot;
}
More information about the Scummvm-git-logs
mailing list