Driving: the controls of a player's vehicle and the views a replay chooses, where a vehicle is on the route, and the computer's drivers, which look ahead along the route for the farthest point they can drive straight to.
More...
Go to the source code of this file.
|
| #define | TRACE_DEPTH 8 |
| | The points of the route a search for a straight line looks ahead.
|
|
| void | AddVehicleJolt (s32 index, f32 amount) |
| | Add a jolt to a vehicle, at most 2.5 at once and 5 in all.
|
| void | ChooseReplayCamera (Vehicle *vehicle) |
| | Stand the trackside camera of a vehicle at the nearest point of the track no more than 10 below the vehicle and within 150 of it, or switch from the trackside camera to the cockpit or the chase camera when there is none.
|
| void | ProcessVehicleInputAndPhysics (Vehicle *vehicle) |
| | Read the controls of a vehicle, choose the view of a replay, and step the vehicle.
|
| 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 route there and the offset of the vehicle from it.
|
| void | UpdateAiVehicleBehavior (Vehicle *vehicle) |
| | Drive a computer's vehicle for a frame: steer for a point ahead, keep to the route, pass the others, back out when stuck, and step it.
|
Driving: the controls of a player's vehicle and the views a replay chooses, where a vehicle is on the route, and the computer's drivers, which look ahead along the route for the farthest point they can drive straight to.
◆ TRACE_DEPTH
The points of the route a search for a straight line looks ahead.
◆ AddVehicleJolt()
| void AddVehicleJolt |
( |
s32 | index, |
|
|
f32 | amount ) |
Add a jolt to a vehicle, at most 2.5 at once and 5 in all.
- Parameters
-
| index | The index of the vehicle. |
| amount | The jolt. |
- Ghidra address:
- USA: 0x8021be28
- Ghidra address:
- Asia: 0x8021B978
- Ghidra address:
- EUR: 0x8021d008
- Ghidra address:
- JPN: 0x8021c8d8
- Ghidra address:
- BRD3D: 0x100347ba
- Ghidra address:
- BRGlide: 0x1002de6b
◆ ChooseReplayCamera()
| void ChooseReplayCamera |
( |
Vehicle * | vehicle | ) |
|
Stand the trackside camera of a vehicle at the nearest point of the track no more than 10 below the vehicle and within 150 of it, or switch from the trackside camera to the cockpit or the chase camera when there is none.
- Parameters
-
| vehicle | The vehicle the camera watches. |
- Ghidra address:
- EUR: 0x802277d0
- Ghidra address:
- JPN: 0x80226fc0
◆ ProcessVehicleInputAndPhysics()
| void ProcessVehicleInputAndPhysics |
( |
Vehicle * | vehicle | ) |
|
Read the controls of a vehicle, choose the view of a replay, and step the vehicle.
- Parameters
-
- Ghidra address:
- USA: 0x80226488
- Ghidra address:
- Asia: 0x80225FD8
- Ghidra address:
- EUR: 0x80227980
- Ghidra address:
- JPN: 0x80227170
◆ TraceTrackSplineRecursive()
Search the route ahead of a vehicle for straight lines it could drive, keeping the deepest.
- Parameters
-
| vehicle | The vehicle. |
| depth | The points searched so far; 0 starts a search. |
| pointIndex | The point of the section to search from. |
| section | The section to search, or NULL for the start of the route. |
- Returns
- Whether this search or one it made found a deeper line.
- Ghidra address:
- USA: 0x80226d9c
- Ghidra address:
- Asia: 0x802268EC
- Ghidra address:
- EUR: 0x80228100
- Ghidra address:
- JPN: 0x802278f0
◆ ComputeTrackPosition()
| void ComputeTrackPosition |
( |
Vehicle * | vehicle | ) |
|
Find the point of the route nearest a vehicle along a curve through the points, with the axes of the route there and the offset of the vehicle from it.
- Parameters
-
- Ghidra address:
- USA: 0x80227214
- Ghidra address:
- Asia: 0x80226D64
- Ghidra address:
- EUR: 0x80228578
- Ghidra address:
- JPN: 0x80227d68
◆ UpdateAiVehicleBehavior()
| void UpdateAiVehicleBehavior |
( |
Vehicle * | vehicle | ) |
|
Drive a computer's vehicle for a frame: steer for a point ahead, keep to the route, pass the others, back out when stuck, and step it.
- Parameters
-
- Ghidra address:
- USA: 0x8022762c
- Ghidra address:
- Asia: 0x8022717C
- Ghidra address:
- EUR: 0x80228990
- Ghidra address:
- JPN: 0x80228180
◆ g_vUpAxis
The axis that points up.
- Ghidra address:
- USA: 0x8028bab0
- Ghidra address:
- Asia: 0x8028B600
- Ghidra address:
- EUR: 0x8028dd64
- Ghidra address:
- JPN: 0x8028d794
◆ g_aafAiVelocityRetention
How much of its velocity a computer's vehicle retains each frame in the championship, by season, race and the class of the racer.
- Ghidra address:
- USA: 0x8028b9f0
- Ghidra address:
- Asia: 0x8028B540
- Ghidra address:
- EUR: 0x8028dca4
- Ghidra address:
- JPN: 0x8028d6d4
- Ghidra address:
- BRD3D: 0x100b38a0
◆ g_bReplayCockpitNext
Whether a replay switches from the trackside camera to the cockpit next.
- Ghidra address:
- USA: 0x8028b9ec
- Ghidra address:
- Asia: 0x8028B53C
- Ghidra address:
- EUR: 0x8028dca0
- Ghidra address:
- JPN: 0x8028d6d0
- Ghidra address:
- BRD3D: 0x10af9bb8
◆ g_afVehicleJolts
The jolts each vehicle took, from 0 to 5.
- Ghidra address:
- USA: 0x8031b1d8
- Ghidra address:
- Asia: 0x8031AC88
- Ghidra address:
- EUR: 0x8031d6d8
- Ghidra address:
- JPN: 0x8031c308
- Ghidra address:
- BRD3D: 0x106c5468
- Ghidra address:
- BRGlide: 0x106ec4f8
◆ g_dwBestTraceDepth
The deepest level found by a straight-line search.
- Ghidra address:
- USA: 0x8028b804
- Ghidra address:
- Asia: 0x8028B354
- Ghidra address:
- EUR: 0x8028dab4
- Ghidra address:
- JPN: 0x8028d4e4
- Ghidra address:
- BRD3D: 0x10aa34ac
◆ g_pBestTraceSection
The section and point at the deepest end of the search.
- Ghidra address:
- USA: 0x8028b814
- Ghidra address:
- Asia: 0x8028B364
- Ghidra address:
- EUR: 0x8028dac4
- Ghidra address:
- JPN: 0x8028d4f4
- Ghidra address:
- BRD3D: 0x10aa3474
◆ g_dwBestTracePoint
The point index in the section at the deepest end of the search.
- Ghidra address:
- USA: 0x8028b810
- Ghidra address:
- Asia: 0x8028B360
- Ghidra address:
- EUR: 0x8028dac0
- Ghidra address:
- JPN: 0x8028d4f0
- Ghidra address:
- BRD3D: 0x10af9528
- Ghidra address:
- BRGlide: 0x10b1c888
◆ g_dwBestTraceLength
The number of points in the deepest straight line.
- Ghidra address:
- USA: 0x8028b800
- Ghidra address:
- Asia: 0x8028B350
- Ghidra address:
- EUR: 0x8028dab0
- Ghidra address:
- JPN: 0x8028d4e0
- Ghidra address:
- BRD3D: 0x10af96bc
◆ g_dwTraceUnusedA
Cleared at the start of a search and never read.
- Ghidra address:
- USA: 0x8028b81c
- Ghidra address:
- Asia: 0x8028B36C
- Ghidra address:
- EUR: 0x8028dacc
- Ghidra address:
- JPN: 0x8028d4fc
- Ghidra address:
- BRD3D: 0x10af96b8
◆ g_dwTraceUnusedB
Cleared at the start of a search and never read.
- Ghidra address:
- USA: 0x8028b818
- Ghidra address:
- Asia: 0x8028B368
- Ghidra address:
- EUR: 0x8028dac8
- Ghidra address:
- JPN: 0x8028d4f8
- Ghidra address:
- BRD3D: 0x10af9ba8
◆ g_bTraceBlocked
Set when a searched line crosses outside the route; never read.
- Ghidra address:
- USA: 0x8028b820
- Ghidra address:
- Asia: 0x8028B370
- Ghidra address:
- EUR: 0x8028dad0
- Ghidra address:
- JPN: 0x8028d500
- Ghidra address:
- BRD3D: 0x10af9bac
◆ g_bAiNudgeLeft
Whether a computer's vehicle should ease to the left or to the right of where it steers.
- Ghidra address:
- USA: 0x8028b80c
- Ghidra address:
- Asia: 0x8028B35C
- Ghidra address:
- EUR: 0x8028dabc
- Ghidra address:
- JPN: 0x8028d4ec
- Ghidra address:
- BRD3D: 0x10af9888
◆ g_bAiNudgeRight
Whether a computer's vehicle should ease to the right of where it steers.
- Ghidra address:
- USA: 0x8028b808
- Ghidra address:
- Asia: 0x8028B358
- Ghidra address:
- EUR: 0x8028dab8
- Ghidra address:
- JPN: 0x8028d4e8
- Ghidra address:
- BRD3D: 0x10af9ba4
◆ g_avBestLeftLane
The lanes and the middle of the deepest straight line.
- Ghidra address:
- USA: 0x8031b430
- Ghidra address:
- Asia: 0x8031AEE0
- Ghidra address:
- EUR: 0x8031d930
- Ghidra address:
- JPN: 0x8031c560
- Ghidra address:
- BRD3D: 0x10af9658
◆ g_avBestCenterLine
The centre points of the deepest straight line found.
- Ghidra address:
- USA: 0x8031b490
- Ghidra address:
- Asia: 0x8031AF40
- Ghidra address:
- EUR: 0x8031d990
- Ghidra address:
- JPN: 0x8031c5c0
- Ghidra address:
- BRD3D: 0x10af96c8
◆ g_avBestRightLane
The right lane points of the deepest straight line found.
- Ghidra address:
- USA: 0x8031b4f0
- Ghidra address:
- Asia: 0x8031AFA0
- Ghidra address:
- EUR: 0x8031d9f0
- Ghidra address:
- JPN: 0x8031c620
- Ghidra address:
- BRD3D: 0x10af95f8
◆ g_avTraceLeftLane
The points of the line a search follows: a fifth of the way in from each side, halfway from there to the middle, and the middle.
- Ghidra address:
- USA: 0x8031b550
- Ghidra address:
- Asia: 0x8031B000
- Ghidra address:
- EUR: 0x8031da50
- Ghidra address:
- JPN: 0x8031c680
- Ghidra address:
- BRD3D: 0x10af9788
◆ g_avTraceLeftHalf
The points halfway between the left lane and centre line of the search.
- Ghidra address:
- USA: 0x8031b5b0
- Ghidra address:
- Asia: 0x8031B060
- Ghidra address:
- EUR: 0x8031dab0
- Ghidra address:
- JPN: 0x8031c6e0
- Ghidra address:
- BRD3D: 0x10af9590
◆ g_avTraceCenterLine
The centre points of the line the search follows.
- Ghidra address:
- USA: 0x8031b610
- Ghidra address:
- Asia: 0x8031B0C0
- Ghidra address:
- EUR: 0x8031db10
- Ghidra address:
- JPN: 0x8031c740
- Ghidra address:
- BRD3D: 0x10af9728
◆ g_avTraceRightHalf
The points halfway between the right lane and centre line of the search.
- Ghidra address:
- USA: 0x8031b670
- Ghidra address:
- Asia: 0x8031B120
- Ghidra address:
- EUR: 0x8031db70
- Ghidra address:
- JPN: 0x8031c7a0
- Ghidra address:
- BRD3D: 0x10af9530
◆ g_avTraceRightLane
The right lane points of the line the search follows.
- Ghidra address:
- USA: 0x8031b6d0
- Ghidra address:
- Asia: 0x8031B180
- Ghidra address:
- EUR: 0x8031dbd0
- Ghidra address:
- JPN: 0x8031c800
- Ghidra address:
- BRD3D: 0x10af97e8
- Ghidra address:
- BRGlide: 0x10b1cb48
◆ g_vTraceFarPoint
The last point of the deepest line, and its point halfway.
- Ghidra address:
- USA: 0x8031b730
- Ghidra address:
- Asia: 0x8031B1E0
- Ghidra address:
- EUR: 0x8031dc30
- Ghidra address:
- JPN: 0x8031c860
- Ghidra address:
- BRD3D: 0x10af9b28
◆ g_vTraceHalfwayPoint
| Vec3f g_vTraceHalfwayPoint |
|
extern |
The centre point halfway along the deepest straight line found.
- Ghidra address:
- USA: 0x8031b740
- Ghidra address:
- Asia: 0x8031B1F0
- Ghidra address:
- EUR: 0x8031dc40
- Ghidra address:
- JPN: 0x8031c870
- Ghidra address:
- BRD3D: 0x10acde98