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
+8 -15
View File
@@ -1,23 +1,10 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
module Dodge.Config.Data (
Configuration (..)
, defaultConfig
, volume_master
, volume_sound
, volume_music
, wall_textured
, cloud_shadows
, resolution_factor
, windowX
, windowY
, rotate_to_wall
, show_sound
) where
module Dodge.Config.Data
where
import Data.Aeson
import GHC.Generics
--import System.Directory
import Control.Lens
data Configuration = Configuration
{ _volume_master :: Float
@@ -30,6 +17,9 @@ data Configuration = Configuration
, _windowY :: Float
, _rotate_to_wall :: Bool
, _show_sound :: Bool
, _debug_seconds_frame :: Bool
, _debug_noclip :: Bool
, _debug_cr_status :: Bool
}
deriving (Generic, Show)
makeLenses ''Configuration
@@ -51,4 +41,7 @@ defaultConfig = Configuration
, _windowY = 600
, _rotate_to_wall = True
, _show_sound = False
, _debug_seconds_frame = True
, _debug_noclip = False
, _debug_cr_status = False
}