From 33d808b240bd6d52400fb1d02b97056c7d52f6f5 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 30 Jul 2018 01:17:19 +0200 Subject: [PATCH] fix draw ordering --- src/MainGame/WorldMap.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index 8b9a717..9dd611e 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -382,9 +382,9 @@ drawTile ud ctx posanims pr pc row col img = tileWidth = 64 :: Double tileHeight = 32 :: Double sorted = sortOn (\(V2 sr sc, _, mbnds) -> case mbnds of - Just (Boundaries (minr, minc) (maxr, maxc)) -> maxr + (1 - maxc) * 10 - _ -> (sr - (fromIntegral ((floor sr) :: Int))) + - (1 - (sc - (fromIntegral ((floor sc) :: Int)))) * 10 + Just (Boundaries (minr, minc) (maxr, maxc)) -> maxr * 10 + (1 - minc) + _ -> (sr - (fromIntegral ((floor sr) :: Int))) * 10 + + (1 - (sc - (fromIntegral ((floor sc) :: Int)))) ) posanims -- sorted = posanims minrs = Prelude.map (fst . matmin) mb