#define PREFERRED_TILE_SIZE 32
#define TILE_SIZE (ds->tilesize)
#define BORDER (TILE_SIZE / 2)
-#define BORDER_WIDTH (TILE_SIZE / 32)
+#define BORDER_WIDTH (max(TILE_SIZE / 32, 1))
struct game_drawstate {
struct game_params params;
* should start by drawing a big background-colour rectangle
* covering the whole window.
*/
- draw_rect(dr, 0, 0, 10*ds->tilesize, 10*ds->tilesize, COL_BACKGROUND);
+ draw_rect(dr, 0, 0, w*TILE_SIZE + 2*BORDER, h*TILE_SIZE + 2*BORDER,
+ COL_BACKGROUND);
/*
* Smaller black rectangle which is the main grid.
h*TILE_SIZE + 2*BORDER_WIDTH + 1,
COL_GRID);
+ draw_update(dr, 0, 0, w*TILE_SIZE + 2*BORDER, h*TILE_SIZE + 2*BORDER);
+
ds->started = TRUE;
}