aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/star_control/star_markers.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/engines/titanic/star_control/star_markers.cpp b/engines/titanic/star_control/star_markers.cpp
index deb34bf2a1..fd64458f79 100644
--- a/engines/titanic/star_control/star_markers.cpp
+++ b/engines/titanic/star_control/star_markers.cpp
@@ -34,6 +34,7 @@ void CStarMarkers::draw(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClo
FPoint center((double)surfaceArea->_width * 0.5,
surfaceArea->_height * 0.5);
FVector newV;
+ int x1, x2, x3, y1, y2, y3;
uint savedPixel = surfaceArea->_pixel;
surfaceArea->_pixel = 0xffff;
@@ -51,18 +52,16 @@ void CStarMarkers::draw(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClo
if (newV._z > threshold) {
FVector vTemp = camera->proc28(2, newV);
- FRect r1(center._x + vTemp._x, center._y + vTemp._y,
- center._x + vTemp._x + 4.0, center._y + vTemp._y + 4.0);
- surfaceArea->drawLine(r1);
-
- FRect r2(r1.right, r1.bottom, r1.right + 4.0, r1.top);
- surfaceArea->drawLine(r2);
-
- FRect r3(r2.right, r1.top, r1.right, r1.top - 4.0);
- surfaceArea->drawLine(r3);
-
- FRect r4(r1.right, r1.top - 4.0, r1.left, r1.top);
- surfaceArea->drawLine(r4);
+ x2 = center._x + vTemp._x;
+ y1 = center._y + vTemp._y;
+ y2 = y1 - -4.0;
+ x1 = x2 - 4.0;
+ x3 = x2 - -4.0;
+ y3 = y1 - 4.0;
+ surfaceArea->drawLine(Common::Point(x1, y1), Common::Point(x2, y2));
+ surfaceArea->drawLine(Common::Point(x2, y2), Common::Point(x3, y1));
+ surfaceArea->drawLine(Common::Point(x3, y1), Common::Point(x2, y3));
+ surfaceArea->drawLine(Common::Point(x2, y3), Common::Point(x1, y1));
}
}