diff options
author | Paul Gilbert | 2017-03-18 18:26:13 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-03-18 18:26:13 -0400 |
commit | a6870e04ad0273d489691fc1ec348d12e69f479b (patch) | |
tree | 825a83783705cba8fcfecd3763cded7fc5820931 /engines | |
parent | ab0c57ac0c82ee72a18264db4df7e194c140d3d5 (diff) | |
download | scummvm-rg350-a6870e04ad0273d489691fc1ec348d12e69f479b.tar.gz scummvm-rg350-a6870e04ad0273d489691fc1ec348d12e69f479b.tar.bz2 scummvm-rg350-a6870e04ad0273d489691fc1ec348d12e69f479b.zip |
TITANIC: Finished CStarControlSub8 class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/star_control/star_control_sub8.cpp | 16 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub8.h | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/star_field.cpp | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/engines/titanic/star_control/star_control_sub8.cpp b/engines/titanic/star_control/star_control_sub8.cpp index 53f2394c20..bf29b053c5 100644 --- a/engines/titanic/star_control/star_control_sub8.cpp +++ b/engines/titanic/star_control/star_control_sub8.cpp @@ -31,11 +31,6 @@ namespace Titanic { CStarControlSub8::CStarControlSub8() : _field8(-1), _entryIndex(-1) { } -int CStarControlSub8::findStar(const Common::Point &pt) { - // TODO - return -1; -} - void CStarControlSub8::selectStar(int index, CVideoSurface *surface, CStarField *starField, CStarControlSub7 *sub7) { if (_entryIndex >= 0) { @@ -110,9 +105,6 @@ bool CStarControlSub8::fn1(CStarField *starField, CSurfaceArea *surfaceArea, CSt clear(); return false; } - - // TODO - return true; } void CStarControlSub8::fn2(CVideoSurface *surface, CStarField *starField, CStarControlSub7 *sub7) { @@ -198,7 +190,13 @@ void CStarControlSub8::fn4(int index, CSurfaceArea *surfaceArea) { } void CStarControlSub8::fn5(int index, CVideoSurface *surface, CStarField *starField, CStarControlSub7 *sub7) { - // TODO + surface->lock(); + CSurfaceArea surfaceArea(surface); + fn7(_positions[index + 1], &surfaceArea); + surface->unlock(); + + const CBaseStarEntry *starP = starField->getDataPtr(_positions[index + 1]._index1); + sub7->addStar(starP); } void CStarControlSub8::fn6(CSurfaceArea *surfaceArea) { diff --git a/engines/titanic/star_control/star_control_sub8.h b/engines/titanic/star_control/star_control_sub8.h index f61a6ff4ef..4939179481 100644 --- a/engines/titanic/star_control/star_control_sub8.h +++ b/engines/titanic/star_control/star_control_sub8.h @@ -69,8 +69,6 @@ public: */ void save(SimpleFile *file, int indent) {} - int findStar(const Common::Point &pt); - void selectStar(int starNum, CVideoSurface *surface, CStarField *starField, CStarControlSub7 *sub7); diff --git a/engines/titanic/star_control/star_field.cpp b/engines/titanic/star_control/star_field.cpp index 07c5ff4a73..5c22e5e308 100644 --- a/engines/titanic/star_control/star_field.cpp +++ b/engines/titanic/star_control/star_field.cpp @@ -232,7 +232,7 @@ bool CStarField::mouseButtonDown(CVideoSurface *surface, CStarControlSub12 *sub1 CSurfaceArea surfaceArea(surface); return selectStar(&surfaceArea, sub12, pt); } else { - int starNum = _sub8.findStar(pt); + int starNum = _sub8.indexOf(pt); if (starNum >= 0) { _sub8.selectStar(starNum, surface, this, &_sub7); return true; |