Decompile texSelect

This commit is contained in:
Ryan Dwyer
2022-04-17 13:48:31 +10:00
parent 4bc38da09a
commit 2c01a9a557
36 changed files with 584 additions and 1288 deletions
+1 -1
View File
@@ -264,7 +264,7 @@ extern u8 *var800ab540;
extern u32 var800ab544;
extern s32 var800ab548;
extern s32 g_TexNumConfigs;
extern u32 *g_TexWords;
extern struct texloadthing **g_TexWords;
extern struct textureconfig *g_TexWallhitConfigs;
extern Gfx *g_TexGdl1;
extern Gfx *g_TexGdl2;
+3 -3
View File
@@ -10,11 +10,11 @@ void surface0f173a08(void);
bool surface0f173a44(u32 value);
bool surface0f173a70(s32 index, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 arg10);
bool surface0f173b8c(s32 index, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
u32 surface0f173c10(void);
u32 surface0f173cb8(void);
s32 surface0f173c10(struct texloadthing *arg0, s32 arg1);
s32 surface0f173cb8(struct texloadthing *arg0, s32 arg1);
u32 surface0f173d60(void);
u32 surface0f173e10(void);
u32 surface0f173e50(void);
void surface0f173e50(struct texloadthing *arg0, s32 *arg1, s32 *arg2);
s32 surface0f173f18(s32 arg0);
u32 surface0f173f48(u32 arg0);
u32 surface0f173f78(void);
+7 -7
View File
@@ -6,13 +6,13 @@
void texInit(void);
s32 tex0f0b3350(s32 value);
s32 tex0f0b33f8(s32 arg0, s32 arg1, s32 arg2);
s32 tex0f0b3468(s32 arg0, s32 arg1, s32 arg2);
s32 tex0f0b34d8(s32 arg0, s32 arg1, s32 arg2);
s32 tex0f0b3548(s32 arg0, s32 arg1, s32 arg2);
s32 texGetMask(s32 value);
s32 tex0f0b33f8(s32 width, s32 height, s32 lod);
s32 tex0f0b3468(s32 width, s32 height, s32 lod);
s32 tex0f0b34d8(s32 width, s32 height, s32 lod);
s32 tex0f0b3548(s32 width, s32 height, s32 lod);
void texSetRenderMode(Gfx **gdlptr, s32 arg1, s32 numcycles, s32 arg3);
void tex0f0b3988(struct textureconfig *config);
void tex0f0b39c0(Gfx **gdl, struct textureconfig *arg1, u32 arg2, u32 arg3, u32 arg4, s32 arg5, u32 *arg6);
void texLoadFromConfig(struct textureconfig *config);
void texSelect(Gfx **gdl, struct textureconfig *tconfig, u32 arg2, s32 arg3, u32 arg4, bool arg5, struct texturething *arg6);
#endif
+7
View File
@@ -94,6 +94,13 @@
#define gDPTri1(pkt, x1, y1, z1) \
gDPTri4(pkt, x1, y1, z1, 0, 0, 0, 0, 0, 0, 0, 0, 0)
#define gDPLoadTLUT06(pkt, a, b, c, d) \
{ \
Gfx *_g = (Gfx *)pkt; \
_g->words.w0 = _SHIFTL(G_LOADTLUT, 24, 8) | _SHIFTL((a), 14, 10) | _SHIFTL((b), 2, 10); \
_g->words.w1 = _SHIFTL(0x06, 24, 8) | _SHIFTL((c), 14, 10) | _SHIFTL((d), 2, 10); \
}
/**
* Like gDPSetPrimColor, but is useful when the input colour is already in
* RGBA format. It avoids unnecessary bitshifting and masking.
+13 -13
View File
@@ -6725,19 +6725,19 @@ struct texturething {
};
struct texloadthing {
u16 texturenum : 12;
u16 unk00_0c : 4;
u32 unk04;
u8 width;
u8 height;
u8 unk0a;
u8 unk0b_00 : 3;
u8 gbiformat : 3;
u8 unk0b_06 : 2;
u32 unk0c_00 : 2;
u32 unk0c_02 : 1;
u32 unk0c_03 : 1;
u32 unk0c_04 : 24;
/*0x00*/ u16 texturenum : 12;
/*0x00*/ u16 unk00_0c : 4;
/*0x04*/ u32 unk04;
/*0x08*/ u8 width;
/*0x09*/ u8 height;
/*0x0a*/ u8 unk0a;
/*0x0b*/ u8 unk0b_00 : 3;
/*0x0b*/ u8 gbiformat : 3;
/*0x0b*/ u8 depth : 2;
/*0x0c*/ u32 lutmodeindex : 2;
/*0x0c*/ u32 unk0c_02 : 1;
/*0x0c*/ u32 unk0c_03 : 1;
/*0x0c*/ u32 unk0c_04 : 24;
};
struct texcacheitem {