$80:B2A5

From ZAMN Hacking
ROM address data
Length 0x5D
Type Code
Name findPlayerInRange
Description Finds the closest player within the given distance on a single axis
Arguments/Return value A = [uint16] Maximum single-axis distance
X = [int16] X position
Y = [int16] Y position
Returns A = [uint16] direction to player
Returns X = [uint16] single-axis distance to player
Returns Y = [pointer16] player sprite
Return type RTL