mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Added missing modes on import
This commit is contained in:
+10
-1
@@ -81,11 +81,20 @@ int main(int argc, char *argv[]) {
|
||||
const auto modding_import = modding_root->add_subcommand("import", "Import - Import modified files to generate C code\n");
|
||||
const auto modding_export = modding_root->add_subcommand("export", "Export - Export modified files to a folder\n");
|
||||
|
||||
modding_import->add_option("mode", mode, "code, binary or header")->required();
|
||||
modding_import->add_option("<baserom.z64>", filename, "")->required()->check(CLI::ExistingFile);
|
||||
|
||||
modding_import->parse_complete_callback([&] {
|
||||
const auto instance = Companion::Instance = new Companion(filename, false, debug, true);
|
||||
instance->Init(ExportType::Code);
|
||||
if (mode == "code") {
|
||||
instance->Init(ExportType::Code);
|
||||
} else if (mode == "binary") {
|
||||
instance->Init(ExportType::Binary);
|
||||
} else if (mode == "header") {
|
||||
instance->Init(ExportType::Header);
|
||||
} else {
|
||||
std::cout << "Invalid mode" << std::endl;
|
||||
}
|
||||
});
|
||||
|
||||
modding_export->add_option("<baserom.z64>", filename, "")->required()->check(CLI::ExistingFile);
|
||||
|
||||
Reference in New Issue
Block a user