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

The main thread of the game, the weather of a race, and the player slots. More...

#include "common/types.h"
Include dependency graph for game.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  GAME_MODE_CHAMPIONSHIP , GAME_MODE_ARCADE , GAME_MODE_TIME_ATTACK , GAME_MODE_PRACTICE ,
  GAME_MODE_DEMO , GAME_MODE_AFTER_SEASON = 5
}
 The modes of play, in the order of the main menu. More...
enum  { RACE_SESSION_ATTRACT , RACE_SESSION_CREDIT_CAPTIONS , RACE_SESSION_SCROLLING_CREDITS }
 The races the computer drives in GAME_MODE_DEMO. More...

Functions

void ApplyWeather (u32 weather)
 Set weather flags and, on N64, patch display lists to match.
void MainMenuEntry (void)
 The screen routine of the main menu.
void StartRaceWithPlayerCount (u32 players)
 Set the number of local players and select the initial race callback.
void ResetAllPlayers (void)
 Reset the vehicle and the input of every player.
void InitGameAndShowMenus (void)
 The entry of the main thread.
void StartAttractDemo (void)
 Start the race the computer drives after the splash screens.
void StartCreditsRace (void)
 Start the race the computer drives under the credits, which the options menu offers: the scrolling credits in two-player mode and the captions otherwise.
void StartEndingCredits (void)
 Start the race under the scrolling credits, after the last season of the championship.

Variables

u32 g_dwNumLocalPlayers
 Number of local players.
s32 g_nNumLocalPlayersSigned
 Signed view of the local-player count used by N64 menus.
s32 g_dwGameMode
 The mode of play the main menu chose.
s32 g_dwRaceSessionType
 The race the computer drives, by the RACE_SESSION_ values.
int g_bNetSpectator
 Whether the local network player spectates without a car.

Detailed Description

The main thread of the game, the weather of a race, and the player slots.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The modes of play, in the order of the main menu.

Enumerator
GAME_MODE_CHAMPIONSHIP 

The seasons of the championship.

GAME_MODE_ARCADE 

A race of two vehicles with checkpoints that add time.

GAME_MODE_TIME_ATTACK 

Laps against the clock and a ghost car.

GAME_MODE_PRACTICE 

Free driving on a track, counting no laps.

GAME_MODE_DEMO 

The race the computer drives after the splash screens.

GAME_MODE_AFTER_SEASON 

The race that follows the results of a finished season.

◆ anonymous enum

anonymous enum

The races the computer drives in GAME_MODE_DEMO.

Enumerator
RACE_SESSION_ATTRACT 

The race after the splash screens.

RACE_SESSION_CREDIT_CAPTIONS 

The race under the captions of the credits, from the options menu.

RACE_SESSION_SCROLLING_CREDITS 

The race under the scrolling credits, after the championship or from the options menu.

Function Documentation

◆ ApplyWeather()

void ApplyWeather ( u32 weather)

Set weather flags and, on N64, patch display lists to match.

Parameters
weatherThe weather, a WEATHER_* value.
Ghidra address:
USA: 0x80200050
Ghidra address:
Asia: 0x80200050
Ghidra address:
EUR: 0x80200050
Ghidra address:
JPN: 0x80200050
Ghidra address:
BRD3D: 0x10069740
Ghidra address:
BRGlide: 0x100627b0

◆ MainMenuEntry()

void MainMenuEntry ( void )

The screen routine of the main menu.

Ghidra address:
USA: 0x80200108
Ghidra address:
Asia: 0x80200108
Ghidra address:
EUR: 0x80200108
Ghidra address:
JPN: 0x80200108

◆ StartRaceWithPlayerCount()

void StartRaceWithPlayerCount ( u32 players)

Set the number of local players and select the initial race callback.

Parameters
playersThe number of local players.
Ghidra address:
USA: 0x80200128
Ghidra address:
Asia: 0x80200128
Ghidra address:
EUR: 0x80200128
Ghidra address:
JPN: 0x80200128
Ghidra address:
BRD3D: 0x100697e0
Ghidra address:
BRGlide: 0x10062850

◆ ResetAllPlayers()

void ResetAllPlayers ( void )

Reset the vehicle and the input of every player.

Ghidra address:
USA: 0x80200154
Ghidra address:
Asia: 0x80200154
Ghidra address:
EUR: 0x80200154
Ghidra address:
JPN: 0x80200154
Ghidra address:
BRD3D: 0x10069800
Ghidra address:
BRGlide: 0x10062870

◆ InitGameAndShowMenus()

void InitGameAndShowMenus ( void )

The entry of the main thread.

Set up the system, run the opening menus, start the music, and enter the main loop. The routine takes no parameter, and the argument of the thread is ignored.

Ghidra address:
USA: 0x802001b4
Ghidra address:
Asia: 0x802001B4
Ghidra address:
EUR: 0x802001b4
Ghidra address:
JPN: 0x802001b4
Ghidra address:
BRD3D: 0x10069840
Ghidra address:
BRGlide: 0x100628b0

◆ StartAttractDemo()

void StartAttractDemo ( void )

Start the race the computer drives after the splash screens.

Ghidra address:
USA: 0x802005fc
Ghidra address:
Asia: 0x802005FC
Ghidra address:
EUR: 0x8020062c
Ghidra address:
JPN: 0x802005ec

◆ StartCreditsRace()

void StartCreditsRace ( void )

Start the race the computer drives under the credits, which the options menu offers: the scrolling credits in two-player mode and the captions otherwise.

Ghidra address:
USA: 0x80200634
Ghidra address:
Asia: 0x80200634
Ghidra address:
EUR: 0x80200664
Ghidra address:
JPN: 0x80200624

◆ StartEndingCredits()

void StartEndingCredits ( void )

Start the race under the scrolling credits, after the last season of the championship.

Ghidra address:
USA: 0x8020068c
Ghidra address:
Asia: 0x8020068C
Ghidra address:
EUR: 0x802006bc
Ghidra address:
JPN: 0x8020067c
Ghidra address:
BRD3D: 0x1002c390
Ghidra address:
BRGlide: 0x10019900

Variable Documentation

◆ g_dwNumLocalPlayers

u32 g_dwNumLocalPlayers
extern

Number of local players.

Ghidra address:
USA: 0x8026ff08
Ghidra address:
Asia: 0x8026FA58
Ghidra address:
EUR: 0x80271ed8
Ghidra address:
JPN: 0x80271988
Ghidra address:
BRD3D: 0x100b4050
Ghidra address:
BRGlide: 0x100b3858

◆ g_nNumLocalPlayersSigned

s32 g_nNumLocalPlayersSigned
extern

Signed view of the local-player count used by N64 menus.

Ghidra address:
USA: 0x8026ff08
Ghidra address:
Asia: 0x8026FA58
Ghidra address:
EUR: 0x80271ed8
Ghidra address:
JPN: 0x80271988

◆ g_dwGameMode

s32 g_dwGameMode
extern

The mode of play the main menu chose.

Ghidra address:
USA: 0x8026ff18
Ghidra address:
Asia: 0x8026FA68
Ghidra address:
EUR: 0x80271ee8
Ghidra address:
JPN: 0x80271998
Ghidra address:
BRD3D: 0x100aa010
Ghidra address:
BRGlide: 0x100a9360

◆ g_dwRaceSessionType

s32 g_dwRaceSessionType
extern

The race the computer drives, by the RACE_SESSION_ values.

Ghidra address:
USA: 0x8026ff1c
Ghidra address:
Asia: 0x8026FA6C
Ghidra address:
EUR: 0x80271eec
Ghidra address:
JPN: 0x8027199c
Ghidra address:
BRD3D: 0x106805b8
Ghidra address:
BRGlide: 0x105bc760

◆ g_bNetSpectator

int g_bNetSpectator
extern

Whether the local network player spectates without a car.

Ghidra address:
BRD3D: 0x1022af1c
Ghidra address:
BRGlide: 0x10226a4c