aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blackbox.c2
-rw-r--r--bridges.c2
-rw-r--r--cube.c2
-rw-r--r--devel.but11
-rw-r--r--dominosa.c2
-rw-r--r--fifteen.c2
-rw-r--r--flip.c2
-rw-r--r--guess.c2
-rw-r--r--inertia.c2
-rw-r--r--lightup.c2
-rw-r--r--loopy.c2
-rw-r--r--map.c2
-rw-r--r--midend.c6
-rw-r--r--net.c2
-rw-r--r--netslide.c2
-rw-r--r--nullgame.c2
-rw-r--r--pattern.c2
-rw-r--r--pegs.c2
-rw-r--r--puzzles.h10
-rw-r--r--rect.c2
-rw-r--r--samegame.c2
-rw-r--r--sixteen.c2
-rw-r--r--slant.c2
-rw-r--r--solo.c2
-rw-r--r--tents.c2
-rw-r--r--twiddle.c2
-rw-r--r--untangle.c2
27 files changed, 38 insertions, 37 deletions
diff --git a/blackbox.c b/blackbox.c
index 1889a19..b8c6bc0 100644
--- a/blackbox.c
+++ b/blackbox.c
@@ -1434,7 +1434,7 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
/* vim: set shiftwidth=4 tabstop=8: */
diff --git a/bridges.c b/bridges.c
index d12c1e4..a6cad87 100644
--- a/bridges.c
+++ b/bridges.c
@@ -2668,7 +2668,7 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
/* vim: set shiftwidth=4 tabstop=8: */
diff --git a/cube.c b/cube.c
index 59be960..99d5bb1 100644
--- a/cube.c
+++ b/cube.c
@@ -1738,5 +1738,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/devel.but b/devel.but
index 88ff947..66413ec 100644
--- a/devel.but
+++ b/devel.but
@@ -1166,8 +1166,7 @@ State changes as a result of a Restart operation are never animated;
the mid-end will handle them internally and never consult this
function at all. State changes as a result of Solve operations are
also not animated by default, although you can change this for a
-particular game by setting a flag in \c{mouse_priorities}
-(\k{backend-mouse-priorities}).
+particular game by setting a flag in \c{flags} (\k{backend-flags}).
The function is also passed a pointer to the local \c{game_ui}. It
may refer to information in here to help with its decision (see
@@ -1441,12 +1440,12 @@ the game was first completed (by setting a flag in
freeze the timer thereafter so that the user can undo back through
their solution process without altering their time.
-\S{backend-mouse-priorities} \c{mouse_priorities}
+\S{backend-flags} \c{flags}
-\c int mouse_priorities;
+\c int flags;
-This field is badly named. It is in fact a generic flags word. It
-consists of the bitwise OR of the following flags:
+This field contains miscellaneous per-backend flags. It consists of
+the bitwise OR of some combination of the following:
\dt \cw{BUTTON_BEATS(x,y)}
diff --git a/dominosa.c b/dominosa.c
index f9d55d6..f08cbf6 100644
--- a/dominosa.c
+++ b/dominosa.c
@@ -1778,5 +1778,5 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/fifteen.c b/fifteen.c
index 72c1c12..9519f1a 100644
--- a/fifteen.c
+++ b/fifteen.c
@@ -883,5 +883,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/flip.c b/flip.c
index bcd2ed0..16f8bc2 100644
--- a/flip.c
+++ b/flip.c
@@ -1304,5 +1304,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/guess.c b/guess.c
index aa37049..d31d061 100644
--- a/guess.c
+++ b/guess.c
@@ -1314,7 +1314,7 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
/* vim: set shiftwidth=4 tabstop=8: */
diff --git a/inertia.c b/inertia.c
index 6774ca2..055d264 100644
--- a/inertia.c
+++ b/inertia.c
@@ -2178,5 +2178,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/lightup.c b/lightup.c
index 0d22131..841458a 100644
--- a/lightup.c
+++ b/lightup.c
@@ -2254,7 +2254,7 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
#ifdef STANDALONE_SOLVER
diff --git a/loopy.c b/loopy.c
index 7570219..406c72f 100644
--- a/loopy.c
+++ b/loopy.c
@@ -2753,5 +2753,5 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/map.c b/map.c
index 3b01d9b..5943683 100644
--- a/map.c
+++ b/map.c
@@ -3123,7 +3123,7 @@ const struct game thegame = {
TRUE, TRUE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
#ifdef STANDALONE_SOLVER
diff --git a/midend.c b/midend.c
index 249fb2b..979a3b6 100644
--- a/midend.c
+++ b/midend.c
@@ -578,7 +578,7 @@ static int midend_really_process_key(midend *me, int x, int y, int button)
* See if this move requires an animation.
*/
if (special(type) && !(type == SOLVE &&
- (me->ourgame->mouse_priorities & SOLVE_ANIMATES))) {
+ (me->ourgame->flags & SOLVE_ANIMATES))) {
anim_time = 0;
} else {
anim_time = me->ourgame->anim_length(oldstate,
@@ -690,7 +690,7 @@ int midend_process_key(midend *me, int x, int y, int button)
* If the new button has lower priority than the old one,
* don't bother doing this.
*/
- if (me->ourgame->mouse_priorities &
+ if (me->ourgame->flags &
BUTTON_BEATS(me->pressed_mouse_button, button))
return ret; /* just ignore it */
@@ -1214,7 +1214,7 @@ char *midend_solve(midend *me)
me->states[me->statepos-2].state,
me->states[me->statepos-1].state);
me->dir = +1;
- if (me->ourgame->mouse_priorities & SOLVE_ANIMATES) {
+ if (me->ourgame->flags & SOLVE_ANIMATES) {
me->oldstate = me->ourgame->dup_game(me->states[me->statepos-2].state);
me->anim_time =
me->ourgame->anim_length(me->states[me->statepos-2].state,
diff --git a/net.c b/net.c
index 3e49b38..82d9ed0 100644
--- a/net.c
+++ b/net.c
@@ -2873,5 +2873,5 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/netslide.c b/netslide.c
index c51a1e3..c710e71 100644
--- a/netslide.c
+++ b/netslide.c
@@ -1827,5 +1827,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/nullgame.c b/nullgame.c
index 6463bf7..799a8a5 100644
--- a/nullgame.c
+++ b/nullgame.c
@@ -289,5 +289,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/pattern.c b/pattern.c
index dd664f5..f034bd4 100644
--- a/pattern.c
+++ b/pattern.c
@@ -1281,7 +1281,7 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
#ifdef STANDALONE_SOLVER
diff --git a/pegs.c b/pegs.c
index e4549db..9b98c70 100644
--- a/pegs.c
+++ b/pegs.c
@@ -1224,5 +1224,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/puzzles.h b/puzzles.h
index 659afa6..f4fc67f 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -60,12 +60,14 @@ enum {
#define IS_MOUSE_RELEASE(m) ( (unsigned)((m) - LEFT_RELEASE) <= \
(unsigned)(RIGHT_RELEASE - LEFT_RELEASE))
+/*
+ * Flags in the back end's `flags' word.
+ */
/* Bit flags indicating mouse button priorities */
#define BUTTON_BEATS(x,y) ( 1 << (((x)-LEFT_BUTTON)*3+(y)-LEFT_BUTTON) )
-
-/* Another random flag that goes in the mouse priorities section for want
- * of a better place to put it */
+/* Flag indicating that Solve operations should be animated */
#define SOLVE_ANIMATES ( 1 << 9 )
+/* end of `flags' word definitions */
#define IGNOREARG(x) ( (x) = (x) )
@@ -397,7 +399,7 @@ struct game {
int (*wants_statusbar)(void);
int is_timed;
int (*timing_state)(game_state *state, game_ui *ui);
- int mouse_priorities;
+ int flags;
};
/*
diff --git a/rect.c b/rect.c
index 9b78089..60c8e94 100644
--- a/rect.c
+++ b/rect.c
@@ -2874,5 +2874,5 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/samegame.c b/samegame.c
index 781cbcc..387216d 100644
--- a/samegame.c
+++ b/samegame.c
@@ -1664,5 +1664,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/sixteen.c b/sixteen.c
index 51771a8..fbed055 100644
--- a/sixteen.c
+++ b/sixteen.c
@@ -1059,5 +1059,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/slant.c b/slant.c
index c7aa169..ebc5bbb 100644
--- a/slant.c
+++ b/slant.c
@@ -2089,7 +2089,7 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
#ifdef STANDALONE_SOLVER
diff --git a/solo.c b/solo.c
index 2079da9..eb8ad80 100644
--- a/solo.c
+++ b/solo.c
@@ -3090,7 +3090,7 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
#ifdef STANDALONE_SOLVER
diff --git a/tents.c b/tents.c
index 8a555b4..869ba5e 100644
--- a/tents.c
+++ b/tents.c
@@ -2091,7 +2091,7 @@ const struct game thegame = {
TRUE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
#ifdef STANDALONE_SOLVER
diff --git a/twiddle.c b/twiddle.c
index 8711ada..b366fd7 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -1226,5 +1226,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ 0, /* flags */
};
diff --git a/untangle.c b/untangle.c
index a88e6d8..3d0918a 100644
--- a/untangle.c
+++ b/untangle.c
@@ -1463,5 +1463,5 @@ const struct game thegame = {
FALSE, FALSE, game_print_size, game_print,
game_wants_statusbar,
FALSE, game_timing_state,
- SOLVE_ANIMATES, /* mouse_priorities */
+ SOLVE_ANIMATES, /* flags */
};