chiark / gitweb /
Bound edge thicknesses below so that they're always thicker than the
authorSimon Tatham <anakin@pobox.com>
Thu, 1 Mar 2007 07:32:35 +0000 (07:32 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 1 Mar 2007 07:32:35 +0000 (07:32 +0000)
grid lines.

[originally from svn r7349]

filling.c
galaxies.c

index f47f9f17473e0e70e167b6bb1f8bdd89275e0601..b05ab49ff60fd3bb689ae53329de3e71c9839be4 100644 (file)
--- a/filling.c
+++ b/filling.c
@@ -907,7 +907,7 @@ static void game_changed_state(game_ui *ui, game_state *oldstate,
 #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;
index 6989fe360fd46a275b8c2ba7469eea1d9a8ae8ec..bfb558de20929167cdcf4fdb984aa8a8a031ce1f 100644 (file)
@@ -2075,7 +2075,7 @@ static void game_changed_state(game_ui *ui, game_state *oldstate,
 #define PREFERRED_TILE_SIZE 32
 #define TILE_SIZE (ds->tilesize)
 #define DOT_SIZE        (TILE_SIZE / 4)
-#define EDGE_THICKNESS (TILE_SIZE / 16)
+#define EDGE_THICKNESS (max(TILE_SIZE / 16, 2))
 #define BORDER TILE_SIZE
 
 #define COORD(x) ( (x) * TILE_SIZE + BORDER )