Go to the source code of this file.
|
| typedef struct VehicleModel | VehicleModel |
| | The model of a car as it is loaded from the cartridge.
|
|
| enum | { TACHOMETER_NEEDLE
, TACHOMETER_BAR_DIMMED
, TACHOMETER_BAR_HIDDEN
} |
| | How a car shows the revolutions of its engine. More...
|
| enum | { VEHICLE_WHEEL_DL_NORMAL
, VEHICLE_WHEEL_DL_1
, VEHICLE_WHEEL_DL_SNOW
, VEHICLE_WHEEL_DISPLAY_LISTS
} |
| | The display lists of a wheel of a car: the plain wheel, one not drawn, and one in the snow. More...
|
| enum | {
VEHICLE_DL_NEAR_DETAIL = 3
, VEHICLE_DL_BODY
, VEHICLE_DL_HEADLIGHT_BEAMS
, VEHICLE_DL_UNDERSIDE
,
VEHICLE_DL_TEXTURED = 8
, VEHICLE_DL_HIGHLIGHTED
} |
| | The display lists of the model of a car that the renderer draws. More...
|
◆ VEHICLE_WHEELS
◆ VEHICLE_LODS
The levels of detail of the model, the nearest first.
◆ VEHICLE_DISPLAY_LISTS
| #define VEHICLE_DISPLAY_LISTS 10 |
The display lists of each level of detail.
◆ VEHICLE_MATERIALS
| #define VEHICLE_MATERIALS 12 |
The textures of the materials of a car.
◆ VEHICLE_MATERIAL_PAINT
| #define VEHICLE_MATERIAL_PAINT 2 |
The texture whose palette is the paint.
◆ VEHICLE_MATERIAL_HEADLIGHTS
| #define VEHICLE_MATERIAL_HEADLIGHTS 10 |
The texture whose palette is the headlights.
◆ VEHICLE_MATERIAL_REAR_LIGHTS
| #define VEHICLE_MATERIAL_REAR_LIGHTS 11 |
The texture whose palette is the rear lights.
◆ VehicleModel
| typedef struct VehicleModel VehicleModel |
The model of a car as it is loaded from the cartridge.
Its fields join this structure as they are reconstructed.
◆ anonymous enum
How a car shows the revolutions of its engine.
| Enumerator |
|---|
| TACHOMETER_NEEDLE | A rotating needle over the dashboard face.
|
| TACHOMETER_BAR_DIMMED | A segmented bar with unlit segments dimmed.
|
| TACHOMETER_BAR_HIDDEN | A segmented bar with unlit segments hidden.
|
◆ anonymous enum
The display lists of a wheel of a car: the plain wheel, one not drawn, and one in the snow.
| Enumerator |
|---|
| VEHICLE_WHEEL_DL_NORMAL | The plain wheel.
|
| VEHICLE_WHEEL_DL_1 | A wheel the renderer does not draw.
|
| VEHICLE_WHEEL_DL_SNOW | The wheel in the snow.
|
| VEHICLE_WHEEL_DISPLAY_LISTS | The number of display lists of a wheel.
|
◆ anonymous enum
The display lists of the model of a car that the renderer draws.
| Enumerator |
|---|
| VEHICLE_DL_NEAR_DETAIL | Details drawn only near the camera, at the nearest level.
|
| VEHICLE_DL_BODY | The paint, under the reflection of the sky.
|
| VEHICLE_DL_HEADLIGHT_BEAMS | The beams of the headlights, at night or in the rain.
|
| VEHICLE_DL_UNDERSIDE | The underside, when the camera is below the car.
|
| VEHICLE_DL_TEXTURED | Lit, textured parts, cut out by the alpha of their textures.
|
| VEHICLE_DL_HIGHLIGHTED | The parts that take the specular highlight.
|
◆ LoadCar()
| void LoadCar |
( |
s32 | slot, |
|
|
s32 | car, |
|
|
void * | source ) |
Load a car model into a slot, fix up its pointers, and record the car.
- Parameters
-
| slot | The slot of g_aVehicleModels. |
| car | The index of the car in g_aCarModels. |
| source | A decompressed N64 model to copy, or NULL to load the asset. Windows treats a non-null source as fatal. |
- Ghidra address:
- USA: 0x8021d5e4
- Ghidra address:
- Asia: 0x8021D134
- Ghidra address:
- EUR: 0x8021e7e4
- Ghidra address:
- JPN: 0x8021e0b4
- Ghidra address:
- BRD3D: 0x10035520
- Ghidra address:
- BRGlide: 0x1002ebd1
◆ LoadVehicleModelFromRom()
Load a car model from platform asset storage.
- Parameters
-
| model | Where to decompress it. |
| car | The index of the car in g_aCarModels. |
- Ghidra address:
- USA: 0x8021d534
- Ghidra address:
- Asia: 0x8021D084
- Ghidra address:
- EUR: 0x8021e734
- Ghidra address:
- JPN: 0x8021e004
- Ghidra address:
- BRD3D: 0x10037740
- Ghidra address:
- BRGlide: 0x10030de0
◆ SetMaterialColor()
Paint the materials of a model a colour of 5 bits a channel.
- Parameters
-
| model | The model. |
| red | The red of the colour, from 0 to 31. |
| green | The green of the colour, from 0 to 31. |
| blue | The blue of the colour, from 0 to 31. |
- Ghidra address:
- USA: 0x8021d140
- Ghidra address:
- Asia: 0x8021CC90
- Ghidra address:
- EUR: 0x8021e340
- Ghidra address:
- JPN: 0x8021dc10
- Ghidra address:
- BRD3D: 0x100350ee
- Ghidra address:
- BRGlide: 0x1002e79f
◆ FixupVehicleModelPointers()
Relocate loaded model pointers on N64.
Windows does not require relocation here.
- Parameters
-
- Ghidra address:
- USA: 0x8021d32c
- Ghidra address:
- Asia: 0x8021CE7C
- Ghidra address:
- EUR: 0x8021e52c
- Ghidra address:
- JPN: 0x8021ddfc
- Ghidra address:
- BRD3D: 0x1003551b
- Ghidra address:
- BRGlide: 0x1002ebcc
◆ g_aVehicleModels
The models of the cars the vehicles drive, in slots.
The link script places them.
- Ghidra address:
- USA: 0x803c8000
- Ghidra address:
- Asia: 0x803C8000
- Ghidra address:
- EUR: 0x803c8000
- Ghidra address:
- JPN: 0x803c8000
- Ghidra address:
- BRD3D: 0x100c12a0
- Ghidra address:
- BRGlide: 0x100bcdd0
◆ g_adwVehicleModelSlotCars
| s32 g_adwVehicleModelSlotCars[] |
|
extern |
The car whose model each slot holds.
- Ghidra address:
- USA: 0x8031b238
- Ghidra address:
- Asia: 0x8031ACE8
- Ghidra address:
- EUR: 0x8031d738
- Ghidra address:
- JPN: 0x8031c368
- Ghidra address:
- BRD3D: 0x106c6558
- Ghidra address:
- BRGlide: 0x106ed5e8