Remove old Prop update

This commit is contained in:
2025-11-09 11:38:17 +00:00
parent e20cc593fc
commit dd4ac80159
4 changed files with 0 additions and 54 deletions
-1
View File
@@ -36,7 +36,6 @@ data Debris = DebrisChunk
data PropUpdate
= PropUpdateId
| PropUpdates [PropUpdate]
| PropUpdateLS Int PrWdLsLs
| PropUpdatePosition WdP2f
| PropUpdateWhen WdBl PropUpdate
| PropUpdateIf WdBl PropUpdate PropUpdate
@@ -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
-13
View File
@@ -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
-3
View File
@@ -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