Move debug flags to config, various perf improvements

This commit is contained in:
2021-09-24 13:25:24 +01:00
parent 899cf6ef81
commit 7da1a8bc45
17 changed files with 112 additions and 265 deletions
+1 -9
View File
@@ -3,7 +3,6 @@ module Dodge.Default.World
import Dodge.Data
import Dodge.Base
import Dodge.Zone.Data
import Dodge.Debug.Flag.Data
import Dodge.Config.Data
import Dodge.Config.KeyConfig
import Dodge.Item.Data
@@ -48,7 +47,7 @@ defaultWorld = World
, _worldEvents = id
, _pressPlates = IM.empty
, _buttons = IM.empty
, _sounds = M.empty
, _toPlaySounds = M.empty
, _playingSounds = M.empty
, _corpses = Zone IM.empty
, _decorations = IM.empty
@@ -76,7 +75,6 @@ defaultWorld = World
, _keyConfig = defaultKeyConfigSDL
, _config = defaultConfig
, _sideEffects = return
, _debugFlags = defaultDebugFlags
, _inventoryMode = TopInventory
, _lClickHammer = HammerUp
, _foregroundShape = mempty
@@ -86,17 +84,11 @@ defaultWorld = World
, _frameClock = 0
, _worldBounds = defaultBounds
}
defaultDebugFlags :: DebugFlags
defaultDebugFlags = DebugFlags
{ _noClip = False
, _displaySecondsPerFrame = True
}
youLight :: TempLightSource
youLight =
TLS { _tlsPos = V3 0 0 0
,_tlsRad = 300
,_tlsIntensity = 0.1
--,_tlsUpdate = \w _ -> (w, Nothing)
,_tlsUpdate = \w _ -> Just (youLight {_tlsPos = f $ _crPos (you w)})
,_tlsTime = 0
}