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

Method StorePatternChunk

Source/ChunkRenderText.cpp:383–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383void CChunkRenderText::StorePatternChunk(const CChunk *pChunk)
384{
385 // Patterns
386 std::string str = "; Bank " + conv::from_uint(pChunk->GetBank()) + "\n";
387 str += GetLabelString(pChunk->GetLabel()) + ":\n";
388
389 const std::vector<unsigned char> &vec = pChunk->GetStringData(0); // // //
390 str += GetByteString(vec, DEFAULT_LINE_BREAK).data();
391/*
392 len = vec.size();
393 for (int i = 0; i < len; ++i) {
394 str += "$%02X", (unsigned char)vec[i]);
395 if ((i % 20 == 19) && (i < len - 1))
396 str += "\n\t.byte ";
397 else {
398 if (i < len - 1)
399 str += ", ";
400 }
401 }
402*/
403 str.push_back('\n');
404
405 m_songDataStrings.push_back(std::move(str));
406}
407
408void CChunkRenderText::StoreWavetableChunk(const CChunk *pChunk)
409{

Callers

nothing calls this directly

Calls 4

from_uintFunction · 0.85
GetBankMethod · 0.45
GetStringDataMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected