draw floor half a tile more inwards
This commit is contained in:
parent
60c59afabc
commit
d1e130b5a9
1 changed files with 5 additions and 5 deletions
10
src/Test.hs
10
src/Test.hs
|
@ -110,16 +110,16 @@ drawMap = do
|
||||||
y = realToFrac $ 360 + ((1 - pr) - (1 - pc)) * (tileHeight / 2)
|
y = realToFrac $ 360 + ((1 - pr) - (1 - pc)) * (tileHeight / 2)
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
beginPath ctx
|
beginPath ctx
|
||||||
moveTo ctx x y
|
moveTo ctx (x + realToFrac tileWidth / 2) y
|
||||||
lineTo ctx
|
lineTo ctx
|
||||||
(x + cols * (realToFrac tileWidth / 2))
|
(x + cols * (realToFrac tileWidth / 2))
|
||||||
(y - realToFrac tileHeight / 2 * cols)
|
(y - (realToFrac tileHeight / 2) * (cols - 1))
|
||||||
lineTo ctx
|
lineTo ctx
|
||||||
(x + realToFrac tileWidth / 2 * (cols + rows))
|
(x + (realToFrac tileWidth / 2) * (cols + rows - 1))
|
||||||
(y + (rows - cols) * (realToFrac tileHeight / 2))
|
(y + (rows - cols) * (realToFrac tileHeight / 2))
|
||||||
lineTo ctx
|
lineTo ctx
|
||||||
(x + realToFrac tileWidth / 2 * rows)
|
(x + (realToFrac tileWidth / 2) * rows)
|
||||||
(y + realToFrac tileHeight / 2 * rows)
|
(y + (realToFrac tileHeight / 2) * (rows - 1))
|
||||||
closePath ctx
|
closePath ctx
|
||||||
fillColor ctx (rgb 255 255 255)
|
fillColor ctx (rgb 255 255 255)
|
||||||
fill ctx
|
fill ctx
|
||||||
|
|
Loading…
Reference in a new issue