[Scummvm-git-logs] scummvm master -> 0624a9d5aa39fb62fb38c7147bb3bcbaa8cb170d

dreammaster dreammaster at scummvm.org
Mon Apr 10 03:56:32 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:
0624a9d5aa TITANIC: Renaming of CStarCamera methods


Commit: 0624a9d5aa39fb62fb38c7147bb3bcbaa8cb170d
    https://github.com/scummvm/scummvm/commit/0624a9d5aa39fb62fb38c7147bb3bcbaa8cb170d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-09T21:56:22-04:00

Commit Message:
TITANIC: Renaming of CStarCamera methods

Changed paths:
    engines/titanic/star_control/base_stars.cpp
    engines/titanic/star_control/star_camera.cpp
    engines/titanic/star_control/star_camera.h
    engines/titanic/star_control/star_closeup.cpp
    engines/titanic/star_control/star_control_sub7.cpp
    engines/titanic/star_control/star_field.cpp
    engines/titanic/star_control/star_points1.cpp
    engines/titanic/star_control/star_points2.cpp
    engines/titanic/star_control/star_ref.cpp


diff --git a/engines/titanic/star_control/base_stars.cpp b/engines/titanic/star_control/base_stars.cpp
index 1da535e..d1ead70 100644
--- a/engines/titanic/star_control/base_stars.cpp
+++ b/engines/titanic/star_control/base_stars.cpp
@@ -159,12 +159,12 @@ void CBaseStars::draw(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClose
 }
 
 void CBaseStars::draw1(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarCloseup *closeup) {
-	FPose pose = camera->proc23();
+	FPose pose = camera->getPose();
 	camera->proc36(&_value1, &_value2, &_value3, &_value4);
 
 	const double MAX_VAL = 1.0e9 * 1.0e9;
 	FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
-	double threshold = camera->proc25();
+	double threshold = camera->getThreshold();
 	double minVal = threshold - 9216.0;
 	int width1 = surfaceArea->_width - 1;
 	int height1 = surfaceArea->_height - 1;
@@ -244,12 +244,12 @@ void CBaseStars::draw1(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
 }
 
 void CBaseStars::draw2(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarCloseup *closeup) {
-	FPose pose = camera->proc23();
+	FPose pose = camera->getPose();
 	camera->proc36(&_value1, &_value2, &_value3, &_value4);
 
 	const double MAX_VAL = 1.0e9 * 1.0e9;
 	FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
-	double threshold = camera->proc25();
+	double threshold = camera->getThreshold();
 	double minVal = threshold - 9216.0;
 	int width1 = surfaceArea->_width - 1;
 	int height1 = surfaceArea->_height - 1;
@@ -330,12 +330,12 @@ void CBaseStars::draw2(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
 }
 
 void CBaseStars::draw3(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarCloseup *closeup) {
-	FPose pose = camera->proc23();
+	FPose pose = camera->getPose();
 	camera->proc36(&_value1, &_value2, &_value3, &_value4);
 
 	const double MAX_VAL = 1.0e9 * 1.0e9;
 	FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
-	double threshold = camera->proc25();
+	double threshold = camera->getThreshold();
 	double minVal = threshold - 9216.0;
 	int width1 = surfaceArea->_width - 1;
 	int height1 = surfaceArea->_height - 1;
@@ -437,12 +437,12 @@ void CBaseStars::draw3(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
 }
 
 void CBaseStars::draw4(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarCloseup *closeup) {
-	FPose pose = camera->proc23();
+	FPose pose = camera->getPose();
 	camera->proc36(&_value1, &_value2, &_value3, &_value4);
 
 	const double MAX_VAL = 1.0e9 * 1.0e9;
 	FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
-	double threshold = camera->proc25();
+	double threshold = camera->getThreshold();
 	double minVal = threshold - 9216.0;
 	int width1 = surfaceArea->_width - 1;
 	int height1 = surfaceArea->_height - 1;
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index 2ccf2e3..fc5035e 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -179,15 +179,15 @@ void CStarCamera::proc22(FMatrix &m) {
 		_sub13.fn15(m);
 }
 
-FPose CStarCamera::proc23() {
+FPose CStarCamera::getPose() {
 	return _sub13.getSub1();
 }
 
-FPose CStarCamera::proc24() {
+FPose CStarCamera::getPose2() {
 	return _sub13.getSub2();
 }
 
-double CStarCamera::proc25() const {
+double CStarCamera::getThreshold() const {
 	return _sub13._field10;
 }
 
diff --git a/engines/titanic/star_control/star_camera.h b/engines/titanic/star_control/star_camera.h
index ecc185c..6a0cd2c 100644
--- a/engines/titanic/star_control/star_camera.h
+++ b/engines/titanic/star_control/star_camera.h
@@ -87,9 +87,15 @@ public:
 	virtual void proc20(double factor);
 	virtual void proc21(const FPose &pose);
 	virtual void proc22(FMatrix &m);
-	virtual FPose proc23();
-	virtual FPose proc24();
-	virtual double proc25() const;
+
+	/**
+	 * Get the position and direction of the camera
+	 */
+	virtual FPose getPose();
+
+	virtual FPose getPose2();
+	virtual double getThreshold() const;
+
 	virtual double proc26() const;
 	virtual int proc27() const;
 	virtual FVector proc28(int index, const FVector &src);
diff --git a/engines/titanic/star_control/star_closeup.cpp b/engines/titanic/star_control/star_closeup.cpp
index c74a916..f8adb32 100644
--- a/engines/titanic/star_control/star_closeup.cpp
+++ b/engines/titanic/star_control/star_closeup.cpp
@@ -192,7 +192,7 @@ bool CStarCloseup::setup2(int val1, int val2) {
 void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector &vector2,
 		CSurfaceArea *surfaceArea, CStarCamera *camera) {
 	const int VALUES[] = { 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4 };
-	double val1 = camera->proc25();
+	double val1 = camera->getThreshold();
 	int val2 = camera->proc27();
 	if (!_flag)
 		return;
diff --git a/engines/titanic/star_control/star_control_sub7.cpp b/engines/titanic/star_control/star_control_sub7.cpp
index 8671586..c5e267e 100644
--- a/engines/titanic/star_control/star_control_sub7.cpp
+++ b/engines/titanic/star_control/star_control_sub7.cpp
@@ -29,8 +29,8 @@ void CStarControlSub7::draw(CSurfaceArea *surfaceArea, CStarCamera *camera, CSta
 	if (_data.empty())
 		return;
 
-	FPose pose = camera->proc23();
-	double threshold = camera->proc25();
+	FPose pose = camera->getPose();
+	double threshold = camera->getThreshold();
 	FPoint center((double)surfaceArea->_width * 0.5,
 		surfaceArea->_height * 0.5);
 	FVector newV;
diff --git a/engines/titanic/star_control/star_field.cpp b/engines/titanic/star_control/star_field.cpp
index 52629eb..ea65495 100644
--- a/engines/titanic/star_control/star_field.cpp
+++ b/engines/titanic/star_control/star_field.cpp
@@ -190,7 +190,7 @@ double CStarField::fn5(CSurfaceArea *surfaceArea, CStarCamera *camera,
 	v2 = dataP->_position;
 	FVector tv = camera->proc29(2, v2);
 
-	if (camera->proc25() >= tv._z)
+	if (camera->getThreshold() >= tv._z)
 		return -1.0;
 
 	tv = camera->proc28(2, tv);
diff --git a/engines/titanic/star_control/star_points1.cpp b/engines/titanic/star_control/star_points1.cpp
index 7e3a79b..1923711 100644
--- a/engines/titanic/star_control/star_points1.cpp
+++ b/engines/titanic/star_control/star_points1.cpp
@@ -61,8 +61,8 @@ void CStarPoints1::draw(CSurfaceArea *surface, CStarCamera *camera) {
 	if (_data.empty())
 		return;
 
-	FPose pose = camera->proc23();
-	double threshold = camera->proc25();
+	FPose pose = camera->getPose();
+	double threshold = camera->getThreshold();
 	FVector vector1, vector2, vector3, vector4;
 	FVector vTemp = _data[0];
 	double vWidth2 = (double)surface->_width * 0.5;
diff --git a/engines/titanic/star_control/star_points2.cpp b/engines/titanic/star_control/star_points2.cpp
index 9adbd1c..9097ffd 100644
--- a/engines/titanic/star_control/star_points2.cpp
+++ b/engines/titanic/star_control/star_points2.cpp
@@ -66,8 +66,8 @@ void CStarPoints2::draw(CSurfaceArea *surface, CStarCamera *camera) {
 	if (_data.empty())
 		return;
 
-	FPose pose = camera->proc23();
-	double threshold = camera->proc25();
+	FPose pose = camera->getPose();
+	double threshold = camera->getThreshold();
 	FVector vector1, vector2, vector3, vector4;
 	double vWidth2 = (double)surface->_width * 0.5;
 	double vHeight2 = (double)surface->_height * 0.5;
diff --git a/engines/titanic/star_control/star_ref.cpp b/engines/titanic/star_control/star_ref.cpp
index bdafd40..185c953 100644
--- a/engines/titanic/star_control/star_ref.cpp
+++ b/engines/titanic/star_control/star_ref.cpp
@@ -29,8 +29,8 @@ void CBaseStarRef::process(CSurfaceArea *surface, CStarCamera *camera) {
 		return;
 
 	const double MAX_VAL = 1.0e9 * 1.0e9;
-	FPose pose = camera->proc23();
-	double threshold = camera->proc25();
+	FPose pose = camera->getPose();
+	double threshold = camera->getThreshold();
 	double vWidth2 = (double)surface->_width * 0.5;
 	double vHeight2 = (double)surface->_height * 0.5;
 	FVector vTemp, vector1, vector2;





More information about the Scummvm-git-logs mailing list