Reify modifications

This commit is contained in:
2022-07-23 20:53:00 +01:00
parent f0f9751afe
commit 5de837c8cf
8 changed files with 56 additions and 22 deletions
+25
View File
@@ -0,0 +1,25 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.Modification
where
-- this naming is not good, parameterized world effect?
import Dodge.Data.WorldEffect
import Geometry.Data
import Control.Lens
data Modification
= ModIDTimerPoint3Bool
{ _mdID :: Int
, _mdExternalID :: Int
, _mdUpdate :: MdWdWd
, _mdTimer :: Int
, _mdPoint3 :: Point3
, _mdBool :: Bool
}
| ModIDID
{ _mdID :: Int
, _mdExternalID1 :: Int
, _mdExternalID2 :: Int
, _mdUpdate :: MdWdWd
}
makeLenses ''Modification
+1 -1
View File
@@ -26,5 +26,5 @@ data SoundOrigin = InventorySound
| LeverSound Int
| Explosion Int
| Tap Int
deriving (Eq,Ord,Show)
deriving (Eq,Ord,Show,Read)
+7
View File
@@ -12,5 +12,12 @@ data WorldEffect = NoWorldEffect
| SoundStart SoundOrigin Point2 SoundID (Maybe Int)
| MakeStartCloudAt Point3
| TorqueCr Float Int
deriving (Eq,Ord,Show,Read)
data WdP2 = WdP2Const Point2
| WdYouPos
deriving (Eq,Ord,Show,Read)
data MdWdWd = MdWdId
| MdTrigIf MdWdWd MdWdWd
| MdSetLSCol Point3
| MdFlickerUpdate
deriving (Eq,Ord,Show,Read)