~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Arrange that random seeds are as harmonised as they can reasonably
[sgt/puzzles]
/
nullgame.c
diff --git
a/nullgame.c
b/nullgame.c
index
a071971
..
49173b6
100644
(file)
--- a/
nullgame.c
+++ b/
nullgame.c
@@
-59,16
+59,11
@@
static game_params *dup_params(game_params *params)
return ret;
}
return ret;
}
-static
game_params *decode_params(
char const *string)
+static
void decode_params(game_params *params,
char const *string)
{
{
- game_params *ret = snew(game_params);
-
- ret->FIXME = 0;
-
- return ret;
}
}
-static char *encode_params(game_params *params)
+static char *encode_params(game_params *params
, int full
)
{
return dupstr("FIXME");
}
{
return dupstr("FIXME");
}
@@
-88,17
+83,23
@@
static char *validate_params(game_params *params)
return NULL;
}
return NULL;
}
-static char *new_game_seed(game_params *params, random_state *rs)
+static char *new_game_desc(game_params *params, random_state *rs,
+ game_aux_info **aux, int interactive)
{
return dupstr("FIXME");
}
{
return dupstr("FIXME");
}
-static char *validate_seed(game_params *params, char *seed)
+static void game_free_aux_info(game_aux_info *aux)
+{
+ assert(!"Shouldn't happen");
+}
+
+static char *validate_desc(game_params *params, char *desc)
{
return NULL;
}
{
return NULL;
}
-static game_state *new_game(
game_params *params, char *seed
)
+static game_state *new_game(
midend_data *me, game_params *params, char *desc
)
{
game_state *state = snew(game_state);
{
game_state *state = snew(game_state);
@@
-121,6
+122,17
@@
static void free_game(game_state *state)
sfree(state);
}
sfree(state);
}
+static game_state *solve_game(game_state *state, game_aux_info *aux,
+ char **error)
+{
+ return NULL;
+}
+
+static char *game_text_format(game_state *state)
+{
+ return NULL;
+}
+
static game_ui *new_ui(game_state *state)
{
return NULL;
static game_ui *new_ui(game_state *state)
{
return NULL;
@@
-130,8
+142,8
@@
static void free_ui(game_ui *ui)
{
}
{
}
-static game_state *make_move(game_state *from, game_ui *ui,
int x, int y
,
- int button)
+static game_state *make_move(game_state *from, game_ui *ui,
game_drawstate *ds
,
+
int x, int y,
int button)
{
return NULL;
}
{
return NULL;
}
@@
-187,13
+199,13
@@
static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
}
static float game_anim_length(game_state *oldstate, game_state *newstate,
}
static float game_anim_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir
, game_ui *ui
)
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate, game_state *newstate,
{
return 0.0F;
}
static float game_flash_length(game_state *oldstate, game_state *newstate,
- int dir)
+ int dir
, game_ui *ui
)
{
return 0.0F;
}
{
return 0.0F;
}
@@
-203,6
+215,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 nullgame
#endif
#ifdef COMBINED
#define thegame nullgame
#endif
@@
-217,11
+234,14
@@
const struct game thegame = {
dup_params,
FALSE, game_configure, custom_params,
validate_params,
dup_params,
FALSE, game_configure, custom_params,
validate_params,
- new_game_seed,
- validate_seed,
+ new_game_desc,
+ game_free_aux_info,
+ validate_desc,
new_game,
dup_game,
free_game,
new_game,
dup_game,
free_game,
+ FALSE, solve_game,
+ FALSE, game_text_format,
new_ui,
free_ui,
make_move,
new_ui,
free_ui,
make_move,
@@
-233,4
+253,6
@@
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,
+ 0, /* mouse_priorities */
};
};