coastline 0.0.4
Loading...
Searching...
No Matches
racers.h File Reference

The racers of a race: their progress through the gates and laps, their places, and the sharing of the computer's vehicles among them. More...

#include <PR/ultratypes.h>
#include "common/track.h"
#include "common/vecmath.h"
#include "common/vehicle.h"
Include dependency graph for racers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void FindTrackRoutePoint (TrackSection *section, f32 distance)
 Find the point a distance along the route from the start of a section, counting the gates and laps on the way, into g_vTrackRoutePoint and the variables beside it.
void AdvanceAlongTrackRoute (TrackSection *section, s32 pointIndex, f32 fraction, f32 distance)
 Move a distance along the route from a point of a section, into g_vTrackRoutePoint and the variables beside it.
void UpdateRaceProgress (RacerSlot *slot)
 Count the gates and laps a racer crossed this frame, with its lap records and messages, and the time an arcade checkpoint adds.
int GetNetworkRaceOrderEntry (int nIndex)
 Get an entry of the order of a network race.

Variables

Vec3f g_vTrackRoutePoint
 The point the route walks last found.
TrackSection * g_pTrackRouteSection
 The section and point of that point.
s32 g_dwTrackRoutePointIndex
 The point index in g_pTrackRouteSection found by the last route walk.
s32 g_dwTrackRouteGates
 The gates and laps FindTrackRoutePoint() passed.
s32 g_dwTrackRouteLaps
 The laps FindTrackRoutePoint() passed.
const char * g_apszRaceProgressStrings [RACER_SLOTS]
 The places of the race as text, "1st" to "20th".

Detailed Description

The racers of a race: their progress through the gates and laps, their places, and the sharing of the computer's vehicles among them.

A racer far from the players has no vehicle and moves along the route by itself.

Function Documentation

◆ FindTrackRoutePoint()

void FindTrackRoutePoint ( TrackSection * section,
f32 distance )

Find the point a distance along the route from the start of a section, counting the gates and laps on the way, into g_vTrackRoutePoint and the variables beside it.

Parameters
sectionThe section to start from.
distanceThe distance along the route.
Ghidra address:
USA: 0x80228e4c
Ghidra address:
Asia: 0x8022899C
Ghidra address:
EUR: 0x8022a1c4
Ghidra address:
JPN: 0x802299a0
Ghidra address:
BRD3D: 0x10065b20
Ghidra address:
BRGlide: 0x1005eb90

◆ AdvanceAlongTrackRoute()

void AdvanceAlongTrackRoute ( TrackSection * section,
s32 pointIndex,
f32 fraction,
f32 distance )

Move a distance along the route from a point of a section, into g_vTrackRoutePoint and the variables beside it.

Parameters
sectionThe section.
pointIndexThe point of the section to start from.
fractionThe share of the segment after the point still ahead.
distanceThe distance to move.
Ghidra address:
USA: 0x802290c4
Ghidra address:
Asia: 0x80228C14
Ghidra address:
EUR: 0x8022a43c
Ghidra address:
JPN: 0x80229c18
Ghidra address:
BRD3D: 0x10065c80
Ghidra address:
BRGlide: 0x1005ecf0

◆ UpdateRaceProgress()

void UpdateRaceProgress ( RacerSlot * slot)

Count the gates and laps a racer crossed this frame, with its lap records and messages, and the time an arcade checkpoint adds.

Parameters
slotThe racer.
Ghidra address:
USA: 0x8022a0e0
Ghidra address:
Asia: 0x80229C30
Ghidra address:
EUR: 0x8022b458
Ghidra address:
JPN: 0x8022ac10

◆ GetNetworkRaceOrderEntry()

int GetNetworkRaceOrderEntry ( int nIndex)

Get an entry of the order of a network race.

Parameters
nIndexThe index of the entry.
Returns
The entry.
Ghidra address:
BRD3D: 0x10005e40
Ghidra address:
BRGlide: 0x100061b0

Variable Documentation

◆ g_vTrackRoutePoint

Vec3f g_vTrackRoutePoint
extern

The point the route walks last found.

Ghidra address:
USA: 0x8031b750
Ghidra address:
Asia: 0x8031B200
Ghidra address:
EUR: 0x8031dc50
Ghidra address:
JPN: 0x8031c880
Ghidra address:
BRD3D: 0x10af9b38
Ghidra address:
BRGlide: 0x10b1ce98

◆ g_pTrackRouteSection

TrackSection* g_pTrackRouteSection
extern

The section and point of that point.

Ghidra address:
USA: 0x8028b824
Ghidra address:
Asia: 0x8028B374
Ghidra address:
EUR: 0x8028dad4
Ghidra address:
JPN: 0x8028d504
Ghidra address:
BRD3D: 0x10af988c
Ghidra address:
BRGlide: 0x10b1cbec

◆ g_dwTrackRoutePointIndex

s32 g_dwTrackRoutePointIndex
extern

The point index in g_pTrackRouteSection found by the last route walk.

Ghidra address:
USA: 0x8028b828
Ghidra address:
Asia: 0x8028B378
Ghidra address:
EUR: 0x8028dad8
Ghidra address:
JPN: 0x8028d508
Ghidra address:
BRD3D: 0x10acd490
Ghidra address:
BRGlide: 0x10af07f0

◆ g_dwTrackRouteGates

s32 g_dwTrackRouteGates
extern

The gates and laps FindTrackRoutePoint() passed.

Ghidra address:
USA: 0x8028b82c
Ghidra address:
Asia: 0x8028B37C
Ghidra address:
EUR: 0x8028dadc
Ghidra address:
JPN: 0x8028d50c
Ghidra address:
BRD3D: 0x10af96c0
Ghidra address:
BRGlide: 0x10b1ca20

◆ g_dwTrackRouteLaps

s32 g_dwTrackRouteLaps
extern

The laps FindTrackRoutePoint() passed.

Ghidra address:
USA: 0x8028b830
Ghidra address:
Asia: 0x8028B380
Ghidra address:
EUR: 0x8028dae0
Ghidra address:
JPN: 0x8028d510
Ghidra address:
BRD3D: 0x10af9b44
Ghidra address:
BRGlide: 0x10b1cea4

◆ g_apszRaceProgressStrings

const char* g_apszRaceProgressStrings[RACER_SLOTS]
extern

The places of the race as text, "1st" to "20th".

Ghidra address:
USA: 0x8028babc
Ghidra address:
Asia: 0x8028B60C
Ghidra address:
EUR: 0x8028dd70
Ghidra address:
JPN: 0x8028d7a0