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

Method StoreInstrumentChunk

Source/ChunkRenderText.cpp:224–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224void CChunkRenderText::StoreInstrumentChunk(const CChunk *pChunk)
225{
226 int len = pChunk->GetLength();
227
228 std::string str = GetLabelString(pChunk->GetLabel()) + ":\n\t.byte " + conv::from_uint(pChunk->GetData(0)) + "\n";
229
230 for (int i = 1; i < len; ++i) {
231 if (pChunk->IsDataPointer(i))
232 str += "\t.word " + GetLabelString(pChunk->GetDataPointerTarget(i)) + "\n";
233 else if (pChunk->GetDataSize(i) == 1)
234 str += "\t.byte $" + conv::from_uint_hex(pChunk->GetData(i), 2) + "\n";
235 else
236 str += "\t.word $" + conv::from_uint_hex(pChunk->GetData(i), 4) + "\n";
237 }
238
239 str.push_back('\n');
240
241 m_instrumentStrings.push_back(std::move(str));
242}
243
244void CChunkRenderText::StoreSequenceChunk(const CChunk *pChunk)
245{

Callers

nothing calls this directly

Calls 7

from_uintFunction · 0.85
from_uint_hexFunction · 0.85
IsDataPointerMethod · 0.80
GetDataPointerTargetMethod · 0.80
GetLengthMethod · 0.45
GetDataMethod · 0.45
GetDataSizeMethod · 0.45

Tested by

no test coverage detected