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

Method ExportCellText

Source/TextExporter.cpp:475–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473// =============================================================================
474
475CStringA CTextExport::ExportCellText(const stChanNote &stCell, unsigned int nEffects, bool bNoise) // // //
476{
477 CStringA s = "...";
478 if (bNoise && (is_note(stCell.Note) || stCell.Note == note_t::echo)) // // //
479 s = FormattedA("%01X-#", stCell.ToMidiNote() & 0x0F);
480 else if (stCell.Note <= note_t::echo)
481 s = GetNoteString(stCell).data();
482
483 s += (stCell.Instrument == MAX_INSTRUMENTS) ? CStringA(" ..") :
484 (stCell.Instrument == HOLD_INSTRUMENT) ? CStringA(" &&") : FormattedA(" %02X", stCell.Instrument); // // // 050B
485
486 s += (stCell.Vol == 0x10) ? CStringA(" .") : FormattedA(" %01X", stCell.Vol); // // //
487
488 for (unsigned int e=0; e < nEffects; ++e)
489 if (stCell.Effects[e].fx == effect_t::none)
490 s.Append(" ...");
491 else
492 AppendFormatA(s, " %c%02X", EFF_CHAR[value_cast(stCell.Effects[e].fx)], stCell.Effects[e].param);
493
494 return s;
495}
496
497// =============================================================================
498

Callers

nothing calls this directly

Calls 7

is_noteFunction · 0.85
FormattedAFunction · 0.85
GetNoteStringFunction · 0.85
AppendFormatAFunction · 0.85
value_castFunction · 0.85
ToMidiNoteMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected