mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 07:23:05 +00:00
TITANIC: Cleanup of CStarMarkers draw method
This commit is contained in:
parent
eb2ce9c759
commit
6854ffb8a3
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user