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
-10
View File
@@ -1,10 +0,0 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Debug.Flag.Data
where
import Control.Lens
data DebugFlags = DebugFlags
{ _noClip :: Bool
, _displaySecondsPerFrame :: Bool
}
makeLenses ''DebugFlags
+2 -2
View File
@@ -1,10 +1,10 @@
module Dodge.Debug.Terminal
where
import Dodge.Data
import Dodge.Debug.Flag.Data
import Dodge.Config.Data
import Control.Lens
applyTerminalString :: String -> World -> World
applyTerminalString "NOCLIP" w = w & debugFlags . noClip %~ not
applyTerminalString "NOCLIP" w = w & config . debug_noclip %~ not
applyTerminalString _ w = w