mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
guesses at folders
This commit is contained in:
parent
bd15e47506
commit
c5de535f50
|
@ -310,14 +310,30 @@ std::string ObjectFileDB::generate_dgo_listing() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
std::string pad_string(const std::string& in, size_t length) {
|
||||||
|
assert(in.length() < length);
|
||||||
|
return in + std::string(length - in.length(), ' ');
|
||||||
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
std::string ObjectFileDB::generate_obj_listing() {
|
std::string ObjectFileDB::generate_obj_listing() {
|
||||||
std::string result;
|
std::string result;
|
||||||
std::set<std::string> all_unique_names;
|
std::set<std::string> all_unique_names;
|
||||||
int unique_count = 0;
|
int unique_count = 0;
|
||||||
for (auto& obj_file : obj_file_order) {
|
for (auto& obj_file : obj_file_order) {
|
||||||
for (auto& x : obj_files_by_name.at(obj_file)) {
|
for (auto& x : obj_files_by_name.at(obj_file)) {
|
||||||
result +=
|
std::string dgos = "[";
|
||||||
x.to_unique_name() + +", " + x.name_in_dgo + ", " + std::to_string(x.obj_version) + "\n";
|
for (auto& y : x.dgo_names) {
|
||||||
|
assert(y.length() >= 5);
|
||||||
|
dgos += "\"" + y.substr(0, y.length() - 4) + "\", ";
|
||||||
|
}
|
||||||
|
dgos.pop_back();
|
||||||
|
dgos.pop_back();
|
||||||
|
dgos += "]";
|
||||||
|
result += "[\"" + pad_string(x.to_unique_name() + "\", ", 40) + "\"" +
|
||||||
|
pad_string(x.name_in_dgo + "\", ", 30) + std::to_string(x.obj_version) + ", " +
|
||||||
|
dgos + ", \"\"],\n";
|
||||||
unique_count++;
|
unique_count++;
|
||||||
all_unique_names.insert(x.to_unique_name());
|
all_unique_names.insert(x.to_unique_name());
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue