Attempt to improve perfomance

This commit is contained in:
2022-08-25 09:52:12 +01:00
parent 6973663055
commit 920bfdbc8e
18 changed files with 60 additions and 311 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ data Block = Block
, _blHeight :: Float
, _blMaterial :: Material
, _blDraw :: BlockDraw --Block -> SPic
, _blObstructs :: Set (Int, Int, PathEdge)
, _blObstructs :: Set PathEdgeNodes
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
+1 -1
View File
@@ -178,7 +178,7 @@ data CWorld = CWorld
, _pathGraph :: Gr Point2 PathEdge
, _pnZoning :: IM.IntMap (IM.IntMap [(Int, Point2)]) --Zoning IM.IntMap Creature
--, _peZoning :: IM.IntMap (IM.IntMap [(Int, Int, PathEdge)]) --Zoning IM.IntMap Creature
, _peZoning :: IM.IntMap (IM.IntMap (Set (Int, Int, PathEdge))) --Zoning IM.IntMap Creature
, _peZoning :: IM.IntMap (IM.IntMap (Set PathEdgeNodes))
, _hud :: HUD
, _lightSources :: IM.IntMap LightSource
, _tempLightSources :: [TempLightSource]
+1 -1
View File
@@ -46,7 +46,7 @@ data Door = Door
, _drPushedBy :: PushSource
, _drPushes :: Maybe Int
, _drMounts :: [MountedObject]
, _drObstructs :: Set (Int, Int, PathEdge)
, _drObstructs :: Set PathEdgeNodes
, _drObstacleType :: EdgeObstacle
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
+1 -1
View File
@@ -26,7 +26,7 @@ data PathGraph = PathGraph
{ _pgGraph :: Gr Point2 PathEdge
, _pgNodeMap :: Map Point2 Int
, _pgNodeCount :: Int
, _pgEdgeMap :: Map (V2 Point2) (Int, Int, PathEdge)
, _pgEdgeMap :: Map (V2 Point2) PathEdgeNodes
}
deriving (Eq, Show, Read) --, Generic)
+3 -1
View File
@@ -9,8 +9,10 @@ module Dodge.Data.Universe (
module Dodge.Data.World,
module Data.Preload,
module Picture.Data,
module Loop.Data
) where
import Loop.Data
import Control.Lens
--import qualified Data.Map.Strict as M
import Data.Preload
@@ -34,7 +36,7 @@ data Universe = Universe
}
data ConcEffect = NoConcEffect
| NewConcEffect {_ceFunction :: (Universe -> Universe, IO (Universe -> Maybe Universe))
| NewConcEffect {_ceFunction :: ConcurrentEffect Universe
, _ceString :: String, _ceIsBlocking :: Bool}
| BlockingConcEffect {_ceString :: String}
| BackgroundConcEffect {_ceString :: String}