chiark / gitweb /
I can never remember what that `TRUE' means in the game structure
authorSimon Tatham <anakin@pobox.com>
Sun, 1 May 2005 11:07:13 +0000 (11:07 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 1 May 2005 11:07:13 +0000 (11:07 +0000)
definitions, so let's move it so that it's just next to the
functions it relates to. This also opens the way for me to add more
booleans next to other functions without getting confused as to
which is which.

[originally from svn r5723]

cube.c
fifteen.c
net.c
netslide.c
nullgame.c
pattern.c
puzzles.h
rect.c
sixteen.c
solo.c
twiddle.c

diff --git a/cube.c b/cube.c
index 145a1e5d58e493d55aebd0cf49fc8a0ac4073bac..33144b6102b400ddc2928237779c3825365dca18 100644 (file)
--- a/cube.c
+++ b/cube.c
@@ -1531,15 +1531,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Cube", "games.cube", TRUE,
+    "Cube", "games.cube",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index 2263bc1a1998b744d9283a66a12ba8df93c61156..dc265bed5fe6c2bed9113c3cf672a2df20dadb3d 100644 (file)
--- a/fifteen.c
+++ b/fifteen.c
@@ -724,15 +724,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Fifteen", "games.fifteen", TRUE,
+    "Fifteen", "games.fifteen",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
diff --git a/net.c b/net.c
index 7b3a501bac49a921437c9d5768877e7b3988aa5a..d41cebed97edeb8f505efc40a824c290aafca640 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1494,15 +1494,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Net", "games.net", TRUE,
+    "Net", "games.net",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index aee6e245390d5af23724ad15c0ff1681677c803a..9f334f6229a0c82efa80e9f7649ba0e972854095 100644 (file)
@@ -1518,15 +1518,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Netslide", "games.netslide", TRUE,
+    "Netslide", "games.netslide",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index 3d5270d05b1998b8f975113942c040d2c808ef6c..a071971b8d1ee07c745a6d83b750575f59453fe6 100644 (file)
@@ -208,15 +208,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Null Game", NULL, FALSE,
+    "Null Game", NULL,
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    FALSE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index cbedbf6a090188d0e33078e4492d7315d669419d..61f15ff5a8501290926acea2ea346f0698d90fe9 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1015,15 +1015,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Pattern", "games.pattern", TRUE,
+    "Pattern", "games.pattern",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index e873351c014d9413d2b11e96600951acaf57573b..e62a27cd2130500d97623d951675760a987cd2c9 100644 (file)
--- a/puzzles.h
+++ b/puzzles.h
@@ -178,13 +178,13 @@ void random_free(random_state *state);
 struct game {
     const char *name;
     const char *winhelp_topic;
-    int can_configure;
     game_params *(*default_params)(void);
     int (*fetch_preset)(int i, char **name, game_params **params);
     game_params *(*decode_params)(char const *string);
     char *(*encode_params)(game_params *);
     void (*free_params)(game_params *params);
     game_params *(*dup_params)(game_params *params);
+    int can_configure;
     config_item *(*configure)(game_params *params);
     game_params *(*custom_params)(config_item *cfg);
     char *(*validate_params)(game_params *params);
diff --git a/rect.c b/rect.c
index e3914b054ad5517cfe564049350cc4707e0a9d0e..5ab296a34a4241ed988c112eac548d816878c850 100644 (file)
--- a/rect.c
+++ b/rect.c
@@ -1600,15 +1600,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Rectangles", "games.rectangles", TRUE,
+    "Rectangles", "games.rectangles",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index 828168e6954147dba364c0308792fee3baf7134c..c90062bd8b7412b19ac497250d57071e2243136e 100644 (file)
--- a/sixteen.c
+++ b/sixteen.c
@@ -774,15 +774,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Sixteen", "games.sixteen", TRUE,
+    "Sixteen", "games.sixteen",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
diff --git a/solo.c b/solo.c
index f6d28ecebb7a33a959ac5aef3722bfadc516efa3..c60cd66c86c773daf48273d1f0fba563e68892bd 100644 (file)
--- a/solo.c
+++ b/solo.c
@@ -1887,15 +1887,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Solo", "games.solo", TRUE,
+    "Solo", "games.solo",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,
index 1992c01975f999dcb25e7db31b50f3b8efee5510..0bfdabe24dc6a37012b544d094bd9d25b4c7512e 100644 (file)
--- a/twiddle.c
+++ b/twiddle.c
@@ -928,15 +928,14 @@ static int game_wants_statusbar(void)
 #endif
 
 const struct game thegame = {
-    "Twiddle", "games.twiddle", TRUE,
+    "Twiddle", "games.twiddle",
     default_params,
     game_fetch_preset,
     decode_params,
     encode_params,
     free_params,
     dup_params,
-    game_configure,
-    custom_params,
+    TRUE, game_configure, custom_params,
     validate_params,
     new_game_seed,
     validate_seed,