Decompile objGetTextOverride

This commit is contained in:
Ryan Dwyer 2020-01-25 21:05:04 +10:00
parent c4f7002aaa
commit b93cbe076a
3 changed files with 17 additions and 22 deletions

View File

@ -1684,27 +1684,20 @@ glabel func0f112a58
/* f112bbc: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel objGetTextOverride
/* f112bc0: 3c03800a */ lui $v1,0x800a
/* f112bc4: 8c63a278 */ lw $v1,-0x5d88($v1)
/* f112bc8: 00001025 */ or $v0,$zero,$zero
/* f112bcc: 10600009 */ beqz $v1,.L0f112bf4
/* f112bd0: 00000000 */ sll $zero,$zero,0x0
/* f112bd4: 8c6e0024 */ lw $t6,0x24($v1)
.L0f112bd8:
/* f112bd8: 548e0004 */ bnel $a0,$t6,.L0f112bec
/* f112bdc: 8c630020 */ lw $v1,0x20($v1)
/* f112be0: 03e00008 */ jr $ra
/* f112be4: 00601025 */ or $v0,$v1,$zero
/* f112be8: 8c630020 */ lw $v1,0x20($v1)
.L0f112bec:
/* f112bec: 5460fffa */ bnezl $v1,.L0f112bd8
/* f112bf0: 8c6e0024 */ lw $t6,0x24($v1)
.L0f112bf4:
/* f112bf4: 03e00008 */ jr $ra
/* f112bf8: 00000000 */ sll $zero,$zero,0x0
);
struct textoverride *objGetTextOverride(struct defaultobj *obj)
{
struct textoverride *override = g_Vars.textoverrides;
while (override) {
if (override->obj == obj) {
return override;
}
override = override->next;
}
return NULL;
}
GLOBAL_ASM(
glabel func0f112bfc

View File

@ -55,7 +55,7 @@ struct g_vars {
/*0002ac*/ u32 tickmode; // 7 if mission timer running
/*0002b0*/ s32 killcount;
/*0002b4*/ u32 knockoutcount;
/*0002b8*/ u32 unk0002b8;
/*0002b8*/ struct textoverride *textoverrides;
/*0002bc*/ s32 roomcount;
/*0002c0*/ u32 unk0002c0;
/*0002c4*/ u32 unk0002c4;

View File

@ -4751,6 +4751,8 @@ struct textoverride {
/*0x14*/ u32 unk14;
/*0x18*/ u32 unk18;
/*0x1c*/ u32 activatetextid;
/*0x20*/ struct textoverride *next;
/*0x24*/ struct defaultobj *obj;
};
#endif