From 8600686cd053da47e6a897afb8565f16360abd7f Mon Sep 17 00:00:00 2001 From: Zeldaboy14 Date: Thu, 3 Aug 2023 22:06:21 -0500 Subject: [PATCH] fix ia8 texture conversion (alpha channel) Just as Flotonic fixed it in Wumba's Wigwam. Now ia8's are parsed properly for exporting just like Bottles Glasses and Wumba's Wigwam. --- BanjoKazooieLevelEditor/F3DEX.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BanjoKazooieLevelEditor/F3DEX.cs b/BanjoKazooieLevelEditor/F3DEX.cs index e61feff..f2682f3 100644 --- a/BanjoKazooieLevelEditor/F3DEX.cs +++ b/BanjoKazooieLevelEditor/F3DEX.cs @@ -496,7 +496,7 @@ public byte[] CONVERT_IA8_RGBA8888(ref Texture texture, ref byte[] textureN64Byt for (int index4 = 0; index4 < texture.textureWidth; ++index4) { byte num1 = (byte) ((uint) textureN64Bytes[index2] >> 4); - byte num2 = (byte) ((int) textureN64Bytes[index2] << 4 >> 4); + byte num2 = (byte) ((int) textureN64Bytes[index2] & 0xF); numArray[index1] = (byte) ((uint) num1 * 17U); numArray[index1 + 1] = (byte) ((uint) num1 * 17U); numArray[index1 + 2] = (byte) ((uint) num1 * 17U);