aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-04-16 18:16:08 -0400
committerPaul Gilbert2017-04-16 18:16:08 -0400
commit3877a0642b5fa5a9471dda2c9eb25a575fdfc3ae (patch)
treeffc8736b1630636bc6b3b5e74ff657642b81cdd3 /engines/titanic
parent4fae7c8e78ad85547ed0b573e59a00774889e286 (diff)
downloadscummvm-rg350-3877a0642b5fa5a9471dda2c9eb25a575fdfc3ae.tar.gz
scummvm-rg350-3877a0642b5fa5a9471dda2c9eb25a575fdfc3ae.tar.bz2
scummvm-rg350-3877a0642b5fa5a9471dda2c9eb25a575fdfc3ae.zip
TITANIC: Renamings for mover position updates
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/star_control/camera_mover.cpp8
-rw-r--r--engines/titanic/star_control/camera_mover.h7
-rw-r--r--engines/titanic/star_control/star_camera.cpp2
-rw-r--r--engines/titanic/star_control/star_control_sub21.cpp10
-rw-r--r--engines/titanic/star_control/star_control_sub21.h6
-rw-r--r--engines/titanic/star_control/star_control_sub22.cpp10
-rw-r--r--engines/titanic/star_control/star_control_sub22.h6
7 files changed, 31 insertions, 18 deletions
diff --git a/engines/titanic/star_control/camera_mover.cpp b/engines/titanic/star_control/camera_mover.cpp
index 198e21ae2d..ab99a2fdf9 100644
--- a/engines/titanic/star_control/camera_mover.cpp
+++ b/engines/titanic/star_control/camera_mover.cpp
@@ -90,11 +90,11 @@ void CCameraMover::proc7() {
}
}
-void CCameraMover::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
+void CCameraMover::updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) {
if (_size > 0.0) {
- v._x += m._row3._x * _size;
- v._y += m._row3._y * _size;
- v._z += m._row3._z * _size;
+ pos._x += orientation._row3._x * _size;
+ pos._y += orientation._row3._y * _size;
+ pos._z += orientation._row3._z * _size;
errorCode.set();
}
diff --git a/engines/titanic/star_control/camera_mover.h b/engines/titanic/star_control/camera_mover.h
index bd1f6b1d83..6577801d34 100644
--- a/engines/titanic/star_control/camera_mover.h
+++ b/engines/titanic/star_control/camera_mover.h
@@ -63,7 +63,12 @@ public:
virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {}
virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {}
- virtual void proc11(CErrorCode &errorCode, FVector &v, FMatrix &m);
+
+ /**
+ * Update the passed position and orientation matrix
+ */
+ virtual void updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation);
+
virtual void setVector(CStarVector *sv);
/**
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index 5f69ebe664..ede73b349e 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -134,7 +134,7 @@ void CStarCamera::updatePosition(CErrorCode *errorCode) {
FVector priorPos = _viewport._position;
FVector newPos = _viewport._position;
- _mover->proc11(*errorCode, newPos, *_newOrientation);
+ _mover->updatePosition(*errorCode, newPos, *_newOrientation);
if (newPos != priorPos) {
_viewport.setPosition(newPos);
diff --git a/engines/titanic/star_control/star_control_sub21.cpp b/engines/titanic/star_control/star_control_sub21.cpp
index 89ea3a1d13..ef6e8beada 100644
--- a/engines/titanic/star_control/star_control_sub21.cpp
+++ b/engines/titanic/star_control/star_control_sub21.cpp
@@ -55,10 +55,10 @@ void CStarControlSub21::proc10(const FVector &v1, const FVector &v2, const FVect
incLockCount();
}
-void CStarControlSub21::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
+void CStarControlSub21::updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) {
if (_sub24.isActive()) {
decLockCount();
- int val = _sub24.proc5(errorCode, v, m);
+ int val = _sub24.proc5(errorCode, pos, orientation);
if (val == 1)
incLockCount();
if (val == 2) {
@@ -67,9 +67,9 @@ void CStarControlSub21::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
_starVector->apply();
}
} else if (_size != 0.0) {
- v._x += m._row3._x * _size;
- v._y += m._row3._y * _size;
- v._z += m._row3._z * _size;
+ pos._x += orientation._row3._x * _size;
+ pos._y += orientation._row3._y * _size;
+ pos._z += orientation._row3._z * _size;
errorCode.set();
}
}
diff --git a/engines/titanic/star_control/star_control_sub21.h b/engines/titanic/star_control/star_control_sub21.h
index 4ebf823fd3..bf1b050756 100644
--- a/engines/titanic/star_control/star_control_sub21.h
+++ b/engines/titanic/star_control/star_control_sub21.h
@@ -37,7 +37,11 @@ public:
virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM);
virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m);
- virtual void proc11(CErrorCode &errorCode, FVector &v, FMatrix &m);
+
+ /**
+ * Update the passed position and orientation matrix
+ */
+ virtual void updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation);
};
} // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub22.cpp b/engines/titanic/star_control/star_control_sub22.cpp
index 8c3c7fa2ab..3e88a32f25 100644
--- a/engines/titanic/star_control/star_control_sub22.cpp
+++ b/engines/titanic/star_control/star_control_sub22.cpp
@@ -37,10 +37,10 @@ void CStarControlSub22::proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
incLockCount();
}
-void CStarControlSub22::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
+void CStarControlSub22::updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) {
if (_sub27.isActive()) {
decLockCount();
- int val = _sub27.proc5(errorCode, v, m);
+ int val = _sub27.proc5(errorCode, pos, orientation);
if (val == 1)
incLockCount();
if (val == 2) {
@@ -49,9 +49,9 @@ void CStarControlSub22::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
_starVector->apply();
}
} else if (_size != 0.0) {
- v._x += m._row3._x * _size;
- v._y += m._row3._y * _size;
- v._z += m._row3._z * _size;
+ pos._x += orientation._row3._x * _size;
+ pos._y += orientation._row3._y * _size;
+ pos._z += orientation._row3._z * _size;
errorCode.set();
}
}
diff --git a/engines/titanic/star_control/star_control_sub22.h b/engines/titanic/star_control/star_control_sub22.h
index 5a597ef50e..dbb644bc01 100644
--- a/engines/titanic/star_control/star_control_sub22.h
+++ b/engines/titanic/star_control/star_control_sub22.h
@@ -36,7 +36,11 @@ public:
virtual ~CStarControlSub22() {}
virtual void proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2);
- virtual void proc11(CErrorCode &errorCode, FVector &v, FMatrix &m);
+
+ /**
+ * Update the passed position and orientation matrix
+ */
+ virtual void updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation);
};
} // End of namespace Titanic