extractor: cleanup, support unicode properly, and add multi-game support (#1609)

* extractor: refactor and cleanup for multi-game support

* deps: switch to `ghc::filesystem` as it is utf-8 everywhere by default

* extractor: finally working with unicode

* unicode: fix unicode cli args on windows in all `main` functions
This commit is contained in:
Tyler Wilding
2022-07-05 20:38:13 -04:00
committed by GitHub
parent ac1e620161
commit 6446389263
70 changed files with 7010 additions and 765 deletions
+11 -1
View File
@@ -8,6 +8,7 @@
#include "decompiler/level_extractor/BspHeader.h"
#include "common/util/Assert.h"
#include <common/util/unicode_util.h>
constexpr GameVersion kGameVersion = GameVersion::Jak1;
@@ -55,6 +56,15 @@ bool is_valid_bsp(const decompiler::LinkedObjectFile& file) {
}
int main(int argc, char** argv) {
#ifdef _WIN32
auto args = get_widechar_cli_args();
std::vector<char*> string_ptrs;
for (auto& str : args) {
string_ptrs.push_back(str.data());
}
argv = string_ptrs.data();
#endif
try {
fmt::print("Level Dump Tool\n");
@@ -92,4 +102,4 @@ int main(int argc, char** argv) {
}
return 0;
}
}