diff --git a/src/Dodge/Data/Projectile.hs b/src/Dodge/Data/Projectile.hs index c2e73fd84..5d816e28f 100644 --- a/src/Dodge/Data/Projectile.hs +++ b/src/Dodge/Data/Projectile.hs @@ -49,8 +49,7 @@ data GrenadeHitEffect | GStuckWall {_stuckWlID :: WallStructure} deriving (Show, Eq, Ord, Read) --Generic, Flat) -data RocketSmoke - = ReducedRocketSmoke +data RocketSmoke = ReducedRocketSmoke deriving (Show, Eq, Ord, Read) --Generic, Flat) makeLenses ''Projectile diff --git a/src/Dodge/Debug.hs b/src/Dodge/Debug.hs index 7f735ff4b..b2b17c0f5 100644 --- a/src/Dodge/Debug.hs +++ b/src/Dodge/Debug.hs @@ -2,12 +2,7 @@ module Dodge.Debug (debugEvents, drawDebug) where -import Geometry.Data -import Dodge.WorldBool -import Dodge.Zoning.Pathing -import Dodge.Door.DoorLerp -import Dodge.ShiftPoint -import Dodge.Zoning.Base +import AesonHelp import Control.Lens import Control.Monad import qualified Data.IntMap.Strict as IM @@ -77,44 +72,8 @@ debugItem = \case Debug_put -> debugPutItems debugGet :: Universe -> [String] -debugGet u = [fromMaybe "DebugGetFail" $ debugGet1 u - , fromMaybe "DebugGetFail" $ debugGet2 u - , fromMaybe "DebugGetFail" $ debugGet3 u - ] +debugGet u = foldMap getPretty $ u ^. uvWorld . cWorld . lWorld . shockwaves ---debugGet1 :: Show a => Universe -> Maybe a -debugGet1 :: Universe -> Maybe String -debugGet1 u = do - dr <- u ^? uvWorld . cWorld . lWorld . doors . ix 2 - let wlposs x = (dr ^. drFootPrint) & each . each %~ shiftPointBy (doDoorLerp dr x) - ps = wlposs (dr ^. drLerp) - is = foldMap (S.fromList . uncurry (zoneOfSeg peZoneSize)) ps - return $ show $ S.toList is - -debugGet2 :: Universe -> Maybe String -debugGet2 u = do - let w = u ^. uvWorld - dr <- u ^? uvWorld . cWorld . lWorld . doors . ix 2 - let clerp = dr ^. drLerp - speed = dr ^?! drUpdate . drLerpSpeed - toOpen = doWdBl (_drTrigger dr) w - newlerp - | toOpen && clerp < 1 = Just . min 1 $ clerp + speed - | clerp > 0 && not toOpen = Just . max 0 $ clerp - speed - | otherwise = Nothing - x <- newlerp - let wlposs y = (dr ^. drFootPrint) & each . each %~ shiftPointBy (doDoorLerp dr y) - ps = wlposs x - is = foldMap (S.fromList . uncurry (zoneOfSeg peZoneSize)) ps - return $ show is - -debugGet3 :: Universe -> Maybe String -debugGet3 u = do - dr <- u ^? uvWorld . cWorld . lWorld . doors . ix 2 - let wlposs x = (dr ^. drFootPrint) & each . each %~ shiftPointBy (doDoorLerp dr x) - ps = wlposs (dr ^. drLerp) - is = foldMap (S.fromList . uncurry (zoneOfSeg peZoneSize)) ps - return $ show is debugPutItems :: Universe -> Maybe [DebugItem] debugPutItems u = Just $ f <$> [0..debugPutN] @@ -134,23 +93,7 @@ doDebugPut i u | otherwise = u debugPutDraw :: IM.IntMap String -> Universe -> Picture -debugPutDraw _ u = drawthedoor u <> drawthezones u - -drawthezones :: Universe -> Picture -drawthezones u = fold $ do - is <- readMaybe =<< u ^? uvDebugPut . ix 0 - let f :: [Int2] -> [Int2] - f = id - return $ foldMap (drawZoneCol yellow peZoneSize) $ f is - -drawthedoor :: Universe -> Picture -drawthedoor u = fold $ do - dr <- u ^? uvWorld . cWorld . lWorld . doors . ix 2 - let wlposs x = (dr ^. drFootPrint) & each . each %~ shiftPointBy (doDoorLerp dr x) - ps = wlposs (dr ^. drLerp) - return $ setLayer DebugLayer $ color blue $ foldMap g ps - where - g (x,y) = line [x,y] +debugPutDraw _ _ = mempty doDebugGet :: Universe -> Maybe [DebugItem] doDebugGet u = diff --git a/src/Dodge/DrWdWd.hs b/src/Dodge/DrWdWd.hs deleted file mode 100644 index 0c3792492..000000000 --- a/src/Dodge/DrWdWd.hs +++ /dev/null @@ -1,108 +0,0 @@ -{-# LANGUAGE LambdaCase #-} - -module Dodge.DrWdWd (updateDoor) where - -import Dodge.LightSource -import Data.Foldable -import qualified Data.IntMap.Strict as IM -import Data.Maybe -import qualified Data.Set as S -import Dodge.Block.Debris -import Dodge.Data.World -import Dodge.Door.DoorLerp -import Dodge.ShiftPoint -import Dodge.SoundLogic -import Dodge.Wall.Delete -import Dodge.Wall.Move -import Dodge.WorldBool -import Dodge.Zoning.Base -import Dodge.Zoning.Pathing -import Geometry.Data -import LensHelp -import Linear -import Picture.Data -import Shape.Data - -updateDoor :: Door -> World -> (S.Set Int2, World) -updateDoor dr w - | dr ^. drHP < 1 = destroyDoor dr w - | DoorLerp x <- dr ^. drUpdate = doorLerp x dr w - | otherwise = - ( mempty - , foldl' (doDoorMount (doDoorLerp dr (dr ^. drLerp))) w (dr ^. drMounts) - ) - -doDoorMount :: Point2A -> World -> MountedObject -> World -doDoorMount pa w = \case - MountedLight p r c -> - w & cWorld . lWorld . lights - .:~ LSParam (p & _xy %~ shiftPointBy pa) r c - MountedSPic x -> - w & cWorld . lWorld . tempSPic - <>~ ( x & _1 . each . sfVs . each . _xy %~ shiftPointBy pa - & _2 . each . vxPos . _xy %~ shiftPointBy pa - ) - -doorLerp :: Float -> Door -> World -> (S.Set Int2, World) -doorLerp speed dr w = fromMaybe (mempty,domounts (dr ^. drLerp) w) $ do - x <- newlerp - let ps = wlposs x - ps' = wlposs (dr ^. drLerp) - is = foldMap (S.fromList . uncurry (zoneOfSeg peZoneSize)) (ps <> ps') - -- it seems possible that this will miss some paths: we don't add zones for the - -- old footprint. Seems unlikely, but a possible cause of pathfinding bugs - return - ( is - , domounts x $ f x - & playSound x - & cWorld . lWorld . doors . ix drid . drLerp .~ x - ) - where - domounts x w' = foldl' (doDoorMount (doDoorLerp dr x)) w' (dr ^. drMounts) - f = ifoldl' (flip . moveWallID) w . wlposs - wlposs x = (dr ^. drFootPrint) & each . each %~ shiftPointBy (doDoorLerp dr x) - clerp = dr ^. drLerp - newlerp - | toOpen && clerp < 1 = Just . min 1 $ clerp + speed - | clerp > 0 && not toOpen = Just . max 0 $ clerp - speed - | otherwise = Nothing - toOpen = doWdBl (_drTrigger dr) w - drid = _drID dr - playSound x - | _drPushedBy dr == PushesItself = - soundContinue (WallSound drid) (fst $ doDoorLerp dr x) slideDoorS (Just 1) - | otherwise = id - -destroyDoor :: Door -> World -> (S.Set Int2, World) -destroyDoor dr w = - ( is - , w - & makeDoorDebris dr - & deleteWallIDs wlids - & cWorld . lWorld . doors %~ IM.delete (_drID dr) - -- & muchWlDustAt awl (0.5 * uncurry (+) (_drPos dr)) - -- & flip (foldl' (flip $ muchWlDustAt awl)) (map (pos +.+) ps) - & stopPushing (_drPushes dr) - & (destroyMounts pa) (_drMounts dr) - ) - where - pa = doDoorLerp dr (dr ^. drLerp) - is = foldMap (S.fromList . uncurry (zoneOfSeg peZoneSize)) ps - ps = (dr ^. drFootPrint) & each . each %~ shiftPointBy pa - wlids = IM.keysSet $ _drFootPrint dr - -destroyMounts :: Point2A -> [MountedObject] -> World -> World -destroyMounts pa mos w = foldl' (flip $ destroyMount pa) w mos - -destroyMount :: Point2A -> MountedObject -> World -> World -destroyMount pa = \case - MountedLight x _ _ -> destroyLSFlashAt $ x & _xy %~ shiftPointBy pa - MountedSPic{} -> id -- make debris? - -stopPushing :: Maybe Int -> World -> World -stopPushing mdrid w = fromMaybe w $ do - drid <- mdrid - dr <- w ^? cWorld . lWorld . doors . ix drid - return $ - w & cWorld . lWorld . doors . ix drid . drUpdate .~ DoorDoNothing - & stopPushing (_drPushes dr) diff --git a/src/Dodge/Item/Weapon/LaserPath.hs b/src/Dodge/Item/Weapon/LaserPath.hs index 352fef39c..5cb02a86d 100644 --- a/src/Dodge/Item/Weapon/LaserPath.hs +++ b/src/Dodge/Item/Weapon/LaserPath.hs @@ -17,11 +17,7 @@ import Linear -- this needs to be tested with both reflections and refractions reflectLaserAlong :: - Float -> - Point2 -> - Point2 -> - World -> - (Maybe (Point2, Either Creature Wall), [Point2]) + Float -> Point2 -> Point2 -> World -> (Maybe (Point2, Either Creature Wall), [Point2]) {-# INLINE reflectLaserAlong #-} reflectLaserAlong phasev sp ep w = case thingHitFilt (const True) _wlUnshadowed sp ep w of Just (p, Right wl) @@ -63,7 +59,8 @@ refract phasev x y wl p reflectExternal = 1 < abs (sin angleInc / phasev) -- note can hit multiple pulse balls -reflectPulseLaserAlong :: Float -> Point2 -> Point2 -> World -> ([(Point2, Object)], [Point2]) +reflectPulseLaserAlong :: + Float -> Point2 -> Point2 -> World -> ([(Point2, Object)], [Point2]) {-# INLINE reflectPulseLaserAlong #-} reflectPulseLaserAlong phasev sp ep w = f $ filter (isunshad . snd) $ crWlPbHit sp ep w where diff --git a/src/Dodge/Placement/Instance/Wall.hs b/src/Dodge/Placement/Instance/Wall.hs index e6e8a2107..a86f2b78c 100644 --- a/src/Dodge/Placement/Instance/Wall.hs +++ b/src/Dodge/Placement/Instance/Wall.hs @@ -22,7 +22,7 @@ import Dodge.Placement.Instance.Block import Geometry heightWallPS :: PlacementSpot -> Float -> [Point2] -> Placement -heightWallPS spot h ps = psPtPl spot $ lowBlock Stone (materialColor Stone) h ps +heightWallPS spot h = psPtPl spot . lowBlock Stone (materialColor Stone) h invisibleWall :: [Point2] -> Placement invisibleWall ps = @@ -57,14 +57,14 @@ Places an breakable window between two points. Width 8, also extends out from each point by 8. -} windowLine :: Point2 -> Point2 -> Placement -windowLine a b = sps0 $ PutLineBlock defaultWindow 8 a b +windowLine a = sps0 . PutLineBlock defaultWindow 8 a {- Places an unbreakable window between two points. Width 7, also extends out from each point by 7. -} crystalLine :: Point2 -> Point2 -> Placement -crystalLine a b = sps0 $ PutLineBlock defaultCrystalWall 7 a b +crystalLine a = sps0 . PutLineBlock defaultCrystalWall 7 a --crystalLine a b = sps0 $ PutWall ps defaultCrystalWall -- where @@ -109,8 +109,8 @@ replacePutID :: [PSType] -> Room -> Room -replacePutID i psts r = - r & rmPmnts %~ flip (subZipWith (isPutID i) (\ps pt -> ps & plType .~ pt)) psts +replacePutID i psts = + rmPmnts %~ flip (subZipWith (isPutID i) (\ps pt -> ps & plType .~ pt)) psts {- Partition a list by a predicate, apply a zip to those elements that satisfy the predicate, concatenate @@ -146,17 +146,12 @@ isPutID i ps = Just i == ps ^? plType . putID -- aline = PutLineBlock baseBlockPane 9 putBlockRect :: Float -> Float -> Float -> Float -> [Placement] -putBlockRect a x b y = - [ blockLine (V2 a b) (V2 a y) - , blockLine (V2 a y) (V2 x y) - , blockLine (V2 x y) (V2 x b) - , blockLine (V2 x b) (V2 a b) - ] +putBlockRect a x b y = uncurry blockLine <$> loopPairs (rectNSWE b y a x) putBlockV :: Float -> Float -> Float -> Float -> [Placement] -putBlockV a x b y = - [ blockLine (V2 a b) (V2 a y) - , blockLine (V2 x b) (V2 a b) +putBlockV a x b y = uncurry blockLine <$> + [ (V2 a b, V2 a y) + , (V2 x b, V2 a b) ] --putBlockC :: Float -> Float -> Float -> Float -> [Placement] @@ -167,8 +162,8 @@ putBlockV a x b y = -- ] putBlockN :: Float -> Float -> Float -> Float -> [Placement] -putBlockN a x b y = - [ blockLine (V2 a b) (V2 a y) - , blockLine (V2 x b) (V2 a b) - , blockLine (V2 x y) (V2 x b) +putBlockN a x b y = uncurry blockLine <$> + [ (V2 a b, V2 a y) + , (V2 x b, V2 a b) + , (V2 x y, V2 x b) ] diff --git a/src/Dodge/Projectile/Update.hs b/src/Dodge/Projectile/Update.hs index 27dfe331f..bc938f852 100644 --- a/src/Dodge/Projectile/Update.hs +++ b/src/Dodge/Projectile/Update.hs @@ -13,7 +13,7 @@ import Dodge.Item.Location import Dodge.Movement.Turn import Dodge.Payload import Dodge.SoundLogic -import Dodge.WorldEvent.Cloud +--import Dodge.WorldEvent.Cloud import Dodge.WorldEvent.Sound import Geometry import qualified IntMapHelp as IM @@ -126,7 +126,8 @@ tryThrust pj = fromMaybe id $ do return $ doThrust pj x . pjRemoteSetDirection y pj doThrust :: Projectile -> Maybe RocketSmoke -> World -> World -doThrust pj smoke w = +--doThrust pj smoke w = +doThrust pj _ w = w & randGen .~ g & cWorld . lWorld . projectiles . ix i . pjVel . _xy %~ (\v -> accel + frict *^ v) @@ -136,15 +137,15 @@ doThrust pj smoke w = (vel + rotateV (pi + sparkD) accel `v2z` 0) 3 10 - & makeCloudAt - RocketSmoke - lifetime - (sp + r1 + 30 *^ signorm (sp - ep)) +-- & makeCloudAt +-- RocketSmoke +-- lifetime +-- (sp + r1 + 30 *^ signorm (sp - ep)) where - lifetime = fst . randomR lt $ _randGen w - lt - | smoke == Just ReducedRocketSmoke = (50, 200) - | otherwise = (300, 500) +-- lifetime = fst . randomR lt $ _randGen w +-- lt +-- | smoke == Just ReducedRocketSmoke = (50, 200) +-- | otherwise = (300, 500) accel = rotateV (pj ^. pjDir) (V2 3 0) i = _pjID pj sp = pj ^. pjPos @@ -152,7 +153,7 @@ doThrust pj smoke w = ep = sp + vel (frict, g) = randomR (0.6, 0.9) $ _randGen w (sparkD, _) = randomR (-0.2, 0.2) $ _randGen w - r1 = addZ 0 $ randInCirc 10 & evalState $ _randGen w +-- r1 = addZ 0 $ randInCirc 10 & evalState $ _randGen w doBarrelSpin :: Int -> Float -> Projectile -> World -> World doBarrelSpin cid i pj w = diff --git a/src/Dodge/Room/Tutorial.hs b/src/Dodge/Room/Tutorial.hs index 449b2ddf6..3e3cfc845 100644 --- a/src/Dodge/Room/Tutorial.hs +++ b/src/Dodge/Room/Tutorial.hs @@ -48,7 +48,7 @@ tutAnoTree = do foldMTRS [ tToBTree "TutStartRez" . return . cleatOnward <$> tutRezBox , corDoor - , tToBTree "cor" . return . cleatOnward <$> polyChasmC 6 120 + , tToBTree "cor" . return . cleatOnward <$> southPillarsRoom 300 300 100 -- , tToBTree "x" . return . cleatOnward <$> airlockSimple -- , tToBTree "lastun" . return . cleatOnward <$> tanksRoom [] [] , return $ tToBTree "cor" $ return $ cleatOnward corridor diff --git a/src/Dodge/Shockwave/Draw.hs b/src/Dodge/Shockwave/Draw.hs index 1108a9523..5a62e4b2d 100644 --- a/src/Dodge/Shockwave/Draw.hs +++ b/src/Dodge/Shockwave/Draw.hs @@ -11,6 +11,6 @@ drawShockwave sw = $ thickCircle rad thickness where r = _swRad sw - thickness = tFraction ** 2 * r + thickness = min rad $ tFraction ** 2 * r rad = r - (3 / 4) * r * tFraction tFraction = fromIntegral (_swTimer sw) / fromIntegral (_swMaxTime sw) diff --git a/src/Dodge/Shockwave/Update.hs b/src/Dodge/Shockwave/Update.hs index baf1c1786..4fde91027 100644 --- a/src/Dodge/Shockwave/Update.hs +++ b/src/Dodge/Shockwave/Update.hs @@ -23,23 +23,10 @@ moveShockwave w sw tFraction = fromIntegral t / fromIntegral (_swMaxTime sw) rad = r - (3 / 4) * r * tFraction doDams - | (p ^. _z >= 0) && (p ^. _z < 25) = damageInCircle (Explosive dam) (p ^. _xy) rad + | (p ^. _z >= 0) && (p ^. _z < 25) + && t > 5 + = damageInCircle (Explosive dam) (p ^. _xy) rad | otherwise = id --- doDams w' = --- over (cWorld . lWorld . creatures) (IM.map damCr) $ --- foldl' --- (flip $ damageWall (Explosive 1000 p)) --- w' --- hitBlocks --- hitBlocks = map snd . overlapCircWalls p rad $ wlsNearCirc p rad w --- -- this is not expansive enough --- damCr cr --- | _crID cr `elem` is || dist (_crPos cr) p >= rad + crRad (cr ^. crType) = cr --- | otherwise = cr & crDamage .:~ Explosive dam p - ---where --- cpos = _crPos cr --- v = normalizeV (cpos -.- p) moveInverseShockwave :: World -> diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 2d1b70166..811bcac90 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -26,7 +26,7 @@ import Dodge.Data.Universe import Dodge.Debug import Dodge.DisplayInventory import Dodge.Distortion -import Dodge.DrWdWd +import Dodge.Door import Dodge.EnergyBall import Dodge.Flame import Dodge.Inventory diff --git a/src/Dodge/WorldEvent/Explosion.hs b/src/Dodge/WorldEvent/Explosion.hs index 3347132c1..d37775c06 100644 --- a/src/Dodge/WorldEvent/Explosion.hs +++ b/src/Dodge/WorldEvent/Explosion.hs @@ -11,7 +11,7 @@ module Dodge.WorldEvent.Explosion ( import Control.Monad import Data.List import Dodge.Data.World -import Dodge.EnergyBall +--import Dodge.EnergyBall import Dodge.SoundLogic import Dodge.WorldEvent.Shockwave import Dodge.WorldEvent.SpawnParticle @@ -20,7 +20,7 @@ import LensHelp import Picture import RandomHelp import Linear.V3 -import Linear.Metric +--import Linear.Metric makePoisonExplosionAt :: -- | Position @@ -71,23 +71,25 @@ makeFlameExplosionAt p w = -- particle passes through for the first frame of its existence makeExplosionAt :: Point3 -> Point3 -> World -> World -makeExplosionAt p vel w = +--makeExplosionAt p vel w = +makeExplosionAt p _ w = w & soundStart (Explosion (w ^. cWorld . lWorld . lClock)) (p ^. _xy) bangS Nothing - & addFlames +-- & addFlames & cWorld . lWorld . worldEvents .:~ MakeTempLight (LSParam p 150 (V3 1 0.5 0)) 20 - & makeShockwaveAt [] p 50 50 1 white +-- & makeShockwaveAt [] p 50 50 1 white + & makeShockwaveAt [] p 50 5000 1 white where - fVs = fmap (`v2z` 0) $ replicateM 100 (randInCirc 1) & evalState $ _randGen w - fPs' = fmap (`v2z` 0) $ replicateM 100 (randInCirc 5) & evalState $ _randGen w - fdamps = replicateM 100 (state $ randomR (0,1)) & evalState $ _randGen w - inversePushOut v = (15 - norm v) * 0.01 *.*.* v - fVs' = zipWith (+.+.+) fVs $ map inversePushOut fPs' - sizes = randomRs (2, 9) $ _randGen w - times = randomRs (15, 20) $ _randGen w - mF q v damp size time = makeFlamelet - --(q - (2*v + 2* vel)) (v + damp *.*.* vel) size time - (q - (2*v )) (v + damp *.*.* vel) size time - newFs = zipWith4 (mF p) (zipWith (+) fPs' (fmap (3 *.*.*) fVs')) fdamps sizes times - addFlames w' = foldl' (flip ($)) w' newFs +-- fVs = fmap (`v2z` 0) $ replicateM 100 (randInCirc 1) & evalState $ _randGen w +-- fPs' = fmap (`v2z` 0) $ replicateM 100 (randInCirc 5) & evalState $ _randGen w +-- fdamps = replicateM 100 (state $ randomR (0,1)) & evalState $ _randGen w +-- inversePushOut v = (15 - norm v) * 0.01 *.*.* v +-- fVs' = zipWith (+.+.+) fVs $ map inversePushOut fPs' +-- sizes = randomRs (2, 9) $ _randGen w +-- times = randomRs (15, 20) $ _randGen w +-- mF q v damp size time = makeFlamelet +-- --(q - (2*v + 2* vel)) (v + damp *.*.* vel) size time +-- (q - (2*v )) (v + damp *.*.* vel) size time +-- newFs = zipWith4 (mF p) (zipWith (+) fPs' (fmap (3 *.*.*) fVs')) fdamps sizes times +-- addFlames w' = foldl' (flip ($)) w' newFs diff --git a/src/Dodge/WorldEvent/Shockwave.hs b/src/Dodge/WorldEvent/Shockwave.hs index 40d2a5916..089401b0f 100644 --- a/src/Dodge/WorldEvent/Shockwave.hs +++ b/src/Dodge/WorldEvent/Shockwave.hs @@ -8,7 +8,6 @@ import Geometry import LensHelp import Picture --- currently very effective against walls makeShockwaveAt :: -- | IDs of invulnerable creatures. [Int] -> diff --git a/src/Dodge/WorldEvent/ThingsHit.hs b/src/Dodge/WorldEvent/ThingsHit.hs index d5516fa1a..1204928f7 100644 --- a/src/Dodge/WorldEvent/ThingsHit.hs +++ b/src/Dodge/WorldEvent/ThingsHit.hs @@ -17,6 +17,7 @@ module Dodge.WorldEvent.ThingsHit ( isWalkable, ) where +import Control.Applicative import Dodge.Wall.Pathing import Data.Monoid import qualified Data.Set as S @@ -146,9 +147,17 @@ wlsHitUnsorted sp ep wlsHitRadial :: Point2 -> Float -> World -> [(Point2, Wall)] wlsHitRadial p r = mapMaybe f . wlsNearCirc p r where - f wl = uncurry (intersectSegSeg p (p - r *.* v)) (_wlLine wl) <&> (,wl) + --f wl = uncurry (intersectSegSeg p (p - r *.* v)) (_wlLine wl) <&> (,wl) + f wl = mhp <&> (,wl) where - v = normalizeV . vNormal . uncurry (-) $ _wlLine wl + (x,y) = wl ^. wlLine + t mp = do + p' <- mp + guard (distance p p' < r) + mp + orthp = t $ orthogonalPointOnSeg x y p + mhp = orthp <|> t (return x) <|> t (return y) +-- v = normalizeV . vNormal . uncurry (-) $ _wlLine wl crsHitRadial :: Point2 -> Float -> World -> [(Point2, Creature)] crsHitRadial p r = mapMaybe f . crsNearCirc p r @@ -156,7 +165,7 @@ crsHitRadial p r = mapMaybe f . crsNearCirc p r f cr = do let cp = cr ^. crPos . _xy guard $ dist p cp < r + crRad (_crType cr) - return (cp + (1 + crRad (_crType cr)) *.* (cp - p), cr) + return (cp + (1 + crRad (_crType cr)) *^ (cp - p), cr) isFlyable :: Point2 -> Point2 -> World -> Bool {-# INLINE isFlyable #-} diff --git a/src/Dodge/Zoning/Creature.hs b/src/Dodge/Zoning/Creature.hs index 8a707e8d5..842493ebb 100644 --- a/src/Dodge/Zoning/Creature.hs +++ b/src/Dodge/Zoning/Creature.hs @@ -34,7 +34,8 @@ crIXsNearCirc :: Point2 -> Float -> World -> IS.IntSet crIXsNearCirc p r = crsNearRect (p +.+ V2 r r) (p -.- V2 r r) crsNearCirc :: Point2 -> Float -> World -> [Creature] -crsNearCirc p r w = mapMaybe (\cid -> w ^? cWorld . lWorld . creatures . ix cid) . IS.toList $ crIXsNearCirc p r w +crsNearCirc p r w = mapMaybe (\cid -> w ^? cWorld . lWorld . creatures . ix cid) . IS.toList + $ crIXsNearCirc p r w crsNearRect :: Point2 -> Point2 -> World -> IS.IntSet crsNearRect = nearRect crZoneSize _crZoning diff --git a/src/Geometry/Intersect.hs b/src/Geometry/Intersect.hs index e866650b1..19f172e89 100644 --- a/src/Geometry/Intersect.hs +++ b/src/Geometry/Intersect.hs @@ -295,7 +295,7 @@ closestPointOnLineParam :: Float {-# INLINE closestPointOnLineParam #-} closestPointOnLineParam !a !b !p = - (p -.- a) `dotV` (b -.- a) / (b -.- a) `dotV` (b -.- a) + (p - a) `dotV` (b - a) / (b - a) `dotV` (b - a) {- | Given a segment and external point, find the closest point on the segment. clamps to the end of the segment @@ -312,7 +312,7 @@ closestPointOnSeg segP1 segP2 p orthogonalPointOnSeg :: Point2 -> Point2 -> Point2 -> Maybe Point2 orthogonalPointOnSeg a b p | param < 0 || param > 1 = Nothing - | otherwise = Just $ a +.+ param *.* normalizeV (b -.- a) + | otherwise = Just $ a + param *^ normalizeV (b - a) where param = closestPointOnLineParam a b p diff --git a/tags b/tags index d3d8dae20..0ebd1ddb9 100644 --- a/tags +++ b/tags @@ -1070,7 +1070,7 @@ RandomTurn src/Dodge/Data/ActionPlan.hs 30;" C ReactorSS src/Dodge/Data/Scenario.hs 111;" C RecRoomSS src/Dodge/Data/Scenario.hs 103;" C RectRoomType src/Dodge/Data/Room.hs 33;" C -ReducedRocketSmoke src/Dodge/Data/Projectile.hs 53;" C +ReducedRocketSmoke src/Dodge/Data/Projectile.hs 52;" C ReigonalGovernment src/Dodge/Data/Scenario.hs 50;" C Religion src/Dodge/Data/Scenario.hs 47;" C Reload src/Dodge/Data/ActionPlan.hs 142;" C @@ -2534,7 +2534,7 @@ angleVV3 src/Geometry/Vector3D.hs 122;" f anyUnusedSpot src/Dodge/PlacementSpot.hs 66;" f anythingHitCirc src/Dodge/Base/Collide.hs 342;" f applyCME src/Dodge/HeldUse.hs 369;" f -applyClip src/Dodge/Debug.hs 187;" f +applyClip src/Dodge/Debug.hs 170;" f applyCreatureDamage src/Dodge/Creature/Damage.hs 14;" f applyEventIO src/Loop.hs 90;" f applyGravityPU src/Dodge/Projectile/Update.hs 40;" f @@ -2710,7 +2710,7 @@ bulletWeapons src/Dodge/Combine/Combinations.hs 248;" f burstRifle src/Dodge/Item/Held/Cane.hs 30;" f buttonFlip src/Dodge/Button/Event.hs 17;" f buzzS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 702;" f -cChasm src/Dodge/Room/Tutorial.hs 139;" f +cChasm src/Dodge/Room/Tutorial.hs 140;" f cFilledRect src/Dodge/CharacterEnums.hs 6;" f cWireRect src/Dodge/CharacterEnums.hs 10;" f calcSmoothScroll src/Dodge/SmoothScroll.hs 11;" f @@ -2746,7 +2746,7 @@ chaseCritInternal src/Dodge/Humanoid.hs 7;" f chaseCritMv src/Dodge/Creature/ReaderUpdate.hs 120;" f chaseCritPerceptionUpdate src/Dodge/Creature/Perception.hs 32;" f chaseCritVocalization src/Dodge/Creature/ChaseCrit.hs 36;" f -chasmSimpleMaze src/Dodge/Room/Tutorial.hs 210;" f +chasmSimpleMaze src/Dodge/Room/Tutorial.hs 209;" f chasmTest src/Dodge/Creature/Update.hs 132;" f chasmWallToSurface src/Dodge/Base/Collide.hs 118;" f checkCombineSelectionExists src/Dodge/DisplayInventory.hs 100;" f @@ -3020,22 +3020,22 @@ deadUpperBody src/Dodge/Creature/Picture.hs 113;" f debrisS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 684;" f debrisSPic src/Dodge/Prop/Draw.hs 21;" f debrisSize src/Dodge/Block/Debris.hs 84;" f -debugEvent src/Dodge/Debug.hs 42;" f -debugEvents src/Dodge/Debug.hs 27;" f -debugGet src/Dodge/Debug.hs 79;" f -debugGet1 src/Dodge/Debug.hs 86;" f -debugGet2 src/Dodge/Debug.hs 94;" f -debugGet3 src/Dodge/Debug.hs 111;" f -debugItem src/Dodge/Debug.hs 45;" f +debugEvent src/Dodge/Debug.hs 41;" f +debugEvents src/Dodge/Debug.hs 26;" f +debugGet src/Dodge/Debug.hs 78;" f +debugGet1 src/Dodge/Debug.hs 85;" f +debugGet2 src/Dodge/Debug.hs 93;" f +debugGet3 src/Dodge/Debug.hs 110;" f +debugItem src/Dodge/Debug.hs 44;" f debugMenu src/Dodge/Menu.hs 124;" f debugMenuOptions src/Dodge/Menu.hs 130;" f -debugMouseClickPos src/Dodge/Debug.hs 202;" f +debugMouseClickPos src/Dodge/Debug.hs 185;" f debugOn src/Dodge/Data/Config.hs 154;" f -debugPutDraw src/Dodge/Debug.hs 136;" f -debugPutItems src/Dodge/Debug.hs 119;" f -debugPutN src/Dodge/Debug.hs 125;" f -debugShowPath src/Dodge/Debug.hs 162;" f -debugWritableValues src/Dodge/Debug.hs 175;" f +debugPutDraw src/Dodge/Debug.hs 135;" f +debugPutItems src/Dodge/Debug.hs 118;" f +debugPutN src/Dodge/Debug.hs 124;" f +debugShowPath src/Dodge/Debug.hs 145;" f +debugWritableValues src/Dodge/Debug.hs 158;" f decodeSensorType src/Dodge/Terminal.hs 72;" f decomposeSelfTree src/Dodge/Tree/Compose.hs 61;" f decomposeTree src/Dodge/Tree/Compose.hs 58;" f @@ -3105,15 +3105,15 @@ deleteWallIDs src/Dodge/Wall/Delete.hs 28;" f denormalEdges src/Polyhedra.hs 136;" f destroyAllInvItems src/Dodge/Inventory.hs 53;" f destroyBlock src/Dodge/Block.hs 17;" f -destroyDoor src/Dodge/DrWdWd.hs 76;" f +destroyDoor src/Dodge/Door.hs 74;" f destroyInvItem src/Dodge/Inventory.hs 40;" f destroyItem src/Dodge/Inventory.hs 62;" f destroyLSFlashAt src/Dodge/LightSource.hs 44;" f destroyMachine src/Dodge/Machine/Destroy.hs 13;" f destroyMatS src/Dodge/Material/Sound.hs 7;" f destroyMcType src/Dodge/Machine/Destroy.hs 22;" f -destroyMount src/Dodge/DrWdWd.hs 97;" f -destroyMounts src/Dodge/DrWdWd.hs 94;" f +destroyMount src/Dodge/Door.hs 95;" f +destroyMounts src/Dodge/Door.hs 92;" f destroyProjectile src/Dodge/Projectile/Update.hs 108;" f detV src/Geometry/Vector.hs 94;" f detector src/Dodge/Item/Held/Utility.hs 27;" f @@ -3148,7 +3148,7 @@ dmType src/Dodge/Damage.hs 38;" f doAimTwist src/Dodge/Creature/YourControl.hs 154;" f doAnyEquipmentEffect src/Dodge/Creature/State.hs 141;" f doBackspace src/Dodge/Update/Input/Text.hs 31;" f -doBarrelSpin src/Dodge/Projectile/Update.hs 157;" f +doBarrelSpin src/Dodge/Projectile/Update.hs 158;" f doBlBl src/Dodge/BlBl.hs 5;" f doBounce src/Dodge/Base/Collide.hs 67;" f doButtonEvent src/Dodge/Button/Event.hs 9;" f @@ -3162,8 +3162,8 @@ doCrWdAc src/Dodge/CreatureEffect.hs 47;" f doDamage src/Dodge/Creature/State.hs 43;" f doDeathToggle src/Dodge/WorldEffect.hs 91;" f doDeathTriggers src/Dodge/WorldEffect.hs 84;" f -doDebugGet src/Dodge/Debug.hs 155;" f -doDebugPut src/Dodge/Debug.hs 128;" f +doDebugGet src/Dodge/Debug.hs 138;" f +doDebugPut src/Dodge/Debug.hs 127;" f doDebugTest src/Dodge/Update/Input/DebugTest.hs 23;" f doDebugTest2 src/Dodge/Update/Input/DebugTest.hs 38;" f doDebugTestF10 src/Dodge/Update/Input/DebugTest.hs 66;" f @@ -3173,7 +3173,7 @@ doDebugTestF6 src/Dodge/Update/Input/DebugTest.hs 41;" f doDebugTestF7 src/Dodge/Update/Input/DebugTest.hs 51;" f doDebugTestF8 src/Dodge/Update/Input/DebugTest.hs 59;" f doDoorLerp src/Dodge/Door/DoorLerp.hs 8;" f -doDoorMount src/Dodge/DrWdWd.hs 35;" f +doDoorMount src/Dodge/Door.hs 34;" f doDrag src/Dodge/Update/Input/InGame.hs 127;" f doDrawing src/Dodge/Render.hs 34;" f doDrawing' src/Dodge/Render.hs 45;" f @@ -3216,7 +3216,7 @@ doWorldEvents src/Dodge/Update.hs 429;" f doWorldPos src/Dodge/WorldPos.hs 10;" f door src/Dodge/Room/Door.hs 13;" f doorBetween src/Dodge/Placement/Instance/Door.hs 44;" f -doorLerp src/Dodge/DrWdWd.hs 46;" f +doorLerp src/Dodge/Door.hs 44;" f dotV src/Geometry/Vector.hs 76;" f dotV3 src/Geometry/Vector3D.hs 119;" f doubleCorridorBarrels src/Dodge/Room/Room.hs 276;" f @@ -3248,8 +3248,8 @@ drawCombFilter src/Dodge/Render/Picture.hs 269;" f drawCombineInventory src/Dodge/Render/HUD.hs 182;" f drawConcurrentMessage src/Dodge/Render/Picture.hs 74;" f drawCoord src/Dodge/Debug/Picture.hs 395;" f -drawCrInfo src/Dodge/Debug.hs 226;" f -drawCrInfo' src/Dodge/Debug.hs 221;" f +drawCrInfo src/Dodge/Debug.hs 209;" f +drawCrInfo' src/Dodge/Debug.hs 204;" f drawCreature src/Dodge/Render/ShapePicture.hs 71;" f drawCreatureDisplayTexts src/Dodge/Debug/Picture.hs 199;" f drawCross src/Dodge/Render/Label.hs 24;" f @@ -3258,7 +3258,7 @@ drawCursorAt src/Dodge/Render/List.hs 72;" f drawCursorByTerminalStatus src/Dodge/Render/Picture.hs 139;" f drawDDATest src/Dodge/Debug/Picture.hs 311;" f drawDamSensor src/Dodge/Machine/Draw.hs 27;" f -drawDebug src/Dodge/Debug.hs 264;" f +drawDebug src/Dodge/Debug.hs 247;" f drawDrag src/Dodge/Render/Picture.hs 200;" f drawDragDrop src/Dodge/Render/Picture.hs 229;" f drawDragPickup src/Dodge/Render/Picture.hs 238;" f @@ -3356,8 +3356,6 @@ drawZone src/Dodge/Debug/Picture.hs 152;" f drawZoneCirc src/Dodge/Debug/Picture.hs 300;" f drawZoneCol src/Dodge/Debug/Picture.hs 149;" f drawZoneNearPointCursor src/Dodge/Debug/Picture.hs 293;" f -drawthedoor src/Dodge/Debug.hs 146;" f -drawthezones src/Dodge/Debug.hs 139;" f dropAll src/Dodge/Creature/Update.hs 129;" f dropInventoryPath src/Dodge/HeldUse.hs 1351;" f dropItem src/Dodge/Creature/Action.hs 155;" f @@ -3436,7 +3434,7 @@ expandPolyByFixed src/Dodge/LevelGen/StaticWalls.hs 97;" f expandPolyCorners src/Dodge/LevelGen/StaticWalls.hs 103;" f expandToSquare src/Dodge/LevelGen/StaticWalls/Deprecated.hs 83;" f expireAndDamage src/Dodge/Bullet.hs 188;" f -explodeShell src/Dodge/Projectile/Update.hs 228;" f +explodeShell src/Dodge/Projectile/Update.hs 229;" f explosionS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 556;" f explosiveBarrel src/Dodge/Creature/Inanimate.hs 25;" f extTrigLitPos src/Dodge/Placement/Instance/Button.hs 84;" f @@ -3499,7 +3497,7 @@ floorTo src/Geometry/Zone.hs 12;" f floorWire src/Dodge/Wire.hs 13;" f foamSprayFadeOutS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 558;" f foamSprayLoopS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 554;" f -foldMTRS src/Dodge/Room/Tutorial.hs 84;" f +foldMTRS src/Dodge/Room/Tutorial.hs 85;" f foldPairs src/ListHelp.hs 37;" f foldrWhileArb src/ListHelp.hs 110;" f followImpulse src/Dodge/Creature/Impulse.hs 24;" f @@ -3560,8 +3558,8 @@ getCloseObj src/Dodge/Update/Input/InGame.hs 533;" f getCommand src/Dodge/Terminal.hs 52;" f getCommands src/Dodge/Terminal.hs 49;" f getCrMoveSpeed src/Dodge/Creature/Statistics.hs 50;" f -getCrsFromRooms src/Dodge/Room/Tutorial.hs 359;" f -getCrsFromRooms' src/Dodge/Room/Tutorial.hs 346;" f +getCrsFromRooms src/Dodge/Room/Tutorial.hs 358;" f +getCrsFromRooms' src/Dodge/Room/Tutorial.hs 345;" f getDebugMouseOver src/Dodge/Update.hs 377;" f getDistortions src/Dodge/Render.hs 435;" f getEdgesCrossing src/Dodge/Path.hs 42;" f @@ -3578,7 +3576,7 @@ getNodePos src/Dodge/Path.hs 39;" f getPJStabiliser src/Dodge/HeldUse.hs 1251;" f getPretty src/AesonHelp.hs 8;" f getPromptTM src/Dodge/Terminal/Type.hs 3;" f -getRoomsFromInts src/Dodge/Room/Tutorial.hs 342;" f +getRoomsFromInts src/Dodge/Room/Tutorial.hs 341;" f getRootItemBounds src/Dodge/Render/HUD.hs 100;" f getRootItemInvID src/Dodge/Inventory/Location.hs 35;" f getSelectedCloseObj src/Dodge/SelectedClose.hs 14;" f @@ -3782,7 +3780,7 @@ inventoryX src/Dodge/Creature.hs 113;" f inverseSelNumPos src/Dodge/SelectionSections.hs 193;" f inverseSelSecYint src/Dodge/SelectionSections.hs 164;" f inverseSelSecYintXPosCheck src/Dodge/SelectionSections.hs 177;" f -inverseShockwaveAt src/Dodge/WorldEvent/Shockwave.hs 43;" f +inverseShockwaveAt src/Dodge/WorldEvent/Shockwave.hs 42;" f invertEncircleDistP src/Dodge/Creature/Boid.hs 16;" f invertIntMap src/IntMapHelp.hs 100;" f invertIntMap src/Multiset.hs 67;" f @@ -3893,7 +3891,7 @@ keyCardRunPastRand src/Dodge/LockAndKey.hs 36;" f keyPic src/Dodge/Item/Draw/SPic.hs 459;" f keyholeCorridor src/Dodge/Room/Corridor.hs 39;" f knifeS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 638;" f -lChasm src/Dodge/Room/Tutorial.hs 148;" f +lChasm src/Dodge/Room/Tutorial.hs 149;" f lConnect src/Dodge/Render/Connectors.hs 42;" f lConnectMulti src/Dodge/Render/Connectors.hs 46;" f lShape src/Dodge/Placement/Instance/LightSource.hs 91;" f @@ -4064,7 +4062,7 @@ makeShaderProgram src/Shader/Compile.hs 241;" f makeShaderUsingVAO src/Shader/Compile.hs 146;" f makeShaderUsingVBO src/Shader/Compile.hs 69;" f makeShaderVBO src/Shader/Compile.hs 32;" f -makeShockwaveAt src/Dodge/WorldEvent/Shockwave.hs 12;" f +makeShockwaveAt src/Dodge/WorldEvent/Shockwave.hs 11;" f makeShrapnelAt src/Dodge/Payload.hs 24;" f makeSourcedShader src/Shader/Compile.hs 167;" f makeSpark src/Dodge/Spark.hs 45;" f @@ -4138,7 +4136,7 @@ mglCreate src/GLHelp.hs 8;" f mglDelete src/GLHelp.hs 14;" f midBarDecoration src/Dodge/Placement/TopDecoration.hs 16;" f midBounds src/Dodge/Room/Foreground.hs 150;" f -midChasm src/Dodge/Room/Tutorial.hs 173;" f +midChasm src/Dodge/Room/Tutorial.hs 172;" f midPad src/Padding.hs 27;" f midPadL src/Padding.hs 33;" f midPoint src/Geometry.hs 83;" f @@ -4179,10 +4177,10 @@ moveCombineSel src/Dodge/Update/Scroll.hs 121;" f moveInverseShockwave src/Dodge/Shockwave/Update.hs 44;" f moveLSThen src/Dodge/Placement/Instance/LightSource.hs 47;" f movePenBullet src/Dodge/Bullet.hs 203;" f -moveProjectile src/Dodge/Projectile/Update.hs 209;" f +moveProjectile src/Dodge/Projectile/Update.hs 210;" f moveRoomBy src/Dodge/Room/Link.hs 53;" f moveShockwave src/Dodge/Shockwave/Update.hs 13;" f -moveStuckGrenade src/Dodge/Projectile/Update.hs 196;" f +moveStuckGrenade src/Dodge/Projectile/Update.hs 197;" f moveToSideNthOutLink src/Dodge/Room/Warning.hs 69;" f moveWall src/Dodge/Wall/Move.hs 23;" f moveWallID src/Dodge/Wall/Move.hs 18;" f @@ -4284,7 +4282,7 @@ outwardIntegers src/Dodge/Base.hs 181;" f overCol src/Picture/Base.hs 308;" f overColObj src/Shape.hs 273;" f overColSH src/Shape.hs 241;" f -overDebugEvent src/Dodge/Debug.hs 36;" f +overDebugEvent src/Dodge/Debug.hs 35;" f overLnkPosDir src/Dodge/RoomLink.hs 115;" f overLnkType src/Dodge/RoomLink.hs 105;" f overPos src/Picture/Base.hs 303;" f @@ -4342,7 +4340,7 @@ pingPongBetween src/Render.hs 221;" f pipe src/Dodge/Item/Craftable.hs 32;" f pistol src/Dodge/Item/Held/Stick.hs 40;" f pistolerRoom src/Dodge/Room/Room.hs 330;" f -pjRemoteSetDirection src/Dodge/Projectile/Update.hs 172;" f +pjRemoteSetDirection src/Dodge/Projectile/Update.hs 173;" f plBlock src/Dodge/Placement/PlaceSpot/Block.hs 20;" f plDoor src/Dodge/Placement/PlaceSpot/TriggerDoor.hs 12;" f plLineBlock src/Dodge/Placement/PlaceSpot/Block.hs 53;" f @@ -4429,8 +4427,8 @@ pokeWall src/Shader/Poke.hs 78;" f pokeWallsWindows src/Shader/Poke.hs 50;" f poly3 src/Picture/Base.hs 84;" f poly3Col src/Picture/Base.hs 88;" f -polyChasm src/Dodge/Room/Tutorial.hs 194;" f -polyChasmC src/Dodge/Room/Tutorial.hs 203;" f +polyChasm src/Dodge/Room/Tutorial.hs 193;" f +polyChasmC src/Dodge/Room/Tutorial.hs 202;" f polyCirc src/Shape.hs 46;" f polyCircx src/Shape.hs 51;" f polyCornerDist src/Geometry/Polygon.hs 61;" f @@ -4510,9 +4508,9 @@ pushOutFromWalls src/Dodge/WallCreatureCollisions.hs 64;" f pushR src/DoubleStack.hs 24;" f pushScreen src/Dodge/Menu/PushPop.hs 9;" f putAutoDoor src/Dodge/Placement/Instance/Door.hs 93;" f -putBlockN src/Dodge/Placement/Instance/Wall.hs 169;" f +putBlockN src/Dodge/Placement/Instance/Wall.hs 164;" f putBlockRect src/Dodge/Placement/Instance/Wall.hs 148;" f -putBlockV src/Dodge/Placement/Instance/Wall.hs 156;" f +putBlockV src/Dodge/Placement/Instance/Wall.hs 151;" f putDoor src/Dodge/Room/Airlock.hs 114;" f putDoubleDoor src/Dodge/Placement/Instance/Door.hs 17;" f putDoubleDoorThen src/Dodge/Placement/Instance/Door.hs 27;" f @@ -4591,16 +4589,16 @@ rectXY src/Geometry/Polygon.hs 37;" f red src/Color.hs 14;" f reduceLocDT src/Dodge/DoubleTree.hs 398;" f reduceLocLDT src/Dodge/DoubleTree.hs 393;" f -reflDirWall src/Dodge/Base/Wall.hs 16;" f reflVelWall src/Dodge/Base/Wall.hs 24;" f reflVelWallDamp src/Dodge/Base/Wall.hs 20;" f +reflWall src/Dodge/Base/Wall.hs 16;" f reflectAngle src/Geometry.hs 142;" f reflectIn src/Geometry.hs 136;" f reflectInNormal src/Geometry/Vector.hs 217;" f reflectInParam src/Geometry.hs 230;" f -reflectLaserAlong src/Dodge/Item/Weapon/LaserPath.hs 17;" f -reflectPulseLaserAlong src/Dodge/Item/Weapon/LaserPath.hs 70;" f -refract src/Dodge/Item/Weapon/LaserPath.hs 44;" f +reflectLaserAlong src/Dodge/Item/Weapon/LaserPath.hs 19;" f +reflectPulseLaserAlong src/Dodge/Item/Weapon/LaserPath.hs 62;" f +refract src/Dodge/Item/Weapon/LaserPath.hs 36;" f refreshOptionsSelectionList src/Dodge/Menu/Option.hs 35;" f regexCombs src/Dodge/DisplayInventory.hs 71;" f regexList src/Dodge/DisplayInventory.hs 308;" f @@ -4614,7 +4612,7 @@ removeAimPosture src/Dodge/Creature/YourControl.hs 159;" f removeAmmoFromMag src/Dodge/HeldUse.hs 907;" f removeDot src/ShortShow.hs 44;" f removeInverseWalls src/Dodge/LevelGen/StaticWalls.hs 25;" f -removeLights src/Dodge/Room/Tutorial.hs 259;" f +removeLights src/Dodge/Room/Tutorial.hs 258;" f removeShieldWall src/Dodge/Item/BackgroundEffect.hs 57;" f removeWallsInPolygon src/Dodge/LevelGen/StaticWalls.hs 182;" f renderDataResizeUpdate src/Preload/Update.hs 26;" f @@ -4793,7 +4791,7 @@ sensorReqToString src/Dodge/Machine/Update.hs 197;" f sensorRoom src/Dodge/Room/SensorDoor.hs 26;" f sensorRoomRunPast src/Dodge/Room/SensorDoor.hs 46;" f sensorSPic src/Dodge/Machine/Draw.hs 81;" f -sensorTut src/Dodge/Room/Tutorial.hs 368;" f +sensorTut src/Dodge/Room/Tutorial.hs 367;" f sensorTypeDamages src/Dodge/Machine/Update.hs 234;" f sentinelAI src/Dodge/Creature/SentinelAI.hs 20;" f sentinelExtraWatchUpdate src/Dodge/Creature/SentinelAI.hs 81;" f @@ -4801,7 +4799,7 @@ sentinelFireType src/Dodge/Creature/SentinelAI.hs 49;" f setAimPosture src/Dodge/Creature/YourControl.hs 145;" f setChannelPos src/Sound.hs 150;" f setClickWorldPos src/Dodge/Update.hs 102;" f -setClip src/Dodge/Debug.hs 250;" f +setClip src/Dodge/Debug.hs 233;" f setClusterID src/Dodge/Combine/Graph.hs 114;" f setDepth src/Picture/Base.hs 128;" f setDirPS src/Dodge/PlacementSpot.hs 49;" f @@ -4820,7 +4818,7 @@ setOutLinks src/Dodge/RoomLink.hs 50;" f setOutLinksByType src/Dodge/RoomLink.hs 75;" f setOutLinksPD src/Dodge/RoomLink.hs 95;" f setRBCreatureTargeting src/Dodge/Creature/State.hs 290;" f -setRoomInt src/Dodge/Room/Tutorial.hs 91;" f +setRoomInt src/Dodge/Room/Tutorial.hs 92;" f setSelWhileDragging src/Dodge/Update/Input/InGame.hs 337;" f setSelectionListRestriction src/Dodge/Update/Input/ScreenLayer.hs 87;" f setShaderSource src/Shader/Compile.hs 290;" f @@ -4829,7 +4827,7 @@ setSoundVolume src/Sound.hs 157;" f setTargetMv src/Dodge/Creature/ReaderUpdate.hs 82;" f setTile src/Dodge/Layout.hs 70;" f setTiles src/Dodge/Layout.hs 67;" f -setTreeInts src/Dodge/Room/Tutorial.hs 98;" f +setTreeInts src/Dodge/Room/Tutorial.hs 99;" f setViewDistance src/Dodge/Update/Camera.hs 236;" f setViewPos src/Dodge/Creature/ReaderUpdate.hs 69;" f setViewport src/Dodge/Render.hs 440;" f @@ -5048,7 +5046,7 @@ stone4S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 484;" f stone5S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 626;" f stopAllSounds src/Sound.hs 125;" f stopBulletAt src/Dodge/Bullet.hs 200;" f -stopPushing src/Dodge/DrWdWd.hs 102;" f +stopPushing src/Dodge/Door.hs 100;" f stopSoundFrom src/Dodge/SoundLogic.hs 220;" f strFromEquipment src/Dodge/Creature/Statistics.hs 53;" f strFromHeldItem src/Dodge/Creature/Statistics.hs 67;" f @@ -5061,7 +5059,7 @@ stripZ src/Geometry/Vector3D.hs 97;" f subInvX src/Dodge/ListDisplayParams.hs 46;" f subMap src/TreeHelp.hs 119;" f subZipWith src/Dodge/Placement/Instance/Wall.hs 118;" f -succB src/Dodge/Debug.hs 170;" f +succB src/Dodge/Debug.hs 153;" f swapAnyExtraSelection src/Dodge/Inventory/Swap.hs 57;" f swapInOutLinks src/Dodge/RoomLink.hs 98;" f swapIndices src/ListHelp.hs 50;" f @@ -5260,13 +5258,13 @@ tryUseParent src/Dodge/Creature/State.hs 145;" f turnTo src/Dodge/Movement/Turn.hs 8;" f turret src/Dodge/Placement/Instance/Turret.hs 35;" f turretItemOffset src/Dodge/Item/HeldOffset.hs 21;" f -tutAnoTree src/Dodge/Room/Tutorial.hs 45;" f -tutDrop src/Dodge/Room/Tutorial.hs 103;" f -tutHub src/Dodge/Room/Tutorial.hs 266;" f -tutLight src/Dodge/Room/Tutorial.hs 231;" f -tutRezBox src/Dodge/Room/Tutorial.hs 379;" f +tutAnoTree src/Dodge/Room/Tutorial.hs 46;" f +tutDrop src/Dodge/Room/Tutorial.hs 104;" f +tutHub src/Dodge/Room/Tutorial.hs 265;" f +tutLight src/Dodge/Room/Tutorial.hs 230;" f +tutRezBox src/Dodge/Room/Tutorial.hs 378;" f tutRoomTree src/Dodge/Floor.hs 21;" f -tutorialMessage1 src/Dodge/Room/Tutorial.hs 403;" f +tutorialMessage1 src/Dodge/Room/Tutorial.hs 402;" f tweenAngles src/Geometry/Vector.hs 190;" f twinSlowDoorChasers src/Dodge/Room/LongDoor.hs 79;" f twinSlowDoorRoom src/Dodge/Room/LongDoor.hs 34;" f @@ -5325,7 +5323,7 @@ updateDelayedEvents src/Dodge/Update.hs 891;" f updateDisplaySections src/Dodge/DisplayInventory.hs 116;" f updateDistortion src/Dodge/Distortion.hs 5;" f updateDistortions src/Dodge/Update.hs 559;" f -updateDoor src/Dodge/DrWdWd.hs 26;" f +updateDoor src/Dodge/Door.hs 25;" f updateDoors src/Dodge/Update.hs 311;" f updateDust src/Dodge/Update.hs 823;" f updateDusts src/Dodge/Update.hs 673;" f @@ -5582,7 +5580,7 @@ yourInv src/Dodge/Base/You.hs 28;" f yourRootItem src/Dodge/Base/You.hs 22;" f yourSelectedItem src/Dodge/Base/You.hs 16;" f yourStatsInfo src/Dodge/Creature/Info.hs 27;" f -zChasm src/Dodge/Room/Tutorial.hs 158;" f +zChasm src/Dodge/Room/Tutorial.hs 159;" f zConnect src/Dodge/Render/Connectors.hs 17;" f zConnectCol src/Dodge/Render/Connectors.hs 28;" f zConnectColMidX src/Dodge/Render/Connectors.hs 31;" f