|
coastline 0.0.4
|
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"

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. | |
The state the renderer shares between the parts of a frame.
| #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 |
4-bit texels with a palette of 16 colors.
| #define TEXTURE_FORMAT_I8 4 |
8-bit intensity texels.
| #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.
The display lists of the last frames may still use them.
| #define BLANK_SCREEN | ( | ) |
| 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.
| m | The matrix. |
| void DrawTexturedTile | ( | s32 | index, |
| ModelTexture * | textures ) |
Load a texture of a model into the texture memory and set up the tiles to draw it.
| index | The index of the texture. |
| textures | The textures of the model. |
How thick the fog is at a point of the world, in the view being drawn.
| point | The point. |
The largest absolute value of the first three rows of a matrix.
| m | The 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.
The European release first sets the video mode of the resolution in use from the tables of libultra, unless the screen is already blank.
| 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.
| 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.
N64 copies texels and palettes from cartridge; Windows aliases uploaded texture entries.
|
extern |
The projection of the current view.
|
extern |
A matrix the renderer builds before converting it.
|
extern |
The perspective of the current view.
|
extern |
A matrix the renderer fills as an operand.
|
extern |
The texture filter of the other modes.
|
extern |
Whether the track is drawn mirrored.
|
extern |
Whether the current view is mirrored.
|
extern |
The camera of the view being drawn.
|
extern |
The field of view of the cameras, in radians.
|
extern |
The distance the far planes of the cameras are taken from; the stages of the menus see a fifth of it.
|
extern |
The views on the screen, one for each player.
|
extern |
The rectangles of the views.
|
extern |
The view being drawn.
|
extern |
The depth scale of the viewport SetViewport() last set.
|
extern |
The depth offset of the viewport SetViewport() last set.
|
extern |
The view and projection of the view being drawn.
|
extern |
The normalisation of the perspective of the projection.
|
extern |
The distance of the far plane of the cameras.
|
extern |
The angle SetupFrustumCorners() was last given.
|
extern |
The view of the current view, before its perspective.
|
extern |
The identity matrix used for display-list transforms.
|
extern |
The vertices, triangles, and polygons drawn this frame.
|
extern |
The triangles submitted during the current frame.
|
extern |
The polygons submitted during the current frame.
|
extern |
Whether the level of detail of the textures of the track is on.
|
extern |
Whether the track is drawn with smooth shading.
|
extern |
The colour of the light of the sun and of the ambient light.
|
extern |
The packed colour of the ambient light.
|
extern |
The lights the vehicles and the track start from.
|
extern |
The direction of the light of the sun.
|
extern |
The colours of the light of the placed models lit by their light ramp, by its index.
|
extern |
Whether each vehicle is in the view being drawn.
|
extern |
The display lists that set each clipping ratio, from 1.
|
extern |
The colour of the light of the sun, in parts.
|
extern |
The green channel of the directional light.
|
extern |
The blue channel of the directional light.
|
extern |
The colour of the ambient light, in parts.
|
extern |
The green channel of the ambient light.
|
extern |
The blue channel of the ambient light.
|
extern |
The least detailed level the vehicles are drawn at, from 0.
|
extern |
Whether the car of the camera is drawn from its cockpit and mirror cameras too.
|
extern |
The triangles of the vehicles drawn this frame.
|
extern |
The address in the texture memory DrawTexturedTile() loads to.
|
extern |
The tile DrawTexturedTile() sets up to draw with.
|
extern |
The depths the fog starts and ends at, from 0 at the near plane to 1000 at the far.
|
extern |
The fog end depth, from 0 at the near plane to 1000 at the far plane.
|
extern |
The offset and the scale that turn the depth of a point into its fog, from 0 to 255, as the microcode does.
|
extern |
The scale that maps depth to a fog value from 0 to 255.
|
extern |
The light ramps of the placed models, in parts, by the index of the ramp.
|
extern |
The green channel of each placed-model light-ramp colour.
|
extern |
The blue channel of each placed-model light-ramp colour.
|
extern |
The viewport set last.
|
extern |
The display list of g_aClipRatioDisplayLists a frame starts with.
|
extern |
Whether the microcode clips the triangles.
|
extern |
Whether BlankDisplay() blanked the screen and UnblankDisplay() has not yet shown it.