Skip to content
Permalink
Browse files

TITANIC: Finished CStarControlSub8 class

  • Loading branch information
dreammaster committed Mar 18, 2017
1 parent ab0c57a commit a6870e04ad0273d489691fc1ec348d12e69f479b
@@ -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) {
@@ -69,8 +69,6 @@ class CStarControlSub8 {
*/
void save(SimpleFile *file, int indent) {}

int findStar(const Common::Point &pt);

void selectStar(int starNum, CVideoSurface *surface, CStarField *starField,
CStarControlSub7 *sub7);

@@ -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;

0 comments on commit a6870e0

Please sign in to comment.
You can’t perform that action at this time.