From d1e130b5a925eccfb969b2c38a6bc53ee3e79a1b Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 30 Mar 2018 21:30:27 +0200 Subject: [PATCH] draw floor half a tile more inwards --- src/Test.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Test.hs b/src/Test.hs index 92501cc..ad5bb43 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -110,16 +110,16 @@ drawMap = do y = realToFrac $ 360 + ((1 - pr) - (1 - pc)) * (tileHeight / 2) liftIO $ do beginPath ctx - moveTo ctx x y + moveTo ctx (x + realToFrac tileWidth / 2) y lineTo ctx (x + cols * (realToFrac tileWidth / 2)) - (y - realToFrac tileHeight / 2 * cols) + (y - (realToFrac tileHeight / 2) * (cols - 1)) lineTo ctx - (x + realToFrac tileWidth / 2 * (cols + rows)) + (x + (realToFrac tileWidth / 2) * (cols + rows - 1)) (y + (rows - cols) * (realToFrac tileHeight / 2)) lineTo ctx - (x + realToFrac tileWidth / 2 * rows) - (y + realToFrac tileHeight / 2 * rows) + (x + (realToFrac tileWidth / 2) * rows) + (y + (realToFrac tileHeight / 2) * (rows - 1)) closePath ctx fillColor ctx (rgb 255 255 255) fill ctx