mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
TITANIC: Formatting fixes for viewport refactoring
This commit is contained in:
parent
4557c31c54
commit
d1325e2d12
@ -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() {
|
||||
|
@ -518,5 +518,4 @@ void CStarView::resizeSurface(CScreenManager *scrManager, int width, int height,
|
||||
*surface = newSurface;
|
||||
}
|
||||
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
} // End of namespace Titanic
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user