#include <tracker.h>
Public Member Functions | |
SongSpcBlock * | AllocSpcBlock (int len, int bank) |
unsigned char * | GetSpcAddr (Rom &rom, unsigned short addr, short bank) |
short | AllocSpcCommand () |
short | GetBlockTime (Rom &rom, short num, short prevtime) |
short | SaveSpcCommand (Rom &rom, short num, short songtime, short endtr) |
short | LoadSpcCommand (Rom &rom, unsigned short addr, short bank, int t) |
void | SaveSongs (Rom &rom) |
void | LoadSongs (Rom &rom) |
int | WriteSpcData (Rom &rom, void *buf, int len, int addr, int spc, int limit) |
void | EditTrack (Rom &rom, short i) |
void | NewSR (Rom &rom, int bank) |
Private Attributes | |
int | modf |
int | mark_sr |
int | mark_start |
int | mark_end |
int | mark_first |
int | mark_last |
int | numwave |
int | numinst |
int | numsndinst |
int | sndinit = 0 |
int | sndlen1 |
int | sndlen2 |
int | m_ofs |
int | w_modf |
int | ss_num |
int | ss_size |
char | op_len [32] |
char * | snddat1 |
char * | snddat2 |
unsigned short | ss_next = 0 |
unsigned short | spclen |
unsigned short | numseg |
short | spcbank |
short | lastsr |
short | ss_lasttime |
short | srnum |
short | srsize |
short | numsong [3] |
short | m_size |
short | m_free |
short | m_modf |
short | m_loaded |
short | t_loaded |
short | t_modf |
short | withhead |
size_t | t_number |
std::vector< Song > | songs |
SongPart * | sp_mark |
SongRange * | song_range_ |
SpcCommand * | current_spc_command_ |
SongSpcBlock ** | ssblt |
ZeldaWave * | waves |
ZeldaInstrument * | insts |
ZeldaSfxInstrument * | sndinsts |
SongSpcBlock * yaze::app::zelda3::music::Tracker::AllocSpcBlock | ( | int | len, |
int | bank ) |
Definition at line 36 of file tracker.cc.
References yaze::app::zelda3::music::SongSpcBlock::bank, yaze::app::zelda3::music::SongSpcBlock::buf, yaze::app::zelda3::music::SongSpcBlock::flag, yaze::app::zelda3::music::SongSpcBlock::len, yaze::app::zelda3::music::SongSpcBlock::relnum, yaze::app::zelda3::music::SongSpcBlock::relocs, yaze::app::zelda3::music::SongSpcBlock::relsz, ss_next, ss_num, ss_size, ssblt, and yaze::app::zelda3::music::SongSpcBlock::start.
Referenced by SaveSongs(), and SaveSpcCommand().
unsigned char * yaze::app::zelda3::music::Tracker::GetSpcAddr | ( | Rom & | rom, |
unsigned short | addr, | ||
short | bank ) |
Definition at line 61 of file tracker.cc.
References yaze::app::Rom::data(), spcbank, and spclen.
Referenced by LoadSongs(), and LoadSpcCommand().
short yaze::app::zelda3::music::Tracker::AllocSpcCommand | ( | ) |
Definition at line 97 of file tracker.cc.
References current_spc_command_, m_free, m_size, yaze::app::zelda3::music::SpcCommand::next, and yaze::app::zelda3::music::SpcCommand::prev.
Referenced by NewSR().
short yaze::app::zelda3::music::Tracker::GetBlockTime | ( | Rom & | rom, |
short | num, | ||
short | prevtime ) |
Definition at line 123 of file tracker.cc.
References yaze::app::zelda3::music::SpcCommand::b1, yaze::app::zelda3::music::SpcCommand::cmd, current_spc_command_, yaze::app::zelda3::music::SpcCommand::flag, GetBlockTime(), m_modf, m_size, yaze::app::zelda3::music::SpcCommand::next, yaze::app::zelda3::music::SpcCommand::p1, yaze::app::zelda3::music::SpcCommand::p3, yaze::app::zelda3::music::SpcCommand::prev, ss_lasttime, yaze::app::zelda3::music::SpcCommand::tim, and yaze::app::zelda3::music::SpcCommand::tim2.
Referenced by GetBlockTime(), LoadSpcCommand(), SaveSongs(), and SaveSpcCommand().
short yaze::app::zelda3::music::Tracker::SaveSpcCommand | ( | Rom & | rom, |
short | num, | ||
short | songtime, | ||
short | endtr ) |
Definition at line 663 of file tracker.cc.
References yaze::app::zelda3::music::SpcCommand::addr, AllocSpcBlock(), yaze::app::zelda3::music::SpcCommand::b1, yaze::app::zelda3::music::SpcCommand::b2, yaze::app::zelda3::music::SongSpcBlock::buf, yaze::app::zelda3::music::SpcCommand::cmd, current_spc_command_, yaze::app::zelda3::music::SpcCommand::flag, GetBlockTime(), m_modf, m_size, yaze::app::zelda3::music::SpcCommand::next, op_len, yaze::app::zelda3::music::SpcCommand::p1, yaze::app::zelda3::music::SpcCommand::p2, yaze::app::zelda3::music::SpcCommand::p3, yaze::app::zelda3::music::SpcCommand::prev, SaveSpcCommand(), song_range_, srnum, and yaze::app::zelda3::music::SongSpcBlock::start.
Referenced by SaveSongs(), and SaveSpcCommand().
short yaze::app::zelda3::music::Tracker::LoadSpcCommand | ( | Rom & | rom, |
unsigned short | addr, | ||
short | bank, | ||
int | t ) |
Definition at line 217 of file tracker.cc.
References yaze::app::zelda3::music::SpcCommand::addr, yaze::app::zelda3::music::SpcCommand::b1, yaze::app::zelda3::music::SpcCommand::b2, yaze::app::zelda3::music::SongRange::bank, yaze::app::zelda3::music::SpcCommand::cmd, current_spc_command_, yaze::app::zelda3::music::SongRange::editor, yaze::app::zelda3::music::SongRange::end, yaze::app::zelda3::music::SongRange::endtime, yaze::app::zelda3::music::SongRange::first, yaze::app::zelda3::music::SpcCommand::flag, GetBlockTime(), GetSpcAddr(), yaze::app::zelda3::music::SongRange::inst, lastsr, LoadSpcCommand(), m_free, m_size, yaze::app::zelda3::music::SpcCommand::next, op_len, yaze::app::zelda3::music::SpcCommand::p1, yaze::app::zelda3::music::SpcCommand::p2, yaze::app::zelda3::music::SpcCommand::p3, yaze::app::zelda3::music::SpcCommand::prev, song_range_, spcbank, srnum, srsize, yaze::app::zelda3::music::SongRange::start, yaze::app::zelda3::music::SpcCommand::tim, and yaze::app::zelda3::music::SpcCommand::tim2.
Referenced by LoadSongs(), and LoadSpcCommand().
void yaze::app::zelda3::music::Tracker::SaveSongs | ( | Rom & | rom | ) |
Definition at line 816 of file tracker.cc.
References yaze::app::zelda3::music::Song::addr, yaze::app::zelda3::music::SongPart::addr, yaze::app::zelda3::music::SongSpcBlock::addr, AllocSpcBlock(), yaze::app::zelda3::music::SongSpcBlock::bank, yaze::app::zelda3::music::SongSpcBlock::buf, yaze::app::zelda3::music::ZeldaWave::buf, yaze::app::zelda3::music::ZeldaWave::copy, current_spc_command_, yaze::app::Rom::data(), yaze::app::zelda3::music::SampleEdit::editinst, yaze::app::zelda3::music::ZeldaWave::end, yaze::app::zelda3::music::fil1, yaze::app::zelda3::music::fil2, yaze::app::zelda3::music::fil3, yaze::app::zelda3::music::Song::flag, yaze::app::zelda3::music::SongPart::flag, yaze::app::zelda3::music::SongSpcBlock::flag, yaze::app::zelda3::music::SpcCommand::flag, GetBlockTime(), yaze::app::zelda3::music::Song::in_use, yaze::app::zelda3::music::SampleEdit::init, insts, yaze::app::core::ldle16b_i(), yaze::app::zelda3::music::SongSpcBlock::len, yaze::app::zelda3::music::ZeldaWave::lflag, yaze::app::zelda3::music::Song::lopst, yaze::app::zelda3::music::ZeldaWave::lopst, m_modf, m_ofs, m_size, yaze::app::zelda3::music::ZeldaInstrument::multhi, yaze::app::zelda3::music::ZeldaInstrument::multlo, numinst, yaze::app::zelda3::music::Song::numparts, numsndinst, numsong, numwave, yaze::app::zelda3::music::SongSpcBlock::relnum, yaze::app::zelda3::music::SongSpcBlock::relocs, yaze::app::zelda3::music::ZeldaInstrument::samp, SaveSpcCommand(), snddat1, snddat2, sndinsts, sndlen1, sndlen2, songs, ss_next, ss_num, ss_size, ssblt, yaze::app::zelda3::music::SongSpcBlock::start, yaze::app::core::stle16b_i(), yaze::app::zelda3::music::Song::tbl, yaze::app::zelda3::music::SongPart::tbl, w_modf, waves, and WriteSpcData().
void yaze::app::zelda3::music::Tracker::LoadSongs | ( | Rom & | rom | ) |
Definition at line 393 of file tracker.cc.
References yaze::app::zelda3::music::Song::addr, yaze::app::zelda3::music::SongPart::addr, yaze::app::zelda3::music::ZeldaWave::buf, yaze::app::zelda3::music::ZeldaWave::copy, current_spc_command_, yaze::app::Rom::data(), yaze::app::zelda3::music::ZeldaWave::end, yaze::app::zelda3::music::fil1, yaze::app::zelda3::music::fil2, yaze::app::zelda3::music::fil3, yaze::app::zelda3::music::Song::flag, yaze::app::zelda3::music::SongPart::flag, yaze::app::zelda3::music::SpcCommand::flag, GetSpcAddr(), yaze::app::zelda3::music::Song::in_use, yaze::app::zelda3::music::Song::inst, yaze::app::zelda3::music::SongPart::inst, insts, yaze::app::zelda3::music::ZeldaWave::lflag, LoadSpcCommand(), yaze::app::zelda3::music::Song::lopst, yaze::app::zelda3::music::ZeldaWave::lopst, m_free, m_loaded, m_ofs, m_size, yaze::app::zelda3::music::SpcCommand::next, numinst, yaze::app::zelda3::music::Song::numparts, numsndinst, numsong, numwave, yaze::app::zelda3::music::SpcCommand::prev, snddat1, snddat2, sndinsts, sndlen1, sndlen2, song_range_, songs, sp_mark, spcbank, spclen, srnum, srsize, yaze::app::zelda3::music::Song::tbl, yaze::app::zelda3::music::SongPart::tbl, yaze::app::zelda3::music::SpcCommand::tim, w_modf, and waves.
Referenced by yaze::app::editor::MusicEditor::DrawToolset().
int yaze::app::zelda3::music::Tracker::WriteSpcData | ( | Rom & | rom, |
void * | buf, | ||
int | len, | ||
int | addr, | ||
int | spc, | ||
int | limit ) |
Definition at line 786 of file tracker.cc.
References yaze::app::Rom::data(), and m_modf.
Referenced by SaveSongs().
void yaze::app::zelda3::music::Tracker::EditTrack | ( | Rom & | rom, |
short | i ) |
Definition at line 1266 of file tracker.cc.
References current_spc_command_, yaze::app::zelda3::music::SongRange::first, m_size, song_range_, and srnum.
Referenced by NewSR().
void yaze::app::zelda3::music::Tracker::NewSR | ( | Rom & | rom, |
int | bank ) |
Definition at line 1316 of file tracker.cc.
References AllocSpcCommand(), yaze::app::zelda3::music::SongRange::bank, yaze::app::zelda3::music::SpcCommand::cmd, current_spc_command_, yaze::app::zelda3::music::SongRange::editor, EditTrack(), yaze::app::zelda3::music::SongRange::first, yaze::app::zelda3::music::SpcCommand::flag, yaze::app::zelda3::music::SpcCommand::next, yaze::app::zelda3::music::SpcCommand::prev, song_range_, srnum, and srsize.
|
private |
Definition at line 201 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 202 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 203 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
|
private |
Definition at line 207 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 208 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 209 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 210 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 212 of file tracker.h.
Referenced by AllocSpcBlock(), and SaveSongs().
|
private |
Definition at line 213 of file tracker.h.
Referenced by AllocSpcBlock(), and SaveSongs().
|
private |
Definition at line 215 of file tracker.h.
Referenced by LoadSpcCommand(), and SaveSpcCommand().
|
private |
Definition at line 217 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 218 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 220 of file tracker.h.
Referenced by AllocSpcBlock(), and SaveSongs().
|
private |
Definition at line 221 of file tracker.h.
Referenced by GetSpcAddr(), and LoadSongs().
|
private |
|
private |
Definition at line 224 of file tracker.h.
Referenced by GetSpcAddr(), LoadSongs(), and LoadSpcCommand().
|
private |
Definition at line 225 of file tracker.h.
Referenced by LoadSpcCommand().
|
private |
Definition at line 226 of file tracker.h.
Referenced by GetBlockTime().
|
private |
Definition at line 227 of file tracker.h.
Referenced by EditTrack(), LoadSongs(), LoadSpcCommand(), NewSR(), and SaveSpcCommand().
|
private |
Definition at line 228 of file tracker.h.
Referenced by LoadSongs(), LoadSpcCommand(), and NewSR().
|
private |
Definition at line 229 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 230 of file tracker.h.
Referenced by AllocSpcCommand(), EditTrack(), GetBlockTime(), LoadSongs(), LoadSpcCommand(), SaveSongs(), and SaveSpcCommand().
|
private |
Definition at line 231 of file tracker.h.
Referenced by AllocSpcCommand(), LoadSongs(), and LoadSpcCommand().
|
private |
Definition at line 232 of file tracker.h.
Referenced by GetBlockTime(), SaveSongs(), SaveSpcCommand(), and WriteSpcData().
|
private |
Definition at line 233 of file tracker.h.
Referenced by LoadSongs().
|
private |
|
private |
Definition at line 241 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 242 of file tracker.h.
Referenced by LoadSongs().
|
private |
Definition at line 243 of file tracker.h.
Referenced by EditTrack(), LoadSongs(), LoadSpcCommand(), NewSR(), and SaveSpcCommand().
|
private |
Definition at line 244 of file tracker.h.
Referenced by AllocSpcCommand(), EditTrack(), GetBlockTime(), LoadSongs(), LoadSpcCommand(), NewSR(), SaveSongs(), and SaveSpcCommand().
|
private |
Definition at line 246 of file tracker.h.
Referenced by AllocSpcBlock(), and SaveSongs().
|
private |
Definition at line 248 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 249 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 250 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().