|
wavelength 1.0.0
|
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. | |
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.
| BackMusic::BackMusic | ( | const char * | pszName, |
| int | nIntroBars, | ||
| int | nNumBars, | ||
| int | nTicksPerBar ) |
Construct music with no muse for any bar.
| pszName | The name of the track. |
| nIntroBars | The bars before bar 0. |
| nNumBars | The length of the song in bars. |
| nTicksPerBar | The song ticks in one bar. |
| BackMusic::~BackMusic | ( | ) |
Stop the music and release it.
|
inlinestatic |
Allocate music, billed to the class name.
| nSize | The object size the compiler supplies. |
|
inlinestatic |
Release music.
| pBlock | The block. |
| const char * BackMusic::GetName | ( | ) | const |
Report the name of the track.
| void BackMusic::SetBar | ( | int | nBar, |
| Muse * | pMuse ) |
Set the muse of a bar.
| nBar | The bar, negative for an intro bar. |
| pMuse | The muse. |
| void BackMusic::Start | ( | PlayMap * | pPlayMap | ) |
Start the music by itself, unless it plays.
| pPlayMap | The map of the song positions. |
| void BackMusic::Stop | ( | ) |
Stop the music, if it plays.