1#ifndef COASTLINE_TRACKRENDER_H
2#define COASTLINE_TRACKRENDER_H
54#define VISIBLE_CELLS 192
169extern s32 g_nTrackTransparentStartIdxNear;
181extern s32 g_nTrackTransparentStartIdxFar;
#define MAX_VEHICLES
The capacity of the race engine's vehicle array.
Definition bossrallyvehicle.h:23
The graphics binary interface types the gu routines fill in for the RSP microcode.
An ambient light and one directional light.
Definition gbi.h:445
The two directions the RSP uses to generate texture coordinates for reflection mapping.
Definition gbi.h:39
The saved settings and progress of a player.
Definition profile.h:23
A racer of a race.
Definition racerslot.h:28
A point or direction in space.
Definition vecmath.h:17
A vehicle.
Definition vehicle.h:143
The rectangle of the screen a view fills.
Definition render.h:134
A cell of the grid of the track in view, and its squared distance from the camera in cells.
Definition trackrender.h:47
s16 distance
Definition trackrender.h:50
u8 row
Definition trackrender.h:49
u8 column
Definition trackrender.h:48
Lights1 g_aTrackLights[4]
The lights of the track, one of four in turn each frame.
Vec3f g_vShadowForward
The forward of the vehicle whose shadow is being cast, on the ground.
s32 g_bVisibleCellListOverflow
Whether the cells in view were more than VISIBLE_CELLS.
u32 g_dwTrackOtherModeLFlags
The render-mode flags applied with g_dwTrackOtherModeLBlend.
s32 g_nVisibleCellIdxMid
Where the middle-distance model group starts, or -1.
void BuildVisibleInstanceList(void)
List the placed models of the cells in view, the nearest cells first, mark the models the nearest veh...
u32 g_dwTrackOtherModeLBlend
The blender and the other bits of the render mode of the track.
s32 g_nVisibleInstanceCount
The placed models in view this frame.
LookAt * g_pTrackLookAt
The look-at of the reflections of the track.
s32 g_nVisibleCellIdxFar
Where the models of cells within three cells of the far plane start, or -1.
u8 g_abInstanceVisibilityMask[]
For each placed model: 0xFF until it is listed in view, then 0 with a bit for each vehicle near enoug...
s32 g_anNearbyVehicleIdx[MAX_VEHICLES]
The indices of the vehicles near enough to cast shadows on placed models.
s32 g_bShadowCullDisabled
Whether shadows include triangles outside their texture and extend beyond their vehicle's screen rect...
void RenderTrackInstance(s32 index, s32 vehicles, s32 deferred)
Draw a placed model, and on it the shadow of each vehicle in a mask, by its vertices taken to the tex...
Vec3f g_vTrackLightDirection
The direction of the light of the track.
void RenderTrackGeometry(s32 deferred)
Draw the placed models in view: in the first pass the opaque ones, leaving the translucent ones,...
VisibleCell g_aVisibleCellTuples[VISIBLE_CELLS+1]
The cells in view, the nearest first, ending with a column of 0xFF.
f32 g_fViewMatrixMaxAbs
The largest absolute value of the first three rows of g_afViewProjMatrix.
PlayerProfile * g_pActiveProfile
The profile used for the active season when selecting track instances.
s32 CompareVisibleCellDistance(const void *a, const void *b)
Order two cells in view by their distance from the camera.
const f32 g_fShadowWidthScale
Scale of the vehicle shadow across its width.
f32 g_afNearbyVehicleDot[MAX_VEHICLES]
How far ahead of the camera each one is.
#define VISIBLE_CELLS
The most cells in view, past which the farthest are left out.
Definition trackrender.h:54
const f32 g_fShadowLengthScale
Scale of the vehicle shadow along its length.
u32 g_dwInstanceHideFlags
The TRACK_INSTANCE_ flags of the placed models not drawn.
u16 g_wActiveInstanceHideMask
The groups of placed models hidden from the camera.
s32 g_nVisibleCellIdxNear
Where in the list of the models the cells start that are at least 3 cells from the camera,...
void ProjectWorldToScreenRect(const Vec3f *point, s32 size, s16 low[2], s16 high[2])
Take a point and a size around it to the corners of the rectangle of the screen they cover in the vie...
s32 g_nNearbyVehicleCount
The vehicles nearest the camera that cast shadows, nearest first.
s32 g_nDeferredInstanceLastIdx
The last translucent model left for the second pass, or -1.
Vec3f g_vVehicleVisibilityDelta
From the camera to a vehicle.
s32 g_nTrackTransparentStartIdx
Where the translucent models past g_nVisibleCellIdxMid start in the second pass, which draws them wit...
s32 g_nTrackLightBufferIndex
The index of the light buffer used to draw the track this frame.
s32 g_bDebugHideInstance
Whether g_nDebugHiddenInstanceIndex is left undrawn.
Integer and floating-point types of libultra.
unsigned int u32
Definition ultratypes.h:20
short s16
Definition ultratypes.h:24
float f32
Definition ultratypes.h:38
unsigned short u16
Definition ultratypes.h:19
int s32
Definition ultratypes.h:25
unsigned char u8
Definition ultratypes.h:18
The vector and matrix arithmetic of the game, its arctangent and power, the triangle and segment test...
The vehicles of a race, the cars they are, and their place on the track.