[Scummvm-git-logs] scummvm master -> 0774501c8d0929904d695a561acc3e2c61bdc1c4

dreammaster dreammaster at scummvm.org
Sun Apr 16 22:00:14 CEST 2017


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:
0774501c8d TITANIC: Renaming for viewport position poses and access methods


Commit: 0774501c8d0929904d695a561acc3e2c61bdc1c4
    https://github.com/scummvm/scummvm/commit/0774501c8d0929904d695a561acc3e2c61bdc1c4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-16T16:00:03-04:00

Commit Message:
TITANIC: Renaming for viewport position poses and access methods

Changed paths:
    engines/titanic/star_control/star_camera.cpp
    engines/titanic/star_control/star_camera.h
    engines/titanic/star_control/viewport.cpp
    engines/titanic/star_control/viewport.h


diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index de1ba6c..c48af06 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -180,11 +180,11 @@ void CStarCamera::proc22(FMatrix &m) {
 }
 
 FPose CStarCamera::getPose() {
-	return _viewport.getSub1();
+	return _viewport.getPose();
 }
 
-FPose CStarCamera::getPose2() {
-	return _viewport.getSub2();
+FPose CStarCamera::getRawPose() {
+	return _viewport.getRawPose();
 }
 
 double CStarCamera::getThreshold() const {
diff --git a/engines/titanic/star_control/star_camera.h b/engines/titanic/star_control/star_camera.h
index c759330..263fb25 100644
--- a/engines/titanic/star_control/star_camera.h
+++ b/engines/titanic/star_control/star_camera.h
@@ -101,7 +101,7 @@ public:
 	 */
 	virtual FPose getPose();
 
-	virtual FPose getPose2();
+	virtual FPose getRawPose();
 	virtual double getThreshold() const;
 
 	virtual double proc26() const;
diff --git a/engines/titanic/star_control/viewport.cpp b/engines/titanic/star_control/viewport.cpp
index e759a05..adb9eb1 100644
--- a/engines/titanic/star_control/viewport.cpp
+++ b/engines/titanic/star_control/viewport.cpp
@@ -39,7 +39,7 @@ CViewport::CViewport() {
 }
 
 CViewport::CViewport(CViewport *src) :
-		_matrix(src->_matrix), _sub1(src->_sub1), _sub2(src->_sub2) {
+		_matrix(src->_matrix), _currentPose(src->_currentPose), _rawPose(src->_rawPose) {
 	_position = src->_position;
 	_fieldC = src->_fieldC;
 	_field10 = src->_field10;
@@ -185,22 +185,22 @@ void CViewport::fn15(const FMatrix &matrix) {
 	_flag = false;
 }
 
-FPose CViewport::getSub1() {
+FPose CViewport::getPose() {
 	if (!_flag)
 		reset();
 
-	return _sub1;
+	return _currentPose;
 }
 
-FPose CViewport::getSub2() {
+FPose CViewport::getRawPose() {
 	if (!_flag)
 		reset();
 
-	return _sub2;
+	return _rawPose;
 }
 
 FVector CViewport::fn16(int index, const FVector &src) {
-	FPose temp = getSub1();
+	FPose temp = getPose();
 
 	FVector dest;
 	dest._x = temp._row3._x * src._z + temp._row2._x * src._y
@@ -214,7 +214,7 @@ FVector CViewport::fn16(int index, const FVector &src) {
 
 FVector CViewport::fn17(int index, const FVector &src) {
 	FVector dest;
-	FPose pose = getSub1();
+	FPose pose = getPose();
 	FVector tv = src.fn5(pose);
 
 	dest._x = (_valArray[index] + tv._x)
@@ -226,7 +226,7 @@ FVector CViewport::fn17(int index, const FVector &src) {
 
 FVector CViewport::fn18(int index, const FVector &src) {
 	FVector dest;
-	FPose pose = getSub2();
+	FPose pose = getRawPose();
 	FVector tv = src.fn5(pose);
 
 	dest._x = (_valArray[index] + tv._x)
@@ -246,9 +246,9 @@ void CViewport::fn19(double *v1, double *v2, double *v3, double *v4) {
 void CViewport::reset() {
 	const double FACTOR = 2 * M_PI / 360.0;
 
-	_sub2.copyFrom(_matrix);
-	_sub2._vector = _position;
-	_sub1 = _sub2.fn4();
+	_rawPose.copyFrom(_matrix);
+	_rawPose._vector = _position;
+	_currentPose = _rawPose.fn4();
 
 	_center = FPoint((double)_width * 0.5, (double)_height * 0.5);
 	_centerVector._x = MIN(_center._x, _center._y);
diff --git a/engines/titanic/star_control/viewport.h b/engines/titanic/star_control/viewport.h
index d984771..0dd3738 100644
--- a/engines/titanic/star_control/viewport.h
+++ b/engines/titanic/star_control/viewport.h
@@ -42,8 +42,8 @@ private:
 	int _width;
 	int _height;
 	FMatrix _matrix;
-	FPose _sub1;
-	FPose _sub2;
+	FPose _currentPose;
+	FPose _rawPose;
 	FPoint _center;
 	bool _flag;
 private:
@@ -94,8 +94,8 @@ public:
 	void fn13(StarMode mode, double val);
 	void reposition(double factor);
 	void fn15(const FMatrix &matrix);
-	FPose getSub1();
-	FPose getSub2();
+	FPose getPose();
+	FPose getRawPose();
 	FVector fn16(int index, const FVector &src);
 	FVector fn17(int index, const FVector &src);
 	FVector fn18(int index, const FVector &src);





More information about the Scummvm-git-logs mailing list