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 173 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 66 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 198 of file tracker.h.

◆ mark_sr

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

Definition at line 200 of file tracker.h.

◆ mark_start

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

Definition at line 202 of file tracker.h.

◆ mark_end

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

Definition at line 203 of file tracker.h.

◆ mark_first

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

Definition at line 204 of file tracker.h.

◆ mark_last

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

Definition at line 205 of file tracker.h.

◆ numwave

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

Definition at line 207 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ numinst

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

Definition at line 208 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ numsndinst

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

Definition at line 209 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sndinit

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

Definition at line 211 of file tracker.h.

◆ sndlen1

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

Definition at line 213 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sndlen2

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

Definition at line 214 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ m_ofs

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

Definition at line 215 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ w_modf

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

Definition at line 216 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ ss_num

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

Definition at line 218 of file tracker.h.

Referenced by AllocSPCBlock(), and SaveSongs().

◆ ss_size

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

Definition at line 219 of file tracker.h.

Referenced by AllocSPCBlock(), and SaveSongs().

◆ op_len

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

Definition at line 221 of file tracker.h.

Referenced by LoadSPCCommand(), and SaveSPCCommand().

◆ snddat1

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

Definition at line 223 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ snddat2

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

Definition at line 224 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 226 of file tracker.h.

Referenced by AllocSPCBlock(), and SaveSongs().

◆ spclen

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

Definition at line 227 of file tracker.h.

Referenced by GetSPCAddr(), and LoadSongs().

◆ numseg

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

Definition at line 228 of file tracker.h.

◆ spcbank

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

Definition at line 230 of file tracker.h.

Referenced by GetSPCAddr(), LoadSongs(), and LoadSPCCommand().

◆ lastsr

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

Definition at line 231 of file tracker.h.

Referenced by LoadSPCCommand().

◆ ss_lasttime

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

Definition at line 232 of file tracker.h.

Referenced by GetBlockTime().

◆ srnum

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

Definition at line 233 of file tracker.h.

Referenced by EditTrack(), LoadSongs(), LoadSPCCommand(), NewSR(), and SaveSPCCommand().

◆ srsize

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

Definition at line 234 of file tracker.h.

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

◆ numsong

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

Definition at line 235 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 237 of file tracker.h.

Referenced by AllocSPCCommand(), LoadSongs(), and LoadSPCCommand().

◆ m_modf

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

Definition at line 238 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 239 of file tracker.h.

Referenced by LoadSongs().

◆ t_loaded

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

Definition at line 241 of file tracker.h.

◆ t_modf

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

Definition at line 242 of file tracker.h.

◆ withhead

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

Definition at line 243 of file tracker.h.

◆ t_number

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

Definition at line 245 of file tracker.h.

◆ songs

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

Definition at line 247 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sp_mark

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

Definition at line 248 of file tracker.h.

Referenced by LoadSongs().

◆ song_range_

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

Definition at line 249 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 252 of file tracker.h.

Referenced by AllocSPCBlock(), and SaveSongs().

◆ waves

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

Definition at line 254 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ insts

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

Definition at line 255 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().

◆ sndinsts

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

Definition at line 256 of file tracker.h.

Referenced by LoadSongs(), and SaveSongs().


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