mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -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:
3
midend.c
3
midend.c
@ -2542,7 +2542,8 @@ static const char *midend_deserialise_internal(
|
||||
|
||||
data.ui = me->ourgame->new_ui(data.states[0].state);
|
||||
if (data.uistr && me->ourgame->decode_ui)
|
||||
me->ourgame->decode_ui(data.ui, data.uistr);
|
||||
me->ourgame->decode_ui(data.ui, data.uistr,
|
||||
data.states[data.statepos-1].state);
|
||||
|
||||
/*
|
||||
* Run the externally provided check function, and abort if it
|
||||
|
Reference in New Issue
Block a user