resolve conflicts with master, remove enum ScriptBufferValue

This commit is contained in:
Alex Bates 2020-08-19 23:22:43 +01:00
commit 0e9e50c64d
No known key found for this signature in database
GPG Key ID: 5E11C2DB78877706
26 changed files with 286 additions and 836 deletions

View File

@ -1,27 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_Loop
/* 0E93B0 802C4A00 8C83000C */ lw $v1, 0xc($a0)
/* 0E93B4 802C4A04 90820006 */ lbu $v0, 6($a0)
/* 0E93B8 802C4A08 8C660000 */ lw $a2, ($v1)
/* 0E93BC 802C4A0C 24420001 */ addiu $v0, $v0, 1
/* 0E93C0 802C4A10 A0820006 */ sb $v0, 6($a0)
/* 0E93C4 802C4A14 00021600 */ sll $v0, $v0, 0x18
/* 0E93C8 802C4A18 00022E03 */ sra $a1, $v0, 0x18
/* 0E93CC 802C4A1C 28A20008 */ slti $v0, $a1, 8
/* 0E93D0 802C4A20 14400003 */ bnez $v0, .L802C4A30
/* 0E93D4 802C4A24 24630004 */ addiu $v1, $v1, 4
.L802C4A28:
/* 0E93D8 802C4A28 080B128A */ j .L802C4A28
/* 0E93DC 802C4A2C 00000000 */ nop
.L802C4A30:
/* 0E93E0 802C4A30 00051080 */ sll $v0, $a1, 2
/* 0E93E4 802C4A34 00821021 */ addu $v0, $a0, $v0
/* 0E93E8 802C4A38 AC4300D0 */ sw $v1, 0xd0($v0)
/* 0E93EC 802C4A3C AC4600F0 */ sw $a2, 0xf0($v0)
/* 0E93F0 802C4A40 03E00008 */ jr $ra
/* 0E93F4 802C4A44 24020002 */ addiu $v0, $zero, 2

View File

@ -1,20 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_end_switch
/* 0EA0C8 802C5718 80820007 */ lb $v0, 7($a0)
/* 0EA0CC 802C571C 04430003 */ bgezl $v0, .L802C572C
/* 0EA0D0 802C5720 00821021 */ addu $v0, $a0, $v0
.L802C5724:
/* 0EA0D4 802C5724 080B15C9 */ j .L802C5724
/* 0EA0D8 802C5728 00000000 */ nop
.L802C572C:
/* 0EA0DC 802C572C A0400110 */ sb $zero, 0x110($v0)
/* 0EA0E0 802C5730 90820007 */ lbu $v0, 7($a0)
/* 0EA0E4 802C5734 2442FFFF */ addiu $v0, $v0, -1
/* 0EA0E8 802C5738 A0820007 */ sb $v0, 7($a0)
/* 0EA0EC 802C573C 03E00008 */ jr $ra
/* 0EA0F0 802C5740 24020002 */ addiu $v0, $zero, 2

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_1_float
/* 0EA864 802C5EB4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EA868 802C5EB8 AFB00010 */ sw $s0, 0x10($sp)
/* 0EA86C 802C5EBC 0080802D */ daddu $s0, $a0, $zero
/* 0EA870 802C5EC0 AFBF0018 */ sw $ra, 0x18($sp)
/* 0EA874 802C5EC4 AFB10014 */ sw $s1, 0x14($sp)
/* 0EA878 802C5EC8 8E03000C */ lw $v1, 0xc($s0)
/* 0EA87C 802C5ECC 8E020138 */ lw $v0, 0x138($s0)
/* 0EA880 802C5ED0 8C710000 */ lw $s1, ($v1)
/* 0EA884 802C5ED4 8C450000 */ lw $a1, ($v0)
/* 0EA888 802C5ED8 24420004 */ addiu $v0, $v0, 4
/* 0EA88C 802C5EDC 0C0B210B */ jal get_float_variable
/* 0EA890 802C5EE0 AE020138 */ sw $v0, 0x138($s0)
/* 0EA894 802C5EE4 0200202D */ daddu $a0, $s0, $zero
/* 0EA898 802C5EE8 44060000 */ mfc1 $a2, $f0
/* 0EA89C 802C5EEC 0C0B2190 */ jal set_float_variable
/* 0EA8A0 802C5EF0 0220282D */ daddu $a1, $s1, $zero
/* 0EA8A4 802C5EF4 8FBF0018 */ lw $ra, 0x18($sp)
/* 0EA8A8 802C5EF8 8FB10014 */ lw $s1, 0x14($sp)
/* 0EA8AC 802C5EFC 8FB00010 */ lw $s0, 0x10($sp)
/* 0EA8B0 802C5F00 24020002 */ addiu $v0, $zero, 2
/* 0EA8B4 802C5F04 03E00008 */ jr $ra
/* 0EA8B8 802C5F08 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,42 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_2_float
/* 0EA8BC 802C5F0C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EA8C0 802C5F10 AFB00010 */ sw $s0, 0x10($sp)
/* 0EA8C4 802C5F14 0080802D */ daddu $s0, $a0, $zero
/* 0EA8C8 802C5F18 AFBF001C */ sw $ra, 0x1c($sp)
/* 0EA8CC 802C5F1C AFB20018 */ sw $s2, 0x18($sp)
/* 0EA8D0 802C5F20 AFB10014 */ sw $s1, 0x14($sp)
/* 0EA8D4 802C5F24 8E11000C */ lw $s1, 0xc($s0)
/* 0EA8D8 802C5F28 8E020138 */ lw $v0, 0x138($s0)
/* 0EA8DC 802C5F2C 8E320000 */ lw $s2, ($s1)
/* 0EA8E0 802C5F30 26310004 */ addiu $s1, $s1, 4
/* 0EA8E4 802C5F34 8C450000 */ lw $a1, ($v0)
/* 0EA8E8 802C5F38 24420004 */ addiu $v0, $v0, 4
/* 0EA8EC 802C5F3C 0C0B210B */ jal get_float_variable
/* 0EA8F0 802C5F40 AE020138 */ sw $v0, 0x138($s0)
/* 0EA8F4 802C5F44 0200202D */ daddu $a0, $s0, $zero
/* 0EA8F8 802C5F48 44060000 */ mfc1 $a2, $f0
/* 0EA8FC 802C5F4C 0C0B2190 */ jal set_float_variable
/* 0EA900 802C5F50 0240282D */ daddu $a1, $s2, $zero
/* 0EA904 802C5F54 0200202D */ daddu $a0, $s0, $zero
/* 0EA908 802C5F58 8E020138 */ lw $v0, 0x138($s0)
/* 0EA90C 802C5F5C 8E310000 */ lw $s1, ($s1)
/* 0EA910 802C5F60 8C450000 */ lw $a1, ($v0)
/* 0EA914 802C5F64 24420004 */ addiu $v0, $v0, 4
/* 0EA918 802C5F68 0C0B210B */ jal get_float_variable
/* 0EA91C 802C5F6C AE020138 */ sw $v0, 0x138($s0)
/* 0EA920 802C5F70 0200202D */ daddu $a0, $s0, $zero
/* 0EA924 802C5F74 44060000 */ mfc1 $a2, $f0
/* 0EA928 802C5F78 0C0B2190 */ jal set_float_variable
/* 0EA92C 802C5F7C 0220282D */ daddu $a1, $s1, $zero
/* 0EA930 802C5F80 8FBF001C */ lw $ra, 0x1c($sp)
/* 0EA934 802C5F84 8FB20018 */ lw $s2, 0x18($sp)
/* 0EA938 802C5F88 8FB10014 */ lw $s1, 0x14($sp)
/* 0EA93C 802C5F8C 8FB00010 */ lw $s0, 0x10($sp)
/* 0EA940 802C5F90 24020002 */ addiu $v0, $zero, 2
/* 0EA944 802C5F94 03E00008 */ jr $ra
/* 0EA948 802C5F98 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,32 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_2_word
/* 0EA674 802C5CC4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EA678 802C5CC8 AFB00010 */ sw $s0, 0x10($sp)
/* 0EA67C 802C5CCC 0080802D */ daddu $s0, $a0, $zero
/* 0EA680 802C5CD0 AFBF0018 */ sw $ra, 0x18($sp)
/* 0EA684 802C5CD4 AFB10014 */ sw $s1, 0x14($sp)
/* 0EA688 802C5CD8 8E11000C */ lw $s1, 0xc($s0)
/* 0EA68C 802C5CDC 8E020138 */ lw $v0, 0x138($s0)
/* 0EA690 802C5CE0 8E250000 */ lw $a1, ($s1)
/* 0EA694 802C5CE4 26310004 */ addiu $s1, $s1, 4
/* 0EA698 802C5CE8 8C460000 */ lw $a2, ($v0)
/* 0EA69C 802C5CEC 24420004 */ addiu $v0, $v0, 4
/* 0EA6A0 802C5CF0 0C0B2026 */ jal set_variable
/* 0EA6A4 802C5CF4 AE020138 */ sw $v0, 0x138($s0)
/* 0EA6A8 802C5CF8 0200202D */ daddu $a0, $s0, $zero
/* 0EA6AC 802C5CFC 8C820138 */ lw $v0, 0x138($a0)
/* 0EA6B0 802C5D00 8E250000 */ lw $a1, ($s1)
/* 0EA6B4 802C5D04 8C460000 */ lw $a2, ($v0)
/* 0EA6B8 802C5D08 24420004 */ addiu $v0, $v0, 4
/* 0EA6BC 802C5D0C 0C0B2026 */ jal set_variable
/* 0EA6C0 802C5D10 AC820138 */ sw $v0, 0x138($a0)
/* 0EA6C4 802C5D14 8FBF0018 */ lw $ra, 0x18($sp)
/* 0EA6C8 802C5D18 8FB10014 */ lw $s1, 0x14($sp)
/* 0EA6CC 802C5D1C 8FB00010 */ lw $s0, 0x10($sp)
/* 0EA6D0 802C5D20 24020002 */ addiu $v0, $zero, 2
/* 0EA6D4 802C5D24 03E00008 */ jr $ra
/* 0EA6D8 802C5D28 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,54 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_3_float
/* 0EA94C 802C5F9C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EA950 802C5FA0 AFB00010 */ sw $s0, 0x10($sp)
/* 0EA954 802C5FA4 0080802D */ daddu $s0, $a0, $zero
/* 0EA958 802C5FA8 AFBF001C */ sw $ra, 0x1c($sp)
/* 0EA95C 802C5FAC AFB20018 */ sw $s2, 0x18($sp)
/* 0EA960 802C5FB0 AFB10014 */ sw $s1, 0x14($sp)
/* 0EA964 802C5FB4 8E11000C */ lw $s1, 0xc($s0)
/* 0EA968 802C5FB8 8E020138 */ lw $v0, 0x138($s0)
/* 0EA96C 802C5FBC 8E320000 */ lw $s2, ($s1)
/* 0EA970 802C5FC0 26310004 */ addiu $s1, $s1, 4
/* 0EA974 802C5FC4 8C450000 */ lw $a1, ($v0)
/* 0EA978 802C5FC8 24420004 */ addiu $v0, $v0, 4
/* 0EA97C 802C5FCC 0C0B210B */ jal get_float_variable
/* 0EA980 802C5FD0 AE020138 */ sw $v0, 0x138($s0)
/* 0EA984 802C5FD4 0200202D */ daddu $a0, $s0, $zero
/* 0EA988 802C5FD8 44060000 */ mfc1 $a2, $f0
/* 0EA98C 802C5FDC 0C0B2190 */ jal set_float_variable
/* 0EA990 802C5FE0 0240282D */ daddu $a1, $s2, $zero
/* 0EA994 802C5FE4 8E320000 */ lw $s2, ($s1)
/* 0EA998 802C5FE8 26310004 */ addiu $s1, $s1, 4
/* 0EA99C 802C5FEC 8E020138 */ lw $v0, 0x138($s0)
/* 0EA9A0 802C5FF0 0200202D */ daddu $a0, $s0, $zero
/* 0EA9A4 802C5FF4 8C450000 */ lw $a1, ($v0)
/* 0EA9A8 802C5FF8 24420004 */ addiu $v0, $v0, 4
/* 0EA9AC 802C5FFC 0C0B210B */ jal get_float_variable
/* 0EA9B0 802C6000 AE020138 */ sw $v0, 0x138($s0)
/* 0EA9B4 802C6004 0200202D */ daddu $a0, $s0, $zero
/* 0EA9B8 802C6008 44060000 */ mfc1 $a2, $f0
/* 0EA9BC 802C600C 0C0B2190 */ jal set_float_variable
/* 0EA9C0 802C6010 0240282D */ daddu $a1, $s2, $zero
/* 0EA9C4 802C6014 0200202D */ daddu $a0, $s0, $zero
/* 0EA9C8 802C6018 8E020138 */ lw $v0, 0x138($s0)
/* 0EA9CC 802C601C 8E310000 */ lw $s1, ($s1)
/* 0EA9D0 802C6020 8C450000 */ lw $a1, ($v0)
/* 0EA9D4 802C6024 24420004 */ addiu $v0, $v0, 4
/* 0EA9D8 802C6028 0C0B210B */ jal get_float_variable
/* 0EA9DC 802C602C AE020138 */ sw $v0, 0x138($s0)
/* 0EA9E0 802C6030 0200202D */ daddu $a0, $s0, $zero
/* 0EA9E4 802C6034 44060000 */ mfc1 $a2, $f0
/* 0EA9E8 802C6038 0C0B2190 */ jal set_float_variable
/* 0EA9EC 802C603C 0220282D */ daddu $a1, $s1, $zero
/* 0EA9F0 802C6040 8FBF001C */ lw $ra, 0x1c($sp)
/* 0EA9F4 802C6044 8FB20018 */ lw $s2, 0x18($sp)
/* 0EA9F8 802C6048 8FB10014 */ lw $s1, 0x14($sp)
/* 0EA9FC 802C604C 8FB00010 */ lw $s0, 0x10($sp)
/* 0EAA00 802C6050 24020002 */ addiu $v0, $zero, 2
/* 0EAA04 802C6054 03E00008 */ jr $ra
/* 0EAA08 802C6058 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,40 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_3_word
/* 0EA6DC 802C5D2C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EA6E0 802C5D30 AFB00010 */ sw $s0, 0x10($sp)
/* 0EA6E4 802C5D34 0080802D */ daddu $s0, $a0, $zero
/* 0EA6E8 802C5D38 AFBF0018 */ sw $ra, 0x18($sp)
/* 0EA6EC 802C5D3C AFB10014 */ sw $s1, 0x14($sp)
/* 0EA6F0 802C5D40 8E11000C */ lw $s1, 0xc($s0)
/* 0EA6F4 802C5D44 8E020138 */ lw $v0, 0x138($s0)
/* 0EA6F8 802C5D48 8E250000 */ lw $a1, ($s1)
/* 0EA6FC 802C5D4C 26310004 */ addiu $s1, $s1, 4
/* 0EA700 802C5D50 8C460000 */ lw $a2, ($v0)
/* 0EA704 802C5D54 24420004 */ addiu $v0, $v0, 4
/* 0EA708 802C5D58 0C0B2026 */ jal set_variable
/* 0EA70C 802C5D5C AE020138 */ sw $v0, 0x138($s0)
/* 0EA710 802C5D60 8E250000 */ lw $a1, ($s1)
/* 0EA714 802C5D64 26310004 */ addiu $s1, $s1, 4
/* 0EA718 802C5D68 8E020138 */ lw $v0, 0x138($s0)
/* 0EA71C 802C5D6C 0200202D */ daddu $a0, $s0, $zero
/* 0EA720 802C5D70 8C460000 */ lw $a2, ($v0)
/* 0EA724 802C5D74 24420004 */ addiu $v0, $v0, 4
/* 0EA728 802C5D78 0C0B2026 */ jal set_variable
/* 0EA72C 802C5D7C AE020138 */ sw $v0, 0x138($s0)
/* 0EA730 802C5D80 0200202D */ daddu $a0, $s0, $zero
/* 0EA734 802C5D84 8C820138 */ lw $v0, 0x138($a0)
/* 0EA738 802C5D88 8E250000 */ lw $a1, ($s1)
/* 0EA73C 802C5D8C 8C460000 */ lw $a2, ($v0)
/* 0EA740 802C5D90 24420004 */ addiu $v0, $v0, 4
/* 0EA744 802C5D94 0C0B2026 */ jal set_variable
/* 0EA748 802C5D98 AC820138 */ sw $v0, 0x138($a0)
/* 0EA74C 802C5D9C 8FBF0018 */ lw $ra, 0x18($sp)
/* 0EA750 802C5DA0 8FB10014 */ lw $s1, 0x14($sp)
/* 0EA754 802C5DA4 8FB00010 */ lw $s0, 0x10($sp)
/* 0EA758 802C5DA8 24020002 */ addiu $v0, $zero, 2
/* 0EA75C 802C5DAC 03E00008 */ jr $ra
/* 0EA760 802C5DB0 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,66 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_4_float
/* 0EAA0C 802C605C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EAA10 802C6060 AFB00010 */ sw $s0, 0x10($sp)
/* 0EAA14 802C6064 0080802D */ daddu $s0, $a0, $zero
/* 0EAA18 802C6068 AFBF001C */ sw $ra, 0x1c($sp)
/* 0EAA1C 802C606C AFB20018 */ sw $s2, 0x18($sp)
/* 0EAA20 802C6070 AFB10014 */ sw $s1, 0x14($sp)
/* 0EAA24 802C6074 8E11000C */ lw $s1, 0xc($s0)
/* 0EAA28 802C6078 8E020138 */ lw $v0, 0x138($s0)
/* 0EAA2C 802C607C 8E320000 */ lw $s2, ($s1)
/* 0EAA30 802C6080 26310004 */ addiu $s1, $s1, 4
/* 0EAA34 802C6084 8C450000 */ lw $a1, ($v0)
/* 0EAA38 802C6088 24420004 */ addiu $v0, $v0, 4
/* 0EAA3C 802C608C 0C0B210B */ jal get_float_variable
/* 0EAA40 802C6090 AE020138 */ sw $v0, 0x138($s0)
/* 0EAA44 802C6094 0200202D */ daddu $a0, $s0, $zero
/* 0EAA48 802C6098 44060000 */ mfc1 $a2, $f0
/* 0EAA4C 802C609C 0C0B2190 */ jal set_float_variable
/* 0EAA50 802C60A0 0240282D */ daddu $a1, $s2, $zero
/* 0EAA54 802C60A4 8E320000 */ lw $s2, ($s1)
/* 0EAA58 802C60A8 26310004 */ addiu $s1, $s1, 4
/* 0EAA5C 802C60AC 8E020138 */ lw $v0, 0x138($s0)
/* 0EAA60 802C60B0 0200202D */ daddu $a0, $s0, $zero
/* 0EAA64 802C60B4 8C450000 */ lw $a1, ($v0)
/* 0EAA68 802C60B8 24420004 */ addiu $v0, $v0, 4
/* 0EAA6C 802C60BC 0C0B210B */ jal get_float_variable
/* 0EAA70 802C60C0 AE020138 */ sw $v0, 0x138($s0)
/* 0EAA74 802C60C4 0200202D */ daddu $a0, $s0, $zero
/* 0EAA78 802C60C8 44060000 */ mfc1 $a2, $f0
/* 0EAA7C 802C60CC 0C0B2190 */ jal set_float_variable
/* 0EAA80 802C60D0 0240282D */ daddu $a1, $s2, $zero
/* 0EAA84 802C60D4 8E320000 */ lw $s2, ($s1)
/* 0EAA88 802C60D8 26310004 */ addiu $s1, $s1, 4
/* 0EAA8C 802C60DC 8E020138 */ lw $v0, 0x138($s0)
/* 0EAA90 802C60E0 0200202D */ daddu $a0, $s0, $zero
/* 0EAA94 802C60E4 8C450000 */ lw $a1, ($v0)
/* 0EAA98 802C60E8 24420004 */ addiu $v0, $v0, 4
/* 0EAA9C 802C60EC 0C0B210B */ jal get_float_variable
/* 0EAAA0 802C60F0 AE020138 */ sw $v0, 0x138($s0)
/* 0EAAA4 802C60F4 0200202D */ daddu $a0, $s0, $zero
/* 0EAAA8 802C60F8 44060000 */ mfc1 $a2, $f0
/* 0EAAAC 802C60FC 0C0B2190 */ jal set_float_variable
/* 0EAAB0 802C6100 0240282D */ daddu $a1, $s2, $zero
/* 0EAAB4 802C6104 0200202D */ daddu $a0, $s0, $zero
/* 0EAAB8 802C6108 8E020138 */ lw $v0, 0x138($s0)
/* 0EAABC 802C610C 8E310000 */ lw $s1, ($s1)
/* 0EAAC0 802C6110 8C450000 */ lw $a1, ($v0)
/* 0EAAC4 802C6114 24420004 */ addiu $v0, $v0, 4
/* 0EAAC8 802C6118 0C0B210B */ jal get_float_variable
/* 0EAACC 802C611C AE020138 */ sw $v0, 0x138($s0)
/* 0EAAD0 802C6120 0200202D */ daddu $a0, $s0, $zero
/* 0EAAD4 802C6124 44060000 */ mfc1 $a2, $f0
/* 0EAAD8 802C6128 0C0B2190 */ jal set_float_variable
/* 0EAADC 802C612C 0220282D */ daddu $a1, $s1, $zero
/* 0EAAE0 802C6130 8FBF001C */ lw $ra, 0x1c($sp)
/* 0EAAE4 802C6134 8FB20018 */ lw $s2, 0x18($sp)
/* 0EAAE8 802C6138 8FB10014 */ lw $s1, 0x14($sp)
/* 0EAAEC 802C613C 8FB00010 */ lw $s0, 0x10($sp)
/* 0EAAF0 802C6140 24020002 */ addiu $v0, $zero, 2
/* 0EAAF4 802C6144 03E00008 */ jr $ra
/* 0EAAF8 802C6148 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,48 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_4_word
/* 0EA764 802C5DB4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EA768 802C5DB8 AFB00010 */ sw $s0, 0x10($sp)
/* 0EA76C 802C5DBC 0080802D */ daddu $s0, $a0, $zero
/* 0EA770 802C5DC0 AFBF0018 */ sw $ra, 0x18($sp)
/* 0EA774 802C5DC4 AFB10014 */ sw $s1, 0x14($sp)
/* 0EA778 802C5DC8 8E11000C */ lw $s1, 0xc($s0)
/* 0EA77C 802C5DCC 8E020138 */ lw $v0, 0x138($s0)
/* 0EA780 802C5DD0 8E250000 */ lw $a1, ($s1)
/* 0EA784 802C5DD4 26310004 */ addiu $s1, $s1, 4
/* 0EA788 802C5DD8 8C460000 */ lw $a2, ($v0)
/* 0EA78C 802C5DDC 24420004 */ addiu $v0, $v0, 4
/* 0EA790 802C5DE0 0C0B2026 */ jal set_variable
/* 0EA794 802C5DE4 AE020138 */ sw $v0, 0x138($s0)
/* 0EA798 802C5DE8 8E250000 */ lw $a1, ($s1)
/* 0EA79C 802C5DEC 26310004 */ addiu $s1, $s1, 4
/* 0EA7A0 802C5DF0 8E020138 */ lw $v0, 0x138($s0)
/* 0EA7A4 802C5DF4 0200202D */ daddu $a0, $s0, $zero
/* 0EA7A8 802C5DF8 8C460000 */ lw $a2, ($v0)
/* 0EA7AC 802C5DFC 24420004 */ addiu $v0, $v0, 4
/* 0EA7B0 802C5E00 0C0B2026 */ jal set_variable
/* 0EA7B4 802C5E04 AE020138 */ sw $v0, 0x138($s0)
/* 0EA7B8 802C5E08 8E250000 */ lw $a1, ($s1)
/* 0EA7BC 802C5E0C 26310004 */ addiu $s1, $s1, 4
/* 0EA7C0 802C5E10 8E020138 */ lw $v0, 0x138($s0)
/* 0EA7C4 802C5E14 0200202D */ daddu $a0, $s0, $zero
/* 0EA7C8 802C5E18 8C460000 */ lw $a2, ($v0)
/* 0EA7CC 802C5E1C 24420004 */ addiu $v0, $v0, 4
/* 0EA7D0 802C5E20 0C0B2026 */ jal set_variable
/* 0EA7D4 802C5E24 AE020138 */ sw $v0, 0x138($s0)
/* 0EA7D8 802C5E28 0200202D */ daddu $a0, $s0, $zero
/* 0EA7DC 802C5E2C 8C820138 */ lw $v0, 0x138($a0)
/* 0EA7E0 802C5E30 8E250000 */ lw $a1, ($s1)
/* 0EA7E4 802C5E34 8C460000 */ lw $a2, ($v0)
/* 0EA7E8 802C5E38 24420004 */ addiu $v0, $v0, 4
/* 0EA7EC 802C5E3C 0C0B2026 */ jal set_variable
/* 0EA7F0 802C5E40 AC820138 */ sw $v0, 0x138($a0)
/* 0EA7F4 802C5E44 8FBF0018 */ lw $ra, 0x18($sp)
/* 0EA7F8 802C5E48 8FB10014 */ lw $s1, 0x14($sp)
/* 0EA7FC 802C5E4C 8FB00010 */ lw $s0, 0x10($sp)
/* 0EA800 802C5E50 24020002 */ addiu $v0, $zero, 2
/* 0EA804 802C5E54 03E00008 */ jr $ra
/* 0EA808 802C5E58 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,30 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_get_Nth_float
/* 0EAAFC 802C614C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0EAB00 802C6150 AFB00010 */ sw $s0, 0x10($sp)
/* 0EAB04 802C6154 0080802D */ daddu $s0, $a0, $zero
/* 0EAB08 802C6158 AFBF0018 */ sw $ra, 0x18($sp)
/* 0EAB0C 802C615C AFB10014 */ sw $s1, 0x14($sp)
/* 0EAB10 802C6160 8E02000C */ lw $v0, 0xc($s0)
/* 0EAB14 802C6164 8C450004 */ lw $a1, 4($v0)
/* 0EAB18 802C6168 0C0B1EAF */ jal get_variable
/* 0EAB1C 802C616C 8C510000 */ lw $s1, ($v0)
/* 0EAB20 802C6170 0200202D */ daddu $a0, $s0, $zero
/* 0EAB24 802C6174 8C830138 */ lw $v1, 0x138($a0)
/* 0EAB28 802C6178 00021080 */ sll $v0, $v0, 2
/* 0EAB2C 802C617C 00431021 */ addu $v0, $v0, $v1
/* 0EAB30 802C6180 C4420000 */ lwc1 $f2, ($v0)
/* 0EAB34 802C6184 468010A0 */ cvt.s.w $f2, $f2
/* 0EAB38 802C6188 44061000 */ mfc1 $a2, $f2
/* 0EAB3C 802C618C 0C0B2190 */ jal set_float_variable
/* 0EAB40 802C6190 0220282D */ daddu $a1, $s1, $zero
/* 0EAB44 802C6194 8FBF0018 */ lw $ra, 0x18($sp)
/* 0EAB48 802C6198 8FB10014 */ lw $s1, 0x14($sp)
/* 0EAB4C 802C619C 8FB00010 */ lw $s0, 0x10($sp)
/* 0EAB50 802C61A0 24020002 */ addiu $v0, $zero, 2
/* 0EAB54 802C61A4 03E00008 */ jr $ra
/* 0EAB58 802C61A8 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,29 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_if_not_AND
/* 0E9898 802C4EE8 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0E989C 802C4EEC AFB10014 */ sw $s1, 0x14($sp)
/* 0E98A0 802C4EF0 0080882D */ daddu $s1, $a0, $zero
/* 0E98A4 802C4EF4 AFBF0018 */ sw $ra, 0x18($sp)
/* 0E98A8 802C4EF8 AFB00010 */ sw $s0, 0x10($sp)
/* 0E98AC 802C4EFC 8E30000C */ lw $s0, 0xc($s1)
/* 0E98B0 802C4F00 8E050000 */ lw $a1, ($s0)
/* 0E98B4 802C4F04 0C0B1EAF */ jal get_variable
/* 0E98B8 802C4F08 26100004 */ addiu $s0, $s0, 4
/* 0E98BC 802C4F0C 8E030000 */ lw $v1, ($s0)
/* 0E98C0 802C4F10 00431024 */ and $v0, $v0, $v1
/* 0E98C4 802C4F14 10400005 */ beqz $v0, .L802C4F2C
/* 0E98C8 802C4F18 24020002 */ addiu $v0, $zero, 2
/* 0E98CC 802C4F1C 0C0B223F */ jal si_skip_if
/* 0E98D0 802C4F20 0220202D */ daddu $a0, $s1, $zero
/* 0E98D4 802C4F24 AE220008 */ sw $v0, 8($s1)
/* 0E98D8 802C4F28 24020002 */ addiu $v0, $zero, 2
.L802C4F2C:
/* 0E98DC 802C4F2C 8FBF0018 */ lw $ra, 0x18($sp)
/* 0E98E0 802C4F30 8FB10014 */ lw $s1, 0x14($sp)
/* 0E98E4 802C4F34 8FB00010 */ lw $s0, 0x10($sp)
/* 0E98E8 802C4F38 03E00008 */ jr $ra
/* 0E98EC 802C4F3C 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,60 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetNpcAnimation
/* 0F2B10 802CE160 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0F2B14 802CE164 AFB10014 */ sw $s1, 0x14($sp)
/* 0F2B18 802CE168 0080882D */ daddu $s1, $a0, $zero
/* 0F2B1C 802CE16C AFBF0018 */ sw $ra, 0x18($sp)
/* 0F2B20 802CE170 AFB00010 */ sw $s0, 0x10($sp)
/* 0F2B24 802CE174 8E30000C */ lw $s0, 0xc($s1)
/* 0F2B28 802CE178 8E050000 */ lw $a1, ($s0)
/* 0F2B2C 802CE17C 0C0B1EAF */ jal get_variable
/* 0F2B30 802CE180 26100004 */ addiu $s0, $s0, 4
/* 0F2B34 802CE184 0220202D */ daddu $a0, $s1, $zero
/* 0F2B38 802CE188 8E100000 */ lw $s0, ($s0)
/* 0F2B3C 802CE18C 0C0B36B0 */ jal resolve_npc
/* 0F2B40 802CE190 0040282D */ daddu $a1, $v0, $zero
/* 0F2B44 802CE194 10400004 */ beqz $v0, .L802CE1A8
/* 0F2B48 802CE198 0220202D */ daddu $a0, $s1, $zero
/* 0F2B4C 802CE19C 8C460028 */ lw $a2, 0x28($v0)
/* 0F2B50 802CE1A0 0C0B2026 */ jal set_variable
/* 0F2B54 802CE1A4 0200282D */ daddu $a1, $s0, $zero
.L802CE1A8:
/* 0F2B58 802CE1A8 24020002 */ addiu $v0, $zero, 2
/* 0F2B5C 802CE1AC 8FBF0018 */ lw $ra, 0x18($sp)
/* 0F2B60 802CE1B0 8FB10014 */ lw $s1, 0x14($sp)
/* 0F2B64 802CE1B4 8FB00010 */ lw $s0, 0x10($sp)
/* 0F2B68 802CE1B8 03E00008 */ jr $ra
/* 0F2B6C 802CE1BC 27BD0020 */ addiu $sp, $sp, 0x20
/* 0F2B70 802CE1C0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0F2B74 802CE1C4 AFB10014 */ sw $s1, 0x14($sp)
/* 0F2B78 802CE1C8 0080882D */ daddu $s1, $a0, $zero
/* 0F2B7C 802CE1CC AFBF0018 */ sw $ra, 0x18($sp)
/* 0F2B80 802CE1D0 AFB00010 */ sw $s0, 0x10($sp)
/* 0F2B84 802CE1D4 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 0F2B88 802CE1D8 8E30000C */ lw $s0, 0xc($s1)
/* 0F2B8C 802CE1DC 8E050000 */ lw $a1, ($s0)
/* 0F2B90 802CE1E0 0C0B1EAF */ jal get_variable
/* 0F2B94 802CE1E4 26100004 */ addiu $s0, $s0, 4
/* 0F2B98 802CE1E8 0220202D */ daddu $a0, $s1, $zero
/* 0F2B9C 802CE1EC 8E050000 */ lw $a1, ($s0)
/* 0F2BA0 802CE1F0 0C0B210B */ jal get_float_variable
/* 0F2BA4 802CE1F4 0040802D */ daddu $s0, $v0, $zero
/* 0F2BA8 802CE1F8 0220202D */ daddu $a0, $s1, $zero
/* 0F2BAC 802CE1FC 0200282D */ daddu $a1, $s0, $zero
/* 0F2BB0 802CE200 0C0B36B0 */ jal resolve_npc
/* 0F2BB4 802CE204 46000506 */ mov.s $f20, $f0
/* 0F2BB8 802CE208 54400001 */ bnel $v0, $zero, .L802CE210
/* 0F2BBC 802CE20C E4540030 */ swc1 $f20, 0x30($v0)
.L802CE210:
/* 0F2BC0 802CE210 24020002 */ addiu $v0, $zero, 2
/* 0F2BC4 802CE214 8FBF0018 */ lw $ra, 0x18($sp)
/* 0F2BC8 802CE218 8FB10014 */ lw $s1, 0x14($sp)
/* 0F2BCC 802CE21C 8FB00010 */ lw $s0, 0x10($sp)
/* 0F2BD0 802CE220 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 0F2BD4 802CE224 03E00008 */ jr $ra
/* 0F2BD8 802CE228 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,36 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetNpcYaw
/* 0F33C0 802CEA10 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0F33C4 802CEA14 AFB10014 */ sw $s1, 0x14($sp)
/* 0F33C8 802CEA18 0080882D */ daddu $s1, $a0, $zero
/* 0F33CC 802CEA1C AFBF0018 */ sw $ra, 0x18($sp)
/* 0F33D0 802CEA20 AFB00010 */ sw $s0, 0x10($sp)
/* 0F33D4 802CEA24 8E30000C */ lw $s0, 0xc($s1)
/* 0F33D8 802CEA28 8E050000 */ lw $a1, ($s0)
/* 0F33DC 802CEA2C 0C0B1EAF */ jal get_variable
/* 0F33E0 802CEA30 26100004 */ addiu $s0, $s0, 4
/* 0F33E4 802CEA34 0220202D */ daddu $a0, $s1, $zero
/* 0F33E8 802CEA38 8E100000 */ lw $s0, ($s0)
/* 0F33EC 802CEA3C 0C0B36B0 */ jal resolve_npc
/* 0F33F0 802CEA40 0040282D */ daddu $a1, $v0, $zero
/* 0F33F4 802CEA44 5040000A */ beql $v0, $zero, .L802CEA70
/* 0F33F8 802CEA48 24020002 */ addiu $v0, $zero, 2
/* 0F33FC 802CEA4C C44C000C */ lwc1 $f12, 0xc($v0)
/* 0F3400 802CEA50 0C00A6C9 */ jal clamp_angle
/* 0F3404 802CEA54 00000000 */ nop
/* 0F3408 802CEA58 0220202D */ daddu $a0, $s1, $zero
/* 0F340C 802CEA5C 4600008D */ trunc.w.s $f2, $f0
/* 0F3410 802CEA60 44061000 */ mfc1 $a2, $f2
/* 0F3414 802CEA64 0C0B2026 */ jal set_variable
/* 0F3418 802CEA68 0200282D */ daddu $a1, $s0, $zero
/* 0F341C 802CEA6C 24020002 */ addiu $v0, $zero, 2
.L802CEA70:
/* 0F3420 802CEA70 8FBF0018 */ lw $ra, 0x18($sp)
/* 0F3424 802CEA74 8FB10014 */ lw $s1, 0x14($sp)
/* 0F3428 802CEA78 8FB00010 */ lw $s0, 0x10($sp)
/* 0F342C 802CEA7C 03E00008 */ jr $ra
/* 0F3430 802CEA80 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,13 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel NpcJump0
/* 0F3074 802CE6C4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 0F3078 802CE6C8 AFBF0010 */ sw $ra, 0x10($sp)
/* 0F307C 802CE6CC 0C0B390D */ jal _npc_jump_to
/* 0F3080 802CE6D0 0000302D */ daddu $a2, $zero, $zero
/* 0F3084 802CE6D4 8FBF0010 */ lw $ra, 0x10($sp)
/* 0F3088 802CE6D8 03E00008 */ jr $ra
/* 0F308C 802CE6DC 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,13 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel NpcJump1
/* 0F3090 802CE6E0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 0F3094 802CE6E4 AFBF0010 */ sw $ra, 0x10($sp)
/* 0F3098 802CE6E8 0C0B390D */ jal _npc_jump_to
/* 0F309C 802CE6EC 24060001 */ addiu $a2, $zero, 1
/* 0F30A0 802CE6F0 8FBF0010 */ lw $ra, 0x10($sp)
/* 0F30A4 802CE6F4 03E00008 */ jr $ra
/* 0F30A8 802CE6F8 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcAnimation
/* 0F2AA4 802CE0F4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0F2AA8 802CE0F8 AFB10014 */ sw $s1, 0x14($sp)
/* 0F2AAC 802CE0FC 0080882D */ daddu $s1, $a0, $zero
/* 0F2AB0 802CE100 AFBF0018 */ sw $ra, 0x18($sp)
/* 0F2AB4 802CE104 AFB00010 */ sw $s0, 0x10($sp)
/* 0F2AB8 802CE108 8E30000C */ lw $s0, 0xc($s1)
/* 0F2ABC 802CE10C 8E050000 */ lw $a1, ($s0)
/* 0F2AC0 802CE110 0C0B1EAF */ jal get_variable
/* 0F2AC4 802CE114 26100004 */ addiu $s0, $s0, 4
/* 0F2AC8 802CE118 0220202D */ daddu $a0, $s1, $zero
/* 0F2ACC 802CE11C 8E050000 */ lw $a1, ($s0)
/* 0F2AD0 802CE120 0C0B1EAF */ jal get_variable
/* 0F2AD4 802CE124 0040802D */ daddu $s0, $v0, $zero
/* 0F2AD8 802CE128 0220202D */ daddu $a0, $s1, $zero
/* 0F2ADC 802CE12C 0200282D */ daddu $a1, $s0, $zero
/* 0F2AE0 802CE130 0C0B36B0 */ jal resolve_npc
/* 0F2AE4 802CE134 0040802D */ daddu $s0, $v0, $zero
/* 0F2AE8 802CE138 10400003 */ beqz $v0, .L802CE148
/* 0F2AEC 802CE13C 0040202D */ daddu $a0, $v0, $zero
/* 0F2AF0 802CE140 0C0B36C3 */ jal set_npc_animation
/* 0F2AF4 802CE144 0200282D */ daddu $a1, $s0, $zero
.L802CE148:
/* 0F2AF8 802CE148 24020002 */ addiu $v0, $zero, 2
/* 0F2AFC 802CE14C 8FBF0018 */ lw $ra, 0x18($sp)
/* 0F2B00 802CE150 8FB10014 */ lw $s1, 0x14($sp)
/* 0F2B04 802CE154 8FB00010 */ lw $s0, 0x10($sp)
/* 0F2B08 802CE158 03E00008 */ jr $ra
/* 0F2B0C 802CE15C 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,43 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcCollisionSize
/* 0F293C 802CDF8C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0F2940 802CDF90 AFB10014 */ sw $s1, 0x14($sp)
/* 0F2944 802CDF94 0080882D */ daddu $s1, $a0, $zero
/* 0F2948 802CDF98 AFBF0020 */ sw $ra, 0x20($sp)
/* 0F294C 802CDF9C AFB3001C */ sw $s3, 0x1c($sp)
/* 0F2950 802CDFA0 AFB20018 */ sw $s2, 0x18($sp)
/* 0F2954 802CDFA4 AFB00010 */ sw $s0, 0x10($sp)
/* 0F2958 802CDFA8 8E30000C */ lw $s0, 0xc($s1)
/* 0F295C 802CDFAC 8E050000 */ lw $a1, ($s0)
/* 0F2960 802CDFB0 0C0B1EAF */ jal get_variable
/* 0F2964 802CDFB4 26100004 */ addiu $s0, $s0, 4
/* 0F2968 802CDFB8 8E050000 */ lw $a1, ($s0)
/* 0F296C 802CDFBC 26100004 */ addiu $s0, $s0, 4
/* 0F2970 802CDFC0 0220202D */ daddu $a0, $s1, $zero
/* 0F2974 802CDFC4 0C0B1EAF */ jal get_variable
/* 0F2978 802CDFC8 0040902D */ daddu $s2, $v0, $zero
/* 0F297C 802CDFCC 0220202D */ daddu $a0, $s1, $zero
/* 0F2980 802CDFD0 8E050000 */ lw $a1, ($s0)
/* 0F2984 802CDFD4 0C0B1EAF */ jal get_variable
/* 0F2988 802CDFD8 0040982D */ daddu $s3, $v0, $zero
/* 0F298C 802CDFDC 0220202D */ daddu $a0, $s1, $zero
/* 0F2990 802CDFE0 0240282D */ daddu $a1, $s2, $zero
/* 0F2994 802CDFE4 0C0B36B0 */ jal resolve_npc
/* 0F2998 802CDFE8 0040802D */ daddu $s0, $v0, $zero
/* 0F299C 802CDFEC 0040182D */ daddu $v1, $v0, $zero
/* 0F29A0 802CDFF0 10600003 */ beqz $v1, .L802CE000
/* 0F29A4 802CDFF4 24020002 */ addiu $v0, $zero, 2
/* 0F29A8 802CDFF8 A47300A8 */ sh $s3, 0xa8($v1)
/* 0F29AC 802CDFFC A47000A6 */ sh $s0, 0xa6($v1)
.L802CE000:
/* 0F29B0 802CE000 8FBF0020 */ lw $ra, 0x20($sp)
/* 0F29B4 802CE004 8FB3001C */ lw $s3, 0x1c($sp)
/* 0F29B8 802CE008 8FB20018 */ lw $s2, 0x18($sp)
/* 0F29BC 802CE00C 8FB10014 */ lw $s1, 0x14($sp)
/* 0F29C0 802CE010 8FB00010 */ lw $s0, 0x10($sp)
/* 0F29C4 802CE014 03E00008 */ jr $ra
/* 0F29C8 802CE018 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcJumpscale
/* 0F2A38 802CE088 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0F2A3C 802CE08C AFB10014 */ sw $s1, 0x14($sp)
/* 0F2A40 802CE090 0080882D */ daddu $s1, $a0, $zero
/* 0F2A44 802CE094 AFBF0018 */ sw $ra, 0x18($sp)
/* 0F2A48 802CE098 AFB00010 */ sw $s0, 0x10($sp)
/* 0F2A4C 802CE09C F7B40020 */ sdc1 $f20, 0x20($sp)
/* 0F2A50 802CE0A0 8E30000C */ lw $s0, 0xc($s1)
/* 0F2A54 802CE0A4 8E050000 */ lw $a1, ($s0)
/* 0F2A58 802CE0A8 0C0B1EAF */ jal get_variable
/* 0F2A5C 802CE0AC 26100004 */ addiu $s0, $s0, 4
/* 0F2A60 802CE0B0 0220202D */ daddu $a0, $s1, $zero
/* 0F2A64 802CE0B4 8E050000 */ lw $a1, ($s0)
/* 0F2A68 802CE0B8 0C0B210B */ jal get_float_variable
/* 0F2A6C 802CE0BC 0040802D */ daddu $s0, $v0, $zero
/* 0F2A70 802CE0C0 0220202D */ daddu $a0, $s1, $zero
/* 0F2A74 802CE0C4 0200282D */ daddu $a1, $s0, $zero
/* 0F2A78 802CE0C8 0C0B36B0 */ jal resolve_npc
/* 0F2A7C 802CE0CC 46000506 */ mov.s $f20, $f0
/* 0F2A80 802CE0D0 54400001 */ bnel $v0, $zero, .L802CE0D8
/* 0F2A84 802CE0D4 E4540014 */ swc1 $f20, 0x14($v0)
.L802CE0D8:
/* 0F2A88 802CE0D8 24020002 */ addiu $v0, $zero, 2
/* 0F2A8C 802CE0DC 8FBF0018 */ lw $ra, 0x18($sp)
/* 0F2A90 802CE0E0 8FB10014 */ lw $s1, 0x14($sp)
/* 0F2A94 802CE0E4 8FB00010 */ lw $s0, 0x10($sp)
/* 0F2A98 802CE0E8 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 0F2A9C 802CE0EC 03E00008 */ jr $ra
/* 0F2AA0 802CE0F0 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,53 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcScale
/* 0F2884 802CDED4 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 0F2888 802CDED8 AFB10014 */ sw $s1, 0x14($sp)
/* 0F288C 802CDEDC 0080882D */ daddu $s1, $a0, $zero
/* 0F2890 802CDEE0 AFBF001C */ sw $ra, 0x1c($sp)
/* 0F2894 802CDEE4 AFB20018 */ sw $s2, 0x18($sp)
/* 0F2898 802CDEE8 AFB00010 */ sw $s0, 0x10($sp)
/* 0F289C 802CDEEC F7B80030 */ sdc1 $f24, 0x30($sp)
/* 0F28A0 802CDEF0 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 0F28A4 802CDEF4 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 0F28A8 802CDEF8 8E30000C */ lw $s0, 0xc($s1)
/* 0F28AC 802CDEFC 8E050000 */ lw $a1, ($s0)
/* 0F28B0 802CDF00 0C0B1EAF */ jal get_variable
/* 0F28B4 802CDF04 26100004 */ addiu $s0, $s0, 4
/* 0F28B8 802CDF08 8E050000 */ lw $a1, ($s0)
/* 0F28BC 802CDF0C 26100004 */ addiu $s0, $s0, 4
/* 0F28C0 802CDF10 0220202D */ daddu $a0, $s1, $zero
/* 0F28C4 802CDF14 0C0B210B */ jal get_float_variable
/* 0F28C8 802CDF18 0040902D */ daddu $s2, $v0, $zero
/* 0F28CC 802CDF1C 8E050000 */ lw $a1, ($s0)
/* 0F28D0 802CDF20 26100004 */ addiu $s0, $s0, 4
/* 0F28D4 802CDF24 0220202D */ daddu $a0, $s1, $zero
/* 0F28D8 802CDF28 0C0B210B */ jal get_float_variable
/* 0F28DC 802CDF2C 46000606 */ mov.s $f24, $f0
/* 0F28E0 802CDF30 0220202D */ daddu $a0, $s1, $zero
/* 0F28E4 802CDF34 8E050000 */ lw $a1, ($s0)
/* 0F28E8 802CDF38 0C0B210B */ jal get_float_variable
/* 0F28EC 802CDF3C 46000586 */ mov.s $f22, $f0
/* 0F28F0 802CDF40 0220202D */ daddu $a0, $s1, $zero
/* 0F28F4 802CDF44 0240282D */ daddu $a1, $s2, $zero
/* 0F28F8 802CDF48 0C0B36B0 */ jal resolve_npc
/* 0F28FC 802CDF4C 46000506 */ mov.s $f20, $f0
/* 0F2900 802CDF50 0040182D */ daddu $v1, $v0, $zero
/* 0F2904 802CDF54 10600004 */ beqz $v1, .L802CDF68
/* 0F2908 802CDF58 24020002 */ addiu $v0, $zero, 2
/* 0F290C 802CDF5C E4780054 */ swc1 $f24, 0x54($v1)
/* 0F2910 802CDF60 E4760058 */ swc1 $f22, 0x58($v1)
/* 0F2914 802CDF64 E474005C */ swc1 $f20, 0x5c($v1)
.L802CDF68:
/* 0F2918 802CDF68 8FBF001C */ lw $ra, 0x1c($sp)
/* 0F291C 802CDF6C 8FB20018 */ lw $s2, 0x18($sp)
/* 0F2920 802CDF70 8FB10014 */ lw $s1, 0x14($sp)
/* 0F2924 802CDF74 8FB00010 */ lw $s0, 0x10($sp)
/* 0F2928 802CDF78 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 0F292C 802CDF7C D7B60028 */ ldc1 $f22, 0x28($sp)
/* 0F2930 802CDF80 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 0F2934 802CDF84 03E00008 */ jr $ra
/* 0F2938 802CDF88 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcSpeed
/* 0F29CC 802CE01C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 0F29D0 802CE020 AFB10014 */ sw $s1, 0x14($sp)
/* 0F29D4 802CE024 0080882D */ daddu $s1, $a0, $zero
/* 0F29D8 802CE028 AFBF0018 */ sw $ra, 0x18($sp)
/* 0F29DC 802CE02C AFB00010 */ sw $s0, 0x10($sp)
/* 0F29E0 802CE030 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 0F29E4 802CE034 8E30000C */ lw $s0, 0xc($s1)
/* 0F29E8 802CE038 8E050000 */ lw $a1, ($s0)
/* 0F29EC 802CE03C 0C0B1EAF */ jal get_variable
/* 0F29F0 802CE040 26100004 */ addiu $s0, $s0, 4
/* 0F29F4 802CE044 0220202D */ daddu $a0, $s1, $zero
/* 0F29F8 802CE048 8E050000 */ lw $a1, ($s0)
/* 0F29FC 802CE04C 0C0B210B */ jal get_float_variable
/* 0F2A00 802CE050 0040802D */ daddu $s0, $v0, $zero
/* 0F2A04 802CE054 0220202D */ daddu $a0, $s1, $zero
/* 0F2A08 802CE058 0200282D */ daddu $a1, $s0, $zero
/* 0F2A0C 802CE05C 0C0B36B0 */ jal resolve_npc
/* 0F2A10 802CE060 46000506 */ mov.s $f20, $f0
/* 0F2A14 802CE064 54400001 */ bnel $v0, $zero, .L802CE06C
/* 0F2A18 802CE068 E4540018 */ swc1 $f20, 0x18($v0)
.L802CE06C:
/* 0F2A1C 802CE06C 24020002 */ addiu $v0, $zero, 2
/* 0F2A20 802CE070 8FBF0018 */ lw $ra, 0x18($sp)
/* 0F2A24 802CE074 8FB10014 */ lw $s1, 0x14($sp)
/* 0F2A28 802CE078 8FB00010 */ lw $s0, 0x10($sp)
/* 0F2A2C 802CE07C D7B40020 */ ldc1 $f20, 0x20($sp)
/* 0F2A30 802CE080 03E00008 */ jr $ra
/* 0F2A34 802CE084 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,39 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcYaw
/* 0F3434 802CEA84 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 0F3438 802CEA88 AFB20018 */ sw $s2, 0x18($sp)
/* 0F343C 802CEA8C 0080902D */ daddu $s2, $a0, $zero
/* 0F3440 802CEA90 AFBF001C */ sw $ra, 0x1c($sp)
/* 0F3444 802CEA94 AFB10014 */ sw $s1, 0x14($sp)
/* 0F3448 802CEA98 AFB00010 */ sw $s0, 0x10($sp)
/* 0F344C 802CEA9C 8E50000C */ lw $s0, 0xc($s2)
/* 0F3450 802CEAA0 8E050000 */ lw $a1, ($s0)
/* 0F3454 802CEAA4 0C0B1EAF */ jal get_variable
/* 0F3458 802CEAA8 26100004 */ addiu $s0, $s0, 4
/* 0F345C 802CEAAC 0240202D */ daddu $a0, $s2, $zero
/* 0F3460 802CEAB0 0C0B36B0 */ jal resolve_npc
/* 0F3464 802CEAB4 0040282D */ daddu $a1, $v0, $zero
/* 0F3468 802CEAB8 0040882D */ daddu $s1, $v0, $zero
/* 0F346C 802CEABC 1220000B */ beqz $s1, .L802CEAEC
/* 0F3470 802CEAC0 24020002 */ addiu $v0, $zero, 2
/* 0F3474 802CEAC4 8E050000 */ lw $a1, ($s0)
/* 0F3478 802CEAC8 0C0B1EAF */ jal get_variable
/* 0F347C 802CEACC 0240202D */ daddu $a0, $s2, $zero
/* 0F3480 802CEAD0 44820000 */ mtc1 $v0, $f0
/* 0F3484 802CEAD4 00000000 */ nop
/* 0F3488 802CEAD8 46800020 */ cvt.s.w $f0, $f0
/* 0F348C 802CEADC 44050000 */ mfc1 $a1, $f0
/* 0F3490 802CEAE0 0C00ECD0 */ jal set_npc_yaw
/* 0F3494 802CEAE4 0220202D */ daddu $a0, $s1, $zero
/* 0F3498 802CEAE8 24020002 */ addiu $v0, $zero, 2
.L802CEAEC:
/* 0F349C 802CEAEC 8FBF001C */ lw $ra, 0x1c($sp)
/* 0F34A0 802CEAF0 8FB20018 */ lw $s2, 0x18($sp)
/* 0F34A4 802CEAF4 8FB10014 */ lw $s1, 0x14($sp)
/* 0F34A8 802CEAF8 8FB00010 */ lw $s0, 0x10($sp)
/* 0F34AC 802CEAFC 03E00008 */ jr $ra
/* 0F34B0 802CEB00 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -61,7 +61,9 @@ typedef struct Npc {
/* 0x020 */ struct NpcBlurData* blurData; /* related to movement somehow... */
/* 0x024 */ char unk_24[4];
/* 0x028 */ u32 currentAnim;
/* 0x02C */ char unk_2C[12];
/* 0x02C */ char unk_2C[4];
/* 0x030 */ f32 animationSpeed;
/* 0x034 */ char unk_34[4];
/* 0x038 */ struct Vec3f pos;
/* 0x044 */ struct Vec3f rotation;
/* 0x050 */ char unk_50[4];
@ -222,11 +224,6 @@ typedef struct StaticNpcSettings {
/* 0x2A */ s16 unkFlags;
} StaticNpcSettings; // size = 0x2C
typedef union ScriptBufferValue {
f32 f;
s32 s;
} ScriptBufferValue;
typedef struct ScriptInstance {
/* 0x000 */ u8 state;
/* 0x001 */ u8 currentArgc;
@ -252,7 +249,7 @@ typedef struct ScriptInstance {
/* 0x0F0 */ s32 loopCounterTable[8];
/* 0x110 */ u8 switchBlockState[8];
/* 0x118 */ s32 switchBlockValue[8];
/* 0x138 */ ScriptBufferValue* buffer;
/* 0x138 */ s32* buffer;
/* 0x13C */ s32* array;
/* 0x140 */ s32* flagArray;
/* 0x144 */ s32 uniqueID;

View File

@ -35,6 +35,7 @@ f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration);
Npc* get_npc_safe(NpcId npcId);
Npc* get_npc_unsafe(NpcId npcId);
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr);
void set_npc_yaw(Npc* npcPtr, f32 angle);
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);

View File

@ -64,7 +64,7 @@ INCLUDE_ASM("code_13870_len_6980", func_8003B1A8);
INCLUDE_ASM("code_13870_len_6980", func_8003B1B0);
INCLUDE_ASM("code_13870_len_6980", set_npc_yaw);
void INCLUDE_ASM("code_13870_len_6980", set_npc_yaw, Npc* npcPtr, f32 angle);
INCLUDE_ASM("code_13870_len_6980", func_8003B3D0);

View File

@ -25,7 +25,18 @@ ApiStatus si_handle_goto(ScriptInstance* script) {
return ApiStatus_DONE2;
}
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_Loop);
ApiStatus si_handle_Loop(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
s32 loopDepth = ++script->loopDepth;
ASSERT(loopDepth < 8);
script->loopStartTable[loopDepth] = thisPos;
script->loopCounterTable[loopDepth] = var;
return ApiStatus_DONE2;
}
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_end_loop);
@ -53,13 +64,10 @@ INCLUDE_ASM("code_e92d0_len_5da0", si_handle_if_less_equal);
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_if_greater_equal);
ApiStatus si_handle_if_AND(ScriptInstance* script) {
s32 var1;
s32* ptrReadPos = script->ptrReadPos;
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
var1 = ptrReadPos[0];
ptrReadPos++;
if ((get_variable(script, var1) & *ptrReadPos) == 0) {
if ((get_variable(script, var) & *thisPos) == 0) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -67,13 +75,10 @@ ApiStatus si_handle_if_AND(ScriptInstance* script) {
}
ApiStatus si_handle_if_not_AND(ScriptInstance* script) {
s32 var1;
s32* ptrReadPos = script->ptrReadPos;
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
var1 = ptrReadPos[0];
ptrReadPos++;
if ((get_variable(script, var1) & *ptrReadPos) != 0) {
if ((get_variable(script, var) & *thisPos) != 0) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -102,12 +107,12 @@ ApiStatus si_handle_switch(ScriptInstance* script) {
}
ApiStatus si_handle_switch_const(ScriptInstance* script) {
s32 value = *script->ptrReadPos;
Bytecode* thisPos = *script->ptrReadPos;
s32 switchDepth = ++script->switchDepth;
ASSERT(switchDepth < 8);
script->switchBlockValue[switchDepth] = value;
script->switchBlockValue[switchDepth] = thisPos;
script->switchBlockState[switchDepth] = 1;
return ApiStatus_DONE2;
@ -155,10 +160,10 @@ ApiStatus si_handle_end_switch(ScriptInstance* script) {
}
ApiStatus si_handle_set_var(ScriptInstance* script) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 curPtrReadPos = ptrReadPos[0];
Bytecode* thisPos = script->ptrReadPos;
s32 curPtrReadPos = thisPos[0];
set_variable(script, curPtrReadPos, get_variable(script, ptrReadPos[1]));
set_variable(script, curPtrReadPos, get_variable(script, thisPos[1]));
return ApiStatus_DONE2;
}
@ -168,10 +173,10 @@ ApiStatus si_handle_set_const(ScriptInstance* script) {
}
ApiStatus si_handle_set_float(ScriptInstance* script) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 curPtrReadPos = ptrReadPos[0];
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
set_float_variable(script, curPtrReadPos, get_float_variable(script, ptrReadPos[1]));
set_float_variable(script, var, get_float_variable(script, *thisPos));
return ApiStatus_DONE2;
}
@ -194,46 +199,162 @@ INCLUDE_ASM("code_e92d0_len_5da0", si_handle_multiplyF);
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_divideF);
ApiStatus si_handle_set_int_buffer_ptr(ScriptInstance* script) {
script->buffer = (ScriptBufferValue*)get_variable(script, *script->ptrReadPos);
script->buffer = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
ApiStatus si_handle_set_float_buffer_ptr(ScriptInstance* script) {
script->buffer = (ScriptBufferValue*)get_variable(script, *script->ptrReadPos);
script->buffer = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_1_word(ScriptInstance* script) {
s32 out = *script->ptrReadPos;
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
set_variable(script, var, *script->buffer++);
set_variable(script, out, (*script->buffer++).s);
return ApiStatus_DONE2;
}
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_2_word);
ApiStatus si_handle_get_2_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
Bytecode var2;
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_3_word);
var = *thisPos++;
set_variable(script, var, *script->buffer++);
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_4_word);
var2 = *thisPos++;
set_variable(script, var2, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_3_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
var = *thisPos++;
set_variable(script, var, *script->buffer++);
var2 = *thisPos++;
set_variable(script, var2, *script->buffer++);
var3 = *thisPos++;
set_variable(script, var3, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_4_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
Bytecode var4;
var = *thisPos++;
set_variable(script, var, *script->buffer++);
var2 = *thisPos++;
set_variable(script, var2, *script->buffer++);
var3 = *thisPos++;
set_variable(script, var3, *script->buffer++);
var4 = *thisPos++;
set_variable(script, var4, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_Nth_word(ScriptInstance* script) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 out = ptrReadPos[0];
s32 n = get_variable(script, ptrReadPos[1]);
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
set_variable(script, var, script->buffer[get_variable(script, *thisPos)]);
set_variable(script, out, script->buffer[n].s);
return ApiStatus_DONE2;
}
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_1_float);
ApiStatus si_handle_get_1_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_2_float);
var = *thisPos++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_3_float);
return ApiStatus_DONE2;
}
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_4_float);
ApiStatus si_handle_get_2_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
Bytecode var2;
INCLUDE_ASM("code_e92d0_len_5da0", si_handle_get_Nth_float);
var = *thisPos++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
var2 = *thisPos++;
set_float_variable(script, var2, get_float_variable(script, *script->buffer++));
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_3_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
var = *thisPos++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
var2 = *thisPos++;
set_float_variable(script, var2, get_float_variable(script, *script->buffer++));
var3 = *thisPos++;
set_float_variable(script, var3, get_float_variable(script, *script->buffer++));
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_4_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
Bytecode var4;
var = *thisPos++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
var2 = *thisPos++;
set_float_variable(script, var2, get_float_variable(script, *script->buffer++));
var3 = *thisPos++;
set_float_variable(script, var3, get_float_variable(script, *script->buffer++));
var4 = *thisPos++;
set_float_variable(script, var4, get_float_variable(script, *script->buffer++));
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_Nth_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
set_float_variable(script, var, script->buffer[get_variable(script, *thisPos)]);
return ApiStatus_DONE2;
}
ApiStatus si_handle_set_array(ScriptInstance* script) {
script->array = (s32*)get_variable(script, *script->ptrReadPos);
@ -400,6 +521,7 @@ s32 func_802C73B8(ScriptInstance* script) {
break;
}
}
return 1;
}

View File

@ -36,45 +36,150 @@ INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcPos);
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcRotation);
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcScale);
ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
f32 sizeX = get_float_variable(script, *ptrReadPos++);
f32 sizeY = get_float_variable(script, *ptrReadPos++);
f32 sizeZ = get_float_variable(script, *ptrReadPos++);
Npc* npcPtr = resolve_npc(script, npcID);
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcCollisionSize);
if (npcPtr != NULL) {
s32 todo = 1; // TODO: Figure out why this variable and subsequent if block is required for matching
if (todo) {
npcPtr->scale.x = sizeX;
npcPtr->scale.y = sizeY;
npcPtr->scale.z = sizeZ;
}
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
ApiStatus SetNpcCollisionSize(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
s32 height = get_variable(script, *ptrReadPos++);
s32 radius = get_variable(script, *ptrReadPos++);
Npc* npcPtr = resolve_npc(script, npcID);
if (npcPtr != NULL) {
s32 todo = 1; // TODO: Figure out why this variable and subsequent if block is required for matching
if (todo) {
npcPtr->collisionHeight = height;
npcPtr->collisionRadius = radius;
}
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcSpeed);
// TODO: Fix issue with BNEZL vs BNEZ
/*
ApiStatus SetNpcSpeed(ScriptInstance* script, s32 isInitialCall) {
Vytecode* ptrReadPos = script->ptrReadPos;
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
f32 speed = get_float_variable(script, *ptrReadPos);
Npc* npcPtr = resolve_npc(script, npcID);
npcPtr->moveSpeed = speed;
if(npcPtr != NULL) {
if (npcPtr != NULL) {
npcPtr->moveSpeed = speed;
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
*/
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcJumpscale);
ApiStatus SetNpcJumpscale(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
f32 jumpScale = get_float_variable(script, *ptrReadPos);
Npc* npcPtr = resolve_npc(script, npcID);
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcAnimation);
if (npcPtr != NULL) {
npcPtr->jumpScale = jumpScale;
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
INCLUDE_API_ASM("code_f2470_len_27f0", GetNpcAnimation);
ApiStatus SetNpcAnimation(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
s32 animation = get_variable(script, *ptrReadPos);
Npc* npcPtr = resolve_npc(script, npcID);
if (npcPtr != NULL) {
set_npc_animation(npcPtr, animation);
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
ApiStatus GetNpcAnimation(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
Bytecode outVar = *ptrReadPos++;
Npc* npcPtr = resolve_npc(script, npcID);
if (npcPtr != NULL) {
set_variable(script, outVar, npcPtr->currentAnim);
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
f32 animationSpeed = get_float_variable(script, *ptrReadPos++);
Npc* npcPtr = resolve_npc(script, npcID);
if (npcPtr != NULL) {
npcPtr->animationSpeed = animationSpeed;
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
INCLUDE_API_ASM("code_f2470_len_27f0", NpcMoveTo);
INCLUDE_ASM("code_f2470_len_27f0", _npc_jump_to);
INCLUDE_API_ASM("code_f2470_len_27f0", NpcJump0);
void NpcJump0(ScriptInstance* script, s32 isInitialCall) {
_npc_jump_to(script, isInitialCall, 0);
}
INCLUDE_API_ASM("code_f2470_len_27f0", NpcJump1);
void NpcJump1(ScriptInstance* script, s32 isInitialCall) {
_npc_jump_to(script, isInitialCall, 1);
}
INCLUDE_API_ASM("code_f2470_len_27f0", NpcFlyTo);
INCLUDE_API_ASM("code_f2470_len_27f0", GetNpcYaw);
ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
Bytecode outVar = *ptrReadPos++;
Npc* npcPtr = resolve_npc(script, npcID);
INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcYaw);
if (npcPtr != NULL) {
s32 todo = 1; // TODO: Figure out why this variable and subsequent if block is required for matching
if (todo) {
set_variable(script, outVar, clamp_angle(npcPtr->yaw));
}
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
NpcId npcID = get_variable(script, *ptrReadPos++);
Npc* npcPtr = resolve_npc(script, npcID);
if (npcPtr != NULL) {
set_npc_yaw(npcPtr, get_variable(script, *ptrReadPos++));
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
INCLUDE_API_ASM("code_f2470_len_27f0", InterpNpcYaw);