Start to clean up Prop datatype
This commit is contained in:
+27
-39
@@ -10,60 +10,46 @@ import Data.Aeson.TH
|
||||
import Dodge.Data.WorldEffect
|
||||
import Geometry.Data
|
||||
import qualified Quaternion as Q
|
||||
import Shape.Data
|
||||
import ShapePicture.Data
|
||||
|
||||
data Prop
|
||||
= PropZ
|
||||
{ _prPos :: Point2
|
||||
, _prDraw :: PropDraw
|
||||
, _prUpdate :: PropUpdate
|
||||
, _prStartPos :: Point2
|
||||
, _prVel :: Point2
|
||||
, _prID :: Int
|
||||
, _prPosZ :: Float
|
||||
, _prVelZ :: Float
|
||||
, _prQuat :: Q.Quaternion Float
|
||||
, _prQuatSpin :: Q.Quaternion Float
|
||||
, _prColor :: Color
|
||||
}
|
||||
| ShapeProp
|
||||
{ _prPos :: Point2
|
||||
, _prDraw :: PropDraw
|
||||
, _prUpdate :: PropUpdate
|
||||
, _prID :: Int
|
||||
, _prRot :: Float
|
||||
, _prToggle :: Bool
|
||||
}
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
data Prop = ShapeProp
|
||||
{ _prPos :: Point2
|
||||
, _prDraw :: PropDraw
|
||||
, _prUpdate :: PropUpdate
|
||||
, _prID :: Int
|
||||
, _prRot :: Float
|
||||
, _prToggle :: Bool
|
||||
}
|
||||
|
||||
data DebrisType =
|
||||
Gib {_gibSize :: Float
|
||||
,_gibColor :: Color
|
||||
data DebrisType
|
||||
= Gib
|
||||
{ _gibSize :: Float
|
||||
, _gibColor :: Color
|
||||
}
|
||||
| BlockDebris {_bdColor :: Color}
|
||||
|
||||
data Debris = DebrisChunk
|
||||
{ _dbPos :: Point3
|
||||
, _dbType :: DebrisType
|
||||
, _dbVel :: Point3
|
||||
, _dbRot :: Q.Quaternion Float
|
||||
, _dbSpin :: Q.Quaternion Float
|
||||
}
|
||||
{ _dbPos :: Point3
|
||||
, _dbType :: DebrisType
|
||||
, _dbVel :: Point3
|
||||
, _dbRot :: Q.Quaternion Float
|
||||
, _dbSpin :: Q.Quaternion Float
|
||||
}
|
||||
|
||||
--data PropType = FallingBlock Material
|
||||
|
||||
data PropDraw
|
||||
= PropDrawSPic SPic
|
||||
| PropDrawMovingShapeCol Shape
|
||||
| PropDrawMovingShape PropDraw
|
||||
| PropDrawFlatTranslate PropDraw
|
||||
| -- | PropDrawMovingShapeCol Shape
|
||||
-- | PropDrawMovingShape PropDraw
|
||||
PropDrawFlatTranslate PropDraw
|
||||
| PropDoubleLampCover Float
|
||||
| PropVerticalLampCover Float
|
||||
| PropLampCover Float
|
||||
| PropDrawToggle PropDraw
|
||||
|
||||
-- | PropDrawGib Float
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data PropUpdate
|
||||
= PropUpdateId
|
||||
@@ -75,13 +61,15 @@ data PropUpdate
|
||||
| PropUpdatePosition WdP2f
|
||||
| PropUpdateWhen WdBl PropUpdate
|
||||
| PropUpdateIf WdBl PropUpdate PropUpdate
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data PrWdLsLs
|
||||
= PrWdLsId
|
||||
| PrWdLsSetPosition WdP2f Point3
|
||||
| PrWdLsSetColor Point3
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
makeLenses ''Prop
|
||||
makeLenses ''Debris
|
||||
|
||||
Reference in New Issue
Block a user