aboutsummaryrefslogtreecommitdiff
path: root/netslide.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2010-05-29 15:43:46 +0000
committerSimon Tatham <anakin@pobox.com>2010-05-29 15:43:46 +0000
commit9cd182ffa92e97609d562883a1c8e74949963ba0 (patch)
tree43f35c00ac8d248209c3c40ebb9ac9d1a3e5e302 /netslide.c
parentef6e78c6ac804a197cfc6002c5866885321626c5 (diff)
downloadpuzzles-9cd182ffa92e97609d562883a1c8e74949963ba0.zip
puzzles-9cd182ffa92e97609d562883a1c8e74949963ba0.tar.gz
puzzles-9cd182ffa92e97609d562883a1c8e74949963ba0.tar.bz2
puzzles-9cd182ffa92e97609d562883a1c8e74949963ba0.tar.xz
Patch from Mark Wooding to introduce a draw_thick_line() function in
the drawing API, for use by Loopy. It's optional: drawing.c will construct an acceptable alternative using a filled polygon if the front end doesn't provide it. Net and Netslide previously had static functions called draw_thick_line(), whose claim to the name is less justified and so they've been renamed. [originally from svn r8962]
Diffstat (limited to 'netslide.c')
-rw-r--r--netslide.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/netslide.c b/netslide.c
index 99eb6e1..552b728 100644
--- a/netslide.c
+++ b/netslide.c
@@ -1307,8 +1307,8 @@ static float *game_colours(frontend *fe, int *ncolours)
return ret;
}
-static void draw_thick_line(drawing *dr, int x1, int y1, int x2, int y2,
- int colour)
+static void draw_filled_line(drawing *dr, int x1, int y1, int x2, int y2,
+ int colour)
{
draw_line(dr, x1-1, y1, x2-1, y2, COL_WIRE);
draw_line(dr, x1+1, y1, x2+1, y2, COL_WIRE);
@@ -1420,9 +1420,9 @@ static void draw_tile(drawing *dr, game_drawstate *ds, game_state *state,
if (tile & dir) {
ex = (TILE_SIZE - TILE_BORDER - 1.0F) / 2.0F * X(dir);
ey = (TILE_SIZE - TILE_BORDER - 1.0F) / 2.0F * Y(dir);
- draw_thick_line(dr, bx+(int)cx, by+(int)cy,
- bx+(int)(cx+ex), by+(int)(cy+ey),
- COL_WIRE);
+ draw_filled_line(dr, bx+(int)cx, by+(int)cy,
+ bx+(int)(cx+ex), by+(int)(cy+ey),
+ COL_WIRE);
}
}
for (dir = 1; dir < 0x10; dir <<= 1) {