mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
Add a game_state argument to decode_ui()
Some games would like a way to check that the parameters in the encoded UI string are consistent with the game parameters. Since this might depend on the current state of the game (this being what changed_state() is for), implement this by adding a game_state parameter to decode_ui(). Nothing currently uses it, though Guess usefully could.
This commit is contained in:
@ -664,7 +664,8 @@ struct game {
|
||||
game_ui *(*new_ui)(const game_state *state);
|
||||
void (*free_ui)(game_ui *ui);
|
||||
char *(*encode_ui)(const game_ui *ui);
|
||||
void (*decode_ui)(game_ui *ui, const char *encoding);
|
||||
void (*decode_ui)(game_ui *ui, const char *encoding,
|
||||
const game_state *state);
|
||||
key_label *(*request_keys)(const game_params *params, int *nkeys);
|
||||
void (*changed_state)(game_ui *ui, const game_state *oldstate,
|
||||
const game_state *newstate);
|
||||
|
Reference in New Issue
Block a user