~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First cut at a game timer. Yet another backend function which
[sgt/puzzles]
/
pattern.c
diff --git
a/pattern.c
b/pattern.c
index
e09ed3d
..
c5fd9dc
100644
(file)
--- a/
pattern.c
+++ b/
pattern.c
@@
-601,7
+601,7
@@
static char *validate_desc(game_params *params, char *desc)
return NULL;
}
return NULL;
}
-static game_state *new_game(game_params *params, char *desc)
+static game_state *new_game(
midend_data *me,
game_params *params, char *desc)
{
int i;
char *p;
{
int i;
char *p;
@@
-1086,13
+1086,13
@@
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
)
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate,
{
return 0.0F;
}
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->cheated && !newstate->cheated)
{
if (!oldstate->completed && newstate->completed &&
!oldstate->cheated && !newstate->cheated)
@@
-1105,6
+1105,11
@@
static int game_wants_statusbar(void)
return FALSE;
}
return FALSE;
}
+static int game_timing_state(game_state *state)
+{
+ return TRUE;
+}
+
#ifdef COMBINED
#define thegame pattern
#endif
#ifdef COMBINED
#define thegame pattern
#endif
@@
-1138,6
+1143,7
@@
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,
};
#ifdef STANDALONE_SOLVER
};
#ifdef STANDALONE_SOLVER