From dd4ac801597ab12220910f0deefa11b471df0e0b Mon Sep 17 00:00:00 2001 From: justin Date: Sun, 9 Nov 2025 11:38:17 +0000 Subject: [PATCH] Remove old Prop update --- src/Dodge/Data/Prop.hs | 1 - src/Dodge/Placement/Instance/LightSource.hs | 37 --------------------- src/Dodge/PrWdLsLs.hs | 13 -------- src/Dodge/Prop/Update.hs | 3 -- 4 files changed, 54 deletions(-) delete mode 100644 src/Dodge/PrWdLsLs.hs diff --git a/src/Dodge/Data/Prop.hs b/src/Dodge/Data/Prop.hs index de9576394..81f265c1d 100644 --- a/src/Dodge/Data/Prop.hs +++ b/src/Dodge/Data/Prop.hs @@ -36,7 +36,6 @@ data Debris = DebrisChunk data PropUpdate = PropUpdateId | PropUpdates [PropUpdate] - | PropUpdateLS Int PrWdLsLs | PropUpdatePosition WdP2f | PropUpdateWhen WdBl PropUpdate | PropUpdateIf WdBl PropUpdate PropUpdate diff --git a/src/Dodge/Placement/Instance/LightSource.hs b/src/Dodge/Placement/Instance/LightSource.hs index 59bf6a601..586b0f896 100644 --- a/src/Dodge/Placement/Instance/LightSource.hs +++ b/src/Dodge/Placement/Instance/LightSource.hs @@ -9,7 +9,6 @@ module Dodge.Placement.Instance.LightSource ( iShape, putLamp, spanColLightBlackI, - moveLSThen, spanLightI, spanLightY, mntLightLnkCond', @@ -18,7 +17,6 @@ module Dodge.Placement.Instance.LightSource ( import Color import Control.Lens -import Data.Maybe import Dodge.Creature.Inanimate import Dodge.Data.GenWorld import Dodge.LevelGen.PlacementHelper @@ -27,43 +25,8 @@ import Dodge.Room.Foreground import Geometry import RandomHelp import Shape -import ShapePicture import Linear -propLSThen :: - PropUpdate -> - PrWdLsLs -> --(Prop -> World -> LightSource -> LightSource) - LightSource -> - Prop -> - -- | continuation, access to ls and prop placements - (Placement -> Placement -> Maybe Placement) -> - Placement -propLSThen propf lsf ls prop cont = pt0 (PutLS ls) $ - \lspl -> - Just $ - pt0 (PutProp $ prop & prUpdate .~ PropUpdates [propf, PropUpdateLS (fromJust $ _plMID lspl) lsf]) $ - cont lspl - -moveLSThen :: - WdP2f -> --(World -> (Point2,Float)) - -- | light source offset - Point3 -> - Shape -> - (Placement -> Placement -> Maybe Placement) -> - Placement -moveLSThen posf off sh = propLSThen (PropUpdatePosition posf) (PrWdLsSetPosition posf off) thels theprop - where - thels = LS 0 $ LSParam 0 200 0.6 - theprop = - ShapeProp - { _prPos = 0 - , _prID = 0 - , _prRot = 0 - , _prUpdate = PropUpdateId - , --, _prDraw = PropDrawSPic $ noPic $ uncurryV translateSHf (_prPos pr) $ rotateSH (_pjRot pr) sh - _prDraw = noPic sh - } - -- | mount a light source on a shape mntLSOn :: -- | function describing the mount shape diff --git a/src/Dodge/PrWdLsLs.hs b/src/Dodge/PrWdLsLs.hs deleted file mode 100644 index f4958eb48..000000000 --- a/src/Dodge/PrWdLsLs.hs +++ /dev/null @@ -1,13 +0,0 @@ -module Dodge.PrWdLsLs (doPrWdLsLs) where - -import Control.Lens -import Dodge.Data.World -import Dodge.WdP2f -import Geometry.Vector3D - -doPrWdLsLs :: PrWdLsLs -> Prop -> World -> LightSource -> LightSource -doPrWdLsLs x = case x of - PrWdLsId -> \_ _ -> id - PrWdLsSetPosition y off -> \_ w -> - lsParam . lsPos .~ addZ 0 (fst (doWdP2f y w)) +.+.+ rotate3z (snd (doWdP2f y w)) off - PrWdLsSetColor c -> \_ _ -> lsParam . lsCol .~ c diff --git a/src/Dodge/Prop/Update.hs b/src/Dodge/Prop/Update.hs index b80ba4fbb..50c0b46f8 100644 --- a/src/Dodge/Prop/Update.hs +++ b/src/Dodge/Prop/Update.hs @@ -3,8 +3,6 @@ module Dodge.Prop.Update (updateProp) where import Control.Lens import Data.Foldable import Dodge.Data.World -import Dodge.PrWdLsLs ---import Dodge.Prop.Moving import Dodge.WdP2f import Dodge.WorldBool @@ -12,7 +10,6 @@ updateProp :: Prop -> World -> World updateProp pr = case _prUpdate pr of PropUpdateId -> id PropUpdates pus -> doPropUpdates pr pus - PropUpdateLS lsid x -> \w -> w & cWorld . lWorld . lightSources . ix lsid %~ doPrWdLsLs x pr w PropUpdatePosition x -> propUpdatePosition x pr PropUpdateWhen t x -> propUpdateIf t x PropUpdateId pr PropUpdateIf t x y -> propUpdateIf t x y pr