mirror of
https://github.com/open-goal/jak-project
synced 2026-05-31 09:22:14 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user