decompiler: allow jak 3 texture and model extraction (#3080)

Added some hacks and stubs to allow extracting textures and models.
This commit is contained in:
Hat Kid
2023-10-12 01:32:12 +02:00
committed by GitHub
parent 6285c61662
commit 5be46c9852
27 changed files with 370 additions and 32 deletions
+4 -2
View File
@@ -856,7 +856,8 @@ ConvertedMercEffect convert_merc_effect(const MercEffect& input_effect,
u32 tidx = (env >> 8) & 0b1111'1111'1111;
tex_combo = (((u32)tpage) << 16) | tidx;
} break;
case GameVersion::Jak2: {
case GameVersion::Jak2:
case GameVersion::Jak3: {
u32 tpage = 0x1f;
u32 tidx = 2;
tex_combo = (((u32)tpage) << 16) | tidx;
@@ -891,7 +892,8 @@ ConvertedMercEffect convert_merc_effect(const MercEffect& input_effect,
bool use_alpha_blend = false;
bool depth_write = true;
if (version == GameVersion::Jak2) {
// TODO check jak 3
if (version >= GameVersion::Jak2) {
constexpr int kWaterTexture = 4;
constexpr int kAlphaTexture = 3;
if (input_effect.texture_index == kAlphaTexture) {