This commit is contained in:
nek0 2019-02-16 08:39:01 +01:00
parent 5144588366
commit db4b6a4a34

View file

@ -702,11 +702,11 @@ 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) -> sorted = sortOn (\(V2 sr sc, _, mbnds) ->
let comp srow scol = (floor $ (1 - scol) * 10) + (floor $ srow * 100) let comp srow scol = (floor $ (1 - scol) * 100) + (floor $ srow * 100)
in in
case mbnds of case mbnds of
Just (Boundaries (minr, minc) (maxr, maxc)) -> Just (Boundaries (minr, minc) (maxr, maxc)) ->
comp maxr minc comp (minr + ((maxr - minr) / 2)) (minc + (maxc - minc) / 2)
_ -> _ ->
comp comp
(sr - (fromIntegral ((floor sr) :: Int))) (sr - (fromIntegral ((floor sr) :: Int)))