Files
loop/src/Dodge/Initialisation.hs
T

42 lines
1.2 KiB
Haskell

module Dodge.Initialisation where
import Dodge.Default.World
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
, _worldEvents = saveWorldInEmptySlot LevelStartSlot
. 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 w = [show $ _rewinding w]