aboutsummaryrefslogtreecommitdiff
path: root/devel.but
diff options
context:
space:
mode:
Diffstat (limited to 'devel.but')
-rw-r--r--devel.but7
1 files changed, 5 insertions, 2 deletions
diff --git a/devel.but b/devel.but
index 9ce8eee..ae0a84d 100644
--- a/devel.but
+++ b/devel.but
@@ -890,14 +890,17 @@ 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);
+\c void (*decode_ui)(game_ui *ui, const char *encoding,
+\c const game_state *state);
This function parses a string previously output by \cw{encode_ui()},
and writes the decoded data back into the freshly-created \c{game_ui}
structure provided. If the string is invalid, the function should do
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.
+simply from a newer version that encodes more \c{game_ui} data. The
+current \c{game_state} is provided in case the function needs to
+refer to it for validation.
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}.