wavelength 1.0.0
Loading...
Searching...
No Matches
metagameutil.h File Reference
#include "game/avatarpartset.h"
#include "game/remixinfo.h"
#include "game/songentry.h"
#include "os/string.h"
#include "rnd/rndfont.h"
#include "rnd/rndmat.h"
#include "rnd/rndmesh.h"
Include dependency graph for metagameutil.h:

Go to the source code of this file.

Functions

void FindWinnerMaterial ()
 Find the freq_winner.mat material the result screens draw the winner's character with, and keep it for them.
RndFont * FindColorFont (const char *pszFace, const char *pszColor)
 Find the font of a face in a player colour, <face>_1_<colour>.font.
RndFont * FindLucidaFont (const char *pszColor)
 Find the lucida font in a player colour.
RndMat * FindColorMaterial (const char *pszColor)
 Find the material of a player colour, fcolor_<n>.mat.
const char * GetPlayerColorName (int nPlayer)
 Report the colour of a player.
const char * GetConnectionTypeName (int nType)
 Report the localised name of a kind of network connection.
const char * GetConnectionTypeAbbrev (int nType)
 Report the localised abbreviation of a kind of network connection.
const char * GetDuelDifficultyAbbrev (int nDifficulty)
 Report the localised abbreviation of a duel difficulty.
RndMat * FindRankMaterial (int nRank)
 Find the material of a rank, from rank_01.mat for rank -1 to rank_05.mat for rank 3.
RndMat * FindGradeMaterial (int nGrade, bool bEnd)
 Find the material of a grade, grade_0<grade>.mat, or grade_end_0<grade>.mat for the end of a song.
void DrawAvatarOnMesh (AvatarPartSet *pAvatar, RndMesh *pMesh)
 Render an avatar into the part of the screen a mesh covers, and draw the mesh with the winner's material while the avatar plays a win animation.
bool TrimSpaces (String *pText)
 Remove the spaces at the start and at the end of a string.
const char * FormatGenreTempo (const SongEntry &song, const RemixInfo *pInfo)
 Format the genre of a song and the tempo of a remix with the token GENRE_BPM.

Variables

RndMat * g_pWinnerMat
 The freq_winner.mat material FindWinnerMaterial() keeps for the result screens.

Function Documentation

◆ FindWinnerMaterial()

void FindWinnerMaterial ( )

Find the freq_winner.mat material the result screens draw the winner's character with, and keep it for them.

The routine belongs to a unit of front end helpers that keeps its objects in file-level state. The name is inferred.

Ghidra address:
NTSC-U/C: 0x001993e0
Ghidra address:
PAL: 0x001a0900

◆ FindColorFont()

RndFont * FindColorFont ( const char * pszFace,
const char * pszColor )

Find the font of a face in a player colour, <face>_1_<colour>.font.

purple uses the pink font, and a colour other than red, green, purple, or yellow uses the white font. The name is inferred.

Parameters
pszFaceThe face, such as lucida.
pszColorThe colour, as GetPlayerColorName() reports it.
Returns
The font, or null.
Ghidra address:
NTSC-U/C: 0x00199450
Ghidra address:
PAL: 0x001a0970

◆ FindLucidaFont()

RndFont * FindLucidaFont ( const char * pszColor)

Find the lucida font in a player colour.

Parameters
pszColorThe colour, as GetPlayerColorName() reports it.
Returns
The font, or null.
Ghidra address:
NTSC-U/C: 0x001995a0
Ghidra address:
PAL: 0x001a0ac0

◆ FindColorMaterial()

RndMat * FindColorMaterial ( const char * pszColor)

Find the material of a player colour, fcolor_<n>.mat.

A colour other than red, green, purple, or yellow uses the material of green. The name is inferred.

Parameters
pszColorThe colour, as GetPlayerColorName() reports it.
Returns
The material, or null.
Ghidra address:
NTSC-U/C: 0x001995c8
Ghidra address:
PAL: 0x001a0ae8

◆ GetPlayerColorName()

const char * GetPlayerColorName ( int nPlayer)

Report the colour of a player.

Parameters
nPlayerThe player, from 0 to 3, or -1 for no player.
Returns
green, purple, red, or yellow, or white for no player.
Ghidra address:
NTSC-U/C: 0x001996f0
Ghidra address:
PAL: 0x001a0c10

◆ GetConnectionTypeName()

const char * GetConnectionTypeName ( int nType)

Report the localised name of a kind of network connection.

Parameters
nTypeThe kind, 1 for a modem, 2 for broadband, and 3 for offline.
Returns
The name, or the name of no connection for another kind.
Ghidra address:
NTSC-U/C: 0x00199758
Ghidra address:
PAL: 0x001a0c78

◆ GetConnectionTypeAbbrev()

const char * GetConnectionTypeAbbrev ( int nType)

Report the localised abbreviation of a kind of network connection.

Parameters
nTypeThe kind, as GetConnectionTypeName() takes it.
Returns
The abbreviation.
Ghidra address:
NTSC-U/C: 0x001997e8

◆ GetDuelDifficultyAbbrev()

const char * GetDuelDifficultyAbbrev ( int nDifficulty)

Report the localised abbreviation of a duel difficulty.

Parameters
nDifficultyThe difficulty, 1 for easy, 2 for medium, and 3 for hard.
Returns
The abbreviation, or an empty string for another difficulty.
Ghidra address:
NTSC-U/C: 0x00199878
Ghidra address:
PAL: 0x001a0d08

◆ FindRankMaterial()

RndMat * FindRankMaterial ( int nRank)

Find the material of a rank, from rank_01.mat for rank -1 to rank_05.mat for rank 3.

A rank outside that range uses rank_01.mat. The name is inferred.

Parameters
nRankThe rank.
Returns
The material, or null.
Ghidra address:
NTSC-U/C: 0x00199910
Ghidra address:
PAL: 0x001a0e50

◆ FindGradeMaterial()

RndMat * FindGradeMaterial ( int nGrade,
bool bEnd )

Find the material of a grade, grade_0<grade>.mat, or grade_end_0<grade>.mat for the end of a song.

The routine reads no object. The name is inferred.

Parameters
nGradeThe grade.
bEndWhether the material of the end of a song is found.
Returns
The material, or null.
Ghidra address:
NTSC-U/C: 0x00199a08
Ghidra address:
PAL: 0x001a0f48

◆ DrawAvatarOnMesh()

void DrawAvatarOnMesh ( AvatarPartSet * pAvatar,
RndMesh * pMesh )

Render an avatar into the part of the screen a mesh covers, and draw the mesh with the winner's material while the avatar plays a win animation.

The routine belongs to the unit of front end helpers. The name is inferred.

Parameters
pAvatarThe avatar.
pMeshThe mesh whose bounding box sets the part of the screen.
Ghidra address:
NTSC-U/C: 0x00199ab8
Ghidra address:
PAL: 0x001a0ff8

◆ TrimSpaces()

bool TrimSpaces ( String * pText)

Remove the spaces at the start and at the end of a string.

The routine belongs to the unit of front end helpers. The name is inferred.

Parameters
pTextThe string.
Returns
True when spaces were removed.
Ghidra address:
NTSC-U/C: 0x00199cb0
Ghidra address:
PAL: 0x001a11f0

◆ FormatGenreTempo()

const char * FormatGenreTempo ( const SongEntry & song,
const RemixInfo * pInfo )

Format the genre of a song and the tempo of a remix with the token GENRE_BPM.

The name is inferred.

Parameters
songThe song.
pInfoThe remix.
Returns
The text, in the shared FormatString() buffer.
Ghidra address:
NTSC-U/C: 0x00199d90
Ghidra address:
PAL: 0x001a12d0

Variable Documentation

◆ g_pWinnerMat

RndMat* g_pWinnerMat
extern

The freq_winner.mat material FindWinnerMaterial() keeps for the result screens.

Ghidra address:
NTSC-U/C: 0x003af8b4
Ghidra address:
PAL: 0x0042e748