diff options
author | Paul Gilbert | 2017-02-24 23:30:17 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-24 23:30:17 -0500 |
commit | e107003c4c83418a34fa15813fc4f3c7de473cf7 (patch) | |
tree | 52ada0b29ac2b5aaea8ea26c54eea566410ead38 | |
parent | 985f8a3720873b6bfd2bd2cb5bcda78b24629e84 (diff) | |
download | scummvm-rg350-e107003c4c83418a34fa15813fc4f3c7de473cf7.tar.gz scummvm-rg350-e107003c4c83418a34fa15813fc4f3c7de473cf7.tar.bz2 scummvm-rg350-e107003c4c83418a34fa15813fc4f3c7de473cf7.zip |
TITANIC: Some preliminary cleanup of star control interfaces
-rw-r--r-- | engines/titanic/carry/photograph.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/core/game_object.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/core/game_object.h | 5 | ||||
-rw-r--r-- | engines/titanic/game/nav_helmet.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/star_control/base_star.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control.h | 5 |
7 files changed, 19 insertions, 13 deletions
diff --git a/engines/titanic/carry/photograph.cpp b/engines/titanic/carry/photograph.cpp index 76487cae12..d35837798f 100644 --- a/engines/titanic/carry/photograph.cpp +++ b/engines/titanic/carry/photograph.cpp @@ -64,7 +64,7 @@ bool CPhotograph::MouseDragEndMsg(CMouseDragEndMsg *msg) { moveUnder(getDontSave()); makeDirty(); playSound("a#46.wav"); - starFn1(14); + starFn(14); showMouse(); return true; } else { diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp index 314746e496..589d026fad 100644 --- a/engines/titanic/core/game_object.cpp +++ b/engines/titanic/core/game_object.cpp @@ -1637,10 +1637,10 @@ CStarControl *CGameObject::getStarControl() const { return starControl; } -void CGameObject::starFn1(int v) { +void CGameObject::starFn(int action) { CStarControl *starControl = getStarControl(); if (starControl) - starControl->fn1(v); + starControl->doAction(action); } bool CGameObject::starIsSolved() const { diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h index b214cf8c9e..2025c574a5 100644 --- a/engines/titanic/core/game_object.h +++ b/engines/titanic/core/game_object.h @@ -945,7 +945,10 @@ public: */ CStarControl *getStarControl() const; - void starFn1(int v); + /** + * Executes an action in the StarControl subsystem + */ + void starFn(int action); /** * Returns true if the starmap puzzle has been solved diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp index 874683ad1b..ab86bd7582 100644 --- a/engines/titanic/game/nav_helmet.cpp +++ b/engines/titanic/game/nav_helmet.cpp @@ -58,8 +58,8 @@ bool CNavHelmet::MovieEndMsg(CMovieEndMsg *msg) { pet->incAreaLocks(); } - starFn1(0); - starFn1(12); + starFn(0); + starFn(12); } return true; @@ -81,7 +81,7 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { if (_flag) { _flag = false; setVisible(true); - starFn1(1); + starFn(1); playMovie(61, 120, MOVIE_NOTIFY_OBJECT); playSound("a#47.wav"); playSound("a#48.wav"); @@ -106,7 +106,7 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { bool CNavHelmet::PETPhotoOnOffMsg(CPETPhotoOnOffMsg *msg) { if (_flag) - starFn1(9); + starFn(9); return true; } @@ -115,10 +115,10 @@ bool CNavHelmet::PETStarFieldLockMsg(CPETStarFieldLockMsg *msg) { if (_flag) { if (msg->_value) { playSound("a#6.wav"); - starFn1(17); + starFn(17); } else { playSound("a#5.wav"); - starFn1(18); + starFn(18); } } diff --git a/engines/titanic/star_control/base_star.cpp b/engines/titanic/star_control/base_star.cpp index f09df38620..a6ef6d8907 100644 --- a/engines/titanic/star_control/base_star.cpp +++ b/engines/titanic/star_control/base_star.cpp @@ -34,7 +34,7 @@ void CBaseStarEntry::load(Common::SeekableReadStream &s) { _field1 = s.readByte(); _field2 = s.readByte(); _field3 = s.readByte(); - *((uint32 *)&_value) = s.readUint32LE(); // FIXME + _value = s.readFloatLE(); _val._v1 = s.readUint32LE(); _val._v2 = s.readUint32LE(); _val._v3 = s.readUint32LE(); diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp index a1c4f33ad2..2aaf5d7640 100644 --- a/engines/titanic/star_control/star_control.cpp +++ b/engines/titanic/star_control/star_control.cpp @@ -129,7 +129,7 @@ void CStarControl::newFrame() { // TODO } -void CStarControl::fn1(int action) { +void CStarControl::doAction(int action) { // TODO } diff --git a/engines/titanic/star_control/star_control.h b/engines/titanic/star_control/star_control.h index 0ee7c6530e..1a07e66ab7 100644 --- a/engines/titanic/star_control/star_control.h +++ b/engines/titanic/star_control/star_control.h @@ -68,7 +68,10 @@ public: */ virtual void draw(CScreenManager *screenManager); - void fn1(int action); + /** + * Does an action in the star control + */ + void doAction(int action); /** * Returns true if the starfield puzzle has been solved |