[Scummvm-git-logs] scummvm master -> d1325e2d12ec2b7f9e12381f3e62e94897d5b57c

dreammaster dreammaster at scummvm.org
Thu Aug 31 02:05:53 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:
d1325e2d12 TITANIC: Formatting fixes for viewport refactoring


Commit: d1325e2d12ec2b7f9e12381f3e62e94897d5b57c
    https://github.com/scummvm/scummvm/commit/d1325e2d12ec2b7f9e12381f3e62e94897d5b57c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-30T20:05:47-04:00

Commit Message:
TITANIC: Formatting fixes for viewport refactoring

Changed paths:
    engines/titanic/star_control/fpose.cpp
    engines/titanic/star_control/star_view.cpp
    engines/titanic/star_control/star_view.h
    engines/titanic/star_control/viewport.cpp
    engines/titanic/star_control/viewport.h


diff --git a/engines/titanic/star_control/fpose.cpp b/engines/titanic/star_control/fpose.cpp
index e0c042a..bb50822 100644
--- a/engines/titanic/star_control/fpose.cpp
+++ b/engines/titanic/star_control/fpose.cpp
@@ -56,7 +56,7 @@ FPose::FPose(const FPose &src) : FMatrix() {
 }
 
 FPose::FPose(const FPose &s1, const FPose &s2) {
-	fposeProd(s1,s2,*this);
+	fposeProd(s1, s2, *this);
 }
 
 void FPose::identity() {
diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp
index ef87fd2..6730d02 100644
--- a/engines/titanic/star_control/star_view.cpp
+++ b/engines/titanic/star_control/star_view.cpp
@@ -518,5 +518,4 @@ void CStarView::resizeSurface(CScreenManager *scrManager, int width, int height,
 		*surface = newSurface;
 }
 
-
 } // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_view.h b/engines/titanic/star_control/star_view.h
index 2ce27c6..4cd6e2b 100644
--- a/engines/titanic/star_control/star_view.h
+++ b/engines/titanic/star_control/star_view.h
@@ -164,15 +164,14 @@ public:
 	void setHasReference();
 	
 	/**
-	  * Handles locking in a star
-	  */
+	 * Handles locking in a star
+	 */
 	void lockStar();
 
 	/**
 	 * Handles unlocking a star
 	 */
 	void unlockStar();
-
 };
 
 } // End of namespace Titanic
diff --git a/engines/titanic/star_control/viewport.cpp b/engines/titanic/star_control/viewport.cpp
index 7820603..226bd5d 100644
--- a/engines/titanic/star_control/viewport.cpp
+++ b/engines/titanic/star_control/viewport.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "titanic/star_control/viewport.h"
+#include "titanic/star_control/fvector.h"
 #include "titanic/debugger.h"
 #include "titanic/support/simple_file.h"
 #include "titanic/titanic.h"
@@ -244,14 +245,11 @@ FVector CViewport::getRelativePosCentering(int index, const FVector &src) {
 	double val;
 	if (index <2) {
 		val = _valArray[index];
-	}
-	else if (index == 2) {
+	} else if (index == 2) {
 		val = _isZero;
-	}
-	else if (index == 3) {
+	} else if (index == 3) {
 		val = _pixel1OffSetX;
-	}
-	else {
+	} else {
 		val = _pixel2OffSetX;
 	}
 
@@ -262,7 +260,6 @@ FVector CViewport::getRelativePosCentering(int index, const FVector &src) {
 	return dest;
 }
 
-
 // TODO: Identical to getRelativePosCentering, was this meant to be different?
 FVector CViewport::getRelativePosCentering2(int index, const FVector &src) {
 	FVector dest;
@@ -272,14 +269,11 @@ FVector CViewport::getRelativePosCentering2(int index, const FVector &src) {
 	double val;
 	if (index <2) {
 		val = _valArray[index];
-	}
-	else if (index == 2) {
+	} else if (index == 2) {
 		val = _isZero;
-	}	
-	else if (index == 3) {
+	} else if (index == 3) {
 		val = _pixel1OffSetX;
-	}
-	else {
+	} else {
 		val = _pixel2OffSetX;
 	}
 
@@ -313,4 +307,4 @@ const FMatrix &CViewport::getOrientation() const {
 	return _orientation;
 }
 
-} // End of namespace Titanic
\ No newline at end of file
+} // End of namespace Titanic
diff --git a/engines/titanic/star_control/viewport.h b/engines/titanic/star_control/viewport.h
index 9ddb8ef..ae10fb3 100644
--- a/engines/titanic/star_control/viewport.h
+++ b/engines/titanic/star_control/viewport.h
@@ -30,9 +30,12 @@ class SimpleFile;
 
 namespace Titanic {
 
-enum StarColor {WHITE=0,PINK=2};	// The color of the stars when drawn (CBaseStars::draw)
-									// For starview it should be white
-									// For skyview it should be pink
+/**
+ * The color of the stars when drawn (CBaseStars::draw)
+ * For starview it should be white
+ * For skyview it should be pink
+ */
+enum StarColor { WHITE = 0, PINK = 2 };	
 
 /**
  * Implements the viewport functionality for viewing the star field in
@@ -57,11 +60,11 @@ public:
 	FVector _position;
 	double _field10;
 	double _field14;
-	StarColor _starColor; // Used in CBaseStars::draw
-	double _valArray[2]; // has value 0.0 or 30.0
+	StarColor _starColor;	// Used in CBaseStars::draw
+	double _valArray[2];	// has value 0.0 or 30.0
 	double _isZero;
-	double _pixel1OffSetX; // Used in CBaseStars::draw3 and CBaseStars::draw4 has value 0.0 or 28000.0
-	double _pixel2OffSetX; // Used in CBaseStars::draw3 and CBaseStars::draw4 has value 0.0 or -28000.0
+	double _pixel1OffSetX;	// Used in CBaseStars::draw3 and CBaseStars::draw4 has value 0.0 or 28000.0
+	double _pixel2OffSetX;	// Used in CBaseStars::draw3 and CBaseStars::draw4 has value 0.0 or -28000.0
 	FVector _centerVector;
 public:
 	CViewport();
@@ -103,6 +106,7 @@ public:
 	void setOrientation(const FVector &v);
 
 	void randomizeOrientation();
+
 	/**
 	 * The view has changed between starview and skyview
 	 * Change the enum that tracks the color of the stars
@@ -115,7 +119,8 @@ public:
 	 * Applys a rotation matrix to the current
 	 * orientation
 	 */	
-	void changeOrientation(const FMatrix &matrix);
+	void changeOrientation(const FMatrix &matrix);\
+
 	FPose getPose();
 	FPose getRawPose();
 	FVector getRelativePosNoCentering(int index, const FVector &src);
@@ -139,12 +144,14 @@ public:
 	void setC(double v);
 	void set10(double v);
 	void set14(double v);
+
 	/**
 	 * Sets the center vector y angle
 	 * The actual center y value doesn't
 	 * change untill reset is called 
 	 */		
 	void setCenterYAngle(double angleDegrees);
+
 	/**
 	 * Sets the center vector z angle
 	 * The actual center z value doesn't





More information about the Scummvm-git-logs mailing list