Minor bug fixes (#2128)

- make sure bsp is processed on `l` levels in extraction (caused missing
remaps)
- clean up a few prints in extraction
- handle the <15 byte differences in art group files automatically (no
more errors about file naming)
- fix potential exception thrown by merc2 in a few ways: fixed bad data
in FR3's, check texture index just in case, and handle exceptions a
little bit better (still a crash, but at least you get a print)
- fix mips2 ocean stuff causing ocean far crashes
This commit is contained in:
water111
2023-01-14 16:26:17 -05:00
committed by GitHub
parent 8a82c2225e
commit a0d2bce27b
20 changed files with 181 additions and 88 deletions
+8
View File
@@ -16,6 +16,14 @@ bool starts_with(const std::string& s, const std::string& prefix) {
return s.rfind(prefix) == 0;
}
bool ends_with(const std::string& s, const std::string& suffix) {
if (s.length() >= suffix.length()) {
return !s.compare(s.length() - suffix.length(), suffix.length(), suffix);
} else {
return false;
}
}
std::string ltrim(const std::string& s) {
size_t start = s.find_first_not_of(WHITESPACE);
return (start == std::string::npos) ? "" : s.substr(start);