Loader that swaps the banks of a song through two synthesiser slots as the song moves on.
More...
#include <bankloader.h>
|
| | SwapBankLoader (unsigned short nBaseSlot, PlayMap *pPlayMap, int nLeadBars, int nNumBars, int nTicksPerBar) |
| | Construct a loader with no banks.
|
| | ~SwapBankLoader () |
| | Unload the banks.
|
| void | AddBank (const char *pszFile, int nStartBar) |
| | Add a bank that plays from a bar to the end of the song.
|
| int | GetMaxBankSize () const |
| | Report the size of the largest bank.
|
| void | Load () |
| | Start loading the first bank.
|
| bool | PollLoad () |
| | Report whether the first bank is loaded.
|
| void | Start () |
| | Load the bank the song needs next.
|
| void | Unload () |
| | Withdraw the scheduled load and unload the slots.
|
| void | Restart () |
| | Withdraw the scheduled load and load the bank the song needs next.
|
| unsigned short | GetBaseSlot () const |
Loader that swaps the banks of a song through two synthesiser slots as the song moves on.
The RTTI includes the nested name and the nested SwapBankLoader::SwapBank. The class is not polymorphic. Each bar of the song has a bank. While one slot plays, the loader loads the next different bank into the other slot ahead of the bar that needs it.
◆ State
Values of mState.
| Enumerator |
|---|
| kStateIdle | Nothing is loading.
|
| kStateLoading | The first bank loads.
|
| kStateLoaded | The first bank is loaded.
|
◆ SwapBankLoader()
| BankLoader::SwapBankLoader::SwapBankLoader |
( |
unsigned short | nBaseSlot, |
|
|
PlayMap * | pPlayMap, |
|
|
int | nLeadBars, |
|
|
int | nNumBars, |
|
|
int | nTicksPerBar ) |
Construct a loader with no banks.
- Parameters
-
| nBaseSlot | The first of the two synthesiser slots. |
| pPlayMap | The play map of the song. |
| nLeadBars | The bars before bar 0 that have a bank. |
| nNumBars | The bars of the song. |
| nTicksPerBar | The song ticks in one bar. |
- Ghidra address:
- NTSC-U/C: 0x00154bf0
- Ghidra address:
- PAL: 0x00156458
◆ ~SwapBankLoader()
| BankLoader::SwapBankLoader::~SwapBankLoader |
( |
| ) |
|
Unload the banks.
- Ghidra address:
- NTSC-U/C: 0x00154d18
- Ghidra address:
- PAL: 0x00156580
◆ AddBank()
| void BankLoader::SwapBankLoader::AddBank |
( |
const char * | pszFile, |
|
|
int | nStartBar ) |
Add a bank that plays from a bar to the end of the song.
- Parameters
-
| pszFile | The bank file. |
| nStartBar | The first bar. |
- Ghidra address:
- NTSC-U/C: 0x00154e00
- Ghidra address:
- PAL: 0x00156668
◆ GetMaxBankSize()
| int BankLoader::SwapBankLoader::GetMaxBankSize |
( |
| ) |
const |
Report the size of the largest bank.
- Returns
- The size, or 0 without banks.
- Ghidra address:
- NTSC-U/C: 0x001550e8
- Ghidra address:
- PAL: 0x00156950
◆ Load()
| void BankLoader::SwapBankLoader::Load |
( |
| ) |
|
Start loading the first bank.
- Ghidra address:
- NTSC-U/C: 0x00155128
- Ghidra address:
- PAL: 0x00156990
◆ PollLoad()
| bool BankLoader::SwapBankLoader::PollLoad |
( |
| ) |
|
Report whether the first bank is loaded.
- Returns
- Whether it is loaded, and true unless it is loading.
- Ghidra address:
- NTSC-U/C: 0x00155170
- Ghidra address:
- PAL: 0x001569d8
◆ Start()
| void BankLoader::SwapBankLoader::Start |
( |
| ) |
|
Load the bank the song needs next.
- Ghidra address:
- NTSC-U/C: 0x001551d8
- Ghidra address:
- PAL: 0x00156a40
◆ Unload()
| void BankLoader::SwapBankLoader::Unload |
( |
| ) |
|
Withdraw the scheduled load and unload the slots.
- Ghidra address:
- NTSC-U/C: 0x001551f8
- Ghidra address:
- PAL: 0x00156a60
◆ Restart()
| void BankLoader::SwapBankLoader::Restart |
( |
| ) |
|
Withdraw the scheduled load and load the bank the song needs next.
- Ghidra address:
- NTSC-U/C: 0x001552b8
- Ghidra address:
- PAL: 0x00156b20
◆ GetBaseSlot()
| unsigned short BankLoader::SwapBankLoader::GetBaseSlot |
( |
| ) |
const |
|
inline |
- Returns
- The first of the two synthesiser slots.
The documentation for this class was generated from the following file: