diff options
Diffstat (limited to 'engines/titanic/star_control/star_closeup.cpp')
-rw-r--r-- | engines/titanic/star_control/star_closeup.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/engines/titanic/star_control/star_closeup.cpp b/engines/titanic/star_control/star_closeup.cpp index 82c88dae39..6ec94bbf38 100644 --- a/engines/titanic/star_control/star_closeup.cpp +++ b/engines/titanic/star_control/star_closeup.cpp @@ -195,7 +195,7 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector CSurfaceArea *surfaceArea, CStarCamera *camera) { const int VALUES[] = { 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4 }; float val1 = camera->getThreshold(); - int val2 = camera->proc27(); + StarColor starColor = camera->getStarColor(); if (!_flag) return; @@ -292,7 +292,8 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector } } - if (val2 <= 0) { + switch (starColor) { + case WHITE: surfaceArea->setMode(SA_SOLID); surfaceArea->_pixel = MKTAG_BE(entryP->_pixel1, entryP->_pixel2, entryP->_pixel3, 0); @@ -315,7 +316,8 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector grid2._position._x, grid2._position._y)); } } - } else { + break; + case PINK: surfaceArea->setMode(SA_SOLID); surfaceArea->_pixel = entryP->_pixel1; surfaceArea->setColorFromPixel(); @@ -359,6 +361,9 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector grid2._position._x, grid2._position._y)); } } + break; + default: + assert(0); } } } @@ -397,7 +402,8 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector + newV._x * pose._row1._z + pose._vector._z; } - if (val2 <= 0) { + switch(starColor) { + case WHITE: surfaceArea->setMode(SA_SOLID); surfaceArea->_pixel = pixel1; surfaceArea->setColorFromPixel(); @@ -418,8 +424,9 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector surfaceArea->drawLine(FRect(grid1._position._x, grid1._position._y, grid2._position._x, grid2._position._y)); } - } - } else { + } + break; + case PINK: surfaceArea->setMode(SA_SOLID); surfaceArea->_pixel = pixel2; surfaceArea->setColorFromPixel(); @@ -463,6 +470,9 @@ void CStarCloseup::draw(const FPose &pose, const FVector &vector, const FVector grid2._position._x, grid2._position._y)); } } + break; + default: + assert(0); } } |