From 2b06c127282a7e4b10308e641977091ee9c20628 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 22 Dec 2009 16:47:42 +0000 Subject: Keyboard control for Dominosa (patch largely due to James H, though with considerable meddling from me). [originally from svn r8788] --- misc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 11c842c..4215e47 100644 --- a/misc.c +++ b/misc.c @@ -244,6 +244,18 @@ void draw_rect_outline(drawing *dr, int x, int y, int w, int h, int colour) draw_polygon(dr, coords, 4, -1, colour); } +void draw_rect_corners(drawing *dr, int cx, int cy, int r, int col) +{ + draw_line(dr, cx - r, cy - r, cx - r, cy - r/2, col); + draw_line(dr, cx - r, cy - r, cx - r/2, cy - r, col); + draw_line(dr, cx - r, cy + r, cx - r, cy + r/2, col); + draw_line(dr, cx - r, cy + r, cx - r/2, cy + r, col); + draw_line(dr, cx + r, cy - r, cx + r, cy - r/2, col); + draw_line(dr, cx + r, cy - r, cx + r/2, cy - r, col); + draw_line(dr, cx + r, cy + r, cx + r, cy + r/2, col); + draw_line(dr, cx + r, cy + r, cx + r/2, cy + r, col); +} + void move_cursor(int button, int *x, int *y, int maxw, int maxh, int wrap) { int dx = 0, dy = 0; -- cgit v1.1