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

The state the renderer shares between the parts of a frame. More...

#include <PR/gbi.h>
#include <PR/ultratypes.h>
#include "common/displaylistptr.h"
#include "common/ptr32.h"
#include "common/screendraw.h"
#include "common/vecmath.h"
Include dependency graph for render.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CameraFrame
 A frame of reference: three axes and a position, the rows of a 4 by 4 matrix whose last column FinishFrameMatrix() sets, and a field of view. More...
struct  TextureAnimationFrame
 A frame of an animated texture, with its ROM offsets and the time the next frame starts. More...
struct  TextureAnimation
 The frames of an animated texture. More...
struct  ModelTexture
 A texture of a model and its palette. More...
struct  ViewportRect
 The rectangle of the screen a view fills. More...

Macros

#define MODEL_TEXTURE_ANIMATED(texture)
 Whether a model texture advances through animation frames.
#define MODEL_TEXTURE_FORMAT(texture)
 The texel format of a model texture.
#define MODEL_TEXTURE_SIZE(texture)
 The size of a model texture, in bytes.
#define TEXTURE_FORMAT_CI4   1
#define TEXTURE_FORMAT_I8   4
#define TEXTURE_FORMAT_SNOW_STILL   0xB
 The format of an animated texture of the track that stays on its first frame in the snow.
#define TEXTURE_CI4_PALETTE   15
 The palette of the texture memory a 4-bit texture of a model loads its colors into.
#define CLIP_RATIOS   6
 The clipping ratios from 1 to 6, each a display list that sets it.
#define VIEWPORTS   32
 The viewports.
#define BLANK_SCREEN()
 Blank the video display.

Functions

void ClearRenderStats (void)
 Clear the counts of the vertices, triangles, and polygons drawn in a frame.
void ClearFramebuffersLowRes (void)
 Blank the screen and clear both frame buffers in the low resolution.
void NormalizeLightMatrix (f32 m[4][4])
 Scale a whole matrix down by the largest magnitude of its first three rows, plus 0.375, so that it fits the fixed point of the matrix the lighting is forced to.
void DrawTexturedTile (s32 index, ModelTexture *textures)
 Load a texture of a model into the texture memory and set up the tiles to draw it.
f32 ComputeFogFactorAtPoint (Vec3f *point)
 How thick the fog is at a point of the world, in the view being drawn.
f32 GetMaxAbsValue12 (f32 m[4][4])
 The largest absolute value of the first three rows of a matrix.
void SetupWeatherLights (void)
 Set the direction and the colours of the lights, and the light ramps, for the weather.
void SetupFog (void)
 Set the colour and the range of the fog for the weather and the track, and add them to the display list.
void StubEmpty (void)
 Do nothing.
void BlankDisplay (void)
 Blank the screen.
void UnblankDisplay (void)
 Show the screen again.
void ClearFramebuffersHighRes (void)
 Black out the screen and clear both frame buffers in the high resolution.
void StreamAnimatedTrackTextures (void)
 Select current animated track textures and their snow variants.

Variables

Mtx * g_pProjectionMtx
 The projection of the current view.
f32 g_afMvpMatrix [4][4]
 A matrix the renderer builds before converting it.
f32 g_afPerspectiveMatrix [4][4]
 The perspective of the current view.
f32 g_afScratchMatrix [4][4]
 A matrix the renderer fills as an operand.
u32 g_dwTextureFilterMode
 The texture filter of the other modes.
s32 g_dwTrackMirrored
 Whether the track is drawn mirrored.
s32 g_dwViewportMirrored
 Whether the current view is mirrored.
CameraFrame * g_pActiveCamera
 The camera of the view being drawn.
f32 g_fCameraFovRadians
 The field of view of the cameras, in radians.
f32 g_fCameraProjectionScale
 The distance the far planes of the cameras are taken from; the stages of the menus see a fifth of it.
s32 g_dwNumViewports
 The views on the screen, one for each player.
ViewportRect g_aViewportRects []
 The rectangles of the views.
s32 g_dwCurrentSplitScreenIndex
 The view being drawn.
s32 g_dwViewportScaleZ
 The depth scale of the viewport SetViewport() last set.
s32 g_dwViewportTransZ
 The depth offset of the viewport SetViewport() last set.
f32 g_afViewProjMatrix [4][4]
 The view and projection of the view being drawn.
u16 g_wPerspNorm
 The normalisation of the perspective of the projection.
f32 gFrustumFar
 The distance of the far plane of the cameras.
f32 g_fFrustumFovAngle
 The angle SetupFrustumCorners() was last given.
f32 g_ViewLookAtMtx [4][4]
 The view of the current view, before its perspective.
Mtx g_mtxIdentity
 The identity matrix used for display-list transforms.
s32 g_dwStatVerticesDrawn
 The vertices, triangles, and polygons drawn this frame.
s32 g_dwStatTrianglesDrawn
 The triangles submitted during the current frame.
s32 g_dwStatPolygonsDrawn
 The polygons submitted during the current frame.
s32 g_bTrackTextureLod
 Whether the level of detail of the textures of the track is on.
s32 g_bSmoothShading
 Whether the track is drawn with smooth shading.
u32 g_dwDirLightColor
 The colour of the light of the sun and of the ambient light.
u32 g_dwAmbientLightColor
 The packed colour of the ambient light.
Lights1 g_DefaultLights
 The lights the vehicles and the track start from.
f32 g_afLightDirection [3]
 The direction of the light of the sun.
u32 g_adwLightRampColors [4]
 The colours of the light of the placed models lit by their light ramp, by its index.
s32 g_adwVehicleVisible []
 Whether each vehicle is in the view being drawn.
Gfx g_aClipRatioDisplayLists [CLIP_RATIOS][5]
 The display lists that set each clipping ratio, from 1.
u8 g_bDirLightR
 The colour of the light of the sun, in parts.
u8 g_bDirLightG
 The green channel of the directional light.
u8 g_bDirLightB
 The blue channel of the directional light.
u8 g_bAmbientLightR
 The colour of the ambient light, in parts.
u8 g_bAmbientLightG
 The green channel of the ambient light.
u8 g_bAmbientLightB
 The blue channel of the ambient light.
s32 g_dwVehicleLodBias
 The least detailed level the vehicles are drawn at, from 0.
s32 g_dwVehicleCullingDisabled
 Whether the car of the camera is drawn from its cockpit and mirror cameras too.
s32 g_dwStatVehicleTriangles
 The triangles of the vehicles drawn this frame.
u32 g_dwTextureTmemAddress
 The address in the texture memory DrawTexturedTile() loads to.
u32 g_dwTextureRenderTile
 The tile DrawTexturedTile() sets up to draw with.
s32 g_dwFogMinDistance
 The depths the fog starts and ends at, from 0 at the near plane to 1000 at the far.
s32 g_dwFogMaxDistance
 The fog end depth, from 0 at the near plane to 1000 at the far plane.
s32 g_dwFogFactorOffset
 The offset and the scale that turn the depth of a point into its fog, from 0 to 255, as the microcode does.
s32 g_dwFogFactorScale
 The scale that maps depth to a fog value from 0 to 255.
u8 g_abLightRampR [4]
 The light ramps of the placed models, in parts, by the index of the ramp.
u8 g_abLightRampG [4]
 The green channel of each placed-model light-ramp colour.
u8 g_abLightRampB [4]
 The blue channel of each placed-model light-ramp colour.
s32 g_dwViewportIndex
 The viewport set last.
s32 g_dwClipRatioIndex
 The display list of g_aClipRatioDisplayLists a frame starts with.
s32 g_bGbiClipping
 Whether the microcode clips the triangles.
u32 g_dwDisplayBlanked
 Whether BlankDisplay() blanked the screen and UnblankDisplay() has not yet shown it.

Detailed Description

The state the renderer shares between the parts of a frame.

Macro Definition Documentation

◆ MODEL_TEXTURE_ANIMATED

#define MODEL_TEXTURE_ANIMATED ( texture)
Value:
((texture)->animated)

Whether a model texture advances through animation frames.

◆ MODEL_TEXTURE_FORMAT

#define MODEL_TEXTURE_FORMAT ( texture)
Value:
((texture)->format)

The texel format of a model texture.

◆ MODEL_TEXTURE_SIZE

#define MODEL_TEXTURE_SIZE ( texture)
Value:
((texture)->size)

The size of a model texture, in bytes.

◆ TEXTURE_FORMAT_CI4

#define TEXTURE_FORMAT_CI4   1

4-bit texels with a palette of 16 colors.

◆ TEXTURE_FORMAT_I8

#define TEXTURE_FORMAT_I8   4

8-bit intensity texels.

◆ TEXTURE_FORMAT_SNOW_STILL

#define TEXTURE_FORMAT_SNOW_STILL   0xB

The format of an animated texture of the track that stays on its first frame in the snow.

◆ TEXTURE_CI4_PALETTE

#define TEXTURE_CI4_PALETTE   15

The palette of the texture memory a 4-bit texture of a model loads its colors into.

◆ CLIP_RATIOS

#define CLIP_RATIOS   6

The clipping ratios from 1 to 6, each a display list that sets it.

◆ VIEWPORTS

#define VIEWPORTS   32

The viewports.

The display lists of the last frames may still use them.

◆ BLANK_SCREEN

#define BLANK_SCREEN ( )
Value:
void osViBlack(u8 active)
Blank the screen from the next field on, or show it again.
#define TRUE
Definition ultratypes.h:53

Blank the video display.

Function Documentation

◆ ClearRenderStats()

void ClearRenderStats ( void )

Clear the counts of the vertices, triangles, and polygons drawn in a frame.

Ghidra address:
USA: 0x802173c8
Ghidra address:
Asia: 0x80216F18
Ghidra address:
EUR: 0x802183e8
Ghidra address:
JPN: 0x80217d38
Ghidra address:
BRD3D: 0x10031227
Ghidra address:
BRGlide: 0x1002a8d7

◆ ClearFramebuffersLowRes()

void ClearFramebuffersLowRes ( void )

Blank the screen and clear both frame buffers in the low resolution.

Ghidra address:
USA: 0x8021a540
Ghidra address:
Asia: 0x8021A090
Ghidra address:
EUR: 0x8021b630
Ghidra address:
JPN: 0x8021af0c
Ghidra address:
BRD3D: 0x10033493
Ghidra address:
BRGlide: 0x1002cb44

◆ NormalizeLightMatrix()

void NormalizeLightMatrix ( f32 m[4][4])

Scale a whole matrix down by the largest magnitude of its first three rows, plus 0.375, so that it fits the fixed point of the matrix the lighting is forced to.

Parameters
mThe matrix.
Ghidra address:
USA: 0x802174b4
Ghidra address:
Asia: 0x80217004
Ghidra address:
EUR: 0x802184d4
Ghidra address:
JPN: 0x80217e24
Ghidra address:
BRD3D: 0x10031342
Ghidra address:
BRGlide: 0x1002a9f2

◆ DrawTexturedTile()

void DrawTexturedTile ( s32 index,
ModelTexture * textures )

Load a texture of a model into the texture memory and set up the tiles to draw it.

Parameters
indexThe index of the texture.
texturesThe textures of the model.
Ghidra address:
USA: 0x80217734
Ghidra address:
Asia: 0x80217284
Ghidra address:
EUR: 0x80218754
Ghidra address:
JPN: 0x802180a4
Ghidra address:
BRD3D: 0x10031481
Ghidra address:
BRGlide: 0x1002ab32

◆ ComputeFogFactorAtPoint()

f32 ComputeFogFactorAtPoint ( Vec3f * point)

How thick the fog is at a point of the world, in the view being drawn.

Parameters
pointThe point.
Returns
The fog, from 0 to 1, or 0 when there is no weather.
Ghidra address:
USA: 0x80218c8c
Ghidra address:
Asia: 0x802187DC
Ghidra address:
EUR: 0x80219cac
Ghidra address:
JPN: 0x802195fc
Ghidra address:
BRD3D: 0x10031d3f
Ghidra address:
BRGlide: 0x1002b3f0

◆ GetMaxAbsValue12()

f32 GetMaxAbsValue12 ( f32 m[4][4])

The largest absolute value of the first three rows of a matrix.

Parameters
mThe matrix.
Returns
The largest absolute value of its first 12 elements.
Ghidra address:
USA: 0x80217420
Ghidra address:
Asia: 0x80216F70
Ghidra address:
EUR: 0x80218440
Ghidra address:
JPN: 0x80217d90
Ghidra address:
BRD3D: 0x100312a7
Ghidra address:
BRGlide: 0x1002a957

◆ SetupWeatherLights()

void SetupWeatherLights ( void )

Set the direction and the colours of the lights, and the light ramps, for the weather.

Ghidra address:
USA: 0x80218d5c
Ghidra address:
Asia: 0x802188AC
Ghidra address:
EUR: 0x80219d7c
Ghidra address:
JPN: 0x802196cc
Ghidra address:
BRD3D: 0x10031dcf
Ghidra address:
BRGlide: 0x1002b480

◆ SetupFog()

void SetupFog ( void )

Set the colour and the range of the fog for the weather and the track, and add them to the display list.

Ghidra address:
USA: 0x802182a8
Ghidra address:
Asia: 0x80217DF8
Ghidra address:
EUR: 0x802192c8
Ghidra address:
JPN: 0x80218c18
Ghidra address:
BRD3D: 0x10031866
Ghidra address:
BRGlide: 0x1002af17

◆ StubEmpty()

void StubEmpty ( void )

Do nothing.

Ghidra address:
USA: 0x80217c8c
Ghidra address:
Asia: 0x802177DC
Ghidra address:
EUR: 0x80218cac
Ghidra address:
JPN: 0x802185fc

◆ BlankDisplay()

void BlankDisplay ( void )

Blank the screen.

The European release first sets the video mode of the resolution in use from the tables of libultra, unless the screen is already blank.

Ghidra address:
EUR: 0x8021b4e8
Ghidra address:
JPN: 0x8021ae40

◆ UnblankDisplay()

void UnblankDisplay ( void )

Show the screen again.

The European release sets the video mode of the resolution in use from the copies of the game when BlankDisplay() blanked the screen.

Ghidra address:
EUR: 0x8021b54c
Ghidra address:
JPN: 0x8021ae68

◆ ClearFramebuffersHighRes()

void ClearFramebuffersHighRes ( void )

Black out the screen and clear both frame buffers in the high resolution.

Ghidra address:
USA: 0x8021a4c8
Ghidra address:
Asia: 0x8021A018
Ghidra address:
EUR: 0x8021b5b0
Ghidra address:
JPN: 0x8021ae8c
Ghidra address:
BRD3D: 0x1003348e
Ghidra address:
BRGlide: 0x1002cb3f

◆ StreamAnimatedTrackTextures()

void StreamAnimatedTrackTextures ( void )

Select current animated track textures and their snow variants.

N64 copies texels and palettes from cartridge; Windows aliases uploaded texture entries.

Ghidra address:
USA: 0x8021a5b8
Ghidra address:
Asia: 0x8021A108
Ghidra address:
EUR: 0x8021b6d0
Ghidra address:
JPN: 0x8021afac
Ghidra address:
BRD3D: 0x10033498
Ghidra address:
BRGlide: 0x1002cb49

Variable Documentation

◆ g_pProjectionMtx

Mtx* g_pProjectionMtx
extern

The projection of the current view.

Ghidra address:
USA: 0x8028a878
Ghidra address:
Asia: 0x8028A3C8
Ghidra address:
EUR: 0x8028ca78
Ghidra address:
JPN: 0x8028c548
Ghidra address:
BRD3D: 0x106c32d0
Ghidra address:
BRGlide: 0x106ea360

◆ g_afMvpMatrix

f32 g_afMvpMatrix[4][4]
extern

A matrix the renderer builds before converting it.

Ghidra address:
USA: 0x8031ab10
Ghidra address:
Asia: 0x8031A5C0
Ghidra address:
EUR: 0x8031d010
Ghidra address:
JPN: 0x8031bc40
Ghidra address:
BRD3D: 0x106c0860
Ghidra address:
BRGlide: 0x106e78f0

◆ g_afPerspectiveMatrix

f32 g_afPerspectiveMatrix[4][4]
extern

The perspective of the current view.

Ghidra address:
USA: 0x8031aa90
Ghidra address:
Asia: 0x8031A540
Ghidra address:
EUR: 0x8031cf90
Ghidra address:
JPN: 0x8031bbc0
Ghidra address:
BRD3D: 0x106c0218
Ghidra address:
BRGlide: 0x106e72a8

◆ g_afScratchMatrix

f32 g_afScratchMatrix[4][4]
extern

A matrix the renderer fills as an operand.

Ghidra address:
USA: 0x8031ab50
Ghidra address:
Asia: 0x8031A600
Ghidra address:
EUR: 0x8031d050
Ghidra address:
JPN: 0x8031bc80
Ghidra address:
BRD3D: 0x106c08a0
Ghidra address:
BRGlide: 0x106e7930

◆ g_dwTextureFilterMode

u32 g_dwTextureFilterMode
extern

The texture filter of the other modes.

Ghidra address:
USA: 0x8028a898
Ghidra address:
Asia: 0x8028A3E8
Ghidra address:
EUR: 0x8028ca9c
Ghidra address:
JPN: 0x8028c56c
Ghidra address:
BRD3D: 0x106c0258
Ghidra address:
BRGlide: 0x106e72e8

◆ g_dwTrackMirrored

s32 g_dwTrackMirrored
extern

Whether the track is drawn mirrored.

Ghidra address:
USA: 0x8028a8ac
Ghidra address:
Asia: 0x8028A3FC
Ghidra address:
EUR: 0x8028cab0
Ghidra address:
JPN: 0x8028c580
Ghidra address:
BRD3D: 0x106c3364
Ghidra address:
BRGlide: 0x106ea3f4

◆ g_dwViewportMirrored

s32 g_dwViewportMirrored
extern

Whether the current view is mirrored.

Ghidra address:
USA: 0x8028a8a8
Ghidra address:
Asia: 0x8028A3F8
Ghidra address:
EUR: 0x8028caac
Ghidra address:
JPN: 0x8028c57c
Ghidra address:
BRD3D: 0x106c1174
Ghidra address:
BRGlide: 0x106e8204

◆ g_pActiveCamera

CameraFrame* g_pActiveCamera
extern

The camera of the view being drawn.

Ghidra address:
USA: 0x8028aaf4
Ghidra address:
Asia: 0x8028A644
Ghidra address:
EUR: 0x8028ccfc
Ghidra address:
JPN: 0x8028c7cc
Ghidra address:
BRD3D: 0x106c6490
Ghidra address:
BRGlide: 0x106ed520

◆ g_fCameraFovRadians

f32 g_fCameraFovRadians
extern

The field of view of the cameras, in radians.

Ghidra address:
USA: 0x8028aac0
Ghidra address:
Asia: 0x8028A610
Ghidra address:
EUR: 0x8028ccc8
Ghidra address:
JPN: 0x8028c798
Ghidra address:
BRD3D: 0x100aa8ac
Ghidra address:
BRGlide: 0x100aa03c

◆ g_fCameraProjectionScale

f32 g_fCameraProjectionScale
extern

The distance the far planes of the cameras are taken from; the stages of the menus see a fifth of it.

Ghidra address:
USA: 0x8028aac8
Ghidra address:
Asia: 0x8028A618
Ghidra address:
EUR: 0x8028ccd0
Ghidra address:
JPN: 0x8028c7a0

◆ g_dwNumViewports

s32 g_dwNumViewports
extern

The views on the screen, one for each player.

Ghidra address:
USA: 0x8028ab0c
Ghidra address:
Asia: 0x8028A65C
Ghidra address:
EUR: 0x8028cd14
Ghidra address:
JPN: 0x8028c7e4
Ghidra address:
BRD3D: 0x100aa8b4
Ghidra address:
BRGlide: 0x100aa044

◆ g_aViewportRects

ViewportRect g_aViewportRects[]
extern

The rectangles of the views.

Ghidra address:
USA: 0x8031b2c8
Ghidra address:
Asia: 0x8031AD78
Ghidra address:
EUR: 0x8031d7c8
Ghidra address:
JPN: 0x8031c3f8
Ghidra address:
BRD3D: 0x106c1628
Ghidra address:
BRGlide: 0x106e86b8

◆ g_dwCurrentSplitScreenIndex

s32 g_dwCurrentSplitScreenIndex
extern

The view being drawn.

Ghidra address:
USA: 0x8028aaec
Ghidra address:
Asia: 0x8028A63C
Ghidra address:
EUR: 0x8028ccf4
Ghidra address:
JPN: 0x8028c7c4
Ghidra address:
BRD3D: 0x106c5708
Ghidra address:
BRGlide: 0x106ec798

◆ g_dwViewportScaleZ

s32 g_dwViewportScaleZ
extern

The depth scale of the viewport SetViewport() last set.

Ghidra address:
USA: 0x8028ab64
Ghidra address:
Asia: 0x8028A6B4
Ghidra address:
EUR: 0x8028cd6c
Ghidra address:
JPN: 0x8028c83c
Ghidra address:
BRD3D: 0x106c62d8
Ghidra address:
BRGlide: 0x106ed368

◆ g_dwViewportTransZ

s32 g_dwViewportTransZ
extern

The depth offset of the viewport SetViewport() last set.

Ghidra address:
USA: 0x8028ab68
Ghidra address:
Asia: 0x8028A6B8
Ghidra address:
EUR: 0x8028cd70
Ghidra address:
JPN: 0x8028c840
Ghidra address:
BRD3D: 0x106c65b8
Ghidra address:
BRGlide: 0x106ed648

◆ g_afViewProjMatrix

f32 g_afViewProjMatrix[4][4]
extern

The view and projection of the view being drawn.

Ghidra address:
USA: 0x8031aa50
Ghidra address:
Asia: 0x8031A500
Ghidra address:
EUR: 0x8031cf50
Ghidra address:
JPN: 0x8031bb80
Ghidra address:
BRD3D: 0x106c29a8
Ghidra address:
BRGlide: 0x106e9a38

◆ g_wPerspNorm

u16 g_wPerspNorm
extern

The normalisation of the perspective of the projection.

Ghidra address:
USA: 0x8028a874
Ghidra address:
Asia: 0x8028A3C4
Ghidra address:
EUR: 0x8028ca74
Ghidra address:
JPN: 0x8028c544
Ghidra address:
BRD3D: 0x106c067c
Ghidra address:
BRGlide: 0x106e770c

◆ gFrustumFar

f32 gFrustumFar
extern

The distance of the far plane of the cameras.

Ghidra address:
USA: 0x8028aacc
Ghidra address:
Asia: 0x8028A61C
Ghidra address:
EUR: 0x8028ccd4
Ghidra address:
JPN: 0x8028c7a4
Ghidra address:
BRD3D: 0x106c0210
Ghidra address:
BRGlide: 0x106e72a0

◆ g_fFrustumFovAngle

f32 g_fFrustumFovAngle
extern

The angle SetupFrustumCorners() was last given.

Ghidra address:
USA: 0x8028aac4
Ghidra address:
Asia: 0x8028A614
Ghidra address:
EUR: 0x8028cccc
Ghidra address:
JPN: 0x8028c79c
Ghidra address:
BRD3D: 0x106c53c0
Ghidra address:
BRGlide: 0x106ec450

◆ g_ViewLookAtMtx

f32 g_ViewLookAtMtx[4][4]
extern

The view of the current view, before its perspective.

Ghidra address:
USA: 0x8031aad0
Ghidra address:
Asia: 0x8031A580
Ghidra address:
EUR: 0x8031cfd0
Ghidra address:
JPN: 0x8031bc00
Ghidra address:
BRD3D: 0x106c58c0
Ghidra address:
BRGlide: 0x106ec950

◆ g_mtxIdentity

Mtx g_mtxIdentity
extern

The identity matrix used for display-list transforms.

Ghidra address:
USA: 0x8028a8c0
Ghidra address:
Asia: 0x8028A410
Ghidra address:
EUR: 0x8028cac8
Ghidra address:
JPN: 0x8028c598
Ghidra address:
BRD3D: 0x100aa730
Ghidra address:
BRGlide: 0x100a9ec0

◆ g_dwStatVerticesDrawn

s32 g_dwStatVerticesDrawn
extern

The vertices, triangles, and polygons drawn this frame.

Ghidra address:
USA: 0x8028aa08
Ghidra address:
Asia: 0x8028A558
Ghidra address:
EUR: 0x8028cc10
Ghidra address:
JPN: 0x8028c6e0
Ghidra address:
BRD3D: 0x106c06a4
Ghidra address:
BRGlide: 0x106e7734

◆ g_dwStatTrianglesDrawn

s32 g_dwStatTrianglesDrawn
extern

The triangles submitted during the current frame.

Ghidra address:
USA: 0x8028aa10
Ghidra address:
Asia: 0x8028A560
Ghidra address:
EUR: 0x8028cc18
Ghidra address:
JPN: 0x8028c6e8
Ghidra address:
BRD3D: 0x106c069c
Ghidra address:
BRGlide: 0x106e772c

◆ g_dwStatPolygonsDrawn

s32 g_dwStatPolygonsDrawn
extern

The polygons submitted during the current frame.

Ghidra address:
USA: 0x8028aa38
Ghidra address:
Asia: 0x8028A588
Ghidra address:
EUR: 0x8028cc40
Ghidra address:
JPN: 0x8028c710
Ghidra address:
BRD3D: 0x106c1610
Ghidra address:
BRGlide: 0x106e86a0

◆ g_bTrackTextureLod

s32 g_bTrackTextureLod
extern

Whether the level of detail of the textures of the track is on.

Ghidra address:
USA: 0x8028aa44
Ghidra address:
Asia: 0x8028A594
Ghidra address:
EUR: 0x8028cc4c
Ghidra address:
JPN: 0x8028c71c
Ghidra address:
BRD3D: 0x100aa87c
Ghidra address:
BRGlide: 0x100aa00c

◆ g_bSmoothShading

s32 g_bSmoothShading
extern

Whether the track is drawn with smooth shading.

Ghidra address:
USA: 0x8028aa48
Ghidra address:
Asia: 0x8028A598
Ghidra address:
EUR: 0x8028cc50
Ghidra address:
JPN: 0x8028c720
Ghidra address:
BRD3D: 0x100aa880
Ghidra address:
BRGlide: 0x100aa010

◆ g_dwDirLightColor

u32 g_dwDirLightColor
extern

The colour of the light of the sun and of the ambient light.

Ghidra address:
USA: 0x8028ab58
Ghidra address:
Asia: 0x8028A6A8
Ghidra address:
EUR: 0x8028cd60
Ghidra address:
JPN: 0x8028c830
Ghidra address:
BRD3D: 0x106c5ab0
Ghidra address:
BRGlide: 0x106ecb40

◆ g_dwAmbientLightColor

u32 g_dwAmbientLightColor
extern

The packed colour of the ambient light.

Ghidra address:
USA: 0x8028ab5c
Ghidra address:
Asia: 0x8028A6AC
Ghidra address:
EUR: 0x8028cd64
Ghidra address:
JPN: 0x8028c834
Ghidra address:
BRD3D: 0x106c29e8
Ghidra address:
BRGlide: 0x106e9a78

◆ g_DefaultLights

Lights1 g_DefaultLights
extern

The lights the vehicles and the track start from.

Ghidra address:
USA: 0x8028a9f0
Ghidra address:
Asia: 0x8028A540
Ghidra address:
EUR: 0x8028cbf8
Ghidra address:
JPN: 0x8028c6c8
Ghidra address:
BRD3D: 0x100aa860
Ghidra address:
BRGlide: 0x100a9ff0

◆ g_afLightDirection

f32 g_afLightDirection[3]
extern

The direction of the light of the sun.

Ghidra address:
USA: 0x8031b338
Ghidra address:
Asia: 0x8031ADE8
Ghidra address:
EUR: 0x8031d828
Ghidra address:
JPN: 0x8031c458
Ghidra address:
BRD3D: 0x106c0670
Ghidra address:
BRGlide: 0x106e7700

◆ g_adwLightRampColors

u32 g_adwLightRampColors[4]
extern

The colours of the light of the placed models lit by their light ramp, by its index.

Ghidra address:
USA: 0x8031b360
Ghidra address:
Asia: 0x8031AE10
Ghidra address:
EUR: 0x8031d858
Ghidra address:
JPN: 0x8031c488
Ghidra address:
BRD3D: 0x106c0950
Ghidra address:
BRGlide: 0x106e79e0

◆ g_adwVehicleVisible

s32 g_adwVehicleVisible[]
extern

Whether each vehicle is in the view being drawn.

Ghidra address:
USA: 0x80351c70
Ghidra address:
Asia: 0x80351720
Ghidra address:
EUR: 0x80354170
Ghidra address:
JPN: 0x80352de0
Ghidra address:
BRD3D: 0x10277e60
Ghidra address:
BRGlide: 0x10273648

◆ g_aClipRatioDisplayLists

Gfx g_aClipRatioDisplayLists[CLIP_RATIOS][5]
extern

The display lists that set each clipping ratio, from 1.

Ghidra address:
USA: 0x8028a900
Ghidra address:
Asia: 0x8028A450
Ghidra address:
EUR: 0x8028cb08
Ghidra address:
JPN: 0x8028c5d8
Ghidra address:
BRD3D: 0x100aa770
Ghidra address:
BRGlide: 0x100a9f00

◆ g_bDirLightR

u8 g_bDirLightR
extern

The colour of the light of the sun, in parts.

Ghidra address:
USA: 0x8028ab40
Ghidra address:
Asia: 0x8028A690
Ghidra address:
EUR: 0x8028cd48
Ghidra address:
JPN: 0x8028c818
Ghidra address:
BRD3D: 0x106c1580
Ghidra address:
BRGlide: 0x106e8610

◆ g_bDirLightG

u8 g_bDirLightG
extern

The green channel of the directional light.

Ghidra address:
USA: 0x8028ab44
Ghidra address:
Asia: 0x8028A694
Ghidra address:
EUR: 0x8028cd4c
Ghidra address:
JPN: 0x8028c81c
Ghidra address:
BRD3D: 0x106c335c
Ghidra address:
BRGlide: 0x106ea3ec

◆ g_bDirLightB

u8 g_bDirLightB
extern

The blue channel of the directional light.

Ghidra address:
USA: 0x8028ab48
Ghidra address:
Asia: 0x8028A698
Ghidra address:
EUR: 0x8028cd50
Ghidra address:
JPN: 0x8028c820
Ghidra address:
BRD3D: 0x106c0968
Ghidra address:
BRGlide: 0x106e79f8

◆ g_bAmbientLightR

u8 g_bAmbientLightR
extern

The colour of the ambient light, in parts.

Ghidra address:
USA: 0x8028ab4c
Ghidra address:
Asia: 0x8028A69C
Ghidra address:
EUR: 0x8028cd54
Ghidra address:
JPN: 0x8028c824
Ghidra address:
BRD3D: 0x10690bf0
Ghidra address:
BRGlide: 0x106b7c80

◆ g_bAmbientLightG

u8 g_bAmbientLightG
extern

The green channel of the ambient light.

Ghidra address:
USA: 0x8028ab50
Ghidra address:
Asia: 0x8028A6A0
Ghidra address:
EUR: 0x8028cd58
Ghidra address:
JPN: 0x8028c828
Ghidra address:
BRD3D: 0x106c0960
Ghidra address:
BRGlide: 0x106e79f0

◆ g_bAmbientLightB

u8 g_bAmbientLightB
extern

The blue channel of the ambient light.

Ghidra address:
USA: 0x8028ab54
Ghidra address:
Asia: 0x8028A6A4
Ghidra address:
EUR: 0x8028cd5c
Ghidra address:
JPN: 0x8028c82c
Ghidra address:
BRD3D: 0x106c65bc
Ghidra address:
BRGlide: 0x106ed64c

◆ g_dwVehicleLodBias

s32 g_dwVehicleLodBias
extern

The least detailed level the vehicles are drawn at, from 0.

Ghidra address:
USA: 0x8028aa9c
Ghidra address:
Asia: 0x8028A5EC
Ghidra address:
EUR: 0x8028cca4
Ghidra address:
JPN: 0x8028c774

◆ g_dwVehicleCullingDisabled

s32 g_dwVehicleCullingDisabled
extern

Whether the car of the camera is drawn from its cockpit and mirror cameras too.

Ghidra address:
USA: 0x8028aa70
Ghidra address:
Asia: 0x8028A5C0
Ghidra address:
EUR: 0x8028cc78
Ghidra address:
JPN: 0x8028c748
Ghidra address:
BRD3D: 0x106c6614
Ghidra address:
BRGlide: 0x106ed6a4

◆ g_dwStatVehicleTriangles

s32 g_dwStatVehicleTriangles
extern

The triangles of the vehicles drawn this frame.

Ghidra address:
USA: 0x8028aa3c
Ghidra address:
Asia: 0x8028A58C
Ghidra address:
EUR: 0x8028cc44
Ghidra address:
JPN: 0x8028c714
Ghidra address:
BRD3D: 0x106c161c
Ghidra address:
BRGlide: 0x106e86ac

◆ g_dwTextureTmemAddress

u32 g_dwTextureTmemAddress
extern

The address in the texture memory DrawTexturedTile() loads to.

Ghidra address:
USA: 0x8028ab1c
Ghidra address:
Asia: 0x8028A66C
Ghidra address:
EUR: 0x8028cd24
Ghidra address:
JPN: 0x8028c7f4

◆ g_dwTextureRenderTile

u32 g_dwTextureRenderTile
extern

The tile DrawTexturedTile() sets up to draw with.

Ghidra address:
USA: 0x8028ab18
Ghidra address:
Asia: 0x8028A668
Ghidra address:
EUR: 0x8028cd20
Ghidra address:
JPN: 0x8028c7f0

◆ g_dwFogMinDistance

s32 g_dwFogMinDistance
extern

The depths the fog starts and ends at, from 0 at the near plane to 1000 at the far.

Ghidra address:
USA: 0x8028ab30
Ghidra address:
Asia: 0x8028A680
Ghidra address:
EUR: 0x8028cd38
Ghidra address:
JPN: 0x8028c808
Ghidra address:
BRD3D: 0x106c3398
Ghidra address:
BRGlide: 0x106ea428

◆ g_dwFogMaxDistance

s32 g_dwFogMaxDistance
extern

The fog end depth, from 0 at the near plane to 1000 at the far plane.

Ghidra address:
USA: 0x8028ab34
Ghidra address:
Asia: 0x8028A684
Ghidra address:
EUR: 0x8028cd3c
Ghidra address:
JPN: 0x8028c80c
Ghidra address:
BRD3D: 0x106c64d8
Ghidra address:
BRGlide: 0x106ed568

◆ g_dwFogFactorOffset

s32 g_dwFogFactorOffset
extern

The offset and the scale that turn the depth of a point into its fog, from 0 to 255, as the microcode does.

Ghidra address:
USA: 0x8028ab38
Ghidra address:
Asia: 0x8028A688
Ghidra address:
EUR: 0x8028cd40
Ghidra address:
JPN: 0x8028c810
Ghidra address:
BRD3D: 0x106c1618
Ghidra address:
BRGlide: 0x106e86a8

◆ g_dwFogFactorScale

s32 g_dwFogFactorScale
extern

The scale that maps depth to a fog value from 0 to 255.

Ghidra address:
USA: 0x8028ab3c
Ghidra address:
Asia: 0x8028A68C
Ghidra address:
EUR: 0x8028cd44
Ghidra address:
JPN: 0x8028c814
Ghidra address:
BRD3D: 0x106c2cf4
Ghidra address:
BRGlide: 0x106e9d84

◆ g_abLightRampR

u8 g_abLightRampR[4]
extern

The light ramps of the placed models, in parts, by the index of the ramp.

Ghidra address:
USA: 0x8031b350
Ghidra address:
Asia: 0x8031AE00
Ghidra address:
EUR: 0x8031d848
Ghidra address:
JPN: 0x8031c478
Ghidra address:
BRD3D: 0x10690ff8
Ghidra address:
BRGlide: 0x106b8088

◆ g_abLightRampG

u8 g_abLightRampG[4]
extern

The green channel of each placed-model light-ramp colour.

Ghidra address:
USA: 0x8031b354
Ghidra address:
Asia: 0x8031AE04
Ghidra address:
EUR: 0x8031d84c
Ghidra address:
JPN: 0x8031c47c
Ghidra address:
BRD3D: 0x106c6494
Ghidra address:
BRGlide: 0x106ed524

◆ g_abLightRampB

u8 g_abLightRampB[4]
extern

The blue channel of each placed-model light-ramp colour.

Ghidra address:
USA: 0x8031b358
Ghidra address:
Asia: 0x8031AE08
Ghidra address:
EUR: 0x8031d850
Ghidra address:
JPN: 0x8031c480
Ghidra address:
BRD3D: 0x106c3358
Ghidra address:
BRGlide: 0x106ea3e8

◆ g_dwViewportIndex

s32 g_dwViewportIndex
extern

The viewport set last.

Ghidra address:
USA: 0x8028ab60
Ghidra address:
Asia: 0x8028A6B0
Ghidra address:
EUR: 0x8028cd68
Ghidra address:
JPN: 0x8028c838
Ghidra address:
BRD3D: 0x106c6654
Ghidra address:
BRGlide: 0x106ed6e4

◆ g_dwClipRatioIndex

s32 g_dwClipRatioIndex
extern

The display list of g_aClipRatioDisplayLists a frame starts with.

Ghidra address:
USA: 0x8028a8a4
Ghidra address:
Asia: 0x8028A3F4
Ghidra address:
EUR: 0x8028caa8
Ghidra address:
JPN: 0x8028c578
Ghidra address:
BRD3D: 0x106c65fc
Ghidra address:
BRGlide: 0x106ed68c

◆ g_bGbiClipping

s32 g_bGbiClipping
extern

Whether the microcode clips the triangles.

Ghidra address:
USA: 0x8028aa50
Ghidra address:
Asia: 0x8028A5A0
Ghidra address:
EUR: 0x8028cc58
Ghidra address:
JPN: 0x8028c728
Ghidra address:
BRD3D: 0x100aa884
Ghidra address:
BRGlide: 0x100aa014

◆ g_dwDisplayBlanked

u32 g_dwDisplayBlanked
extern

Whether BlankDisplay() blanked the screen and UnblankDisplay() has not yet shown it.

Ghidra address:
EUR: 0x8028ce14
Ghidra address:
JPN: 0x8028c844