X-Git-Url: https://git.ctpug.org.za/?p=tabakrolletjie.git;a=blobdiff_plain;f=tabakrolletjie%2Frays.py;h=a475d8fb27bb6c680a90555cad7dc2a4f6043954;hp=8a79c34c57b4c3ff89a7d31681c1c5ec0915f385;hb=3341713feb17c2469631de0ef6078e5a4473b28c;hpb=ee4a089ad17cc17ff85d2d86d5412eab3fd9038c diff --git a/tabakrolletjie/rays.py b/tabakrolletjie/rays.py index 8a79c34..a475d8f 100644 --- a/tabakrolletjie/rays.py +++ b/tabakrolletjie/rays.py @@ -12,7 +12,7 @@ from .constants import SCREEN_SIZE from .utils import debug_timer -def screen_rays(pos): +def screen_rays(): """ An iterable that returns ordered rays from pos to the edge of the screen, starting with the edge point (0, 0) and continuing clockwise in pymunk coordinates. @@ -40,7 +40,7 @@ def calculate_ray_polys(space, position, light_filter): vertices = [position] start, end = None, None ray_polys = [] - for ray in screen_rays(position): + for ray in screen_rays(): info = space.segment_query_first(position, ray, 1, light_filter) point = ray if info is None else info.point vertices.append(point)