#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 41 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 66 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 102 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 128 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 222 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 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 |
|
private |
Definition at line 213 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 214 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 215 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 216 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 218 of file tracker.h.
Referenced by AllocSPCBlock(), and SaveSongs().
|
private |
Definition at line 219 of file tracker.h.
Referenced by AllocSPCBlock(), and SaveSongs().
|
private |
Definition at line 221 of file tracker.h.
Referenced by LoadSPCCommand(), and SaveSPCCommand().
|
private |
Definition at line 223 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 224 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 226 of file tracker.h.
Referenced by AllocSPCBlock(), and SaveSongs().
|
private |
Definition at line 227 of file tracker.h.
Referenced by GetSPCAddr(), and LoadSongs().
|
private |
|
private |
Definition at line 230 of file tracker.h.
Referenced by GetSPCAddr(), LoadSongs(), and LoadSPCCommand().
|
private |
Definition at line 231 of file tracker.h.
Referenced by LoadSPCCommand().
|
private |
Definition at line 232 of file tracker.h.
Referenced by GetBlockTime().
|
private |
Definition at line 233 of file tracker.h.
Referenced by EditTrack(), LoadSongs(), LoadSPCCommand(), NewSR(), and SaveSPCCommand().
|
private |
Definition at line 234 of file tracker.h.
Referenced by LoadSongs(), LoadSPCCommand(), and NewSR().
|
private |
Definition at line 235 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 236 of file tracker.h.
Referenced by AllocSPCCommand(), EditTrack(), GetBlockTime(), LoadSongs(), LoadSPCCommand(), SaveSongs(), and SaveSPCCommand().
|
private |
Definition at line 237 of file tracker.h.
Referenced by AllocSPCCommand(), LoadSongs(), and LoadSPCCommand().
|
private |
Definition at line 238 of file tracker.h.
Referenced by GetBlockTime(), SaveSongs(), SaveSPCCommand(), and WriteSPCData().
|
private |
Definition at line 239 of file tracker.h.
Referenced by LoadSongs().
|
private |
|
private |
Definition at line 247 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 248 of file tracker.h.
Referenced by LoadSongs().
|
private |
Definition at line 249 of file tracker.h.
Referenced by EditTrack(), LoadSongs(), LoadSPCCommand(), NewSR(), and SaveSPCCommand().
|
private |
Definition at line 250 of file tracker.h.
Referenced by AllocSPCCommand(), EditTrack(), GetBlockTime(), LoadSongs(), LoadSPCCommand(), NewSR(), SaveSongs(), and SaveSPCCommand().
|
private |
Definition at line 252 of file tracker.h.
Referenced by AllocSPCBlock(), and SaveSongs().
|
private |
Definition at line 254 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 255 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().
|
private |
Definition at line 256 of file tracker.h.
Referenced by LoadSongs(), and SaveSongs().