Simplify Prop drawing

This commit is contained in:
2025-10-25 13:54:40 +01:00
parent ff03efc41f
commit 7585531dd1
9 changed files with 73 additions and 201 deletions
+2 -19
View File
@@ -14,7 +14,7 @@ import ShapePicture.Data
data Prop = ShapeProp
{ _prPos :: Point2
, _prDraw :: PropDraw
, _prDraw :: SPic
, _prUpdate :: PropUpdate
, _prID :: Int
, _prRot :: Float
@@ -22,10 +22,7 @@ data Prop = ShapeProp
}
data DebrisType
= Gib
{ _gibSize :: Float
, _gibColor :: Color
}
= Gib { _gibSize :: Float , _gibColor :: Color }
| BlockDebris {_bdColor :: Color}
data Debris = DebrisChunk
@@ -36,15 +33,6 @@ data Debris = DebrisChunk
, _dbSpin :: Q.Quaternion Float
}
data PropDraw
= PropDrawFlatTranslate SPic
| PropDoubleLampCover Float
| PropVerticalLampCover Float
| PropLampCover Float
-- | PropDrawGib Float
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
data PropUpdate
= PropUpdateId
| PropUpdateAnd PropUpdate PropUpdate
@@ -56,21 +44,16 @@ data PropUpdate
| PropUpdateWhen WdBl PropUpdate
| PropUpdateIf WdBl PropUpdate PropUpdate
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
data PrWdLsLs
= PrWdLsId
| PrWdLsSetPosition WdP2f Point3
| PrWdLsSetColor Point3
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Prop
makeLenses ''Debris
makeLenses ''DebrisType
deriveJSON defaultOptions ''DebrisType
deriveJSON defaultOptions ''Debris
deriveJSON defaultOptions ''PropDraw
deriveJSON defaultOptions ''PrWdLsLs
deriveJSON defaultOptions ''PropUpdate
deriveJSON defaultOptions ''Prop