Skip to content

Commit 2f493bf

Browse files
committed
swars: Prevent lines to point 0,0 when drawing shapes
While drawing agent badges in equip and cryo screens, lines to screen edge were visible at some point.
1 parent 3b8ed99 commit 2f493bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/guiboxes.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,10 @@ void init_screen_shape(struct ScreenShape *p_shp, ScrCoord x, ScrCoord y,
393393
}
394394
else
395395
{
396-
p_shp->PtX[k] = 0;
397-
p_shp->PtY[k] = 0;
396+
// Fill remaining points by repeating the previous ones;
397+
// the drawing function may use first of these points
398+
p_shp->PtX[k] = p_shp->PtX[k - pts_len];
399+
p_shp->PtY[k] = p_shp->PtY[k - pts_len];
398400
}
399401
}
400402
p_shp->DrawSpeed = drawspeed;

0 commit comments

Comments
 (0)