.ApplyBounce LSR A \ Set yGravityDelta = A / 2 STA yGravityDelta LSR A \ Set yJumpHeight = A / 4 STA yJumpHeight INC heightAboveTrack \ Set heightAboveTrack = heightAboveTrack + 1 SEC \ Rotate spinYawAngleHi right, inserting a 1 into bit 7 ROR spinYawAngleHi LDA #4 \ Make sound #4 (crash/contact) at the current volume JSR MakeSound-3 \ level RTS \ Return from the subroutineName: ApplyBounce [Show more] Type: Subroutine Category: Driving model Summary: Apply a bounce to the player's car when it hits the groundContext: See this subroutine in context in the source code References: This subroutine is called as follows: * ApplyElevation (Part 4 of 5) calls ApplyBounce
Calculate the following: yGravityDelta = A / 2 yJumpHeight = A / 4 heightAboveTrack = heightAboveTrack + 1 spinYawAngleHi = spinYawAngleHi >> 1 with bit 7 set and make the crash/contact sound.
[X]
Entry point MakeSound-3 in subroutine MakeSound (category: Sound)
Make the sound at the current volume level
[X]
Variable heightAboveTrack in workspace Zero page
The car's height above the track, for when it is being dropped from the crane, or jumping from hitting the verge too fast
[X]
Variable spinYawAngleHi (category: Car geometry)
High byte of the amount of yaw angle spin that is being applied to the player's car
[X]
Variable yGravityDelta in workspace Zero page
The distance in the y-axis that the car would fall if the track wasn't there, for use when calculating the outcome of jumps and being dropped from the crane
[X]
Variable yJumpHeight in workspace Zero page
The height of the car's jump (or crane lift), in terms of track lines, which we use to alter the position of the horizon