fix drawing order

This commit is contained in:
nek0 2018-11-16 07:58:15 +01:00
parent 702fa633c3
commit feb069f4ce

View file

@ -537,7 +537,7 @@ drawTile ud ctx posanims pr pc row col img =
((realToFrac x :: Double) < 1280 && ((realToFrac x :: Double) < 1280 &&
(realToFrac (y - (74 - (realToFrac tileHeight :: CFloat))) :: Double) < 720)) $ (realToFrac (y - (74 - (realToFrac tileHeight :: CFloat))) :: Double) < 720)) $
do do
let (bef, beh) = L.partition delimiter sorted let (bef, beh) = L.partition delimiter (reverse sorted)
save ctx save ctx
mapM_ drawAnim beh mapM_ drawAnim beh
maybe (return ()) (draw ud x (y - 42) 64 74 fact) maybe (return ()) (draw ud x (y - 42) 64 74 fact)
@ -560,9 +560,9 @@ drawTile ud ctx posanims pr pc row col img =
| nnr > fst (matmax b) || nnc < snd (matmin b) = | nnr > fst (matmax b) || nnc < snd (matmin b) =
True True
| nnr > fst (matmin b) && nnr < fst (matmax b) = | nnr > fst (matmin b) && nnr < fst (matmax b) =
nnc < snd (matmin b) nnc <= snd (matmin b)
| nnc > snd (matmin b) && nnc < snd (matmax b) = | nnc > snd (matmin b) && nnc < snd (matmax b) =
nnr > fst (matmax b) nnr >= fst (matmax b)
| otherwise = | otherwise =
False False
nnr = case mbnds of nnr = case mbnds of