Refactor more collisions to use streaming

This commit is contained in:
2022-06-24 13:58:08 +01:00
parent 78f211a129
commit b467a7dd91
3 changed files with 19 additions and 17 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ cullBox :: Configuration -> World -> [Point2]
cullBox cfig w'
| debugOn Bound_box_screen cfig = screenPolygon cfig w'
| otherwise = let (n,s,e,w) = f $ farWallDistDirection (_cameraCenter w') w'
in map ((+.+ _cameraCenter w') . rotateV (_cameraRot w') ) $ rectNSWE n ( s) ( w) e
in map ((+.+ _cameraCenter w') . rotateV (_cameraRot w') ) $ rectNSWE n s w e
where
f (Just a,Just b,Just c,Just d) = (max 0 a,min 0 b,max 0 c,min 0 d)
f _ = (0,0,0,0)