draw floor half a tile more inwards

This commit is contained in:
nek0 2018-03-30 21:30:27 +02:00
parent 60c59afabc
commit d1e130b5a9

View File

@ -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