ORG &0100 .positionNumber SKIP 0 \ Position numbers to show in the first column of the \ driver table \ \ [Show more]Name: Stack variables [Show more] Type: Workspace Address: &0100 to &0175 Category: Workspaces Summary: Variables that share page 1 with the stackContext: See this workspace in context in the source code References: No direct references to this workspace in this source file\ \ This variable is used by the following: \ \ * MainLoop (Part 5 of 6) \ * PrintDriverTable \ * SortDrivers \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.carStatus SKIP 20 \ Each car's status byte \ \ * Bit 0 = update this carStatus byte when applying \ tactics in the ProcessOvertaking routine \ \ * Clear = do update carStatus \ \ * Set = do not update carStatus \ \ * Bit 4 = affects driving around corners for visible \ cars (see BuildVisibleCar) \ \ * Clear = set carSteering to the segment's \ steering line in segmentSteering when \ going fast enough (carSpeedHi >= 50) \ \ * Set = do not set carSteering in the \ BuildVisibleCar routine (and use the \ value set by ProcessOvertaking instead) \ \ * Bit 6 = acceleration status \ \ * Clear = do not accelerate car \ \ * Set = accelerate car \ \ * Bit 7 = braking status \ \ * Clear = do not apply brakes \ \ * Set = apply brakes \ \ [Show more]\ \ This variable is used by the following: \ \ * BuildVisibleCar \ * MoveCars (Part 1 of 2) \ * ProcessOvertaking (Part 2 of 3) \ * ProcessOvertaking (Part 3 of 3) \ * PushCarOffTrack \ * ResetVariables \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.carSteering SKIP 20 \ Contains the steering to apply to each car \ \ * Bits 0-5 = the amount of steering as a positive \ value (0 to 31) \ \ * Bit 6 = controls whether to apply steering in the \ MoveCars routine \ \ * Clear = always apply steering \ \ * Set = only apply steering if there is enough \ room on the track \ \ * Bit 7 = the direction of the steering \ \ * Clear = steer left \ \ * Set = steer right \ \ The steering is stored as a sign-magnitude number, \ where the sign is in bit 7 and the magnitude is in \ bits 0-5 \ \ The amount of steering is stored in terms of the \ change in racing line, where the width of the track is \ 256, so steering by 26 would steer the car sideways by \ 10% of the track width \ \ [Show more]\ \ This variable is used by the following: \ \ * BuildVisibleCar \ * MoveCars (Part 2 of 2) \ * ProcessOvertaking (Part 1 of 3) \ * ProcessOvertaking (Part 2 of 3) \ * PushCarOffTrack \ * ResetVariables \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.driverSpeed SKIP 20 \ The average speed of this driver in the race (88 to \ 162) \ \ The speed for each driver depends on a number of \ factors, and is calculated in the SetDriverSpeed \ routine \ \ Indexed by driver number (0 to 19) \ \ [Show more]\ \ This variable is used by the following: \ \ * MoveCars (Part 1 of 2) \ * SetDriverSpeed \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.driversInOrder SKIP 20 \ A list of driver numbers in order \ \ For example, during a race, this contains the race \ position of each driver in the race (i.e. first place, \ second place etc.) \ \ It is also used to sort drivers by lap time and points \ for the driver table \ \ Indexed by driver number (0 to 19) \ \ Gets set in InitialiseDrivers to the number of each \ driver, so the initial order is driver number \ \ [Show more]\ \ This variable is used by the following: \ \ * AwardRacePoints \ * BuildVisibleCar \ * DrawCarInPosition \ * DrawObject \ * InitialiseDrivers \ * MainLoop (Part 4 of 6) \ * MainLoop (Part 5 of 6) \ * MoveAndDrawCars \ * PlaceCarsOnTrack \ * PrintPositionName \ * ProcessOvertaking (Part 1 of 3) \ * SetPlayerPositions \ * SortDrivers \ * SwapDriverPosition \ * UpdateMirrors \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.carSpeedHi SKIP 20 \ High byte of each car's forward speed \ \ Stored as an 8-bit value (carSpeedHi carSpeedLo) \ \ [Show more]\ \ This variable is used by the following: \ \ * ApplyElevation (Part 5 of 5) \ * BuildVisibleCar \ * MoveCars (Part 1 of 2) \ * ProcessContact \ * ProcessOvertaking (Part 2 of 3) \ * ResetVariables \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.carProgress SKIP 20 \ Lowest byte of each car's progress through the segment \ it's in \ \ This is effectively a fractional part of the car's \ progress through the segment, with 0 being the start \ of the segment and 255 the end of the segment \ \ When this byte rolls over, we increment the car's \ segment number in (objectSegmentHi objectSegmentLo) to \ move on to the next segment \ \ [Show more]\ \ This variable is used by the following: \ \ * ApplyElevation (Part 5 of 5) \ * BuildCarObjects (Part 1 of 3) \ * CompareCarSegments \ * MoveCars (Part 1 of 2) \ * MovePlayerOnTrack \ * ResetVariables \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.carRacingLine SKIP 20 \ Each car's position on the track in the x-axis \ \ This determines how far each car is to the left or \ right on the track - i.e. it's the car's racing line \ \ * 0 is full right \ \ * 128 is the centre line \ \ * 255 is full left \ \ Bit 7 is therefore set if the car is in the left half \ the track, and clear for the right half \ \ [Show more]\ \ This variable is used by the following: \ \ * BuildCarObjects (Part 1 of 3) \ * MoveCars (Part 2 of 2) \ * MovePlayerOnTrack \ * PlaceCarsOnTrack \ * ProcessOvertaking (Part 2 of 3) \ * PushCarOffTrack \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.objectStatus SKIP 24 \ Various status flags for each object \ \ * Bits 0-3 = the object type \ \ * Bit 6: 0 = the car is still racing \ 1 = the car has finished the race \ \ * Bit 7: 0 = object is visible \ 1 = object is hidden \ \ Set to &80 in ResetVariables \ \ [Show more]\ \ This variable is used by the following: \ \ * BuildCarObjects (Part 3 of 3) \ * ClearTotalRaceTime \ * DrawCarOrSign \ * FinishRace \ * HideAllCars \ * HideObject \ * MoveAndDrawCars \ * MoveCars (Part 2 of 2) \ * ProcessOvertaking (Part 2 of 3) \ * ResetVariables \ * SetObjectDetails \ * SetObjectStatus \ * UpdateLaps \ * UpdateMirrors \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.carSectionSpeed SKIP 20 \ Set to the driver speed for the next track section, \ which is taken from the track data and used to set the \ section's maximum speed for non-player drivers \ \ Only applies to sections with bit 7 of the flag byte \ set, in which case carSectionSpeed is set to the \ trackDriverSpeed value from the preceding track \ section \ \ Set to 255 in ResetVariables, which means no minimum \ speed \ \ [Show more]\ \ This variable is used by the following: \ \ * MoveCars (Part 1 of 2) \ * ResetVariables \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above