Looks along a line for the first tile with these flags, respecting tile shapes and flips. On an isometric map the line is in grid pixels, and on staggered and hexagonal maps this returns 0. tmHitWorldX and tmHitWorldY give the point where the line reached it. Takes map (The map's handle), layer (The layer's number, from tmAddLayer or tmGetLayer), x1 (The start x, in world pixels), y1 (The start y, in world pixels), x2 (The end x, in world pixels), y2 (The end y, in world pixels), flags (The flag bits to look for. 0 means any tile that isn't empty). Returns: 1 if it hits, otherwise 0.
map
Int
layer
Int
x1
Int
y1
Int
x2
Int
y2
Int
flags
Int
canSee = 1 - tmRayCast(map, ground, ex, ey, px, py, 1)