Permalink
Browse files
TITANIC: Added remainder of CStarView class
- Loading branch information
|
|
@@ -23,6 +23,8 @@ |
|
|
#ifndef TITANIC_FVECTOR_H |
|
|
#define TITANIC_FVECTOR_H |
|
|
|
|
|
#include "titanic/star_control/fpoint.h" |
|
|
|
|
|
namespace Titanic { |
|
|
|
|
|
class CStarControlSub6; |
|
|
@@ -83,6 +85,16 @@ class FVector { |
|
|
_y -= delta._y; |
|
|
_z -= delta._z; |
|
|
} |
|
|
|
|
|
void operator+=(const FPoint &delta) { |
|
|
_x += delta._x; |
|
|
_y += delta._y; |
|
|
} |
|
|
|
|
|
void operator-=(const FPoint &delta) { |
|
|
_x -= delta._x; |
|
|
_y -= delta._y; |
|
|
} |
|
|
}; |
|
|
|
|
|
} // End of namespace Titanic |
|
|
|
|
|
@@ -269,7 +269,8 @@ bool CStarControlSub12::setupHandler(const CStar20Data *src) { |
|
|
assert(!_handlerP); |
|
|
_handlerP = handler; |
|
|
return true; |
|
|
} else { |
|
|
} |
|
|
else { |
|
|
return false; |
|
|
} |
|
|
} |
|
|
@@ -281,4 +282,16 @@ void CStarControlSub12::deleteHandler() { |
|
|
} |
|
|
} |
|
|
|
|
|
void CStarControlSub12::fn1(CStarControlSub13 *sub13, const FVector &v) { |
|
|
// TODO |
|
|
} |
|
|
|
|
|
void CStarControlSub12::fn2(FVector v1, FVector v2, FVector v3) { |
|
|
// TODO |
|
|
} |
|
|
|
|
|
void CStarControlSub12::fn3(CStarControlSub13 *sub13, const FVector &v) { |
|
|
// TODO |
|
|
} |
|
|
|
|
|
} // End of namespace Titanic |
|
|
@@ -121,6 +121,10 @@ class CStarControlSub12 { |
|
|
bool is108() const { return _field108; } |
|
|
void set108() { _field108 = true; } |
|
|
void reset108() { _field108 = false; } |
|
|
|
|
|
void fn1(CStarControlSub13 *sub13, const FVector &v); |
|
|
void fn2(FVector v1, FVector v2, FVector v3); |
|
|
void fn3(CStarControlSub13 *sub13, const FVector &v); |
|
|
}; |
|
|
|
|
|
} // End of namespace Titanic |
|
|
|
|
|
@@ -25,8 +25,7 @@ |
|
|
|
|
|
namespace Titanic { |
|
|
|
|
|
CStarControlSub5::CStarControlSub5() : |
|
|
_field4(1) { |
|
|
CStarControlSub5::CStarControlSub5() : _flag(true) { |
|
|
} |
|
|
|
|
|
bool CStarControlSub5::setup() { |
|
|
@@ -43,4 +42,8 @@ void CStarControlSub5::proc3(CErrorCode *errorCode) { |
|
|
// TODO |
|
|
} |
|
|
|
|
|
void CStarControlSub5::fn1() { |
|
|
_flag = !_flag; |
|
|
} |
|
|
|
|
|
} // End of namespace Titanic |
|
|
@@ -39,7 +39,7 @@ class CStarControlSub5 { |
|
|
int _fieldC; |
|
|
}; |
|
|
private: |
|
|
int _field4; |
|
|
bool _flag; |
|
|
CStarControlSub6 _sub1, _sub2; |
|
|
#if 0 |
|
|
SubEntry _array[5]; |
|
|
@@ -56,8 +56,10 @@ class CStarControlSub5 { |
|
|
CSurfaceArea *surfaceArea, CStarControlSub12 *sub12); |
|
|
virtual void proc3(CErrorCode *errorCode); |
|
|
|
|
|
int get4() const { return _field4; } |
|
|
void set4(int val) { _field4 = val; } |
|
|
bool get4() const { return _flag; } |
|
|
void set4(bool val) { _flag = val; } |
|
|
|
|
|
void fn1(); |
|
|
}; |
|
|
|
|
|
} // End of namespace Titanic |
|
|
|
|
|
@@ -48,9 +48,6 @@ class CStarField : public CStarControlSub2 { |
|
|
private: |
|
|
void fn3(CSurfaceArea *surfaceArea); |
|
|
void fn4(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12); |
|
|
double fn5(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12, |
|
|
FVector &v1, FVector &v2, FVector &v3); |
|
|
|
|
|
public: |
|
|
CStarField(); |
|
|
|
|
|
@@ -108,9 +105,12 @@ class CStarField : public CStarControlSub2 { |
|
|
} |
|
|
|
|
|
void fn1(CErrorCode *errorCode); |
|
|
double fn5(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12, |
|
|
FVector &v1, FVector &v2, FVector &v3); |
|
|
void fn6(CVideoSurface *surface, CStarControlSub12 *sub12); |
|
|
void fn7(); |
|
|
void fn8(CVideoSurface *surface); |
|
|
void fn9() { _sub5.fn1(); } |
|
|
|
|
|
/** |
|
|
* Called when the starfield is clicked |
|
|
|
|
|
@@ -339,11 +339,13 @@ void CStarView::toggleMode() { |
|
|
} |
|
|
|
|
|
void CStarView::fn11() { |
|
|
// TODO |
|
|
if (_starField) |
|
|
_starField->fn9(); |
|
|
} |
|
|
|
|
|
void CStarView::fn12() { |
|
|
// TODO |
|
|
if (_starField) |
|
|
_starField->toggle4(); |
|
|
} |
|
|
|
|
|
void CStarView::fn13() { |
|
|
@@ -373,7 +375,36 @@ void CStarView::setHasReference() { |
|
|
} |
|
|
|
|
|
void CStarView::fn16() { |
|
|
// TODO |
|
|
if (_starField && !_showingPhoto) { |
|
|
CSurfaceArea surfaceArea(_videoSurface); |
|
|
FVector v1, v2, v3; |
|
|
double val = _starField->fn5(&surfaceArea, &_sub12, v1, v2, v3); |
|
|
|
|
|
if (val > -1.0) { |
|
|
v1 += surfaceArea._centroid; |
|
|
v3 += surfaceArea._centroid; |
|
|
|
|
|
switch (_starField->get88()) { |
|
|
case -1: |
|
|
_sub12.fn2(v1, v2, v3); |
|
|
_starField->fn7(); |
|
|
break; |
|
|
|
|
|
case 0: |
|
|
_sub12.fn3(&_sub13, v2); |
|
|
_starField->fn7(); |
|
|
break; |
|
|
|
|
|
case 1: |
|
|
_sub12.fn1(&_sub13, v2); |
|
|
_starField->fn7(); |
|
|
break; |
|
|
|
|
|
default: |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
void CStarView::fn17() { |
|
|
|