diff --git a/asm/nonmatchings/code_197F40/GetAnimation.s b/asm/nonmatchings/code_197F40/GetAnimation.s deleted file mode 100644 index 25ee6102b6..0000000000 --- a/asm/nonmatchings/code_197F40/GetAnimation.s +++ /dev/null @@ -1,44 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetAnimation -/* 199B18 8026B238 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 199B1C 8026B23C AFB20018 */ sw $s2, 0x18($sp) -/* 199B20 8026B240 0080902D */ daddu $s2, $a0, $zero -/* 199B24 8026B244 AFBF001C */ sw $ra, 0x1c($sp) -/* 199B28 8026B248 AFB10014 */ sw $s1, 0x14($sp) -/* 199B2C 8026B24C AFB00010 */ sw $s0, 0x10($sp) -/* 199B30 8026B250 8E51000C */ lw $s1, 0xc($s2) -/* 199B34 8026B254 8E250000 */ lw $a1, ($s1) -/* 199B38 8026B258 0C0B1EAF */ jal get_variable -/* 199B3C 8026B25C 26310004 */ addiu $s1, $s1, 4 -/* 199B40 8026B260 0040802D */ daddu $s0, $v0, $zero -/* 199B44 8026B264 2402FF81 */ addiu $v0, $zero, -0x7f -/* 199B48 8026B268 16020002 */ bne $s0, $v0, .L8026B274 -/* 199B4C 8026B26C 00000000 */ nop -/* 199B50 8026B270 8E500148 */ lw $s0, 0x148($s2) -.L8026B274: -/* 199B54 8026B274 8E250000 */ lw $a1, ($s1) -/* 199B58 8026B278 26310004 */ addiu $s1, $s1, 4 -/* 199B5C 8026B27C 0C0B1EAF */ jal get_variable -/* 199B60 8026B280 0240202D */ daddu $a0, $s2, $zero -/* 199B64 8026B284 0200202D */ daddu $a0, $s0, $zero -/* 199B68 8026B288 8E310000 */ lw $s1, ($s1) -/* 199B6C 8026B28C 0C09A75B */ jal get_actor -/* 199B70 8026B290 0040802D */ daddu $s0, $v0, $zero -/* 199B74 8026B294 0040202D */ daddu $a0, $v0, $zero -/* 199B78 8026B298 0C099117 */ jal get_actor_part -/* 199B7C 8026B29C 0200282D */ daddu $a1, $s0, $zero -/* 199B80 8026B2A0 10400004 */ beqz $v0, .L8026B2B4 -/* 199B84 8026B2A4 0240202D */ daddu $a0, $s2, $zero -/* 199B88 8026B2A8 8C460088 */ lw $a2, 0x88($v0) -/* 199B8C 8026B2AC 0C0B2026 */ jal set_variable -/* 199B90 8026B2B0 0220282D */ daddu $a1, $s1, $zero -.L8026B2B4: -/* 199B94 8026B2B4 8FBF001C */ lw $ra, 0x1c($sp) -/* 199B98 8026B2B8 8FB20018 */ lw $s2, 0x18($sp) -/* 199B9C 8026B2BC 8FB10014 */ lw $s1, 0x14($sp) -/* 199BA0 8026B2C0 8FB00010 */ lw $s0, 0x10($sp) -/* 199BA4 8026B2C4 24020002 */ addiu $v0, $zero, 2 -/* 199BA8 8026B2C8 03E00008 */ jr $ra -/* 199BAC 8026B2CC 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_197F40/GetHomePos.s b/asm/nonmatchings/code_197F40/GetHomePos.s deleted file mode 100644 index 78478564ac..0000000000 --- a/asm/nonmatchings/code_197F40/GetHomePos.s +++ /dev/null @@ -1,56 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetHomePos -/* 199654 8026AD74 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 199658 8026AD78 AFB40020 */ sw $s4, 0x20($sp) -/* 19965C 8026AD7C 0080A02D */ daddu $s4, $a0, $zero -/* 199660 8026AD80 AFBF0024 */ sw $ra, 0x24($sp) -/* 199664 8026AD84 AFB3001C */ sw $s3, 0x1c($sp) -/* 199668 8026AD88 AFB20018 */ sw $s2, 0x18($sp) -/* 19966C 8026AD8C AFB10014 */ sw $s1, 0x14($sp) -/* 199670 8026AD90 AFB00010 */ sw $s0, 0x10($sp) -/* 199674 8026AD94 8E92000C */ lw $s2, 0xc($s4) -/* 199678 8026AD98 8E450000 */ lw $a1, ($s2) -/* 19967C 8026AD9C 0C0B1EAF */ jal get_variable -/* 199680 8026ADA0 26520004 */ addiu $s2, $s2, 4 -/* 199684 8026ADA4 0040202D */ daddu $a0, $v0, $zero -/* 199688 8026ADA8 2402FF81 */ addiu $v0, $zero, -0x7f -/* 19968C 8026ADAC 14820002 */ bne $a0, $v0, .L8026ADB8 -/* 199690 8026ADB0 00000000 */ nop -/* 199694 8026ADB4 8E840148 */ lw $a0, 0x148($s4) -.L8026ADB8: -/* 199698 8026ADB8 0C09A75B */ jal get_actor -/* 19969C 8026ADBC 00000000 */ nop -/* 1996A0 8026ADC0 8E450000 */ lw $a1, ($s2) -/* 1996A4 8026ADC4 26520004 */ addiu $s2, $s2, 4 -/* 1996A8 8026ADC8 C4400138 */ lwc1 $f0, 0x138($v0) -/* 1996AC 8026ADCC C4420140 */ lwc1 $f2, 0x140($v0) -/* 1996B0 8026ADD0 8E500000 */ lw $s0, ($s2) -/* 1996B4 8026ADD4 4600010D */ trunc.w.s $f4, $f0 -/* 1996B8 8026ADD8 44062000 */ mfc1 $a2, $f4 -/* 1996BC 8026ADDC C440013C */ lwc1 $f0, 0x13c($v0) -/* 1996C0 8026ADE0 8E520004 */ lw $s2, 4($s2) -/* 1996C4 8026ADE4 4600010D */ trunc.w.s $f4, $f0 -/* 1996C8 8026ADE8 44112000 */ mfc1 $s1, $f4 -/* 1996CC 8026ADEC 4600110D */ trunc.w.s $f4, $f2 -/* 1996D0 8026ADF0 44132000 */ mfc1 $s3, $f4 -/* 1996D4 8026ADF4 0C0B2026 */ jal set_variable -/* 1996D8 8026ADF8 0280202D */ daddu $a0, $s4, $zero -/* 1996DC 8026ADFC 0280202D */ daddu $a0, $s4, $zero -/* 1996E0 8026AE00 0200282D */ daddu $a1, $s0, $zero -/* 1996E4 8026AE04 0C0B2026 */ jal set_variable -/* 1996E8 8026AE08 0220302D */ daddu $a2, $s1, $zero -/* 1996EC 8026AE0C 0280202D */ daddu $a0, $s4, $zero -/* 1996F0 8026AE10 0240282D */ daddu $a1, $s2, $zero -/* 1996F4 8026AE14 0C0B2026 */ jal set_variable -/* 1996F8 8026AE18 0260302D */ daddu $a2, $s3, $zero -/* 1996FC 8026AE1C 8FBF0024 */ lw $ra, 0x24($sp) -/* 199700 8026AE20 8FB40020 */ lw $s4, 0x20($sp) -/* 199704 8026AE24 8FB3001C */ lw $s3, 0x1c($sp) -/* 199708 8026AE28 8FB20018 */ lw $s2, 0x18($sp) -/* 19970C 8026AE2C 8FB10014 */ lw $s1, 0x14($sp) -/* 199710 8026AE30 8FB00010 */ lw $s0, 0x10($sp) -/* 199714 8026AE34 24020002 */ addiu $v0, $zero, 2 -/* 199718 8026AE38 03E00008 */ jr $ra -/* 19971C 8026AE3C 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_197F40/GetPartOffset.s b/asm/nonmatchings/code_197F40/GetPartOffset.s deleted file mode 100644 index cb7317f460..0000000000 --- a/asm/nonmatchings/code_197F40/GetPartOffset.s +++ /dev/null @@ -1,76 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetPartOffset -/* 199454 8026AB74 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 199458 8026AB78 AFB20018 */ sw $s2, 0x18($sp) -/* 19945C 8026AB7C 0080902D */ daddu $s2, $a0, $zero -/* 199460 8026AB80 AFBF0024 */ sw $ra, 0x24($sp) -/* 199464 8026AB84 AFB40020 */ sw $s4, 0x20($sp) -/* 199468 8026AB88 AFB3001C */ sw $s3, 0x1c($sp) -/* 19946C 8026AB8C AFB10014 */ sw $s1, 0x14($sp) -/* 199470 8026AB90 AFB00010 */ sw $s0, 0x10($sp) -/* 199474 8026AB94 8E51000C */ lw $s1, 0xc($s2) -/* 199478 8026AB98 8E250000 */ lw $a1, ($s1) -/* 19947C 8026AB9C 0C0B1EAF */ jal get_variable -/* 199480 8026ABA0 26310004 */ addiu $s1, $s1, 4 -/* 199484 8026ABA4 0040802D */ daddu $s0, $v0, $zero -/* 199488 8026ABA8 2402FF81 */ addiu $v0, $zero, -0x7f -/* 19948C 8026ABAC 16020002 */ bne $s0, $v0, .L8026ABB8 -/* 199490 8026ABB0 00000000 */ nop -/* 199494 8026ABB4 8E500148 */ lw $s0, 0x148($s2) -.L8026ABB8: -/* 199498 8026ABB8 8E250000 */ lw $a1, ($s1) -/* 19949C 8026ABBC 26310004 */ addiu $s1, $s1, 4 -/* 1994A0 8026ABC0 0C0B1EAF */ jal get_variable -/* 1994A4 8026ABC4 0240202D */ daddu $a0, $s2, $zero -/* 1994A8 8026ABC8 0200202D */ daddu $a0, $s0, $zero -/* 1994AC 8026ABCC 0C09A75B */ jal get_actor -/* 1994B0 8026ABD0 0040802D */ daddu $s0, $v0, $zero -/* 1994B4 8026ABD4 0040202D */ daddu $a0, $v0, $zero -/* 1994B8 8026ABD8 0C099117 */ jal get_actor_part -/* 1994BC 8026ABDC 0200282D */ daddu $a1, $s0, $zero -/* 1994C0 8026ABE0 8E250000 */ lw $a1, ($s1) -/* 1994C4 8026ABE4 26310004 */ addiu $s1, $s1, 4 -/* 1994C8 8026ABE8 0040302D */ daddu $a2, $v0, $zero -/* 1994CC 8026ABEC 3C020010 */ lui $v0, 0x10 -/* 1994D0 8026ABF0 8CC30000 */ lw $v1, ($a2) -/* 1994D4 8026ABF4 8E330000 */ lw $s3, ($s1) -/* 1994D8 8026ABF8 8E340004 */ lw $s4, 4($s1) -/* 1994DC 8026ABFC 00621824 */ and $v1, $v1, $v0 -/* 1994E0 8026AC00 14600005 */ bnez $v1, .L8026AC18 -/* 1994E4 8026AC04 0240202D */ daddu $a0, $s2, $zero -/* 1994E8 8026AC08 84C20014 */ lh $v0, 0x14($a2) -/* 1994EC 8026AC0C 84D00016 */ lh $s0, 0x16($a2) -/* 1994F0 8026AC10 0809AB0F */ j .L8026AC3C -/* 1994F4 8026AC14 84D10018 */ lh $s1, 0x18($a2) -.L8026AC18: -/* 1994F8 8026AC18 C4C0002C */ lwc1 $f0, 0x2c($a2) -/* 1994FC 8026AC1C 4600010D */ trunc.w.s $f4, $f0 -/* 199500 8026AC20 44022000 */ mfc1 $v0, $f4 -/* 199504 8026AC24 C4C00030 */ lwc1 $f0, 0x30($a2) -/* 199508 8026AC28 C4C20034 */ lwc1 $f2, 0x34($a2) -/* 19950C 8026AC2C 4600010D */ trunc.w.s $f4, $f0 -/* 199510 8026AC30 44102000 */ mfc1 $s0, $f4 -/* 199514 8026AC34 4600110D */ trunc.w.s $f4, $f2 -/* 199518 8026AC38 44112000 */ mfc1 $s1, $f4 -.L8026AC3C: -/* 19951C 8026AC3C 0C0B2026 */ jal set_variable -/* 199520 8026AC40 0040302D */ daddu $a2, $v0, $zero -/* 199524 8026AC44 0240202D */ daddu $a0, $s2, $zero -/* 199528 8026AC48 0260282D */ daddu $a1, $s3, $zero -/* 19952C 8026AC4C 0C0B2026 */ jal set_variable -/* 199530 8026AC50 0200302D */ daddu $a2, $s0, $zero -/* 199534 8026AC54 0240202D */ daddu $a0, $s2, $zero -/* 199538 8026AC58 0280282D */ daddu $a1, $s4, $zero -/* 19953C 8026AC5C 0C0B2026 */ jal set_variable -/* 199540 8026AC60 0220302D */ daddu $a2, $s1, $zero -/* 199544 8026AC64 8FBF0024 */ lw $ra, 0x24($sp) -/* 199548 8026AC68 8FB40020 */ lw $s4, 0x20($sp) -/* 19954C 8026AC6C 8FB3001C */ lw $s3, 0x1c($sp) -/* 199550 8026AC70 8FB20018 */ lw $s2, 0x18($sp) -/* 199554 8026AC74 8FB10014 */ lw $s1, 0x14($sp) -/* 199558 8026AC78 8FB00010 */ lw $s0, 0x10($sp) -/* 19955C 8026AC7C 24020002 */ addiu $v0, $zero, 2 -/* 199560 8026AC80 03E00008 */ jr $ra -/* 199564 8026AC84 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_197F40/GetPartPos.s b/asm/nonmatchings/code_197F40/GetPartPos.s deleted file mode 100644 index 1426add77c..0000000000 --- a/asm/nonmatchings/code_197F40/GetPartPos.s +++ /dev/null @@ -1,64 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetPartPos -/* 199568 8026AC88 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 19956C 8026AC8C AFB40020 */ sw $s4, 0x20($sp) -/* 199570 8026AC90 0080A02D */ daddu $s4, $a0, $zero -/* 199574 8026AC94 AFBF0024 */ sw $ra, 0x24($sp) -/* 199578 8026AC98 AFB3001C */ sw $s3, 0x1c($sp) -/* 19957C 8026AC9C AFB20018 */ sw $s2, 0x18($sp) -/* 199580 8026ACA0 AFB10014 */ sw $s1, 0x14($sp) -/* 199584 8026ACA4 AFB00010 */ sw $s0, 0x10($sp) -/* 199588 8026ACA8 8E92000C */ lw $s2, 0xc($s4) -/* 19958C 8026ACAC 8E450000 */ lw $a1, ($s2) -/* 199590 8026ACB0 0C0B1EAF */ jal get_variable -/* 199594 8026ACB4 26520004 */ addiu $s2, $s2, 4 -/* 199598 8026ACB8 0040802D */ daddu $s0, $v0, $zero -/* 19959C 8026ACBC 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1995A0 8026ACC0 16020002 */ bne $s0, $v0, .L8026ACCC -/* 1995A4 8026ACC4 00000000 */ nop -/* 1995A8 8026ACC8 8E900148 */ lw $s0, 0x148($s4) -.L8026ACCC: -/* 1995AC 8026ACCC 8E450000 */ lw $a1, ($s2) -/* 1995B0 8026ACD0 26520004 */ addiu $s2, $s2, 4 -/* 1995B4 8026ACD4 0C0B1EAF */ jal get_variable -/* 1995B8 8026ACD8 0280202D */ daddu $a0, $s4, $zero -/* 1995BC 8026ACDC 0200202D */ daddu $a0, $s0, $zero -/* 1995C0 8026ACE0 0C09A75B */ jal get_actor -/* 1995C4 8026ACE4 0040802D */ daddu $s0, $v0, $zero -/* 1995C8 8026ACE8 0040202D */ daddu $a0, $v0, $zero -/* 1995CC 8026ACEC 0C099117 */ jal get_actor_part -/* 1995D0 8026ACF0 0200282D */ daddu $a1, $s0, $zero -/* 1995D4 8026ACF4 8E450000 */ lw $a1, ($s2) -/* 1995D8 8026ACF8 26520004 */ addiu $s2, $s2, 4 -/* 1995DC 8026ACFC C4400058 */ lwc1 $f0, 0x58($v0) -/* 1995E0 8026AD00 C4420060 */ lwc1 $f2, 0x60($v0) -/* 1995E4 8026AD04 8E500000 */ lw $s0, ($s2) -/* 1995E8 8026AD08 4600010D */ trunc.w.s $f4, $f0 -/* 1995EC 8026AD0C 44062000 */ mfc1 $a2, $f4 -/* 1995F0 8026AD10 C440005C */ lwc1 $f0, 0x5c($v0) -/* 1995F4 8026AD14 8E520004 */ lw $s2, 4($s2) -/* 1995F8 8026AD18 4600010D */ trunc.w.s $f4, $f0 -/* 1995FC 8026AD1C 44112000 */ mfc1 $s1, $f4 -/* 199600 8026AD20 4600110D */ trunc.w.s $f4, $f2 -/* 199604 8026AD24 44132000 */ mfc1 $s3, $f4 -/* 199608 8026AD28 0C0B2026 */ jal set_variable -/* 19960C 8026AD2C 0280202D */ daddu $a0, $s4, $zero -/* 199610 8026AD30 0280202D */ daddu $a0, $s4, $zero -/* 199614 8026AD34 0200282D */ daddu $a1, $s0, $zero -/* 199618 8026AD38 0C0B2026 */ jal set_variable -/* 19961C 8026AD3C 0220302D */ daddu $a2, $s1, $zero -/* 199620 8026AD40 0280202D */ daddu $a0, $s4, $zero -/* 199624 8026AD44 0240282D */ daddu $a1, $s2, $zero -/* 199628 8026AD48 0C0B2026 */ jal set_variable -/* 19962C 8026AD4C 0260302D */ daddu $a2, $s3, $zero -/* 199630 8026AD50 8FBF0024 */ lw $ra, 0x24($sp) -/* 199634 8026AD54 8FB40020 */ lw $s4, 0x20($sp) -/* 199638 8026AD58 8FB3001C */ lw $s3, 0x1c($sp) -/* 19963C 8026AD5C 8FB20018 */ lw $s2, 0x18($sp) -/* 199640 8026AD60 8FB10014 */ lw $s1, 0x14($sp) -/* 199644 8026AD64 8FB00010 */ lw $s0, 0x10($sp) -/* 199648 8026AD68 24020002 */ addiu $v0, $zero, 2 -/* 19964C 8026AD6C 03E00008 */ jr $ra -/* 199650 8026AD70 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/asm/nonmatchings/code_197F40/SetActorPos.s b/asm/nonmatchings/code_197F40/SetActorPos.s deleted file mode 100644 index 034cc34f59..0000000000 --- a/asm/nonmatchings/code_197F40/SetActorPos.s +++ /dev/null @@ -1,59 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetActorPos -/* 199720 8026AE40 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 199724 8026AE44 AFB20018 */ sw $s2, 0x18($sp) -/* 199728 8026AE48 0080902D */ daddu $s2, $a0, $zero -/* 19972C 8026AE4C AFBF001C */ sw $ra, 0x1c($sp) -/* 199730 8026AE50 AFB10014 */ sw $s1, 0x14($sp) -/* 199734 8026AE54 AFB00010 */ sw $s0, 0x10($sp) -/* 199738 8026AE58 F7B80030 */ sdc1 $f24, 0x30($sp) -/* 19973C 8026AE5C F7B60028 */ sdc1 $f22, 0x28($sp) -/* 199740 8026AE60 F7B40020 */ sdc1 $f20, 0x20($sp) -/* 199744 8026AE64 8E50000C */ lw $s0, 0xc($s2) -/* 199748 8026AE68 8E050000 */ lw $a1, ($s0) -/* 19974C 8026AE6C 0C0B1EAF */ jal get_variable -/* 199750 8026AE70 26100004 */ addiu $s0, $s0, 4 -/* 199754 8026AE74 0040882D */ daddu $s1, $v0, $zero -/* 199758 8026AE78 2402FF81 */ addiu $v0, $zero, -0x7f -/* 19975C 8026AE7C 16220002 */ bne $s1, $v0, .L8026AE88 -/* 199760 8026AE80 00000000 */ nop -/* 199764 8026AE84 8E510148 */ lw $s1, 0x148($s2) -.L8026AE88: -/* 199768 8026AE88 8E050000 */ lw $a1, ($s0) -/* 19976C 8026AE8C 26100004 */ addiu $s0, $s0, 4 -/* 199770 8026AE90 0C0B1EAF */ jal get_variable -/* 199774 8026AE94 0240202D */ daddu $a0, $s2, $zero -/* 199778 8026AE98 8E050000 */ lw $a1, ($s0) -/* 19977C 8026AE9C 26100004 */ addiu $s0, $s0, 4 -/* 199780 8026AEA0 4482C000 */ mtc1 $v0, $f24 -/* 199784 8026AEA4 00000000 */ nop -/* 199788 8026AEA8 4680C620 */ cvt.s.w $f24, $f24 -/* 19978C 8026AEAC 0C0B1EAF */ jal get_variable -/* 199790 8026AEB0 0240202D */ daddu $a0, $s2, $zero -/* 199794 8026AEB4 8E050000 */ lw $a1, ($s0) -/* 199798 8026AEB8 4482B000 */ mtc1 $v0, $f22 -/* 19979C 8026AEBC 00000000 */ nop -/* 1997A0 8026AEC0 4680B5A0 */ cvt.s.w $f22, $f22 -/* 1997A4 8026AEC4 0C0B1EAF */ jal get_variable -/* 1997A8 8026AEC8 0240202D */ daddu $a0, $s2, $zero -/* 1997AC 8026AECC 4482A000 */ mtc1 $v0, $f20 -/* 1997B0 8026AED0 00000000 */ nop -/* 1997B4 8026AED4 4680A520 */ cvt.s.w $f20, $f20 -/* 1997B8 8026AED8 0C09A75B */ jal get_actor -/* 1997BC 8026AEDC 0220202D */ daddu $a0, $s1, $zero -/* 1997C0 8026AEE0 0040182D */ daddu $v1, $v0, $zero -/* 1997C4 8026AEE4 E4780144 */ swc1 $f24, 0x144($v1) -/* 1997C8 8026AEE8 E4760148 */ swc1 $f22, 0x148($v1) -/* 1997CC 8026AEEC E474014C */ swc1 $f20, 0x14c($v1) -/* 1997D0 8026AEF0 8FBF001C */ lw $ra, 0x1c($sp) -/* 1997D4 8026AEF4 8FB20018 */ lw $s2, 0x18($sp) -/* 1997D8 8026AEF8 8FB10014 */ lw $s1, 0x14($sp) -/* 1997DC 8026AEFC 8FB00010 */ lw $s0, 0x10($sp) -/* 1997E0 8026AF00 D7B80030 */ ldc1 $f24, 0x30($sp) -/* 1997E4 8026AF04 D7B60028 */ ldc1 $f22, 0x28($sp) -/* 1997E8 8026AF08 D7B40020 */ ldc1 $f20, 0x20($sp) -/* 1997EC 8026AF0C 24020002 */ addiu $v0, $zero, 2 -/* 1997F0 8026AF10 03E00008 */ jr $ra -/* 1997F4 8026AF14 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_197F40/SetActorYaw.s b/asm/nonmatchings/code_197F40/SetActorYaw.s deleted file mode 100644 index 06d1f0eae2..0000000000 --- a/asm/nonmatchings/code_197F40/SetActorYaw.s +++ /dev/null @@ -1,33 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetActorYaw -/* 199C38 8026B358 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 199C3C 8026B35C AFB20018 */ sw $s2, 0x18($sp) -/* 199C40 8026B360 0080902D */ daddu $s2, $a0, $zero -/* 199C44 8026B364 AFBF001C */ sw $ra, 0x1c($sp) -/* 199C48 8026B368 AFB10014 */ sw $s1, 0x14($sp) -/* 199C4C 8026B36C AFB00010 */ sw $s0, 0x10($sp) -/* 199C50 8026B370 8E51000C */ lw $s1, 0xc($s2) -/* 199C54 8026B374 8E250000 */ lw $a1, ($s1) -/* 199C58 8026B378 0C0B1EAF */ jal get_variable -/* 199C5C 8026B37C 26310004 */ addiu $s1, $s1, 4 -/* 199C60 8026B380 0040802D */ daddu $s0, $v0, $zero -/* 199C64 8026B384 2402FF81 */ addiu $v0, $zero, -0x7f -/* 199C68 8026B388 16020002 */ bne $s0, $v0, .L8026B394 -/* 199C6C 8026B38C 00000000 */ nop -/* 199C70 8026B390 8E500148 */ lw $s0, 0x148($s2) -.L8026B394: -/* 199C74 8026B394 8E250000 */ lw $a1, ($s1) -/* 199C78 8026B398 0C0B1EAF */ jal get_variable -/* 199C7C 8026B39C 0240202D */ daddu $a0, $s2, $zero -/* 199C80 8026B3A0 0200202D */ daddu $a0, $s0, $zero -/* 199C84 8026B3A4 0C098FDA */ jal set_actor_yaw -/* 199C88 8026B3A8 0040282D */ daddu $a1, $v0, $zero -/* 199C8C 8026B3AC 8FBF001C */ lw $ra, 0x1c($sp) -/* 199C90 8026B3B0 8FB20018 */ lw $s2, 0x18($sp) -/* 199C94 8026B3B4 8FB10014 */ lw $s1, 0x14($sp) -/* 199C98 8026B3B8 8FB00010 */ lw $s0, 0x10($sp) -/* 199C9C 8026B3BC 24020002 */ addiu $v0, $zero, 2 -/* 199CA0 8026B3C0 03E00008 */ jr $ra -/* 199CA4 8026B3C4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_197F40/SetAnimation.s b/asm/nonmatchings/code_197F40/SetAnimation.s deleted file mode 100644 index 8db6ae4dd5..0000000000 --- a/asm/nonmatchings/code_197F40/SetAnimation.s +++ /dev/null @@ -1,39 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetAnimation -/* 199A90 8026B1B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 199A94 8026B1B4 AFB20018 */ sw $s2, 0x18($sp) -/* 199A98 8026B1B8 0080902D */ daddu $s2, $a0, $zero -/* 199A9C 8026B1BC AFBF001C */ sw $ra, 0x1c($sp) -/* 199AA0 8026B1C0 AFB10014 */ sw $s1, 0x14($sp) -/* 199AA4 8026B1C4 AFB00010 */ sw $s0, 0x10($sp) -/* 199AA8 8026B1C8 8E50000C */ lw $s0, 0xc($s2) -/* 199AAC 8026B1CC 8E050000 */ lw $a1, ($s0) -/* 199AB0 8026B1D0 0C0B1EAF */ jal get_variable -/* 199AB4 8026B1D4 26100004 */ addiu $s0, $s0, 4 -/* 199AB8 8026B1D8 0040882D */ daddu $s1, $v0, $zero -/* 199ABC 8026B1DC 2402FF81 */ addiu $v0, $zero, -0x7f -/* 199AC0 8026B1E0 16220002 */ bne $s1, $v0, .L8026B1EC -/* 199AC4 8026B1E4 00000000 */ nop -/* 199AC8 8026B1E8 8E510148 */ lw $s1, 0x148($s2) -.L8026B1EC: -/* 199ACC 8026B1EC 8E050000 */ lw $a1, ($s0) -/* 199AD0 8026B1F0 26100004 */ addiu $s0, $s0, 4 -/* 199AD4 8026B1F4 0C0B1EAF */ jal get_variable -/* 199AD8 8026B1F8 0240202D */ daddu $a0, $s2, $zero -/* 199ADC 8026B1FC 0240202D */ daddu $a0, $s2, $zero -/* 199AE0 8026B200 8E050000 */ lw $a1, ($s0) -/* 199AE4 8026B204 0C0B1EAF */ jal get_variable -/* 199AE8 8026B208 0040802D */ daddu $s0, $v0, $zero -/* 199AEC 8026B20C 0220202D */ daddu $a0, $s1, $zero -/* 199AF0 8026B210 0200282D */ daddu $a1, $s0, $zero -/* 199AF4 8026B214 0C098F3F */ jal set_animation -/* 199AF8 8026B218 0040302D */ daddu $a2, $v0, $zero -/* 199AFC 8026B21C 8FBF001C */ lw $ra, 0x1c($sp) -/* 199B00 8026B220 8FB20018 */ lw $s2, 0x18($sp) -/* 199B04 8026B224 8FB10014 */ lw $s1, 0x14($sp) -/* 199B08 8026B228 8FB00010 */ lw $s0, 0x10($sp) -/* 199B0C 8026B22C 24020002 */ addiu $v0, $zero, 2 -/* 199B10 8026B230 03E00008 */ jr $ra -/* 199B14 8026B234 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_197F40/SetAnimationRate.s b/asm/nonmatchings/code_197F40/SetAnimationRate.s deleted file mode 100644 index f61c35e5d4..0000000000 --- a/asm/nonmatchings/code_197F40/SetAnimationRate.s +++ /dev/null @@ -1,39 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetAnimationRate -/* 199BB0 8026B2D0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 199BB4 8026B2D4 AFB20018 */ sw $s2, 0x18($sp) -/* 199BB8 8026B2D8 0080902D */ daddu $s2, $a0, $zero -/* 199BBC 8026B2DC AFBF001C */ sw $ra, 0x1c($sp) -/* 199BC0 8026B2E0 AFB10014 */ sw $s1, 0x14($sp) -/* 199BC4 8026B2E4 AFB00010 */ sw $s0, 0x10($sp) -/* 199BC8 8026B2E8 8E50000C */ lw $s0, 0xc($s2) -/* 199BCC 8026B2EC 8E050000 */ lw $a1, ($s0) -/* 199BD0 8026B2F0 0C0B1EAF */ jal get_variable -/* 199BD4 8026B2F4 26100004 */ addiu $s0, $s0, 4 -/* 199BD8 8026B2F8 0040882D */ daddu $s1, $v0, $zero -/* 199BDC 8026B2FC 2402FF81 */ addiu $v0, $zero, -0x7f -/* 199BE0 8026B300 16220002 */ bne $s1, $v0, .L8026B30C -/* 199BE4 8026B304 00000000 */ nop -/* 199BE8 8026B308 8E510148 */ lw $s1, 0x148($s2) -.L8026B30C: -/* 199BEC 8026B30C 8E050000 */ lw $a1, ($s0) -/* 199BF0 8026B310 26100004 */ addiu $s0, $s0, 4 -/* 199BF4 8026B314 0C0B1EAF */ jal get_variable -/* 199BF8 8026B318 0240202D */ daddu $a0, $s2, $zero -/* 199BFC 8026B31C 0240202D */ daddu $a0, $s2, $zero -/* 199C00 8026B320 8E050000 */ lw $a1, ($s0) -/* 199C04 8026B324 0C0B210B */ jal get_float_variable -/* 199C08 8026B328 0040802D */ daddu $s0, $v0, $zero -/* 199C0C 8026B32C 0220202D */ daddu $a0, $s1, $zero -/* 199C10 8026B330 44060000 */ mfc1 $a2, $f0 -/* 199C14 8026B334 0C098FAE */ jal set_animation_rate -/* 199C18 8026B338 0200282D */ daddu $a1, $s0, $zero -/* 199C1C 8026B33C 8FBF001C */ lw $ra, 0x1c($sp) -/* 199C20 8026B340 8FB20018 */ lw $s2, 0x18($sp) -/* 199C24 8026B344 8FB10014 */ lw $s1, 0x14($sp) -/* 199C28 8026B348 8FB00010 */ lw $s0, 0x10($sp) -/* 199C2C 8026B34C 24020002 */ addiu $v0, $zero, 2 -/* 199C30 8026B350 03E00008 */ jr $ra -/* 199C34 8026B354 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/code_197F40/SetEnemyTargetOffset.s b/asm/nonmatchings/code_197F40/SetEnemyTargetOffset.s deleted file mode 100644 index 21110f9838..0000000000 --- a/asm/nonmatchings/code_197F40/SetEnemyTargetOffset.s +++ /dev/null @@ -1,75 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetEnemyTargetOffset -/* 199980 8026B0A0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 199984 8026B0A4 AFB20018 */ sw $s2, 0x18($sp) -/* 199988 8026B0A8 0080902D */ daddu $s2, $a0, $zero -/* 19998C 8026B0AC AFBF0020 */ sw $ra, 0x20($sp) -/* 199990 8026B0B0 AFB3001C */ sw $s3, 0x1c($sp) -/* 199994 8026B0B4 AFB10014 */ sw $s1, 0x14($sp) -/* 199998 8026B0B8 AFB00010 */ sw $s0, 0x10($sp) -/* 19999C 8026B0BC F7B60030 */ sdc1 $f22, 0x30($sp) -/* 1999A0 8026B0C0 F7B40028 */ sdc1 $f20, 0x28($sp) -/* 1999A4 8026B0C4 8E50000C */ lw $s0, 0xc($s2) -/* 1999A8 8026B0C8 8E050000 */ lw $a1, ($s0) -/* 1999AC 8026B0CC 0C0B1EAF */ jal get_variable -/* 1999B0 8026B0D0 26100004 */ addiu $s0, $s0, 4 -/* 1999B4 8026B0D4 0040882D */ daddu $s1, $v0, $zero -/* 1999B8 8026B0D8 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1999BC 8026B0DC 16220002 */ bne $s1, $v0, .L8026B0E8 -/* 1999C0 8026B0E0 00000000 */ nop -/* 1999C4 8026B0E4 8E510148 */ lw $s1, 0x148($s2) -.L8026B0E8: -/* 1999C8 8026B0E8 8E050000 */ lw $a1, ($s0) -/* 1999CC 8026B0EC 26100004 */ addiu $s0, $s0, 4 -/* 1999D0 8026B0F0 0C0B1EAF */ jal get_variable -/* 1999D4 8026B0F4 0240202D */ daddu $a0, $s2, $zero -/* 1999D8 8026B0F8 8E050000 */ lw $a1, ($s0) -/* 1999DC 8026B0FC 26100004 */ addiu $s0, $s0, 4 -/* 1999E0 8026B100 0240202D */ daddu $a0, $s2, $zero -/* 1999E4 8026B104 0C0B1EAF */ jal get_variable -/* 1999E8 8026B108 0040982D */ daddu $s3, $v0, $zero -/* 1999EC 8026B10C 8E050000 */ lw $a1, ($s0) -/* 1999F0 8026B110 4482B000 */ mtc1 $v0, $f22 -/* 1999F4 8026B114 00000000 */ nop -/* 1999F8 8026B118 4680B5A0 */ cvt.s.w $f22, $f22 -/* 1999FC 8026B11C 0C0B1EAF */ jal get_variable -/* 199A00 8026B120 0240202D */ daddu $a0, $s2, $zero -/* 199A04 8026B124 4482A000 */ mtc1 $v0, $f20 -/* 199A08 8026B128 00000000 */ nop -/* 199A0C 8026B12C 4680A520 */ cvt.s.w $f20, $f20 -/* 199A10 8026B130 0C09A75B */ jal get_actor -/* 199A14 8026B134 0220202D */ daddu $a0, $s1, $zero -/* 199A18 8026B138 0040182D */ daddu $v1, $v0, $zero -/* 199A1C 8026B13C 32240700 */ andi $a0, $s1, 0x700 -/* 199A20 8026B140 24020100 */ addiu $v0, $zero, 0x100 -/* 199A24 8026B144 10820005 */ beq $a0, $v0, .L8026B15C -/* 199A28 8026B148 28820101 */ slti $v0, $a0, 0x101 -/* 199A2C 8026B14C 1440000E */ bnez $v0, .L8026B188 -/* 199A30 8026B150 24020200 */ addiu $v0, $zero, 0x200 -/* 199A34 8026B154 1482000C */ bne $a0, $v0, .L8026B188 -/* 199A38 8026B158 00000000 */ nop -.L8026B15C: -/* 199A3C 8026B15C 0060202D */ daddu $a0, $v1, $zero -/* 199A40 8026B160 0C099117 */ jal get_actor_part -/* 199A44 8026B164 0260282D */ daddu $a1, $s3, $zero -/* 199A48 8026B168 4600B00D */ trunc.w.s $f0, $f22 -/* 199A4C 8026B16C 44030000 */ mfc1 $v1, $f0 -/* 199A50 8026B170 00000000 */ nop -/* 199A54 8026B174 A443006C */ sh $v1, 0x6c($v0) -/* 199A58 8026B178 4600A00D */ trunc.w.s $f0, $f20 -/* 199A5C 8026B17C 44030000 */ mfc1 $v1, $f0 -/* 199A60 8026B180 00000000 */ nop -/* 199A64 8026B184 A443006E */ sh $v1, 0x6e($v0) -.L8026B188: -/* 199A68 8026B188 8FBF0020 */ lw $ra, 0x20($sp) -/* 199A6C 8026B18C 8FB3001C */ lw $s3, 0x1c($sp) -/* 199A70 8026B190 8FB20018 */ lw $s2, 0x18($sp) -/* 199A74 8026B194 8FB10014 */ lw $s1, 0x14($sp) -/* 199A78 8026B198 8FB00010 */ lw $s0, 0x10($sp) -/* 199A7C 8026B19C D7B60030 */ ldc1 $f22, 0x30($sp) -/* 199A80 8026B1A0 D7B40028 */ ldc1 $f20, 0x28($sp) -/* 199A84 8026B1A4 24020002 */ addiu $v0, $zero, 2 -/* 199A88 8026B1A8 03E00008 */ jr $ra -/* 199A8C 8026B1AC 27BD0038 */ addiu $sp, $sp, 0x38 diff --git a/asm/nonmatchings/code_197F40/SetPartPos.s b/asm/nonmatchings/code_197F40/SetPartPos.s deleted file mode 100644 index 6f0de3d9a6..0000000000 --- a/asm/nonmatchings/code_197F40/SetPartPos.s +++ /dev/null @@ -1,109 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetPartPos -/* 1997F8 8026AF18 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 1997FC 8026AF1C AFB10014 */ sw $s1, 0x14($sp) -/* 199800 8026AF20 0080882D */ daddu $s1, $a0, $zero -/* 199804 8026AF24 AFBF0020 */ sw $ra, 0x20($sp) -/* 199808 8026AF28 AFB3001C */ sw $s3, 0x1c($sp) -/* 19980C 8026AF2C AFB20018 */ sw $s2, 0x18($sp) -/* 199810 8026AF30 AFB00010 */ sw $s0, 0x10($sp) -/* 199814 8026AF34 F7B80038 */ sdc1 $f24, 0x38($sp) -/* 199818 8026AF38 F7B60030 */ sdc1 $f22, 0x30($sp) -/* 19981C 8026AF3C F7B40028 */ sdc1 $f20, 0x28($sp) -/* 199820 8026AF40 8E30000C */ lw $s0, 0xc($s1) -/* 199824 8026AF44 8E050000 */ lw $a1, ($s0) -/* 199828 8026AF48 0C0B1EAF */ jal get_variable -/* 19982C 8026AF4C 26100004 */ addiu $s0, $s0, 4 -/* 199830 8026AF50 0040902D */ daddu $s2, $v0, $zero -/* 199834 8026AF54 2402FF81 */ addiu $v0, $zero, -0x7f -/* 199838 8026AF58 16420002 */ bne $s2, $v0, .L8026AF64 -/* 19983C 8026AF5C 00000000 */ nop -/* 199840 8026AF60 8E320148 */ lw $s2, 0x148($s1) -.L8026AF64: -/* 199844 8026AF64 8E050000 */ lw $a1, ($s0) -/* 199848 8026AF68 26100004 */ addiu $s0, $s0, 4 -/* 19984C 8026AF6C 0C0B1EAF */ jal get_variable -/* 199850 8026AF70 0220202D */ daddu $a0, $s1, $zero -/* 199854 8026AF74 8E050000 */ lw $a1, ($s0) -/* 199858 8026AF78 26100004 */ addiu $s0, $s0, 4 -/* 19985C 8026AF7C 0220202D */ daddu $a0, $s1, $zero -/* 199860 8026AF80 0C0B1EAF */ jal get_variable -/* 199864 8026AF84 0040982D */ daddu $s3, $v0, $zero -/* 199868 8026AF88 8E050000 */ lw $a1, ($s0) -/* 19986C 8026AF8C 26100004 */ addiu $s0, $s0, 4 -/* 199870 8026AF90 4482A000 */ mtc1 $v0, $f20 -/* 199874 8026AF94 00000000 */ nop -/* 199878 8026AF98 4680A520 */ cvt.s.w $f20, $f20 -/* 19987C 8026AF9C 0C0B1EAF */ jal get_variable -/* 199880 8026AFA0 0220202D */ daddu $a0, $s1, $zero -/* 199884 8026AFA4 8E050000 */ lw $a1, ($s0) -/* 199888 8026AFA8 4482B000 */ mtc1 $v0, $f22 -/* 19988C 8026AFAC 00000000 */ nop -/* 199890 8026AFB0 4680B5A0 */ cvt.s.w $f22, $f22 -/* 199894 8026AFB4 0C0B1EAF */ jal get_variable -/* 199898 8026AFB8 0220202D */ daddu $a0, $s1, $zero -/* 19989C 8026AFBC 4482C000 */ mtc1 $v0, $f24 -/* 1998A0 8026AFC0 00000000 */ nop -/* 1998A4 8026AFC4 4680C620 */ cvt.s.w $f24, $f24 -/* 1998A8 8026AFC8 0C09A75B */ jal get_actor -/* 1998AC 8026AFCC 0240202D */ daddu $a0, $s2, $zero -/* 1998B0 8026AFD0 0040182D */ daddu $v1, $v0, $zero -/* 1998B4 8026AFD4 32440700 */ andi $a0, $s2, 0x700 -/* 1998B8 8026AFD8 24020100 */ addiu $v0, $zero, 0x100 -/* 1998BC 8026AFDC 1082000E */ beq $a0, $v0, .L8026B018 -/* 1998C0 8026AFE0 28820101 */ slti $v0, $a0, 0x101 -/* 1998C4 8026AFE4 10400005 */ beqz $v0, .L8026AFFC -/* 1998C8 8026AFE8 24020200 */ addiu $v0, $zero, 0x200 -/* 1998CC 8026AFEC 50800007 */ beql $a0, $zero, .L8026B00C -/* 1998D0 8026AFF0 E4740144 */ swc1 $f20, 0x144($v1) -/* 1998D4 8026AFF4 0809AC1D */ j .L8026B074 -/* 1998D8 8026AFF8 00000000 */ nop -.L8026AFFC: -/* 1998DC 8026AFFC 10820007 */ beq $a0, $v0, .L8026B01C -/* 1998E0 8026B000 0060202D */ daddu $a0, $v1, $zero -/* 1998E4 8026B004 0809AC1D */ j .L8026B074 -/* 1998E8 8026B008 00000000 */ nop -.L8026B00C: -/* 1998EC 8026B00C E4760148 */ swc1 $f22, 0x148($v1) -/* 1998F0 8026B010 0809AC1D */ j .L8026B074 -/* 1998F4 8026B014 E478014C */ swc1 $f24, 0x14c($v1) -.L8026B018: -/* 1998F8 8026B018 0060202D */ daddu $a0, $v1, $zero -.L8026B01C: -/* 1998FC 8026B01C 0C099117 */ jal get_actor_part -/* 199900 8026B020 0260282D */ daddu $a1, $s3, $zero -/* 199904 8026B024 0040202D */ daddu $a0, $v0, $zero -/* 199908 8026B028 8C820000 */ lw $v0, ($a0) -/* 19990C 8026B02C 3C030010 */ lui $v1, 0x10 -/* 199910 8026B030 00431024 */ and $v0, $v0, $v1 -/* 199914 8026B034 5440000D */ bnel $v0, $zero, .L8026B06C -/* 199918 8026B038 E494002C */ swc1 $f20, 0x2c($a0) -/* 19991C 8026B03C 4600A00D */ trunc.w.s $f0, $f20 -/* 199920 8026B040 44020000 */ mfc1 $v0, $f0 -/* 199924 8026B044 00000000 */ nop -/* 199928 8026B048 A4820014 */ sh $v0, 0x14($a0) -/* 19992C 8026B04C 4600B00D */ trunc.w.s $f0, $f22 -/* 199930 8026B050 44020000 */ mfc1 $v0, $f0 -/* 199934 8026B054 00000000 */ nop -/* 199938 8026B058 A4820016 */ sh $v0, 0x16($a0) -/* 19993C 8026B05C 4600C00D */ trunc.w.s $f0, $f24 -/* 199940 8026B060 44020000 */ mfc1 $v0, $f0 -/* 199944 8026B064 0809AC1D */ j .L8026B074 -/* 199948 8026B068 A4820018 */ sh $v0, 0x18($a0) -.L8026B06C: -/* 19994C 8026B06C E4960030 */ swc1 $f22, 0x30($a0) -/* 199950 8026B070 E4980034 */ swc1 $f24, 0x34($a0) -.L8026B074: -/* 199954 8026B074 8FBF0020 */ lw $ra, 0x20($sp) -/* 199958 8026B078 8FB3001C */ lw $s3, 0x1c($sp) -/* 19995C 8026B07C 8FB20018 */ lw $s2, 0x18($sp) -/* 199960 8026B080 8FB10014 */ lw $s1, 0x14($sp) -/* 199964 8026B084 8FB00010 */ lw $s0, 0x10($sp) -/* 199968 8026B088 D7B80038 */ ldc1 $f24, 0x38($sp) -/* 19996C 8026B08C D7B60030 */ ldc1 $f22, 0x30($sp) -/* 199970 8026B090 D7B40028 */ ldc1 $f20, 0x28($sp) -/* 199974 8026B094 24020002 */ addiu $v0, $zero, 2 -/* 199978 8026B098 03E00008 */ jr $ra -/* 19997C 8026B09C 27BD0040 */ addiu $sp, $sp, 0x40 diff --git a/asm/nonmatchings/code_197F40/func_80269E80.s b/asm/nonmatchings/code_197F40/func_80269E80.s deleted file mode 100644 index 38b09b7f22..0000000000 --- a/asm/nonmatchings/code_197F40/func_80269E80.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80269E80 -/* 198760 80269E80 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 198764 80269E84 AFBF0010 */ sw $ra, 0x10($sp) -/* 198768 80269E88 8C82000C */ lw $v0, 0xc($a0) -/* 19876C 80269E8C 3C06800E */ lui $a2, %hi(gBattleStatus+0x19A) -/* 198770 80269E90 90C6C20A */ lbu $a2, %lo(gBattleStatus+0x19A)($a2) -/* 198774 80269E94 0C0B2026 */ jal set_variable -/* 198778 80269E98 8C450000 */ lw $a1, ($v0) -/* 19877C 80269E9C 8FBF0010 */ lw $ra, 0x10($sp) -/* 198780 80269EA0 24020002 */ addiu $v0, $zero, 2 -/* 198784 80269EA4 03E00008 */ jr $ra -/* 198788 80269EA8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_197F40/func_80269EAC.s b/asm/nonmatchings/code_197F40/func_80269EAC.s deleted file mode 100644 index 12ae2b3042..0000000000 --- a/asm/nonmatchings/code_197F40/func_80269EAC.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80269EAC -/* 19878C 80269EAC 8C82000C */ lw $v0, 0xc($a0) -/* 198790 80269EB0 8C420000 */ lw $v0, ($v0) -/* 198794 80269EB4 3C01800E */ lui $at, %hi(gBattleStatus+0x19A) -/* 198798 80269EB8 A022C20A */ sb $v0, %lo(gBattleStatus+0x19A)($at) -/* 19879C 80269EBC 03E00008 */ jr $ra -/* 1987A0 80269EC0 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_197F40/func_8026E020.s b/asm/nonmatchings/code_197F40/func_8026E020.s deleted file mode 100644 index c4a409cc3e..0000000000 --- a/asm/nonmatchings/code_197F40/func_8026E020.s +++ /dev/null @@ -1,10 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8026E020 -/* 19C900 8026E020 8C82000C */ lw $v0, 0xc($a0) -/* 19C904 8026E024 8C420000 */ lw $v0, ($v0) -/* 19C908 8026E028 3C01800E */ lui $at, %hi(gBattleStatus+0x70) -/* 19C90C 8026E02C A422C0E0 */ sh $v0, %lo(gBattleStatus+0x70)($at) -/* 19C910 8026E030 03E00008 */ jr $ra -/* 19C914 8026E034 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_197F40/func_8026E16C.s b/asm/nonmatchings/code_197F40/func_8026E16C.s deleted file mode 100644 index c8806a4cae..0000000000 --- a/asm/nonmatchings/code_197F40/func_8026E16C.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8026E16C -/* 19CA4C 8026E16C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 19CA50 8026E170 AFBF0010 */ sw $ra, 0x10($sp) -/* 19CA54 8026E174 8C82000C */ lw $v0, 0xc($a0) -/* 19CA58 8026E178 0C0B1EAF */ jal get_variable -/* 19CA5C 8026E17C 8C450000 */ lw $a1, ($v0) -/* 19CA60 8026E180 0C090464 */ jal func_80241190 -/* 19CA64 8026E184 0040202D */ daddu $a0, $v0, $zero -/* 19CA68 8026E188 8FBF0010 */ lw $ra, 0x10($sp) -/* 19CA6C 8026E18C 24020002 */ addiu $v0, $zero, 2 -/* 19CA70 8026E190 03E00008 */ jr $ra -/* 19CA74 8026E194 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_197F40/func_8026F60C.s b/asm/nonmatchings/code_197F40/func_8026F60C.s deleted file mode 100644 index 401f4af0e9..0000000000 --- a/asm/nonmatchings/code_197F40/func_8026F60C.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8026F60C -/* 19DEEC 8026F60C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 19DEF0 8026F610 AFBF0010 */ sw $ra, 0x10($sp) -/* 19DEF4 8026F614 8C82000C */ lw $v0, 0xc($a0) -/* 19DEF8 8026F618 0C0B1EAF */ jal get_variable -/* 19DEFC 8026F61C 8C450000 */ lw $a1, ($v0) -/* 19DF00 8026F620 8FBF0010 */ lw $ra, 0x10($sp) -/* 19DF04 8026F624 3C01800E */ lui $at, %hi(gBattleStatus+0x8D) -/* 19DF08 8026F628 A022C0FD */ sb $v0, %lo(gBattleStatus+0x8D)($at) -/* 19DF0C 8026F62C 24020002 */ addiu $v0, $zero, 2 -/* 19DF10 8026F630 03E00008 */ jr $ra -/* 19DF14 8026F634 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_197F40/func_802749D8.s b/asm/nonmatchings/code_197F40/func_802749D8.s deleted file mode 100644 index 60adeff7f6..0000000000 --- a/asm/nonmatchings/code_197F40/func_802749D8.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802749D8 -/* 1A32B8 802749D8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A32BC 802749DC AFBF0010 */ sw $ra, 0x10($sp) -/* 1A32C0 802749E0 0C095268 */ jal func_802549A0 -/* 1A32C4 802749E4 00000000 */ nop -/* 1A32C8 802749E8 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A32CC 802749EC 24020002 */ addiu $v0, $zero, 2 -/* 1A32D0 802749F0 03E00008 */ jr $ra -/* 1A32D4 802749F4 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_197F40/func_802749F8.s b/asm/nonmatchings/code_197F40/func_802749F8.s deleted file mode 100644 index ec2a5587e0..0000000000 --- a/asm/nonmatchings/code_197F40/func_802749F8.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802749F8 -/* 1A32D8 802749F8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A32DC 802749FC AFBF0010 */ sw $ra, 0x10($sp) -/* 1A32E0 80274A00 0C095270 */ jal func_802549C0 -/* 1A32E4 80274A04 00000000 */ nop -/* 1A32E8 80274A08 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A32EC 80274A0C 24020002 */ addiu $v0, $zero, 2 -/* 1A32F0 80274A10 03E00008 */ jr $ra -/* 1A32F4 80274A14 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_197F40/func_80276EFC.s b/asm/nonmatchings/code_197F40/func_80276EFC.s deleted file mode 100644 index 7fff38a425..0000000000 --- a/asm/nonmatchings/code_197F40/func_80276EFC.s +++ /dev/null @@ -1,12 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80276EFC -/* 1A57DC 80276EFC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1A57E0 80276F00 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1A57E4 80276F04 8C430000 */ lw $v1, ($v0) -/* 1A57E8 80276F08 3C040020 */ lui $a0, 0x20 -/* 1A57EC 80276F0C 00641825 */ or $v1, $v1, $a0 -/* 1A57F0 80276F10 AC430000 */ sw $v1, ($v0) -/* 1A57F4 80276F14 03E00008 */ jr $ra -/* 1A57F8 80276F18 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_197F40/func_80276F1C.s b/asm/nonmatchings/code_197F40/func_80276F1C.s deleted file mode 100644 index debfd6c3ac..0000000000 --- a/asm/nonmatchings/code_197F40/func_80276F1C.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80276F1C -/* 1A57FC 80276F1C 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1A5800 80276F20 AFBF0010 */ sw $ra, 0x10($sp) -/* 1A5804 80276F24 8C82000C */ lw $v0, 0xc($a0) -/* 1A5808 80276F28 0C0B1EAF */ jal get_variable -/* 1A580C 80276F2C 8C450000 */ lw $a1, ($v0) -/* 1A5810 80276F30 0C09C596 */ jal dispatch_event_player -/* 1A5814 80276F34 0040202D */ daddu $a0, $v0, $zero -/* 1A5818 80276F38 8FBF0010 */ lw $ra, 0x10($sp) -/* 1A581C 80276F3C 24020002 */ addiu $v0, $zero, 2 -/* 1A5820 80276F40 03E00008 */ jr $ra -/* 1A5824 80276F44 27BD0018 */ addiu $sp, $sp, 0x18 -/* 1A5828 80276F48 00000000 */ nop -/* 1A582C 80276F4C 00000000 */ nop diff --git a/asm/nonmatchings/code_197F40/get_actor.s b/asm/nonmatchings/code_197F40/get_actor.s deleted file mode 100644 index c9d180e976..0000000000 --- a/asm/nonmatchings/code_197F40/get_actor.s +++ /dev/null @@ -1,39 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel get_actor -/* 19864C 80269D6C 0000282D */ daddu $a1, $zero, $zero -/* 198650 80269D70 3C06800E */ lui $a2, %hi(gBattleStatus) -/* 198654 80269D74 24C6C070 */ addiu $a2, $a2, %lo(gBattleStatus) -/* 198658 80269D78 30830700 */ andi $v1, $a0, 0x700 -/* 19865C 80269D7C 24020100 */ addiu $v0, $zero, 0x100 -/* 198660 80269D80 1062000F */ beq $v1, $v0, .L80269DC0 -/* 198664 80269D84 308400FF */ andi $a0, $a0, 0xff -/* 198668 80269D88 28620101 */ slti $v0, $v1, 0x101 -/* 19866C 80269D8C 10400005 */ beqz $v0, .L80269DA4 -/* 198670 80269D90 24020200 */ addiu $v0, $zero, 0x200 -/* 198674 80269D94 10600007 */ beqz $v1, .L80269DB4 -/* 198678 80269D98 00A0102D */ daddu $v0, $a1, $zero -/* 19867C 80269D9C 0809A777 */ j .L80269DDC -/* 198680 80269DA0 00000000 */ nop -.L80269DA4: -/* 198684 80269DA4 10620009 */ beq $v1, $v0, .L80269DCC -/* 198688 80269DA8 00A0102D */ daddu $v0, $a1, $zero -/* 19868C 80269DAC 0809A777 */ j .L80269DDC -/* 198690 80269DB0 00000000 */ nop -.L80269DB4: -/* 198694 80269DB4 8CC500D8 */ lw $a1, 0xd8($a2) -/* 198698 80269DB8 03E00008 */ jr $ra -/* 19869C 80269DBC 00A0102D */ daddu $v0, $a1, $zero -.L80269DC0: -/* 1986A0 80269DC0 8CC500DC */ lw $a1, 0xdc($a2) -/* 1986A4 80269DC4 03E00008 */ jr $ra -/* 1986A8 80269DC8 00A0102D */ daddu $v0, $a1, $zero -.L80269DCC: -/* 1986AC 80269DCC 00041080 */ sll $v0, $a0, 2 -/* 1986B0 80269DD0 00461021 */ addu $v0, $v0, $a2 -/* 1986B4 80269DD4 8C4500E0 */ lw $a1, 0xe0($v0) -/* 1986B8 80269DD8 00A0102D */ daddu $v0, $a1, $zero -.L80269DDC: -/* 1986BC 80269DDC 03E00008 */ jr $ra -/* 1986C0 80269DE0 00000000 */ nop diff --git a/include/common_structs.h b/include/common_structs.h index 0b94f6d4e7..8e8cc49ab0 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -22,6 +22,11 @@ typedef struct Vec3f { /* 0x08 */ f32 z; } Vec3f; // size = 0x0C +typedef struct Vec2s { + /* 0x00 */ s16 x; + /* 0x02 */ s16 y; +} Vec2s; // size = 0x04 + typedef struct Vec3s { /* 0x00 */ s16 x; /* 0x02 */ s16 y; @@ -247,7 +252,7 @@ typedef struct ScriptInstance { /* 0x144 */ ScriptID id; /* 0x148 */ union { s32 enemyID; - s32 actorID; + ActorID actorID; struct Enemy* enemy; ///< For overworld scripts owned by an Npc struct Actor* actor; ///< For battle scripts } owner1; ///< Initially -1 @@ -514,7 +519,9 @@ typedef struct BattleStatus { /* 0x048 */ u8 currentSubmenu; /* 0x049 */ char unk_49[10]; /* 0x053 */ u8 stratsLastCursorPos; - /* 0x054 */ char unk_54[32]; + /* 0x054 */ char unk_54[28]; + /* 0x070 */ s16 unk_70; + /* 0x072 */ char unk_72[2]; /* 0x074 */ s32 unk_74; /* 0x078 */ u8 totalStarPoints; /* 0x079 */ u8 pendingStarPoints; /* how many to add */ @@ -533,7 +540,8 @@ typedef struct BattleStatus { /* 0x089 */ u8 hpDrainCount; /* 0x08A */ char unk_8A; /* 0x08B */ u8 hustleTurns; /* numTurns from hustle drink, normally 0 */ - /* 0x08C */ char unk_8C[2]; + /* 0x08C */ char unk_8C; + /* 0x08D */ s8 unk_8D; /* 0x08E */ u8 initialEnemyCount; /* used for SP award bonus */ /* 0x08F */ char unk_8F[3]; /* 0x092 */ s8 unk_92; @@ -589,7 +597,7 @@ typedef struct BattleStatus { /* 0x197 */ u8 targetHomeIndex; /* some sort of home idnex used for target list construction */ /* 0x198 */ u8 powerBounceCounter; /* 0x199 */ s8 wasStatusInflicted; /* during last attack */ - /* 0x19A */ s8 unk_19A; + /* 0x19A */ u8 unk_19A; /* 0x19B */ char unk_19B[5]; /* 0x1A0 */ s16 currentTargetID; /* selected? */ /* 0x1A2 */ u8 currentTargetPart; /* selected? */ @@ -1032,18 +1040,18 @@ typedef struct ActorPart { /* 0x08 */ struct StaticActorPart* staticData; /* 0x0C */ struct ActorPart* nextPart; /* 0x10 */ struct ActorPartMovement* movement; - /* 0x14 */ s16 partOffset[3]; - /* 0x1A */ s16 visualOffset[3]; + /* 0x14 */ Vec3s partOffset; + /* 0x1A */ Vec3s visualOffset; /* 0x20 */ Vec3f partOffsetFloat; /* 0x2C */ Vec3f absolutePosition; /* 0x38 */ Vec3f rotation; - /* 0x44 */ s16 rotationPivotOffset[3]; + /* 0x44 */ Vec3s rotationPivotOffset; /* 0x4A */ char unk_4A[2]; /* 0x4C */ f32 scale[3]; /* 0x58 */ Vec3f currentPos; /* 0x64 */ f32 yaw; /* 0x68 */ s16 unkOffset[2]; - /* 0x6C */ s16 targetOffset[2]; + /* 0x6C */ Vec2s targetOffset; /* 0x70 */ s16 unk_70; /* 0x72 */ u8 size[2]; /* 0x74 */ u8 verticalStretch; diff --git a/include/functions.h b/include/functions.h index 14ceba06a3..e9a3be6e7b 100644 --- a/include/functions.h +++ b/include/functions.h @@ -48,7 +48,7 @@ Trigger* create_trigger(TriggerDefinition* def); s32 _bound_script_trigger_handler(Trigger* trigger); Trigger* get_trigger_by_id(s32 triggerID); -Actor* get_actor(s32 actorID); +Actor* get_actor(ActorID actorID); ActorPart* get_actor_part(Actor* actor, s32 partIndex); s32 func_800494C0(Npc* npc, s32 arg1, s32 arg2); @@ -106,6 +106,7 @@ s32 does_script_exist_by_ref(ScriptInstance* script); ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState); ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags); +void set_animation_rate(ActorID actorID, s32 partIndex, f32 rate); void func_8011B7C0(u16, s32, s32); AnimatedMesh* get_anim_mesh(s32 arg0); void func_80137D88(s32, f32); diff --git a/src/code_17FEB0.c b/src/code_17FEB0.c index a1b12c93c9..c733d2ba9c 100644 --- a/src/code_17FEB0.c +++ b/src/code_17FEB0.c @@ -3,7 +3,7 @@ HitResult calc_item_check_hit(void) { BattleStatus* battleStatus = BATTLE_STATUS; ActorMovePos* movePos = &battleStatus->playerActor->movePos; - s32 actorID = battleStatus->currentTargetID; + ActorID actorID = battleStatus->currentTargetID; s8 currentTargetPartS8; u32 currentTargetPart; Actor* actor; diff --git a/src/code_181810.c b/src/code_181810.c index a913394226..83f78761a3 100644 --- a/src/code_181810.c +++ b/src/code_181810.c @@ -17,7 +17,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { Actor* actor; ActorPart* part; s32 stringID; - s32 actorID; + ActorID actorID; s32 partIndex; PrintContext** printContext; s32 anim; diff --git a/src/code_190B20.c b/src/code_190B20.c index c83008ab21..82b8cfae99 100644 --- a/src/code_190B20.c +++ b/src/code_190B20.c @@ -44,13 +44,13 @@ INCLUDE_ASM(s32, "code_190B20", set_animation); INCLUDE_ASM(s32, "code_190B20", func_80263E08); -INCLUDE_ASM(s32, "code_190B20", set_animation_rate); +INCLUDE_ASM(void, "code_190B20", set_animation_rate, ActorID actorID, s32 partIndex, f32 rate); -void set_actor_yaw(s32 actorId, s32 yaw) { - get_actor(actorId)->yaw = yaw; +void set_actor_yaw(ActorID actorID, s32 yaw) { + get_actor(actorID)->yaw = yaw; } -void set_part_yaw(s32 actorID, s32 partIndex, s32 value) { +void set_part_yaw(ActorID actorID, s32 partIndex, s32 value) { get_actor_part(get_actor(actorID), partIndex)->yaw = value; } @@ -333,16 +333,16 @@ s32 heroes_is_ability_active(Actor* actor, Ability ability) { return hasAbility; } -void create_part_shadow(s32 actorId, s32 partIndex) { - ActorPart* part = get_actor_part(get_actor(actorId), partIndex); +void create_part_shadow(ActorID actorID, s32 partIndex) { + ActorPart* part = get_actor_part(get_actor(actorID), partIndex); part->flags &= ~4; part->shadow = create_shadow_type(0, part->currentPos.x, part->currentPos.y, part->currentPos.z); part->shadowScale = part->size[0] / 24.0; } -void remove_part_shadow(s32 actorId, s32 partIndex) { - ActorPart* part = get_actor_part(get_actor(actorId), partIndex); +void remove_part_shadow(ActorID actorID, s32 partIndex) { + ActorPart* part = get_actor_part(get_actor(actorID), partIndex); part->flags |= 4; func_80112328(part->shadow); diff --git a/src/code_190B20.h b/src/code_190B20.h index cee3cc3c5d..024734a531 100644 --- a/src/code_190B20.h +++ b/src/code_190B20.h @@ -7,8 +7,8 @@ void player_create_target_list(Actor* actor); void enemy_create_target_list(Actor* actor); -void set_actor_yaw(s32 actorId, s32 yaw); -void set_part_yaw(s32 actorID, s32 partIndex, s32 value); +void set_actor_yaw(ActorID actorID, s32 yaw); +void set_part_yaw(ActorID actorID, s32 partIndex, s32 value); ActorPart* get_actor_part(Actor* actor, s32 partIndex); @@ -19,8 +19,8 @@ void remove_actor_decoration(Actor* actor, s32 decorationIndex); s32 heroes_is_ability_active(Actor* actor, Ability ability); -void create_part_shadow(s32 actorId, s32 partIndex); -void remove_part_shadow(s32 actorId, s32 partIndex); +void create_part_shadow(ActorID actorID, s32 partIndex); +void remove_part_shadow(ActorID actorID, s32 partIndex); void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part); // arg0 unused #endif diff --git a/src/code_197F40.c b/src/code_197F40.c index 4dcfe1d713..9f5080d634 100644 --- a/src/code_197F40.c +++ b/src/code_197F40.c @@ -48,7 +48,7 @@ void set_actor_current_position(ActorID actorID, f32 x, f32 y, f32 z) { actor->currentPos.z = z; } -void set_part_absolute_position(s32 actorID, s32 partIndex, f32 x, f32 y, f32 z) { +void set_part_absolute_position(ActorID actorID, s32 partIndex, f32 x, f32 y, f32 z) { Actor* actor = get_actor(actorID); ActorPart* actorPart; @@ -76,7 +76,25 @@ void set_actor_home_position(ActorID actorID, f32 x, f32 y, f32 z) { actor->homePos.z = z; } -INCLUDE_ASM(Actor*, "code_197F40", get_actor, s32 actorID); +Actor* get_actor(s32 actorID) { + Actor* ret = NULL; + BattleStatus* battleStatus = BATTLE_STATUS; + s32 idFlag = actorID & 0x700; + u32 idIdx = (u8)actorID; + + switch (idFlag) { + case 0: + ret = battleStatus->playerActor; + break; + case 0x100: + ret = battleStatus->partnerActor; + break; + case 0x200: + ret = battleStatus->enemyActors[idIdx]; + break; + } + return ret; +} INCLUDE_ASM(s32, "code_197F40", LoadBattleSection); @@ -90,9 +108,17 @@ ApiStatus GetLastElement(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_197F40", func_80269E80); +ApiStatus func_80269E80(ScriptInstance* script, s32 isInitialCall) { + set_variable(script, *script->ptrReadPos, gBattleStatus.unk_19A); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_197F40", func_80269EAC); +ApiStatus func_80269EAC(ScriptInstance* script, s32 isInitialCall) { + s32 a0 = *script->ptrReadPos; + + gBattleStatus.unk_19A = a0; + return ApiStatus_DONE2; +} ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) { ActorID actorID = get_variable(script, *script->ptrReadPos); @@ -490,25 +516,258 @@ ApiStatus GetActorPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_197F40", GetPartOffset); +ApiStatus GetPartOffset(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + s32 partIndex; + ActorPart* actorPart; + s32 outX, outY, outZ; + s32 x, y, z; -INCLUDE_ASM(s32, "code_197F40", GetPartPos); + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_197F40", GetHomePos); + partIndex = get_variable(script, *args++); + actorPart = get_actor_part(get_actor(actorID), partIndex); -INCLUDE_ASM(s32, "code_197F40", SetActorPos); + outX = *args++; + outY = *args++; + outZ = *args++; -INCLUDE_ASM(s32, "code_197F40", SetPartPos); + if (!(actorPart->flags & 0x100000)) { + x = actorPart->partOffset.x; + y = actorPart->partOffset.y; + z = actorPart->partOffset.z; + } else { + x = actorPart->absolutePosition.x; + y = actorPart->absolutePosition.y; + z = actorPart->absolutePosition.z; + } -INCLUDE_ASM(s32, "code_197F40", SetEnemyTargetOffset); + set_variable(script, outX, x); + set_variable(script, outY, y); + set_variable(script, outZ, z); -INCLUDE_ASM(s32, "code_197F40", SetAnimation); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_197F40", GetAnimation); +ApiStatus GetPartPos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + s32 partIndex; + ActorPart* actorPart; + s32 outX, outY, outZ; + s32 x, y, z; -INCLUDE_ASM(s32, "code_197F40", SetAnimationRate); + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } -INCLUDE_ASM(s32, "code_197F40", SetActorYaw); + partIndex = get_variable(script, *args++); + actorPart = get_actor_part(get_actor(actorID), partIndex); + + outX = *args++; + outY = *args++; + outZ = *args++; + + x = actorPart->currentPos.x; + y = actorPart->currentPos.y; + z = actorPart->currentPos.z; + + set_variable(script, outX, x); + set_variable(script, outY, y); + set_variable(script, outZ, z); + + return ApiStatus_DONE2; +} + +ApiStatus GetHomePos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + s32 outX, outY, outZ; + s32 x, y, z; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + actor = get_actor(actorID); + + outX = *args++; + outY = *args++; + outZ = *args++; + + x = actor->homePos.x; + y = actor->homePos.y; + z = actor->homePos.z; + + set_variable(script, outX, x); + set_variable(script, outY, y); + set_variable(script, outZ, z); + + return ApiStatus_DONE2; +} + +ApiStatus SetActorPos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + f32 x, y, z; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + x = get_variable(script, *args++); + y = get_variable(script, *args++); + z = get_variable(script, *args++); + + actor = get_actor(actorID); + actor->currentPos.x = x; + actor->currentPos.y = y; + actor->currentPos.z = z; + + return ApiStatus_DONE2; +} + +ApiStatus SetPartPos(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + s32 partIndex; + f32 x, y, z; + ActorPart* actorPart; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + partIndex = get_variable(script, *args++); + x = get_variable(script, *args++); + y = get_variable(script, *args++); + z = get_variable(script, *args++); + + actor = get_actor(actorID); + + switch (actorID & 0x700) { + case 0: + actor->currentPos.x = x; + actor->currentPos.y = y; + actor->currentPos.z = z; + break; + case 0x100: + case 0x200: + actorPart = get_actor_part(actor, partIndex); + + if (!(actorPart->flags & 0x100000)) { + actorPart->partOffset.x = x; + actorPart->partOffset.y = y; + actorPart->partOffset.z = z; + } else { + actorPart->absolutePosition.x = x; + actorPart->absolutePosition.y = y; + actorPart->absolutePosition.z = z; + } + break; + } + + return ApiStatus_DONE2; +} + +ApiStatus SetEnemyTargetOffset(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + s32 partIndex; + f32 x, y; + ActorPart* actorPart; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + partIndex = get_variable(script, *args++); + x = get_variable(script, *args++); + y = get_variable(script, *args++); + + actor = get_actor(actorID); + + switch (actorID & 0x700) { + case 0: + break; + case 0x100: + case 0x200: + actorPart = get_actor_part(actor, partIndex); + actorPart->targetOffset.x = x; + actorPart->targetOffset.y = y; + break; + } + + return ApiStatus_DONE2; +} + +ApiStatus SetAnimation(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + set_animation(actorID, get_variable(script, *args++), get_variable(script, *args++)); + + return ApiStatus_DONE2; +} + +ApiStatus GetAnimation(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + s32 var1; + ActorPart* actorPart; + s32 a1; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + var1 = get_variable(script, *args++); + a1 = *args++; + + actorPart = get_actor_part(get_actor(actorID), var1); + + if (actorPart != NULL) { + set_variable(script, a1, actorPart->currentAnimation); + } + return ApiStatus_DONE2; +} + +ApiStatus SetAnimationRate(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + set_animation_rate(actorID, get_variable(script, *args++), get_float_variable(script, *args++)); + + return ApiStatus_DONE2; +} + +ApiStatus SetActorYaw(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + ActorID actorID = get_variable(script, *args++); + + if (actorID == ActorID_SELF) { + actorID = script->owner1.actorID; + } + + set_actor_yaw(actorID, get_variable(script, *args++)); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_197F40", GetActorYaw); @@ -674,7 +933,12 @@ INCLUDE_ASM(s32, "code_197F40", func_8026DEF0); INCLUDE_ASM(s32, "code_197F40", func_8026DF88); -INCLUDE_ASM(s32, "code_197F40", func_8026E020); +ApiStatus func_8026E020(ScriptInstance* script, s32 isInitialCall) { + s32 a0 = *script->ptrReadPos; + + gBattleStatus.unk_70 = a0; + return ApiStatus_DONE2; +} ApiStatus func_8026E038(ScriptInstance* script, s32 isInitialCall) { gBattleStatus.unk_74 = *script->ptrReadPos; @@ -735,7 +999,10 @@ ApiStatus GetBattleState(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "code_197F40", func_8026E16C); +ApiStatus func_8026E16C(ScriptInstance* script, s32 isInitialCall) { + func_80241190(get_variable(script, *script->ptrReadPos)); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_197F40", func_8026E198); @@ -824,7 +1091,10 @@ INCLUDE_ASM(s32, "code_197F40", CreatePartShadow); INCLUDE_ASM(s32, "code_197F40", RemovePartShadow); -INCLUDE_ASM(s32, "code_197F40", func_8026F60C); +ApiStatus func_8026F60C(ScriptInstance* script, s32 isInitialCall) { + BATTLE_STATUS->unk_8D = get_variable(script, *script->ptrReadPos); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_197F40", SetBattleVar); @@ -925,9 +1195,15 @@ INCLUDE_ASM(s32, "code_197F40", DispatchDamagePlayerEvent); INCLUDE_ASM(s32, "code_197F40", EnablePlayerBlur); -INCLUDE_ASM(s32, "code_197F40", func_802749D8); +ApiStatus func_802749D8(ScriptInstance* script, s32 isInitialCall) { + func_802549A0(); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_197F40", func_802749F8); +ApiStatus func_802749F8(ScriptInstance* script, s32 isInitialCall) { + func_802549C0(); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "code_197F40", func_80274A18); @@ -937,6 +1213,12 @@ INCLUDE_ASM(s32, "code_197F40", func_80275F00); INCLUDE_ASM(s32, "code_197F40", DidActionSucceed); -INCLUDE_ASM(s32, "code_197F40", func_80276EFC); +ApiStatus func_80276EFC(ScriptInstance* script, s32 isInitialCall) { + gBattleStatus.flags1 |= 0x200000; + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "code_197F40", func_80276F1C); +ApiStatus func_80276F1C(ScriptInstance* script, s32 isInitialCall) { + dispatch_event_player(get_variable(script, *script->ptrReadPos)); + return ApiStatus_DONE2; +}