fix draw ordering

This commit is contained in:
nek0 2018-11-16 17:44:57 +01:00
parent 231ebd2fba
commit ca870cd8d4

View file

@ -576,9 +576,9 @@ drawTile ud ctx posanims pr pc row col img =
tileWidth = 64 :: Double tileWidth = 64 :: Double
tileHeight = 32 :: Double tileHeight = 32 :: Double
sorted = sortOn (\(V2 sr sc, _, mbnds) -> case mbnds of sorted = sortOn (\(V2 sr sc, _, mbnds) -> case mbnds of
Just (Boundaries (_, minc) (maxr, _)) -> maxr * 10 + (1 - minc) Just (Boundaries (_, _) (maxr, maxc)) -> maxr + (1 - maxc) * 10
_ -> (sr - (fromIntegral ((floor sr) :: Int))) * 10 + _ -> (sr - (fromIntegral ((floor sr) :: Int))) +
(1 - (sc - (fromIntegral ((floor sc) :: Int)))) (1 - (sc - (fromIntegral ((floor sc) :: Int)))) * 10
) posanims ) posanims
-- sorted = posanims -- sorted = posanims
minrs = Prelude.map (fst . matmin) mb minrs = Prelude.map (fst . matmin) mb