Camera position refactor
This commit is contained in:
@@ -45,8 +45,10 @@ module Dodge.Data.LWorld (
|
||||
module Dodge.Data.TractorBeam,
|
||||
module Dodge.Data.Wall,
|
||||
module Dodge.Data.WorldEffect,
|
||||
module Dodge.Data.CamPos
|
||||
) where
|
||||
|
||||
import Dodge.Data.CamPos
|
||||
import Data.Set (Set)
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
@@ -98,7 +100,7 @@ import qualified IntMapHelp as IM
|
||||
import Picture.Data
|
||||
|
||||
data LWorld = LWorld
|
||||
{ _cwCam :: CWCam
|
||||
{ _camPos :: CamPos
|
||||
, _creatures :: IM.IntMap Creature
|
||||
, _crZoning :: IM.IntMap (IM.IntMap IS.IntSet)
|
||||
, _creatureGroups :: IM.IntMap CrGroupParams
|
||||
@@ -159,17 +161,6 @@ data LWorld = LWorld
|
||||
, _distortions :: [Distortion]
|
||||
, _lClock :: Int
|
||||
}
|
||||
data CWCam = CWCam
|
||||
{ _cwcCenter :: Point2
|
||||
, _cwcRot :: Float
|
||||
, _cwcZoom :: Float -- smaller values zoom out
|
||||
, _cwcItemZoom :: Float
|
||||
, _cwcDefaultZoom :: Float
|
||||
, _cwcViewFrom :: Point2
|
||||
, _cwcViewDistance :: Float
|
||||
, _cwcBoundBox :: [Point2]
|
||||
, _cwcBoundDist :: (Float, Float, Float, Float) -- NSEW, S and W negative
|
||||
}
|
||||
data WorldBeams = WorldBeams
|
||||
{ _blockingBeams :: [Beam]
|
||||
, _lightBeams :: [Beam]
|
||||
@@ -178,12 +169,10 @@ data WorldBeams = WorldBeams
|
||||
}
|
||||
|
||||
makeLenses ''LWorld
|
||||
makeLenses ''CWCam
|
||||
makeLenses ''WorldBeams
|
||||
concat
|
||||
<$> mapM
|
||||
(deriveJSON defaultOptions)
|
||||
[ ''WorldBeams
|
||||
, ''CWCam
|
||||
, ''LWorld
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user