Decompile texInflateNonZlib

This commit is contained in:
Ryan Dwyer
2022-02-17 17:30:17 +10:00
parent c69f70c5a9
commit 9fd5942f1c
8 changed files with 396 additions and 846 deletions
+2 -2
View File
@@ -255,8 +255,8 @@ extern void *var800aabb4;
extern struct var800aabb8 *var800aabb8;
extern struct texture *g_Textures;
extern struct texturething var800aabc8;
extern u8 var800aabd8[2400];
extern u32 var800ab538;
extern struct texcacheitem g_TexCacheItems[150];
extern s32 g_TexCacheCount;
extern u8 *var800ab540;
extern u32 var800ab544;
extern s32 var800ab548;
+25
View File
@@ -3886,6 +3886,31 @@
#define TELEPORTSTATE_WHITE 3
#define TELEPORTSTATE_EXITING 4
#define TEXCOMPMETHOD_0 0
#define TEXCOMPMETHOD_1 1
#define TEXCOMPMETHOD_HUFFMAN2 2
#define TEXCOMPMETHOD_HUFFMAN3 3
#define TEXCOMPMETHOD_RLE 4
#define TEXCOMPMETHOD_LOOKUP 5
#define TEXCOMPMETHOD_HUFFMANLOOKUP 6
#define TEXCOMPMETHOD_RLELOOKUP 7
#define TEXCOMPMETHOD_HUFFMANPREPROCESSED 8
#define TEXCOMPMETHOD_9 9
#define TEXFORMAT_RGBA32 0x00 // 32-bit RGBA (8/8/8/8)
#define TEXFORMAT_RGBA16 0x01 // 16-bit RGBA (5/5/5/1)
#define TEXFORMAT_RGB24 0x02 // 24-bit RGB (8/8/8)
#define TEXFORMAT_RGB15 0x03 // 15-bit RGB (5/5/5)
#define TEXFORMAT_IA16 0x04 // 16-bit grayscale+alpha
#define TEXFORMAT_IA8 0x05 // 8-bit grayscale+alpha (4/4)
#define TEXFORMAT_IA4 0x06 // 4-bit grayscale+alpha (3/1)
#define TEXFORMAT_I8 0x07 // 8-bit grayscale
#define TEXFORMAT_I4 0x08 // 4-bit grayscale
#define TEXFORMAT_RGBA16_CI8 0x09 // 16-bit 5551 paletted colour with 8-bit palette indexes
#define TEXFORMAT_RGBA16_CI4 0x0a // 16-bit 5551 paletted colour with 4-bit palette indexes
#define TEXFORMAT_IA16_CI8 0x0b // 16-bit 88 paletted greyscale+alpha with 8-bit palette indexes
#define TEXFORMAT_0C 0x0c
#define THREAD_RMON 0
#define THREAD_IDLE 1
#define THREAD_SCHED 2
+15 -15
View File
@@ -5,7 +5,7 @@
#include "types.h"
void func0f16e810(u32 arg0);
s32 texLoadZlib(u8 *ptr, u32 *texturenum, s32 arg2, s32 lod, struct texturething *arg4, s32 arg5);
s32 texInflateZlib(u8 *ptr, u32 *texturenum, s32 arg2, s32 lod, struct texturething *arg4, s32 arg5);
u32 func0f16edac(void);
u32 func0f16ee58(void);
u32 func0f16eefc(void);
@@ -14,19 +14,19 @@ u32 func0f16f044(void);
u32 func0f16f0f4(void);
u32 func0f16fc8c(void);
s32 func0f16fd50(u16 *arg0, s32 arg1, s32 arg2, s32 arg3);
s32 texLoadNonZlib(u8 *ptr, u32 *texturenum, s32 arg2, s32 lod, struct texturething *arg4, s32 arg5);
u32 func0f1706ec(void);
u32 func0f1711b4(void);
u32 func0f171558(void);
u32 func0f171724(void);
s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texturething *arg4, s32 arg5);
s32 func0f1706ec(u8 *arg0, u8 *arg1, s32 arg2, s32 arg3, s32 format);
void func0f1711b4(u8 *arg0, s32 arg1, s32 chansize);
void texInflateRle(u8 *arg0, s32 arg1);
s32 texBuildLookup(u8 *arg0, s32 bpp);
s32 func0f171828(s32 arg0);
void func0f17184c(u8 *arg0, s32 arg1);
u32 func0f1718a0(void);
u32 func0f171ba8(void);
u32 func0f17218c(void);
u32 func0f172554(void);
u32 func0f1729f8(void);
u32 func0f172b5c(void);
void texReadAlphaBits(u8 *dst, s32 count);
s32 texInflateMethod1(u8 *arg0, s32 width, s32 height, s32 format);
s32 func0f171ba8(u8 *arg0, s32 width, s32 height, u8 *arg3, s32 format);
s32 func0f17218c(s32 width, s32 height, u8 *arg2, u8 *arg3, s32 arg4, s32 format);
s32 func0f172554(u8 *arg0, s32 width, s32 height, u8 *arg3, u8 *arg4, s32 arg5, s32 format);
void func0f1729f8(u8 *arg0, s32 width, s32 height, s32 format);
void func0f172b5c(u8 *arg0, s32 width, s32 arg2, s32 arg3, s32 chansize);
void func0f172e70(s32 *arg0, void *arg1, s32 arg2);
struct texloadthing *func0f172e8c(s32 texturenum, struct texturething *arg1);
s32 func0f172f44(struct texturething *arg0);
@@ -35,8 +35,8 @@ void texLoadFromDisplayList(Gfx *gdl, struct texturething *arg1, s32 arg2);
void texLoad(u32 *texturenum, struct texturething *arg1, s32 arg2);
void texLoadFromConfigs(struct textureconfig *configs, s32 numconfigs, struct texturething *arg2, s32 arg3);
void texLoadFromTextureNum(u32 arg0, struct texturething *arg1);
void func0f173520(u8 *arg0);
s32 func0f17353c(s32 arg0);
void texSetBitstring(u8 *arg0);
s32 texReadBits(s32 arg0);
void texturesLoadConfigs(void);
#endif
+14 -5
View File
@@ -6764,16 +6764,19 @@ struct texturething {
};
struct texloadthing {
u16 unk00_00 : 12;
u16 texturenum : 12;
u16 unk00_0c : 4;
void *unk04;
s16 unk08;
u16 unk0a;
u8 width;
u8 height;
u8 unk0a;
u8 unk0b_00 : 3;
u8 gbiformat : 3;
u8 unk0b_06 : 2;
union {
u32 unk0c;
struct {
u32 unk0c_00 : 1;
u32 unk0c_01 : 1;
u32 unk0c_00 : 2;
u32 unk0c_02 : 1;
u32 unk0c_03 : 1;
u32 unk0c_04 : 24;
@@ -6781,4 +6784,10 @@ struct texloadthing {
};
};
struct texcacheitem {
s16 texturenum;
u8 widths[7];
u8 heights[7];
};
#endif