[Scummvm-git-logs] scummvm master -> 713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee

dreammaster dreammaster at scummvm.org
Tue May 30 17:35:43 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
713f6e84fc TITANIC: Fix references to CPhotoCrosshairs _entries array


Commit: 713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee
    https://github.com/scummvm/scummvm/commit/713f6e84fc046563bc3fcfd13a83b8e00dd0f6ee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-05-30T11:35:28-04:00

Commit Message:
TITANIC: Fix references to CPhotoCrosshairs _entries array

Changed paths:
    engines/titanic/star_control/photo_crosshairs.cpp


diff --git a/engines/titanic/star_control/photo_crosshairs.cpp b/engines/titanic/star_control/photo_crosshairs.cpp
index cd11fb5..62a081c 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);
 }
 





More information about the Scummvm-git-logs mailing list