mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-16 09:19:30 +00:00
TITANIC: Correct usage of x/y angle in setViewportPosition
This commit is contained in:
parent
903cffca28
commit
4378dd37b7
@ -225,15 +225,15 @@ void CStarControlSub12::setViewportPosition(const FPoint &angles) {
|
||||
return;
|
||||
|
||||
if (_matrixRow == -1) {
|
||||
CStarControlSub6 subX(X_AXIS, angles._x);
|
||||
CStarControlSub6 subY(Y_AXIS, angles._y);
|
||||
CStarControlSub6 subX(X_AXIS, angles._y);
|
||||
CStarControlSub6 subY(Y_AXIS, angles._x);
|
||||
CStarControlSub6 sub(&subX, &subY);
|
||||
subY.copyFrom(&sub);
|
||||
proc22(subY);
|
||||
} else if (_matrixRow == 0) {
|
||||
FVector row1 = _matrix._row1;
|
||||
CStarControlSub6 subX(X_AXIS, angles._x);
|
||||
CStarControlSub6 subY(Y_AXIS, angles._y);
|
||||
CStarControlSub6 subX(X_AXIS, angles._y);
|
||||
CStarControlSub6 subY(Y_AXIS, angles._x);
|
||||
CStarControlSub6 sub(&subX, &subY);
|
||||
subX.copyFrom(&sub);
|
||||
|
||||
@ -323,7 +323,7 @@ void CStarControlSub12::setViewportPosition(const FPoint &angles) {
|
||||
DVector tempV13, tempV14, tempV15, tempV16;
|
||||
|
||||
DMatrix subX(0, _matrix._row1);
|
||||
DMatrix subY(Y_AXIS, angles._x);
|
||||
DMatrix subY(Y_AXIS, angles._y);
|
||||
|
||||
tempV1 = _matrix._row2 - _matrix._row1;
|
||||
diffV = tempV1;
|
||||
|
@ -133,9 +133,9 @@ bool CStarView::MouseMoveMsg(int unused, const Point &pt) {
|
||||
if (distance >= threshold) {
|
||||
distance -= threshold;
|
||||
|
||||
FPoint relPt(tempPt._x * -2.0 * distance / threshold,
|
||||
FPoint angle(tempPt._x * -2.0 * distance / threshold,
|
||||
tempPt._y * -2.0 * distance / threshold);
|
||||
_sub12.setViewportPosition(relPt);
|
||||
_sub12.setViewportPosition(angle);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user