21#define VEHICLE_GHOST 2
23#define MAX_VEHICLES 16
25#define VEHICLE_LAP_TIMES 12
50 char playerName[0x1a];
55 u8 abUnknownDa0[0x80];
185 s32 shadowCornerValid[4];
190 Vec3f previousCollisionPosition;
191 char checkpointMessageText[20];
192 u8 abUnknown2ad0[0x98];
193 void ColorSpraySegment(
s32 wheel);
194 void AgeSpraySegment(
s32 wheel,
s32 age);
372 inline void ConfigureRaceControls(
bool localPlayer);
378 inline void PrepareRaceVehicle(
s32 vehicleIndex);
380 inline void PrepareEmptyRaceView(
void);
386 void SetCustomDecals(
s32 value) {
393 void SetCustomCarModel(
s32 value) {
394 customCarModel = value;
400 void SetSelectedCar(
s32 value) {
410 void CopySnapshotState(
const Vehicle &from);
418 void InterpolateSnapshotState(
const Vehicle &from,
const Vehicle &to,
long double share);
431 void MarkNearbyInstanceShadows(
u8 *mask,
u8 bit)
const {
440 inline void UpdateShadowScreenRect(
const ViewportRect *viewports);
446 inline void MoveTireSpraySegments(
s32 step,
s16 fall);
472 void SetExhaustTimer(
f32 value) {
476 s32 GetWrongWayFrames()
const {
483 s32 SetWrongWayFrames(
s32 value) {
487 u8 GetGridX()
const {
494 u8 SetGridX(
u8 value) {
495 return gridX = value;
498 u8 GetGridY()
const {
505 u8 SetGridY(
u8 value) {
506 return gridY = value;
509 f32 GetMessageTime()
const {
513 f32 GetSubMessageTime()
const {
568 inline void ApplyImpactDamageTexture(
s32 side);
570 s32 AdvanceSkidFrames() {
578 inline s32 CastGroundRay();
600 f32 GetAccelerator()
const {
607 f32 SetAccelerator(
f32 value) {
622 auto &GetAiTarget() {
626 const auto &GetAiTarget()
const {
630 s32 GetBestLap()
const {
637 s32 SetBestLap(
s32 value) {
641 f32 GetBestLapTime()
const {
648 f32 SetBestLapTime(
f32 value) {
656 const auto &GetBody()
const {
660 f32 GetBrake()
const {
668 return brake = value;
671 s32 GetCameraChanged()
const {
678 s32 SetCameraChanged(
s32 value) {
682 f32 GetCameraHeading()
const {
689 f32 SetCameraHeading(
f32 value) {
697 const auto &GetCameras()
const {
701 s32 GetCarModel()
const {
705 f32 GetChaseLag()
const {
712 f32 SetChaseLag(
f32 value) {
716 auto &GetChasePosition() {
720 const auto &GetChasePosition()
const {
724 f32 GetChaseSpeed()
const {
731 f32 SetChaseSpeed(
f32 value) {
735 auto &GetCheckpointMessageText() {
736 return checkpointMessageText;
739 const auto &GetCheckpointMessageText()
const {
740 return checkpointMessageText;
743 s32 GetChosenTransmission()
const {
747 f32 GetCollisionPull()
const {
754 f32 SetCollisionPull(
f32 value) {
762 const auto &GetColor()
const {
766 s32 GetCustomCarModel()
const {
767 return customCarModel;
770 const auto &GetDamageTextureLevels()
const {
771 return damageTextureLevels;
774 s16 GetDentJitter()
const {
781 s16 SetDentJitter(
s16 value) {
789 const auto &GetDents()
const {
793 f32 GetDistance()
const {
800 f32 SetDistance(
f32 value) {
804 s32 GetDistanceLaps()
const {
811 s32 SetDistanceLaps(
s32 value) {
815 f32 GetDopplerFactor()
const {
822 f32 SetDopplerFactor(
f32 value) {
826 auto GetDriver()
const {
837 void SetDriver(
void (*value)(
Vehicle *vehicle)) {
841 s32 GetEffectPriority()
const {
848 s32 SetEffectPriority(
s32 value) {
852 s32 GetEffectSound()
const {
859 s32 SetEffectSound(
s32 value) {
863 s32 GetEffectVolume()
const {
870 s32 SetEffectVolume(
s32 value) {
874 f32 GetEngineRpm()
const {
881 f32 SetEngineRpm(
f32 value) {
885 f32 GetFinalDrive()
const {
892 f32 SetFinalDrive(
f32 value) {
896 s32 GetFlyMode()
const {
900 f32 GetFogFactor()
const {
907 f32 SetFogFactor(
f32 value) {
911 s32 GetForcedForwardFrames()
const {
918 s32 SetForcedForwardFrames(
s32 value) {
922 s32 GetForcedReverseFrames()
const {
929 s32 SetForcedReverseFrames(
s32 value) {
937 const auto &GetForces()
const {
941 s32 GetForwardFrames()
const {
948 s32 SetForwardFrames(
s32 value) {
956 const auto &GetFrame()
const {
963 f32 SetFrontLoad(
f32 value) {
970 u8 SetFrontSliding(
u8 value) {
974 s32 GetGate()
const {
985 s32 GetGear()
const {
996 s32 GetGearCount()
const {
1003 s32 SetGearCount(
s32 value) {
1007 auto &GetGearRatios() {
1011 const auto &GetGearRatios()
const {
1015 u8 GetGhostMode()
const {
1022 u8 SetGhostMode(
u8 value) {
1026 s32 GetGridIndex()
const {
1033 s32 SetGridIndex(
s32 value) {
1034 return gridIndex = value;
1037 char *GetPlayerName() {
1041 const char *GetPlayerName()
const {
1048 s32 SetGroundHits(
s32 value) {
1052 s32 GetGroundInstanceCount()
const {
1059 s32 SetGroundInstanceCount(
s32 value) {
1065 const auto &GetGroundInstances()
const {
1069 const auto &GetNearbyInstances()
const {
1073 s32 GetInTunnel()
const {
1080 s32 SetInTunnel(
s32 value) {
1084 s32 GetIndex()
const {
1091 s32 SetIndex(
s32 value) {
1092 return index = value;
1095 auto &GetInitialChasePosition() {
1099 const auto &GetInitialChasePosition()
const {
1107 auto &GetJoltOffset() {
1111 const auto &GetJoltOffset()
const {
1115 auto &GetJoltPosition() {
1119 const auto &GetJoltPosition()
const {
1123 auto &GetJoltVelocity() {
1127 const auto &GetJoltVelocity()
const {
1131 s32 GetLap()
const {
1142 f32 GetLapTime()
const {
1149 f32 SetLapTime(
f32 value) {
1153 auto &GetLapTimes() {
1157 const auto &GetLapTimes()
const {
1161 f32 GetLookAhead()
const {
1168 f32 SetLookAhead(
f32 value) {
1176 const auto &GetLookAt()
const {
1184 const auto &GetMatrix()
const {
1188 s32 GetMaxGate()
const {
1195 s32 SetMaxGate(
s32 value) {
1199 const char *GetMessage()
const {
1203 const char *GetSubMessage()
const {
1210 const char *SetMessage(
const char *value) {
1214 auto &GetMessageText() {
1218 const auto &GetMessageText()
const {
1225 f32 SetMessageTime(
f32 value) {
1237 return model = value;
1243 s32 SetNearbyInstanceCount(
s32 value) {
1247 auto &GetNearestRacers() {
1251 const auto &GetNearestRacers()
const {
1255 f32 GetOdometer()
const {
1262 f32 SetOdometer(
f32 value) {
1266 f32 GetOpacity()
const {
1273 f32 SetOpacity(
f32 value) {
1277 f32 GetPitchInput()
const {
1284 f32 SetPitchInput(
f32 value) {
1288 auto &GetPlacedVelocity() {
1292 const auto &GetPlacedVelocity()
const {
1296 s32 GetPointIndex()
const {
1303 s32 SetPointIndex(
s32 value) {
1314 auto &GetPreviousCollisionPosition() {
1315 return previousCollisionPosition;
1318 const auto &GetPreviousCollisionPosition()
const {
1319 return previousCollisionPosition;
1322 auto &GetPreviousListenerPosition() {
1326 const auto &GetPreviousListenerPosition()
const {
1330 auto &GetPreviousPosition() {
1334 const auto &GetPreviousPosition()
const {
1349 s32 GetRacePosition()
const {
1356 s32 SetRacePosition(
s32 value) {
1368 return racer = value;
1374 f32 SetRearLoad(
f32 value) {
1381 u8 SetRearSliding(
u8 value) {
1388 s32 SetRearWheelDrive(
s32 value) {
1392 s32 GetReverseFrames()
const {
1399 s32 SetReverseFrames(
s32 value) {
1403 f32 GetRollInput()
const {
1410 f32 SetRollInput(
f32 value) {
1425 auto &GetShadowCornerValid() {
1426 return shadowCornerValid;
1429 const auto &GetShadowCornerValid()
const {
1430 return shadowCornerValid;
1433 const auto &GetShadowCorners()
const {
1437 auto &GetShadowQuad() {
1441 const auto &GetShadowQuad()
const {
1445 s16 GetSkidFrames()
const {
1452 s16 SetSkidFrames(
s16 value) {
1456 s32 GetSkipDrive()
const {
1463 s32 SetSkipDrive(
s32 value) {
1467 s32 GetSlotCooldown()
const {
1474 s32 SetSlotCooldown(
s32 value) {
1478 auto &GetSmokeTimers() {
1482 const auto &GetSmokeTimers()
const {
1486 f32 GetSpeedKph()
const {
1493 f32 SetSpeedKph(
f32 value) {
1497 auto &GetSprayAdvanced() {
1501 const auto &GetSprayAdvanced()
const {
1505 auto &GetSprayFramesLeft() {
1509 const auto &GetSprayFramesLeft()
const {
1513 auto &GetSprayOrigin() {
1517 const auto &GetSprayOrigin()
const {
1521 auto &GetSprayPhases() {
1525 const auto &GetSprayPhases()
const {
1529 auto &GetSpraySegmentSurfaces() {
1533 const auto &GetSpraySegmentSurfaces()
const {
1537 auto &GetSpraySurfaces() {
1541 const auto &GetSpraySurfaces()
const {
1545 auto &GetSprayVelocities() {
1549 const auto &GetSprayVelocities()
const {
1553 auto &GetSprayVertices() {
1557 const auto &GetSprayVertices()
const {
1561 const auto &GetSprayMatrix()
const {
1565 f32 GetSteerAngle()
const {
1572 f32 SetSteerAngle(
f32 value) {
1576 s8 GetSteerReturn()
const {
1583 s8 SetSteerReturn(
s8 value) {
1587 f32 GetSteering()
const {
1594 f32 SetSteering(
f32 value) {
1598 s32 GetSteeringMode()
const {
1605 const char *SetSubMessage(
const char *value) {
1612 f32 SetSubMessageTime(
f32 value) {
1616 s32 GetSuspensionStiffness()
const {
1620 s32 GetTableIndex()
const {
1627 s32 SetTableIndex(
s32 value) {
1631 f32 GetThrottle()
const {
1638 f32 SetThrottle(
f32 value) {
1642 f32 GetTimeLeft()
const {
1649 f32 SetTimeLeft(
f32 value) {
1653 s32 GetTireType()
const {
1657 auto &GetTorqueCurve() {
1661 const auto &GetTorqueCurve()
const {
1665 f32 GetTotalTime()
const {
1672 f32 SetTotalTime(
f32 value) {
1676 auto &GetTrackDirection() {
1680 const auto &GetTrackDirection()
const {
1684 auto &GetTrackForward() {
1688 const auto &GetTrackForward()
const {
1692 auto &GetTrackOffset() {
1696 const auto &GetTrackOffset()
const {
1700 auto &GetTrackPoint() {
1704 const auto &GetTrackPoint()
const {
1708 auto &GetTrackSide() {
1712 const auto &GetTrackSide()
const {
1716 f32 GetTrackSideDistance()
const {
1723 f32 SetTrackSideDistance(
f32 value) {
1727 f32 GetTrackSideOffset()
const {
1734 f32 SetTrackSideOffset(
f32 value) {
1738 auto &GetTrackUp() {
1742 const auto &GetTrackUp()
const {
1746 s32 GetTransmission()
const {
1753 s32 SetTransmission(
s32 value) {
1757 auto &GetWheelBodies() {
1761 const auto &GetWheelBodies()
const {
1765 auto &GetWheelFrames() {
1769 const auto &GetWheelFrames()
const {
1773 auto &GetWheelMatrices() {
1777 const auto &GetWheelMatrices()
const {
1787 void ApplyPlayerVehicleInput(
void);
1806 void SetVehiclePaintColorRgb(
u8 red,
u8 green,
u8 blue);
1822 void ComputeAiVehicleInput(
void);
1839 void SetVehicleCarId(
s32 carId);
#define MAX_VEHICLES
The capacity of the race engine's vehicle array.
Definition bossrallyvehicle.h:23
void AiVehicleControllerCallback(Vehicle *vehicle)
Dispatch the computer controller through its vehicle method.
#define VEHICLE_LAP_TIMES
The number of completed lap times stored per vehicle.
Definition bossrallyvehicle.h:25
void UpdateVehicleSpeedAndPhysics(Vehicle *vehicle)
Refresh displayed speed when the second wheel has contact, then advance vehicle physics.
u8 g_abPlayerColorsRgb[20][3]
Player and computer vehicle paint colours, indexed by player or race slot, in RGB byte order.
void PlayerVehicleControllerCallback(Vehicle *vehicle)
Translate player controls, advance vehicle physics, and process player effects and respawning.
void UpdateCameraLookAtTarget(Vehicle *vehicle)
Put the look-at point above a vehicle, ahead of it by a lead that shrinks with its speed.
void ComputeCameraBasis(Vehicle *vehicle, CameraFrame *camera)
Point a camera at the look-at point of a vehicle and build its axes about the world up.
void UpdateCameraSystem(Vehicle *vehicle)
Update every camera of a vehicle for a frame.
void ResolveVehicleTrackCollision(Vehicle *vehicle, CameraFrame *camera, Vec3f *target)
Keep a camera out of the track: if the line from the look-at point of a vehicle to the camera passes ...
void PlaceTrackCamera(Vehicle *vehicle)
Make the trackside camera active, placed ahead of and beside a vehicle.
void UpdateCameraChase(Vehicle *vehicle, CameraFrame *camera, f32 share)
Move the chase camera behind a vehicle, blending the direction it was in towards the one behind the v...
void InitCameraForVehicle(Vehicle *vehicle)
Set up the cameras of a vehicle at the start of a race.
void ClearCameraChanged(Vehicle *vehicle)
Clear the flag of a vehicle that marks the change of its camera.
#define CAR_GEAR_RATIOS
The gears of a gearbox, neutral first.
Definition carphysics.h:11
The state the renderer shares between the parts of a frame.
s32 TraceTrackSplineRecursive(Vehicle *vehicle, s32 depth, s32 pointIndex, TrackSection *section)
Search the route ahead of a vehicle for straight lines it could drive, keeping the deepest.
void ComputeTrackPosition(Vehicle *vehicle)
Find the point of the route nearest a vehicle along a curve through the points, with the axes of the ...
void EmitTireSpray(Vehicle *vehicle)
Throw the newest segment of the spray of each wheel from the surface under it, while the wheel is on ...
void SpawnTireSmoke(Vehicle *vehicle)
Count down to the next puff of smoke of each wheel, faster with the speed of the vehicle and the spin...
void SpawnExhaustParticle(Vehicle *vehicle)
Count down to the next puff of exhaust, faster as the engine revs, and blow it out behind the vehicle...
The saved settings and progress of a player, and the size of the championship.
void SetupFromRecording(Vehicle *vehicle)
Apply the control options from the current input recording.
#define RACER_SLOTS
The racers of a race.
Definition racerslot.h:11
void SaveLastLapSnapshot(Vehicle *vehicle)
At the start of the last lap, give each local player a buffer to record the lap into and take a snaps...
The rigid bodies of the physics: their state, forces and inertia, and the quaternion and 3 by 3 matri...
A frame of reference: three axes and a position, the rows of a 4 by 4 matrix whose last column Finish...
Definition render.h:30
A model vertex converted into the renderer's working format.
Definition convertedvertex.h:7
The saved settings and progress of a player.
Definition profile.h:23
A racer of a race.
Definition racerslot.h:28
A force on a rigid body, in a list.
Definition rigidbody.h:42
A rigid body: the body of a vehicle or of one of its wheels.
Definition rigidbody.h:60
A section of the route.
Definition track.h:38
A point or direction in space.
Definition vecmath.h:17
The model of a car as it is loaded from the cartridge.
Definition vehiclemodel.h:55
A vehicle.
Definition vehicle.h:143
s8 steerReturn
Definition vehicle.h:193
s32 sprayAdvanced[VEHICLE_WHEELS]
Definition vehicle.h:280
f32 pitchInput
Definition vehicle.h:306
f32 speedKph
Definition vehicle.h:263
s32 tireType
Definition vehicle.h:198
f32 odometer
Definition vehicle.h:264
CameraFrame frame
Definition vehicle.h:145
s32 selectedCar
Definition vehicle.h:334
Vtx sprayVertices[VEHICLE_WHEELS][SPRAY_SEGMENTS][SPRAY_SEGMENT_VERTICES]
Definition vehicle.h:284
f32 throttle
Definition vehicle.h:184
s32 effectVolume
Definition vehicle.h:232
RacerSlot * racer
Definition vehicle.h:213
s32 maxGate
Definition vehicle.h:243
CameraFrame * previousCamera
Definition vehicle.h:312
Vec3f aiTarget
Definition vehicle.h:218
Vec3f sprayOrigin
Definition vehicle.h:297
s32 gate
Definition vehicle.h:244
s32 groundSurface
Definition vehicle.h:330
u8 rearSliding
Definition vehicle.h:191
s32 customDecals
Definition vehicle.h:196
s32 suspensionStiffness
Definition vehicle.h:199
RigidBody wheelBodies[VEHICLE_WHEELS]
Definition vehicle.h:159
f32 steerAngle
Definition vehicle.h:165
f32 lapTimes[VEHICLE_LAP_TIMES]
Definition vehicle.h:248
s32 pointIndex
Definition vehicle.h:241
s32 slotCooldown
Definition vehicle.h:214
s32 forwardFrames
Definition vehicle.h:209
f32 messageTime
Definition vehicle.h:256
f32 torqueCurve[4]
Definition vehicle.h:170
s32 carModel
Definition vehicle.h:335
s32 groundHits
Definition vehicle.h:261
f32 cameraHeading
Definition vehicle.h:302
s16 dentJitter
Definition vehicle.h:352
Vec3f trackSide
Definition vehicle.h:221
u8 gridY
Definition vehicle.h:346
f32 dopplerFactor
Definition vehicle.h:234
TrackSection * section
Definition vehicle.h:240
Vec3f exhaustPosition
Definition vehicle.h:270
u16 groundInstances[RAY_INSTANCES]
Definition vehicle.h:322
s32 groundInstanceCount
Definition vehicle.h:324
f32 finalDrive
Definition vehicle.h:178
f32 totalTime
Definition vehicle.h:251
s16 skidFrames
Definition vehicle.h:156
Vec3f joltOffset
Definition vehicle.h:268
s32 transmission
Definition vehicle.h:182
Vec3f chasePosition
Definition vehicle.h:318
s32 bestLap
Definition vehicle.h:250
u8 frontSliding
Definition vehicle.h:188
void(* driver)(struct Vehicle *vehicle)
Definition vehicle.h:216
Vec3f joltVelocity
Definition vehicle.h:267
s32 nearbyInstanceCount
Definition vehicle.h:328
s32 effectPriority
Definition vehicle.h:233
f32 frontLoad
Definition vehicle.h:187
Vec3f joltPosition
Definition vehicle.h:265
Vec3f smokePositions[VEHICLE_WHEELS]
Definition vehicle.h:273
s32 wrongWayFrames
Definition vehicle.h:343
s32 effectSound
Definition vehicle.h:230
char messageText[0xFD4 - 0xFC0]
Definition vehicle.h:259
s32 forcedForwardFrames
Definition vehicle.h:203
f32 exhaustTimer
Definition vehicle.h:269
u16 nearbyInstances[RAY_INSTANCES]
Definition vehicle.h:326
Vec3f trackPoint
Definition vehicle.h:219
s16 shadowCorners[2][2]
Definition vehicle.h:331
u8 gridX
Definition vehicle.h:344
s32 spraySurfaces[VEHICLE_WHEELS]
Definition vehicle.h:277
const char * message
Definition vehicle.h:255
f32 engineRpm
Definition vehicle.h:166
Vec3f sprayPositions[VEHICLE_WHEELS]
Definition vehicle.h:281
s16 spraySegmentSurfaces[VEHICLE_WHEELS][SPRAY_SEGMENTS]
Definition vehicle.h:291
f32 smokeTimers[VEHICLE_WHEELS]
Definition vehicle.h:271
f32 bestLapTime
Definition vehicle.h:249
f32 sprayPhases[VEHICLE_WHEELS]
Definition vehicle.h:279
s32 flyMode
Definition vehicle.h:237
f32 accelerator
Definition vehicle.h:307
f32 chaseLag
Definition vehicle.h:315
PlayerInputState * input
Definition vehicle.h:348
f32 matrix[4][4]
Definition vehicle.h:147
s32 lap
Definition vehicle.h:245
WheelFrame wheelFrames[VEHICLE_WHEELS]
Definition vehicle.h:150
f32 sprayFramesLeft[VEHICLE_WHEELS]
Definition vehicle.h:275
f32 collisionPull
Definition vehicle.h:319
f32 distance
Definition vehicle.h:253
Vec3f placedVelocity
Definition vehicle.h:262
f32 lookAhead
Definition vehicle.h:316
CameraFrame cameras[VEHICLE_CAMERAS]
Definition vehicle.h:313
f32 steering
Definition vehicle.h:305
f32 subMessageTime
Definition vehicle.h:258
Vec3f trackDirection
Definition vehicle.h:242
s16 dents[VEHICLE_DENT_SIDES]
Definition vehicle.h:350
s32 skipDrive
Definition vehicle.h:195
f32 rearLoad
Definition vehicle.h:190
f32 opacity
Definition vehicle.h:339
RacerSlot * nearestRacers[RACER_SLOTS]
Definition vehicle.h:211
Mtx sprayMtx
Definition vehicle.h:299
s32 chosenTransmission
Definition vehicle.h:201
Vec3f lookAt
Definition vehicle.h:317
s32 inTunnel
Definition vehicle.h:300
s32 cameraChanged
Definition vehicle.h:235
Vec3f initialChasePosition
Definition vehicle.h:321
f32 rollInput
Definition vehicle.h:308
u8 color[3]
Definition vehicle.h:336
f32 fogFactor
Definition vehicle.h:309
s32 rearWheelDrive
Definition vehicle.h:180
s32 steeringMode
Definition vehicle.h:200
RigidBody body
Definition vehicle.h:158
s32 racePosition
Definition vehicle.h:254
s32 index
Definition vehicle.h:155
s16 sprayVelocities[VEHICLE_WHEELS][SPRAY_SEGMENTS][SPRAY_SEGMENT_VERTICES][3]
Definition vehicle.h:288
s32 gearCount
Definition vehicle.h:179
f32 groundDistance
Definition vehicle.h:329
Vec3f trackUp
Definition vehicle.h:222
s32 gear
Definition vehicle.h:186
Vec3f previousListenerPosition
Definition vehicle.h:228
f32 timeLeft
Definition vehicle.h:252
CameraFrame * activeCamera
Definition vehicle.h:310
PlayerProfile * profile
Definition vehicle.h:197
Vec3f trackForward
Definition vehicle.h:220
f32 brake
Definition vehicle.h:185
f32 trackSideDistance
Definition vehicle.h:223
s32 distanceLaps
Definition vehicle.h:246
s32 tableIndex
Definition vehicle.h:183
f32 trackSideOffset
Definition vehicle.h:226
s32 reverseFrames
Definition vehicle.h:207
u8 ghostMode
Definition vehicle.h:337
VehicleModel * model
Definition vehicle.h:349
f32 lapTime
Definition vehicle.h:247
f32 chaseSpeed
Definition vehicle.h:314
s32 forcedReverseFrames
Definition vehicle.h:205
Vec3f previousPosition
Definition vehicle.h:239
const char * subMessage
Definition vehicle.h:257
RigidBodyForce forces[VEHICLE_FORCES]
Definition vehicle.h:162
f32 gearRatios[CAR_GEAR_RATIOS]
Definition vehicle.h:167
Vec3f trackOffset
Definition vehicle.h:225
f32 wheelMatrices[VEHICLE_WHEELS][4][4]
Definition vehicle.h:149
The rectangle of the screen a view fills.
Definition render.h:134
The axes and the position of a wheel, the rows of its matrix.
Definition wheelframe.h:11
The track data a race loads below the program: its triangles and placed models, and the route the veh...
#define RAY_INSTANCES
The most placed models CastRayAgainstTrack() lists.
Definition track.h:336
The integer and floating-point types of the console, for headers shared with Windows.
signed char s8
Definition ultratypes.h:23
short s16
Definition ultratypes.h:24
float f32
Definition ultratypes.h:38
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
void SetVehiclePosition(Vehicle *vehicle, f32 x, f32 y, f32 z)
Put a vehicle at a position, with its body and the states of its steps.
void ChooseVehicleCar(Vehicle *vehicle)
Choose the car of a vehicle.
void RotateVehicleByEuler(Vehicle *vehicle, f32 yaw, f32 pitch, f32 roll)
Turn the body of a vehicle by angles about its vertical, sideways and forward axes,...
void SimulateVehiclePhysicsSubstep(Vehicle *vehicle)
Step the physics of a vehicle on the ground for a frame: drive its wheels, push it by its springs,...
void ManageAiRacerSlots(Vehicle *player)
Move the vehicles the computer drives to the racers nearest a player, so that the racers around the p...
void InitPlayerVehicleSlot(Vehicle *vehicle)
Bind a vehicle to the input of its player and reset it for a race.
void SetVehicleVelocity(Vehicle *vehicle, f32 x, f32 y, f32 z)
Set the velocity of a vehicle.
void ClearVehicleDamageState(Vehicle *vehicle)
Clear the dents of a vehicle.
void InitVehicleColorAndPhysics(Vehicle *vehicle)
Paint the model of a vehicle its colour and set up its physics.
Vehicle g_aVehicles[MAX_VEHICLES]
The active vehicles of a race, with players in the first slots.
void ResetVehicleState(Vehicle *vehicle)
Reset the frames, cameras, velocity, place on the route and gearbox of a vehicle for its car.
void SetVehicleFrameMatrix(Vehicle *vehicle, f32(*m)[4])
Set the frame of a vehicle and the orientation of its body from a matrix.
void SetVehicleTurnRate(Vehicle *vehicle, f32 x, f32 y, f32 z)
Set the angular velocity of a vehicle.
void UpdateVehiclePhysicsFrame(Vehicle *vehicle)
Run a frame of a vehicle: fly it, or put it on the ground, drive its wheels and step its physics.
void ResetVehicleEffects(Vehicle *vehicle)
Clear the smoke and the spray of the wheels of a vehicle.
void InitVehicleOrientationFromAngle(Vehicle *vehicle, f32 angle)
Turn a vehicle upright to face an angle about the vertical.
void TransformAllWheelMatrices(Vehicle *vehicle)
Place the matrix of a vehicle, leant into its skid, and the matrices of its wheels,...
void SetVehicleModelSlot(Vehicle *vehicle, s32 slot)
Give a vehicle the model of a slot.
void InitVehiclePhysics(Vehicle *vehicle)
Set up the body of a vehicle and the bodies of its wheels, and their forces, for the model of its car...
void UpdateVehicleEngineAndGearbox(Vehicle *vehicle)
Steer a vehicle by the stick, change its gears, and run its engine: its revolutions follow the front ...
void InstallVehicleModel(Vehicle *vehicle, s32 slot, s32 car)
Load the model of a car into a slot and give it to a vehicle.
void SetupVehicleForRaceStart(Vehicle *vehicle)
Put a vehicle on the grid for the start of the race, with its model, cameras and effects reset.
void BindPlayerInputToVehicle(Vehicle *vehicle)
Give a vehicle the input of the player of the same index.
void RespawnVehicle(Vehicle *vehicle)
Put a vehicle that has been upside down too long, or has fallen below the track, back on the route at...
@ VEHICLE_CAMERAS
Definition vehiclecamera.h:17
#define VEHICLE_DENT_SIDES
The sides around a car that dent apart, by the direction of the blow.
Definition vehicleeffects.h:7
#define SPRAY_SEGMENTS
The segments of the spray a wheel throws.
Definition vehicleeffects.h:10
#define SPRAY_SEGMENT_VERTICES
The vertices of each segment of the spray, of which the first two are drawn.
Definition vehicleeffects.h:12
@ VEHICLE_FORCES
Definition vehicleforces.h:28
#define VEHICLE_WHEELS
The wheels of a vehicle.
Definition vehiclemodel.h:14
void UpdateVehicleSounds(Vehicle *vehicle)
Play the engine, the impacts, and the rumble of a vehicle for a frame.
void UpdateHudMessageTimers(Vehicle *vehicle)
Count down the time of the message of a vehicle, or failing one its smaller message,...
void UpdateVehicleGridPosition(Vehicle *vehicle)
Find the cell of the grid a vehicle is in, then its place on the route.
void UpdateRaceTimers(Vehicle *vehicle)
Run the clocks of a vehicle as the mode of play keeps them.
void CheckWrongWayWarning(Vehicle *vehicle)
Show "WRONG WAY", flashing, once a vehicle has faced against the track for a while.
s32 UpdateVehicleTrackPosition(Vehicle *vehicle)
Find the nearest point of the route to a vehicle and add how far it went along the route to its dista...