Rename protypes/basic to default

This commit is contained in:
2021-03-26 13:33:55 +01:00
parent c4ce354382
commit 420cf7fc4b
11 changed files with 125 additions and 122 deletions
+3 -3
View File
@@ -119,9 +119,9 @@ lineOnScreenCone :: World -> [Point2] -> Bool
lineOnScreenCone w (p1:p2:_) = errorPointInPolygon 8 p1 sp || errorPointInPolygon 9 p2 sp
|| any (isJust . uncurry (intersectSegSeg' p1 p2)) sps
where sp' = screenPolygon w
vp = _cameraCenter w
vp = _cameraViewFrom w
sp | pointInPolygon vp sp' = sp'
| otherwise = orderPolygon $ (_cameraCenter w : sp')
| otherwise = orderPolygon $ (_cameraViewFrom w : sp')
sps = zip sp (tail sp ++ [head sp])
@@ -138,7 +138,7 @@ drawWallFace w wall
where
(x:y:_) = _wlLine wall
points = extendConeToScreenEdge w sightFrom (x,y)
sightFrom = _cameraCenter w
sightFrom = _cameraViewFrom w
-- the following assumes that the point a is inside the screen
-- it still works otherwise, but it might intersect two points: