X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/c0361acdb2a1bfa484787a157cfeb5d2d7356795..522ed78193ce3bb0e5b88f96ac7d2ec4c6c6e2a5:/puzzles.h?ds=sidebyside diff --git a/puzzles.h b/puzzles.h index de0f819..b8317ee 100644 --- a/puzzles.h +++ b/puzzles.h @@ -12,6 +12,8 @@ #define FALSE 0 #endif +#define PI 3.141592653589793238462643383279502884197169399 + #define lenof(array) ( sizeof(array) / sizeof(*(array)) ) #define STR_INT(x) #x @@ -45,6 +47,9 @@ enum { #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; @@ -243,6 +248,7 @@ struct game { int (*wants_statusbar)(void); int is_timed; int (*timing_state)(game_state *state); + int mouse_priorities; }; /*