diff options
author | Paul Gilbert | 2016-07-17 13:26:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-17 13:26:22 -0400 |
commit | 816b99f5a657181ea84e0f42d2713406a9f041d2 (patch) | |
tree | a14524c655dd0cb74ac892818cbe5c2ecee7f283 /engines/titanic | |
parent | 789760295df25b209e312a1d48c0ca6be74c2c81 (diff) | |
download | scummvm-rg350-816b99f5a657181ea84e0f42d2713406a9f041d2.tar.gz scummvm-rg350-816b99f5a657181ea84e0f42d2713406a9f041d2.tar.bz2 scummvm-rg350-816b99f5a657181ea84e0f42d2713406a9f041d2.zip |
TITANIC: Added CStarField support methods
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/star_control/star_control.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub5.h | 3 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub8.h | 3 | ||||
-rw-r--r-- | engines/titanic/star_control/star_field.cpp | 60 | ||||
-rw-r--r-- | engines/titanic/star_control/star_field.h | 21 |
5 files changed, 81 insertions, 8 deletions
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp index e1e804f0df..3e0ff16c55 100644 --- a/engines/titanic/star_control/star_control.cpp +++ b/engines/titanic/star_control/star_control.cpp @@ -131,7 +131,7 @@ void CStarControl::fn1(int action) { } bool CStarControl::fn4() { - return _starField.get7(); + return _starField.get6(); } bool CStarControl::canSetStarDestination() const { diff --git a/engines/titanic/star_control/star_control_sub5.h b/engines/titanic/star_control/star_control_sub5.h index e245b29d10..8007f83338 100644 --- a/engines/titanic/star_control/star_control_sub5.h +++ b/engines/titanic/star_control/star_control_sub5.h @@ -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 diff --git a/engines/titanic/star_control/star_control_sub8.h b/engines/titanic/star_control/star_control_sub8.h index 39d9fef7dc..6d8d1f0c7d 100644 --- a/engines/titanic/star_control/star_control_sub8.h +++ b/engines/titanic/star_control/star_control_sub8.h @@ -37,10 +37,11 @@ class CStarControlSub8 { private: int _field0; int _field4; - int _field8; int _fieldC; StructEntry _array[3]; public: + int _field8; +public: CStarControlSub8(); /** diff --git a/engines/titanic/star_control/star_field.cpp b/engines/titanic/star_control/star_field.cpp index 1d667c098b..2c94ebbc62 100644 --- a/engines/titanic/star_control/star_field.cpp +++ b/engines/titanic/star_control/star_field.cpp @@ -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 diff --git a/engines/titanic/star_control/star_field.h b/engines/titanic/star_control/star_field.h index 48c2721b6d..d02749b048 100644 --- a/engines/titanic/star_control/star_field.h +++ b/engines/titanic/star_control/star_field.h @@ -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 |