Forgot to set 'has_incentre' on triangular grids, which don't use
[sgt/puzzles] / unfinished / slide.c
index af8f210..3ea3c95 100644 (file)
@@ -821,6 +821,9 @@ static void generate_board(int w, int h, int *rtx, int *rty, int *minmoves,
        }
     }
 
+    sfree(dsf);
+    sfree(list);
+    sfree(tried_merge);
     sfree(board2);
 
     *rtx = tx;
@@ -1597,7 +1600,8 @@ static void game_compute_size(game_params *params, int tilesize,
                              int *x, int *y)
 {
     /* fool the macros */
-    struct dummy { int tilesize; } dummy = { tilesize }, *ds = &dummy;
+    struct dummy { int tilesize; } dummy, *ds = &dummy;
+    dummy.tilesize = tilesize;
 
     *x = params->w * TILESIZE + 2*BORDER;
     *y = params->h * TILESIZE + 2*BORDER;
@@ -2289,6 +2293,11 @@ static float game_flash_length(game_state *oldstate, game_state *newstate,
     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;
@@ -2303,7 +2312,7 @@ static void game_print(drawing *dr, game_state *state, int tilesize)
 }
 
 #ifdef COMBINED
-#define thegame nullgame
+#define thegame slide
 #endif
 
 const struct game thegame = {
@@ -2337,6 +2346,7 @@ const struct game thegame = {
     game_redraw,
     game_anim_length,
     game_flash_length,
+    game_is_solved,
     FALSE, FALSE, game_print_size, game_print,
     TRUE,                             /* wants_statusbar */
     FALSE, game_timing_state,