Decompile modelFileDataFindBboxRodata

This commit is contained in:
Ryan Dwyer 2021-05-18 20:46:44 +10:00
parent 9d50cbef26
commit 5af95edff0
4 changed files with 17 additions and 23 deletions

View File

@ -1580,7 +1580,7 @@ glabel var7f1a926cpf
/* f00e554: 196000e6 */ blez $t3,.PF0f00e8f0
/* f00e558: 000c68c0 */ sll $t5,$t4,0x3
/* f00e55c: 008d2021 */ addu $a0,$a0,$t5
/* f00e560: 0fc1a2ff */ jal func0f06896c
/* f00e560: 0fc1a2ff */ jal modelFileDataFindBboxRodata
/* f00e564: 8c84b53c */ lw $a0,-0x4ac4($a0)
/* f00e568: c7b20174 */ lwc1 $f18,0x174($sp)
/* f00e56c: 44800000 */ mtc1 $zero,$f0
@ -1975,7 +1975,7 @@ glabel var7f1a8064
/* f00e56c: 196000e1 */ blez $t3,.L0f00e8f4
/* f00e570: 000c68c0 */ sll $t5,$t4,0x3
/* f00e574: 008d2021 */ addu $a0,$a0,$t5
/* f00e578: 0fc1a25b */ jal func0f06896c
/* f00e578: 0fc1a25b */ jal modelFileDataFindBboxRodata
/* f00e57c: 8c84b06c */ lw $a0,%lo(g_ModelStates)($a0)
/* f00e580: c7b20174 */ lwc1 $f18,0x174($sp)
/* f00e584: 44800000 */ mtc1 $zero,$f0
@ -2290,7 +2290,7 @@ glabel var7f1a8064
// f32 sp48;
// f32 *floats; // 44
//
// floats = func0f06896c(g_ModelStates[modelnum].filedata);
// floats = modelFileDataFindBboxRodata(g_ModelStates[modelnum].filedata);
//
// func00016d58(sp110, 0, 0, 0,
// -pad.look.x, -pad.look.y, -pad.look.z,

View File

@ -1059,7 +1059,7 @@ void bodyCalculateHeadOffset(struct modelfiledata *headfiledata, s32 headnum, s3
}
} while (node);
bbox = func0f06896c(headfiledata);
bbox = modelFileDataFindBboxRodata(headfiledata);
if (bbox != NULL) {
bbox->ymin += offset;

View File

@ -2875,7 +2875,7 @@ glabel func0f0687e4
);
GLOBAL_ASM(
glabel func0f0688f4
glabel modelFileDataFindBboxNode
/* f0688f4: 8c830000 */ lw $v1,0x0($a0)
/* f0688f8: 2404000a */ addiu $a0,$zero,0xa
/* f0688fc: 50600019 */ beqzl $v1,.L0f068964
@ -2915,22 +2915,16 @@ glabel func0f0688f4
/* f068968: 00000000 */ nop
);
GLOBAL_ASM(
glabel func0f06896c
/* f06896c: 27bdffe8 */ addiu $sp,$sp,-24
/* f068970: afbf0014 */ sw $ra,0x14($sp)
/* f068974: 0fc1a23d */ jal func0f0688f4
/* f068978: 00000000 */ nop
/* f06897c: 10400003 */ beqz $v0,.L0f06898c
/* f068980: 8fbf0014 */ lw $ra,0x14($sp)
/* f068984: 10000002 */ b .L0f068990
/* f068988: 8c420004 */ lw $v0,0x4($v0)
.L0f06898c:
/* f06898c: 00001025 */ or $v0,$zero,$zero
.L0f068990:
/* f068990: 03e00008 */ jr $ra
/* f068994: 27bd0018 */ addiu $sp,$sp,0x18
);
struct modelrodata_bbox *modelFileDataFindBboxRodata(struct modelfiledata *filedata)
{
struct modelnode *node = modelFileDataFindBboxNode(filedata);
if (node) {
return &node->rodata->bbox;
}
return NULL;
}
GLOBAL_ASM(
glabel modelFindBboxNode

View File

@ -77,8 +77,8 @@ struct monitorthing *monitorthingGetNew(void);
s32 func0f068760(struct defaultobj *obj);
s32 func0f0687b8(struct defaultobj *obj);
struct modelnode *func0f0687e4(struct model *model);
u32 func0f0688f4(void);
struct modelrodata_bbox *func0f06896c(struct modelfiledata *filedata);
struct modelnode *modelFileDataFindBboxNode(struct modelfiledata *filedata);
struct modelrodata_bbox *modelFileDataFindBboxRodata(struct modelfiledata *filedata);
struct modelnode *modelFindBboxNode(struct model *model);
struct modelrodata_bbox *modelFindBboxRodata(struct model *model);
u32 func0f068ad4(void);