Reify cloud drawing, move gust data
This commit is contained in:
@@ -2,19 +2,26 @@
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Cloud where
|
||||
import Geometry
|
||||
import Picture
|
||||
import Color
|
||||
import Control.Lens
|
||||
|
||||
data CloudDraw = CloudColor Float Float Color -- radius-multiply fade-time color
|
||||
| DrawGasCloud Color
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
|
||||
data Cloud = Cloud
|
||||
{ _clPos :: Point3
|
||||
, _clVel :: Point3
|
||||
, _clPict :: Cloud -> Picture
|
||||
, _clPict :: CloudDraw
|
||||
, _clRad :: Float
|
||||
, _clAlt :: Float
|
||||
, _clTimer :: Int
|
||||
, _clType :: CloudType
|
||||
-- , _clEffect :: Cloud -> World -> World
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
data CloudType
|
||||
= SmokeCloud
|
||||
| GasCloud
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
makeLenses ''Cloud
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.Gust
|
||||
where
|
||||
import Geometry.Data
|
||||
import Control.Lens
|
||||
data Gust = Gust
|
||||
{ _guID :: Int
|
||||
, _guPos :: Point2
|
||||
, _guVel :: Point2
|
||||
, _guTime :: Int
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
makeLenses ''Gust
|
||||
@@ -6,6 +6,7 @@ import Control.Lens
|
||||
data HUDElement
|
||||
= DisplayInventory {_subInventory :: SubInventory}
|
||||
| DisplayCarte
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
-- deriving (Eq,Ord,Show)
|
||||
|
||||
data SubInventory
|
||||
@@ -15,6 +16,7 @@ data SubInventory
|
||||
| InspectInventory
|
||||
| LockedInventory
|
||||
| DisplayTerminal {_termID :: Int }
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
-- deriving (Eq,Ord,Show)
|
||||
|
||||
data HUD = HUD
|
||||
@@ -23,6 +25,7 @@ data HUD = HUD
|
||||
, _carteZoom :: Float
|
||||
, _carteRot :: Float
|
||||
}
|
||||
deriving (Eq,Ord,Show,Read)
|
||||
makeLenses ''HUD
|
||||
makeLenses ''HUDElement
|
||||
makeLenses ''SubInventory
|
||||
|
||||
Reference in New Issue
Block a user