TITANIC: Various whitespace fixes in star control classes

This commit is contained in:
Paul Gilbert 2017-09-09 18:46:10 -04:00
parent 04dabb0cd2
commit 00b4e509a0
5 changed files with 13 additions and 12 deletions

View File

@ -115,8 +115,8 @@ bool CNavHelmet::PETPhotoOnOffMsg(CPETPhotoOnOffMsg *msg) {
bool CNavHelmet::PETStarFieldLockMsg(CPETStarFieldLockMsg *msg) {
if (_helmetOn) {
CPetControl *pet = getPetControl();
CStarControl *starControl = 0;
bool isStarFieldMode=false;
CStarControl *starControl = nullptr;
bool isStarFieldMode = false;
if (pet)
starControl = pet->getStarControl();

View File

@ -32,7 +32,8 @@ namespace Titanic {
class CErrorCode;
class FMatrix;
const int nMoverTransitions = 32; // The number of vector transitions when doing a mover change is fixed
enum MoverState {NOT_ACTIVE=0,MOVING=1,DONE_MOVING=2};
enum MoverState { NOT_ACTIVE = 0, MOVING = 1, DONE_MOVING = 2 };
/**
* Base class for automatic movement of the starview camera
*/

View File

@ -223,7 +223,7 @@ FPose FPose::compose(const FMatrix &m) {
am._row2 = m._row2;
am._row3 = m._row3;
fposeProd(*this,am,dm);
fposeProd(*this, am, dm);
return dm;
}

View File

@ -117,14 +117,14 @@ FPose FVector::getFrameTransform(const FVector &v) {
FVector vector1 = getAnglesAsVect();
matrix1.setRotationMatrix(X_AXIS, vector1._y * Rad2Deg);
matrix2.setRotationMatrix(Y_AXIS, vector1._z * Rad2Deg);
fposeProd(matrix1,matrix2,matrix3);
fposeProd(matrix1, matrix2, matrix3);
matrix4 = matrix3.inverseTransform();
vector1 = v.getAnglesAsVect();
matrix1.setRotationMatrix(X_AXIS, vector1._y * Rad2Deg);
matrix2.setRotationMatrix(Y_AXIS, vector1._z * Rad2Deg);
fposeProd(matrix1,matrix2,matrix3);
fposeProd(matrix4,matrix3,matrix1);
fposeProd(matrix1, matrix2, matrix3);
fposeProd(matrix4, matrix3, matrix1);
return matrix1;
}
@ -135,7 +135,7 @@ FPose FVector::formRotXY() const {
m1.setRotationMatrix(X_AXIS, v1._y * Rad2Deg);
m2.setRotationMatrix(Y_AXIS, v1._z * Rad2Deg);
FPose m3;
fposeProd(m1,m2,m3);
fposeProd(m1, m2, m3);
return m3;
}

View File

@ -329,11 +329,11 @@ void CStarCamera::setViewportAngle(const FPoint &angles) {
diffV = tempV1;
m1 = diffV.formRotXY();
FPose m11;
fposeProd(m1,subX,m11);
fposeProd(m1, subX, m11);
subX = m11.inverseTransform();
FPose m12;
fposeProd(subX,subY,m12);
fposeProd(subX, subY, m12);
FMatrix m3 = _viewport.getOrientation();
tempV2 = _viewport._position;
@ -526,7 +526,7 @@ bool CStarCamera::lockMarker2(CViewport *viewport, const FVector &secondStarPosi
FVector starDelta = secondStarPosition - firstStarPosition;
FPose m10 = starDelta.formRotXY();
FPose m11;
fposeProd(m10,m3,m11);
fposeProd(m10, m3, m11);
m10 = m11.inverseTransform();
@ -573,7 +573,7 @@ bool CStarCamera::lockMarker2(CViewport *viewport, const FVector &secondStarPosi
FVector x1(viewPosition2);
FVector x2(m3._row1);
// Find the angle of rotation for m4._row1 that gives the minimum distance to viewPosition
float minDegree = calcAngleForMinDist(x1,x2,minDistance);
float minDegree = calcAngleForMinDist(x1, x2, minDistance);
m3.rotVectAxisY((double)minDegree);
FPose m13;