diff --git a/bridges.c b/bridges.c index e96861e..7043950 100644 --- a/bridges.c +++ b/bridges.c @@ -2141,15 +2141,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -3294,8 +3285,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/cube.c b/cube.c index 46bd745..0512746 100644 --- a/cube.c +++ b/cube.c @@ -1038,15 +1038,6 @@ static void free_ui(game_ui *ui) { } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1771,8 +1762,8 @@ const struct game thegame = { false, NULL, NULL, /* can_format_as_text_now, text_format */ new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/devel.but b/devel.but index 6496aef..9ce8eee 100644 --- a/devel.but +++ b/devel.but @@ -885,6 +885,9 @@ user could edit the save file by hand... But if the user is \e{that} determined to cheat, they could just as easily modify the game's source.) +The \cw{encode_ui()} function is optional. If a back-end doesn't need +this function it can just set the pointer to \cw{NULL}. + \S{backend-decode-ui} \cw{decode_ui()} \c void (*decode_ui)(game_ui *ui, const char *encoding); @@ -896,6 +899,9 @@ the best it can, which might just mean not changing the \c{game_ui} structure at all. This might happen if a save file is corrupted, or simply from a newer version that encodes more \c{game_ui} data. +Like \cw{encode_ui()}, \cw{decode_ui()} is optional. If a back-end +doesn't need this function it can just set the pointer to \cw{NULL}. + \S{backend-changed-state} \cw{changed_state()} \c void (*changed_state)(game_ui *ui, const game_state *oldstate, diff --git a/dominosa.c b/dominosa.c index e529376..eba9465 100644 --- a/dominosa.c +++ b/dominosa.c @@ -2727,15 +2727,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -3446,8 +3437,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/fifteen.c b/fifteen.c index f453d59..5d01aa2 100644 --- a/fifteen.c +++ b/fifteen.c @@ -458,15 +458,6 @@ static void free_ui(game_ui *ui) { } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1105,8 +1096,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/filling.c b/filling.c index 0c2d292..7e74e2d 100644 --- a/filling.c +++ b/filling.c @@ -1413,15 +1413,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2179,8 +2170,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ game_request_keys, game_changed_state, current_key_label, diff --git a/flip.c b/flip.c index 267e5a2..d989a28 100644 --- a/flip.c +++ b/flip.c @@ -926,15 +926,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1348,8 +1339,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/flood.c b/flood.c index c5fc10c..f1c40f1 100644 --- a/flood.c +++ b/flood.c @@ -790,15 +790,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1376,8 +1367,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/galaxies.c b/galaxies.c index 0b10b59..beb53fe 100644 --- a/galaxies.c +++ b/galaxies.c @@ -2701,15 +2701,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -4137,8 +4128,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, #ifdef EDITOR diff --git a/keen.c b/keen.c index baf8a43..cea8061 100644 --- a/keen.c +++ b/keen.c @@ -1544,15 +1544,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2488,8 +2479,8 @@ const struct game thegame = { false, NULL, NULL, /* can_format_as_text_now, text_format */ new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ game_request_keys, game_changed_state, current_key_label, diff --git a/lightup.c b/lightup.c index 35705a6..f60017f 100644 --- a/lightup.c +++ b/lightup.c @@ -1848,17 +1848,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - /* nothing to encode. */ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ - /* nothing to decode. */ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2343,8 +2332,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/loopy.c b/loopy.c index bd37a5a..8f5a8a0 100644 --- a/loopy.c +++ b/loopy.c @@ -879,15 +879,6 @@ static void free_ui(game_ui *ui) { } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -3681,8 +3672,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/magnets.c b/magnets.c index 82d6ccd..45ebc83 100644 --- a/magnets.c +++ b/magnets.c @@ -1745,15 +1745,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2468,8 +2459,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/map.c b/map.c index a9b2347..fff4486 100644 --- a/map.c +++ b/map.c @@ -2302,15 +2302,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -3267,8 +3258,8 @@ const struct game thegame = { false, NULL, NULL, /* can_format_as_text_now, text_format */ new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/midend.c b/midend.c index e66d15a..2e49e8d 100644 --- a/midend.c +++ b/midend.c @@ -2204,7 +2204,7 @@ void midend_serialise(midend *me, /* * Any required serialisation of the game_ui. */ - if (me->ui) { + if (me->ui && me->ourgame->encode_ui) { char *s = me->ourgame->encode_ui(me->ui); if (s) { wr("UI", s); @@ -2541,7 +2541,7 @@ static const char *midend_deserialise_internal( } data.ui = me->ourgame->new_ui(data.states[0].state); - if (data.uistr) + if (data.uistr && me->ourgame->decode_ui) me->ourgame->decode_ui(data.ui, data.uistr); /* diff --git a/mosaic.c b/mosaic.c index 752caab..98e7077 100644 --- a/mosaic.c +++ b/mosaic.c @@ -1022,15 +1022,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1620,8 +1611,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/netslide.c b/netslide.c index eab44a9..164bf9c 100644 --- a/netslide.c +++ b/netslide.c @@ -983,15 +983,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - /* ---------------------------------------------------------------------- * Process a move. */ @@ -1869,8 +1860,8 @@ const struct game thegame = { false, NULL, NULL, /* can_format_as_text_now, text_format */ new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/nullgame.c b/nullgame.c index 9c5f868..aa5ca99 100644 --- a/nullgame.c +++ b/nullgame.c @@ -121,15 +121,6 @@ static void free_ui(game_ui *ui) { } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -248,8 +239,8 @@ const struct game thegame = { false, NULL, NULL, /* can_format_as_text_now, text_format */ new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/palisade.c b/palisade.c index ec9ddaf..458ce37 100644 --- a/palisade.c +++ b/palisade.c @@ -887,15 +887,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1388,8 +1379,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/pattern.c b/pattern.c index fa6213e..4fd6753 100644 --- a/pattern.c +++ b/pattern.c @@ -1250,15 +1250,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2087,8 +2078,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/pearl.c b/pearl.c index a54ae15..c668641 100644 --- a/pearl.c +++ b/pearl.c @@ -1878,15 +1878,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2729,8 +2720,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/pegs.c b/pegs.c index 06a312d..7cd33e8 100644 --- a/pegs.c +++ b/pegs.c @@ -813,15 +813,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1372,8 +1363,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/range.c b/range.c index 3e7b00c..8b1b602 100644 --- a/range.c +++ b/range.c @@ -1240,15 +1240,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static const char *current_key_label(const game_ui *ui, const game_state *state, int button) { @@ -1831,8 +1822,8 @@ struct game const thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/rect.c b/rect.c index bc7e179..00e84c4 100644 --- a/rect.c +++ b/rect.c @@ -2220,15 +2220,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void coord_round(float x, float y, int *xr, int *yr) { float xs, ys, xv, yv, dx, dy, dist; @@ -3004,8 +2995,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/samegame.c b/samegame.c index caa8141..d1f1f2e 100644 --- a/samegame.c +++ b/samegame.c @@ -1077,15 +1077,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void sel_clear(game_ui *ui, const game_state *state) { int i; @@ -1677,8 +1668,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/signpost.c b/signpost.c index 910de48..f568488 100644 --- a/signpost.c +++ b/signpost.c @@ -1410,15 +1410,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2293,8 +2284,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/singles.c b/singles.c index 485529a..a977d10 100644 --- a/singles.c +++ b/singles.c @@ -1461,15 +1461,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1861,8 +1852,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/sixteen.c b/sixteen.c index c540438..01fd6df 100644 --- a/sixteen.c +++ b/sixteen.c @@ -584,15 +584,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1202,8 +1193,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/slant.c b/slant.c index 65f5329..13ba366 100644 --- a/slant.c +++ b/slant.c @@ -1595,15 +1595,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2186,8 +2177,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/solo.c b/solo.c index 208c705..83bdeb8 100644 --- a/solo.c +++ b/solo.c @@ -4573,15 +4573,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -5639,8 +5630,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ game_request_keys, game_changed_state, current_key_label, diff --git a/tents.c b/tents.c index 86b5245..9f904f9 100644 --- a/tents.c +++ b/tents.c @@ -1468,15 +1468,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2656,8 +2647,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/towers.c b/towers.c index 04abed0..43d5f03 100644 --- a/towers.c +++ b/towers.c @@ -1177,15 +1177,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2063,8 +2054,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ game_request_keys, game_changed_state, current_key_label, diff --git a/tracks.c b/tracks.c index ea48510..f4672d2 100644 --- a/tracks.c +++ b/tracks.c @@ -2033,15 +2033,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -3056,8 +3047,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/twiddle.c b/twiddle.c index c3b4764..626b621 100644 --- a/twiddle.c +++ b/twiddle.c @@ -632,15 +632,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1316,8 +1307,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/undead.c b/undead.c index a1bd9fd..d4f0ee1 100644 --- a/undead.c +++ b/undead.c @@ -1661,16 +1661,6 @@ static void free_ui(game_ui *ui) { return; } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ - return; -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2796,8 +2786,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ game_request_keys, game_changed_state, current_key_label, diff --git a/unequal.c b/unequal.c index 12cdd7c..f6ce50f 100644 --- a/unequal.c +++ b/unequal.c @@ -1454,15 +1454,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2163,8 +2154,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ game_request_keys, game_changed_state, current_key_label, diff --git a/unfinished/group.c b/unfinished/group.c index bbac220..7a2ffe6 100644 --- a/unfinished/group.c +++ b/unfinished/group.c @@ -1272,15 +1272,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2332,8 +2323,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/unfinished/separate.c b/unfinished/separate.c index d3423de..324a966 100644 --- a/unfinished/separate.c +++ b/unfinished/separate.c @@ -705,15 +705,6 @@ static void free_ui(game_ui *ui) { } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -845,8 +836,8 @@ const struct game thegame = { false, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/unfinished/slide.c b/unfinished/slide.c index 115230f..fe573e8 100644 --- a/unfinished/slide.c +++ b/unfinished/slide.c @@ -1217,15 +1217,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2337,8 +2328,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/unfinished/sokoban.c b/unfinished/sokoban.c index bef7d72..65d1fa6 100644 --- a/unfinished/sokoban.c +++ b/unfinished/sokoban.c @@ -927,15 +927,6 @@ static void free_ui(game_ui *ui) { } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1459,8 +1450,8 @@ const struct game thegame = { false, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */ diff --git a/unruly.c b/unruly.c index 4b48f16..a8df09a 100644 --- a/unruly.c +++ b/unruly.c @@ -1527,15 +1527,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -2039,8 +2030,8 @@ const struct game thegame = { true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, current_key_label, diff --git a/untangle.c b/untangle.c index 62d5897..85d8fc9 100644 --- a/untangle.c +++ b/untangle.c @@ -1055,15 +1055,6 @@ static void free_ui(game_ui *ui) sfree(ui); } -static char *encode_ui(const game_ui *ui) -{ - return NULL; -} - -static void decode_ui(game_ui *ui, const char *encoding) -{ -} - static void game_changed_state(game_ui *ui, const game_state *oldstate, const game_state *newstate) { @@ -1465,8 +1456,8 @@ const struct game thegame = { false, NULL, NULL, /* can_format_as_text_now, text_format */ new_ui, free_ui, - encode_ui, - decode_ui, + NULL, /* encode_ui */ + NULL, /* decode_ui */ NULL, /* game_request_keys */ game_changed_state, NULL, /* current_key_label */