mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
Another function pair required for serialisation; these ones save
and restore anything vitally important in the game_ui. Most of the game_ui is expected to be stuff about cursor positions and currently active mouse drags, so it absolutely _doesn't_ want to be preserved over a serialisation; but one or two things would be disorienting or outright wrong to reset, such as the Net origin position and the Mines death counter. [originally from svn r6026]
This commit is contained in:
11
rect.c
11
rect.c
@ -2170,6 +2170,15 @@ static void free_ui(game_ui *ui)
|
||||
sfree(ui);
|
||||
}
|
||||
|
||||
char *encode_ui(game_ui *ui)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void decode_ui(game_ui *ui, char *encoding)
|
||||
{
|
||||
}
|
||||
|
||||
static void coord_round(float x, float y, int *xr, int *yr)
|
||||
{
|
||||
float xs, ys, xv, yv, dx, dy, dist;
|
||||
@ -2799,6 +2808,8 @@ const struct game thegame = {
|
||||
TRUE, game_text_format,
|
||||
new_ui,
|
||||
free_ui,
|
||||
encode_ui,
|
||||
decode_ui,
|
||||
game_changed_state,
|
||||
interpret_move,
|
||||
execute_move,
|
||||
|
Reference in New Issue
Block a user