From 32f1740577697c3923ddb880e76d05e95d25a106 Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 24 Mar 2026 11:28:11 +0000 Subject: [PATCH] Cleanup, improve auto wall rotate --- src/Dodge/Base/Collide.hs | 52 +++---- src/Dodge/Debug.hs | 2 +- src/Dodge/Euse.hs | 7 +- src/Dodge/HeldUse.hs | 5 +- src/Dodge/LevelGen.hs | 2 +- src/Dodge/Machine/Update.hs | 2 +- src/Dodge/Placement/Instance/Button.hs | 28 ++-- src/Dodge/Placement/Instance/Door.hs | 2 +- src/Dodge/Placement/Instance/LightSource.hs | 11 +- src/Dodge/Placement/PlaceSpot.hs | 87 ++++++----- src/Dodge/Room/Airlock.hs | 8 +- src/Dodge/Room/Door.hs | 2 +- src/Dodge/Room/Foreground.hs | 2 +- src/Dodge/Room/LasTurret.hs | 52 +++---- src/Dodge/Room/LongDoor.hs | 2 +- src/Dodge/Room/Modify.hs | 6 +- src/Dodge/Room/Pillar.hs | 4 +- src/Dodge/Room/Tutorial.hs | 26 ++-- src/Dodge/Update.hs | 2 +- src/Dodge/Update/Camera.hs | 10 +- src/Dodge/WallCreatureCollisions.hs | 4 +- src/Dodge/WorldLoad.hs | 2 +- src/Geometry/Polygon.hs | 4 +- src/RandomHelp.hs | 2 +- tags | 154 ++++++++++---------- 25 files changed, 226 insertions(+), 252 deletions(-) diff --git a/src/Dodge/Base/Collide.hs b/src/Dodge/Base/Collide.hs index 12ff033e6..581baec4c 100644 --- a/src/Dodge/Base/Collide.hs +++ b/src/Dodge/Base/Collide.hs @@ -21,7 +21,6 @@ module Dodge.Base.Collide ( bouncePoint, circOnSomeWall, circOnAnyCr, - overlapCircWalls, overlapCircWallsClosest, crsNearPoint, allVisibleWalls, @@ -73,15 +72,15 @@ doBounce x sp ep (p, mwl) = fmap f mwl , reflVelWallDamp x wl (ep -.- sp) ) ---bounceBall :: +-- bounceBall :: -- Float -> -- Point2 -> -- Point2 -> -- Float -> -- [Wall] -> -- Maybe (Point2, Point2) ---{-# INLINE bounceBall #-} ---bounceBall x sp ep r = doBounce x sp ep . collideCircWalls sp ep r +-- {-# INLINE bounceBall #-} +-- bounceBall x sp ep r = doBounce x sp ep . collideCircWalls sp ep r bouncePoint :: (Wall -> Bool) -> @@ -106,7 +105,7 @@ collide3Chasms sp w m = foldl' (flip (collide3Chasm sp)) m - --(foldMap loopPairs $ w ^. cWorld . chasms) + -- (foldMap loopPairs $ w ^. cWorld . chasms) (w ^. cWorld . cliffs) collide3Chasm :: Point3 -> (Point2, Point2) -> (Point3, MPO) -> (Point3, MPO) @@ -194,9 +193,9 @@ collidePointTestFilter t sp ep = ---- this COULD be written in terms of collidePointWallsFilterStream, TODO test ---- whether this is actually faster ---collidePointTestFilter :: (Wall -> Bool) -> Point2 -> Point2 -> StreamOf Wall -> Bool ---{-# INLINE collidePointTestFilter #-} ---collidePointTestFilter t sp ep = runIdentity +-- collidePointTestFilter :: (Wall -> Bool) -> Point2 -> Point2 -> StreamOf Wall -> Bool +-- {-# INLINE collidePointTestFilter #-} +-- collidePointTestFilter t sp ep = runIdentity -- . S.any_ (isJust . uncurry (intersectSegSeg sp ep) . _wlLine) -- . S.filter t @@ -204,15 +203,15 @@ collidePointWallsFilter :: (Wall -> Bool) -> Point2 -> Point2 -> World -> (Point {-# INLINE collidePointWallsFilter #-} collidePointWallsFilter t sp ep = collidePoint sp ep . filter t . wlsNearSeg sp ep ---overlapSegWalls :: Point2 -> Point2 -> StreamOf Wall +-- overlapSegWalls :: Point2 -> Point2 -> StreamOf Wall -- -> StreamOf (Point2,Wall) ---{-# INLINE overlapSegWalls #-} ---overlapSegWalls sp ep = S.mapMaybe $ \wl -> uncurry (intersectSegSeg sp ep) (_wlLine wl) <&> (,wl) +-- {-# INLINE overlapSegWalls #-} +-- overlapSegWalls sp ep = S.mapMaybe $ \wl -> uncurry (intersectSegSeg sp ep) (_wlLine wl) <&> (,wl) overlapSegWalls :: Point2 -> Point2 -> [Wall] -> [(Point2, Wall)] {-# INLINE overlapSegWalls #-} -overlapSegWalls sp ep = mapMaybe - $ \wl -> uncurry (intersectSegSeg sp ep) (_wlLine wl) <&> (,wl) +overlapSegWalls sp ep = mapMaybe $ + \wl -> uncurry (intersectSegSeg sp ep) (_wlLine wl) <&> (,wl) visibleWalls :: Point2 -> Point2 -> World -> [(Point2, Wall)] {-# INLINE visibleWalls #-} @@ -228,16 +227,12 @@ allVisibleWalls w = concatMap (flip (visibleWalls vPos) w . (+.+ vPos)) $ nRays where vPos = w ^. wCam . camViewFrom -overlapCircWalls :: - Point2 -> - Float -> - [Wall] -> - [(Point2, Wall)] +overlapCircWalls :: Point2 -> Float -> [Wall] -> [(Point2, Wall)] {-# INLINE overlapCircWalls #-} -overlapCircWalls p r = mapMaybe dointersect +overlapCircWalls p r = mapMaybe g where - dointersect wl = f (_wlLine wl) <&> (,wl) - f (a, b) = intersectSegSeg p (p +.+ r *.* normalizeV ((0.5 *.* (a +.+ b)) -.- p)) a b + g wl = f (_wlLine wl) <&> (,wl) + f (a, b) = intersectSegSeg p (p + r *^ vNormal (normalizeV (b - a))) a b circHitWall :: Point2 -> Point2 -> Float -> World -> Bool circHitWall sp ep r w = @@ -256,7 +251,8 @@ collideCircWalls :: Point2 -> Point2 -> Float -> [Wall] -> (Point2, Maybe Wall) collideCircWalls sp ep rad = foldl' findPoint (ep, Nothing) where findPoint (p, mwl) wl = - maybe (p, mwl) (,Just wl) . uncurry (intersectSegSeg sp p) + maybe (p, mwl) (,Just wl) + . uncurry (intersectSegSeg sp p) . shiftbyrad . _wlLine $ wl @@ -272,14 +268,7 @@ collideCircWalls sp ep rad = foldl' findPoint (ep, Nothing) overlapCircWallsClosest :: Point2 -> Float -> [Wall] -> Maybe (Point2, Wall) {-# INLINE overlapCircWallsClosest #-} -overlapCircWallsClosest p r = - safeMinimumOn (dist p . fst) - . overlapCircWalls p r - ---overlapCircWallsClosest :: Point2 -> Float -> StreamOf Wall -> Maybe (Point2,Wall) ---{-# INLINE overlapCircWallsClosest #-} ---overlapCircWallsClosest p r = minStreamOn (dist p . fst) --- . overlapCircWalls p r +overlapCircWallsClosest p r = safeMinimumOn (dist p . fst) . overlapCircWalls p r {- | Test if a circle collides with any wall. - Note no check on whether the wall is walkable. @@ -313,7 +302,7 @@ hasButtonLOS :: Point2 -> Point2 -> World -> Bool {-# INLINE hasButtonLOS #-} hasButtonLOS _ _ = const True ---hasButtonLOS p1 p2 = +-- hasButtonLOS p1 p2 = -- not -- . collidePointTestFilter (not . _wlTouchThrough) p1 p2 -- . wlsNearSeg p1 p2 @@ -325,7 +314,6 @@ hasLOSIndirect p1 p2 = . collidePointTestFilter wlIsOpaque p1 p2 . wlsNearSeg p1 p2 - canSee :: Int -> Int -> World -> Bool {-# INLINE canSee #-} canSee i j w = hasLOS p1 p2 w diff --git a/src/Dodge/Debug.hs b/src/Dodge/Debug.hs index b04f3d2bd..36a94853f 100644 --- a/src/Dodge/Debug.hs +++ b/src/Dodge/Debug.hs @@ -259,7 +259,7 @@ showMuzzlePositions u = fold $ do ^? ix invid . _2 return . color red $ setLayer DebugLayer $ reduceLocDT (f cr) loc where - f cr loc = foldMap (g . muzzlePos loc cr) (itemMuzzles $ loc) + f cr loc = foldMap (g . muzzlePos loc cr) (itemMuzzles loc) where g :: Point3Q -> Picture g pq = translate3 (pq ^. _1) $ crossPic 5 diff --git a/src/Dodge/Euse.hs b/src/Dodge/Euse.hs index 1c6a5b9cd..ddc6ab2ce 100644 --- a/src/Dodge/Euse.hs +++ b/src/Dodge/Euse.hs @@ -67,9 +67,7 @@ createHeadLamp _ cr = . lWorld . lights .:~ LSParam - ( _crPos cr - + rotate3z (_crDir cr) (translateToES cr OnHead (V3 5 0 3)) - ) + (_crPos cr + rotate3z (_crDir cr) (translateToES cr OnHead (V3 5 0 3))) 200 0.7 @@ -100,8 +98,7 @@ onEquipWristShield itm cr w = . at i ?~ forceField{_wlID = i} & setWristShieldPos - ( itm & itParams .~ ItemParamID{_itParamID = i} - ) + (itm & itParams .~ ItemParamID{_itParamID = i}) cr esite where diff --git a/src/Dodge/HeldUse.hs b/src/Dodge/HeldUse.hs index 23398ffee..6e04a4197 100644 --- a/src/Dodge/HeldUse.hs +++ b/src/Dodge/HeldUse.hs @@ -167,7 +167,7 @@ locMuzzles loc & ix 0 . mzInaccuracy .~ 0 & ix 0 . mzFlareType .~ TeslaGunFlare -- | otherwise = itemMuzzles $ loc ^. locDT . dtValue . _1 - | otherwise = itemMuzzles $ loc + | otherwise = itemMuzzles loc itemMuzzles :: LocationDT OItem -> [Muzzle] itemMuzzles loc = case itm ^. itType of @@ -933,8 +933,7 @@ removeAmmoFromMag x magid getBulletType :: DTree OItem -> Maybe Bullet getBulletType magtree = (magtree ^? dtValue . _1 . to magAmmoParams . _Just . ampBullet) - <&> buPayload .~ bpayload - <&> buEffect .~ beffect + <&> (buPayload .~ bpayload) . (buEffect .~ beffect) where bpayload = fromMaybe (BulPlain 100) $ do attree <- find ispayload (magtree ^. dtLeft) diff --git a/src/Dodge/LevelGen.hs b/src/Dodge/LevelGen.hs index 0adacce4c..4a6fc2235 100644 --- a/src/Dodge/LevelGen.hs +++ b/src/Dodge/LevelGen.hs @@ -31,7 +31,7 @@ generateWorldFromSeed rdata i = do postGenerationProcessing :: RenderData -> GenWorld -> IO World postGenerationProcessing _ gw = do let w = _gwWorld gw & cWorld . cwTiles .~ (tilesFromRooms . IM.elems $ _genRooms gw) - putStrLn $ show $ gw ^. genInts +-- print $ gw ^. genInts return $ foldl' assignPushDoors w (w ^. cWorld . lWorld . doors) assignPushDoors :: World -> Door -> World diff --git a/src/Dodge/Machine/Update.hs b/src/Dodge/Machine/Update.hs index f8b2d7046..70acc54e8 100644 --- a/src/Dodge/Machine/Update.hs +++ b/src/Dodge/Machine/Update.hs @@ -89,7 +89,7 @@ updateTurret rotSpeed mc w = . mcType . mctTurret . tuDir - %~ ((subtract mcdir) . turnTo rotSpeed mcpos aimpos . (+mcdir)) + %~ (subtract mcdir . turnTo rotSpeed mcpos aimpos . (+mcdir)) | otherwise = id closeFireAngle = seesYou -- && angleVV (ypos -.- mcpos) (unitVectorAtAngle mcdir) < 1 updateFiringStatus diff --git a/src/Dodge/Placement/Instance/Button.hs b/src/Dodge/Placement/Instance/Button.hs index 3de4e5dc3..292e7cb00 100644 --- a/src/Dodge/Placement/Instance/Button.hs +++ b/src/Dodge/Placement/Instance/Button.hs @@ -10,6 +10,7 @@ import Dodge.LightSource import Dodge.Placement.Instance.LightSource import Dodge.PlacementSpot import Geometry +import Shape triggerSwitchSPic :: Color -> Color -> PlacementSpot -> Placement triggerSwitchSPic c1 c2 ps = psPtCont ps (PutTrigger False) $ @@ -19,7 +20,8 @@ triggerSwitchSPic c1 c2 ps = psPtCont ps (PutTrigger False) $ ps ( PutButton ( makeSwitch - c1 c2 + c1 + c2 (SetTrigger True $ trigid tp) (SetTrigger False $ trigid tp) ) @@ -50,14 +52,7 @@ triggerSwitch col ps = psPtCont ps (PutTrigger False) $ Just $ pContID ps - ( PutButton - ( makeSwitch - col - col - (SetTrigger True $ trigid tp) - (SetTrigger False $ trigid tp) - ) - ) + (PutButton (makeSwitch col col (SetTrigger True $ trigid tp) (SetTrigger False $ trigid tp))) (const Nothing) where trigid tp = fromJust $ _plMID tp @@ -65,14 +60,14 @@ triggerSwitch col ps = psPtCont ps (PutTrigger False) $ putLitButOnPos :: Color -> PlacementSpot -> (Placement -> Maybe Placement) -> Placement putLitButOnPos col theps subpl = plSpot .~ theps $ - mntLSOn aShape (Just col) ls 0 (V3 0 (-40) 40) $ - \plmnt -> + mntLSOn shp ls 0 (V3 0 (-40) 40) $ + \pmnt -> jps0' - (PutButton (makeButton col (changeLight . fromJust $ _plMID plmnt)){_btPos = V2 0 (-1), _btRot = pi}) + (PutButton (makeButton col (changeLight $ pmnt ^?! plMID . _Just) & btPos .~ V2 0 (-1) & btRot .~ pi)) subpl - <&> plSpot - .~ _plSpot plmnt + <&> plSpot .~ _plSpot pmnt where + shp = fmap (fmap $ colorSH col) aShape changeLight = SetLSCol (V3 0 0.5 0) ls = lsColPosRad (V3 0.5 0 0) (V3 0 0 50) 50 @@ -107,7 +102,7 @@ putLitButOnPosExtTrig' col thePS cnt = psPtCont thePS (PutTrigger False) $ \tp -> Just $ plSpot .~ _plSpot tp $ - mntLSOn aShape (Just col) ls 0 (V3 0 (-40) 40) $ + mntLSOn shp ls 0 (V3 0 (-40) 40) $ \plmnt -> jps0' ( PutButton @@ -118,8 +113,9 @@ putLitButOnPosExtTrig' col thePS cnt = ) (cnt tp plmnt) <&> plSpot - .~ _plSpot plmnt + .~ _plSpot plmnt where + shp = fmap (fmap $ colorSH col) aShape trigid tp = fromJust $ _plMID tp oneff = SetTrigger True changeLight = SetLSCol (V3 0 0.5 0) diff --git a/src/Dodge/Placement/Instance/Door.hs b/src/Dodge/Placement/Instance/Door.hs index e063dfb31..1f570c25f 100644 --- a/src/Dodge/Placement/Instance/Door.hs +++ b/src/Dodge/Placement/Instance/Door.hs @@ -74,6 +74,6 @@ putAutoDoor a b = Placement (PS 0 0) (PutCoord a) Nothing Nothing $ \_ apl -> a b ( defaultDoor - & drTrigger .~ (WdBlCrFilterNearPoint 40 (0.5 *^ (x + y)) CrOpenAutoDoor) + & drTrigger .~ WdBlCrFilterNearPoint 40 (0.5 *^ (x + y)) CrOpenAutoDoor & drUpdate .~ DoorLerpWithTimer 0 3 ) diff --git a/src/Dodge/Placement/Instance/LightSource.hs b/src/Dodge/Placement/Instance/LightSource.hs index 12f1aa130..ead6339d4 100644 --- a/src/Dodge/Placement/Instance/LightSource.hs +++ b/src/Dodge/Placement/Instance/LightSource.hs @@ -36,15 +36,14 @@ mntLSOn :: -- | function describing the mount shape (Point2 -> Point3 -> Shape) -> -- | describing a possible color override for the shape - Maybe Color -> LightSource -> Point2 -> Point3 -> (Placement -> Maybe Placement) -> Placement -mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _) = +mntLSOn shapeF ls wallp lsp@(V3 lx ly _) = ps0jPushPS (PutLabel "light") . - ps0jPushPS (putShape . setCol $ shapeF wallp lsp) + ps0jPushPS (putShape $ shapeF wallp lsp) --ps0j (PutLabel "light") . --ps0j (putShape . setCol $ shapeF wallp lsp) . pt0 (PutLS $ ls & lsParam . lsPos .~ lsp') @@ -52,7 +51,7 @@ mntLSOn shapeF mcol ls wallp lsp@(V3 lx ly _) = lsp' = lsp -.-.- V3 x y 1 -- hack! perturb the light position V2 x y = rotateV 1 . (0.1 *.*) . normalizeV $ wallp -.- V2 lx ly - setCol = maybe id colorSH mcol +-- setCol = maybe id colorSH mcol iShape :: Point2 -> Point3 -> Shape iShape wp (V3 x y z) = thinHighBar z wp (V2 x y) @@ -107,7 +106,7 @@ vShape wallpos (V3 x y z) = wallposDown = wallpos -.- n mntLS :: (Point2 -> Point3 -> Shape) -> Point2 -> Point3 -> Placement -mntLS shp wallp lampp = mntLSOn shp Nothing defaultLS wallp lampp (const Nothing) +mntLS shp wallp lampp = mntLSOn shp defaultLS wallp lampp (const Nothing) where defaultLS = LS 0 $ LSParam 0 300 0.6 @@ -152,7 +151,7 @@ mntLightLnkCond ps = do return $ mntLSCond (fmap (fmap $ colorSH black) shp) ps mntLightLnkShape :: (Point2 -> Point3 -> Shape) -> PlacementSpot -> Placement -mntLightLnkShape shp ps = mntLSCond (fmap (fmap $ colorSH black) shp) ps +mntLightLnkShape shp = mntLSCond (fmap (fmap $ colorSH black) shp) mntLightLnkCond' :: PlacementSpot -> Placement mntLightLnkCond' = mntLSCond (fmap (fmap $ colorSH black) vShape) diff --git a/src/Dodge/Placement/PlaceSpot.hs b/src/Dodge/Placement/PlaceSpot.hs index ad636d7ed..edd5f0e43 100644 --- a/src/Dodge/Placement/PlaceSpot.hs +++ b/src/Dodge/Placement/PlaceSpot.hs @@ -1,12 +1,12 @@ ---{-# LANGUAGE LambdaCase #-} ---{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +-- {-# LANGUAGE LambdaCase #-} +-- {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} {- | deals with placement of objects within the world after they have had their coordinates set by the layout -} module Dodge.Placement.PlaceSpot (placeSpot) where ---import Control.Monad.State +-- import Control.Monad.State import Control.Monad.Trans.State.Lazy import Data.Bifunctor import Data.Foldable @@ -57,9 +57,7 @@ placePlainPSSpot w rid plmnt shift = case plmnt ^. plType of j <- x ^. plExternalID return $ gw & genPmnt . at j ?~ x recrPlace newplmnt w' = - placeSpot - rid - (w' & genRooms . ix rid . rmPmnts .:~ newplmnt) + placeSpot rid (w' & genRooms . ix rid . rmPmnts .:~ newplmnt) -- this should be tidied up placeSpotUsingRoomPos :: @@ -94,7 +92,8 @@ placeSpotRoomRand :: placeSpotRoomRand rid i f plmnt w = let (ps, g) = runState - (_rmRandPSs (w ^?! genRooms . ix rid) !! i) + -- (_rmRandPSs (w ^?! genRooms . ix rid) !! i) + (w ^?! genRooms . ix rid . rmRandPSs . ix i) $ w ^. gwWorld . randGen in placeSpot rid (w & gwWorld . randGen .~ g) (plmnt & plSpot .~ f ps) @@ -102,46 +101,54 @@ placeSpotRoomRand rid i f plmnt w = placeSpotID :: Int -> PlacementSpot -> PSType -> GenWorld -> (Int, GenWorld) placeSpotID rid ps pt w = case pt of PutTrigger cnd -> plNewID (gwWorld . cWorld . lWorld . triggers) cnd w - PutMod mdi -> plNewUpID (gwWorld . cWorld . lWorld . modifications) mdID mdi w - PutProp prp -> plNewUpID (gwWorld . cWorld . lWorld . props) prID (mvProp p rot prp) w + PutMod mdi -> + plNewUpID (gwWorld . cWorld . lWorld . modifications) mdID mdi w + PutProp prp -> + plNewUpID (gwWorld . cWorld . lWorld . props) prID (mvProp p rot prp) w PutButton bt -> - plNewUpID - (gwWorld . cWorld . lWorld . buttons) - btID - (mvButton p rot bt) - w + plNewUpID (gwWorld . cWorld . lWorld . buttons) btID (mvButton p rot bt) w PutTerminal tm -> plNewUpID (gwWorld . cWorld . lWorld . terminals) tmID tm w PutFlIt itm -> let i = IM.newKey (w ^. gwWorld . cWorld . lWorld . items) in ( i , w - & gwWorld . cWorld . lWorld . floorItems . at i ?~ FlIt p rot - & gwWorld . cWorld . lWorld . items . at i - ?~ ( itm & itID .~ NInt i - & itLocation .~ OnFloor - ) + & gwWorld + . cWorld + . lWorld + . floorItems + . at i + ?~ FlIt p rot + & gwWorld + . cWorld + . lWorld + . items + . at i + ?~ (itm & itID .~ NInt i & itLocation .~ OnFloor) ) PutCrit cr -> plNewUpID (gwWorld . cWorld . lWorld . creatures) crID (mvCr p rot cr) w PutForeground fs -> (0, w & gwWorld . cWorld . lWorld . foreShapes .:~ mvFS p rot fs) PutMachine pps mc mitm -> plMachine (map doShift pps) mc mitm p rot w PutLS ls -> plNewUpID (gwWorld . cWorld . lWorld . lightSources) lsID (mvLS p rot ls) w - RandPS _ -> error "RandPS should not be reachable here" --evaluateRandPS rid rgn ps w + RandPS _ -> error "RandPS should not be reachable here" -- evaluateRandPS rid rgn ps w PutDoor dr wl -> plDoor (dr & drZeroPos %~ pashift & drOnePos %~ pashift) wl w PutCoord cp -> plNewID (gwWorld . coordinates) (doShift cp) w PutBlock bl wl ps' -> - plBlock - (map doShift ps') - (bl & blPos %~ doShift & blDir .~ rot) - wl - w + plBlock (map doShift ps') (bl & blPos %~ doShift & blDir .~ rot) wl w PutLineBlock wl wdth a b -> plLineBlock wl wdth (doShift a) (doShift b) w PutWall qs wl -> (0, over gwWorld (placeWallPoly (map doShift qs) wl) w) PutNothing -> (0, w) PutID i -> (i, w) PutWorldUpdate f -> (0, w & f rid ps) - PutChasm ps' qs -> (0, placeChasm w rid ps' (map (map doShift) ps') - (foldMap loopPairs (map (map doShift) qs))) + PutChasm ps' qs -> + ( 0 + , placeChasm + w + rid + ps' + (map (map doShift) ps') + (foldMap (loopPairs . map doShift) qs) + ) PutLabel{} -> (0, w) where p = _psPos ps @@ -149,14 +156,15 @@ placeSpotID rid ps pt w = case pt of doShift = shiftPointBy (p, rot) pashift = compP2A (p, rot) -placeChasm :: GenWorld -> Int -> [[Point2]] -> [[Point2]] -> [(Point2,Point2)] -> GenWorld +placeChasm :: GenWorld -> Int -> [[Point2]] -> [[Point2]] -> [(Point2, Point2)] -> GenWorld placeChasm gw rid ps shiftps cfs = - gw & gwWorld . cWorld . chasms <>~ shiftps + gw + & gwWorld . cWorld . chasms <>~ shiftps & gwWorld . cWorld . cliffs <>~ cfs & genRooms . ix rid . rmPos %~ filter (\rp -> not $ any (pointInPoly (_rpPos rp)) ps) & gwWorld %~ f where - --f w = foldl' g w (loopPairs shiftps) + -- f w = foldl' g w (loopPairs shiftps) f w = foldl' g w cfs g w (x, y) = obstructPathsCrossing (S.singleton ChasmObstacle) x y w @@ -171,19 +179,16 @@ addPane wl w l = insertWall (wl & wlLine .~ l & wlID .~ i) w i = IM.newKey $ w ^. cWorld . lWorld . walls mvProp :: Point2 -> Float -> Prop -> Prop -mvProp p a = (prRot +~ a) . (prPos %~ ((p +.+) . rotateV a)) +mvProp p a = (prRot +~ a) . (prPos %~ ((p +) . rotateV a)) mvButton :: Point2 -> Float -> Button -> Button -mvButton p a = (btRot +~ a) . (btPos %~ ((p +.+) . rotateV a)) +mvButton p a = (btRot +~ a) . (btPos %~ ((p +) . rotateV a)) mvCr :: Point2 -> Float -> Creature -> Creature -mvCr p rot = - (crPos . _xy .~ p) - . (crOldPos . _xy .~ p) - . (crDir .~ rot) +mvCr p rot = (crPos . _xy .~ p) . (crOldPos . _xy .~ p) . (crDir .~ rot) mvFS :: Point2 -> Float -> ForegroundShape -> ForegroundShape -mvFS p a = (fsDir +~ a) . (fsPos %~ ((p +.+) . rotateV a)) +mvFS p a = (fsDir +~ a) . (fsPos %~ ((p +) . rotateV a)) plMachine :: [Point2] -> @@ -195,7 +200,8 @@ plMachine :: (Int, GenWorld) plMachine wallpoly mc mitm p rot gw = ( mcid - , gw & tolw . machines . at mcid ?~ themc + , gw + & tolw . machines . at mcid ?~ themc & gwWorld %~ placeMachineWalls (_mcMaterial mc) wallpoly mcid wlid & tolw %~ maybe id placeturretitm mitm ) @@ -215,8 +221,9 @@ plMachine wallpoly mc mitm p rot gw = placeMachineWalls :: Material -> [Point2] -> Int -> Int -> World -> World placeMachineWalls mat poly mcid = insertStructureWalls MachinePart baseWall poly mcid where - baseWall = defaultMachineWall & wlStructure . wsMachine .~ mcid + baseWall = defaultMachineWall + & wlStructure . wsMachine .~ mcid & wlMaterial .~ mat mvLS :: Point2 -> Float -> LightSource -> LightSource -mvLS x rot = lsParam . lsPos . _xy %~ ((+x) . rotateV rot) +mvLS x rot = lsParam . lsPos . _xy %~ ((+ x) . rotateV rot) diff --git a/src/Dodge/Room/Airlock.hs b/src/Dodge/Room/Airlock.hs index 1171b54f4..941623e05 100644 --- a/src/Dodge/Room/Airlock.hs +++ b/src/Dodge/Room/Airlock.hs @@ -55,8 +55,8 @@ decontamRoom i = & rmInPmnt .~ [(0, return . f)] & rmBound .~ [rectNSWE 75 15 0 40, switchcut] where - dr1 btid = defaultDoor & drTrigger .~ (WdBlNegate $ WdBlBtOn btid) - dr2 btid = defaultDoor & drTrigger .~ (WdBlBtOn btid) + dr1 btid = defaultDoor & drTrigger .~ WdBlNegate (WdBlBtOn btid) + dr2 btid = defaultDoor & drTrigger .~ WdBlBtOn btid f gw = fromMaybe (error "tried to put a door using an empty placement list") $ do pmnt <- gw ^? genPmnt . ix i return $ @@ -94,8 +94,8 @@ airlock0 = , _rmBound = [rectNSWE 75 15 0 40, switchcut] } where - dr1 btid = defaultDoor & drTrigger .~ (WdBlNegate $ WdBlBtOn btid) - dr2 btid = defaultDoor & drTrigger .~ (WdBlBtOn btid) + dr1 btid = defaultDoor & drTrigger .~ WdBlNegate (WdBlBtOn btid) + dr2 btid = defaultDoor & drTrigger .~ WdBlBtOn btid switchcut = rectNSWE 65 35 (-40) 20 lnks = [ (V2 20 95, 0) diff --git a/src/Dodge/Room/Door.hs b/src/Dodge/Room/Door.hs index 8e9ddf115..428ad45eb 100644 --- a/src/Dodge/Room/Door.hs +++ b/src/Dodge/Room/Door.hs @@ -44,5 +44,5 @@ triggerDoorRoom i = f gw = return $ fromMaybe (error "tried to put a door using an empty placement list") $ do pmnt <- gw ^? genPmnt . ix i return $ putDoubleDoor defaultDoorWall (V2 0 20) (V2 40 20) - (defaultDoor & drTrigger .~ (cond pmnt)) + (defaultDoor & drTrigger .~ cond pmnt) cond pmnt = WdTrig $ fromJust (_plMID pmnt) diff --git a/src/Dodge/Room/Foreground.hs b/src/Dodge/Room/Foreground.hs index 7a9a538fd..716bdc69a 100644 --- a/src/Dodge/Room/Foreground.hs +++ b/src/Dodge/Room/Foreground.hs @@ -121,7 +121,7 @@ girderZ h d w x y = [ thinHighBar h xt yt , thinHighBar h xb yb ] - <> zipWith (thinHighBar (h )) ps qs + <> zipWith (thinHighBar (h-1)) ps qs where n = w *.* normalizeV (vNormal $ y -.- x) xb = x +.+ n diff --git a/src/Dodge/Room/LasTurret.hs b/src/Dodge/Room/LasTurret.hs index 4bbd104a6..644a4e2b4 100644 --- a/src/Dodge/Room/LasTurret.hs +++ b/src/Dodge/Room/LasTurret.hs @@ -49,7 +49,7 @@ import Shape -- no lights! cenLasTur :: (RandomGen g) => State g Room -cenLasTur = do +cenLasTur = roomNgon 8 200 <&> rmPmnts .~ [ putLasTurret 0.02 @@ -168,7 +168,7 @@ lasCenSensEdge n = do lshape <- takeOne [vShape, lShape, jShape, liShape] let alight a rp = mntLSCond (fmap (fmap $ colorSH black) lshape) (PS (rotateV a $ _rpPos rp) (a + _rpDir rp)) blight a = (0, return . alight a . f i) - let cenroom = cenroom' & rmInPmnt <>~ map blight [pi, (0.5 * pi), (1.5 * pi)] + let cenroom = cenroom' & rmInPmnt <>~ map blight [pi, 0.5 * pi, 1.5 * pi] let doorroom = triggerDoorRoom n rToOnward "lasCenSensEdge" $ treeFromTrunk [door] $ @@ -194,7 +194,7 @@ lasRunYinYang = do const . ( \rp -> PolyEdge ((npoly + 1) `div` 4) - `S.member` (fold $ rp ^? rpType . rplsType) + `S.member` fold (rp ^? rpType . rplsType) ) thelight3 <- mntLightLnkCond $ @@ -202,7 +202,7 @@ lasRunYinYang = do const . ( \rp -> PolyEdge (3 * (npoly + 1) `div` 4) - `S.member` (fold $ rp ^? rpType . rplsType) + `S.member` fold (rp ^? rpType . rplsType) ) r <- shuffleLinks @@ -231,16 +231,16 @@ lasRunYinYang = do ) rToOnward "lasCenRunClose" $ return $ cleatOnward r where - awall x v = heightWallPS (PS x 0) 30 v + awall x = heightWallPS (PS x 0) 30 -- angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a/2)) $ rectWH 5 (25 - a*10/pi )) rf = 0.8 offxy = V2 0 (-100) - angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi / 4 + a * rf)) $ rectWH 5 (23 - a * 13 / pi)) + angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (rotateV (pi / 4 + a * rf) <$> rectWH 5 (23 - a * 13 / pi)) apath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 100 + rotateV a (V2 0 100)) where a = a' + pi / 16 f = rotateV (pi / 4 + a * 0.8) - bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (fmap (rotateV (pi / 4 + a * rf)) $ rectWH 5 (23 - a * 13 / pi)) + bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (rotateV (pi / 4 + a * rf) <$> rectWH 5 (23 - a * 13 / pi)) bpath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 (-100) + rotateV a (V2 0 (-100))) where a = a' + pi / 16 @@ -257,7 +257,7 @@ lasRunYinYangCenter = do const . ( \rp -> PolyEdge ((npoly + 1) `div` 4) - `S.member` (fold $ rp ^? rpType . rplsType) + `S.member` fold (rp ^? rpType . rplsType) ) thelight3 <- mntLightLnkCond $ @@ -265,7 +265,7 @@ lasRunYinYangCenter = do const . ( \rp -> PolyEdge (3 * (npoly + 1) `div` 4) - `S.member` (fold $ rp ^? rpType . rplsType) + `S.member` fold (rp ^? rpType . rplsType) ) -- thelight3 <- mntLightLnkCond $ rprBool $ const . isOutLnk r <- @@ -293,14 +293,14 @@ lasRunYinYangCenter = do ) rToOnward "lasCenRunClose" $ return $ cleatOnward r where - awall x v = heightWallPS (PS x 0) 30 v + awall x = heightWallPS (PS x 0) 30 -- angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi/4 + a/2)) $ rectWH 5 (25 - a*10/pi )) - angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (fmap (rotateV (pi / 4 + a * 0.8)) $ rectWH 5 (23 - a * 13 / pi)) + angwall a = awall (V2 0 100 + rotateV a (V2 0 100)) (rotateV (pi / 4 + a * 0.8) <$> rectWH 5 (23 - a * 13 / pi)) apath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 100 + rotateV a (V2 0 100)) where a = a' + pi / 16 f = rotateV (pi / 4 + a * 0.8) - bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (fmap (rotateV (pi / 4 + a * 0.8)) $ rectWH 5 (23 - a * 13 / pi)) + bngwall a = awall (V2 0 (-100) + rotateV a (V2 0 (-100))) (rotateV (pi / 4 + a * 0.8) <$> rectWH 5 (23 - a * 13 / pi)) bpath a' = addNodesCrossing $ (\x -> (x + f (V2 0 100), x - f (V2 0 100))) (V2 0 (-100) + rotateV a (V2 0 (-100))) where a = a' + pi / 16 @@ -334,24 +334,24 @@ lasCenRunClose' = do rToOnward "lasCenRunClose" $ return $ cleatOnward r where swall = - [ (70, (rectNSWE 10 (-10) (-10) 30)) - , (125, (rectNSWE 55 (-55) (-10) 10)) - , (180, (rectNSWE 10 (-10) (-30) 10)) + [ (70, rectNSWE 10 (-10) (-10) 30) + , (125, rectNSWE 55 (-55) (-10) 10) + , (180, rectNSWE 10 (-10) (-30) 10) ] zwall = - [ (70, (rectNSWE 10 (-10) (-30) 10)) - , (125, (rectNSWE 55 (-55) (-10) 10)) - , (180, (rectNSWE 10 (-10) (-10) 30)) + [ (70, rectNSWE 10 (-10) (-30) 10) + , (125, rectNSWE 55 (-55) (-10) 10) + , (180, rectNSWE 10 (-10) (-10) 30) ] iwall = - [ (70, (rectNSWE 10 (-10) (-15) 20)) - , (180, (rectNSWE 10 (-10) (-30) (-5))) + [ (70, rectNSWE 10 (-10) (-15) 20) + , (180, rectNSWE 10 (-10) (-30) (-5)) ] jwall = - [ (70, (rectNSWE 10 (-10) (-20) 15)) - , (180, (rectNSWE 10 (-10) 5 30)) + [ (70, rectNSWE 10 (-10) (-20) 15) + , (180, rectNSWE 10 (-10) 5 30) ] - uwall = [(180, (rectNSWE 10 (-10) (-20) 20))] + uwall = [(180, rectNSWE 10 (-10) (-20) 20)] obwalls = [swall, zwall, iwall, jwall, uwall] linkwall f x = heightWallPS @@ -390,7 +390,7 @@ lasCenRunCloseLongCor = do where llinks = memtest (FromEdge South 1) (OnEdge West) rlinks = memtest (FromEdge South 1) (OnEdge East) - awall x v = heightWallPS (PS x 0) 30 v + awall x = heightWallPS (PS x 0) 30 memtest a b x = let y = _rlType x in a `S.member` y && b `S.member` y @@ -459,7 +459,7 @@ lasCenRunClose1 = do etest (memtest (FromEdge East 0) (OnEdge South)) (memtest (FromEdge South 0) (OnEdge East)) - awall x v = heightWallPS (PS x 0) 30 v + awall x = heightWallPS (PS x 0) 30 etest f g x = f x || g x memtest a b x = let y = _rlType x @@ -500,7 +500,7 @@ lasCenRunClose2 = do etest (memtest (FromEdge East 0) (OnEdge North)) (memtest (FromEdge North 0) (OnEdge East)) - awall x v = heightWallPS (PS x 0) 30 v + awall x = heightWallPS (PS x 0) 30 etest f g x = f x || g x memtest a b x = let y = _rlType x diff --git a/src/Dodge/Room/LongDoor.hs b/src/Dodge/Room/LongDoor.hs index 8fa4e4543..744c8d0a1 100644 --- a/src/Dodge/Room/LongDoor.hs +++ b/src/Dodge/Room/LongDoor.hs @@ -118,7 +118,7 @@ addButtonSlowDoor x h = 30 (V2 0 h) (V2 x h) - (defaultDoor & drTrigger .~ (WdBlBtOn $ fromJust $ _plMID btplmnt) + (defaultDoor & drTrigger .~ WdBlBtOn (fromJust $ _plMID btplmnt) & drUpdate . drLerpSpeed .~ 0.5) $ \dr1 dr2 -> Just diff --git a/src/Dodge/Room/Modify.hs b/src/Dodge/Room/Modify.hs index 159af757e..8ee3f4a57 100644 --- a/src/Dodge/Room/Modify.hs +++ b/src/Dodge/Room/Modify.hs @@ -48,10 +48,10 @@ addLightsNGon rm = do x = y * tan (0.5 * a) f i gw = do lshape <- takeOne [vShape, lShape, jShape, liShape] - let ps = fromMaybe (PS (V2 y 0) 0) $ rpToPS <$> find iscolorlight (grm ^. rmPos) + let ps = maybe (PS (V2 y 0) 0) rpToPS $ find iscolorlight (grm ^. rmPos) alight a' = mntLSCond (fmap (fmap $ colorSH black) lshape) (rotateps a' ps) takeOne - [ spanLightY (V2 0 0) (V2 y x) (V2 (x) y) (V2 (x) (-y)) + [ spanLightY (V2 0 0) (V2 y x) (V2 x y) (V2 x (-y)) , spanLightY (V2 20 20) (V2 y 20) (V2 (-y) 20) (V2 20 (-y)) , spanLightI (V2 22 y) (V2 22 (-y)) , spanLightI (V2 x y) (V2 (-x) (-y)) @@ -61,7 +61,7 @@ addLightsNGon rm = do grm = getRoomFromID i gw rotateps a' (PS v d) = PS (rotateV a' v) (a' + d) rotateps _ _ = error "in addLightsNGon" - rpToPS rp = (PS (_rpPos rp) (_rpDir rp)) + rpToPS rp = PS (_rpPos rp) (_rpDir rp) iscolorlight rp = (ColoredLightRP `S.member` (rp ^. rpFlags)) && islinkroompos rp diff --git a/src/Dodge/Room/Pillar.hs b/src/Dodge/Room/Pillar.hs index 07155bc3e..87f6020cb 100644 --- a/src/Dodge/Room/Pillar.hs +++ b/src/Dodge/Room/Pillar.hs @@ -61,7 +61,7 @@ roomPillarsSquare = do [ mntLS vShape (rotateVAround (V2 150 150) a (V2 30 30)) - (_xy %~ (rotateVAround (V2 150 150) a) $ V3 60 60 95) + (_xy %~ rotateVAround (V2 150 150) a $ V3 60 60 95) | a <- [0, pi / 2, pi, 3 * pi / 2] ] , return @@ -70,7 +70,7 @@ roomPillarsSquare = do [ mntLS vShape (rotateVAround (V2 150 150) a (V2 150 0)) - (_xy %~ (rotateVAround (V2 150 150) a) $ V3 150 20 95) + (_xy %~ rotateVAround (V2 150 150) a $ V3 150 20 95) | a <- [0, pi / 2, pi, 3 * pi / 2] ] , addGirderLights . set rmPmnts [] diff --git a/src/Dodge/Room/Tutorial.hs b/src/Dodge/Room/Tutorial.hs index 6fd1f641c..d4da314e6 100644 --- a/src/Dodge/Room/Tutorial.hs +++ b/src/Dodge/Room/Tutorial.hs @@ -8,7 +8,6 @@ import Control.Monad import qualified Data.IntMap.Strict as IM import qualified Data.IntSet as IS import Data.Maybe -import Data.Maybe (mapMaybe) import qualified Data.Set as S import Dodge.Cleat import Dodge.Data.AmmoType @@ -304,20 +303,21 @@ chasmSpitTerminal = do l3 = mntLightLnkShape shp $ resetPLUse $ rprBool $ \rp _ -> f rp East North l4 = mntLightLnkShape shp $ resetPLUse $ rprBool $ \rp _ -> f rp East South ls <- takeOne [[l1,l2],[l3,l4] ---j ,[spanLightI (V2 120 0) (V2 120 300)] ---j , [spanLightI (V2 0 128) (V2 300 128)] ---j , [spanLightI (V2 300 0) (V2 0 300), sps0 $ putShape $ thinHighBar 95 0 300] + ,[spanLightI (V2 120 0) (V2 120 300)] + , [spanLightI (V2 0 128) (V2 300 128)] + , [spanLightI (V2 300 0) (V2 0 300), sps0 $ putShape $ thinHighBar 95 0 300] ] gh <- takeOne [55,75,97] gird <- takeOne [girderZ gh 30 10,girder gh 30 10,girderV gh 30 10] - dec <- takeOne $ -- replicate 3 [] <> - [--[] --- ,[sps0 $ putShape $ gird (V2 30 0) (V2 30 300) --- ,sps0 $ putShape $ gird (V2 270 0) (V2 270 300)] --- ,[sps0 $ putShape $ gird (V2 0 20) (V2 300 20)] - [sps0 $ putShape $ gird (V2 0 200) (V2 300 200)] + dec <- takeOne $ replicate 3 [] <> + [[sps0 $ putShape $ gird (V2 30 0) (V2 30 300)] + ,[sps0 $ putShape $ gird (V2 270 0) (V2 270 300)] + ,[sps0 $ putShape $ gird (V2 30 0) (V2 30 300),sps0 $ putShape $ gird (V2 270 0) (V2 270 300)] + ,[sps0 $ putShape $ gird (V2 0 20) (V2 300 20)] + ,[sps0 $ putShape $ gird (V2 0 200) (V2 300 200)] + ,[sps0 $ putShape $ gird (V2 0 280) (V2 300 280)] + ,[sps0 $ putShape $ gird (V2 0 20) (V2 300 20),sps0 $ putShape $ gird (V2 0 280) (V2 300 280)] ] - -- let y' = y & rmPmnts <>~ [l3, l4, l5] let y' = y & rmPmnts <>~ ls <> dec return $ tToBTree "chasmTerm" $ @@ -328,8 +328,8 @@ chasmSpitTerminal = do , return $ cleatOnward $ triggerDoorRoom i1 ] where - f rp a b = FromEdge a 2 `S.member` (fold $ rp ^? rpType . rplsType) - && OnEdge b `S.member` (fold $ rp ^? rpType . rplsType) + f rp a b = FromEdge a 2 `S.member` fold (rp ^? rpType . rplsType) + && OnEdge b `S.member` fold (rp ^? rpType . rplsType) polyChasm :: Int -> Float -> State LayoutVars Room polyChasm n x = diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 780aa8ea9..a37c7ca8d 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -336,7 +336,7 @@ muzzleWallCheck w cr = fromMaybe cr $ do else let v = minimumBy (compare `on` norm) vs in cr & crPos . _xy +~ normalize v where - f loc = map (muzzlePos loc cr) (itemMuzzles $ loc) + f loc = map (muzzlePos loc cr) (itemMuzzles loc) g cp wls p = case collidePoint cp p wls of (ep,Just _) -> Just (ep - p) _ -> Nothing diff --git a/src/Dodge/Update/Camera.hs b/src/Dodge/Update/Camera.hs index a1a2448f4..0072d7b58 100644 --- a/src/Dodge/Update/Camera.hs +++ b/src/Dodge/Update/Camera.hs @@ -221,20 +221,12 @@ rotateToOverlappingWall w = (overlapCircWallsClosest p r (filter _wlRotateTo $ wlsNearCirc p r w)) w where - r = (crRad (cr ^. crType) + 10) + r = crRad (cr ^. crType) + 10 cr = you w p = you w ^. crPos . _xy doWallRotate :: Wall -> World -> World doWallRotate = rotateTo8 . argV . uncurry (-) . _wlLine ---doWallRotate wl w = rotateTo8 --- | b - b' > 0.01 = w & wCam . camRot +~ 0.01 --- | b - b' < negate 0.01 = w & wCam . camRot -~ 0.01 --- | otherwise = w --- where --- a = argV (uncurry (-.-) $ _wlLine wl) - w ^. wCam . camRot --- b = a * (4 / pi) -- for 8 way cardinal orientation wrt wall --- b' = fromIntegral (round b :: Int) clipZoom :: -- | Furthest viewable distance diff --git a/src/Dodge/WallCreatureCollisions.hs b/src/Dodge/WallCreatureCollisions.hs index 64b9f42e8..31af60c1b 100644 --- a/src/Dodge/WallCreatureCollisions.hs +++ b/src/Dodge/WallCreatureCollisions.hs @@ -25,7 +25,6 @@ noclipCheck cfig w c | debugOn Noclip cfig && _crID c == 0 = c -- for noclip | otherwise = colCrWall w c --- no noclip check, so no need for a configuration file colCrWall :: World -> Creature -> Creature colCrWall w c | p1 == p2 = pushOrCrush ls c @@ -47,7 +46,8 @@ colCrWall w c p2 = c ^. crPos . _xy ls = _wlLine <$> wls ls' = filter (uncurry $ isLHS p1) ls - wls = filter notff $ wlsNearRect (p2 +.+ V2 r r) (p2 -.- V2 r r) w + --wls = filter notff $ wlsNearRect (p2 + V2 r r) (p2 - V2 r r) w + wls = filter notff $ wlsNearCirc p2 r w notff x = x ^. wlMaterial /= ForceField -- the amount to push creatures out from walls, extra to their radius diff --git a/src/Dodge/WorldLoad.hs b/src/Dodge/WorldLoad.hs index e04b4ce16..16c8ee7be 100644 --- a/src/Dodge/WorldLoad.hs +++ b/src/Dodge/WorldLoad.hs @@ -30,7 +30,7 @@ postWorldLoad rdata cw = do glNamedBufferStorage newfloorbo (fromIntegral $ 8 * nfloorvxs * floatSize) floorptr 0 nchasmvxs <- foldM (pokeChasm chptr) 0 (cw ^. uvWorld . cWorld . chasms) glBindBufferBase GL_SHADER_STORAGE_BUFFER 7 newchbo - glNamedBufferStorage newchbo (fromIntegral $ 2 * (max 1 nchasmvxs) * floatSize) chptr 0 + glNamedBufferStorage newchbo (fromIntegral $ 2 * max 1 nchasmvxs * floatSize) chptr 0 -- note the max 1, prevents trying to create empty buffer storage checkGLError "during postWorldLoad" return $ diff --git a/src/Geometry/Polygon.hs b/src/Geometry/Polygon.hs index 5a1ff3ede..399125681 100644 --- a/src/Geometry/Polygon.hs +++ b/src/Geometry/Polygon.hs @@ -160,9 +160,9 @@ convexHull _ = error "Tried to create the convex hull of two or fewer points" --convexPartition _ = error "unexpected shape for convexPartition" triangulateEarClip :: [Point2] -> [[Point2]] -triangulateEarClip (x:y:z:[]) = [(x:y:z:[])] +triangulateEarClip [x,y,z] = [[x,y,z]] triangulateEarClip (x:y:z:xs) - | isLHS x y z && not (any (`pointInPoly` (x:y:z:[])) xs) = (x:y:z:[]) : triangulateEarClip (x:z:xs) + | isLHS x y z && not (any (`pointInPoly` [x,y,z]) xs) = [x,y,z] : triangulateEarClip (x:z:xs) | otherwise = triangulateEarClip (y:z:xs ++ [x]) triangulateEarClip _ = error "triangulateEarClip: non-simple polygon input?" diff --git a/src/RandomHelp.hs b/src/RandomHelp.hs index 3caac915b..08fb2ee87 100644 --- a/src/RandomHelp.hs +++ b/src/RandomHelp.hs @@ -28,7 +28,7 @@ takeOneRem :: (RandomGen g) => [a] -> State g (Maybe (a, [a])) takeOneRem [] = return Nothing takeOneRem xs = state (randomR (0, length xs - 1)) >>= \i -> do - let (ys, (z : zs)) = splitAt i xs + let (ys, z : zs) = splitAt i xs return $ Just (z, ys <> zs) takeOneFiltered :: (RandomGen g) => (a -> Bool) -> [a] -> State g (Maybe a) diff --git a/tags b/tags index 84fbd5f95..453a62a87 100644 --- a/tags +++ b/tags @@ -2508,11 +2508,11 @@ _wsMachine src/Dodge/Data/Wall/Structure.hs 13;" f _xNum src/Dodge/Data/Item/Combine.hs 140;" f _xNum src/Dodge/Data/Item/Combine.hs 150;" f _xNum src/Dodge/Data/Item/Combine.hs 170;" f -aBar src/Dodge/Placement/Instance/LightSource.hs 67;" f +aBar src/Dodge/Placement/Instance/LightSource.hs 69;" f aFlame src/Dodge/Gas.hs 20;" f aGasCloud src/Dodge/Gas.hs 15;" f aRadarPulse src/Dodge/RadarSweep.hs 20;" f -aShape src/Dodge/Placement/Instance/LightSource.hs 92;" f +aShape src/Dodge/Placement/Instance/LightSource.hs 94;" f aSound src/Dodge/SoundLogic.hs 74;" f aTreeStrut src/Dodge/Tree/GenerateStructure.hs 42;" f accessTerminal src/Dodge/WorldEffect.hs 65;" f @@ -2520,7 +2520,7 @@ activateDetonator src/Dodge/Creature/Impulse/UseItem.hs 63;" f activeTargetCursorPic src/Dodge/Targeting/Draw.hs 31;" f addArmour src/Dodge/Creature.hs 82;" f addBranchAt src/Dodge/Tree/GenerateStructure.hs 18;" f -addButtonSlowDoor src/Dodge/Room/LongDoor.hs 96;" f +addButtonSlowDoor src/Dodge/Room/LongDoor.hs 95;" f addCrGibs src/Dodge/Prop/Gib.hs 17;" f addDepth src/Picture/Base.hs 125;" f addDoorAtNthLinkToggleInterrupt src/Dodge/Room/Warning.hs 43;" f @@ -2544,14 +2544,14 @@ addIndefiniteArticle src/StringHelp.hs 17;" f addLightsNGon src/Dodge/Room/Modify.hs 41;" f addNodesCrossing src/Dodge/Room/Path.hs 28;" f addNodesCrossingCirc src/Dodge/Room/Path.hs 41;" f -addPane src/Dodge/Placement/PlaceSpot.hs 169;" f +addPane src/Dodge/Placement/PlaceSpot.hs 176;" f addPointPolygon src/Geometry/Polygon.hs 142;" f addPolyWall src/Dodge/LevelGen/StaticWalls.hs 141;" f addPolyWalls src/Dodge/LevelGen/StaticWalls.hs 129;" f addRandomGirderEW src/Dodge/Room/Girder.hs 9;" f addRandomGirderFrom src/Dodge/Room/Girder.hs 16;" f addSideEffect src/Dodge/Concurrent.hs 29;" f -addSouthPillars src/Dodge/Room/LongDoor.hs 88;" f +addSouthPillars src/Dodge/Room/LongDoor.hs 87;" f addTermSignal src/Dodge/Event/Input.hs 31;" f addToTrunk src/TreeHelp.hs 157;" f addWarningTerminal src/Dodge/Room/Warning.hs 94;" f @@ -2564,11 +2564,11 @@ aimStanceInfo src/Dodge/Item/Info.hs 242;" f aimTurn src/Dodge/Creature/YourControl.hs 181;" f airlock src/Dodge/Room/Airlock.hs 28;" f airlock0 src/Dodge/Room/Airlock.hs 79;" f -airlock90 src/Dodge/Room/Airlock.hs 200;" f -airlockCrystal src/Dodge/Room/Airlock.hs 250;" f -airlockDoubleDoor src/Dodge/Room/Airlock.hs 103;" f -airlockSimple src/Dodge/Room/Airlock.hs 128;" f -airlockZ src/Dodge/Room/Airlock.hs 165;" f +airlock90 src/Dodge/Room/Airlock.hs 202;" f +airlockCrystal src/Dodge/Room/Airlock.hs 252;" f +airlockDoubleDoor src/Dodge/Room/Airlock.hs 105;" f +airlockSimple src/Dodge/Room/Airlock.hs 130;" f +airlockZ src/Dodge/Room/Airlock.hs 167;" f allVisibleWalls src/Dodge/Base/Collide.hs 225;" f alongSegBy src/Geometry.hs 40;" f alteRifle src/Dodge/Item/Held/Cane.hs 22;" f @@ -2704,7 +2704,7 @@ blinkShockwave src/Dodge/Creature/Action/Blink.hs 78;" f blinker src/Dodge/Item/Held/Utility.hs 30;" f blipAt src/Dodge/RadarSweep.hs 78;" f blockLine src/Dodge/Placement/Instance/Wall.hs 44;" f -blockPillar src/Dodge/Room/Pillar.hs 22;" f +blockPillar src/Dodge/Room/Pillar.hs 23;" f blockedCorridor src/Dodge/Room/RoadBlock.hs 71;" f blockedCorridorCloseBlocks src/Dodge/Room/RoadBlock.hs 78;" f blockingLoad src/Dodge/Concurrent.hs 35;" f @@ -3441,8 +3441,8 @@ ebEffect src/Dodge/EnergyBall.hs 45;" f ebFlicker src/Dodge/EnergyBall.hs 70;" f ebtToDamage src/Dodge/EnergyBall.hs 93;" f edgeToPic src/Dodge/Debug/Picture.hs 426;" f -effectOnEquip src/Dodge/Euse.hs 89;" f -effectOnRemove src/Dodge/Euse.hs 79;" f +effectOnEquip src/Dodge/Euse.hs 84;" f +effectOnRemove src/Dodge/Euse.hs 74;" f eitType src/Dodge/Data/EquipType.hs 15;" f ejectS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 837;" f elecCrackleS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 821;" f @@ -3492,7 +3492,7 @@ expireAndDamage src/Dodge/Bullet.hs 188;" f explodeShell src/Dodge/Projectile/Update.hs 274;" f explosionS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 693;" f explosiveBarrel src/Dodge/Creature/Inanimate.hs 25;" f -extTrigLitPos src/Dodge/Placement/Instance/Button.hs 80;" f +extTrigLitPos src/Dodge/Placement/Instance/Button.hs 82;" f extendConeToScreenEdge src/Dodge/Debug/Picture.hs 82;" f extraPics src/Dodge/Render/ShapePicture.hs 141;" f extraWeaponLinks src/Dodge/Item/Grammar.hs 93;" f @@ -3692,16 +3692,16 @@ halfHeight src/Dodge/Base/Window.hs 49;" f halfWidth src/Dodge/Base/Window.hs 49;" f haltSound src/Dodge/SoundLogic.hs 38;" f hammerCheck src/Dodge/HeldUse.hs 66;" f -handHandleOrient src/Dodge/Item/HeldOffset.hs 57;" f -handOrient src/Dodge/Item/HeldOffset.hs 39;" f +handHandleOrient src/Dodge/Item/HeldOffset.hs 58;" f +handOrient src/Dodge/Item/HeldOffset.hs 40;" f handleEvent src/Dodge/Event.hs 27;" f handleHotkeys src/Dodge/Creature/YourControl.hs 46;" f handleKeyboardEvent src/Dodge/Event/Input.hs 23;" f handleMouseButtonEvent src/Dodge/Event/Input.hs 61;" f handleMouseMotionEvent src/Dodge/Event/Input.hs 47;" f handleMouseWheelEvent src/Dodge/Event/Input.hs 56;" f -handleOrient src/Dodge/Item/HeldOffset.hs 32;" f -handlePos src/Dodge/Item/HeldOffset.hs 78;" f +handleOrient src/Dodge/Item/HeldOffset.hs 33;" f +handlePos src/Dodge/Item/HeldOffset.hs 79;" f handleResizeEvent src/Dodge/Event.hs 53;" f handleTextInput src/Dodge/Event/Input.hs 19;" f handleWindowMoveEvent src/Dodge/Event.hs 44;" f @@ -3725,7 +3725,7 @@ heldAimStance src/Dodge/Item/AimStance.hs 24;" f heldAimZoom src/Dodge/Update/Camera.hs 157;" f heldEffect src/Dodge/HeldUse.hs 63;" f heldEffectMuzzles src/Dodge/HeldUse.hs 134;" f -heldHandlePos src/Dodge/Item/HeldOffset.hs 84;" f +heldHandlePos src/Dodge/Item/HeldOffset.hs 85;" f heldInfo src/Dodge/Item/Info.hs 92;" f heldItemAmmoSlots src/Dodge/Item/AmmoSlots.hs 20;" f heldItemBulkiness src/Dodge/Creature/YourControl.hs 194;" f @@ -3753,7 +3753,7 @@ horPipe src/Dodge/Placement/Instance/Pipe.hs 9;" f hotkeyToChar src/Dodge/Inventory/SelectionList.hs 185;" f hotkeyToScancode src/Dodge/Creature/YourControl.hs 82;" f hotkeyToString src/Dodge/Inventory/SelectionList.hs 182;" f -iShape src/Dodge/Placement/Instance/LightSource.hs 55;" f +iShape src/Dodge/Placement/Instance/LightSource.hs 57;" f icosahedronPoints src/Polyhedra/Geodesic.hs 12;" f icosohedronFaces src/Polyhedra/Geodesic.hs 19;" f inLink src/Dodge/RoomLink.hs 128;" f @@ -3927,11 +3927,10 @@ itmBaseInfo src/Dodge/Item/Info.hs 30;" f itmEquipSiteInfo src/Dodge/Item/Info.hs 249;" f itmSpaceInfo src/Dodge/Item/Info.hs 25;" f itmUsageInfo src/Dodge/Item/Info.hs 229;" f -jShape src/Dodge/Placement/Instance/LightSource.hs 70;" f +jShape src/Dodge/Placement/Instance/LightSource.hs 72;" f joinItemsInList src/Dodge/Item/Grammar.hs 211;" f joystick src/Dodge/Item/Scope.hs 158;" f jps0' src/Dodge/LevelGen/PlacementHelper.hs 61;" f -jps0PushPS src/Dodge/LevelGen/PlacementHelper.hs 64;" f jsps src/Dodge/LevelGen/PlacementHelper.hs 36;" f jsps0 src/Dodge/LevelGen/PlacementHelper.hs 39;" f jsps0J src/Dodge/LevelGen/PlacementHelper.hs 48;" f @@ -3951,7 +3950,7 @@ lChasm src/Dodge/Room/Tutorial.hs 144;" f lConnect src/Dodge/Render/Connectors.hs 43;" f lConnectCol src/Dodge/Render/Connectors.hs 46;" f lConnectMulti src/Dodge/Render/Connectors.hs 51;" f -lShape src/Dodge/Placement/Instance/LightSource.hs 58;" f +lShape src/Dodge/Placement/Instance/LightSource.hs 60;" f lamp src/Dodge/Creature/Lamp.hs 18;" f lampCrSPic src/Dodge/Render/ShapePicture.hs 125;" f lasCenRunClose' src/Dodge/Room/LasTurret.hs 309;" f @@ -3988,7 +3987,7 @@ leftRightCombine src/Dodge/Item/Grammar.hs 201;" f leftWristPQ src/Dodge/Creature/HandPos.hs 82;" f legsSPic src/Dodge/Item/Draw/SPic.hs 447;" f lerpP2A src/Dodge/ShiftPoint.hs 14;" f -liShape src/Dodge/Placement/Instance/LightSource.hs 83;" f +liShape src/Dodge/Placement/Instance/LightSource.hs 85;" f light src/Color.hs 131;" f lightSensByDoor src/Dodge/Room/LasTurret.hs 77;" f lightSensInsideDoor src/Dodge/Room/LasTurret.hs 64;" f @@ -4030,7 +4029,7 @@ locDTLeftmost src/Dodge/DoubleTree.hs 148;" f locDTRightmost src/Dodge/DoubleTree.hs 151;" f locGoHelp src/Dodge/DoubleTree.hs 166;" f locMuzzles src/Dodge/HeldUse.hs 148;" f -locOrient src/Dodge/Item/HeldOffset.hs 52;" f +locOrient src/Dodge/Item/HeldOffset.hs 53;" f locToTop src/Dodge/DoubleTree.hs 145;" f locUp' src/Dodge/DoubleTree.hs 132;" f lockInv src/Dodge/Inventory/Lock.hs 9;" f @@ -4213,12 +4212,12 @@ mkDustCloudLike src/Shader/Poke/Cloud.hs 27;" f mkGraphFromEdges src/GraphHelp.hs 4;" f mkNode src/Dodge/Graph.hs 29;" f mkRectangle src/Dodge/LevelGen/DoorPane.hs 7;" f -mntLS src/Dodge/Placement/Instance/LightSource.hs 107;" f -mntLSCond src/Dodge/Placement/Instance/LightSource.hs 130;" f +mntLS src/Dodge/Placement/Instance/LightSource.hs 109;" f +mntLSCond src/Dodge/Placement/Instance/LightSource.hs 132;" f mntLSOn src/Dodge/Placement/Instance/LightSource.hs 35;" f -mntLightLnkCond src/Dodge/Placement/Instance/LightSource.hs 147;" f -mntLightLnkCond' src/Dodge/Placement/Instance/LightSource.hs 155;" f -mntLightLnkShape src/Dodge/Placement/Instance/LightSource.hs 152;" f +mntLightLnkCond src/Dodge/Placement/Instance/LightSource.hs 149;" f +mntLightLnkCond' src/Dodge/Placement/Instance/LightSource.hs 157;" f +mntLightLnkShape src/Dodge/Placement/Instance/LightSource.hs 154;" f modTo src/Geometry/Zone.hs 18;" f mouseClickOptionsList src/Dodge/Update/Input/ScreenLayer.hs 70;" f mouseCursorType src/Dodge/Render/Picture.hs 90;" f @@ -4249,16 +4248,16 @@ muzFlareAt src/Dodge/HeldUse.hs 692;" f muzzlePos src/Dodge/HeldUse.hs 779;" f muzzleRandPos src/Dodge/HeldUse.hs 788;" f muzzleWallCheck src/Dodge/Update.hs 323;" f -mvButton src/Dodge/Placement/PlaceSpot.hs 177;" f -mvCr src/Dodge/Placement/PlaceSpot.hs 180;" f -mvFS src/Dodge/Placement/PlaceSpot.hs 186;" f +mvButton src/Dodge/Placement/PlaceSpot.hs 184;" f +mvCr src/Dodge/Placement/PlaceSpot.hs 187;" f +mvFS src/Dodge/Placement/PlaceSpot.hs 190;" f mvGust src/Dodge/Update.hs 846;" f -mvLS src/Dodge/Placement/PlaceSpot.hs 222;" f +mvLS src/Dodge/Placement/PlaceSpot.hs 228;" f mvPointAlongAtSpeed src/Dodge/Base.hs 121;" f mvPointMeleeTarg src/Dodge/Creature/Boid.hs 327;" f mvPointToward src/Dodge/Base.hs 136;" f mvPointTowardAtSpeed src/Dodge/Base.hs 105;" f -mvProp src/Dodge/Placement/PlaceSpot.hs 174;" f +mvProp src/Dodge/Placement/PlaceSpot.hs 181;" f myIntersectLineLine src/Geometry/Intersect.hs 196;" f myIntersectSegSeg src/Geometry/Intersect.hs 174;" f nRays src/Geometry.hs 182;" f @@ -4306,9 +4305,8 @@ numTraversable src/TreeHelp.hs 184;" f obstacleColor src/Dodge/Debug/Picture.hs 264;" f obstructPathsCrossing src/Dodge/Path.hs 120;" f oldMachineBootS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 635;" f -onEquipWristShield src/Dodge/Euse.hs 94;" f -onRemoveWristShield src/Dodge/Euse.hs 84;" f -onXY src/Geometry/Vector3D.hs 130;" f +onEquipWristShield src/Dodge/Euse.hs 89;" f +onRemoveWristShield src/Dodge/Euse.hs 79;" f oneH src/Dodge/Creature/Test.hs 97;" f openConsole src/Dodge/Update.hs 138;" f optionMenu src/Dodge/Menu.hs 110;" f @@ -4394,21 +4392,21 @@ pjRemoteSetDirection src/Dodge/Projectile/Update.hs 196;" f plBlock src/Dodge/Placement/PlaceSpot/Block.hs 24;" f plDoor src/Dodge/Placement/PlaceSpot/TriggerDoor.hs 12;" f plLineBlock src/Dodge/Placement/PlaceSpot/Block.hs 57;" f -plMachine src/Dodge/Placement/PlaceSpot.hs 189;" f +plMachine src/Dodge/Placement/PlaceSpot.hs 193;" f plNew src/Dodge/Base/NewID.hs 19;" f plNewID src/Dodge/Base/NewID.hs 7;" f plNewUpID src/Dodge/Base/NewID.hs 13;" f plNewUsing src/Dodge/Base/NewID.hs 27;" f plPriority src/Dodge/Layout.hs 112;" f plRRpt src/Dodge/LevelGen/PlacementHelper.hs 33;" f -placeChasm src/Dodge/Placement/PlaceSpot.hs 153;" f -placeMachineWalls src/Dodge/Placement/PlaceSpot.hs 216;" f +placeChasm src/Dodge/Placement/PlaceSpot.hs 159;" f +placeMachineWalls src/Dodge/Placement/PlaceSpot.hs 221;" f placePlainPSSpot src/Dodge/Placement/PlaceSpot.hs 41;" f placeSpot src/Dodge/Placement/PlaceSpot.hs 33;" f -placeSpotID src/Dodge/Placement/PlaceSpot.hs 102;" f -placeSpotRoomRand src/Dodge/Placement/PlaceSpot.hs 87;" f -placeSpotUsingRoomPos src/Dodge/Placement/PlaceSpot.hs 65;" f -placeWallPoly src/Dodge/Placement/PlaceSpot.hs 164;" f +placeSpotID src/Dodge/Placement/PlaceSpot.hs 101;" f +placeSpotRoomRand src/Dodge/Placement/PlaceSpot.hs 85;" f +placeSpotUsingRoomPos src/Dodge/Placement/PlaceSpot.hs 63;" f +placeWallPoly src/Dodge/Placement/PlaceSpot.hs 171;" f plainRegex src/Dodge/DisplayInventory.hs 193;" f playIfFree src/Sound.hs 139;" f playPositionalSoundQueue src/Sound.hs 147;" f @@ -4515,20 +4513,19 @@ printRotPoint src/Dodge/Debug/Picture.hs 38;" f prismBox src/Shape.hs 74;" f prismPoly src/Shape.hs 60;" f projV src/Geometry/Vector.hs 177;" f -projV3 src/Geometry/Vector3D.hs 127;" f propSPic src/Dodge/Prop/Draw.hs 22;" f propagateOrientation src/Dodge/Item/Orientation.hs 92;" f ps0 src/Dodge/LevelGen/PlacementHelper.hs 52;" f -ps0PushPS src/Dodge/LevelGen/PlacementHelper.hs 80;" f -ps0PushPSw src/Dodge/LevelGen/PlacementHelper.hs 84;" f -ps0j src/Dodge/LevelGen/PlacementHelper.hs 68;" f -ps0jPushPS src/Dodge/LevelGen/PlacementHelper.hs 75;" f +ps0PushPS src/Dodge/LevelGen/PlacementHelper.hs 76;" f +ps0PushPSw src/Dodge/LevelGen/PlacementHelper.hs 80;" f +ps0j src/Dodge/LevelGen/PlacementHelper.hs 64;" f +ps0jPushPS src/Dodge/LevelGen/PlacementHelper.hs 71;" f psPt src/Dodge/LevelGen/PlacementHelper.hs 24;" f psPtCont src/Dodge/LevelGen/PlacementHelper.hs 18;" f psPtJpl src/Dodge/LevelGen/PlacementHelper.hs 12;" f psPtPl src/Dodge/LevelGen/PlacementHelper.hs 9;" f psRandRanges src/Dodge/PlacementSpot.hs 267;" f -psj src/Dodge/LevelGen/PlacementHelper.hs 71;" f +psj src/Dodge/LevelGen/PlacementHelper.hs 67;" f psposAddLabel src/Dodge/PlacementSpot.hs 71;" f pt0 src/Dodge/LevelGen/PlacementHelper.hs 55;" f ptCont src/Dodge/LevelGen/PlacementHelper.hs 21;" f @@ -4547,15 +4544,15 @@ putBlockN src/Dodge/Placement/Instance/Wall.hs 120;" f putBlockRect src/Dodge/Placement/Instance/Wall.hs 111;" f putBlockV src/Dodge/Placement/Instance/Wall.hs 114;" f putConvexChasm src/Dodge/Data/GenWorld.hs 70;" f -putDoor src/Dodge/Room/Airlock.hs 115;" f +putDoor src/Dodge/Room/Airlock.hs 117;" f putDoubleDoor src/Dodge/Placement/Instance/Door.hs 17;" f putDoubleDoorThen src/Dodge/Placement/Instance/Door.hs 21;" f putImmediateMessageTerminal src/Dodge/Placement/Instance/Terminal.hs 60;" f -putLamp src/Dodge/Placement/Instance/LightSource.hs 207;" f +putLamp src/Dodge/Placement/Instance/LightSource.hs 209;" f putLasTurret src/Dodge/Placement/Instance/Turret.hs 23;" f -putLitButOnPos src/Dodge/Placement/Instance/Button.hs 65;" f -putLitButOnPosExtTrig src/Dodge/Placement/Instance/Button.hs 98;" f -putLitButOnPosExtTrig' src/Dodge/Placement/Instance/Button.hs 101;" f +putLitButOnPos src/Dodge/Placement/Instance/Button.hs 66;" f +putLitButOnPosExtTrig src/Dodge/Placement/Instance/Button.hs 100;" f +putLitButOnPosExtTrig' src/Dodge/Placement/Instance/Button.hs 103;" f putMessageTerminal src/Dodge/Placement/Instance/Terminal.hs 57;" f putShape src/Dodge/Room/Foreground.hs 134;" f putSlideDr src/Dodge/Door/PutSlideDoor.hs 12;" f @@ -4723,10 +4720,10 @@ roomGlassOctogon src/Dodge/Room/Boss.hs 22;" f roomMiniIntro src/Dodge/Room/Room.hs 132;" f roomNgon src/Dodge/Room/Ngon.hs 16;" f roomPadCut src/Dodge/Room/Room.hs 72;" f -roomPillars src/Dodge/Room/Pillar.hs 106;" f +roomPillars src/Dodge/Room/Pillar.hs 107;" f roomPillarsContaining src/Dodge/Room/Containing.hs 39;" f -roomPillarsPassage src/Dodge/Room/Pillar.hs 93;" f -roomPillarsSquare src/Dodge/Room/Pillar.hs 49;" f +roomPillarsPassage src/Dodge/Room/Pillar.hs 94;" f +roomPillarsSquare src/Dodge/Room/Pillar.hs 50;" f roomRect src/Dodge/Room/Procedural.hs 42;" f roomRectAutoLights src/Dodge/Room/Procedural.hs 119;" f roomShuriken src/Dodge/Room/Boss.hs 116;" f @@ -4740,7 +4737,6 @@ rotD src/Padding.hs 44;" f rotMatr src/MatrixHelper.hs 79;" f rotU src/Padding.hs 39;" f rotate src/Picture/Base.hs 145;" f -rotate3 src/Geometry/Vector3D.hs 48;" f rotate3x src/Geometry/Vector3D.hs 60;" f rotate3y src/Geometry/Vector3D.hs 66;" f rotate3z src/Geometry/Vector3D.hs 54;" f @@ -4882,7 +4878,7 @@ setViewPos src/Dodge/Creature/ReaderUpdate.hs 69;" f setViewport src/Dodge/Render.hs 448;" f setVol src/Dodge/Config.hs 47;" f setWindowColor src/Dodge/Render/Walls.hs 32;" f -setWristShieldPos src/Dodge/Euse.hs 113;" f +setWristShieldPos src/Dodge/Euse.hs 108;" f setupConLoop src/Loop.hs 103;" f setupConLoop' src/Loop.hs 193;" f setupFramebuffer2GivenStencil src/Framebuffer/Setup.hs 46;" f @@ -4945,7 +4941,7 @@ shootingRange src/Dodge/Room/Room.hs 356;" f shortPoint2 src/Dodge/ShortShow.hs 4;" f shortShow src/ShortShow.hs 7;" f shotgunS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 527;" f -shoulderHeight src/Dodge/Item/HeldOffset.hs 63;" f +shoulderHeight src/Dodge/Item/HeldOffset.hs 64;" f shoulderSH src/Dodge/Creature/Picture.hs 122;" f showAttachItem src/Dodge/Item/Display.hs 92;" f showEquipItem src/Dodge/Item/Display.hs 108;" f @@ -4991,8 +4987,8 @@ slapClean7S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 747;" f slapS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 667;" f slideDoorS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 629;" f slideWindow src/ListHelp.hs 81;" f -slowDoorRoom src/Dodge/Room/LongDoor.hs 141;" f -slowDoorRoomRunPast src/Dodge/Room/LongDoor.hs 158;" f +slowDoorRoom src/Dodge/Room/LongDoor.hs 139;" f +slowDoorRoomRunPast src/Dodge/Room/LongDoor.hs 156;" f smallBattery src/Dodge/Item/Ammo.hs 57;" f smallBranch src/Dodge/Tree/GenerateStructure.hs 32;" f smallChaseCrit src/Dodge/Creature/ChaseCrit.hs 14;" f @@ -5001,7 +4997,7 @@ smallGlass1S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 825;" f smallGlass2S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 535;" f smallGlass3S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 805;" f smallGlass4S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 607;" f -smallPillar src/Dodge/Room/Pillar.hs 37;" f +smallPillar src/Dodge/Room/Pillar.hs 38;" f smallRoom src/Dodge/Room/RunPast.hs 31;" f smallSnailInt2 src/Dodge/Path.hs 81;" f smg src/Dodge/Item/Held/Stick.hs 30;" f @@ -5027,13 +5023,13 @@ soundToOnomato src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 175;" f soundToVol src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 4;" f soundWithStatus src/Dodge/SoundLogic.hs 104;" f soundWithStatusVolume src/Dodge/SoundLogic.hs 54;" f -southPillarsRoom src/Dodge/Room/LongDoor.hs 85;" f +southPillarsRoom src/Dodge/Room/LongDoor.hs 84;" f spaceAction src/Dodge/Update/Input/InGame.hs 534;" f -spanColLightBlackI src/Dodge/Placement/Instance/LightSource.hs 180;" f -spanColLightI src/Dodge/Placement/Instance/LightSource.hs 173;" f -spanLS src/Dodge/Placement/Instance/LightSource.hs 165;" f -spanLightI src/Dodge/Placement/Instance/LightSource.hs 187;" f -spanLightY src/Dodge/Placement/Instance/LightSource.hs 191;" f +spanColLightBlackI src/Dodge/Placement/Instance/LightSource.hs 182;" f +spanColLightI src/Dodge/Placement/Instance/LightSource.hs 175;" f +spanLS src/Dodge/Placement/Instance/LightSource.hs 167;" f +spanLightI src/Dodge/Placement/Instance/LightSource.hs 189;" f +spanLightY src/Dodge/Placement/Instance/LightSource.hs 193;" f sparkDam src/Dodge/Spark.hs 37;" f sparkRandDir src/Dodge/Spark.hs 117;" f sparkToDamage src/Dodge/Spark.hs 40;" f @@ -5110,7 +5106,7 @@ strFromEquipment src/Dodge/Creature/Statistics.hs 53;" f strFromHeldItem src/Dodge/Creature/Statistics.hs 67;" f strengthFactor src/Dodge/Creature/Impulse/Movement.hs 51;" f strictify src/MaybeHelp.hs 35;" f -strideRot src/Dodge/Item/HeldOffset.hs 66;" f +strideRot src/Dodge/Item/HeldOffset.hs 67;" f stringToList src/Picture/Base.hs 308;" f stringToListGrad src/Picture/Text.hs 12;" f stripZ src/Geometry/Vector3D.hs 97;" f @@ -5266,7 +5262,7 @@ tractorPullPos src/Dodge/TractorBeam/Update.hs 33;" f tractorSPic src/Dodge/TractorBeam/Draw.hs 10;" f tranRot src/Picture/Base.hs 116;" f transMat src/MatrixHelper.hs 87;" f -transToHandle src/Dodge/Item/HeldOffset.hs 27;" f +transToHandle src/Dodge/Item/HeldOffset.hs 28;" f translate src/Picture/Base.hs 108;" f translate3 src/Picture/Base.hs 112;" f translateFloatingCamera src/Dodge/Update/Camera.hs 49;" f @@ -5301,9 +5297,9 @@ treeToPotentialFunction src/Dodge/Item/Grammar.hs 147;" f triLootRoom src/Dodge/Room/Treasure.hs 23;" f triangulateEarClip src/Geometry/Polygon.hs 162;" f triggerDoorRoom src/Dodge/Room/Door.hs 32;" f -triggerSwitch src/Dodge/Placement/Instance/Button.hs 47;" f -triggerSwitchSPic src/Dodge/Placement/Instance/Button.hs 14;" f -triggerSwitchSPicLight src/Dodge/Placement/Instance/Button.hs 31;" f +triggerSwitch src/Dodge/Placement/Instance/Button.hs 48;" f +triggerSwitchSPic src/Dodge/Placement/Instance/Button.hs 15;" f +triggerSwitchSPicLight src/Dodge/Placement/Instance/Button.hs 32;" f truncFaces src/Polyhedra/Geodesic.hs 54;" f truncate src/Polyhedra/Geodesic.hs 39;" f trunkDepth src/TreeHelp.hs 162;" f @@ -5334,11 +5330,11 @@ tutRezBox src/Dodge/Room/Tutorial.hs 523;" f tutRoomTree src/Dodge/Floor.hs 20;" f tutorialMessage1 src/Dodge/Room/Tutorial.hs 548;" f tweenAngles src/Geometry/Vector.hs 190;" f -twinSlowDoorChasers src/Dodge/Room/LongDoor.hs 79;" f +twinSlowDoorChasers src/Dodge/Room/LongDoor.hs 78;" f twinSlowDoorRoom src/Dodge/Room/LongDoor.hs 34;" f twists src/Dodge/Creature/Test.hs 103;" f twoFlat src/Dodge/Creature/Test.hs 100;" f -twoFlatHRot src/Dodge/Item/HeldOffset.hs 75;" f +twoFlatHRot src/Dodge/Item/HeldOffset.hs 76;" f twoHandTwistAmount src/Dodge/Creature/YourControl.hs 166;" f twoRoomPoss src/Dodge/PlacementSpot.hs 148;" f twoStep1S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 519;" f @@ -5530,7 +5526,7 @@ vCen3 src/Geometry/Vector3D.hs 115;" f vInverse src/Geometry/Vector.hs 154;" f vNormal src/Geometry/Vector.hs 149;" f vNormaly src/Geometry/Vector3D.hs 72;" f -vShape src/Dodge/Placement/Instance/LightSource.hs 97;" f +vShape src/Dodge/Placement/Instance/LightSource.hs 99;" f vToL src/MatrixHelper.hs 56;" f vToQuat src/Quaternion.hs 42;" f validTerminalCommands src/Dodge/Debug/Terminal.hs 137;" f