MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / StoreSongChunk

Method StoreSongChunk

Source/ChunkRenderText.cpp:320–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320void CChunkRenderText::StoreSongChunk(const CChunk *pChunk)
321{
322 std::string str = GetLabelString(pChunk->GetLabel()) + ":\n";
323
324 for (int i = 0; i < pChunk->GetLength();) {
325 str += "\t.word " + GetLabelString(pChunk->GetDataPointerTarget(i++)) + "\n";
326 str += "\t.byte " + conv::from_uint(pChunk->GetData(i++)) + "\t; frame count\n";
327 str += "\t.byte " + conv::from_uint(pChunk->GetData(i++)) + "\t; pattern length\n";
328 str += "\t.byte " + conv::from_uint(pChunk->GetData(i++)) + "\t; speed\n";
329 str += "\t.byte " + conv::from_uint(pChunk->GetData(i++)) + "\t; tempo\n";
330 str += "\t.byte " + conv::from_uint(pChunk->GetData(i++)) + "\t; groove position\n"; // // //
331 str += "\t.byte " + conv::from_uint(pChunk->GetData(i++)) + "\t; initial bank\n";
332 }
333
334 str.push_back('\n');
335
336 m_songStrings.push_back(std::move(str));
337}
338
339void CChunkRenderText::StoreFrameListChunk(const CChunk *pChunk)
340{

Callers

nothing calls this directly

Calls 4

from_uintFunction · 0.85
GetDataPointerTargetMethod · 0.80
GetLengthMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected