diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index 1564280..598dd48 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE BangPatterns #-} module MainGame.WorldMap where import Affection as A @@ -96,12 +97,12 @@ loadMapFork ud future progress = do logIO A.Debug ("number of reachpoints: " ++ show (length rps)) let nnex = Prelude.filter (\p -> pointType p /= RoomExit) rps npcposs <- placeNPCs inter mat rps 100 -- (length nnex) - _ <- liftIO $ swapMVar progress (14 / loadSteps, "Unfolding MindMap graph") + _ <- liftIO $ swapMVar progress (14 / loadSteps, "Preparing MindMap graph") A.logIO A.Debug $ "number of placed NPCs: " ++ show (length npcposs) - (mmintmat, mmgraph) <- buildFloorMap . springField <$> + !(mmintmat, mmgraph) <- buildFloorMap . springField <$> buildMindMap (length npcposs) 2 - _ <- liftIO $ swapMVar progress (15 / loadSteps, "Converting MindMap to images") - let mmimgmat = convertTileToImg $ manhattan mmgraph mmintmat + _ <- liftIO $ swapMVar progress (15 / loadSteps, "Unfolding and Converting MindMap to images") + let !mmimgmat = convertTileToImg $ manhattan mmgraph mmintmat _ <- liftIO $ swapMVar progress (16 / loadSteps, "Creating WorldState") (nws, _) <- yieldSystemT (worldState ud) $ do let pmmpos = (+ 0.5) . (fromIntegral :: Int -> Double) . floor <$> mmPos