~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check return values from fwrite when saving files.
[sgt/puzzles]
/
unfinished
/
sokoban.c
diff --git
a/unfinished/sokoban.c
b/unfinished/sokoban.c
index
d67f907
..
91f02a6
100644
(file)
--- a/
unfinished/sokoban.c
+++ b/
unfinished/sokoban.c
@@
-99,8
+99,8
@@
#define BARREL_LABEL(b) ( (b)>='A'&&(b)<='Z' ? (b) : \
(b)>=1 && (b)<=26 ? (b)+('A'-1) : 0 )
#define BARREL_LABEL(b) ( (b)>='A'&&(b)<='Z' ? (b) : \
(b)>=1 && (b)<=26 ? (b)+('A'-1) : 0 )
-#define DX(d) (d == 0 ? -1 : d == 2 ? +1 : 0)
;
-#define DY(d) (d == 1 ? -1 : d == 3 ? +1 : 0)
;
+#define DX(d) (d == 0 ? -1 : d == 2 ? +1 : 0)
+#define DY(d) (d == 1 ? -1 : d == 3 ? +1 : 0)
#define FLASH_LENGTH 0.3F
#define FLASH_LENGTH 0.3F
@@
-907,6
+907,11
@@
static char *solve_game(game_state *state, game_state *currstate,
return NULL;
}
return NULL;
}
+static int game_can_format_as_text_now(game_params *params)
+{
+ return TRUE;
+}
+
static char *game_text_format(game_state *state)
{
return NULL;
static char *game_text_format(game_state *state)
{
return NULL;
@@
-1414,7
+1419,7
@@
static void game_print(drawing *dr, game_state *state, int tilesize)
#endif
const struct game thegame = {
#endif
const struct game thegame = {
- "Sokoban", NULL,
+ "Sokoban", NULL,
NULL,
default_params,
game_fetch_preset,
decode_params,
default_params,
game_fetch_preset,
decode_params,
@@
-1429,7
+1434,7
@@
const struct game thegame = {
dup_game,
free_game,
FALSE, solve_game,
dup_game,
free_game,
FALSE, solve_game,
- FALSE, game_text_format,
+ FALSE, game_
can_format_as_text_now, game_
text_format,
new_ui,
free_ui,
encode_ui,
new_ui,
free_ui,
encode_ui,