| 103 | } |
| 104 | |
| 105 | void CChunkRenderText::StoreChunks(const std::vector<std::shared_ptr<CChunk>> &Chunks) // // // |
| 106 | { |
| 107 | // Generate strings |
| 108 | for (auto &pChunk : Chunks) |
| 109 | for (const auto &f : RENDER_FUNCTIONS) |
| 110 | if (pChunk->GetType() == f.type) |
| 111 | (this->*(f.function))(pChunk.get()); |
| 112 | |
| 113 | // Write strings to file |
| 114 | WriteFileString("; 0CC-FamiTracker exported music data: "); |
| 115 | WriteFileString(FTEnv.GetDocumentTitle()); // // // |
| 116 | WriteFileString("\n;\n\n"); |
| 117 | |
| 118 | // Module header |
| 119 | DumpStrings("; Module header\n", "\n", m_headerStrings); |
| 120 | |
| 121 | // Instrument list |
| 122 | DumpStrings("; Instrument pointer list\n", "\n", m_instrumentListStrings); |
| 123 | DumpStrings("; Instruments\n", "", m_instrumentStrings); |
| 124 | |
| 125 | // Sequences |
| 126 | DumpStrings("; Sequences\n", "\n", m_sequenceStrings); |
| 127 | |
| 128 | // Waves (FDS & N163) |
| 129 | if (!m_wavetableStrings.empty()) |
| 130 | DumpStrings("; FDS waves\n", "\n", m_wavetableStrings); |
| 131 | |
| 132 | if (!m_wavesStrings.empty()) |
| 133 | DumpStrings("; N163 waves\n", "\n", m_wavesStrings); |
| 134 | |
| 135 | // Samples |
| 136 | DumpStrings("; DPCM instrument list (pitch, sample index)\n", "\n", m_sampleListStrings); |
| 137 | DumpStrings("; DPCM samples list (location, size, bank)\n", "\n", m_samplePointersStrings); |
| 138 | |
| 139 | // // // Grooves |
| 140 | DumpStrings("; Groove list\n", "", m_grooveListStrings); |
| 141 | DumpStrings("; Grooves (size, terms)\n", "\n", m_grooveStrings); |
| 142 | |
| 143 | // Songs |
| 144 | DumpStrings("; Song pointer list\n", "\n", m_songListStrings); |
| 145 | DumpStrings("; Song info\n", "\n", m_songStrings); |
| 146 | |
| 147 | // Song data |
| 148 | DumpStrings(";\n; Pattern and frame data for all songs below\n;\n\n", "", m_songDataStrings); |
| 149 | |
| 150 | // Actual DPCM samples are stored later |
| 151 | } |
| 152 | |
| 153 | void CChunkRenderText::StoreSamples(const std::vector<std::shared_ptr<const ft0cc::doc::dpcm_sample>> &Samples) // // // |
| 154 | { |
no test coverage detected