Map from the bars a song plays to the bars of the song as written, with the loops that repeat stretches of bars.
More...
#include <playmap.h>
|
| class | Loop |
| | Stretch of the song as written that plays from a bar on. More...
|
|
| | PlayMap (int nTicksPerBar, int nEndBar) |
| | Construct a map that plays the song as written, from bar 0 without end.
|
| void | AddLoop (int nStartBar, int nNumBars, int nPlayBar) |
| | Play a range of bars of the song as written from a bar on, repeating without end.
|
| int | MapBar (int nBar) const |
| | Map a bar the song plays to the bar of the song as written.
|
| int | MapTick (int nTick) const |
| | Map a tick the song plays at to the tick of the song as written.
|
| void | GetSegment (int nTick, int *pChangeTick, int *pEnd, int *pNextStart, int *pNextLength, int *pIsLast) |
| | Report the stretch of the song as written that plays at a tick, and the stretch after it.
|
| int | GetEndBar () const |
| | Report the bar the song ends at.
|
| void | ClearLoops () |
| | Remove every loop, and play the song as written again.
|
| int | GetLooping () const |
Map from the bars a song plays to the bars of the song as written, with the loops that repeat stretches of bars.
The class is not polymorphic. The RTTI includes the nested PlayMap::Loop.
◆ PlayMap()
| PlayMap::PlayMap |
( |
int | nTicksPerBar, |
|
|
int | nEndBar ) |
Construct a map that plays the song as written, from bar 0 without end.
- Parameters
-
| nTicksPerBar | The song ticks in one bar. |
| nEndBar | The bar the song ends at while no loop was added. |
- Ghidra address:
- NTSC-U/C: 0x0012e3a0
- Ghidra address:
- PAL: 0x0012fb78
◆ AddLoop()
| void PlayMap::AddLoop |
( |
int | nStartBar, |
|
|
int | nNumBars, |
|
|
int | nPlayBar ) |
Play a range of bars of the song as written from a bar on, repeating without end.
The repetition of the current last loop under way at that bar plays only up to the bar.
- Parameters
-
| nStartBar | The first bar of the range as written. |
| nNumBars | The length of the range in bars. |
| nPlayBar | The bar the song plays the range from. |
- Ghidra address:
- NTSC-U/C: 0x0012e5e0
- Ghidra address:
- PAL: 0x0012fdb8
◆ MapBar()
| int PlayMap::MapBar |
( |
int | nBar | ) |
const |
Map a bar the song plays to the bar of the song as written.
- Parameters
-
| nBar | The bar the song plays. |
- Returns
- The bar as written, which is negative inside a stretch of silence.
- Ghidra address:
- NTSC-U/C: 0x0012ea38
- Ghidra address:
- PAL: 0x00130210
◆ MapTick()
| int PlayMap::MapTick |
( |
int | nTick | ) |
const |
Map a tick the song plays at to the tick of the song as written.
- Parameters
-
| nTick | The tick the song plays at. |
- Returns
- The tick of the song as written.
- Ghidra address:
- NTSC-U/C: 0x0012eab8
- Ghidra address:
- PAL: 0x00130290
◆ GetSegment()
| void PlayMap::GetSegment |
( |
int | nTick, |
|
|
int * | pChangeTick, |
|
|
int * | pEnd, |
|
|
int * | pNextStart, |
|
|
int * | pNextLength, |
|
|
int * | pIsLast ) |
Report the stretch of the song as written that plays at a tick, and the stretch after it.
A loop that repeats without end stores 0x20000001 in pChangeTick, stores 1 in pIsLast, and does not write the other outputs.
- Parameters
-
| nTick | The tick the song plays at. |
| pChangeTick | Receives the tick the song plays at where the next stretch begins. |
| pEnd | Receives the tick of the song as written where the current stretch ends. |
| pNextStart | Receives the tick of the song as written where the next stretch begins. |
| pNextLength | Receives the length of the next stretch in ticks. |
| pIsLast | Receives whether no loop follows the current one. |
- Ghidra address:
- NTSC-U/C: 0x0012eb20
- Ghidra address:
- PAL: 0x001302f8
◆ GetEndBar()
| int PlayMap::GetEndBar |
( |
| ) |
const |
Report the bar the song ends at.
- Returns
- The last bar, or 0x20000001 while a loop repeats.
- Ghidra address:
- NTSC-U/C: 0x0012ec98
- Ghidra address:
- PAL: 0x00130470
◆ ClearLoops()
| void PlayMap::ClearLoops |
( |
| ) |
|
Remove every loop, and play the song as written again.
mLooping remains set.
- Ghidra address:
- NTSC-U/C: 0x0012ecb8
- Ghidra address:
- PAL: 0x00130490
◆ GetLooping()
| int PlayMap::GetLooping |
( |
| ) |
const |
|
inline |
- Returns
- Whether a loop was added.
The documentation for this class was generated from the following file: