Refactor preloading/rendering/update
This commit is contained in:
+5
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user