decompiler: fix missing merc and shrub texture replacements (#4405)

fixes a regression introduced in #4278
This commit is contained in:
tripp
2026-09-04 09:29:19 -04:00
committed by GitHub
parent e08d934dbd
commit 7bad6c10a9
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -758,13 +758,14 @@ s32 find_or_add_texture_to_level(tfrag3::Level& out,
}
} else {
idx_in_level_texture = out.textures.size();
auto resolved = tex_db.resolve_texture(pc_combo_tex_id);
auto& new_tex = out.textures.emplace_back();
new_tex.combo_id = pc_combo_tex_id;
new_tex.w = tex_it->second.w;
new_tex.h = tex_it->second.h;
new_tex.w = resolved.w;
new_tex.h = resolved.h;
new_tex.debug_name = tex_it->second.name;
new_tex.debug_tpage_name = tex_db.tpage_names.at(tex_it->second.page);
new_tex.data = tex_it->second.rgba_bytes;
new_tex.data = std::move(resolved.rgba);
}
}
+4 -3
View File
@@ -490,16 +490,17 @@ void make_draws(tfrag3::Level& lev,
combo_tex, combo_tex >> 16, combo_tex & 0xffff, combo_tex & 0xffff));
}
}
auto resolved = tdb.resolve_texture(combo_tex);
// add a new texture to the level data
idx_in_lev_data = lev.textures.size();
lev.textures.emplace_back();
auto& new_tex = lev.textures.back();
new_tex.combo_id = combo_tex;
new_tex.w = tex_it->second.w;
new_tex.h = tex_it->second.h;
new_tex.w = resolved.w;
new_tex.h = resolved.h;
new_tex.debug_name = tex_it->second.name;
new_tex.debug_tpage_name = tdb.tpage_names.at(tex_it->second.page);
new_tex.data = tex_it->second.rgba_bytes;
new_tex.data = std::move(resolved.rgba);
}
DrawMode mode = draw.settings.mode;