Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+23 -21
View File
@@ -1,33 +1,35 @@
module Dodge.Wire where
--import Dodge.LevelGen.Data
import Dodge.Default.Foreground
import Dodge.Data
import Geometry
import LensHelp
import ShapePicture
import Shape
import Color
import Dodge.Room.Foreground
import Color
import Dodge.Data.GenWorld
import Dodge.Default.ForegroundShape
import Dodge.Room.Foreground
import Geometry
import qualified IntMapHelp as IM
import LensHelp
import Shape
import ShapePicture
floorWire :: Point2 -> Point2 -> ForegroundShape
floorWire a b = defaultForeground
& fsPos .~ m
& fsRad .~ dist m a
& fsSPic .~ noPic (colorSH yellow $ thinHighBar 0 a' b')
floorWire a b =
defaultForeground
& fsPos .~ m
& fsRad .~ dist m a
& fsSPic .~ noPic (colorSH yellow $ thinHighBar 0 a' b')
where
m = midPoint a b
a' = a - m
b' = b - m
verticalWire :: Point2 -> Float -> Float -> ForegroundShape
verticalWire p h1 h2 = defaultForeground
& fsPos .~ p
& fsRad .~ 2
& fsSPic .~ noPic (colorSH yellow $ barPP 1.5 (V3 0 0 h1) (V3 0 0 h2))
verticalWire p h1 h2 =
defaultForeground
& fsPos .~ p
& fsRad .~ 2
& fsSPic .~ noPic (colorSH yellow $ barPP 1.5 (V3 0 0 h1) (V3 0 0 h2))
putWireEnd :: Int -> (Point2,Float) -> Float -> Room -> Room
putWireEnd i (p,a) h = rmEndWires %~ IM.insert i (WallWire p a h)
putWireEnd :: Int -> (Point2, Float) -> Float -> Room -> Room
putWireEnd i (p, a) h = rmEndWires %~ IM.insert i (WallWire p a h)
putWireStart :: Int -> (Point2,Float) -> Float -> Room -> Room
putWireStart i (p,a) h = rmStartWires %~ IM.insert i (WallWire p a h)
putWireStart :: Int -> (Point2, Float) -> Float -> Room -> Room
putWireStart i (p, a) h = rmStartWires %~ IM.insert i (WallWire p a h)