aboutsummaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2009-12-22 16:47:42 +0000
committerSimon Tatham <anakin@pobox.com>2009-12-22 16:47:42 +0000
commit2b06c127282a7e4b10308e641977091ee9c20628 (patch)
tree99aff731c99b1e1d4c756c7c254d630ae6591722 /misc.c
parent2bdabe31cf42b34f8d7bb6015c383482cfb5d068 (diff)
downloadpuzzles-2b06c127282a7e4b10308e641977091ee9c20628.zip
puzzles-2b06c127282a7e4b10308e641977091ee9c20628.tar.gz
puzzles-2b06c127282a7e4b10308e641977091ee9c20628.tar.bz2
puzzles-2b06c127282a7e4b10308e641977091ee9c20628.tar.xz
Keyboard control for Dominosa (patch largely due to James H, though
with considerable meddling from me). [originally from svn r8788]
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c12
1 files changed, 12 insertions, 0 deletions
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;