mirror of
https://github.com/open-goal/jak-project
synced 2026-05-26 23:47:57 -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:
@@ -231,6 +231,7 @@ static void link_v2_or_v4(LinkedObjectFile& f,
|
||||
const std::string& name,
|
||||
DecompilerTypeSystem& dts,
|
||||
GameVersion version) {
|
||||
(void)name;
|
||||
const auto* header = (const LinkHeaderV4*)&data.at(0);
|
||||
ASSERT(header->version == 4 || header->version == 2);
|
||||
|
||||
@@ -313,7 +314,8 @@ static void link_v2_or_v4(LinkedObjectFile& f,
|
||||
for (uint8_t i = 0; i < count; i++) {
|
||||
if (!f.pointer_link_word(0, code_ptr_offset - code_offset, 0,
|
||||
*((const uint32_t*)(&data.at(code_ptr_offset))))) {
|
||||
lg::error("Skipping link in {} because it is out of range!", name.c_str());
|
||||
// was this just a bug in the linker??
|
||||
// lg::error("Skipping link in {} because it is out of range!", name.c_str());
|
||||
}
|
||||
f.stats.total_v2_pointers++;
|
||||
code_ptr_offset += 4;
|
||||
@@ -680,13 +682,6 @@ static void link_v3(LinkedObjectFile& f,
|
||||
segment_size++;
|
||||
adjusted = true;
|
||||
}
|
||||
|
||||
if (adjusted) {
|
||||
printf(
|
||||
"Adjusted the size of segment %d in %s, this is fine, but rare (and may indicate a "
|
||||
"bigger problem if it happens often)\n",
|
||||
seg_id, name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
auto base_ptr = segment_data_offsets[seg_id];
|
||||
|
||||
Reference in New Issue
Block a user