Add IntMapHelper, locate wall cutting bug
This commit is contained in:
@@ -8,21 +8,15 @@ module Dodge.Picture.Layer
|
||||
) where
|
||||
import Dodge.Picture.Layer.Data
|
||||
import Picture
|
||||
|
||||
{- | Uses a layer to set the depth.
|
||||
-}
|
||||
{- | Uses a layer to set the depth. -}
|
||||
onLayer :: Layer -> Picture -> Picture
|
||||
onLayer l = setDepth $ 1 - fromIntegral (levLayer l) / 100
|
||||
|
||||
onLayer l = setDepth $ 1 - fromIntegral (levLayer l) / 100
|
||||
{- | Set a depth according to a list of numbers.
|
||||
Lists are lexicographically ordered if input values are always less than 100.
|
||||
Higher numbers will get placed on top of lower numbers.
|
||||
-}
|
||||
Higher numbers will get placed on top of lower numbers. -}
|
||||
onLayerL :: [Int] -> Picture -> Picture
|
||||
onLayerL is = setDepth (1 - sum (zipWith (/) (map fromIntegral is) $ map (100 **) [1..]))
|
||||
|
||||
{- | For depth testing, set layer values.
|
||||
-}
|
||||
onLayerL is = setDepth (1 - sum (zipWith (/) (map fromIntegral is) $ map (100 **) [1..]))
|
||||
{- | For depth testing, set layer values. -}
|
||||
levLayer :: Layer -> Int
|
||||
levLayer BgLayer = 20
|
||||
levLayer PressPlateLayer = 45
|
||||
@@ -38,3 +32,4 @@ levLayer ShadowLayer = 75
|
||||
levLayer LabelLayer = 80
|
||||
levLayer InvLayer = 85
|
||||
levLayer MenuDepth = 90
|
||||
levLayer DebugLayer = 99
|
||||
|
||||
@@ -16,3 +16,4 @@ data Layer
|
||||
| UPtLayer
|
||||
| HPtLayer
|
||||
| GloomLayer
|
||||
| DebugLayer
|
||||
|
||||
Reference in New Issue
Block a user