fix animation sorting. hopefuly finally
This commit is contained in:
parent
414dd39c00
commit
5144588366
1 changed files with 10 additions and 4 deletions
|
@ -701,10 +701,16 @@ drawTile ud ctx posanims pr pc row col img =
|
|||
-- any (\m -> nc > fromIntegral (floor nc :: Int) + m) mincs
|
||||
tileWidth = 64 :: Double
|
||||
tileHeight = 32 :: Double
|
||||
sorted = sortOn (\(V2 sr sc, _, mbnds) -> case mbnds of
|
||||
Just (Boundaries (_, _) (maxr, maxc)) -> maxr + (1 - maxc) * 10
|
||||
_ -> (sr - (fromIntegral ((floor sr) :: Int))) +
|
||||
(1 - (sc - (fromIntegral ((floor sc) :: Int)))) * 10
|
||||
sorted = sortOn (\(V2 sr sc, _, mbnds) ->
|
||||
let comp srow scol = (floor $ (1 - scol) * 10) + (floor $ srow * 100)
|
||||
in
|
||||
case mbnds of
|
||||
Just (Boundaries (minr, minc) (maxr, maxc)) ->
|
||||
comp maxr minc
|
||||
_ ->
|
||||
comp
|
||||
(sr - (fromIntegral ((floor sr) :: Int)))
|
||||
(sc - (fromIntegral ((floor sc) :: Int)))
|
||||
) posanims
|
||||
-- sorted = posanims
|
||||
minrs = Prelude.map (fst . matmin) mb
|
||||
|
|
Loading…
Reference in a new issue