wavelength 1.0.0
Loading...
Searching...
No Matches
Lyric Class Reference

Lyrics of a song loop, each shown when the song reaches its tick. More...

#include <lyric.h>

Classes

class  LyricData
 One lyric and the tick it is shown at. More...

Public Member Functions

 Lyric (int nTicksPerBar, int nLoopBars)
 Construct an empty lyric track and register the lyric script command.
 ~Lyric ()
 Stop showing lyrics and unregister the lyric script command.
void AddLyric (int nTick, const char *pszText)
 Add a lyric.
void Start ()
 Clear the lyric and schedule the first one.
void Stop ()
 Withdraw the scheduled lyric.
void Advance ()
 Show the current lyric and schedule the next one.

Static Public Member Functions

static void ToggleShowing (DataArray *pCommand, void *pUserData)
 Toggle whether lyrics show on the display, the lyric script command.

Detailed Description

Lyrics of a song loop, each shown when the song reaches its tick.

The RTTI includes the class name. The lyrics repeat every loop of mLoopBars bars. Each lyric is handed to TheTriggerMgr, and also shown on the first lyric line of TheGfxManager while the lyric cheat shows lyrics. A lyric before the first tick of the loop is shown only on the first pass.

Constructor & Destructor Documentation

◆ Lyric()

Lyric::Lyric ( int nTicksPerBar,
int nLoopBars )

Construct an empty lyric track and register the lyric script command.

Parameters
nTicksPerBarThe song ticks in one bar.
nLoopBarsThe bars in one loop.
Ghidra address:
NTSC-U/C: 0x00122a50
Ghidra address:
PAL: 0x001241d0

◆ ~Lyric()

Lyric::~Lyric ( )

Stop showing lyrics and unregister the lyric script command.

Ghidra address:
NTSC-U/C: 0x00122b40
Ghidra address:
PAL: 0x001242c0

Member Function Documentation

◆ AddLyric()

void Lyric::AddLyric ( int nTick,
const char * pszText )

Add a lyric.

A lyric whose tick falls at or past the end of the loop is ignored, and so is a second lyric at a tick already used.

Parameters
nTickThe tick within the loop.
pszTextThe text.
Ghidra address:
NTSC-U/C: 0x00122be8
Ghidra address:
PAL: 0x00124368

◆ Start()

void Lyric::Start ( )

Clear the lyric and schedule the first one.

Ghidra address:
NTSC-U/C: 0x00122c68
Ghidra address:
PAL: 0x001243e8

◆ Stop()

void Lyric::Stop ( )

Withdraw the scheduled lyric.

Ghidra address:
NTSC-U/C: 0x00122ce8
Ghidra address:
PAL: 0x00124468

◆ Advance()

void Lyric::Advance ( )

Show the current lyric and schedule the next one.

After the last lyric of the loop the first lyric at or past the loop's first tick is scheduled in the next loop.

Ghidra address:
NTSC-U/C: 0x00122d20
Ghidra address:
PAL: 0x001244a0

◆ ToggleShowing()

void Lyric::ToggleShowing ( DataArray * pCommand,
void * pUserData )
static

Toggle whether lyrics show on the display, the lyric script command.

Parameters
pCommandThe command.
pUserDataThe Lyric that registered the command.
Ghidra address:
NTSC-U/C: 0x00122e40
Ghidra address:
PAL: 0x001245c0

The documentation for this class was generated from the following file: