Refactor wall zoning, remove streaming
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
module Dodge.Zoning.World where
|
||||
import Dodge.Data
|
||||
import Geometry.Data
|
||||
|
||||
zoneOfSight' :: Float -> World -> [Int2]
|
||||
zoneOfSight' s w =
|
||||
[ V2 a b
|
||||
| a <- [minimum xs .. maximum xs]
|
||||
, b <- [minimum ys .. maximum ys]
|
||||
]
|
||||
where
|
||||
--(xs,ys) = unzip $ map zoneOfPoint $ screenPolygon cfig w -- ++ [_cameraViewFrom w]
|
||||
(xs,ys) = unzip $ map sizeZoneOfPoint $ _boundBox w -- ++ [_cameraViewFrom w]
|
||||
sizeZoneOfPoint (V2 x y) = (f x, f y)
|
||||
where
|
||||
f = floor . (/ s)
|
||||
|
||||
Reference in New Issue
Block a user