Fix bug when forming convex hull of game room bounds
This commit is contained in:
@@ -25,5 +25,6 @@ data Room = Room
|
||||
, _rmFloor :: [Tile]
|
||||
, _rmName :: String
|
||||
, _rmShift :: (Point2, Float)
|
||||
, _rmViewpoints :: [Point2]
|
||||
}
|
||||
makeLenses ''Room
|
||||
|
||||
@@ -76,6 +76,7 @@ shiftRoomBy shift r = r
|
||||
. (tileZero %~ shiftPointBy shift )
|
||||
. (tileX %~ shiftPointBy shift )
|
||||
)
|
||||
& rmViewpoints %~ map (shiftPointBy shift)
|
||||
|
||||
shiftLinkBy
|
||||
:: (Point2,Float)
|
||||
|
||||
@@ -48,6 +48,7 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
]
|
||||
, _rmBound = ps
|
||||
, _rmName = "twinSlowDoorRoom"
|
||||
, _rmViewpoints = [V2 0 h]
|
||||
}
|
||||
where
|
||||
wlSpeed = 0.5
|
||||
@@ -62,7 +63,7 @@ twinSlowDoorRoom w h x = defaultRoom
|
||||
[rectNSWE h 0 (-w) w
|
||||
,rectNSWE 20 (-h) (negate x) x
|
||||
]
|
||||
cond' btid w' = (_btState $ _buttons w' IM.! btid) == BtOn
|
||||
cond' btid w' = _btState (_buttons w' IM.! btid) == BtOn
|
||||
col = dim $ dim $ bright red
|
||||
|
||||
twinSlowDoorChasers
|
||||
|
||||
Reference in New Issue
Block a user