diff options
| author | Jeod <47716344+JeodC@users.noreply.github.com> | 2026-08-23 20:57:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-23 18:57:04 -0600 |
| commit | a93519e66eabb62005d278cce46b4d593bceed83 (patch) | |
| tree | 34f25bc20de8d330c6ed5a4b8ef72618b0f7789a /src/Companion.cpp | |
| parent | e9faa26c74a839d3c7995dfba7cad0fe6cd4af29 (diff) | |
Fully parse bk64 soundfont for modding (#256)
* Fully parse bk64 soundfont for modding
* Match N64MidiTool loop name convention
Diffstat (limited to 'src/Companion.cpp')
| -rw-r--r-- | src/Companion.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp index 04ae28f..f30bc3c 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -112,7 +112,8 @@ #include "factories/bk64/SpriteFactory.h" #include "factories/bk64/ModelFactory.h" #include "factories/bk64/MapFactory.h" -#include "factories/bk64/SoundfontTblFactory.h" +#include "factories/bk64/MusicFactory.h" +#include "factories/bk64/SoundfontFactory.h" #endif #ifdef MARIO_ARTIST_SUPPORT @@ -285,8 +286,8 @@ void Companion::Init(const ExportType type, std::atomic<size_t>& assetCount, boo this->RegisterFactory("BK64:MAP", std::make_shared<BK64::MapFactory>()); this->RegisterFactory("BK64:QUIZQ", std::make_shared<BK64::QuizQuestionFactory>()); this->RegisterFactory("BK64:MODEL", std::make_shared<BK64::ModelFactory>()); - this->RegisterFactory("BK64:SOUNDFONT_CTL", std::make_shared<BK64::SoundfontCtlFactory>()); - this->RegisterFactory("BK64:SOUNDFONT_TBL", std::make_shared<BK64::SoundfontTblFactory>()); + this->RegisterFactory("BK64:MUSIC", std::make_shared<BK64::MusicFactory>()); + this->RegisterFactory("BK64:SOUNDFONT", std::make_shared<BK64::SoundfontFactory>()); this->RegisterFactory("BK64:SPRITE", std::make_shared<BK64::SpriteFactory>()); #endif @@ -483,7 +484,9 @@ std::optional<ParseResultData> Companion::ParseNode(YAML::Node& node, std::strin std::vector<uint8_t> data = std::vector<uint8_t>(std::istreambuf_iterator(input), {}); input.close(); + this->gCurrentModdingSource = path.filename().string(); result = impl->parse_modding(data, node); + this->gCurrentModdingSource.clear(); executeDef = !result.has_value(); } } @@ -529,6 +532,8 @@ void Companion::ParseModdingConfig() { } void Companion::ParseCurrentFileConfig(YAML::Node node, std::atomic<size_t>& assetCount) { + this->gCurrentFileConfig = node; + if (node["external_files"]) { auto externalFiles = node["external_files"]; if (externalFiles.IsSequence() && externalFiles.size()) { |
