mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user