Reremove files

This commit is contained in:
2022-07-01 18:54:02 +01:00
parent 4d1f1547bc
commit fc5d1348d9
2 changed files with 0 additions and 69 deletions
-66
View File
@@ -1,66 +0,0 @@
module Dodge.Debug where
import Dodge.Data
import Dodge.Zone
import Dodge.Base
import Geometry.Zone
import Geometry.Data
import Geometry
import Picture
import qualified IntMapHelp as IM
import qualified Data.IntSet as IS
import qualified Streaming.Prelude as S
import Control.Lens
drawCircleAtFor :: Point2 -> Int -> World -> World
drawCircleAtFor p t = drawCircleAtForCol p t white
drawCircleAtForCol :: Point2 -> Int -> Color -> World -> World
drawCircleAtForCol p t col w = w & props %~
IM.insert k Projectile
{ _prPos = p
, _pjStartPos = p
, _pjVel = V2 0 0
, _prDraw = \_ -> (,) mempty $ setDepth 20 $ uncurryV translate p $ color col $ circleSolid 20
, _pjID = k
, _pjUpdate = \_ -> pjTimerF t k
}
where
k = IM.newKey $ _props w
drawLineForCol :: [Point2] -> Int -> Color -> World -> World
drawLineForCol ps t col w = w & props %~
IM.insert k Projectile
{ _prPos = head ps
, _pjStartPos = head ps
, _pjVel = V2 0 0
, _prDraw = \_ -> (,) mempty $ setDepth 20 $ color col $ thickLine 5 ps
, _pjID = k
, _pjUpdate = \_ -> pjTimerF t k
}
where
k = IM.newKey $ _props w
pjTimerF :: Int -> Int -> World -> World
pjTimerF 0 i = props %~ IM.delete i
pjTimerF time i = props . ix i . pjUpdate .~ (\_ -> pjTimerF (time - 1) i)
drawDDA :: IM.IntMap IS.IntSet -> Picture
drawDDA = setLayer BloomLayer . color (withAlpha 0.5 green) . IM.foldlWithKey' f blank
where
f pic x' ys' = concatMapPic (\y -> polygon (reverse $ rectNSWE (y+50) y x (x+50))) ys `appendPic` pic
where
x = 50 * fromIntegral x'
ys = map ((50 *) . fromIntegral) $ IS.toList ys'
debugWallZoningPic :: World -> Picture
debugWallZoningPic w = setLayer BloomLayer $ zonesPic `appendPic` wallsPic
where
--wallsPic = setDepth 25 . color yellow . concatMapPic (drawTheWall . _wlLine) $ IM.elems theWalls
wallsPic = setDepth 25 . color yellow . runIdentity . S.foldMap_ (drawTheWall . _wlLine)
$ wlsNearSeg sp ep w
drawTheWall (a,b) = thickLine 20 [a,b]
zonesPic = setDepth 20 $ drawDDA zones
zones = ddaExt wlZoneSize sp ep
sp = _crPos $ you w
ep = mouseWorldPos w
-3
View File
@@ -1,3 +0,0 @@
module Dodge.Debug.Flag
where