~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better mouse button handling in Mines:
[sgt/puzzles]
/
puzzles.h
diff --git
a/puzzles.h
b/puzzles.h
index
7b35896
..
b8317ee
100644
(file)
--- a/
puzzles.h
+++ b/
puzzles.h
@@
-47,6
+47,9
@@
enum {
#define IS_MOUSE_RELEASE(m) ( (unsigned)((m) - LEFT_RELEASE) <= \
(unsigned)(RIGHT_RELEASE - LEFT_RELEASE))
#define IS_MOUSE_RELEASE(m) ( (unsigned)((m) - LEFT_RELEASE) <= \
(unsigned)(RIGHT_RELEASE - LEFT_RELEASE))
+/* Bit flags indicating mouse button priorities */
+#define BUTTON_BEATS(x,y) ( 1 << (((x)-LEFT_BUTTON)*3+(y)-LEFT_BUTTON) )
+
#define IGNOREARG(x) ( (x) = (x) )
typedef struct frontend frontend;
#define IGNOREARG(x) ( (x) = (x) )
typedef struct frontend frontend;
@@
-245,6
+248,7
@@
struct game {
int (*wants_statusbar)(void);
int is_timed;
int (*timing_state)(game_state *state);
int (*wants_statusbar)(void);
int is_timed;
int (*timing_state)(game_state *state);
+ int mouse_priorities;
};
/*
};
/*