.GetSegmentYawAngle JSR GetObjYawAngle-2 \ Calculate the segment's yaw angle, from the point of \ view of the player, returning it in (JJ II) LDY segmentListPointer \ Set Y = segmentListPointer, so the result gets stored \ in the correct position in the track segment list \ Fall through into GetSectionYawAngle to set the \ specified xVergeRight or xVergeLeft to the difference \ in the yaw angle between the player and the segmentName: GetSegmentYawAngle [Show more] Type: Subroutine Category: Track geometry Summary: Calculate the difference in yaw angle between a track segment and the playerContext: See this subroutine in context in the source code References: This subroutine is called as follows: * GetSegmentAngles (Part 1 of 3) calls GetSegmentYawAngle * GetSegmentAngles (Part 2 of 3) calls GetSegmentYawAngle
Arguments: X The offset from xSegmentCoordILo of the segment's 3D coordinates, i.e. the segment number * 3, with: * X for inner track segment coordinates * X + 120 for outer track segment coordinates segmentListPointer The index of the segment in the track segment list to use for calculations
Returns: (L K) The distance between the object and the player's car A Contains the high byte of (L K)
[X]
Entry point GetObjYawAngle-2 in subroutine GetObjYawAngle (Part 1 of 4) (category: 3D objects)
Use xPlayerCoord (Y = 0)
[X]
Variable segmentListPointer in workspace Zero page
The index of the current entry in the track segment list