TITANIC: Added CStarField support methods

This commit is contained in:
Paul Gilbert 2016-07-17 13:26:22 -04:00
parent 789760295d
commit 816b99f5a6
5 changed files with 81 additions and 8 deletions

View File

@ -131,7 +131,7 @@ void CStarControl::fn1(int action) {
}
bool CStarControl::fn4() {
return _starField.get7();
return _starField.get6();
}
bool CStarControl::canSetStarDestination() const {

View File

@ -48,6 +48,9 @@ public:
virtual bool setup();
virtual void proc2();
virtual void proc3(CErrorCode *errorCode);
int get4() const { return _field4; }
void set4(int val) { _field4 = val; }
};
} // End of namespace Titanic

View File

@ -37,9 +37,10 @@ class CStarControlSub8 {
private:
int _field0;
int _field4;
int _field8;
int _fieldC;
StructEntry _array[3];
public:
int _field8;
public:
CStarControlSub8();

View File

@ -24,7 +24,7 @@
namespace Titanic {
CStarField::CStarField() : _val1(0), _val2(0), _val3(0), _val4(1),
CStarField::CStarField() : _val1(0), _val2(0), _val3(0), _val4(true),
_val5(0), _val6(false) {
}
@ -66,4 +66,62 @@ void CStarField::draw(CVideoSurface *surface, CStarControlSub12 *sub12) {
// TODO
}
int CStarField::get1() const {
return _val1;
}
void CStarField::set1(int val) {
_val1 = val;
}
int CStarField::get2() const {
return _val2;
}
void CStarField::set2(int val) {
_val2 = val;
}
int CStarField::get54() const {
return _sub5.get4();
}
void CStarField::set54(int val) {
_sub5.set4(val);
}
int CStarField::get3() const {
return _val3;
}
void CStarField::set3(int val) {
_val3 = val;
}
void CStarField::toggle4() {
_val4 = !_val4;
}
bool CStarField::set4(bool val) {
bool oldVal = _val4;
_val4 = val;
return val;
}
int CStarField::get88() const {
return _sub8._field8;
}
int CStarField::get5() const {
return _val5;
}
void CStarField::update6() {
_val6 = _sub8._field8 == 2;
}
int CStarField::get6() const {
return _val6;
}
} // End of namespace Titanic

View File

@ -42,10 +42,9 @@ private:
int _val1;
int _val2;
int _val3;
int _val4;
bool _val4;
int _val5;
int _val6;
bool _val7;
bool _val6;
public:
CStarField();
@ -66,8 +65,20 @@ public:
*/
void draw(CVideoSurface *surface, CStarControlSub12 *sub12);
int get6() const { return _val6; }
bool get7() const { return _val7; }
int get1() const;
void set1(int val);
int get2() const;
void set2(int val);
int get54() const;
void set54(int val);
int get3() const;
void set3(int val);
void toggle4();
bool set4(bool val);
int get88() const;
int get5() const;
void update6();
int get6() const;
};
} // End of namespace Titanic