~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warnings generated by gcc 4.6.0 about variables set but not
[sgt/puzzles]
/
galaxies.c
diff --git
a/galaxies.c
b/galaxies.c
index
b80515d
..
77ef597
100644
(file)
--- a/
galaxies.c
+++ b/
galaxies.c
@@
-365,7
+365,7
@@
static char *game_text_format(game_state *state)
case s_tile:
if (sp->flags & F_TILE_ASSOC) {
space *dot = sp2dot(state, sp->x, sp->y);
case s_tile:
if (sp->flags & F_TILE_ASSOC) {
space *dot = sp2dot(state, sp->x, sp->y);
- if (dot->flags & F_DOT)
+ if (dot
&& dot
->flags & F_DOT)
*p++ = (dot->flags & F_DOT_BLACK) ? 'B' : 'W';
else
*p++ = '?'; /* association with not-a-dot. */
*p++ = (dot->flags & F_DOT_BLACK) ? 'B' : 'W';
else
*p++ = '?'; /* association with not-a-dot. */
@@
-1450,6
+1450,7
@@
generate:
state = copy2;
}
}
state = copy2;
}
}
+ sfree(posns);
}
#endif
}
#endif
@@
-3347,6
+3348,11
@@
static float game_flash_length(game_state *oldstate, game_state *newstate,
return 0.0F;
}
return 0.0F;
}
+static int game_is_solved(game_state *state)
+{
+ return state->completed;
+}
+
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
@@
-3567,6
+3573,7
@@
const struct game thegame = {
game_redraw,
game_anim_length,
game_flash_length,
game_redraw,
game_anim_length,
game_flash_length,
+ game_is_solved,
#ifdef EDITOR
FALSE, FALSE, NULL, NULL,
TRUE, /* wants_statusbar */
#ifdef EDITOR
FALSE, FALSE, NULL, NULL,
TRUE, /* wants_statusbar */