yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::zelda3::music::Tracker Class Reference

#include <tracker.h>

Collaboration diagram for yaze::app::zelda3::music::Tracker:

Public Member Functions

SongSpcBlockAllocSpcBlock (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< Songsongs
 
SongPartsp_mark
 
SongRangesong_range_
 
SpcCommandcurrent_spc_command_
 
SongSpcBlock ** ssblt
 
ZeldaWavewaves
 
ZeldaInstrumentinsts
 
ZeldaSfxInstrumentsndinsts
 

Detailed Description

Definition at line 167 of file tracker.h.

Member Function Documentation

◆ AllocSpcBlock()

◆ GetSpcAddr()

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().

Here is the call graph for this function:

◆ AllocSpcCommand()

short yaze::app::zelda3::music::Tracker::AllocSpcCommand ( )

◆ GetBlockTime()

◆ SaveSpcCommand()

◆ LoadSpcCommand()

◆ SaveSongs()

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().

Here is the call graph for this function:

◆ LoadSongs()

◆ WriteSpcData()

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().

Here is the call graph for this function:

◆ EditTrack()

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().

◆ NewSR()

Member Data Documentation

◆ modf

int yaze::app::zelda3::music::Tracker::modf
private

Definition at line 192 of file tracker.h.

◆ mark_sr

int yaze::app::zelda3::music::Tracker::mark_sr
private

Definition at line 194 of file tracker.h.

◆ mark_start

int yaze::app::zelda3::music::Tracker::mark_start
private

Definition at line 196 of file tracker.h.

◆ mark_end

int yaze::app::zelda3::music::Tracker::mark_end
private

Definition at line 197 of file tracker.h.

◆ mark_first

int yaze::app::zelda3::music::Tracker::mark_first
private

Definition at line 198 of file tracker.h.

◆ mark_last

int yaze::app::zelda3::music::Tracker::mark_last
private

Definition at line 199 of file tracker.h.

◆ numwave

int yaze::app::zelda3::music::Tracker::numwave
private

Definition at line 201 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ numinst

int yaze::app::zelda3::music::Tracker::numinst
private

Definition at line 202 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ numsndinst

int yaze::app::zelda3::music::Tracker::numsndinst
private

Definition at line 203 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sndinit

int yaze::app::zelda3::music::Tracker::sndinit = 0
private

Definition at line 205 of file tracker.h.

◆ sndlen1

int yaze::app::zelda3::music::Tracker::sndlen1
private

Definition at line 207 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sndlen2

int yaze::app::zelda3::music::Tracker::sndlen2
private

Definition at line 208 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ m_ofs

int yaze::app::zelda3::music::Tracker::m_ofs
private

Definition at line 209 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ w_modf

int yaze::app::zelda3::music::Tracker::w_modf
private

Definition at line 210 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ ss_num

int yaze::app::zelda3::music::Tracker::ss_num
private

Definition at line 212 of file tracker.h.

Referenced by AllocSpcBlock(), and SaveSongs().

◆ ss_size

int yaze::app::zelda3::music::Tracker::ss_size
private

Definition at line 213 of file tracker.h.

Referenced by AllocSpcBlock(), and SaveSongs().

◆ op_len

char yaze::app::zelda3::music::Tracker::op_len[32]
private

Definition at line 215 of file tracker.h.

Referenced by LoadSpcCommand(), and SaveSpcCommand().

◆ snddat1

char* yaze::app::zelda3::music::Tracker::snddat1
private

Definition at line 217 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ snddat2

char* yaze::app::zelda3::music::Tracker::snddat2
private

Definition at line 218 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ ss_next

unsigned short yaze::app::zelda3::music::Tracker::ss_next = 0
private

Definition at line 220 of file tracker.h.

Referenced by AllocSpcBlock(), and SaveSongs().

◆ spclen

unsigned short yaze::app::zelda3::music::Tracker::spclen
private

Definition at line 221 of file tracker.h.

Referenced by GetSpcAddr(), and LoadSongs().

◆ numseg

unsigned short yaze::app::zelda3::music::Tracker::numseg
private

Definition at line 222 of file tracker.h.

◆ spcbank

short yaze::app::zelda3::music::Tracker::spcbank
private

Definition at line 224 of file tracker.h.

Referenced by GetSpcAddr(), LoadSongs(), and LoadSpcCommand().

◆ lastsr

short yaze::app::zelda3::music::Tracker::lastsr
private

Definition at line 225 of file tracker.h.

Referenced by LoadSpcCommand().

◆ ss_lasttime

short yaze::app::zelda3::music::Tracker::ss_lasttime
private

Definition at line 226 of file tracker.h.

Referenced by GetBlockTime().

◆ srnum

short yaze::app::zelda3::music::Tracker::srnum
private

Definition at line 227 of file tracker.h.

Referenced by EditTrack(), LoadSongs(), LoadSpcCommand(), NewSR(), and SaveSpcCommand().

◆ srsize

short yaze::app::zelda3::music::Tracker::srsize
private

Definition at line 228 of file tracker.h.

Referenced by LoadSongs(), LoadSpcCommand(), and NewSR().

◆ numsong

short yaze::app::zelda3::music::Tracker::numsong[3]
private

Definition at line 229 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ m_size

short yaze::app::zelda3::music::Tracker::m_size
private

◆ m_free

short yaze::app::zelda3::music::Tracker::m_free
private

Definition at line 231 of file tracker.h.

Referenced by AllocSpcCommand(), LoadSongs(), and LoadSpcCommand().

◆ m_modf

short yaze::app::zelda3::music::Tracker::m_modf
private

Definition at line 232 of file tracker.h.

Referenced by GetBlockTime(), SaveSongs(), SaveSpcCommand(), and WriteSpcData().

◆ m_loaded

short yaze::app::zelda3::music::Tracker::m_loaded
private

Definition at line 233 of file tracker.h.

Referenced by LoadSongs().

◆ t_loaded

short yaze::app::zelda3::music::Tracker::t_loaded
private

Definition at line 235 of file tracker.h.

◆ t_modf

short yaze::app::zelda3::music::Tracker::t_modf
private

Definition at line 236 of file tracker.h.

◆ withhead

short yaze::app::zelda3::music::Tracker::withhead
private

Definition at line 237 of file tracker.h.

◆ t_number

size_t yaze::app::zelda3::music::Tracker::t_number
private

Definition at line 239 of file tracker.h.

◆ songs

std::vector<Song> yaze::app::zelda3::music::Tracker::songs
private

Definition at line 241 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sp_mark

SongPart* yaze::app::zelda3::music::Tracker::sp_mark
private

Definition at line 242 of file tracker.h.

Referenced by LoadSongs().

◆ song_range_

SongRange* yaze::app::zelda3::music::Tracker::song_range_
private

Definition at line 243 of file tracker.h.

Referenced by EditTrack(), LoadSongs(), LoadSpcCommand(), NewSR(), and SaveSpcCommand().

◆ current_spc_command_

SpcCommand* yaze::app::zelda3::music::Tracker::current_spc_command_
private

◆ ssblt

SongSpcBlock** yaze::app::zelda3::music::Tracker::ssblt
private

Definition at line 246 of file tracker.h.

Referenced by AllocSpcBlock(), and SaveSongs().

◆ waves

ZeldaWave* yaze::app::zelda3::music::Tracker::waves
private

Definition at line 248 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ insts

ZeldaInstrument* yaze::app::zelda3::music::Tracker::insts
private

Definition at line 249 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sndinsts

ZeldaSfxInstrument* yaze::app::zelda3::music::Tracker::sndinsts
private

Definition at line 250 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().


The documentation for this class was generated from the following files: