Prev: 25056 Up: Map Next: 25096
25086: Offset Blip Left
Used by the routine at LocateRadarBlip.
Continues LocateRadarBlip when the target is to the left of the player (or level with it). The horizontal distance is scaled to radar pixels and taken away from the centre column of the radar. If the target is too far away then the blip is hidden.
Input
HL Horizontal distance from the target to the player
IX Radar blip record
OffsetBlipLeft 25086 CALL MultiplyHLByFour Call MultiplyHLByFour to multiply the distance by 4 which leaves the distance in radar pixels in H.
25089 LD A,12 A=12 (the centre column of the radar).
25091 SUB H Take the distance away from the centre column to give the column to the left of the player.
25092 JR C,HideRadarBlip If the target is more than 12 pixels to the left then jump to HideRadarBlip.
25094 JR LocateRadarBlip_StoreColumn Jump to LocateRadarBlip_StoreColumn to store the column.
Prev: 25056 Up: Map Next: 25096