Refactor map, add location arrows
This commit is contained in:
+50
-47
@@ -36,53 +36,56 @@ import qualified Data.DList as DL
|
||||
--}}}
|
||||
-- datatypes {{{
|
||||
data World = World
|
||||
{ _keys :: !(S.Set Scancode)
|
||||
, _mouseButtons :: !(S.Set MouseButton)
|
||||
, _cameraPos :: !Point2
|
||||
, _cameraAimTime :: Int
|
||||
, _cameraRot :: !Float
|
||||
, _cameraZoom :: !Float
|
||||
, _cameraCenter :: !Point2
|
||||
, _creatures :: IM.IntMap Creature
|
||||
, _creaturesZone :: IM.IntMap (IM.IntMap (IM.IntMap Creature))
|
||||
, _itemPositions :: IM.IntMap ItemPos
|
||||
, _clouds :: IM.IntMap Cloud
|
||||
, _cloudsZone :: IM.IntMap (IM.IntMap (IM.IntMap Cloud))
|
||||
, _projectiles :: IM.IntMap Projectile
|
||||
, _particles' :: ![Particle']
|
||||
, _walls :: !(IM.IntMap Wall)
|
||||
, _wallsZone :: (IM.IntMap (IM.IntMap (IM.IntMap Wall)))
|
||||
, _forceFields :: IM.IntMap ForceField
|
||||
, _floorItems :: IM.IntMap FloorItem
|
||||
, _randGen :: StdGen
|
||||
, _mousePos :: !(Float,Float)
|
||||
, _testString :: String
|
||||
, _yourID :: !Int
|
||||
, _worldEvents :: !(World -> World)
|
||||
, _pressPlates :: IM.IntMap PressPlate
|
||||
, _buttons :: IM.IntMap Button
|
||||
, _soundQueue :: [Int]
|
||||
, _sounds :: M.Map SoundOrigin Sound
|
||||
, _decorations :: IM.IntMap Picture
|
||||
, _corpses :: IM.IntMap (IM.IntMap [Corpse])
|
||||
, _lbClickMousePos :: (Float,Float)
|
||||
, _lbRotation :: Float
|
||||
, _pathGraph :: ~(Gr Point2 Float)
|
||||
, _pathGraph' :: ~[(Point2,Point2)]
|
||||
, _pathPoints :: ~(IM.IntMap (IM.IntMap [(Int,Point2)]))
|
||||
, _pathInc :: ~(M.Map Point2 [Point2])
|
||||
, _storedLevel :: Maybe World
|
||||
, _menuState :: MenuState
|
||||
, _worldState :: M.Map WorldState Bool
|
||||
, _windowX :: Float
|
||||
, _windowY :: Float
|
||||
, _mapDisplay :: (Bool, Float)
|
||||
, _lightSources :: !(IM.IntMap LightSource)
|
||||
, _tempLightSources :: ![TempLightSource]
|
||||
, _closeActiveObjects :: [Either FloorItem Button]
|
||||
, _seenLocations :: IM.IntMap (World -> Point2,String)
|
||||
-- , _remap :: Keycode -> Keycode
|
||||
}
|
||||
{ _keys :: !(S.Set Scancode)
|
||||
, _mouseButtons :: !(S.Set MouseButton)
|
||||
, _cameraPos :: !Point2
|
||||
, _cameraAimTime :: Int
|
||||
, _cameraRot :: !Float
|
||||
, _cameraZoom :: !Float
|
||||
, _cameraCenter :: !Point2
|
||||
, _creatures :: IM.IntMap Creature
|
||||
, _creaturesZone :: IM.IntMap (IM.IntMap (IM.IntMap Creature))
|
||||
, _itemPositions :: IM.IntMap ItemPos
|
||||
, _clouds :: IM.IntMap Cloud
|
||||
, _cloudsZone :: IM.IntMap (IM.IntMap (IM.IntMap Cloud))
|
||||
, _projectiles :: IM.IntMap Projectile
|
||||
, _particles' :: ![Particle']
|
||||
, _walls :: !(IM.IntMap Wall)
|
||||
, _wallsZone :: (IM.IntMap (IM.IntMap (IM.IntMap Wall)))
|
||||
, _forceFields :: IM.IntMap ForceField
|
||||
, _floorItems :: IM.IntMap FloorItem
|
||||
, _randGen :: StdGen
|
||||
, _mousePos :: !(Float,Float)
|
||||
, _testString :: String
|
||||
, _yourID :: !Int
|
||||
, _worldEvents :: !(World -> World)
|
||||
, _pressPlates :: IM.IntMap PressPlate
|
||||
, _buttons :: IM.IntMap Button
|
||||
, _soundQueue :: [Int]
|
||||
, _sounds :: M.Map SoundOrigin Sound
|
||||
, _decorations :: IM.IntMap Picture
|
||||
, _corpses :: IM.IntMap (IM.IntMap [Corpse])
|
||||
, _lbClickMousePos :: (Float,Float)
|
||||
, _lbRotation :: Float
|
||||
, _pathGraph :: ~(Gr Point2 Float)
|
||||
, _pathGraph' :: ~[(Point2,Point2)]
|
||||
, _pathPoints :: ~(IM.IntMap (IM.IntMap [(Int,Point2)]))
|
||||
, _pathInc :: ~(M.Map Point2 [Point2])
|
||||
, _storedLevel :: Maybe World
|
||||
, _menuState :: MenuState
|
||||
, _worldState :: M.Map WorldState Bool
|
||||
, _windowX :: !Float
|
||||
, _windowY :: !Float
|
||||
, _carteDisplay :: !Bool
|
||||
, _carteCenter :: !Point2
|
||||
, _carteZoom :: !Float
|
||||
, _carteRot :: !Float
|
||||
, _lightSources :: !(IM.IntMap LightSource)
|
||||
, _tempLightSources :: ![TempLightSource]
|
||||
, _closeActiveObjects :: [Either FloorItem Button]
|
||||
, _seenLocations :: IM.IntMap (World -> Point2,String)
|
||||
-- , _remap :: Keycode -> Keycode
|
||||
}
|
||||
|
||||
data Corpse = Corpse
|
||||
{ _cpPos :: Point2
|
||||
|
||||
Reference in New Issue
Block a user