aboutsummaryrefslogtreecommitdiff
path: root/unfinished
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-04-24 16:00:24 +0100
committerSimon Tatham <anakin@pobox.com>2017-04-26 21:51:23 +0100
commita7dc17c4258837b0ee3927f1db5e1c02acee5cc3 (patch)
tree731c1ac2fe23e9f42d857ad48eaefd1b0c14e44e /unfinished
parentbc2c1f69fddac3a51d086fb379f0ec8954f4b894 (diff)
downloadpuzzles-a7dc17c4258837b0ee3927f1db5e1c02acee5cc3.zip
puzzles-a7dc17c4258837b0ee3927f1db5e1c02acee5cc3.tar.gz
puzzles-a7dc17c4258837b0ee3927f1db5e1c02acee5cc3.tar.bz2
puzzles-a7dc17c4258837b0ee3927f1db5e1c02acee5cc3.tar.xz
Rework the preset menu system to permit submenus.
To do this, I've completely replaced the API between mid-end and front end, so any downstream front end maintainers will have to do some rewriting of their own (sorry). I've done the necessary work in all five of the front ends I keep in-tree here - Windows, GTK, OS X, Javascript/Emscripten, and Java/NestedVM - and I've done it in various different styles (as each front end found most convenient), so that should provide a variety of sample code to show downstreams how, if they should need it. I've left in the old puzzle back-end API function to return a flat list of presets, so for the moment, all the puzzle backends are unchanged apart from an extra null pointer appearing in their top-level game structure. In a future commit I'll actually use the new feature in a puzzle; perhaps in the further future it might make sense to migrate all the puzzles to the new API and stop providing back ends with two alternative ways of doing things, but this seemed like enough upheaval for one day.
Diffstat (limited to 'unfinished')
-rw-r--r--unfinished/group.c2
-rw-r--r--unfinished/separate.c2
-rw-r--r--unfinished/slide.c2
-rw-r--r--unfinished/sokoban.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/unfinished/group.c b/unfinished/group.c
index bec826e..4a4ad6c 100644
--- a/unfinished/group.c
+++ b/unfinished/group.c
@@ -2067,7 +2067,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize)
const struct game thegame = {
"Group", NULL, NULL,
default_params,
- game_fetch_preset,
+ game_fetch_preset, NULL,
decode_params,
encode_params,
free_params,
diff --git a/unfinished/separate.c b/unfinished/separate.c
index 898304a..a7b4fc9 100644
--- a/unfinished/separate.c
+++ b/unfinished/separate.c
@@ -823,7 +823,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize)
const struct game thegame = {
"Separate", NULL, NULL,
default_params,
- game_fetch_preset,
+ game_fetch_preset, NULL,
decode_params,
encode_params,
free_params,
diff --git a/unfinished/slide.c b/unfinished/slide.c
index b1aa04b..9d4fce1 100644
--- a/unfinished/slide.c
+++ b/unfinished/slide.c
@@ -2320,7 +2320,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize)
const struct game thegame = {
"Slide", NULL, NULL,
default_params,
- game_fetch_preset,
+ game_fetch_preset, NULL,
decode_params,
encode_params,
free_params,
diff --git a/unfinished/sokoban.c b/unfinished/sokoban.c
index b5533c9..2f0af35 100644
--- a/unfinished/sokoban.c
+++ b/unfinished/sokoban.c
@@ -1443,7 +1443,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize)
const struct game thegame = {
"Sokoban", NULL, NULL,
default_params,
- game_fetch_preset,
+ game_fetch_preset, NULL,
decode_params,
encode_params,
free_params,