From 9f25c8185435bf278b60d7c323a08a716cf988be Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 20 Oct 2019 23:16:05 +1000 Subject: [PATCH] Identify chrFindByLiteralId --- src/game/chr/chraicommands.c | 26 +++++++++++++------------- src/game/game_000000.c | 14 +++++++------- src/include/game/game_000000.h | 1 + 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 1f6e7a0e4..e82283651 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -11199,7 +11199,7 @@ glabel ai0120 /* f0593c4: 1081002d */ beq $a0,$at,.L0f05947c /* f0593c8: 00000000 */ sll $zero,$zero,0x0 .L0f0593cc: -/* f0593cc: 0fc0a1dd */ jal func0f028774 +/* f0593cc: 0fc0a1dd */ jal chrFindByLiteralId /* f0593d0: 00000000 */ sll $zero,$zero,0x0 /* f0593d4: 10400024 */ beqz $v0,.L0f059468 /* f0593d8: 00408025 */ or $s0,$v0,$zero @@ -11543,7 +11543,7 @@ glabel ai0127 /* f059970: c730000c */ lwc1 $f16,0xc($t9) /* f059974: e7b00048 */ swc1 $f16,0x48($sp) .L0f059978: -/* f059978: 0fc0a1dd */ jal func0f028774 +/* f059978: 0fc0a1dd */ jal chrFindByLiteralId /* f05997c: 86240000 */ lh $a0,0x0($s1) /* f059980: 86280000 */ lh $t0,0x0($s1) /* f059984: 2401fffe */ addiu $at,$zero,-2 @@ -11751,7 +11751,7 @@ glabel ai0128 /* f059c68: 118e006f */ beq $t4,$t6,.L0f059e28 /* f059c6c: 00000000 */ sll $zero,$zero,0x0 .L0f059c70: -/* f059c70: 0fc0a1dd */ jal func0f028774 +/* f059c70: 0fc0a1dd */ jal chrFindByLiteralId /* f059c74: 00000000 */ sll $zero,$zero,0x0 /* f059c78: 10400063 */ beqz $v0,.L0f059e08 /* f059c7c: 00408825 */ or $s1,$v0,$zero @@ -11956,7 +11956,7 @@ glabel ai0129 /* f059f50: 00000000 */ sll $zero,$zero,0x0 /* f059f54: c4349d60 */ lwc1 $f20,-0x62a0($at) .L0f059f58: -/* f059f58: 0fc0a1dd */ jal func0f028774 +/* f059f58: 0fc0a1dd */ jal chrFindByLiteralId /* f059f5c: 00000000 */ sll $zero,$zero,0x0 /* f059f60: 10400019 */ beqz $v0,.L0f059fc8 /* f059f64: 00408025 */ or $s0,$v0,$zero @@ -12290,7 +12290,7 @@ glabel ai0130 /* f05a4dc: 5081003e */ beql $a0,$at,.L0f05a5d8 /* f05a4e0: 8fae0094 */ lw $t6,0x94($sp) .L0f05a4e4: -/* f05a4e4: 0fc0a1dd */ jal func0f028774 +/* f05a4e4: 0fc0a1dd */ jal chrFindByLiteralId /* f05a4e8: 00000000 */ sll $zero,$zero,0x0 /* f05a4ec: 50400033 */ beqzl $v0,.L0f05a5bc /* f05a4f0: 8fa20088 */ lw $v0,0x88($sp) @@ -12794,7 +12794,7 @@ glabel func0f05abdc bool aiIfChrPropsoundcountZero(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - struct chrdata *chr = func0f028774(cmd[2]); + struct chrdata *chr = chrFindByLiteralId(cmd[2]); if (chr && chr->propsoundcount == 0) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); @@ -12840,7 +12840,7 @@ glabel ai0131 /* f05ad04: 241600ff */ addiu $s6,$zero,0xff /* f05ad08: 24150005 */ addiu $s5,$zero,0x5 .L0f05ad0c: -/* f05ad0c: 0fc0a1dd */ jal func0f028774 +/* f05ad0c: 0fc0a1dd */ jal chrFindByLiteralId /* f05ad10: 00000000 */ sll $zero,$zero,0x0 /* f05ad14: 10400023 */ beqz $v0,.L0f05ada4 /* f05ad18: 00408025 */ or $s0,$v0,$zero @@ -12959,7 +12959,7 @@ glabel ai0133 /* f05aeb0: 24180037 */ addiu $t8,$zero,0x37 /* f05aeb4: 84440000 */ lh $a0,0x0($v0) .L0f05aeb8: -/* f05aeb8: 0fc0a1dd */ jal func0f028774 +/* f05aeb8: 0fc0a1dd */ jal chrFindByLiteralId /* f05aebc: 00000000 */ sll $zero,$zero,0x0 /* f05aec0: 1040002e */ beqz $v0,.L0f05af7c /* f05aec4: 00408025 */ or $s0,$v0,$zero @@ -13029,7 +13029,7 @@ glabel ai0133 /* f05afb0: 2414000d */ addiu $s4,$zero,0xd /* f05afb4: 2412000e */ addiu $s2,$zero,0xe .L0f05afb8: -/* f05afb8: 0fc0a1dd */ jal func0f028774 +/* f05afb8: 0fc0a1dd */ jal chrFindByLiteralId /* f05afbc: 86640000 */ lh $a0,0x0($s3) /* f05afc0: 93a80056 */ lbu $t0,0x56($sp) /* f05afc4: 00408025 */ or $s0,$v0,$zero @@ -13381,7 +13381,7 @@ glabel ai0137 /* f05b448: 84440000 */ lh $a0,0x0($v0) /* f05b44c: c4349d94 */ lwc1 $f20,-0x626c($at) .L0f05b450: -/* f05b450: 0fc0a1dd */ jal func0f028774 +/* f05b450: 0fc0a1dd */ jal chrFindByLiteralId /* f05b454: 00000000 */ sll $zero,$zero,0x0 /* f05b458: 10400023 */ beqz $v0,.L0f05b4e8 /* f05b45c: 00408025 */ or $s0,$v0,$zero @@ -13532,7 +13532,7 @@ glabel ai013a /* f05b654: 2401ffff */ addiu $at,$zero,-1 /* f05b658: 86240000 */ lh $a0,0x0($s1) .L0f05b65c: -/* f05b65c: 0fc0a1dd */ jal func0f028774 +/* f05b65c: 0fc0a1dd */ jal chrFindByLiteralId /* f05b660: 00000000 */ sll $zero,$zero,0x0 /* f05b664: 924a0003 */ lbu $t2,0x3($s2) /* f05b668: 00408025 */ or $s0,$v0,$zero @@ -14121,7 +14121,7 @@ glabel ai0147 /* f05befc: 00000000 */ sll $zero,$zero,0x0 /* f05bf00: 84440000 */ lh $a0,0x0($v0) .L0f05bf04: -/* f05bf04: 0fc0a1dd */ jal func0f028774 +/* f05bf04: 0fc0a1dd */ jal chrFindByLiteralId /* f05bf08: 00000000 */ sll $zero,$zero,0x0 /* f05bf0c: 1040000d */ beqz $v0,.L0f05bf44 /* f05bf10: 00408025 */ or $s0,$v0,$zero @@ -14344,7 +14344,7 @@ glabel ai0152 /* f05c20c: 2415001f */ addiu $s5,$zero,0x1f /* f05c210: 24140005 */ addiu $s4,$zero,0x5 .L0f05c214: -/* f05c214: 0fc0a1dd */ jal func0f028774 +/* f05c214: 0fc0a1dd */ jal chrFindByLiteralId /* f05c218: 00000000 */ sll $zero,$zero,0x0 /* f05c21c: 10400012 */ beqz $v0,.L0f05c268 /* f05c220: 00408025 */ or $s0,$v0,$zero diff --git a/src/game/game_000000.c b/src/game/game_000000.c index 83db03708..8ae231ca6 100644 --- a/src/game/game_000000.c +++ b/src/game/game_000000.c @@ -15842,7 +15842,7 @@ glabel func0f00cee4 .L0f00cfd8: /* f00cfd8: 51c0002d */ beqzl $t6,.L0f00d090 /* f00cfdc: 86040006 */ lh $a0,0x6($s0) -/* f00cfe0: 0fc0a1dd */ jal func0f028774 +/* f00cfe0: 0fc0a1dd */ jal chrFindByLiteralId /* f00cfe4: 86040006 */ lh $a0,0x6($s0) /* f00cfe8: 8fa80140 */ lw $t0,0x140($sp) /* f00cfec: 1040019b */ beqz $v0,.L0f00d65c @@ -16315,7 +16315,7 @@ glabel func0f00d670 /* f00d68c: 11e00051 */ beqz $t7,.L0f00d7d4 /* f00d690: 24429fc0 */ addiu $v0,$v0,-24640 /* f00d694: 84840006 */ lh $a0,0x6($a0) -/* f00d698: 0fc0a1dd */ jal func0f028774 +/* f00d698: 0fc0a1dd */ jal chrFindByLiteralId /* f00d69c: afa60030 */ sw $a2,0x30($sp) /* f00d6a0: 8fa60030 */ lw $a2,0x30($sp) /* f00d6a4: 10400093 */ beqz $v0,.L0f00d8f4 @@ -16491,7 +16491,7 @@ glabel func0f00d904 /* f00d918: 11e00011 */ beqz $t7,.L0f00d960 /* f00d91c: 00000000 */ sll $zero,$zero,0x0 /* f00d920: 84840006 */ lh $a0,0x6($a0) -/* f00d924: 0fc0a1dd */ jal func0f028774 +/* f00d924: 0fc0a1dd */ jal chrFindByLiteralId /* f00d928: afa60018 */ sw $a2,0x18($sp) /* f00d92c: 8fa60018 */ lw $a2,0x18($sp) /* f00d930: 1040000d */ beqz $v0,.L0f00d968 @@ -18513,7 +18513,7 @@ glabel func0f00f174 /* f00f608: 03000008 */ jr $t8 /* f00f60c: 00000000 */ sll $zero,$zero,0x0 /* f00f610: 92500007 */ lbu $s0,0x7($s2) -/* f00f614: 0fc0a1dd */ jal func0f028774 +/* f00f614: 0fc0a1dd */ jal chrFindByLiteralId /* f00f618: 86440004 */ lh $a0,0x4($s2) /* f00f61c: 1040031c */ beqz $v0,.L0f010290 /* f00f620: 00000000 */ sll $zero,$zero,0x0 @@ -37649,7 +37649,7 @@ glabel func0f0205ec .L0f020630: /* f020630: 00028c00 */ sll $s1,$v0,0x10 /* f020634: 00112403 */ sra $a0,$s1,0x10 -/* f020638: 0fc0a1dd */ jal func0f028774 +/* f020638: 0fc0a1dd */ jal chrFindByLiteralId /* f02063c: 00808825 */ or $s1,$a0,$zero /* f020640: 5440fff5 */ bnezl $v0,.L0f020618 /* f020644: 8e0e0000 */ lw $t6,0x0($s0) @@ -46738,7 +46738,7 @@ glabel func0f028590 ); GLOBAL_ASM( -glabel func0f028774 +glabel chrFindByLiteralId /* f028774: 3c03800a */ lui $v1,0x800a /* f028778: 8c63cd10 */ lw $v1,-0x32f0($v1) /* f02877c: 00803025 */ or $a2,$a0,$zero @@ -84357,7 +84357,7 @@ glabel chrFindById /* f049b4c: 0fc12604 */ jal chrResolveId /* f049b50: 00000000 */ sll $zero,$zero,0x0 /* f049b54: 00402025 */ or $a0,$v0,$zero -/* f049b58: 0fc0a1dd */ jal func0f028774 +/* f049b58: 0fc0a1dd */ jal chrFindByLiteralId /* f049b5c: afa2001c */ sw $v0,0x1c($sp) /* f049b60: 10400003 */ beqz $v0,.L0f049b70 /* f049b64: 8fa7001c */ lw $a3,0x1c($sp) diff --git a/src/include/game/game_000000.h b/src/include/game/game_000000.h index c5b6094ec..b0f83527c 100644 --- a/src/include/game/game_000000.h +++ b/src/include/game/game_000000.h @@ -3,6 +3,7 @@ #include #include "constants.h" +struct chrdata *chrFindByLiteralId(u8 chrnum); struct chrdata *chrFindById(struct chrdata *data, u8 chrnum); float chrGetTimer(struct chrdata *chr);