+ int pw, ph;
+
+ /*
+ * I'll use 6mm squares by default.
+ */
+ game_compute_size(params, 600, &pw, &ph);
+ *x = pw / 100.0;
+ *y = ph / 100.0;
+}
+
+static void game_print(drawing *dr, game_state *state, int tilesize)
+{
+ int w = state->p.w, h = state->p.h, W = w+1;
+ int ink = print_mono_colour(dr, 0);
+ int paper = print_mono_colour(dr, 1);
+ int x, y;
+
+ /* Ick: fake up `ds->tilesize' for macro expansion purposes */
+ game_drawstate ads, *ds = &ads;
+ game_set_size(dr, ds, NULL, tilesize);
+
+ /*
+ * Border.
+ */
+ print_line_width(dr, TILESIZE / 16);
+ draw_rect_outline(dr, COORD(0), COORD(0), w*TILESIZE, h*TILESIZE, ink);
+
+ /*
+ * Grid.
+ */
+ print_line_width(dr, TILESIZE / 24);
+ for (x = 1; x < w; x++)
+ draw_line(dr, COORD(x), COORD(0), COORD(x), COORD(h), ink);
+ for (y = 1; y < h; y++)
+ draw_line(dr, COORD(0), COORD(y), COORD(w), COORD(y), ink);
+
+ /*
+ * Solution.
+ */
+ print_line_width(dr, TILESIZE / 12);
+ for (y = 0; y < h; y++)
+ for (x = 0; x < w; x++)
+ if (state->soln[y*w+x]) {
+ int ly, ry;
+ /*
+ * To prevent nasty line-ending artefacts at
+ * corners, I'll do something slightly cunning
+ * here.
+ */
+ clip(dr, COORD(x), COORD(y), TILESIZE, TILESIZE);
+ if (state->soln[y*w+x] < 0)
+ ly = y-1, ry = y+2;
+ else
+ ry = y-1, ly = y+2;
+ draw_line(dr, COORD(x-1), COORD(ly), COORD(x+2), COORD(ry),
+ ink);
+ unclip(dr);
+ }
+
+ /*
+ * Clues.
+ */
+ print_line_width(dr, TILESIZE / 24);
+ for (y = 0; y <= h; y++)
+ for (x = 0; x <= w; x++)
+ draw_clue(dr, ds, x, y, state->clues->clues[y*W+x],
+ FALSE, paper, ink);