Files
loop/src/Dodge/Data/Wall.hs
T

55 lines
1.3 KiB
Haskell

{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.Wall (
module Dodge.Data.Wall,
module Dodge.Data.Wall.Structure,
module Dodge.Data.Material,
) where
import Color
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Dodge.Data.Material
import Dodge.Data.Wall.Structure
import Geometry
data Wall = Wall
{ _wlLine :: (Point2, Point2)
, _wlID :: Int
, _wlColor :: Color
, _wlOpacity :: Opacity
, _wlPathable :: Bool
, _wlPenetrable :: Bool
, _wlBouncy :: Bool
, _wlWalkable :: Bool
, _wlTouchThrough :: Bool
, _wlFireThrough :: Bool
, _wlReflect :: Bool
, _wlUnshadowed :: Bool
, _wlRotateTo :: Bool
, _wlStructure :: WallStructure
, _wlHeight :: Float
, _wlMaterial :: Material
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Opacity
= SeeThrough
| SeeAbove
| DrawnWall {_opDraw :: WallDraw} -- Wall -> SPic
| Opaque {_opTexture :: Int}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data WallDraw = DrawForceField
deriving (Eq, Ord, Show, Enum, Bounded, Read) --Generic, Flat)
makeLenses ''Wall
makeLenses ''Opacity
deriveJSON defaultOptions ''WallDraw
deriveJSON defaultOptions ''Opacity
deriveJSON defaultOptions ''Wall