diff options
author | Paul Gilbert | 2017-08-30 20:05:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-30 20:05:47 -0400 |
commit | d1325e2d12ec2b7f9e12381f3e62e94897d5b57c (patch) | |
tree | 2e39584f0e5c6a863f94d54de691c15e530b7220 /engines/titanic | |
parent | 4557c31c547fabb527ac68977b77b02ef6fdc2a4 (diff) | |
download | scummvm-rg350-d1325e2d12ec2b7f9e12381f3e62e94897d5b57c.tar.gz scummvm-rg350-d1325e2d12ec2b7f9e12381f3e62e94897d5b57c.tar.bz2 scummvm-rg350-d1325e2d12ec2b7f9e12381f3e62e94897d5b57c.zip |
TITANIC: Formatting fixes for viewport refactoring
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/star_control/fpose.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_view.cpp | 1 | ||||
-rw-r--r-- | engines/titanic/star_control/star_view.h | 5 | ||||
-rw-r--r-- | engines/titanic/star_control/viewport.cpp | 22 | ||||
-rw-r--r-- | engines/titanic/star_control/viewport.h | 23 |
5 files changed, 26 insertions, 27 deletions
diff --git a/engines/titanic/star_control/fpose.cpp b/engines/titanic/star_control/fpose.cpp index e0c042a74d..bb508228fe 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 ef87fd2aab..6730d02391 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 2ce27c6b99..4cd6e2bef5 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 78206035f8..226bd5da6a 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 9ddb8ef255..ae10fb3c94 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 |