Merge pull request #360 from gamemasterplc/main

Decompile m413dll
This commit is contained in:
Liam Coleman 2024-06-25 10:06:08 -05:00 committed by GitHub
commit 85e52a8f51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 2227 additions and 27 deletions

View file

@ -23,7 +23,10 @@ fn_1_D700 = .text:0x0000D700; // type:function size:0x64
_ctors = .ctors:0x00000000; // type:label scope:global data:4byte
_dtors = .dtors:0x00000000; // type:label scope:global data:4byte
lbl_1_rodata_0 = .rodata:0x00000000; // type:object size:0x10 data:double
lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x38 data:float
lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x18 data:float
lbl_1_rodata_28 = .rodata:0x00000028; // type:object size:0x4 data:float
lbl_1_rodata_2C = .rodata:0x0000002C; // type:object size:0x18 data:float
lbl_1_rodata_44 = .rodata:0x00000044; // type:object size:0x4 data:float
lbl_1_rodata_48 = .rodata:0x00000048; // type:object size:0x8 data:double
lbl_1_rodata_50 = .rodata:0x00000050; // type:object size:0x8 data:double
lbl_1_rodata_58 = .rodata:0x00000058; // type:object size:0x8 data:double
@ -172,7 +175,8 @@ lbl_1_rodata_A30 = .rodata:0x00000A30; // type:object size:0x4 data:float
lbl_1_rodata_A34 = .rodata:0x00000A34; // type:object size:0x4 data:float
lbl_1_data_0 = .data:0x00000000; // type:object size:0x4 data:4byte
lbl_1_data_4 = .data:0x00000004; // type:object size:0x8 data:4byte
lbl_1_data_C = .data:0x0000000C; // type:object size:0x2C data:4byte
lbl_1_data_C = .data:0x0000000C; // type:object size:0x10 data:4byte
lbl_1_data_1C = .data:0x0000001C; // type:object size:0x1C data:float
lbl_1_data_38 = .data:0x00000038; // type:object size:0x9 data:string
lbl_1_data_41 = .data:0x00000041; // type:object size:0x19 data:string
lbl_1_data_5A = .data:0x0000005A; // type:object size:0x1B data:string
@ -189,13 +193,15 @@ lbl_1_data_10D = .data:0x0000010D; // type:object size:0xF data:string
lbl_1_data_11C = .data:0x0000011C; // type:object size:0x19 data:string
lbl_1_data_135 = .data:0x00000135; // type:object size:0x24 data:string
lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte
lbl_1_bss_4 = .bss:0x00000004; // type:object size:0xC data:4byte
lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte
lbl_1_bss_8 = .bss:0x00000008; // type:object size:0x8 data:4byte
lbl_1_bss_10 = .bss:0x00000010; // type:object size:0x4 data:4byte
lbl_1_bss_14 = .bss:0x00000014; // type:object size:0x2 data:2byte
lbl_1_bss_18 = .bss:0x00000018; // type:object size:0x4 data:4byte
lbl_1_bss_1C = .bss:0x0000001C; // type:object size:0x4 data:4byte
lbl_1_bss_20 = .bss:0x00000020; // type:object size:0x2 data:2byte
lbl_1_bss_24 = .bss:0x00000024; // type:object size:0x8 data:4byte
lbl_1_bss_24 = .bss:0x00000024; // type:object size:0x4 data:4byte
lbl_1_bss_28 = .bss:0x00000028; // type:object size:0x4 data:4byte
lbl_1_bss_2C = .bss:0x0000002C; // type:object size:0x4 data:float
lbl_1_bss_30 = .bss:0x00000030; // type:object size:0x4 data:4byte
lbl_1_bss_34 = .bss:0x00000034; // type:object size:0x10 data:4byte

View file

@ -187,8 +187,8 @@ s16 Hu3DGLightCreate(f32, f32, f32, f32, f32, f32, u8, u8, u8);
s16 Hu3DGLightCreateV(Vec*, Vec*, GXColor*);
s16 Hu3DLLightCreate(s16, f32, f32, f32, f32, f32, f32, u8, u8, u8);
s16 Hu3DLLightCreateV(s16, Vec*, Vec*, GXColor*);
void Hu3DGLightSpotSet(s16, u16, f32);
void Hu3DLLightSpotSet(s16, s16, u16, f32);
void Hu3DGLightSpotSet(s16, f32, u16);
void Hu3DLLightSpotSet(s16, s16, f32, u16);
void Hu3DGLightInfinitytSet(s16);
void Hu3DLLightInfinitytSet(s16, s16);
void Hu3DGLightPointSet(s16, f32, f32, u16);

2195
src/REL/m413Dll/main.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -18,17 +18,17 @@ typedef struct hsf_draw_object {
static void objCall(ModelData *arg0, HsfObject *arg1);
static void objMesh(ModelData *arg0, HsfObject *arg1);
static void FaceDraw(HsfDrawObject *arg0, HsfFace *arg1);
static void SetTevStageNoTex(HsfDrawObject *arg0, HsfMaterial *arg1);
static s32 SetTevStageNoTex(HsfDrawObject *arg0, HsfMaterial *arg1);
static void SetTevStageTex(HsfDrawObject *arg0, HsfMaterial *arg1);
static GXTevKColorSel SetKColor(GXTevStageID arg0, u8 arg1);
static GXTevKColorSel SetKColorRGB(GXTevStageID arg0, GXColor *arg1);
static void FlushKColor(void);
static void SetReflect(HsfDrawObject *arg0, s16 arg1, s16 arg2, u8 arg3);
static void SetProjection(HsfDrawObject *arg0, s16 arg1, s16 arg2, s16 arg3, GXTexMapID arg4, u32 arg5);
static void SetShadowTex(void);
static s32 SetShadowTex(void);
static void SetShadow(HsfDrawObject *arg0, s16 arg1, s16 arg2);
static void FaceDrawShadow(HsfDrawObject *arg0, HsfFace *arg1);
static void LoadTexture(ModelData *arg0, HsfBitmap *arg1, HsfAttribute *arg2, s16 arg3);
static s32 LoadTexture(ModelData *arg0, HsfBitmap *arg1, HsfAttribute *arg2, s16 arg3);
static void objNull(ModelData *arg0, HsfObject *arg1);
static void objRoot(ModelData *arg0, HsfObject *arg1);
static void objJoint(ModelData *arg0, HsfObject *arg1);
@ -410,21 +410,20 @@ static void FaceDraw(HsfDrawObject *arg0, HsfFace *arg1) {
GXColor sp2C;
void *sp28;
Hu3DTexAnimDataStruct *sp24;
s16 var_r31;
HsfMaterial *temp_r30;
ModelData *temp_r29;
HsfObject *temp_r28;
HsfBitmap *temp_r27;
HsfAttribute *temp_r26;
HsfBitmap *temp_r27;
s16 var_r22;
s16 var_r18;
s16 var_r21;
s16 var_r24;
s16 var_r31;
s16 var_r17;
s16 var_r6;
HsfdrawStruct01 *temp_r23;
s16 var_r22;
s16 var_r21;
HsfConstData *temp_r20;
s16 var_r18;
u32 temp_r19;
HsfConstData *temp_r20;
HsfMaterial *temp_r30;
HsfObject *temp_r28;
ModelData *temp_r29;
HsfdrawStruct01 *temp_r23;
s16 var_r17;
temp_r28 = arg0->object;
temp_r29 = arg0->model;
@ -717,7 +716,7 @@ static void FaceDraw(HsfDrawObject *arg0, HsfFace *arg1) {
drawCnt++;
}
static void SetTevStageNoTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
static s32 SetTevStageNoTex(HsfDrawObject *arg0, HsfMaterial *arg1) {
GXColor sp1C;
ModelData *temp_r28;
HsfObject *var_r21;
@ -1607,7 +1606,7 @@ static void SetProjection(HsfDrawObject *arg0, s16 arg1, s16 arg2, s16 arg3, GXT
GXSetTevAlphaOp(arg1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
}
static void SetShadowTex(void) {
static s32 SetShadowTex(void) {
GXTexObj sp8;
GXInitTexObj(&sp8, Hu3DShadowData.unk_04, Hu3DShadowData.unk_02, Hu3DShadowData.unk_02, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
@ -1733,7 +1732,7 @@ static void FaceDrawShadow(HsfDrawObject *arg0, HsfFace *arg1) {
drawCnt++;
}
static void LoadTexture(ModelData *arg0, HsfBitmap *arg1, HsfAttribute *arg2, s16 arg3) {
static s32 LoadTexture(ModelData *arg0, HsfBitmap *arg1, HsfAttribute *arg2, s16 arg3) {
GXTexObj sp1C;
GXTlutObj sp10;
s16 var_r27;

View file

@ -1465,13 +1465,13 @@ inline void Hu3DLightSpotSet(LightData *light, u16 arg1, f32 arg8) {
light->unk_02 = arg1;
}
void Hu3DGLightSpotSet(s16 arg0, u16 arg1, f32 arg8) {
void Hu3DGLightSpotSet(s16 arg0, f32 arg8, u16 arg1) {
LightData *light = &Hu3DGlobalLight[arg0];
Hu3DLightSpotSet(light, arg1, arg8);
}
void Hu3DLLightSpotSet(s16 arg0, s16 arg1, u16 arg2, f32 arg8) {
void Hu3DLLightSpotSet(s16 arg0, s16 arg1, f32 arg8, u16 arg2) {
ModelData* data;
LightData* light;
@ -1752,7 +1752,7 @@ s32 Hu3DModelLightInfoSet(s16 arg0, s16 arg1) {
Hu3DGLightStaticSet(sp12, arg1);
switch (var_r18->light.type) {
case 0:
Hu3DGLightSpotSet(sp12, 2, var_r18->light.cutoff);
Hu3DGLightSpotSet(sp12, var_r18->light.cutoff, 2);
break;
case 1:
Hu3DGLightPointSet(sp12, var_r18->data.base.scale.x - var_r18->data.base.rot.z, 1.0f, 2);