Fix wall depth rendering
This commit is contained in:
+2
-2
@@ -722,13 +722,13 @@ crInPolygon :: Creature -> [Point2] -> Bool
|
||||
crInPolygon cr xs = errorPointInPolygon 3 (_crPos cr) xs
|
||||
|
||||
onLayer :: Layer -> Picture -> Picture
|
||||
onLayer l = setDepth (fromIntegral (levLayer l) / 100)
|
||||
onLayer l = setDepth $ 1 - fromIntegral (levLayer l) / 100
|
||||
|
||||
--onLayer :: Layer -> Picture -> [(Picture, [Int])]
|
||||
--onLayer l p = [(p, [levLayer l])]
|
||||
|
||||
onLayerL :: [Int] -> Picture -> Picture
|
||||
onLayerL is = setDepth ((sum $ zipWith (/) (map fromIntegral is) $ map (\x->100**x) [1..]))
|
||||
onLayerL is = setDepth (1 - (sum $ zipWith (/) (map fromIntegral is) $ map (\x->100**x) [1..]))
|
||||
|
||||
levLayer :: Layer -> Int
|
||||
levLayer BgLayer = 20
|
||||
|
||||
Reference in New Issue
Block a user