diff options
author | Paul Gilbert | 2017-05-30 18:57:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-05-30 18:57:50 -0400 |
commit | 6854ffb8a369336902f6892f8d3728e847485d2b (patch) | |
tree | 05cb6951ae8321e1e7b35df7954a4787f4825080 /engines | |
parent | eb2ce9c759d03b6e71c9888d9a471a67593d4024 (diff) | |
download | scummvm-rg350-6854ffb8a369336902f6892f8d3728e847485d2b.tar.gz scummvm-rg350-6854ffb8a369336902f6892f8d3728e847485d2b.tar.bz2 scummvm-rg350-6854ffb8a369336902f6892f8d3728e847485d2b.zip |
TITANIC: Cleanup of CStarMarkers draw method
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/star_control/star_markers.cpp | 23 |
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)); } } |