Add IntMapHelper, locate wall cutting bug

This commit is contained in:
jgk
2021-05-22 15:14:21 +02:00
parent 26f0ca4ab5
commit 9c2bcbec10
35 changed files with 221 additions and 139 deletions
+23 -4
View File
@@ -2,13 +2,12 @@ module Dodge.Room.Corridor
where
import Dodge.Room.Data
import Geometry
{- First exit due north, two other exits at angles next to this.
Entrance from south.
-}
{- | First exit due north, two other exits at angles next to this.
Entrance from south. -}
corridor :: Room
corridor = Room
{ _rmPolys = [rectNSWE 80 0 0 40
--{ _rmPolys = [rectNSWE 90 (-10) 0 40
-- ,[(0,80), (0,80) +.+ rotateV (pi/3) (40,0),(40,80)]
-- ,[(40,0), (0,0) +.+ rotateV (0-pi/3) (40,0),( 0, 0)]
]
@@ -24,6 +23,26 @@ corridor = Room
,((20,70), negate $ pi/6)
,((20,10) ,pi)
]
{- | Debug drop-in copy of corridor -}
corridorDebug :: Room
corridorDebug = Room
{ _rmPolys =
[ rectNSWE 80 0 0 40
--, [ (0,0), (0,200) , (200,100)]
--, [ (0,0), (0,20) , (20,10)]
]
, _rmLinks = lnks
, _rmPath = concatMap (doublePair . (,) (20,60) . fst) lnks
, _rmPS = []
, _rmBound = [ rectNSWE 50 30 0 40 ]
}
where
lnks =
[((20,70) ,0)
,((20,70), pi/6)
,((20,70), negate $ pi/6)
,((20,10) ,pi)
]
corridorN :: Room
corridorN = Room
{ _rmPolys = [rectNSWE 80 0 0 40