From 39749a8afe4136515bbbfb81f44296b2d4dd9b1e Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 25 Jun 2018 23:59:12 +0200 Subject: [PATCH] renaming module --- src/Load.hs | 4 ++-- src/{Test.hs => MainGame.hs} | 4 ++-- src/StateMachine.hs | 8 ++++---- src/Types/StateData.hs | 2 +- src/Types/UserData.hs | 2 +- tracer-game.cabal | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) rename src/{Test.hs => MainGame.hs} (99%) diff --git a/src/Load.hs b/src/Load.hs index 8a6367c..016e24e 100644 --- a/src/Load.hs +++ b/src/Load.hs @@ -20,7 +20,7 @@ import NanoVG hiding (V2(..)) -- internal imports import Types -import Test +import MainGame import Util loadLoad :: Affection UserData () @@ -157,7 +157,7 @@ updateLoad _ = do putAffection ud { assetImages = loadAssetImages ld , assetAnimations = loadAssetAnims ld - , state = Menu + , state = Main , stateData = None } loadMap diff --git a/src/Test.hs b/src/MainGame.hs similarity index 99% rename from src/Test.hs rename to src/MainGame.hs index eb5b4d7..51c2c54 100644 --- a/src/Test.hs +++ b/src/MainGame.hs @@ -1,4 +1,4 @@ -module Test where +module MainGame where import Affection as A @@ -101,7 +101,7 @@ loadMapFork ud future progress = do } ) npcposs void $ liftIO $ swapMVar progress (16 / loadSteps) - putMVar future (nws, MenuData + putMVar future (nws, MainData { mapMat = mat , imgMat = M.fromList (nrows inter) (ncols inter) $ Prelude.map diff --git a/src/StateMachine.hs b/src/StateMachine.hs index 3150d1e..7595143 100644 --- a/src/StateMachine.hs +++ b/src/StateMachine.hs @@ -7,18 +7,18 @@ import Affection import Types import Load -import Test +import MainGame instance StateMachine State UserData where - smLoad Menu = loadMap + smLoad Main = loadMap smLoad Load = loadLoad - smUpdate Menu = updateMap + smUpdate Main = updateMap smUpdate Load = updateLoad - smDraw Menu = drawMap + smDraw Main = drawMap smDraw Load = drawLoad diff --git a/src/Types/StateData.hs b/src/Types/StateData.hs index 6bf8842..62de40d 100644 --- a/src/Types/StateData.hs +++ b/src/Types/StateData.hs @@ -18,7 +18,7 @@ data StateData { loadAssetImages :: Map ImgId Image , loadAssetAnims :: Map AnimId Animation } - | MenuData + | MainData { mapMat :: Matrix TileState , imgMat :: Matrix (Maybe ImgId) , reachPoints :: [ReachPoint] diff --git a/src/Types/UserData.hs b/src/Types/UserData.hs index 3cc1b73..94d8a10 100644 --- a/src/Types/UserData.hs +++ b/src/Types/UserData.hs @@ -44,7 +44,7 @@ data UserData = UserData data State = Load - | Menu + | Main | Test data Entity f = Entity diff --git a/tracer-game.cabal b/tracer-game.cabal index 0095ff8..ff83de7 100644 --- a/tracer-game.cabal +++ b/tracer-game.cabal @@ -33,7 +33,7 @@ executable tracer-game , Interior , Init , Load - , Test + , MainGame , Navigation , MindMap , NPC