Prev: 25086 Up: Map Next: 25106
25096: Offset Blip Down
Used by the routine at LocateRadarBlip.
Continues LocateRadarBlip when the target is not further up the map than the player. The vertical distance is scaled to radar pixels and added to the centre row of the radar. If the target is too far away then the blip is hidden.
Input
HL Vertical distance from the target to the player
IX Radar blip record
OffsetBlipDown 25096 CALL MultiplyHLByFour Call MultiplyHLByFour to multiply the distance by 4 which leaves the distance in radar pixels in H.
25099 LD A,14 Start from the centre row of the radar (14).
25101 SUB H Take the distance away from the centre row (flipped to a row below the centre at LocateRadarBlip_FlipRow).
25102 JR C,HideRadarBlip If the target is more than 14 pixels away then jump to HideRadarBlip.
25104 JR LocateRadarBlip_FlipRow Jump to LocateRadarBlip_FlipRow to convert this into a row below the centre of the radar.
Prev: 25086 Up: Map Next: 25106