mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 10:58:01 +00:00
TITANIC: Merge incorrectly duplicated field in CPhotoCrosshairs
This commit is contained in:
parent
4358712c28
commit
496839d766
@ -40,7 +40,6 @@ class CStarCamera;
|
||||
class CPhotoCrosshairs {
|
||||
private:
|
||||
Common::Array<CStarPosition> _positions;
|
||||
int _entryIndex;
|
||||
CStarPosition _entries[3];
|
||||
private:
|
||||
/**
|
||||
@ -54,7 +53,7 @@ private:
|
||||
void clear();
|
||||
public:
|
||||
int _field8;
|
||||
int _fieldC;
|
||||
int _entryIndex;
|
||||
public:
|
||||
CPhotoCrosshairs();
|
||||
~CPhotoCrosshairs() { clear(); }
|
||||
@ -69,6 +68,11 @@ public:
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) {}
|
||||
|
||||
/**
|
||||
* Returns true if there are no crosshairs present
|
||||
*/
|
||||
bool isEmpty() const { return _entryIndex == -1; }
|
||||
|
||||
void selectStar(int starNum, CVideoSurface *surface, CStarField *starField,
|
||||
CStarMarkers *markers);
|
||||
|
||||
|
@ -183,10 +183,10 @@ void CStarField::fn4(CSurfaceArea *surfaceArea, CStarCamera *camera) {
|
||||
|
||||
double CStarField::fn5(CSurfaceArea *surfaceArea, CStarCamera *camera,
|
||||
FVector &v1, FVector &v2, FVector &v3) {
|
||||
if (_crosshairs._fieldC < 0)
|
||||
if (_crosshairs.isEmpty())
|
||||
return -1.0;
|
||||
|
||||
const CBaseStarEntry *dataP = _markers.getDataPtr(_crosshairs._fieldC);
|
||||
const CBaseStarEntry *dataP = _markers.getDataPtr(_crosshairs._entryIndex);
|
||||
v2 = dataP->_position;
|
||||
FVector tv = camera->proc29(2, v2);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user