Manages the collection of songs, instruments, and samples from a ROM. More...
#include <music_bank.h>

Classes | |
| struct | BankSongRange |
| struct | ExpandedBankInfo |
| struct | SpaceInfo |
Public Types | |
| enum class | Bank : uint8_t { Overworld = 0 , Dungeon = 1 , Credits = 2 , OverworldExpanded = 3 , Auxiliary = 4 } |
Public Member Functions | |
| MusicBank ()=default | |
| ~MusicBank ()=default | |
| MusicBank (const MusicBank &)=delete | |
| MusicBank & | operator= (const MusicBank &)=delete |
| MusicBank (MusicBank &&)=default | |
| MusicBank & | operator= (MusicBank &&)=default |
| absl::Status | LoadFromRom (Rom &rom) |
| Load all music data from a ROM. | |
| absl::Status | SaveToRom (Rom &rom) |
| Save all modified music data back to ROM. | |
| bool | IsLoaded () const |
| Check if music data has been loaded. | |
| size_t | GetSongCount () const |
| Get the number of songs loaded. | |
| MusicSong * | GetSong (int index) |
| Get a song by index. | |
| const MusicSong * | GetSong (int index) const |
| MusicSong * | GetSongById (int song_id) |
| Get a song by vanilla ID (1-based). | |
| int | CreateNewSong (const std::string &name, Bank bank) |
| Create a new empty song. | |
| absl::Status | DeleteSong (int index) |
| Delete a song by index. | |
| int | DuplicateSong (int index) |
| Duplicate a song. | |
| bool | IsVanilla (int index) const |
| Check if a song is a vanilla (original) song. | |
| bool | HasExpandedMusicPatch () const |
| Check if the ROM has the Oracle of Secrets expanded music patch. | |
| bool | IsExpandedSong (int index) const |
| Check if a song is from an expanded bank. | |
| const ExpandedBankInfo & | GetExpandedBankInfo () const |
| Get information about the expanded bank configuration. | |
| std::vector< MusicSong * > | GetSongsInBank (Bank bank) |
| Get all songs in a specific bank. | |
| size_t | GetInstrumentCount () const |
| Get the number of instruments. | |
| MusicInstrument * | GetInstrument (int index) |
| Get an instrument by index. | |
| const MusicInstrument * | GetInstrument (int index) const |
| int | CreateNewInstrument (const std::string &name) |
| Create a new instrument. | |
| size_t | GetSampleCount () const |
| Get the number of samples. | |
| MusicSample * | GetSample (int index) |
| Get a sample by index. | |
| const MusicSample * | GetSample (int index) const |
| absl::StatusOr< int > | ImportSampleFromWav (const std::string &filepath, const std::string &name) |
| Import a WAV file as a new sample. | |
| SpaceInfo | CalculateSpaceUsage (Bank bank) const |
| Calculate space usage for a bank. | |
| bool | AllSongsFit () const |
| Check if all songs fit in their banks. | |
| bool | HasModifications () const |
| Check if any music data has been modified. | |
| void | ClearModifications () |
| Mark all data as unmodified (after save). | |
| nlohmann::json | ToJson () const |
| absl::Status | LoadFromJson (const nlohmann::json &j) |
Static Public Member Functions | |
| static int | GetBankMaxSize (Bank bank) |
| Get the maximum size for a bank. | |
| static uint32_t | GetBankRomAddress (Bank bank) |
| Get the ROM address for a bank. | |
Private Member Functions | |
| absl::Status | LoadSongTable (Rom &rom, Bank bank, std::vector< MusicSong > *custom_songs) |
| absl::Status | LoadInstruments (Rom &rom) |
| absl::Status | LoadSamples (Rom &rom) |
| absl::Status | DetectExpandedMusicPatch (Rom &rom) |
| absl::Status | LoadExpandedSongTable (Rom &rom, std::vector< MusicSong > *custom_songs) |
| absl::Status | SaveSongTable (Rom &rom, Bank bank) |
| absl::Status | SaveInstruments (Rom &rom) |
| absl::Status | SaveSamples (Rom &rom) |
| int | CalculateSongSize (const MusicSong &song) const |
Static Private Member Functions | |
| static BankSongRange | GetBankSongRange (Bank bank) |
| static uint8_t | GetSpcBankId (Bank bank) |
| static constexpr uint16_t | GetSongTableAddress () |
Private Attributes | |
| std::vector< MusicSong > | songs_ |
| std::vector< MusicInstrument > | instruments_ |
| std::vector< MusicSample > | samples_ |
| bool | loaded_ = false |
| bool | instruments_modified_ = false |
| bool | samples_modified_ = false |
| int | overworld_song_count_ = 0 |
| int | dungeon_song_count_ = 0 |
| int | credits_song_count_ = 0 |
| int | expanded_song_count_ = 0 |
| int | auxiliary_song_count_ = 0 |
| ExpandedBankInfo | expanded_bank_info_ |
Manages the collection of songs, instruments, and samples from a ROM.
The MusicBank handles:
Definition at line 27 of file music_bank.h.
|
strong |
| Enumerator | |
|---|---|
| Overworld | |
| Dungeon | |
| Credits | |
| OverworldExpanded | |
| Auxiliary | |
Definition at line 30 of file music_bank.h.
|
default |
|
default |
|
delete |
|
default |
| absl::Status yaze::zelda3::music::MusicBank::LoadFromRom | ( | Rom & | rom | ) |
Load all music data from a ROM.
| rom | The ROM to load from. |
Definition at line 169 of file music_bank.cc.
References auxiliary_song_count_, Credits, yaze::zelda3::music::MusicBank::ExpandedBankInfo::detected, DetectExpandedMusicPatch(), Dungeon, expanded_bank_info_, expanded_song_count_, instruments_, yaze::Rom::is_loaded(), loaded_, LoadExpandedSongTable(), LoadInstruments(), LoadSamples(), LoadSongTable(), Overworld, samples_, and songs_.
Referenced by yaze::editor::MusicEditor::DrawToolset(), and yaze::editor::MusicEditor::Load().
| absl::Status yaze::zelda3::music::MusicBank::SaveToRom | ( | Rom & | rom | ) |
Save all modified music data back to ROM.
| rom | The ROM to save to. |
Definition at line 220 of file music_bank.cc.
References AllSongsFit(), ClearModifications(), Credits, Dungeon, instruments_modified_, yaze::Rom::is_loaded(), loaded_, Overworld, samples_modified_, SaveInstruments(), SaveSamples(), and SaveSongTable().
Referenced by yaze::editor::MusicEditor::Save().
|
inline |
Check if music data has been loaded.
Definition at line 88 of file music_bank.h.
References loaded_.
|
inline |
Get the number of songs loaded.
Definition at line 97 of file music_bank.h.
References songs_.
Referenced by yaze::editor::music::SongBrowserView::Draw(), yaze::editor::MusicEditor::OpenSongPianoRoll(), and yaze::editor::MusicEditor::RestoreState().
| MusicSong * yaze::zelda3::music::MusicBank::GetSong | ( | int | index | ) |
Get a song by index.
| index | The song index (0-based). |
Definition at line 261 of file music_bank.cc.
References songs_.
Referenced by yaze::editor::MusicPianoRollPanel::Draw(), yaze::editor::music::SongBrowserView::Draw(), yaze::editor::MusicEditor::DrawPianoRollView(), yaze::editor::MusicEditor::DrawPlaybackControl(), yaze::editor::MusicPlaybackControlPanel::DrawPlaybackStatus(), yaze::editor::MusicPlaybackControlPanel::DrawSongInfo(), yaze::editor::MusicEditor::DrawSongTrackerWindow(), yaze::editor::MusicEditor::DrawToolset(), yaze::editor::MusicPlaybackControlPanel::DrawToolset(), yaze::editor::MusicEditor::DrawTrackerView(), DuplicateSong(), yaze::editor::MusicEditor::ExportSongToAsm(), yaze::editor::MusicEditor::ImportAsmBufferToSong(), yaze::editor::MusicEditor::OpenSong(), yaze::editor::MusicEditor::OpenSongPianoRoll(), yaze::editor::music::MusicPlayer::PlaySong(), yaze::editor::music::MusicPlayer::PlaySongDirect(), yaze::editor::music::MusicPlayer::PreviewCustomSong(), yaze::editor::MusicEditor::PushUndoState(), yaze::editor::MusicEditor::Redo(), yaze::editor::MusicEditor::RestoreState(), yaze::editor::music::MusicPlayer::SeekToSegment(), yaze::editor::MusicEditor::Undo(), yaze::editor::music::MusicPlayer::Update(), and yaze::editor::MusicEditor::Update().
| const MusicSong * yaze::zelda3::music::MusicBank::GetSong | ( | int | index | ) | const |
Definition at line 268 of file music_bank.cc.
References songs_.
| MusicSong * yaze::zelda3::music::MusicBank::GetSongById | ( | int | song_id | ) |
Get a song by vanilla ID (1-based).
| song_id | The vanilla song ID (1-34). |
Definition at line 275 of file music_bank.cc.
References songs_.
| int yaze::zelda3::music::MusicBank::CreateNewSong | ( | const std::string & | name, |
| Bank | bank ) |
Create a new empty song.
| name | The name of the new song. |
| bank | The bank to place the song in. |
Definition at line 283 of file music_bank.cc.
References yaze::zelda3::music::MusicSong::bank, yaze::zelda3::music::TrackEvent::MakeEnd(), yaze::zelda3::music::MusicSong::modified, yaze::zelda3::name, yaze::zelda3::music::MusicSong::name, yaze::zelda3::music::MusicSong::segments, songs_, and yaze::zelda3::music::MusicSegment::tracks.
Referenced by yaze::editor::music::SongBrowserView::Draw().

| absl::Status yaze::zelda3::music::MusicBank::DeleteSong | ( | int | index | ) |
Delete a song by index.
| index | The song index to delete. |
Definition at line 317 of file music_bank.cc.
References IsVanilla(), and songs_.
Referenced by yaze::editor::music::SongBrowserView::Draw().

| int yaze::zelda3::music::MusicBank::DuplicateSong | ( | int | index | ) |
Duplicate a song.
| index | The song index to duplicate. |
Definition at line 301 of file music_bank.cc.
References GetSong(), yaze::zelda3::music::MusicSong::modified, yaze::zelda3::music::MusicSong::name, and songs_.
Referenced by yaze::editor::music::SongBrowserView::Draw().

| bool yaze::zelda3::music::MusicBank::IsVanilla | ( | int | index | ) | const |
Check if a song is a vanilla (original) song.
| index | The song index to check. |
Definition at line 313 of file music_bank.cc.
Referenced by DeleteSong(), and yaze::editor::music::SongBrowserView::Draw().
|
inline |
Check if the ROM has the Oracle of Secrets expanded music patch.
Definition at line 147 of file music_bank.h.
References yaze::zelda3::music::MusicBank::ExpandedBankInfo::detected, and expanded_bank_info_.
Referenced by yaze::editor::music::SongBrowserView::Draw(), and yaze::editor::music::MusicPlayer::PlaySongDirect().
| bool yaze::zelda3::music::MusicBank::IsExpandedSong | ( | int | index | ) | const |
Check if a song is from an expanded bank.
| index | The song index to check. |
Definition at line 631 of file music_bank.cc.
References Auxiliary, OverworldExpanded, and songs_.
Referenced by yaze::editor::MusicEditor::ExportSongToAsm().
|
inline |
Get information about the expanded bank configuration.
Definition at line 160 of file music_bank.h.
References expanded_bank_info_.
Referenced by yaze::editor::music::SongBrowserView::Draw().
Get all songs in a specific bank.
Definition at line 330 of file music_bank.cc.
References songs_.
Referenced by SaveSongTable().
|
inline |
Get the number of instruments.
Definition at line 176 of file music_bank.h.
References instruments_.
Referenced by yaze::editor::music::InstrumentEditorView::Draw(), yaze::editor::music::TrackerView::DrawEventCell(), yaze::editor::music::InstrumentEditorView::DrawInstrumentList(), and yaze::editor::music::PianoRollView::DrawToolbar().
| MusicInstrument * yaze::zelda3::music::MusicBank::GetInstrument | ( | int | index | ) |
Get an instrument by index.
Definition at line 340 of file music_bank.cc.
References instruments_.
Referenced by yaze::editor::music::InstrumentEditorView::Draw(), yaze::editor::music::TrackerView::DrawEventCell(), yaze::editor::music::InstrumentEditorView::DrawInstrumentList(), yaze::editor::music::PianoRollView::DrawToolbar(), yaze::editor::music::MusicPlayer::PreviewInstrument(), yaze::editor::music::MusicPlayer::PreviewNote(), and yaze::editor::music::MusicPlayer::ResolveInstrumentForEvent().
| const MusicInstrument * yaze::zelda3::music::MusicBank::GetInstrument | ( | int | index | ) | const |
Definition at line 347 of file music_bank.cc.
References instruments_.
| int yaze::zelda3::music::MusicBank::CreateNewInstrument | ( | const std::string & | name | ) |
Create a new instrument.
| name | The name of the new instrument. |
Definition at line 354 of file music_bank.cc.
References yaze::zelda3::music::MusicInstrument::attack, yaze::zelda3::music::MusicInstrument::decay, instruments_, instruments_modified_, yaze::zelda3::name, yaze::zelda3::music::MusicInstrument::name, yaze::zelda3::music::MusicInstrument::pitch_mult, yaze::zelda3::music::MusicInstrument::sample_index, yaze::zelda3::music::MusicInstrument::sustain_level, and yaze::zelda3::music::MusicInstrument::sustain_rate.
Referenced by yaze::editor::music::InstrumentEditorView::DrawInstrumentList().
|
inline |
Get the number of samples.
Definition at line 198 of file music_bank.h.
References samples_.
Referenced by yaze::editor::music::SampleEditorView::Draw(), yaze::editor::music::InstrumentEditorView::DrawProperties(), and yaze::editor::music::SampleEditorView::DrawSampleList().
| MusicSample * yaze::zelda3::music::MusicBank::GetSample | ( | int | index | ) |
Get a sample by index.
Definition at line 369 of file music_bank.cc.
References samples_.
Referenced by yaze::editor::music::SampleEditorView::Draw(), yaze::editor::music::InstrumentEditorView::DrawProperties(), yaze::editor::music::SampleEditorView::DrawSampleList(), and yaze::editor::music::MusicPlayer::PreviewSample().
| const MusicSample * yaze::zelda3::music::MusicBank::GetSample | ( | int | index | ) | const |
Definition at line 376 of file music_bank.cc.
References samples_.
| absl::StatusOr< int > yaze::zelda3::music::MusicBank::ImportSampleFromWav | ( | const std::string & | filepath, |
| const std::string & | name ) |
Import a WAV file as a new sample.
| filepath | Path to the WAV file. |
| name | Name for the sample. |
Definition at line 383 of file music_bank.cc.
References yaze::zelda3::name, yaze::zelda3::music::MusicSample::name, yaze::zelda3::music::MusicSample::pcm_data, samples_, and samples_modified_.
Referenced by yaze::editor::music::SampleEditorView::DrawSampleList().
| MusicBank::SpaceInfo yaze::zelda3::music::MusicBank::CalculateSpaceUsage | ( | Bank | bank | ) | const |
Calculate space usage for a bank.
| bank | The bank to check. |
Definition at line 402 of file music_bank.cc.
References CalculateSongSize(), yaze::zelda3::music::MusicBank::ExpandedBankInfo::detected, expanded_bank_info_, yaze::zelda3::music::MusicBank::SpaceInfo::free_bytes, GetBankMaxSize(), yaze::zelda3::music::MusicBank::SpaceInfo::is_critical, yaze::zelda3::music::MusicBank::SpaceInfo::is_warning, Overworld, OverworldExpanded, yaze::zelda3::music::MusicBank::SpaceInfo::recommendation, songs_, yaze::zelda3::music::MusicBank::SpaceInfo::total_bytes, yaze::zelda3::music::MusicBank::SpaceInfo::usage_percent, and yaze::zelda3::music::MusicBank::SpaceInfo::used_bytes.
Referenced by AllSongsFit(), and yaze::editor::music::SongBrowserView::Draw().

| bool yaze::zelda3::music::MusicBank::AllSongsFit | ( | ) | const |
Check if all songs fit in their banks.
Definition at line 438 of file music_bank.cc.
References CalculateSpaceUsage(), Credits, Dungeon, yaze::zelda3::music::MusicBank::SpaceInfo::free_bytes, and Overworld.
Referenced by yaze::editor::music::SongBrowserView::Draw(), and SaveToRom().

|
static |
Get the maximum size for a bank.
Definition at line 444 of file music_bank.cc.
References Auxiliary, Credits, Dungeon, yaze::zelda3::music::kAuxBankMaxSize, yaze::zelda3::music::kCreditsBankMaxSize, yaze::zelda3::music::kDungeonBankMaxSize, yaze::zelda3::music::kExpandedOverworldBankMaxSize, yaze::zelda3::music::kOverworldBankMaxSize, Overworld, and OverworldExpanded.
Referenced by CalculateSpaceUsage(), and SaveSongTable().
|
static |
Get the ROM address for a bank.
Definition at line 455 of file music_bank.cc.
References Auxiliary, Credits, Dungeon, yaze::zelda3::music::kCreditsBankRom, yaze::zelda3::music::kDungeonBankRom, yaze::zelda3::music::kExpandedAuxBankRom, yaze::zelda3::music::kExpandedOverworldBankRom, yaze::zelda3::music::kOverworldBankRom, Overworld, and OverworldExpanded.
Referenced by SaveSongTable().
| bool yaze::zelda3::music::MusicBank::HasModifications | ( | ) | const |
Check if any music data has been modified.
Definition at line 466 of file music_bank.cc.
References instruments_modified_, samples_modified_, and songs_.
Referenced by yaze::editor::MusicEditor::Update().
| void yaze::zelda3::music::MusicBank::ClearModifications | ( | ) |
Mark all data as unmodified (after save).
Definition at line 478 of file music_bank.cc.
References instruments_modified_, samples_modified_, and songs_.
Referenced by SaveToRom().
| nlohmann::json yaze::zelda3::music::MusicBank::ToJson | ( | ) | const |
Definition at line 996 of file music_bank.cc.
References yaze::zelda3::music::TrackEvent::Command, credits_song_count_, dungeon_song_count_, yaze::zelda3::music::TrackEvent::End, instruments_, yaze::zelda3::music::TrackEvent::Note, overworld_song_count_, samples_, songs_, and yaze::zelda3::music::TrackEvent::SubroutineCall.
Referenced by yaze::editor::MusicEditor::PersistMusicState().
| absl::Status yaze::zelda3::music::MusicBank::LoadFromJson | ( | const nlohmann::json & | j | ) |
Definition at line 1092 of file music_bank.cc.
References yaze::zelda3::music::MusicInstrument::attack, yaze::zelda3::music::MusicSong::bank, yaze::zelda3::music::MusicSample::brr_data, yaze::zelda3::music::TrackEvent::Command, yaze::zelda3::music::TrackEvent::command, credits_song_count_, yaze::zelda3::music::MusicInstrument::decay, dungeon_song_count_, yaze::zelda3::music::Note::duration, yaze::zelda3::music::TrackEvent::End, yaze::zelda3::music::MusicInstrument::gain, yaze::zelda3::music::Note::has_duration_prefix, instruments_, yaze::zelda3::music::kNoteRest, loaded_, yaze::zelda3::music::MusicSong::loop_point, yaze::zelda3::music::MusicSample::loop_point, yaze::zelda3::music::MusicSample::loops, yaze::zelda3::music::MusicSong::modified, yaze::zelda3::music::MusicSong::name, yaze::zelda3::music::MusicInstrument::name, yaze::zelda3::music::MusicSample::name, yaze::zelda3::music::TrackEvent::Note, yaze::zelda3::music::TrackEvent::note, yaze::zelda3::music::MusicCommand::opcode, overworld_song_count_, yaze::zelda3::music::MusicCommand::params, yaze::zelda3::music::MusicSample::pcm_data, yaze::zelda3::music::Note::pitch, yaze::zelda3::music::MusicInstrument::pitch_mult, yaze::zelda3::music::MusicSegment::rom_address, yaze::zelda3::music::MusicSong::rom_address, yaze::zelda3::music::TrackEvent::rom_offset, yaze::zelda3::music::MusicInstrument::sample_index, samples_, yaze::zelda3::music::MusicSong::segments, songs_, yaze::zelda3::music::TrackEvent::SubroutineCall, yaze::zelda3::music::MusicInstrument::sustain_level, yaze::zelda3::music::MusicInstrument::sustain_rate, yaze::zelda3::music::TrackEvent::tick, yaze::zelda3::music::MusicSegment::tracks, yaze::zelda3::music::TrackEvent::type, and yaze::zelda3::music::Note::velocity.
Referenced by yaze::editor::MusicEditor::RestoreMusicState().
|
private |
Definition at line 640 of file music_bank.cc.
References yaze::zelda3::music::MusicSong::bank, yaze::zelda3::music::MusicBank::BankSongRange::Count(), Credits, credits_song_count_, Dungeon, dungeon_song_count_, GetBankSongRange(), GetSongTableAddress(), GetSpcBankId(), yaze::zelda3::music::GetVanillaSongName(), yaze::zelda3::music::TrackEvent::MakeEnd(), yaze::zelda3::music::MusicSong::modified, yaze::zelda3::music::MusicSong::name, Overworld, overworld_song_count_, yaze::zelda3::music::SpcParser::ParseSong(), yaze::zelda3::music::SpcParser::ReadSongPointerTable(), yaze::zelda3::music::MusicSong::rom_address, yaze::zelda3::music::MusicSong::segments, songs_, yaze::zelda3::music::MusicBank::BankSongRange::start_id, and yaze::zelda3::music::MusicSegment::tracks.
Referenced by LoadFromRom().
|
private |
Definition at line 862 of file music_bank.cc.
References ASSIGN_OR_RETURN, yaze::zelda3::music::MusicInstrument::gain, instruments_, yaze::zelda3::music::kInstrumentTableAram, yaze::zelda3::music::MusicInstrument::name, yaze::zelda3::music::MusicInstrument::pitch_mult, yaze::Rom::ReadByteVector(), yaze::zelda3::music::MusicInstrument::sample_index, yaze::zelda3::music::MusicInstrument::SetFromBytes(), yaze::Rom::size(), and yaze::zelda3::music::SpcParser::SpcAddressToRomOffset().
Referenced by LoadFromRom().

|
private |
Definition at line 901 of file music_bank.cc.
References yaze::zelda3::music::MusicSample::brr_data, yaze::Rom::data(), yaze::zelda3::music::BrrCodec::Decode(), yaze::zelda3::music::SpcParser::GetSpcData(), yaze::zelda3::music::kSampleTableAram, yaze::zelda3::music::MusicSample::loop_point, yaze::zelda3::music::MusicSample::loops, yaze::zelda3::music::MusicSample::name, yaze::zelda3::music::MusicSample::pcm_data, samples_, yaze::Rom::size(), and yaze::zelda3::music::SpcParser::SpcAddressToRomOffset().
Referenced by LoadFromRom().
|
private |
Definition at line 490 of file music_bank.cc.
References yaze::zelda3::music::MusicBank::ExpandedBankInfo::aux_aram_address, yaze::zelda3::music::MusicBank::ExpandedBankInfo::aux_rom_offset, yaze::zelda3::music::MusicBank::ExpandedBankInfo::detected, expanded_bank_info_, yaze::zelda3::music::MusicBank::ExpandedBankInfo::hook_address, yaze::zelda3::music::kAuxSongTableAram, yaze::zelda3::music::kExpandedAuxBankRom, yaze::zelda3::music::kExpandedMusicHookAddress, yaze::zelda3::music::kExpandedOverworldBankRom, yaze::zelda3::music::kJslOpcode, yaze::zelda3::music::MusicBank::ExpandedBankInfo::main_rom_offset, yaze::Rom::ReadByte(), and yaze::Rom::size().
Referenced by LoadFromRom().

|
private |
Definition at line 544 of file music_bank.cc.
References yaze::zelda3::music::MusicSong::bank, yaze::zelda3::music::MusicBank::ExpandedBankInfo::detected, expanded_bank_info_, expanded_song_count_, yaze::zelda3::music::kExpandedOverworldBankMaxSize, yaze::zelda3::music::kSongTableAram, yaze::zelda3::music::MusicBank::ExpandedBankInfo::main_rom_offset, yaze::zelda3::music::TrackEvent::MakeEnd(), yaze::zelda3::music::MusicSong::modified, yaze::zelda3::music::MusicSong::name, OverworldExpanded, yaze::zelda3::music::SpcParser::ParseSong(), yaze::Rom::ReadByteVector(), yaze::zelda3::music::SpcParser::ReadSongPointerTable(), yaze::zelda3::music::MusicSong::segments, yaze::Rom::size(), songs_, and yaze::zelda3::music::MusicSegment::tracks.
Referenced by LoadFromRom().
Definition at line 766 of file music_bank.cc.
References yaze::zelda3::music::SpcSerializer::ApplyBaseAddress(), GetBankMaxSize(), GetBankRomAddress(), GetSongsInBank(), GetSongTableAddress(), yaze::zelda3::music::SpcSerializer::SerializeSong(), yaze::Rom::size(), and yaze::Rom::WriteVector().
Referenced by SaveToRom().
|
private |
Definition at line 896 of file music_bank.cc.
Referenced by SaveToRom().
|
private |
Definition at line 966 of file music_bank.cc.
Referenced by SaveToRom().
|
private |
Definition at line 971 of file music_bank.cc.
References yaze::zelda3::music::MusicSong::HasLoop(), and yaze::zelda3::music::MusicSong::segments.
Referenced by CalculateSpaceUsage().

|
staticprivate |
Definition at line 1216 of file music_bank.cc.
Referenced by LoadSongTable().
|
staticprivate |
Definition at line 1224 of file music_bank.cc.
Referenced by LoadSongTable().
|
inlinestaticconstexprprivate |
Definition at line 312 of file music_bank.h.
References yaze::zelda3::music::kSongTableAram.
Referenced by LoadSongTable(), and SaveSongTable().
|
private |
Definition at line 281 of file music_bank.h.
Referenced by CalculateSpaceUsage(), ClearModifications(), CreateNewSong(), DeleteSong(), DuplicateSong(), GetSong(), GetSong(), GetSongById(), GetSongCount(), GetSongsInBank(), HasModifications(), IsExpandedSong(), LoadExpandedSongTable(), LoadFromJson(), LoadFromRom(), LoadSongTable(), and ToJson().
|
private |
Definition at line 282 of file music_bank.h.
Referenced by CreateNewInstrument(), GetInstrument(), GetInstrument(), GetInstrumentCount(), LoadFromJson(), LoadFromRom(), LoadInstruments(), and ToJson().
|
private |
Definition at line 283 of file music_bank.h.
Referenced by GetSample(), GetSample(), GetSampleCount(), ImportSampleFromWav(), LoadFromJson(), LoadFromRom(), LoadSamples(), and ToJson().
|
private |
Definition at line 286 of file music_bank.h.
Referenced by IsLoaded(), LoadFromJson(), LoadFromRom(), and SaveToRom().
|
private |
Definition at line 287 of file music_bank.h.
Referenced by ClearModifications(), CreateNewInstrument(), HasModifications(), and SaveToRom().
|
private |
Definition at line 288 of file music_bank.h.
Referenced by ClearModifications(), HasModifications(), ImportSampleFromWav(), and SaveToRom().
|
private |
Definition at line 291 of file music_bank.h.
Referenced by LoadFromJson(), LoadSongTable(), and ToJson().
|
private |
Definition at line 292 of file music_bank.h.
Referenced by LoadFromJson(), LoadSongTable(), and ToJson().
|
private |
Definition at line 293 of file music_bank.h.
Referenced by LoadFromJson(), LoadSongTable(), and ToJson().
|
private |
Definition at line 294 of file music_bank.h.
Referenced by LoadExpandedSongTable(), and LoadFromRom().
|
private |
Definition at line 295 of file music_bank.h.
Referenced by LoadFromRom().
|
private |
Definition at line 298 of file music_bank.h.
Referenced by CalculateSpaceUsage(), DetectExpandedMusicPatch(), GetExpandedBankInfo(), HasExpandedMusicPatch(), LoadExpandedSongTable(), and LoadFromRom().