51 lines
1.5 KiB
Haskell
51 lines
1.5 KiB
Haskell
module Dodge.Initialisation where
|
|
import Dodge.Default.World
|
|
--import Dodge.Combine
|
|
--import Dodge.Base.You
|
|
--import Dodge.Base
|
|
--import Dodge.Save
|
|
import Dodge.Data
|
|
import Dodge.Creature
|
|
--import Dodge.Story
|
|
import Dodge.WorldEvent.Cloud
|
|
import Dodge.SoundLogic
|
|
import Geometry.Data
|
|
|
|
import System.Random
|
|
import qualified Data.Set as S
|
|
import qualified Data.IntMap.Strict as IM
|
|
import qualified Data.Map as M
|
|
|
|
initialWorld :: World
|
|
initialWorld = defaultWorld
|
|
{ _keys = S.empty
|
|
, _cameraCenter = V2 0 0
|
|
, _cameraRot = 0
|
|
, _cameraZoom = 10
|
|
, _creatures = IM.fromList [(0,startCr)]
|
|
, _props = IM.empty
|
|
, _walls = IM.empty
|
|
, _floorItems = IM.empty
|
|
, _randGen = mkStdGen 2
|
|
, _mousePos = V2 0 0
|
|
, _testString = testStringInit
|
|
, _yourID = 0
|
|
, _sideEffects = return
|
|
, _worldEvents = soundStart BackgroundSound (V2 0 0) foamSprayFadeOutS Nothing
|
|
. foldr ((.) . makeStartCloudAt) id [V3 x y 5 | x <- [-5,-4..5] , y <- [-5,-4..5]]
|
|
, _pressPlates = IM.empty
|
|
, _buttons = IM.empty
|
|
, _toPlaySounds = M.empty
|
|
, _decorations = IM.empty
|
|
-- , _menuLayers = [TerminalScreen 300 rezText']
|
|
}
|
|
|
|
testStringInit :: World -> [String]
|
|
testStringInit = const []
|
|
--testStringInit = map (concatMap $ \(_,ct,_,_) -> show ct) . invertListInvMult . yourInv
|
|
--testStringInit w = fmap (show . _crHammerPosition) . IM.elems $ _creatures w
|
|
-- w = [show $ f $ _roomClipping w]
|
|
-- where
|
|
-- f (x:xs) = any (convexPolysOverlap x) xs || f xs
|
|
-- f [] = False
|