ref: e72931bfe27e7d7303a22717cce05721551f3e4a
parent: 5649e20ef2f17d03ba1d5e0072617541aa880224
author: Simon Tatham <anakin@pobox.com>
date: Sun May 1 07:07:13 EDT 2005
I can never remember what that `TRUE' means in the game structure 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]
--- a/cube.c
+++ b/cube.c
@@ -1531,7 +1531,7 @@
#endif
const struct game thegame = {
- "Cube", "games.cube", TRUE,
+ "Cube", "games.cube",
default_params,
game_fetch_preset,
decode_params,
@@ -1538,8 +1538,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/fifteen.c
+++ b/fifteen.c
@@ -724,7 +724,7 @@
#endif
const struct game thegame = {
- "Fifteen", "games.fifteen", TRUE,
+ "Fifteen", "games.fifteen",
default_params,
game_fetch_preset,
decode_params,
@@ -731,8 +731,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/net.c
+++ b/net.c
@@ -1494,7 +1494,7 @@
#endif
const struct game thegame = {
- "Net", "games.net", TRUE,
+ "Net", "games.net",
default_params,
game_fetch_preset,
decode_params,
@@ -1501,8 +1501,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/netslide.c
+++ b/netslide.c
@@ -1518,7 +1518,7 @@
#endif
const struct game thegame = {
- "Netslide", "games.netslide", TRUE,
+ "Netslide", "games.netslide",
default_params,
game_fetch_preset,
decode_params,
@@ -1525,8 +1525,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/nullgame.c
+++ b/nullgame.c
@@ -208,7 +208,7 @@
#endif
const struct game thegame = {
- "Null Game", NULL, FALSE,
+ "Null Game", NULL,
default_params,
game_fetch_preset,
decode_params,
@@ -215,8 +215,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ FALSE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/pattern.c
+++ b/pattern.c
@@ -1015,7 +1015,7 @@
#endif
const struct game thegame = {
- "Pattern", "games.pattern", TRUE,
+ "Pattern", "games.pattern",
default_params,
game_fetch_preset,
decode_params,
@@ -1022,8 +1022,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/puzzles.h
+++ b/puzzles.h
@@ -178,7 +178,6 @@
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);
@@ -185,6 +184,7 @@
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);
--- a/rect.c
+++ b/rect.c
@@ -1600,7 +1600,7 @@
#endif
const struct game thegame = {
- "Rectangles", "games.rectangles", TRUE,
+ "Rectangles", "games.rectangles",
default_params,
game_fetch_preset,
decode_params,
@@ -1607,8 +1607,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/sixteen.c
+++ b/sixteen.c
@@ -774,7 +774,7 @@
#endif
const struct game thegame = {
- "Sixteen", "games.sixteen", TRUE,
+ "Sixteen", "games.sixteen",
default_params,
game_fetch_preset,
decode_params,
@@ -781,8 +781,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/solo.c
+++ b/solo.c
@@ -1887,7 +1887,7 @@
#endif
const struct game thegame = {
- "Solo", "games.solo", TRUE,
+ "Solo", "games.solo",
default_params,
game_fetch_preset,
decode_params,
@@ -1894,8 +1894,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,
--- a/twiddle.c
+++ b/twiddle.c
@@ -928,7 +928,7 @@
#endif
const struct game thegame = {
- "Twiddle", "games.twiddle", TRUE,
+ "Twiddle", "games.twiddle",
default_params,
game_fetch_preset,
decode_params,
@@ -935,8 +935,7 @@
encode_params,
free_params,
dup_params,
- game_configure,
- custom_params,
+ TRUE, game_configure, custom_params,
validate_params,
new_game_seed,
validate_seed,