reorganizing code

This commit is contained in:
nek0 2018-03-12 00:21:16 +01:00
parent ec2572f9e6
commit 045659caf3

View file

@ -5,6 +5,7 @@ import Affection as A hiding (get)
import SDL (get, ($=)) import SDL (get, ($=))
import qualified SDL import qualified SDL
import qualified Graphics.Rendering.OpenGL as GL hiding (get) import qualified Graphics.Rendering.OpenGL as GL hiding (get)
import NanoVG hiding (V2(..))
import Control.Monad (when, unless, void) import Control.Monad (when, unless, void)
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
@ -16,12 +17,6 @@ import Data.Matrix as M
import Data.Ecstasy as E import Data.Ecstasy as E
import Data.Maybe import Data.Maybe
import NanoVG hiding (V2(..))
import Types
import Floorplan
import Linear import Linear
import Foreign.C.Types (CFloat(..)) import Foreign.C.Types (CFloat(..))
@ -32,13 +27,15 @@ import Debug.Trace
import Interior import Interior
import Util import Util
import Types
import Floorplan
loadMap :: Affection UserData () loadMap :: Affection UserData ()
loadMap = do loadMap = do
ud <- getAffection ud <- getAffection
let fc = FloorConfig let fc = FloorConfig
(20, 20) (20, 20)
[] -- [(5,5), (35, 35)] [(5,5), (35, 35)]
(50,75) (50,75)
(Subsystems _ m) = subsystems ud (Subsystems _ m) = subsystems ud
(mat, gr) <- liftIO $ buildHallFloorIO fc (mat, gr) <- liftIO $ buildHallFloorIO fc