chiark / gitweb /
Filling: enable keyboard-driven cursor dragging mode.
[sgt-puzzles.git] / filling.c
index cccd89839de734dd358f8e120810feee711d55b1..94312bfc9580e6fff035f71944268d408fef0b44 100644 (file)
--- a/filling.c
+++ b/filling.c
 static unsigned char verbose;
 
 static void printv(char *fmt, ...) {
+#ifndef PALM
     if (verbose) {
        va_list va;
        va_start(va, fmt);
        vprintf(fmt, va);
        va_end(va);
     }
+#endif
 }
 
 /*****************************************************************************
@@ -104,13 +106,13 @@ struct game_state {
     int completed, cheated;
 };
 
-static const struct game_params defaults[3] = {{7, 9}, {9, 13}, {13, 17}};
+static const struct game_params filling_defaults[3] = {{7, 9}, {9, 13}, {13, 17}};
 
 static game_params *default_params(void)
 {
     game_params *ret = snew(game_params);
 
-    *ret = defaults[1]; /* struct copy */
+    *ret = filling_defaults[1]; /* struct copy */
 
     return ret;
 }
@@ -119,10 +121,10 @@ static int game_fetch_preset(int i, char **name, game_params **params)
 {
     char buf[64];
 
-    if (i < 0 || i >= lenof(defaults)) return FALSE;
+    if (i < 0 || i >= lenof(filling_defaults)) return FALSE;
     *params = snew(game_params);
-    **params = defaults[i]; /* struct copy */
-    sprintf(buf, "%dx%d", defaults[i].h, defaults[i].w);
+    **params = filling_defaults[i]; /* struct copy */
+    sprintf(buf, "%dx%d", filling_defaults[i].h, filling_defaults[i].w);
     *name = dupstr(buf);
 
     return TRUE;
@@ -133,7 +135,7 @@ static void free_params(game_params *params)
     sfree(params);
 }
 
-static game_params *dup_params(game_params *params)
+static game_params *dup_params(const game_params *params)
 {
     game_params *ret = snew(game_params);
     *ret = *params; /* struct copy */
@@ -147,14 +149,14 @@ static void decode_params(game_params *ret, char const *string)
     if (*string == 'x') ret->h = atoi(++string);
 }
 
-static char *encode_params(game_params *params, int full)
+static char *encode_params(const game_params *params, int full)
 {
     char buf[64];
     sprintf(buf, "%dx%d", params->w, params->h);
     return dupstr(buf);
 }
 
-static config_item *game_configure(game_params *params)
+static config_item *game_configure(const game_params *params)
 {
     config_item *ret;
     char buf[64];
@@ -181,7 +183,7 @@ static config_item *game_configure(game_params *params)
     return ret;
 }
 
-static game_params *custom_params(config_item *cfg)
+static game_params *custom_params(const config_item *cfg)
 {
     game_params *ret = snew(game_params);
 
@@ -191,7 +193,7 @@ static game_params *custom_params(config_item *cfg)
     return ret;
 }
 
-static char *validate_params(game_params *params, int full)
+static char *validate_params(const game_params *params, int full)
 {
     if (params->w < 1) return "Width must be at least one";
     if (params->h < 1) return "Height must be at least one";
@@ -275,7 +277,12 @@ static char *board_to_string(int *board, int w, int h) {
     return repr;
 }
 
-static char *game_text_format(game_state *state)
+static int game_can_format_as_text_now(const game_params *params)
+{
+    return TRUE;
+}
+
+static char *game_text_format(const game_state *state)
 {
     const int w = state->shared->params.w;
     const int h = state->shared->params.h;
@@ -305,7 +312,7 @@ static void print_board(int *board, int w, int h) {
     }
 }
 
-static game_state *new_game(midend *, game_params *, char *);
+static game_state *new_game(midend *, const game_params *, const char *);
 static void free_game(game_state *);
 
 #define SENTINEL sz
@@ -335,7 +342,7 @@ static void make_board(int *board, int w, int h, random_state *rs) {
 
     /* I abuse the board variable: when generating the puzzle, it
      * contains a shuffled list of numbers {0, ..., nsq-1}. */
-    for (i = 0; i < sz; ++i) board[i] = i;
+    for (i = 0; i < (int)sz; ++i) board[i] = i;
 
     while (1) {
        int change;
@@ -344,7 +351,7 @@ static void make_board(int *board, int w, int h, random_state *rs) {
        /* while the board can in principle be fixed */
        do {
            change = FALSE;
-           for (i = 0; i < sz; ++i) {
+           for (i = 0; i < (int)sz; ++i) {
                int a = SENTINEL;
                int b = SENTINEL;
                int c = SENTINEL;
@@ -376,7 +383,7 @@ static void make_board(int *board, int w, int h, random_state *rs) {
            }
        } while (change);
 
-       for (i = 0; i < sz; ++i) board[i] = dsf_size(dsf, i);
+       for (i = 0; i < (int)sz; ++i) board[i] = dsf_size(dsf, i);
 
        sfree(dsf);
        printv("returning board number %d\n", nboards);
@@ -779,7 +786,6 @@ static int solver(const int *orig, int w, int h, char **solution) {
 
     if (solution) {
         int i;
-        assert(*solution == NULL);
         *solution = snewn(sz + 2, char);
         **solution = 's';
         for (i = 0; i < sz; ++i) (*solution)[i + 1] = ss.board[i] + '0';
@@ -860,7 +866,7 @@ static void minimize_clue_set(int *board, int w, int h, int *randomize) {
     sfree(board_cp);
 }
 
-static char *new_game_desc(game_params *params, random_state *rs,
+static char *new_game_desc(const game_params *params, random_state *rs,
                            char **aux, int interactive)
 {
     const int w = params->w;
@@ -899,7 +905,7 @@ static char *new_game_desc(game_params *params, random_state *rs,
     return game_description;
 }
 
-static char *validate_desc(game_params *params, char *desc)
+static char *validate_desc(const game_params *params, const char *desc)
 {
     int i;
     const int sz = params->w * params->h;
@@ -917,7 +923,8 @@ static char *validate_desc(game_params *params, char *desc)
     return NULL;
 }
 
-static game_state *new_game(midend *me, game_params *params, char *desc)
+static game_state *new_game(midend *me, const game_params *params,
+                            const char *desc)
 {
     game_state *state = snew(game_state);
     int sz = params->w * params->h;
@@ -934,7 +941,7 @@ static game_state *new_game(midend *me, game_params *params, char *desc)
     return state;
 }
 
-static game_state *dup_game(game_state *state)
+static game_state *dup_game(const game_state *state)
 {
     const int sz = state->shared->params.w * state->shared->params.h;
     game_state *ret = snew(game_state);
@@ -959,16 +966,18 @@ static void free_game(game_state *state)
     sfree(state);
 }
 
-static char *solve_game(game_state *state, game_state *currstate,
-                        char *aux, char **error)
+static char *solve_game(const game_state *state, const game_state *currstate,
+                        const char *aux, char **error)
 {
     if (aux == NULL) {
         const int w = state->shared->params.w;
         const int h = state->shared->params.h;
-        if (!solver(state->board, w, h, &aux))
+       char *new_aux;
+        if (!solver(state->board, w, h, &new_aux))
             *error = "Sorry, I couldn't find a solution";
+       return new_aux;
     }
-    return aux;
+    return dupstr(aux);
 }
 
 /*****************************************************************************
@@ -976,35 +985,45 @@ static char *solve_game(game_state *state, game_state *currstate,
  *****************************************************************************/
 
 struct game_ui {
-    int x, y; /* highlighted square, or (-1, -1) if none */
+    int *sel; /* w*h highlighted squares, or NULL */
+    int cur_x, cur_y, cur_visible, keydragging;
 };
 
-static game_ui *new_ui(game_state *state)
+static game_ui *new_ui(const game_state *state)
 {
     game_ui *ui = snew(game_ui);
 
-    ui->x = ui->y = -1;
+    ui->sel = NULL;
+    ui->cur_x = ui->cur_y = ui->cur_visible = ui->keydragging = 0;
 
     return ui;
 }
 
 static void free_ui(game_ui *ui)
 {
+    if (ui->sel)
+        sfree(ui->sel);
     sfree(ui);
 }
 
-static char *encode_ui(game_ui *ui)
+static char *encode_ui(const game_ui *ui)
 {
     return NULL;
 }
 
-static void decode_ui(game_ui *ui, char *encoding)
+static void decode_ui(game_ui *ui, const char *encoding)
 {
 }
 
-static void game_changed_state(game_ui *ui, game_state *oldstate,
-                               game_state *newstate)
+static void game_changed_state(game_ui *ui, const game_state *oldstate,
+                               const game_state *newstate)
 {
+    /* Clear any selection */
+    if (ui->sel) {
+        sfree(ui->sel);
+        ui->sel = NULL;
+    }
+    ui->keydragging = FALSE;
 }
 
 #define PREFERRED_TILE_SIZE 32
@@ -1020,7 +1039,8 @@ struct game_drawstate {
     int *dsf_scratch, *border_scratch;
 };
 
-static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
+static char *interpret_move(const game_state *state, game_ui *ui,
+                            const game_drawstate *ds,
                             int x, int y, int button)
 {
     const int w = state->shared->params.w;
@@ -1029,54 +1049,122 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
     const int tx = (x + TILE_SIZE - BORDER) / TILE_SIZE - 1;
     const int ty = (y + TILE_SIZE - BORDER) / TILE_SIZE - 1;
 
+    char *move = NULL;
+    int i;
+
     assert(ui);
     assert(ds);
 
     button &= ~MOD_MASK;
 
-    if (tx >= 0 && tx < w && ty >= 0 && ty < h) {
+    if (button == LEFT_BUTTON || button == LEFT_DRAG) {
+        /* A left-click anywhere will clear the current selection. */
         if (button == LEFT_BUTTON) {
-            if ((tx == ui->x && ty == ui->y) || state->shared->clues[w*ty+tx])
-                ui->x = ui->y = -1;
-            else ui->x = tx, ui->y = ty;
-            return ""; /* redraw */
+            if (ui->sel) {
+                sfree(ui->sel);
+                ui->sel = NULL;
+            }
         }
+        if (tx >= 0 && tx < w && ty >= 0 && ty < h) {
+            if (!ui->sel) {
+                ui->sel = snewn(w*h, int);
+                memset(ui->sel, 0, w*h*sizeof(int));
+            }
+            if (!state->shared->clues[w*ty+tx])
+                ui->sel[w*ty+tx] = 1;
+        }
+        ui->cur_visible = 0;
+        return ""; /* redraw */
     }
 
-    assert((ui->x == -1) == (ui->y == -1));
-    if (ui->x == -1) return NULL;
-    assert(state->shared->clues[w*ui->y + ui->x] == 0);
-
-    switch (button) {
-      case ' ':
-      case '\r':
-      case '\n':
-      case '\b':
-      case '\177':
-        button = 0;
-        break;
-      default:
-        if (!isdigit(button)) return NULL;
-        button -= '0';
-        if (button > (w == 2 && h == 2? 3: max(w, h))) return NULL;
+    if (IS_CURSOR_MOVE(button)) {
+        ui->cur_visible = 1;
+        move_cursor(button, &ui->cur_x, &ui->cur_y, w, h, 0);
+       if (ui->keydragging) goto select_square;
+        return "";
     }
+    if (button == CURSOR_SELECT) {
+        if (!ui->cur_visible) {
+            ui->cur_visible = 1;
+            return "";
+        }
+       ui->keydragging = !ui->keydragging;
+       if (!ui->keydragging) return "";
 
-    {
-        const int i = w*ui->y + ui->x;
-        char buf[64];
-        ui->x = ui->y = -1;
-       if (state->board[i] == button) {
-           return "";                 /* no change - just update ui */
-       } else {
-           sprintf(buf, "%d_%d", i, button);
-           return dupstr(buf);
+      select_square:
+        if (!ui->sel) {
+            ui->sel = snewn(w*h, int);
+            memset(ui->sel, 0, w*h*sizeof(int));
+        }
+       if (!state->shared->clues[w*ui->cur_y + ui->cur_x])
+           ui->sel[w*ui->cur_y + ui->cur_x] = 1;
+       return "";
+    }
+    if (button == CURSOR_SELECT2) {
+       if (!ui->cur_visible) {
+           ui->cur_visible = 1;
+           return "";
        }
+        if (!ui->sel) {
+            ui->sel = snewn(w*h, int);
+            memset(ui->sel, 0, w*h*sizeof(int));
+        }
+       ui->keydragging = FALSE;
+       if (!state->shared->clues[w*ui->cur_y + ui->cur_x])
+           ui->sel[w*ui->cur_y + ui->cur_x] ^= 1;
+       for (i = 0; i < w*h && !ui->sel[i]; i++);
+       if (i == w*h) {
+           sfree(ui->sel);
+           ui->sel = NULL;
+       }
+       return "";
+    }
+
+    if (button == '\b' || button == 27) {
+       sfree(ui->sel);
+       ui->sel = NULL;
+       ui->keydragging = FALSE;
+       return "";
     }
+
+    if (button < '0' || button > '9') return NULL;
+    button -= '0';
+    if (button > (w == 2 && h == 2 ? 3 : max(w, h))) return NULL;
+    ui->keydragging = FALSE;
+
+    for (i = 0; i < w*h; i++) {
+        char buf[32];
+        if ((ui->sel && ui->sel[i]) ||
+            (!ui->sel && ui->cur_visible && (w*ui->cur_y+ui->cur_x) == i)) {
+            if (state->shared->clues[i] != 0) continue; /* in case cursor is on clue */
+            if (state->board[i] != button) {
+                sprintf(buf, "%s%d", move ? "," : "", i);
+                if (move) {
+                    move = srealloc(move, strlen(move)+strlen(buf)+1);
+                    strcat(move, buf);
+                } else {
+                    move = smalloc(strlen(buf)+1);
+                    strcpy(move, buf);
+                }
+            }
+        }
+    }
+    if (move) {
+        char buf[32];
+        sprintf(buf, "_%d", button);
+        move = srealloc(move, strlen(move)+strlen(buf)+1);
+        strcat(move, buf);
+    }
+    if (!ui->sel) return move ? move : NULL;
+    sfree(ui->sel);
+    ui->sel = NULL;
+    /* Need to update UI at least, as we cleared the selection */
+    return move ? move : "";
 }
 
-static game_state *execute_move(game_state *state, char *move)
+static game_state *execute_move(const game_state *state, const char *move)
 {
-    game_state *new_state;
+    game_state *new_state = NULL;
     const int sz = state->shared->params.w * state->shared->params.h;
 
     if (*move == 's') {
@@ -1085,18 +1173,22 @@ static game_state *execute_move(game_state *state, char *move)
         for (++move; i < sz; ++i) new_state->board[i] = move[i] - '0';
         new_state->cheated = TRUE;
     } else {
-        char *endptr;
-        const int i = strtol(move, &endptr, 0);
         int value;
-        if (endptr == move) return NULL;
-        if (*endptr != '_') return NULL;
-        move = endptr + 1;
-        value = strtol(move, &endptr, 0);
-        if (endptr == move) return NULL;
-        if (*endptr != '\0') return NULL;
-        if (i < 0 || i >= sz || value < 0 || value > 9) return NULL;
+        char *endptr, *delim = strchr(move, '_');
+        if (!delim) goto err;
+        value = strtol(delim+1, &endptr, 0);
+        if (*endptr || endptr == delim+1) goto err;
+        if (value < 0 || value > 9) goto err;
         new_state = dup_game(state);
-        new_state->board[i] = value;
+        while (*move) {
+            const int i = strtol(move, &endptr, 0);
+            if (endptr == move) goto err;
+            if (i < 0 || i >= sz) goto err;
+            new_state->board[i] = value;
+            if (*endptr == '_') break;
+            if (*endptr != ',') goto err;
+            move = endptr + 1;
+        }
     }
 
     /*
@@ -1115,6 +1207,10 @@ static game_state *execute_move(game_state *state, char *move)
     }
 
     return new_state;
+
+err:
+    if (new_state) free_game(new_state);
+    return NULL;
 }
 
 /* ----------------------------------------------------------------------
@@ -1131,10 +1227,11 @@ enum {
     COL_CORRECT,
     COL_ERROR,
     COL_USER,
+    COL_CURSOR,
     NCOLOURS
 };
 
-static void game_compute_size(game_params *params, int tilesize,
+static void game_compute_size(const game_params *params, int tilesize,
                               int *x, int *y)
 {
     *x = (params->w + 1) * tilesize;
@@ -1142,7 +1239,7 @@ static void game_compute_size(game_params *params, int tilesize,
 }
 
 static void game_set_size(drawing *dr, game_drawstate *ds,
-                          game_params *params, int tilesize)
+                          const game_params *params, int tilesize)
 {
     ds->tilesize = tilesize;
 }
@@ -1165,6 +1262,10 @@ static float *game_colours(frontend *fe, int *ncolours)
     ret[COL_CORRECT * 3 + 1] = 0.9F * ret[COL_BACKGROUND * 3 + 1];
     ret[COL_CORRECT * 3 + 2] = 0.9F * ret[COL_BACKGROUND * 3 + 2];
 
+    ret[COL_CURSOR * 3 + 0] = 0.5F * ret[COL_BACKGROUND * 3 + 0];
+    ret[COL_CURSOR * 3 + 1] = 0.5F * ret[COL_BACKGROUND * 3 + 1];
+    ret[COL_CURSOR * 3 + 2] = 0.5F * ret[COL_BACKGROUND * 3 + 2];
+
     ret[COL_ERROR * 3 + 0] = 1.0F;
     ret[COL_ERROR * 3 + 1] = 0.85F * ret[COL_BACKGROUND * 3 + 1];
     ret[COL_ERROR * 3 + 2] = 0.85F * ret[COL_BACKGROUND * 3 + 2];
@@ -1177,7 +1278,7 @@ static float *game_colours(frontend *fe, int *ncolours)
     return ret;
 }
 
-static game_drawstate *game_new_drawstate(drawing *dr, game_state *state)
+static game_drawstate *game_new_drawstate(drawing *dr, const game_state *state)
 {
     struct game_drawstate *ds = snew(struct game_drawstate);
     int i;
@@ -1212,10 +1313,11 @@ static void game_free_drawstate(drawing *dr, game_drawstate *ds)
 #define BORDER_DR  0x020
 #define BORDER_UL  0x040
 #define BORDER_DL  0x080
-#define CURSOR_BG  0x100
+#define HIGH_BG    0x100
 #define CORRECT_BG 0x200
 #define ERROR_BG   0x400
 #define USER_COL   0x800
+#define CURSOR_SQ 0x1000
 
 static void draw_square(drawing *dr, game_drawstate *ds, int x, int y,
                         int n, int flags)
@@ -1237,7 +1339,7 @@ static void draw_square(drawing *dr, game_drawstate *ds, int x, int y,
               BORDER + y*TILE_SIZE,
               TILE_SIZE,
               TILE_SIZE,
-              (flags & CURSOR_BG ? COL_HIGHLIGHT :
+              (flags & HIGH_BG ? COL_HIGHLIGHT :
                flags & ERROR_BG ? COL_ERROR :
                flags & CORRECT_BG ? COL_CORRECT : COL_BACKGROUND));
 
@@ -1326,6 +1428,16 @@ static void draw_square(drawing *dr, game_drawstate *ds, int x, int y,
                   BORDER_WIDTH,
                   COL_GRID);
 
+    if (flags & CURSOR_SQ) {
+        int coff = TILE_SIZE/8;
+        draw_rect_outline(dr,
+                          BORDER + x*TILE_SIZE + coff,
+                          BORDER + y*TILE_SIZE + coff,
+                          TILE_SIZE - coff*2,
+                          TILE_SIZE - coff*2,
+                          COL_CURSOR);
+    }
+
     unclip(dr);
 
     draw_update(dr,
@@ -1335,8 +1447,8 @@ static void draw_square(drawing *dr, game_drawstate *ds, int x, int y,
                TILE_SIZE);
 }
 
-static void draw_grid(drawing *dr, game_drawstate *ds, game_state *state,
-                      game_ui *ui, int flashy, int borders, int shading)
+static void draw_grid(drawing *dr, game_drawstate *ds, const game_state *state,
+                      const game_ui *ui, int flashy, int borders, int shading)
 {
     const int w = state->shared->params.w;
     const int h = state->shared->params.h;
@@ -1409,20 +1521,38 @@ static void draw_grid(drawing *dr, game_drawstate *ds, game_state *state,
             /*
              * Determine what we need to draw in this square.
              */
-            int v = state->board[y*w+x];
+            int i = y*w+x, v = state->board[i];
             int flags = 0;
 
             if (flashy || !shading) {
                 /* clear all background flags */
-            } else if (x == ui->x && y == ui->y) {
-                flags |= CURSOR_BG;
+            } else if (ui && ui->sel && ui->sel[i]) {
+                flags |= HIGH_BG;
             } else if (v) {
-                int size = dsf_size(ds->dsf_scratch, y*w+x);
+                int size = dsf_size(ds->dsf_scratch, i);
                 if (size == v)
                     flags |= CORRECT_BG;
                 else if (size > v)
                     flags |= ERROR_BG;
+               else {
+                   int rt = dsf_canonify(ds->dsf_scratch, i), j;
+                   for (j = 0; j < w*h; ++j) {
+                       int k;
+                       if (dsf_canonify(ds->dsf_scratch, j) != rt) continue;
+                       for (k = 0; k < 4; ++k) {
+                           const int xx = j % w + dx[k], yy = j / w + dy[k];
+                           if (xx >= 0 && xx < w && yy >= 0 && yy < h &&
+                               state->board[yy*w + xx] == EMPTY)
+                               goto noflag;
+                       }
+                   }
+                   flags |= ERROR_BG;
+                 noflag:
+                   ;
+               }
             }
+            if (ui && ui->cur_visible && x == ui->cur_x && y == ui->cur_y)
+              flags |= CURSOR_SQ;
 
             /*
              * Borders at the very edges of the grid are
@@ -1474,8 +1604,9 @@ static void draw_grid(drawing *dr, game_drawstate *ds, game_state *state,
         }
 }
 
-static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
-                        game_state *state, int dir, game_ui *ui,
+static void game_redraw(drawing *dr, game_drawstate *ds,
+                        const game_state *oldstate, const game_state *state,
+                        int dir, const game_ui *ui,
                         float animtime, float flashtime)
 {
     const int w = state->shared->params.w;
@@ -1511,14 +1642,14 @@ static void game_redraw(drawing *dr, game_drawstate *ds, game_state *oldstate,
     draw_grid(dr, ds, state, ui, flashy, TRUE, TRUE);
 }
 
-static float game_anim_length(game_state *oldstate, game_state *newstate,
-                              int dir, game_ui *ui)
+static float game_anim_length(const game_state *oldstate,
+                              const game_state *newstate, int dir, game_ui *ui)
 {
     return 0.0F;
 }
 
-static float game_flash_length(game_state *oldstate, game_state *newstate,
-                               int dir, game_ui *ui)
+static float game_flash_length(const game_state *oldstate,
+                               const game_state *newstate, int dir, game_ui *ui)
 {
     assert(oldstate);
     assert(newstate);
@@ -1530,12 +1661,17 @@ static float game_flash_length(game_state *oldstate, game_state *newstate,
     return 0.0F;
 }
 
-static int game_timing_state(game_state *state, game_ui *ui)
+static int game_status(const game_state *state)
+{
+    return state->completed ? +1 : 0;
+}
+
+static int game_timing_state(const game_state *state, game_ui *ui)
 {
     return TRUE;
 }
 
-static void game_print_size(game_params *params, float *x, float *y)
+static void game_print_size(const game_params *params, float *x, float *y)
 {
     int pw, ph;
 
@@ -1543,11 +1679,11 @@ static void game_print_size(game_params *params, float *x, float *y)
      * I'll use 6mm squares by default.
      */
     game_compute_size(params, 600, &pw, &ph);
-    *x = pw / 100.0;
-    *y = ph / 100.0;
+    *x = pw / 100.0F;
+    *y = ph / 100.0F;
 }
 
-static void game_print(drawing *dr, game_state *state, int tilesize)
+static void game_print(drawing *dr, const game_state *state, int tilesize)
 {
     const int w = state->shared->params.w;
     const int h = state->shared->params.h;
@@ -1613,7 +1749,7 @@ const struct game thegame = {
     dup_game,
     free_game,
     TRUE, solve_game,
-    TRUE, game_text_format,
+    TRUE, game_can_format_as_text_now, game_text_format,
     new_ui,
     free_ui,
     encode_ui,
@@ -1628,6 +1764,7 @@ const struct game thegame = {
     game_redraw,
     game_anim_length,
     game_flash_length,
+    game_status,
     TRUE, FALSE, game_print_size, game_print,
     FALSE,                                /* wants_statusbar */
     FALSE, game_timing_state,
@@ -1663,3 +1800,5 @@ int main(int argc, char **argv) {
 }
 
 #endif
+
+/* vim: set shiftwidth=4 tabstop=8: */