fix draw ordering

This commit is contained in:
nek0 2018-07-30 01:17:19 +02:00
parent 744850d3f0
commit 33d808b240

View file

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