~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Chris's patch to stop Mines depending on char being signed.
[sgt/puzzles]
/
fifteen.c
diff --git
a/fifteen.c
b/fifteen.c
index
9d138b1
..
e7a41ef
100644
(file)
--- a/
fifteen.c
+++ b/
fifteen.c
@@
-151,7
+151,7
@@
static int perm_parity(int *perm, int n)
}
static char *new_game_desc(game_params *params, random_state *rs,
}
static char *new_game_desc(game_params *params, random_state *rs,
- game_aux_info **aux)
+ game_aux_info **aux
, int interactive
)
{
int gap, n, i, x;
int x1, x2, p1, p2, parity;
{
int gap, n, i, x;
int x1, x2, p1, p2, parity;
@@
-322,7
+322,7
@@
static char *validate_desc(game_params *params, char *desc)
return err;
}
return err;
}
-static game_state *new_game(game_params *params, char *desc)
+static game_state *new_game(
midend_data *me,
game_params *params, char *desc)
{
game_state *state = snew(game_state);
int i;
{
game_state *state = snew(game_state);
int i;
@@
-456,6
+456,8
@@
static game_state *make_move(game_state *from, game_ui *ui,
int gx, gy, dx, dy, ux, uy, up, p;
game_state *ret;
int gx, gy, dx, dy, ux, uy, up, p;
game_state *ret;
+ button &= ~MOD_MASK;
+
gx = X(from, from->gap_pos);
gy = Y(from, from->gap_pos);
gx = X(from, from->gap_pos);
gy = Y(from, from->gap_pos);
@@
-776,7
+778,7
@@
static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
}
static float game_anim_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir
, game_ui *ui
)
{
if ((dir > 0 && newstate->just_used_solve) ||
(dir < 0 && oldstate->just_used_solve))
{
if ((dir > 0 && newstate->just_used_solve) ||
(dir < 0 && oldstate->just_used_solve))
@@
-786,7
+788,7
@@
static float game_anim_length(game_state *oldstate,
}
static float game_flash_length(game_state *oldstate,
}
static float game_flash_length(game_state *oldstate,
- game_state *newstate, int dir)
+ game_state *newstate, int dir
, game_ui *ui
)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->used_solve && !newstate->used_solve)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->used_solve && !newstate->used_solve)
@@
-800,6
+802,11
@@
static int game_wants_statusbar(void)
return TRUE;
}
return TRUE;
}
+static int game_timing_state(game_state *state)
+{
+ return TRUE;
+}
+
#ifdef COMBINED
#define thegame fifteen
#endif
#ifdef COMBINED
#define thegame fifteen
#endif
@@
-833,4
+840,5
@@
const struct game thegame = {
game_anim_length,
game_flash_length,
game_wants_statusbar,
game_anim_length,
game_flash_length,
game_wants_statusbar,
+ FALSE, game_timing_state,
};
};