diff --git a/src/island_client.ml b/src/island_client.ml index 75f0bf6..7f7a884 100644 --- a/src/island_client.ml +++ b/src/island_client.ml @@ -54,9 +54,13 @@ let init () = C2d.fill_rect context ~x:0. ~y:0. ~w:(float_of_int width) ~h:(float_of_int height) -let tiles_per_w = width / tile_size +let tiles_per_w = + let n = width / tile_size in + if n mod 2 = 0 then n - 1 else n -let tiles_per_h = height / tile_size +let tiles_per_h = + let n = height / tile_size in + if n mod 2 = 0 then n - 1 else n let orig_x = (width - (tiles_per_w * tile_size)) / 2