[Scummvm-git-logs] scummvm master -> 23cf759b01bec360c63fb05afd50cb2105c150d2
sev-
noreply at scummvm.org
Wed Feb 12 00:08:36 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:
23cf759b01 VIDEO: QTVR: Fix backwards hotspot X reverse projection and revert debug code
Commit: 23cf759b01bec360c63fb05afd50cb2105c150d2
https://github.com/scummvm/scummvm/commit/23cf759b01bec360c63fb05afd50cb2105c150d2
Author: elasota (1137273+elasota at users.noreply.github.com)
Date: 2025-02-12T01:08:30+01:00
Commit Message:
VIDEO: QTVR: Fix backwards hotspot X reverse projection and revert debug code
Changed paths:
video/qtvr_decoder.cpp
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 55013e62f8a..8dacd29a952 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -426,11 +426,9 @@ void QuickTimeDecoder::PanoTrackHandler::constructPanorama() {
warning("sceneNumFrames: %d x %d sceneColorDepth: %d", desc->_sceneNumFramesX, desc->_sceneNumFramesY, desc->_sceneColorDepth);
warning("targetTrackID: %d", _parent->targetTrack);
- VideoTrackHandler *track = (VideoTrackHandler *)(_decoder->getTrack(_decoder->Common::QuickTimeParser::_tracks[desc->_hotSpotTrackID - 1]->targetTrack));
- //VideoTrackHandler *track = (VideoTrackHandler *)(_decoder->getTrack(_decoder->Common::QuickTimeParser::_tracks[desc->_sceneTrackID - 1]->targetTrack));
+ VideoTrackHandler *track = (VideoTrackHandler *)(_decoder->getTrack(_decoder->Common::QuickTimeParser::_tracks[desc->_sceneTrackID - 1]->targetTrack));
- //_constructedPano = constructMosaic(track, desc->_sceneNumFramesX, desc->_sceneNumFramesY, "dumps/pano-full.png");
- _constructedPano = constructMosaic(track, desc->_hotSpotNumFramesX, desc->_hotSpotNumFramesY, "dumps/pano-hotspot.png");
+ _constructedPano = constructMosaic(track, desc->_sceneNumFramesX, desc->_sceneNumFramesY, "dumps/pano-full.png");
track = (VideoTrackHandler *)(_decoder->getTrack(_decoder->Common::QuickTimeParser::_tracks[desc->_hotSpotTrackID - 1]->targetTrack));
@@ -498,7 +496,7 @@ int QuickTimeDecoder::PanoTrackHandler::lookupHotspot(int16 mx, int16 my) {
float yawAngle = atan2(mousePixelVector[0], mousePixelVector[2]);
// panorama is turned 90 degrees, width is height
- int hotX = (yawAngle / (2.0 * M_PI) + _curPanAngle / 360.0f) * (float)_constructedHotspots->h;
+ int hotX = (1.0f - (yawAngle / (2.0 * M_PI) + _curPanAngle / 360.0f)) * (float)_constructedHotspots->h;
hotX = hotX % _constructedHotspots->h;
if (hotX < 0)
More information about the Scummvm-git-logs
mailing list