37 lines
1.1 KiB
Haskell
37 lines
1.1 KiB
Haskell
{-# LANGUAGE TemplateHaskell #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
module Dodge.Item.Attachment.Data
|
|
where
|
|
import Geometry.Data
|
|
|
|
import Control.Lens
|
|
import qualified Data.Sequence as Seq
|
|
|
|
data ItAttachment
|
|
= AttachFuse {_atFuseTime :: Int}
|
|
| AttachMode {_atMode :: Int}
|
|
| AttachCharMode {_atCharMode :: Seq.Seq Char }
|
|
| AttachTargetPos { _atTargetPos :: Point2 }
|
|
| AttachInt { _atInt :: Int }
|
|
| AttachMInt { _atMInt :: Maybe Int }
|
|
| AttachFloat { _atFloat :: Float }
|
|
| AttachBool { _atBool :: Bool }
|
|
| NoItAttachment
|
|
|
|
data Scope = NoScope
|
|
| RemoteScope
|
|
{_scopePos :: Point2 -- ^ a camera offset
|
|
,_scopeZoom :: Float
|
|
,_scopeIsCamera :: Bool -- ^ if the camera offset is also the center of vision
|
|
}
|
|
| ZoomScope
|
|
{_scopePos :: Point2 -- ^ a camera offset
|
|
,_scopeZoomChange :: Int
|
|
,_scopeZoom :: Float
|
|
,_scopeDefaultZoom :: Float
|
|
,_scopeIsCamera :: Bool -- ^ if the camera offset is also the center of vision
|
|
}
|
|
|
|
makeLenses ''ItAttachment
|
|
makeLenses ''Scope
|