|
coastline 0.0.4
|
The screen of a race: its phases, its views, the pause menu, the results it keeps for the results screen, and the credits the attract races show. More...
#include <PR/ultratypes.h>#include "common/laps.h"#include "common/model.h"#include "common/pause.h"#include "common/render.h"#include "common/vecmath.h"

Go to the source code of this file.
Classes | |
| struct | RacePhaseStep |
| A phase of a race and how long it lasts. More... | |
| struct | RaceCaption |
| A caption the credits show over a race. More... | |
| struct | CreditLine |
| A line of the credits that scroll up at the end of the championship. More... | |
Macros | |
| #define | RACE_PHASES 8 |
| The phases of g_aRacePhaseTable. | |
| #define | START_LIGHT_STEPS 5 |
| The steps of the countdown of the start lights. | |
| #define | CAPTION_LINES 5 |
| The lines of a caption of the credits. | |
| #define | SAVED_RESULTS 2 |
| The players whose results are kept for the results screen. | |
| #define | g_pFirstCreditLineText (g_aCreditScrollLines[0].text) |
| The first scrolling credit line's text pointer. | |
Enumerations | |
| enum | { RACE_PHASE_HOLD , RACE_PHASE_WAIT , RACE_PHASE_COUNTDOWN , RACE_PHASE_GO , RACE_PHASE_RACING , RACE_PHASE_FINISHED , RACE_PHASE_AFTER , RACE_PHASE_LEAVE } |
| The phases of a race, which g_aRacePhaseTable times. More... | |
Functions | |
| void | LoadAndPlayTrackBgm (void) |
| Decompress the music of the selected track and start it. | |
| void | AnimateStartLights (void) |
| Advance the animations of the start lights, holding them in place while they hold their first pose. | |
| void | UpdateRaceAnimations (void) |
| Move the animations of the race between frames, while the race is not paused. | |
| void | RenderStartLights (void) |
| Draw the start lights over the start of the track. | |
| void | CalculateScrollPositions (void) |
| Place the lines of the scrolling credits below the screen. | |
| void | ScrollTextUp (void) |
| Move the scrolling credits up a pixel. | |
| void | DrawScrollingText (void) |
| Draw the lines of the scrolling credits that are on the screen. | |
| void | ProcessRacingScreen (void) |
| Process the racing screen. | |
| void | SaveRaceResultsToSlots (void) |
| Keep the results of the local players for the results screen. | |
| void | RestoreRaceResultsFromSlots (void) |
| Give the kept results back to the vehicles, scoring them in the championship first. | |
| void | SetTrackFromSeason (void) |
| Choose the track of the next race of the championship. | |
| void | ProcessSeasonResults (void) |
| Score championship progress and unlock bonuses when the season's points qualify. | |
Variables | |
| u32 | g_adwTrackMusicRom [12] |
| The cartridge offsets of the music of each track, the mirrored ones after the others, then that of the race after a season. | |
| Model * | g_pStartLightsModel |
| The model of the start lights. | |
| s32 | g_dwStartLightsAnimation |
| How the start lights animate: 0 not at all, -1 held in their first pose, and 1 running. | |
| s32 | g_bStartLightsVisible |
| Whether the start lights are drawn. | |
| f32 | g_fStartLightsDrop |
| How far the start lights rise out of view once the race starts. | |
| s32 | g_dwAirplaneInstance |
| The placed model of the airplane, or 0 when the track has none or it landed, and the model a vehicle sends it off from on the lap g_dwAirplaneTriggerLap. | |
| s32 | g_dwAirplaneTrigger |
| The scene instance whose contact starts the aeroplane flight. | |
| s32 | g_dwAirplaneTriggerLap |
| The lap on which the aeroplane trigger starts the flight. | |
| s32 | g_bAirplaneFlying |
| Whether the airplane flies. | |
| s32 | g_dwAirplaneNode |
| The node of the path the airplane flies towards, and the nodes of the path. | |
| s32 | g_dwAirplaneNodeCount |
| The number of nodes in the aeroplane flight path. | |
| f32 | g_fAirplaneScale |
| The scale of the model of the airplane. | |
| Vec3f * | g_pAirplanePathLeft |
| The left and right edges of the path of the airplane. | |
| Vec3f * | g_pAirplanePathRight |
| The right edge of the aeroplane flight path. | |
| f32 | g_fAirplaneDistance |
| How far the airplane flew along the leg of the path to the current node, and its length. | |
| f32 | g_fAirplaneSegmentLength |
| The length of the current aeroplane flight segment. | |
| Vec3f | g_vAirplaneDirPrev |
| The directions of the legs of the path before, along and after the one the airplane flies, which it turns between. | |
| Vec3f | g_vAirplaneDir |
| The direction of the current aeroplane flight segment. | |
| Vec3f | g_vAirplaneDirNext |
| The direction of the next aeroplane flight segment. | |
| RaceCaption | g_aCreditCaptions [] |
| The captions of the credits, ending with a NULL title. | |
| CreditLine | g_aCreditScrollLines [] |
| The scrolling credits, ending with a NULL text. | |
| s32 | g_bReplayAfterRace |
| Whether leaving the race starts its instant replay. | |
| s32 | g_dwSavedResultsValid |
| Whether the results of the last race are kept. | |
| f32 | g_afStartLightThresholds [START_LIGHT_STEPS] |
| The times left in the countdown at which the start lights change, in seconds. | |
| s32 | g_dwSaveAvailable |
| Whether a time attack left something to save, so that its results open the save menu. | |
| u8 | g_abRacePositionPoints [] |
| The points of each place of a race of the championship. | |
| s32 | g_dwSeasonResultMsgLineCount |
| The number of lines in the season result message. | |
| s32 | g_dwWaterfallCount |
| The waterfalls of the track, as placed models. | |
| s32 | g_dwRaceInitialized |
| Whether the race is set up. | |
| s32 | g_dwRaceExitState |
| Whether the screen is leaving the race. | |
| RacePhaseStep | g_aRacePhaseTable [RACE_PHASES] |
| The phases of a race in their order. | |
| s32 | g_dwRaceFinishOrderCounter |
| The vehicles that finished the race so far. | |
| f32 | g_fRacePhaseTimer |
| The time left in the phase of the race, in seconds. | |
| s32 | g_dwStartLightsStep |
| The step of the countdown of the start lights. | |
| s32 | g_dwRacePhaseIndex |
| The index of the phase in g_aRacePhaseTable. | |
| s16 | g_wRaceScreenLoopExited |
| Set once the loop of the race screen ends, and cleared when a race starts. | |
| s32 | g_adwSavedResultPositions [SAVED_RESULTS] |
| The results of the local players the results screen shows: the place, the time, the best lap and its time, the laps and the time of each. | |
| f32 | g_afSavedResultTimes [SAVED_RESULTS] |
| The race time of each saved local result, in seconds. | |
| f32 | g_afSavedResultBestLapTimes [SAVED_RESULTS] |
| The best lap time of each saved local result, in seconds. | |
| f32 | g_aafSavedResultLapTimes [SAVED_RESULTS][5] |
| The time of each completed lap in each saved local result, in seconds. | |
| s32 | g_adwSavedResultBestLaps [SAVED_RESULTS] |
| The best lap number of each saved local result, counted from 0. | |
| s32 | g_adwSavedResultLaps [SAVED_RESULTS] |
| The number of completed laps in each saved local result. | |
| const char * | g_apszSeasonResultMsgLines [] |
| The lines of the message of the result of a season. | |
| char | g_szFormatBuffer [0x20] |
| The text of a line of the pause menu. | |
| s32 | g_adwWaterfallInstances [16] |
| The scene instance index of each waterfall in the loaded track. | |
| s32 | g_dwScreenClearFrames |
| The frames the screen is still cleared, after the views changed or the pause ended. | |
| f32 | g_fRaceCaptionTimer |
| The time of the caption shown and its index. | |
| s32 | g_dwRaceCaptionIndex |
| The credit caption currently shown during the attract race. | |
| s32 | g_bDemoInterrupted |
| Whether a button ended the race the computer drives, which then returns to the main menu rather than the splash screens. | |
| s32 | g_dwPrevViewportCount |
| The views of the last frame. | |
| s32 | g_dwRacePhase |
| The phase of the race, by the RACE_PHASE_ values. | |
| const char * | g_apszPlaceNames [] |
| The names of the places in a race: "1st" and on. | |
The screen of a race: its phases, its views, the pause menu, the results it keeps for the results screen, and the credits the attract races show.
| #define RACE_PHASES 8 |
The phases of g_aRacePhaseTable.
| #define START_LIGHT_STEPS 5 |
The steps of the countdown of the start lights.
| #define CAPTION_LINES 5 |
The lines of a caption of the credits.
| #define SAVED_RESULTS 2 |
The players whose results are kept for the results screen.
| #define g_pFirstCreditLineText (g_aCreditScrollLines[0].text) |
The first scrolling credit line's text pointer.
| anonymous enum |
The phases of a race, which g_aRacePhaseTable times.
| void LoadAndPlayTrackBgm | ( | void | ) |
Decompress the music of the selected track and start it.
| void AnimateStartLights | ( | void | ) |
Advance the animations of the start lights, holding them in place while they hold their first pose.
| void UpdateRaceAnimations | ( | void | ) |
Move the animations of the race between frames, while the race is not paused.
| void RenderStartLights | ( | void | ) |
Draw the start lights over the start of the track.
| void CalculateScrollPositions | ( | void | ) |
Place the lines of the scrolling credits below the screen.
| void ScrollTextUp | ( | void | ) |
Move the scrolling credits up a pixel.
| void DrawScrollingText | ( | void | ) |
Draw the lines of the scrolling credits that are on the screen.
| void ProcessRacingScreen | ( | void | ) |
Process the racing screen.
The N64 version steps the race and renders its views; the Windows version renders a captured frame, its HUD, and its pause or credits overlays.
| void SaveRaceResultsToSlots | ( | void | ) |
Keep the results of the local players for the results screen.
| void RestoreRaceResultsFromSlots | ( | void | ) |
Give the kept results back to the vehicles, scoring them in the championship first.
| void SetTrackFromSeason | ( | void | ) |
Choose the track of the next race of the championship.
| void ProcessSeasonResults | ( | void | ) |
Score championship progress and unlock bonuses when the season's points qualify.
|
extern |
The cartridge offsets of the music of each track, the mirrored ones after the others, then that of the race after a season.
|
extern |
The model of the start lights.
|
extern |
How the start lights animate: 0 not at all, -1 held in their first pose, and 1 running.
|
extern |
Whether the start lights are drawn.
|
extern |
How far the start lights rise out of view once the race starts.
|
extern |
The placed model of the airplane, or 0 when the track has none or it landed, and the model a vehicle sends it off from on the lap g_dwAirplaneTriggerLap.
|
extern |
The scene instance whose contact starts the aeroplane flight.
|
extern |
The lap on which the aeroplane trigger starts the flight.
|
extern |
Whether the airplane flies.
|
extern |
The node of the path the airplane flies towards, and the nodes of the path.
|
extern |
The number of nodes in the aeroplane flight path.
|
extern |
The scale of the model of the airplane.
|
extern |
The left and right edges of the path of the airplane.
|
extern |
The right edge of the aeroplane flight path.
|
extern |
How far the airplane flew along the leg of the path to the current node, and its length.
|
extern |
The length of the current aeroplane flight segment.
|
extern |
The directions of the legs of the path before, along and after the one the airplane flies, which it turns between.
|
extern |
The direction of the current aeroplane flight segment.
|
extern |
The direction of the next aeroplane flight segment.
|
extern |
The captions of the credits, ending with a NULL title.
|
extern |
The scrolling credits, ending with a NULL text.
|
extern |
Whether leaving the race starts its instant replay.
|
extern |
Whether the results of the last race are kept.
|
extern |
The times left in the countdown at which the start lights change, in seconds.
|
extern |
Whether a time attack left something to save, so that its results open the save menu.
|
extern |
The points of each place of a race of the championship.
|
extern |
The number of lines in the season result message.
|
extern |
The waterfalls of the track, as placed models.
|
extern |
Whether the race is set up.
|
extern |
Whether the screen is leaving the race.
|
extern |
The phases of a race in their order.
|
extern |
The vehicles that finished the race so far.
|
extern |
The time left in the phase of the race, in seconds.
|
extern |
The step of the countdown of the start lights.
|
extern |
The index of the phase in g_aRacePhaseTable.
|
extern |
Set once the loop of the race screen ends, and cleared when a race starts.
|
extern |
The results of the local players the results screen shows: the place, the time, the best lap and its time, the laps and the time of each.
|
extern |
The race time of each saved local result, in seconds.
|
extern |
The best lap time of each saved local result, in seconds.
|
extern |
The time of each completed lap in each saved local result, in seconds.
|
extern |
The best lap number of each saved local result, counted from 0.
|
extern |
The number of completed laps in each saved local result.
|
extern |
The lines of the message of the result of a season.
|
extern |
The text of a line of the pause menu.
|
extern |
The scene instance index of each waterfall in the loaded track.
|
extern |
The frames the screen is still cleared, after the views changed or the pause ended.
|
extern |
The time of the caption shown and its index.
|
extern |
The credit caption currently shown during the attract race.
|
extern |
Whether a button ended the race the computer drives, which then returns to the main menu rather than the splash screens.
|
extern |
The views of the last frame.
|
extern |
The phase of the race, by the RACE_PHASE_ values.
|
extern |
The names of the places in a race: "1st" and on.