Attempt to fix some space leaks, general cleanup

This commit is contained in:
2022-08-23 23:00:12 +01:00
parent 9f00e67298
commit e7e20277e4
12 changed files with 71 additions and 263 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
module Dodge.Wall.Dust where
import Data.Foldable
import Control.Lens
import Dodge.Data.World
import Dodge.WorldEvent.Cloud
@@ -12,9 +13,9 @@ wlDustAt wl = smokeCloudAt dustcol 20 200 1 . addZ 20
dustcol = _wlColor wl & _4 .~ 1
muchWlDustAt :: Wall -> Point2 -> World -> World
muchWlDustAt wl p = flip (foldr f) [10, 20 .. 100]
muchWlDustAt wl p = flip (foldl' f) [10, 20 .. 100]
where
f h w =
f w h =
w
& smokeCloudAt dustcol 20 200 1 (addZ h (p +.+ off))
& randGen .~ g