Simplify the main loop, events only perform functional update

This commit is contained in:
2022-11-01 11:05:51 +00:00
parent 82c4b992b0
commit d982ac728a
14 changed files with 232 additions and 150 deletions
+3
View File
@@ -1,11 +1,14 @@
module Dodge.PreloadData where
--import qualified Graphics.Rendering.OpenGL as GL
import Control.Lens
import Dodge.Data.Universe
import Preload.Update
--import SDL
sideEffectUpdatePreload :: Int -> Int -> Int -> (Universe -> IO Universe) -> Universe -> IO Universe
sideEffectUpdatePreload divRes x y f u = do
-- GL.viewport $= (GL.Position 0 0, GL.Size (fromIntegral x) (fromIntegral y))
pdata <- pdataResizeUpdate (x `div` divRes) (y `div` divRes) x y (_preloadData u)
f $ u & preloadData .~ pdata