port: hackfix some more RGBA32 textures

This commit is contained in:
fgsfds committed 2023-11-22 22:19:54 +01:00
1 parent 7e929c2432
commit 3328e147eb
1 file changed
+6 -1
+6 -1
View File
@@ -860,12 +860,17 @@ static void import_texture(int i, int tile, bool importReplacement) {
if (rdp.tex_lod || !loaded_texture.addr) {
// set up miplevel 0; also acts as a catch-all for when .addr is NULL because my texture loader sucks
loaded_texture.addr = rdp.texture_to_load.addr;
loaded_texture.line_size_bytes = rdp.texture_tile[tile].line_size_bytes;
loaded_texture.full_image_line_size_bytes = rdp.texture_tile[tile].line_size_bytes;
loaded_texture.full_size_bytes = loaded_texture.full_image_line_size_bytes * rdp.texture_tile[tile].height;
loaded_texture.size_bytes = loaded_texture.line_size_bytes * rdp.texture_tile[tile].height;
if (siz == G_IM_SIZ_32b) {
// HACK: fixup 32-bit LODed texture height
loaded_texture.size_bytes <<= 1;
loaded_texture.full_size_bytes <<= 1;
}
loaded_texture.orig_size_bytes = loaded_texture.size_bytes;
loaded_texture.addr = rdp.texture_to_load.addr;
}
const RawTexMetadata* metadata = &loaded_texture.raw_tex_metadata;