diff options
author | Paul Gilbert | 2017-05-30 11:35:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-05-30 11:35:28 -0400 |
commit | 713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee (patch) | |
tree | 501e1cf1312ba09e5839fcf1be29acb8c8482759 | |
parent | 266f68c21b94e64f792660817582cccff1de8364 (diff) | |
download | scummvm-rg350-713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee.tar.gz scummvm-rg350-713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee.tar.bz2 scummvm-rg350-713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee.zip |
TITANIC: Fix references to CPhotoCrosshairs _entries array
-rw-r--r-- | engines/titanic/star_control/photo_crosshairs.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/titanic/star_control/photo_crosshairs.cpp b/engines/titanic/star_control/photo_crosshairs.cpp index cd11fb5e92..62a081cdd8 100644 --- a/engines/titanic/star_control/photo_crosshairs.cpp +++ b/engines/titanic/star_control/photo_crosshairs.cpp @@ -36,7 +36,7 @@ void CPhotoCrosshairs::selectStar(int index, CVideoSurface *surface, if (_entryIndex >= 0) { if (_entryIndex == _field8) { if (_field8 != 2) { - if (_positions[index] != _positions[_entryIndex + 1]) { + if (_positions[index] != _entries[_entryIndex]) { surface->lock(); CSurfaceArea surfaceArea(surface); @@ -44,15 +44,15 @@ void CPhotoCrosshairs::selectStar(int index, CVideoSurface *surface, surface->unlock(); ++_entryIndex; - CStarPosition &newP = _positions[_entryIndex + 1]; + CStarPosition &newP = _entries[_entryIndex]; newP = _positions[index]; - const CBaseStarEntry *starP = starField->getDataPtr(_positions[index]._index1); + const CBaseStarEntry *starP = starField->getDataPtr(newP._index1); markers->addStar(starP); } } } else if (_entryIndex == _field8 + 1) { - if (_positions[index] == _positions[_entryIndex + 1]) { + if (_positions[index] == _entries[_entryIndex]) { surface->lock(); CSurfaceArea surfaceArea(surface); fn6(&surfaceArea); @@ -69,12 +69,12 @@ void CPhotoCrosshairs::selectStar(int index, CVideoSurface *surface, surface->unlock(); const CBaseStarEntry *starP; - starP = starField->getDataPtr(_positions[_entryIndex]._index1); + starP = starField->getDataPtr(_entries[_entryIndex]._index1); markers->addStar(starP); starP = starField->getDataPtr(_positions[index]._index1); markers->addStar(starP); - CStarPosition &newP = _positions[_entryIndex + 1]; + CStarPosition &newP = _entries[_entryIndex]; newP = _positions[index]; } } @@ -201,7 +201,7 @@ void CPhotoCrosshairs::fn5(int index, CVideoSurface *surface, CStarField *starFi } void CPhotoCrosshairs::fn6(CSurfaceArea *surfaceArea) { - const CStarPosition &pt = _positions[_entryIndex]; + const CStarPosition &pt = _entries[_entryIndex]; fn7(pt, surfaceArea); } |