|
coastline 0.0.4
|
A vehicle. More...
#include <vehicle.h>

A vehicle.
The game prints its size, 0x2090 bytes, at start-up. Its fields join this structure as the routines that use them are reconstructed.
| CameraFrame Vehicle::frame |
The axes and position of the vehicle.
| f32 Vehicle::matrix[4][4] |
The frame as a matrix.
| f32 Vehicle::wheelMatrices[VEHICLE_WHEELS][4][4] |
The matrix of each wheel.
| WheelFrame Vehicle::wheelFrames[VEHICLE_WHEELS] |
The axes and position of each wheel.
| union { ... } Vehicle |
The frame of the vehicle, as axes or as matrices.
| s32 Vehicle::index |
The index of the vehicle in g_aVehicles. The players have the first.
| s16 Vehicle::skidFrames |
The frames the tyres have skidded, up to 16, swelling the sound of the skid.
| RigidBody Vehicle::body |
The rigid body of the vehicle.
| RigidBody Vehicle::wheelBodies[VEHICLE_WHEELS] |
The bodies of the wheels, the rear and the front wheel of one side, then of the other. The body lists them as the rear two, then the front two.
| RigidBodyForce Vehicle::forces[VEHICLE_FORCES] |
The forces on the bodies, by the VEHICLE_FORCE_ values.
| u8 Vehicle::unreconstructedD70[0xDF0 - 0xD70] |
Not read by the routines reconstructed so far.
| f32 Vehicle::steerAngle |
The angle the front wheels are steered to, in radians.
| f32 Vehicle::engineRpm |
The revolutions of the engine a minute.
| f32 Vehicle::gearRatios[CAR_GEAR_RATIOS] |
The ratio of each gear, from the physics spec of the car.
| f32 Vehicle::torqueCurve[4] |
The torque curve, from the physics spec of the car.
| f32 Vehicle::torqueCubic |
The coefficient of engine revolutions cubed.
| f32 Vehicle::torqueQuadratic |
The coefficient of engine revolutions squared.
| f32 Vehicle::torqueLinear |
The coefficient of engine revolutions.
| f32 Vehicle::torqueConstant |
The constant coefficient of engine torque.
| union { ... } Vehicle |
| f32 Vehicle::finalDrive |
The ratio of the final drive, from the physics spec of the car.
| s32 Vehicle::gearCount |
The number of forward gears, from the physics spec of the car.
| s32 Vehicle::rearWheelDrive |
Whether the rear wheels alone are driven, from the physics spec of the car.
| s32 Vehicle::transmission |
The gearbox the player chose, nonzero for the automatic.
| s32 Vehicle::tableIndex |
The class of the car among the arcade times of each track.
| f32 Vehicle::throttle |
The throttle, below 0 in reverse.
| f32 Vehicle::brake |
The brake, below 0 when braking.
| s32 Vehicle::gear |
The gear, from 0 for neutral.
| f32 Vehicle::frontLoad |
The load the front tyres bore in the last step.
| u8 Vehicle::frontSliding |
Whether the front tyres slid in the last step; sliding tyres grip less.
| f32 Vehicle::rearLoad |
The load the rear tyres bore in the last step.
| u8 Vehicle::rearSliding |
Whether the rear tyres slid in the last step; sliding tyres grip less.
| s8 Vehicle::steerReturn |
The way the steering returns towards the middle, 1 or -1, or 0 while it does not return.
| s32 Vehicle::skipDrive |
Whether the next step does not drive the wheels.
| s32 Vehicle::customDecals |
Whether the player chose the custom decals of the car.
| PlayerProfile* Vehicle::profile |
The profile of the player who drives the vehicle.
| s32 Vehicle::tireType |
The tyres; the grip falls by 0.002 for each type up.
| s32 Vehicle::suspensionStiffness |
The stiffness of the springs, from 0 for the softest.
| s32 Vehicle::steeringMode |
How the steering responds to the stick, from 0.
| s32 Vehicle::chosenTransmission |
The gearbox of the recording or the settings, taken by ResetVehicleState().
| s32 Vehicle::forcedForwardFrames |
The remaining frames a computer's vehicle drives forward to get unstuck, whatever else it wants.
| s32 Vehicle::forcedReverseFrames |
The remaining frames a computer's vehicle reverses to get unstuck, whatever else it wants.
| s32 Vehicle::reverseFrames |
The frames a computer's vehicle has reversed since it last checked whether it is stuck.
| s32 Vehicle::forwardFrames |
The frames a computer's vehicle has driven forward since it last checked whether it is stuck.
| RacerSlot* Vehicle::nearestRacers[RACER_SLOTS] |
The racers nearest a player's vehicle, the nearest first, as the vehicles were shared out.
| RacerSlot* Vehicle::racer |
The racer the vehicle drives for.
| s32 Vehicle::slotCooldown |
The frames before a computer's vehicle that departed its racer may be taken from another.
| void(* Vehicle::driver) (struct Vehicle *vehicle) |
The routine that drives the vehicle each frame, the player's or the computer's, or NULL.
| Vec3f Vehicle::aiTarget |
The point a computer's vehicle steers towards.
| Vec3f Vehicle::trackPoint |
The point of the route nearest the vehicle.
| Vec3f Vehicle::trackForward |
The axis of the route at trackPoint along it.
| Vec3f Vehicle::trackSide |
The axis of the route at trackPoint across it to the left.
| Vec3f Vehicle::trackUp |
The axis of the route at trackPoint upwards.
| f32 Vehicle::trackSideDistance |
How far the vehicle is from the middle of the route, trackSideOffset without its sign.
| Vec3f Vehicle::trackOffset |
The offset of the vehicle from trackPoint.
| f32 Vehicle::trackSideOffset |
How far the vehicle is from the middle of the route along trackSide, below 0 to the right.
| Vec3f Vehicle::previousListenerPosition |
Where the camera that heard the vehicle was the last frame.
| s32 Vehicle::effectSound |
The sound effect the vehicle plays, from 0 for none. A louder or more important sound takes its place.
| s32 Vehicle::effectVolume |
How loud the sound effect plays.
| s32 Vehicle::effectPriority |
How much the sound effect matters.
| f32 Vehicle::dopplerFactor |
How much the motion of the vehicle and the camera raise its sounds.
| s32 Vehicle::cameraChanged |
Set when the active camera changes, to 1 when a view is chosen and to 2 by the cameras.
| s32 Vehicle::flyMode |
Whether the vehicle flies freely with the controls, without physics, with the cameras fixed rigidly to its frame.
| Vec3f Vehicle::previousPosition |
The position of the last frame.
| TrackSection* Vehicle::section |
The section of the route the vehicle is on.
| s32 Vehicle::pointIndex |
The nearest point of the vehicle in its section.
| Vec3f Vehicle::trackDirection |
The direction of the track at pointIndex.
| s32 Vehicle::maxGate |
The farthest gate passed, counted across laps.
| s32 Vehicle::gate |
The gate last crossed, counted across laps.
| s32 Vehicle::lap |
The laps finished.
| s32 Vehicle::distanceLaps |
The laps the distance travelled has counted.
| f32 Vehicle::lapTime |
The time of the lap being driven, in seconds.
| f32 Vehicle::lapTimes[VEHICLE_LAP_TIMES] |
The time of each lap finished, in seconds.
| f32 Vehicle::bestLapTime |
The time of the best lap, in seconds.
| s32 Vehicle::bestLap |
The best lap, from 0.
| f32 Vehicle::totalTime |
The time of the race so far, in seconds.
| f32 Vehicle::timeLeft |
The time remaining, in seconds.
| f32 Vehicle::distance |
The distance travelled along the route.
| s32 Vehicle::racePosition |
The place in the race, from 0 for the leader.
| const char* Vehicle::message |
The message shown large in the middle of the view, or NULL.
| f32 Vehicle::messageTime |
The remaining time of message, in seconds.
| const char* Vehicle::subMessage |
The message shown smaller when there is no large one, or NULL.
| f32 Vehicle::subMessageTime |
The remaining time of subMessage, in seconds.
| char Vehicle::messageText[0xFD4 - 0xFC0] |
The text a message may show, such as the time of a record.
| s32 Vehicle::groundHits |
The triangles of the track below the vehicle this frame.
| Vec3f Vehicle::placedVelocity |
The velocity SetVehicleVelocity() last gave.
| f32 Vehicle::speedKph |
The speed the display shows, in kilometres an hour.
| f32 Vehicle::odometer |
The distance the speedometer has counted.
| Vec3f Vehicle::joltPosition |
Where a weight on a spring at a corner of the vehicle is. Its jolts damage the vehicle.
| Vec3f Vehicle::joltVelocity |
How far the jolt weight moves a frame.
| Vec3f Vehicle::joltOffset |
How far the jolt weight hangs from the corner.
| f32 Vehicle::exhaustTimer |
The time towards the next puff of exhaust.
| Vec3f Vehicle::exhaustPosition |
Where the last puff departed the exhaust.
| f32 Vehicle::smokeTimers[VEHICLE_WHEELS] |
The time towards the next puff of smoke of each wheel, the front two first.
| Vec3f Vehicle::smokePositions[VEHICLE_WHEELS] |
Where the last puff of smoke of each wheel was, the front two first.
| f32 Vehicle::sprayFramesLeft[VEHICLE_WHEELS] |
The frames the spray of each wheel goes on after the wheel lifts off the ground.
| s32 Vehicle::spraySurfaces[VEHICLE_WHEELS] |
The surface the spray of each wheel is thrown from.
| f32 Vehicle::sprayPhases[VEHICLE_WHEELS] |
The time towards the next segment of each spray.
| s32 Vehicle::sprayAdvanced[VEHICLE_WHEELS] |
Whether a segment of each spray began this frame.
| Vec3f Vehicle::sprayPositions[VEHICLE_WHEELS] |
Where the newest segment of each spray was thrown from.
| Vtx Vehicle::sprayVertices[VEHICLE_WHEELS][SPRAY_SEGMENTS][SPRAY_SEGMENT_VERTICES] |
The vertices of the segments of each spray, the newest first, in 127ths of a unit from sprayOrigin.
| s16 Vehicle::sprayVelocities[VEHICLE_WHEELS][SPRAY_SEGMENTS][SPRAY_SEGMENT_VERTICES][3] |
How far the vertices of each spray move a second, in 127ths of a unit.
| s16 Vehicle::spraySegmentSurfaces[VEHICLE_WHEELS][SPRAY_SEGMENTS] |
The surface each segment was thrown from, or -1 when it was thrown from none.
| s16 Vehicle::spraySegmentSurfaceList[VEHICLE_WHEELS *SPRAY_SEGMENTS] |
The same surfaces in storage order.
| union { ... } Vehicle |
| Vec3f Vehicle::sprayOrigin |
The point the spray vertices are relative to, put at the vehicle by SetVehiclePosition().
| Mtx Vehicle::sprayMtx |
The matrix of the spray, the identity until it is set.
| s32 Vehicle::inTunnel |
Whether the placed model under the vehicle is a tunnel, darkening the vehicle.
| f32 Vehicle::cameraHeading |
The heading of the camera of the vehicle, in radians, turning the reflection of the sky.
| u8 Vehicle::unreconstructed1DD0[0x1DD4 - 0x1DD0] |
Not read by the routines reconstructed so far.
| f32 Vehicle::steering |
The steering control.
| f32 Vehicle::pitchInput |
The pitch control of the fly mode.
| f32 Vehicle::accelerator |
The accelerator control.
| f32 Vehicle::rollInput |
The roll control of the fly mode, 1, -1, or 0.
| f32 Vehicle::fogFactor |
How thick the fog is at the vehicle, from 0 to 1, fading its shadow.
| CameraFrame* Vehicle::activeCamera |
The member of cameras the view of the vehicle is drawn from.
| CameraFrame* Vehicle::previousCamera |
The camera of the last frame.
| CameraFrame Vehicle::cameras[VEHICLE_CAMERAS] |
The cameras, by the VEHICLE_CAMERA_ values.
| f32 Vehicle::chaseSpeed |
The speed the chase camera follows, smoothed.
| f32 Vehicle::chaseLag |
The lag of the chase camera, smoothed.
| f32 Vehicle::lookAhead |
How far the look-at point leads the vehicle.
| Vec3f Vehicle::lookAt |
The point the chase camera looks at.
| Vec3f Vehicle::chasePosition |
Where the chase camera was before the track pushed it.
| f32 Vehicle::collisionPull |
How hard the track has been pushing the chase camera.
| u8 Vehicle::unreconstructed1FB0[0x1FB4 - 0x1FB0] |
Not read by the routines reconstructed so far.
| Vec3f Vehicle::initialChasePosition |
Where the chase camera started.
| u16 Vehicle::groundInstances[RAY_INSTANCES] |
The placed models of the ground below the vehicle, the nearest first, from CastRayAgainstTrack().
| s32 Vehicle::groundInstanceCount |
The number of groundInstances to read, 1 once the ground is found.
| u16 Vehicle::nearbyInstances[RAY_INSTANCES] |
The placed models near the ground, the latest first.
| s32 Vehicle::nearbyInstanceCount |
The number of nearbyInstances.
| f32 Vehicle::groundDistance |
How far the ground is below the vehicle.
| s32 Vehicle::groundSurface |
The index of the triangle of the ground.
| s16 Vehicle::shadowCorners[2][2] |
The corners of the rectangle of the screen the shadow of the vehicle covers in the view being drawn, the left and the lower edge, then the right and the upper edge.
| s32 Vehicle::selectedCar |
The car under the cursor of the car selection screen.
| s32 Vehicle::carModel |
The index of the car in g_aCarModels.
| u8 Vehicle::color[3] |
The color of the paint of the car, as red, green, and blue.
| u8 Vehicle::ghostMode |
VEHICLE_GHOST while the vehicle fades back in after it is put back on the track.
| f32 Vehicle::opacity |
How solid the vehicle is drawn, from 0 to 1.
| s32 Vehicle::otherLook |
Whether the car is drawn in its other look, without its textured parts or the reflection of the sky. A button switches it once an unlock allows it.
| s32 Vehicle::wrongWayFrames |
The frames the vehicle has faced against the track.
| u8 Vehicle::gridX |
The x of the cell of the 32-unit grid of the track the vehicle is in.
| u8 Vehicle::gridY |
The y of the cell of the 32-unit grid of the track the vehicle is in.
| PlayerInputState* Vehicle::input |
The input that drives the vehicle.
| VehicleModel* Vehicle::model |
The model of the car, in a slot of g_aVehicleModels.
| s16 Vehicle::dents[VEHICLE_DENT_SIDES] |
How deeply each of eight sides around the car has been dented; up to 0x100 it dents more.
| s16 Vehicle::dentJitter |
A small offset, from -4 to 3, that changes with each dent to vary the dents.