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

Background music of a song, played alone or along with a catch track. More...

#include <backmusic.h>

Public Member Functions

 BackMusic (const char *pszName, int nIntroBars, int nNumBars, int nTicksPerBar)
 Construct music with no muse for any bar.
 ~BackMusic ()
 Stop the music and release it.
const char * GetName () const
 Report the name of the track.
void SetBar (int nBar, Muse *pMuse)
 Set the muse of a bar.
void Start (PlayMap *pPlayMap)
 Start the music by itself, unless it plays.
void Stop ()
 Stop the music, if it plays.

Static Public Member Functions

static void * operator new (size_t nSize)
 Allocate music, billed to the class name.
static void operator delete (void *pBlock)
 Release music.

Detailed Description

Background music of a song, played alone or along with a catch track.

The class is not polymorphic. The RTTI records the command it schedules, and the allocation tag includes the class name. The music is one muse for each bar of the song, intro bars included, and each bar the song plays starts the muse of the bar it maps to.

Constructor & Destructor Documentation

◆ BackMusic()

BackMusic::BackMusic ( const char * pszName,
int nIntroBars,
int nNumBars,
int nTicksPerBar )

Construct music with no muse for any bar.

Parameters
pszNameThe name of the track.
nIntroBarsThe bars before bar 0.
nNumBarsThe length of the song in bars.
nTicksPerBarThe song ticks in one bar.
Ghidra address:
NTSC-U/C: 0x00149548
Ghidra address:
PAL: 0x0014af08

◆ ~BackMusic()

BackMusic::~BackMusic ( )

Stop the music and release it.

Ghidra address:
NTSC-U/C: 0x00149680
Ghidra address:
PAL: 0x0014b040

Member Function Documentation

◆ operator new()

void * BackMusic::operator new ( size_t nSize)
inlinestatic

Allocate music, billed to the class name.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void BackMusic::operator delete ( void * pBlock)
inlinestatic

Release music.

Parameters
pBlockThe block.

◆ GetName()

const char * BackMusic::GetName ( ) const

Report the name of the track.

Returns
The name.
Ghidra address:
NTSC-U/C: 0x00149750
Ghidra address:
PAL: 0x0014b110

◆ SetBar()

void BackMusic::SetBar ( int nBar,
Muse * pMuse )

Set the muse of a bar.

Parameters
nBarThe bar, negative for an intro bar.
pMuseThe muse.
Ghidra address:
NTSC-U/C: 0x00149758
Ghidra address:
PAL: 0x0014b118

◆ Start()

void BackMusic::Start ( PlayMap * pPlayMap)

Start the music by itself, unless it plays.

Parameters
pPlayMapThe map of the song positions.
Ghidra address:
NTSC-U/C: 0x001497b0
Ghidra address:
PAL: 0x0014b170

◆ Stop()

void BackMusic::Stop ( )

Stop the music, if it plays.

Ghidra address:
NTSC-U/C: 0x001497d8
Ghidra address:
PAL: 0x0014b198

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