Refactor preloading/rendering/update

This commit is contained in:
2023-03-24 11:52:40 +00:00
parent 4b92a43535
commit d524a14da4
8 changed files with 32 additions and 68 deletions
+5 -6
View File
@@ -15,11 +15,12 @@ module Dodge.Event (
handleEvent,
) where
import Control.Monad
import qualified Data.Text as T
import Dodge.Concurrent
import Dodge.Data.Universe
import Dodge.Event.Input
import Dodge.PreloadData
import Preload.Update
import LensHelp
import SDL
@@ -56,9 +57,7 @@ handleResizeEvent sev u =
u
& uvConfig . windowX .~ fromIntegral x
& uvConfig . windowY .~ fromIntegral y
& uvIOEffects %~ sideEffectUpdatePreload divRes x y
-- & uvIOEffects %~ sideEffectUpdatePreload
& uvIOEffects %~ (updatePreload >=>)
where
x = fromIntegral x'
y = fromIntegral y'
V2 x' y' = windowSizeChangedEventSize sev
divRes = resFactorNum $ u ^. uvConfig . graphics_world_resolution
V2 x y = windowSizeChangedEventSize sev