.AddCoords LDA xPlayerSpeedHi,Y \ Add (U T) to (xPlayerSpeedTop xPlayerSpeedHi) CLC \ ADC T \ starting with the low bytes STA xPlayerSpeedHi,Y LDA xPlayerSpeedTop,Y \ And then the high bytes ADC U STA xPlayerSpeedTop,Y RTS \ Return from the subroutineName: AddCoords [Show more] Type: Subroutine Category: Maths (Geometry) Summary: Add to a specified coordinate variableContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MultiplyCoords calls AddCoords * SubtractCoords calls AddCoords
This routine adds (U T) to the specified 16-bit variable.
Arguments: Y Offset of the variable to update: * 3 = xAcceleration * 4 = zAcceleration * 6 = xPlayerAccel * 9 = zVelocity * 12 = zTyreForceNose * 14 = xSteeringForce
[X]
Variable xPlayerSpeedHi (category: Driving model)
High byte of the x-coordinate of the velocity vector (i.e. x-axis speed) for the player's car during this main loop iteration
[X]
Variable xPlayerSpeedTop (category: Driving model)
Top byte of the x-coordinate of the velocity vector (i.e. x-axis speed) for the player's car during this main loop iteration