X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/d74986c91651f2aa39474f84cf64639d8b8ba4fc..8b629657bab226e6a0f91d4f147d448b4c84be2f:/misc.c diff --git a/misc.c b/misc.c index 5ad4d0b..8f5314c 100644 --- a/misc.c +++ b/misc.c @@ -194,7 +194,7 @@ void game_mkhighlight(frontend *fe, float *ret, } } -void memswap(void *av, void *bv, int size) +static void memswap(void *av, void *bv, int size) { char tmpbuf[512]; char *a = av, *b = bv; @@ -222,14 +222,21 @@ void shuffle(void *array, int nelts, int eltsize, random_state *rs) } } -void draw_rect_outline(frontend *fe, int x, int y, int w, int h, int colour) +void draw_rect_outline(drawing *dr, int x, int y, int w, int h, int colour) { int x0 = x, x1 = x+w-1, y0 = y, y1 = y+h-1; - - draw_line(fe, x0, y0, x0, y1, colour); - draw_line(fe, x0, y1, x1, y1, colour); - draw_line(fe, x1, y1, x1, y0, colour); - draw_line(fe, x1, y0, x0, y0, colour); + int coords[8]; + + coords[0] = x0; + coords[1] = y0; + coords[2] = x0; + coords[3] = y1; + coords[4] = x1; + coords[5] = y1; + coords[6] = x1; + coords[7] = y0; + + draw_polygon(dr, coords, 4, -1, colour); } /* vim: set shiftwidth=4 tabstop=8: */