Many more functions decomped

This commit is contained in:
Ethan Roseman 2020-10-08 15:03:58 -04:00
parent 2f67a08a29
commit 011231df41
54 changed files with 947 additions and 1848 deletions

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel init_demo_data
/* 13480 80038080 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 13484 80038084 3C048007 */ lui $a0, %hi(gGameStatusPtr)
/* 13488 80038088 2484419C */ addiu $a0, $a0, %lo(gGameStatusPtr)
/* 1348C 8003808C AFBF0010 */ sw $ra, 0x10($sp)
/* 13490 80038090 8C830000 */ lw $v1, ($a0)
/* 13494 80038094 80620071 */ lb $v0, 0x71($v1)
/* 13498 80038098 14400004 */ bnez $v0, .L800380AC
/* 1349C 8003809C 24020001 */ addiu $v0, $zero, 1
/* 134A0 800380A0 A0600072 */ sb $zero, 0x72($v1)
/* 134A4 800380A4 8C830000 */ lw $v1, ($a0)
/* 134A8 800380A8 A0620071 */ sb $v0, 0x71($v1)
.L800380AC:
/* 134AC 800380AC 8C820000 */ lw $v0, ($a0)
/* 134B0 800380B0 A040006A */ sb $zero, 0x6a($v0)
/* 134B4 800380B4 8C830000 */ lw $v1, ($a0)
/* 134B8 800380B8 A4400068 */ sh $zero, 0x68($v0)
/* 134BC 800380BC 0C01588A */ jal func_80056228
/* 134C0 800380C0 A060006B */ sb $zero, 0x6b($v1)
/* 134C4 800380C4 0C04E0A8 */ jal set_map_transition_effect
/* 134C8 800380C8 24040002 */ addiu $a0, $zero, 2
/* 134CC 800380CC 3C05437F */ lui $a1, 0x437f
/* 134D0 800380D0 0C04DF62 */ jal func_80137D88
/* 134D4 800380D4 0000202D */ daddu $a0, $zero, $zero
/* 134D8 800380D8 0C0514C8 */ jal clear_saved_variables
/* 134DC 800380DC 00000000 */ nop
/* 134E0 800380E0 0C0B0C77 */ jal clear_script_list
/* 134E4 800380E4 00000000 */ nop
/* 134E8 800380E8 8FBF0010 */ lw $ra, 0x10($sp)
/* 134EC 800380EC 03E00008 */ jr $ra
/* 134F0 800380F0 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,37 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel BindNpcAux
/* 202B8 80044EB8 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 202BC 80044EBC AFB10014 */ sw $s1, 0x14($sp)
/* 202C0 80044EC0 0080882D */ daddu $s1, $a0, $zero
/* 202C4 80044EC4 AFBF0020 */ sw $ra, 0x20($sp)
/* 202C8 80044EC8 AFB3001C */ sw $s3, 0x1c($sp)
/* 202CC 80044ECC AFB20018 */ sw $s2, 0x18($sp)
/* 202D0 80044ED0 AFB00010 */ sw $s0, 0x10($sp)
/* 202D4 80044ED4 8E30000C */ lw $s0, 0xc($s1)
/* 202D8 80044ED8 8E330148 */ lw $s3, 0x148($s1)
/* 202DC 80044EDC 8E050000 */ lw $a1, ($s0)
/* 202E0 80044EE0 0C0B1EAF */ jal get_variable
/* 202E4 80044EE4 26100004 */ addiu $s0, $s0, 4
/* 202E8 80044EE8 0040902D */ daddu $s2, $v0, $zero
/* 202EC 80044EEC 8E050000 */ lw $a1, ($s0)
/* 202F0 80044EF0 0C0B1EAF */ jal get_variable
/* 202F4 80044EF4 0220202D */ daddu $a0, $s1, $zero
/* 202F8 80044EF8 0040802D */ daddu $s0, $v0, $zero
/* 202FC 80044EFC 2402FFFF */ addiu $v0, $zero, -1
/* 20300 80044F00 16420002 */ bne $s2, $v0, .L80044F0C
/* 20304 80044F04 00000000 */ nop
/* 20308 80044F08 86720008 */ lh $s2, 8($s3)
.L80044F0C:
/* 2030C 80044F0C 0C00FB3A */ jal get_enemy
/* 20310 80044F10 0240202D */ daddu $a0, $s2, $zero
/* 20314 80044F14 AC50002C */ sw $s0, 0x2c($v0)
/* 20318 80044F18 8FBF0020 */ lw $ra, 0x20($sp)
/* 2031C 80044F1C 8FB3001C */ lw $s3, 0x1c($sp)
/* 20320 80044F20 8FB20018 */ lw $s2, 0x18($sp)
/* 20324 80044F24 8FB10014 */ lw $s1, 0x14($sp)
/* 20328 80044F28 8FB00010 */ lw $s0, 0x10($sp)
/* 2032C 80044F2C 24020002 */ addiu $v0, $zero, 2
/* 20330 80044F30 03E00008 */ jr $ra
/* 20334 80044F34 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,37 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel BindNpcDefeat
/* 205DC 800451DC 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 205E0 800451E0 AFB10014 */ sw $s1, 0x14($sp)
/* 205E4 800451E4 0080882D */ daddu $s1, $a0, $zero
/* 205E8 800451E8 AFBF0020 */ sw $ra, 0x20($sp)
/* 205EC 800451EC AFB3001C */ sw $s3, 0x1c($sp)
/* 205F0 800451F0 AFB20018 */ sw $s2, 0x18($sp)
/* 205F4 800451F4 AFB00010 */ sw $s0, 0x10($sp)
/* 205F8 800451F8 8E30000C */ lw $s0, 0xc($s1)
/* 205FC 800451FC 8E330148 */ lw $s3, 0x148($s1)
/* 20600 80045200 8E050000 */ lw $a1, ($s0)
/* 20604 80045204 0C0B1EAF */ jal get_variable
/* 20608 80045208 26100004 */ addiu $s0, $s0, 4
/* 2060C 8004520C 0040902D */ daddu $s2, $v0, $zero
/* 20610 80045210 8E050000 */ lw $a1, ($s0)
/* 20614 80045214 0C0B1EAF */ jal get_variable
/* 20618 80045218 0220202D */ daddu $a0, $s1, $zero
/* 2061C 8004521C 0040802D */ daddu $s0, $v0, $zero
/* 20620 80045220 2402FFFF */ addiu $v0, $zero, -1
/* 20624 80045224 16420002 */ bne $s2, $v0, .L80045230
/* 20628 80045228 00000000 */ nop
/* 2062C 8004522C 86720008 */ lh $s2, 8($s3)
.L80045230:
/* 20630 80045230 0C00FB3A */ jal get_enemy
/* 20634 80045234 0240202D */ daddu $a0, $s2, $zero
/* 20638 80045238 AC500030 */ sw $s0, 0x30($v0)
/* 2063C 8004523C 8FBF0020 */ lw $ra, 0x20($sp)
/* 20640 80045240 8FB3001C */ lw $s3, 0x1c($sp)
/* 20644 80045244 8FB20018 */ lw $s2, 0x18($sp)
/* 20648 80045248 8FB10014 */ lw $s1, 0x14($sp)
/* 2064C 8004524C 8FB00010 */ lw $s0, 0x10($sp)
/* 20650 80045250 24020002 */ addiu $v0, $zero, 2
/* 20654 80045254 03E00008 */ jr $ra
/* 20658 80045258 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,45 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel BindNpcHit
/* 20540 80045140 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 20544 80045144 AFB10014 */ sw $s1, 0x14($sp)
/* 20548 80045148 0080882D */ daddu $s1, $a0, $zero
/* 2054C 8004514C AFBF0020 */ sw $ra, 0x20($sp)
/* 20550 80045150 AFB3001C */ sw $s3, 0x1c($sp)
/* 20554 80045154 AFB20018 */ sw $s2, 0x18($sp)
/* 20558 80045158 AFB00010 */ sw $s0, 0x10($sp)
/* 2055C 8004515C 8E30000C */ lw $s0, 0xc($s1)
/* 20560 80045160 8E330148 */ lw $s3, 0x148($s1)
/* 20564 80045164 8E050000 */ lw $a1, ($s0)
/* 20568 80045168 0C0B1EAF */ jal get_variable
/* 2056C 8004516C 26100004 */ addiu $s0, $s0, 4
/* 20570 80045170 0040902D */ daddu $s2, $v0, $zero
/* 20574 80045174 8E050000 */ lw $a1, ($s0)
/* 20578 80045178 0C0B1EAF */ jal get_variable
/* 2057C 8004517C 0220202D */ daddu $a0, $s1, $zero
/* 20580 80045180 0040802D */ daddu $s0, $v0, $zero
/* 20584 80045184 2402FFFF */ addiu $v0, $zero, -1
/* 20588 80045188 16420002 */ bne $s2, $v0, .L80045194
/* 2058C 8004518C 00000000 */ nop
/* 20590 80045190 86720008 */ lh $s2, 8($s3)
.L80045194:
/* 20594 80045194 0C00FB3A */ jal get_enemy
/* 20598 80045198 0240202D */ daddu $a0, $s2, $zero
/* 2059C 8004519C 0040982D */ daddu $s3, $v0, $zero
/* 205A0 800451A0 8E620040 */ lw $v0, 0x40($s3)
/* 205A4 800451A4 50400005 */ beql $v0, $zero, .L800451BC
/* 205A8 800451A8 AE700028 */ sw $s0, 0x28($s3)
/* 205AC 800451AC 8E640058 */ lw $a0, 0x58($s3)
/* 205B0 800451B0 0C0B102B */ jal kill_script_by_ID
/* 205B4 800451B4 00000000 */ nop
/* 205B8 800451B8 AE700028 */ sw $s0, 0x28($s3)
.L800451BC:
/* 205BC 800451BC 8FBF0020 */ lw $ra, 0x20($sp)
/* 205C0 800451C0 8FB3001C */ lw $s3, 0x1c($sp)
/* 205C4 800451C4 8FB20018 */ lw $s2, 0x18($sp)
/* 205C8 800451C8 8FB10014 */ lw $s1, 0x14($sp)
/* 205CC 800451CC 8FB00010 */ lw $s0, 0x10($sp)
/* 205D0 800451D0 24020002 */ addiu $v0, $zero, 2
/* 205D4 800451D4 03E00008 */ jr $ra
/* 205D8 800451D8 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,37 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel BindNpcIdle
/* 1FFAC 80044BAC 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 1FFB0 80044BB0 AFB10014 */ sw $s1, 0x14($sp)
/* 1FFB4 80044BB4 0080882D */ daddu $s1, $a0, $zero
/* 1FFB8 80044BB8 AFBF0020 */ sw $ra, 0x20($sp)
/* 1FFBC 80044BBC AFB3001C */ sw $s3, 0x1c($sp)
/* 1FFC0 80044BC0 AFB20018 */ sw $s2, 0x18($sp)
/* 1FFC4 80044BC4 AFB00010 */ sw $s0, 0x10($sp)
/* 1FFC8 80044BC8 8E30000C */ lw $s0, 0xc($s1)
/* 1FFCC 80044BCC 8E330148 */ lw $s3, 0x148($s1)
/* 1FFD0 80044BD0 8E050000 */ lw $a1, ($s0)
/* 1FFD4 80044BD4 0C0B1EAF */ jal get_variable
/* 1FFD8 80044BD8 26100004 */ addiu $s0, $s0, 4
/* 1FFDC 80044BDC 0040902D */ daddu $s2, $v0, $zero
/* 1FFE0 80044BE0 8E050000 */ lw $a1, ($s0)
/* 1FFE4 80044BE4 0C0B1EAF */ jal get_variable
/* 1FFE8 80044BE8 0220202D */ daddu $a0, $s1, $zero
/* 1FFEC 80044BEC 0040802D */ daddu $s0, $v0, $zero
/* 1FFF0 80044BF0 2402FFFF */ addiu $v0, $zero, -1
/* 1FFF4 80044BF4 16420002 */ bne $s2, $v0, .L80044C00
/* 1FFF8 80044BF8 00000000 */ nop
/* 1FFFC 80044BFC 86720008 */ lh $s2, 8($s3)
.L80044C00:
/* 20000 80044C00 0C00FB3A */ jal get_enemy
/* 20004 80044C04 0240202D */ daddu $a0, $s2, $zero
/* 20008 80044C08 AC500024 */ sw $s0, 0x24($v0)
/* 2000C 80044C0C 8FBF0020 */ lw $ra, 0x20($sp)
/* 20010 80044C10 8FB3001C */ lw $s3, 0x1c($sp)
/* 20014 80044C14 8FB20018 */ lw $s2, 0x18($sp)
/* 20018 80044C18 8FB10014 */ lw $s1, 0x14($sp)
/* 2001C 80044C1C 8FB00010 */ lw $s0, 0x10($sp)
/* 20020 80044C20 24020002 */ addiu $v0, $zero, 2
/* 20024 80044C24 03E00008 */ jr $ra
/* 20028 80044C28 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,45 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel BindNpcInteract
/* 204A4 800450A4 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 204A8 800450A8 AFB10014 */ sw $s1, 0x14($sp)
/* 204AC 800450AC 0080882D */ daddu $s1, $a0, $zero
/* 204B0 800450B0 AFBF0020 */ sw $ra, 0x20($sp)
/* 204B4 800450B4 AFB3001C */ sw $s3, 0x1c($sp)
/* 204B8 800450B8 AFB20018 */ sw $s2, 0x18($sp)
/* 204BC 800450BC AFB00010 */ sw $s0, 0x10($sp)
/* 204C0 800450C0 8E30000C */ lw $s0, 0xc($s1)
/* 204C4 800450C4 8E330148 */ lw $s3, 0x148($s1)
/* 204C8 800450C8 8E050000 */ lw $a1, ($s0)
/* 204CC 800450CC 0C0B1EAF */ jal get_variable
/* 204D0 800450D0 26100004 */ addiu $s0, $s0, 4
/* 204D4 800450D4 0040902D */ daddu $s2, $v0, $zero
/* 204D8 800450D8 8E050000 */ lw $a1, ($s0)
/* 204DC 800450DC 0C0B1EAF */ jal get_variable
/* 204E0 800450E0 0220202D */ daddu $a0, $s1, $zero
/* 204E4 800450E4 0040802D */ daddu $s0, $v0, $zero
/* 204E8 800450E8 2402FFFF */ addiu $v0, $zero, -1
/* 204EC 800450EC 16420002 */ bne $s2, $v0, .L800450F8
/* 204F0 800450F0 00000000 */ nop
/* 204F4 800450F4 86720008 */ lh $s2, 8($s3)
.L800450F8:
/* 204F8 800450F8 0C00FB3A */ jal get_enemy
/* 204FC 800450FC 0240202D */ daddu $a0, $s2, $zero
/* 20500 80045100 0040982D */ daddu $s3, $v0, $zero
/* 20504 80045104 8E620038 */ lw $v0, 0x38($s3)
/* 20508 80045108 50400005 */ beql $v0, $zero, .L80045120
/* 2050C 8004510C AE700020 */ sw $s0, 0x20($s3)
/* 20510 80045110 8E640050 */ lw $a0, 0x50($s3)
/* 20514 80045114 0C0B102B */ jal kill_script_by_ID
/* 20518 80045118 00000000 */ nop
/* 2051C 8004511C AE700020 */ sw $s0, 0x20($s3)
.L80045120:
/* 20520 80045120 8FBF0020 */ lw $ra, 0x20($sp)
/* 20524 80045124 8FB3001C */ lw $s3, 0x1c($sp)
/* 20528 80045128 8FB20018 */ lw $s2, 0x18($sp)
/* 2052C 8004512C 8FB10014 */ lw $s1, 0x14($sp)
/* 20530 80045130 8FB00010 */ lw $s0, 0x10($sp)
/* 20534 80045134 24020002 */ addiu $v0, $zero, 2
/* 20538 80045138 03E00008 */ jr $ra
/* 2053C 8004513C 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,24 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel ClearDefeatedEnemies
/* 20A40 80045640 3C07800B */ lui $a3, %hi(gCurrentEncounter)
/* 20A44 80045644 24E70F10 */ addiu $a3, $a3, %lo(gCurrentEncounter)
/* 20A48 80045648 0000302D */ daddu $a2, $zero, $zero
/* 20A4C 8004564C 00C0282D */ daddu $a1, $a2, $zero
.L80045650:
/* 20A50 80045650 0000202D */ daddu $a0, $zero, $zero
/* 20A54 80045654 00A0182D */ daddu $v1, $a1, $zero
.L80045658:
/* 20A58 80045658 00E31021 */ addu $v0, $a3, $v1
/* 20A5C 8004565C AC4000B0 */ sw $zero, 0xb0($v0)
/* 20A60 80045660 24840001 */ addiu $a0, $a0, 1
/* 20A64 80045664 2882000C */ slti $v0, $a0, 0xc
/* 20A68 80045668 1440FFFB */ bnez $v0, .L80045658
/* 20A6C 8004566C 24630004 */ addiu $v1, $v1, 4
/* 20A70 80045670 24C60001 */ addiu $a2, $a2, 1
/* 20A74 80045674 28C2003C */ slti $v0, $a2, 0x3c
/* 20A78 80045678 1440FFF5 */ bnez $v0, .L80045650
/* 20A7C 8004567C 24A50030 */ addiu $a1, $a1, 0x30
/* 20A80 80045680 03E00008 */ jr $ra
/* 20A84 80045684 24020002 */ addiu $v0, $zero, 2

View File

@ -1,38 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel DoNpcDefeat
/* 1FA2C 8004462C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 1FA30 80044630 AFB10014 */ sw $s1, 0x14($sp)
/* 1FA34 80044634 0080882D */ daddu $s1, $a0, $zero
/* 1FA38 80044638 AFBF0018 */ sw $ra, 0x18($sp)
/* 1FA3C 8004463C AFB00010 */ sw $s0, 0x10($sp)
/* 1FA40 80044640 8E300148 */ lw $s0, 0x148($s1)
/* 1FA44 80044644 0C00EABB */ jal get_npc_unsafe
/* 1FA48 80044648 86040008 */ lh $a0, 8($s0)
/* 1FA4C 8004464C 0220202D */ daddu $a0, $s1, $zero
/* 1FA50 80044650 0C0B0FCF */ jal kill_script
/* 1FA54 80044654 0040882D */ daddu $s1, $v0, $zero
/* 1FA58 80044658 3C048007 */ lui $a0, 0x8007
/* 1FA5C 8004465C 24847E38 */ addiu $a0, $a0, 0x7e38
/* 1FA60 80044660 8E0200CC */ lw $v0, 0xcc($s0)
/* 1FA64 80044664 2405000A */ addiu $a1, $zero, 0xa
/* 1FA68 80044668 8C420018 */ lw $v0, 0x18($v0)
/* 1FA6C 8004466C 0000302D */ daddu $a2, $zero, $zero
/* 1FA70 80044670 0C0B0CF8 */ jal start_script
/* 1FA74 80044674 AE220028 */ sw $v0, 0x28($s1)
/* 1FA78 80044678 0040182D */ daddu $v1, $v0, $zero
/* 1FA7C 8004467C AE030048 */ sw $v1, 0x48($s0)
/* 1FA80 80044680 8C620144 */ lw $v0, 0x144($v1)
/* 1FA84 80044684 AE020060 */ sw $v0, 0x60($s0)
/* 1FA88 80044688 AC700148 */ sw $s0, 0x148($v1)
/* 1FA8C 8004468C 86020008 */ lh $v0, 8($s0)
/* 1FA90 80044690 AC62014C */ sw $v0, 0x14c($v1)
/* 1FA94 80044694 92040006 */ lbu $a0, 6($s0)
/* 1FA98 80044698 A0640004 */ sb $a0, 4($v1)
/* 1FA9C 8004469C 8FBF0018 */ lw $ra, 0x18($sp)
/* 1FAA0 800446A0 8FB10014 */ lw $s1, 0x14($sp)
/* 1FAA4 800446A4 8FB00010 */ lw $s0, 0x10($sp)
/* 1FAA8 800446A8 240200FF */ addiu $v0, $zero, 0xff
/* 1FAAC 800446AC 03E00008 */ jr $ra
/* 1FAB0 800446B0 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,52 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel EnableNpcAI
/* 200F0 80044CF0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 200F4 80044CF4 AFB10014 */ sw $s1, 0x14($sp)
/* 200F8 80044CF8 0080882D */ daddu $s1, $a0, $zero
/* 200FC 80044CFC AFBF0020 */ sw $ra, 0x20($sp)
/* 20100 80044D00 AFB3001C */ sw $s3, 0x1c($sp)
/* 20104 80044D04 AFB20018 */ sw $s2, 0x18($sp)
/* 20108 80044D08 AFB00010 */ sw $s0, 0x10($sp)
/* 2010C 80044D0C 8E30000C */ lw $s0, 0xc($s1)
/* 20110 80044D10 8E330148 */ lw $s3, 0x148($s1)
/* 20114 80044D14 8E050000 */ lw $a1, ($s0)
/* 20118 80044D18 0C0B1EAF */ jal get_variable
/* 2011C 80044D1C 26100004 */ addiu $s0, $s0, 4
/* 20120 80044D20 0040902D */ daddu $s2, $v0, $zero
/* 20124 80044D24 8E050000 */ lw $a1, ($s0)
/* 20128 80044D28 0C0B1EAF */ jal get_variable
/* 2012C 80044D2C 0220202D */ daddu $a0, $s1, $zero
/* 20130 80044D30 0040802D */ daddu $s0, $v0, $zero
/* 20134 80044D34 2402FFFF */ addiu $v0, $zero, -1
/* 20138 80044D38 16420002 */ bne $s2, $v0, .L80044D44
/* 2013C 80044D3C 00000000 */ nop
/* 20140 80044D40 86720008 */ lh $s2, 8($s3)
.L80044D44:
/* 20144 80044D44 0C00FB3A */ jal get_enemy
/* 20148 80044D48 0240202D */ daddu $a0, $s2, $zero
/* 2014C 80044D4C 12000008 */ beqz $s0, .L80044D70
/* 20150 80044D50 0040982D */ daddu $s3, $v0, $zero
/* 20154 80044D54 8E62003C */ lw $v0, 0x3c($s3)
/* 20158 80044D58 1040000A */ beqz $v0, .L80044D84
/* 2015C 80044D5C 00000000 */ nop
/* 20160 80044D60 0C0B1123 */ jal resume_all_script
/* 20164 80044D64 8E640054 */ lw $a0, 0x54($s3)
/* 20168 80044D68 08011361 */ j .L80044D84
/* 2016C 80044D6C 00000000 */ nop
.L80044D70:
/* 20170 80044D70 8E62003C */ lw $v0, 0x3c($s3)
/* 20174 80044D74 10400003 */ beqz $v0, .L80044D84
/* 20178 80044D78 00000000 */ nop
/* 2017C 80044D7C 0C0B1108 */ jal suspend_all_script
/* 20180 80044D80 8E640054 */ lw $a0, 0x54($s3)
.L80044D84:
/* 20184 80044D84 8FBF0020 */ lw $ra, 0x20($sp)
/* 20188 80044D88 8FB3001C */ lw $s3, 0x1c($sp)
/* 2018C 80044D8C 8FB20018 */ lw $s2, 0x18($sp)
/* 20190 80044D90 8FB10014 */ lw $s1, 0x14($sp)
/* 20194 80044D94 8FB00010 */ lw $s0, 0x10($sp)
/* 20198 80044D98 24020002 */ addiu $v0, $zero, 2
/* 2019C 80044D9C 03E00008 */ jr $ra
/* 201A0 80044DA0 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,52 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel EnableNpcAux
/* 203F0 80044FF0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 203F4 80044FF4 AFB10014 */ sw $s1, 0x14($sp)
/* 203F8 80044FF8 0080882D */ daddu $s1, $a0, $zero
/* 203FC 80044FFC AFBF0020 */ sw $ra, 0x20($sp)
/* 20400 80045000 AFB3001C */ sw $s3, 0x1c($sp)
/* 20404 80045004 AFB20018 */ sw $s2, 0x18($sp)
/* 20408 80045008 AFB00010 */ sw $s0, 0x10($sp)
/* 2040C 8004500C 8E30000C */ lw $s0, 0xc($s1)
/* 20410 80045010 8E330148 */ lw $s3, 0x148($s1)
/* 20414 80045014 8E050000 */ lw $a1, ($s0)
/* 20418 80045018 0C0B1EAF */ jal get_variable
/* 2041C 8004501C 26100004 */ addiu $s0, $s0, 4
/* 20420 80045020 0040902D */ daddu $s2, $v0, $zero
/* 20424 80045024 8E050000 */ lw $a1, ($s0)
/* 20428 80045028 0C0B1EAF */ jal get_variable
/* 2042C 8004502C 0220202D */ daddu $a0, $s1, $zero
/* 20430 80045030 0040802D */ daddu $s0, $v0, $zero
/* 20434 80045034 2402FFFF */ addiu $v0, $zero, -1
/* 20438 80045038 16420002 */ bne $s2, $v0, .L80045044
/* 2043C 8004503C 00000000 */ nop
/* 20440 80045040 86720008 */ lh $s2, 8($s3)
.L80045044:
/* 20444 80045044 0C00FB3A */ jal get_enemy
/* 20448 80045048 0240202D */ daddu $a0, $s2, $zero
/* 2044C 8004504C 12000008 */ beqz $s0, .L80045070
/* 20450 80045050 0040982D */ daddu $s3, $v0, $zero
/* 20454 80045054 8E620044 */ lw $v0, 0x44($s3)
/* 20458 80045058 1040000A */ beqz $v0, .L80045084
/* 2045C 8004505C 00000000 */ nop
/* 20460 80045060 0C0B1123 */ jal resume_all_script
/* 20464 80045064 8E64005C */ lw $a0, 0x5c($s3)
/* 20468 80045068 08011421 */ j .L80045084
/* 2046C 8004506C 00000000 */ nop
.L80045070:
/* 20470 80045070 8E620044 */ lw $v0, 0x44($s3)
/* 20474 80045074 10400003 */ beqz $v0, .L80045084
/* 20478 80045078 00000000 */ nop
/* 2047C 8004507C 0C0B1108 */ jal suspend_all_script
/* 20480 80045080 8E64005C */ lw $a0, 0x5c($s3)
.L80045084:
/* 20484 80045084 8FBF0020 */ lw $ra, 0x20($sp)
/* 20488 80045088 8FB3001C */ lw $s3, 0x1c($sp)
/* 2048C 8004508C 8FB20018 */ lw $s2, 0x18($sp)
/* 20490 80045090 8FB10014 */ lw $s1, 0x14($sp)
/* 20494 80045094 8FB00010 */ lw $s0, 0x10($sp)
/* 20498 80045098 24020002 */ addiu $v0, $zero, 2
/* 2049C 8004509C 03E00008 */ jr $ra
/* 204A0 800450A0 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,45 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetNpcVar
/* 207BC 800453BC 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 207C0 800453C0 AFB3001C */ sw $s3, 0x1c($sp)
/* 207C4 800453C4 0080982D */ daddu $s3, $a0, $zero
/* 207C8 800453C8 AFBF0024 */ sw $ra, 0x24($sp)
/* 207CC 800453CC AFB40020 */ sw $s4, 0x20($sp)
/* 207D0 800453D0 AFB20018 */ sw $s2, 0x18($sp)
/* 207D4 800453D4 AFB10014 */ sw $s1, 0x14($sp)
/* 207D8 800453D8 AFB00010 */ sw $s0, 0x10($sp)
/* 207DC 800453DC 8E70000C */ lw $s0, 0xc($s3)
/* 207E0 800453E0 8E720148 */ lw $s2, 0x148($s3)
/* 207E4 800453E4 8E050000 */ lw $a1, ($s0)
/* 207E8 800453E8 0C0B1EAF */ jal get_variable
/* 207EC 800453EC 26100004 */ addiu $s0, $s0, 4
/* 207F0 800453F0 0040882D */ daddu $s1, $v0, $zero
/* 207F4 800453F4 8E050000 */ lw $a1, ($s0)
/* 207F8 800453F8 26100004 */ addiu $s0, $s0, 4
/* 207FC 800453FC 0C0B1EAF */ jal get_variable
/* 20800 80045400 0260202D */ daddu $a0, $s3, $zero
/* 20804 80045404 0040A02D */ daddu $s4, $v0, $zero
/* 20808 80045408 2402FFFF */ addiu $v0, $zero, -1
/* 2080C 8004540C 16220002 */ bne $s1, $v0, .L80045418
/* 20810 80045410 8E100000 */ lw $s0, ($s0)
/* 20814 80045414 86510008 */ lh $s1, 8($s2)
.L80045418:
/* 20818 80045418 0C00FB3A */ jal get_enemy
/* 2081C 8004541C 0220202D */ daddu $a0, $s1, $zero
/* 20820 80045420 0260202D */ daddu $a0, $s3, $zero
/* 20824 80045424 00141880 */ sll $v1, $s4, 2
/* 20828 80045428 00431021 */ addu $v0, $v0, $v1
/* 2082C 8004542C 8C46006C */ lw $a2, 0x6c($v0)
/* 20830 80045430 0C0B2026 */ jal set_variable
/* 20834 80045434 0200282D */ daddu $a1, $s0, $zero
/* 20838 80045438 8FBF0024 */ lw $ra, 0x24($sp)
/* 2083C 8004543C 8FB40020 */ lw $s4, 0x20($sp)
/* 20840 80045440 8FB3001C */ lw $s3, 0x1c($sp)
/* 20844 80045444 8FB20018 */ lw $s2, 0x18($sp)
/* 20848 80045448 8FB10014 */ lw $s1, 0x14($sp)
/* 2084C 8004544C 8FB00010 */ lw $s0, 0x10($sp)
/* 20850 80045450 24020002 */ addiu $v0, $zero, 2
/* 20854 80045454 03E00008 */ jr $ra
/* 20858 80045458 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,29 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetSelfAnimationFromTable
/* 20B34 80045734 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 20B38 80045738 AFB10014 */ sw $s1, 0x14($sp)
/* 20B3C 8004573C 0080882D */ daddu $s1, $a0, $zero
/* 20B40 80045740 AFBF001C */ sw $ra, 0x1c($sp)
/* 20B44 80045744 AFB20018 */ sw $s2, 0x18($sp)
/* 20B48 80045748 AFB00010 */ sw $s0, 0x10($sp)
/* 20B4C 8004574C 8E30000C */ lw $s0, 0xc($s1)
/* 20B50 80045750 8E320148 */ lw $s2, 0x148($s1)
/* 20B54 80045754 8E050000 */ lw $a1, ($s0)
/* 20B58 80045758 0C0B1EAF */ jal get_variable
/* 20B5C 8004575C 26100004 */ addiu $s0, $s0, 4
/* 20B60 80045760 00021080 */ sll $v0, $v0, 2
/* 20B64 80045764 8E4300CC */ lw $v1, 0xcc($s2)
/* 20B68 80045768 8E050000 */ lw $a1, ($s0)
/* 20B6C 8004576C 00431021 */ addu $v0, $v0, $v1
/* 20B70 80045770 8C460000 */ lw $a2, ($v0)
/* 20B74 80045774 0C0B2026 */ jal set_variable
/* 20B78 80045778 0220202D */ daddu $a0, $s1, $zero
/* 20B7C 8004577C 8FBF001C */ lw $ra, 0x1c($sp)
/* 20B80 80045780 8FB20018 */ lw $s2, 0x18($sp)
/* 20B84 80045784 8FB10014 */ lw $s1, 0x14($sp)
/* 20B88 80045788 8FB00010 */ lw $s0, 0x10($sp)
/* 20B8C 8004578C 24020002 */ addiu $v0, $zero, 2
/* 20B90 80045790 03E00008 */ jr $ra
/* 20B94 80045794 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetSelfVar
/* 206C0 800452C0 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 206C4 800452C4 AFB20018 */ sw $s2, 0x18($sp)
/* 206C8 800452C8 0080902D */ daddu $s2, $a0, $zero
/* 206CC 800452CC AFBF001C */ sw $ra, 0x1c($sp)
/* 206D0 800452D0 AFB10014 */ sw $s1, 0x14($sp)
/* 206D4 800452D4 AFB00010 */ sw $s0, 0x10($sp)
/* 206D8 800452D8 8E51000C */ lw $s1, 0xc($s2)
/* 206DC 800452DC 8E500148 */ lw $s0, 0x148($s2)
/* 206E0 800452E0 8E250000 */ lw $a1, ($s1)
/* 206E4 800452E4 0C0B1EAF */ jal get_variable
/* 206E8 800452E8 26310004 */ addiu $s1, $s1, 4
/* 206EC 800452EC 00021080 */ sll $v0, $v0, 2
/* 206F0 800452F0 02028021 */ addu $s0, $s0, $v0
/* 206F4 800452F4 8E250000 */ lw $a1, ($s1)
/* 206F8 800452F8 8E06006C */ lw $a2, 0x6c($s0)
/* 206FC 800452FC 0C0B2026 */ jal set_variable
/* 20700 80045300 0240202D */ daddu $a0, $s2, $zero
/* 20704 80045304 8FBF001C */ lw $ra, 0x1c($sp)
/* 20708 80045308 8FB20018 */ lw $s2, 0x18($sp)
/* 2070C 8004530C 8FB10014 */ lw $s1, 0x14($sp)
/* 20710 80045310 8FB00010 */ lw $s0, 0x10($sp)
/* 20714 80045314 24020002 */ addiu $v0, $zero, 2
/* 20718 80045318 03E00008 */ jr $ra
/* 2071C 8004531C 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,56 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel RestartNpcAI
/* 2002C 80044C2C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 20030 80044C30 AFB10014 */ sw $s1, 0x14($sp)
/* 20034 80044C34 0080882D */ daddu $s1, $a0, $zero
/* 20038 80044C38 AFBF001C */ sw $ra, 0x1c($sp)
/* 2003C 80044C3C AFB20018 */ sw $s2, 0x18($sp)
/* 20040 80044C40 AFB00010 */ sw $s0, 0x10($sp)
/* 20044 80044C44 8E22000C */ lw $v0, 0xc($s1)
/* 20048 80044C48 8C450000 */ lw $a1, ($v0)
/* 2004C 80044C4C 0C0B1EAF */ jal get_variable
/* 20050 80044C50 8E300148 */ lw $s0, 0x148($s1)
/* 20054 80044C54 0040202D */ daddu $a0, $v0, $zero
/* 20058 80044C58 2402FFFF */ addiu $v0, $zero, -1
/* 2005C 80044C5C 14820002 */ bne $a0, $v0, .L80044C68
/* 20060 80044C60 00000000 */ nop
/* 20064 80044C64 86040008 */ lh $a0, 8($s0)
.L80044C68:
/* 20068 80044C68 0C00FB3A */ jal get_enemy
/* 2006C 80044C6C 2412000B */ addiu $s2, $zero, 0xb
/* 20070 80044C70 0040802D */ daddu $s0, $v0, $zero
/* 20074 80044C74 8E020000 */ lw $v0, ($s0)
/* 20078 80044C78 30420001 */ andi $v0, $v0, 1
/* 2007C 80044C7C 54400001 */ bnel $v0, $zero, .L80044C84
/* 20080 80044C80 2412000A */ addiu $s2, $zero, 0xa
.L80044C84:
/* 20084 80044C84 8E02003C */ lw $v0, 0x3c($s0)
/* 20088 80044C88 10400005 */ beqz $v0, .L80044CA0
/* 2008C 80044C8C 2405000A */ addiu $a1, $zero, 0xa
/* 20090 80044C90 8E040054 */ lw $a0, 0x54($s0)
/* 20094 80044C94 0C0B102B */ jal kill_script_by_ID
/* 20098 80044C98 00000000 */ nop
/* 2009C 80044C9C 2405000A */ addiu $a1, $zero, 0xa
.L80044CA0:
/* 200A0 80044CA0 24020064 */ addiu $v0, $zero, 0x64
/* 200A4 80044CA4 8E040024 */ lw $a0, 0x24($s0)
/* 200A8 80044CA8 0000302D */ daddu $a2, $zero, $zero
/* 200AC 80044CAC 0C0B0CF8 */ jal start_script
/* 200B0 80044CB0 AE0200C8 */ sw $v0, 0xc8($s0)
/* 200B4 80044CB4 0040182D */ daddu $v1, $v0, $zero
/* 200B8 80044CB8 AE03003C */ sw $v1, 0x3c($s0)
/* 200BC 80044CBC 8C620144 */ lw $v0, 0x144($v1)
/* 200C0 80044CC0 AE020054 */ sw $v0, 0x54($s0)
/* 200C4 80044CC4 AC700148 */ sw $s0, 0x148($v1)
/* 200C8 80044CC8 8E24014C */ lw $a0, 0x14c($s1)
/* 200CC 80044CCC A0720004 */ sb $s2, 4($v1)
/* 200D0 80044CD0 AC64014C */ sw $a0, 0x14c($v1)
/* 200D4 80044CD4 8FBF001C */ lw $ra, 0x1c($sp)
/* 200D8 80044CD8 8FB20018 */ lw $s2, 0x18($sp)
/* 200DC 80044CDC 8FB10014 */ lw $s1, 0x14($sp)
/* 200E0 80044CE0 8FB00010 */ lw $s0, 0x10($sp)
/* 200E4 80044CE4 24020002 */ addiu $v0, $zero, 2
/* 200E8 80044CE8 03E00008 */ jr $ra
/* 200EC 80044CEC 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,53 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel RestartNpcAux
/* 20338 80044F38 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 2033C 80044F3C AFBF001C */ sw $ra, 0x1c($sp)
/* 20340 80044F40 AFB20018 */ sw $s2, 0x18($sp)
/* 20344 80044F44 AFB10014 */ sw $s1, 0x14($sp)
/* 20348 80044F48 AFB00010 */ sw $s0, 0x10($sp)
/* 2034C 80044F4C 8C82000C */ lw $v0, 0xc($a0)
/* 20350 80044F50 8C450000 */ lw $a1, ($v0)
/* 20354 80044F54 0C0B1EAF */ jal get_variable
/* 20358 80044F58 8C900148 */ lw $s0, 0x148($a0)
/* 2035C 80044F5C 0040882D */ daddu $s1, $v0, $zero
/* 20360 80044F60 2402FFFF */ addiu $v0, $zero, -1
/* 20364 80044F64 16220002 */ bne $s1, $v0, .L80044F70
/* 20368 80044F68 00000000 */ nop
/* 2036C 80044F6C 86110008 */ lh $s1, 8($s0)
.L80044F70:
/* 20370 80044F70 0C00FB3A */ jal get_enemy
/* 20374 80044F74 0220202D */ daddu $a0, $s1, $zero
/* 20378 80044F78 0040802D */ daddu $s0, $v0, $zero
/* 2037C 80044F7C 8E020000 */ lw $v0, ($s0)
/* 20380 80044F80 30420001 */ andi $v0, $v0, 1
/* 20384 80044F84 10400002 */ beqz $v0, .L80044F90
/* 20388 80044F88 2412000B */ addiu $s2, $zero, 0xb
/* 2038C 80044F8C 2412000A */ addiu $s2, $zero, 0xa
.L80044F90:
/* 20390 80044F90 8E020044 */ lw $v0, 0x44($s0)
/* 20394 80044F94 10400005 */ beqz $v0, .L80044FAC
/* 20398 80044F98 2405000A */ addiu $a1, $zero, 0xa
/* 2039C 80044F9C 8E04005C */ lw $a0, 0x5c($s0)
/* 203A0 80044FA0 0C0B102B */ jal kill_script_by_ID
/* 203A4 80044FA4 00000000 */ nop
/* 203A8 80044FA8 2405000A */ addiu $a1, $zero, 0xa
.L80044FAC:
/* 203AC 80044FAC 8E04002C */ lw $a0, 0x2c($s0)
/* 203B0 80044FB0 0C0B0CF8 */ jal start_script
/* 203B4 80044FB4 0000302D */ daddu $a2, $zero, $zero
/* 203B8 80044FB8 0040182D */ daddu $v1, $v0, $zero
/* 203BC 80044FBC AE030044 */ sw $v1, 0x44($s0)
/* 203C0 80044FC0 8C640144 */ lw $a0, 0x144($v1)
/* 203C4 80044FC4 AE04005C */ sw $a0, 0x5c($s0)
/* 203C8 80044FC8 AC700148 */ sw $s0, 0x148($v1)
/* 203CC 80044FCC AC71014C */ sw $s1, 0x14c($v1)
/* 203D0 80044FD0 A0720004 */ sb $s2, 4($v1)
/* 203D4 80044FD4 8FBF001C */ lw $ra, 0x1c($sp)
/* 203D8 80044FD8 8FB20018 */ lw $s2, 0x18($sp)
/* 203DC 80044FDC 8FB10014 */ lw $s1, 0x14($sp)
/* 203E0 80044FE0 8FB00010 */ lw $s0, 0x10($sp)
/* 203E4 80044FE4 24020002 */ addiu $v0, $zero, 2
/* 203E8 80044FE8 03E00008 */ jr $ra
/* 203EC 80044FEC 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetEncounterStatusFlags
/* 1F580 80044180 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 1F584 80044184 AFB10014 */ sw $s1, 0x14($sp)
/* 1F588 80044188 3C11800B */ lui $s1, %hi(gCurrentEncounter)
/* 1F58C 8004418C 26310F10 */ addiu $s1, $s1, %lo(gCurrentEncounter)
/* 1F590 80044190 AFBF001C */ sw $ra, 0x1c($sp)
/* 1F594 80044194 AFB20018 */ sw $s2, 0x18($sp)
/* 1F598 80044198 AFB00010 */ sw $s0, 0x10($sp)
/* 1F59C 8004419C 8C82000C */ lw $v0, 0xc($a0)
/* 1F5A0 800441A0 8C450004 */ lw $a1, 4($v0)
/* 1F5A4 800441A4 8C500000 */ lw $s0, ($v0)
/* 1F5A8 800441A8 0C0B1EAF */ jal get_variable
/* 1F5AC 800441AC 0220902D */ daddu $s2, $s1, $zero
/* 1F5B0 800441B0 10400005 */ beqz $v0, .L800441C8
/* 1F5B4 800441B4 00101827 */ nor $v1, $zero, $s0
/* 1F5B8 800441B8 8E220000 */ lw $v0, ($s1)
/* 1F5BC 800441BC 00501025 */ or $v0, $v0, $s0
/* 1F5C0 800441C0 08011075 */ j .L800441D4
/* 1F5C4 800441C4 AE220000 */ sw $v0, ($s1)
.L800441C8:
/* 1F5C8 800441C8 8E420000 */ lw $v0, ($s2)
/* 1F5CC 800441CC 00431024 */ and $v0, $v0, $v1
/* 1F5D0 800441D0 AE420000 */ sw $v0, ($s2)
.L800441D4:
/* 1F5D4 800441D4 8FBF001C */ lw $ra, 0x1c($sp)
/* 1F5D8 800441D8 8FB20018 */ lw $s2, 0x18($sp)
/* 1F5DC 800441DC 8FB10014 */ lw $s1, 0x14($sp)
/* 1F5E0 800441E0 8FB00010 */ lw $s0, 0x10($sp)
/* 1F5E4 800441E4 24020002 */ addiu $v0, $zero, 2
/* 1F5E8 800441E8 03E00008 */ jr $ra
/* 1F5EC 800441EC 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 SetEnemyFlagBits
/* 20A88 80045688 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 20A8C 8004568C AFB10014 */ sw $s1, 0x14($sp)
/* 20A90 80045690 0080882D */ daddu $s1, $a0, $zero
/* 20A94 80045694 AFBF0020 */ sw $ra, 0x20($sp)
/* 20A98 80045698 AFB3001C */ sw $s3, 0x1c($sp)
/* 20A9C 8004569C AFB20018 */ sw $s2, 0x18($sp)
/* 20AA0 800456A0 AFB00010 */ sw $s0, 0x10($sp)
/* 20AA4 800456A4 8E30000C */ lw $s0, 0xc($s1)
/* 20AA8 800456A8 8E330148 */ lw $s3, 0x148($s1)
/* 20AAC 800456AC 8E050000 */ lw $a1, ($s0)
/* 20AB0 800456B0 0C0B1EAF */ jal get_variable
/* 20AB4 800456B4 26100004 */ addiu $s0, $s0, 4
/* 20AB8 800456B8 0040902D */ daddu $s2, $v0, $zero
/* 20ABC 800456BC 8E050004 */ lw $a1, 4($s0)
/* 20AC0 800456C0 8E100000 */ lw $s0, ($s0)
/* 20AC4 800456C4 0C0B1EAF */ jal get_variable
/* 20AC8 800456C8 0220202D */ daddu $a0, $s1, $zero
/* 20ACC 800456CC 0040882D */ daddu $s1, $v0, $zero
/* 20AD0 800456D0 2402FFFF */ addiu $v0, $zero, -1
/* 20AD4 800456D4 16420002 */ bne $s2, $v0, .L800456E0
/* 20AD8 800456D8 00000000 */ nop
/* 20ADC 800456DC 86720008 */ lh $s2, 8($s3)
.L800456E0:
/* 20AE0 800456E0 0C00FB3A */ jal get_enemy
/* 20AE4 800456E4 0240202D */ daddu $a0, $s2, $zero
/* 20AE8 800456E8 12200004 */ beqz $s1, .L800456FC
/* 20AEC 800456EC 0040982D */ daddu $s3, $v0, $zero
/* 20AF0 800456F0 8E620000 */ lw $v0, ($s3)
/* 20AF4 800456F4 080115C2 */ j .L80045708
/* 20AF8 800456F8 00501025 */ or $v0, $v0, $s0
.L800456FC:
/* 20AFC 800456FC 8E620000 */ lw $v0, ($s3)
/* 20B00 80045700 00101827 */ nor $v1, $zero, $s0
/* 20B04 80045704 00431024 */ and $v0, $v0, $v1
.L80045708:
/* 20B08 80045708 AE620000 */ sw $v0, ($s3)
/* 20B0C 8004570C 8FBF0020 */ lw $ra, 0x20($sp)
/* 20B10 80045710 8FB3001C */ lw $s3, 0x1c($sp)
/* 20B14 80045714 8FB20018 */ lw $s2, 0x18($sp)
/* 20B18 80045718 8FB10014 */ lw $s1, 0x14($sp)
/* 20B1C 8004571C 8FB00010 */ lw $s0, 0x10($sp)
/* 20B20 80045720 24020002 */ addiu $v0, $zero, 2
/* 20B24 80045724 03E00008 */ jr $ra
/* 20B28 80045728 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,44 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetNpcVar
/* 20720 80045320 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 20724 80045324 AFB10014 */ sw $s1, 0x14($sp)
/* 20728 80045328 0080882D */ daddu $s1, $a0, $zero
/* 2072C 8004532C AFBF0020 */ sw $ra, 0x20($sp)
/* 20730 80045330 AFB3001C */ sw $s3, 0x1c($sp)
/* 20734 80045334 AFB20018 */ sw $s2, 0x18($sp)
/* 20738 80045338 AFB00010 */ sw $s0, 0x10($sp)
/* 2073C 8004533C 8E30000C */ lw $s0, 0xc($s1)
/* 20740 80045340 8E330148 */ lw $s3, 0x148($s1)
/* 20744 80045344 8E050000 */ lw $a1, ($s0)
/* 20748 80045348 0C0B1EAF */ jal get_variable
/* 2074C 8004534C 26100004 */ addiu $s0, $s0, 4
/* 20750 80045350 0040902D */ daddu $s2, $v0, $zero
/* 20754 80045354 8E050000 */ lw $a1, ($s0)
/* 20758 80045358 26100004 */ addiu $s0, $s0, 4
/* 2075C 8004535C 0C0B1EAF */ jal get_variable
/* 20760 80045360 0220202D */ daddu $a0, $s1, $zero
/* 20764 80045364 0220202D */ daddu $a0, $s1, $zero
/* 20768 80045368 8E050000 */ lw $a1, ($s0)
/* 2076C 8004536C 0C0B1EAF */ jal get_variable
/* 20770 80045370 0040802D */ daddu $s0, $v0, $zero
/* 20774 80045374 0040882D */ daddu $s1, $v0, $zero
/* 20778 80045378 2402FFFF */ addiu $v0, $zero, -1
/* 2077C 8004537C 16420002 */ bne $s2, $v0, .L80045388
/* 20780 80045380 00000000 */ nop
/* 20784 80045384 86720008 */ lh $s2, 8($s3)
.L80045388:
/* 20788 80045388 0C00FB3A */ jal get_enemy
/* 2078C 8004538C 0240202D */ daddu $a0, $s2, $zero
/* 20790 80045390 00101880 */ sll $v1, $s0, 2
/* 20794 80045394 00431021 */ addu $v0, $v0, $v1
/* 20798 80045398 AC51006C */ sw $s1, 0x6c($v0)
/* 2079C 8004539C 8FBF0020 */ lw $ra, 0x20($sp)
/* 207A0 800453A0 8FB3001C */ lw $s3, 0x1c($sp)
/* 207A4 800453A4 8FB20018 */ lw $s2, 0x18($sp)
/* 207A8 800453A8 8FB10014 */ lw $s1, 0x14($sp)
/* 207AC 800453AC 8FB00010 */ lw $s0, 0x10($sp)
/* 207B0 800453B0 24020002 */ addiu $v0, $zero, 2
/* 207B4 800453B4 03E00008 */ jr $ra
/* 207B8 800453B8 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,48 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetSelfRotation
/* 2085C 8004545C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 20860 80045460 AFB10014 */ sw $s1, 0x14($sp)
/* 20864 80045464 0080882D */ daddu $s1, $a0, $zero
/* 20868 80045468 AFBF0020 */ sw $ra, 0x20($sp)
/* 2086C 8004546C AFB3001C */ sw $s3, 0x1c($sp)
/* 20870 80045470 AFB20018 */ sw $s2, 0x18($sp)
/* 20874 80045474 AFB00010 */ sw $s0, 0x10($sp)
/* 20878 80045478 8E24014C */ lw $a0, 0x14c($s1)
/* 2087C 8004547C 0C00EABB */ jal get_npc_unsafe
/* 20880 80045480 8E30000C */ lw $s0, 0xc($s1)
/* 20884 80045484 8E050000 */ lw $a1, ($s0)
/* 20888 80045488 26100004 */ addiu $s0, $s0, 4
/* 2088C 8004548C 0220202D */ daddu $a0, $s1, $zero
/* 20890 80045490 0C0B1EAF */ jal get_variable
/* 20894 80045494 0040902D */ daddu $s2, $v0, $zero
/* 20898 80045498 8E050000 */ lw $a1, ($s0)
/* 2089C 8004549C 26100004 */ addiu $s0, $s0, 4
/* 208A0 800454A0 0220202D */ daddu $a0, $s1, $zero
/* 208A4 800454A4 0C0B1EAF */ jal get_variable
/* 208A8 800454A8 0040982D */ daddu $s3, $v0, $zero
/* 208AC 800454AC 0220202D */ daddu $a0, $s1, $zero
/* 208B0 800454B0 8E050000 */ lw $a1, ($s0)
/* 208B4 800454B4 0C0B1EAF */ jal get_variable
/* 208B8 800454B8 0040802D */ daddu $s0, $v0, $zero
/* 208BC 800454BC 44821000 */ mtc1 $v0, $f2
/* 208C0 800454C0 00000000 */ nop
/* 208C4 800454C4 468010A0 */ cvt.s.w $f2, $f2
/* 208C8 800454C8 44930000 */ mtc1 $s3, $f0
/* 208CC 800454CC 00000000 */ nop
/* 208D0 800454D0 46800020 */ cvt.s.w $f0, $f0
/* 208D4 800454D4 E6400044 */ swc1 $f0, 0x44($s2)
/* 208D8 800454D8 44900000 */ mtc1 $s0, $f0
/* 208DC 800454DC 00000000 */ nop
/* 208E0 800454E0 46800020 */ cvt.s.w $f0, $f0
/* 208E4 800454E4 E6400048 */ swc1 $f0, 0x48($s2)
/* 208E8 800454E8 E642004C */ swc1 $f2, 0x4c($s2)
/* 208EC 800454EC 8FBF0020 */ lw $ra, 0x20($sp)
/* 208F0 800454F0 8FB3001C */ lw $s3, 0x1c($sp)
/* 208F4 800454F4 8FB20018 */ lw $s2, 0x18($sp)
/* 208F8 800454F8 8FB10014 */ lw $s1, 0x14($sp)
/* 208FC 800454FC 8FB00010 */ lw $s0, 0x10($sp)
/* 20900 80045500 24020002 */ addiu $v0, $zero, 2
/* 20904 80045504 03E00008 */ jr $ra
/* 20908 80045508 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,29 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetSelfVar
/* 2065C 8004525C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 20660 80045260 AFB00010 */ sw $s0, 0x10($sp)
/* 20664 80045264 0080802D */ daddu $s0, $a0, $zero
/* 20668 80045268 AFBF001C */ sw $ra, 0x1c($sp)
/* 2066C 8004526C AFB20018 */ sw $s2, 0x18($sp)
/* 20670 80045270 AFB10014 */ sw $s1, 0x14($sp)
/* 20674 80045274 8E11000C */ lw $s1, 0xc($s0)
/* 20678 80045278 8E120148 */ lw $s2, 0x148($s0)
/* 2067C 8004527C 8E250000 */ lw $a1, ($s1)
/* 20680 80045280 0C0B1EAF */ jal get_variable
/* 20684 80045284 26310004 */ addiu $s1, $s1, 4
/* 20688 80045288 0200202D */ daddu $a0, $s0, $zero
/* 2068C 8004528C 8E250000 */ lw $a1, ($s1)
/* 20690 80045290 0C0B1EAF */ jal get_variable
/* 20694 80045294 0040802D */ daddu $s0, $v0, $zero
/* 20698 80045298 00108080 */ sll $s0, $s0, 2
/* 2069C 8004529C 02509021 */ addu $s2, $s2, $s0
/* 206A0 800452A0 AE42006C */ sw $v0, 0x6c($s2)
/* 206A4 800452A4 8FBF001C */ lw $ra, 0x1c($sp)
/* 206A8 800452A8 8FB20018 */ lw $s2, 0x18($sp)
/* 206AC 800452AC 8FB10014 */ lw $s1, 0x14($sp)
/* 206B0 800452B0 8FB00010 */ lw $s0, 0x10($sp)
/* 206B4 800452B4 24020002 */ addiu $v0, $zero, 2
/* 206B8 800452B8 03E00008 */ jr $ra
/* 206BC 800452BC 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,41 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80045580
/* 20980 80045580 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 20984 80045584 AFB00010 */ sw $s0, 0x10($sp)
/* 20988 80045588 0080802D */ daddu $s0, $a0, $zero
/* 2098C 8004558C AFBF001C */ sw $ra, 0x1c($sp)
/* 20990 80045590 AFB20018 */ sw $s2, 0x18($sp)
/* 20994 80045594 AFB10014 */ sw $s1, 0x14($sp)
/* 20998 80045598 8E04014C */ lw $a0, 0x14c($s0)
/* 2099C 8004559C 8E12000C */ lw $s2, 0xc($s0)
/* 209A0 800455A0 0C00EABB */ jal get_npc_unsafe
/* 209A4 800455A4 8E110148 */ lw $s1, 0x148($s0)
/* 209A8 800455A8 0200202D */ daddu $a0, $s0, $zero
/* 209AC 800455AC 8E450000 */ lw $a1, ($s2)
/* 209B0 800455B0 0C0B1EAF */ jal get_variable
/* 209B4 800455B4 0040802D */ daddu $s0, $v0, $zero
/* 209B8 800455B8 A2220007 */ sb $v0, 7($s1)
/* 209BC 800455BC C6000038 */ lwc1 $f0, 0x38($s0)
/* 209C0 800455C0 4600008D */ trunc.w.s $f2, $f0
/* 209C4 800455C4 44021000 */ mfc1 $v0, $f2
/* 209C8 800455C8 00000000 */ nop
/* 209CC 800455CC A6220010 */ sh $v0, 0x10($s1)
/* 209D0 800455D0 C600003C */ lwc1 $f0, 0x3c($s0)
/* 209D4 800455D4 4600008D */ trunc.w.s $f2, $f0
/* 209D8 800455D8 44021000 */ mfc1 $v0, $f2
/* 209DC 800455DC 00000000 */ nop
/* 209E0 800455E0 A6220012 */ sh $v0, 0x12($s1)
/* 209E4 800455E4 C6000040 */ lwc1 $f0, 0x40($s0)
/* 209E8 800455E8 4600008D */ trunc.w.s $f2, $f0
/* 209EC 800455EC 44031000 */ mfc1 $v1, $f2
/* 209F0 800455F0 00000000 */ nop
/* 209F4 800455F4 A6230014 */ sh $v1, 0x14($s1)
/* 209F8 800455F8 8FBF001C */ lw $ra, 0x1c($sp)
/* 209FC 800455FC 8FB20018 */ lw $s2, 0x18($sp)
/* 20A00 80045600 8FB10014 */ lw $s1, 0x14($sp)
/* 20A04 80045604 8FB00010 */ lw $s0, 0x10($sp)
/* 20A08 80045608 24020002 */ addiu $v0, $zero, 2
/* 20A0C 8004560C 03E00008 */ jr $ra
/* 20A10 80045610 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 func_80045838
/* 20C38 80045838 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 20C3C 8004583C AFB10014 */ sw $s1, 0x14($sp)
/* 20C40 80045840 0080882D */ daddu $s1, $a0, $zero
/* 20C44 80045844 AFBF0020 */ sw $ra, 0x20($sp)
/* 20C48 80045848 AFB3001C */ sw $s3, 0x1c($sp)
/* 20C4C 8004584C AFB20018 */ sw $s2, 0x18($sp)
/* 20C50 80045850 AFB00010 */ sw $s0, 0x10($sp)
/* 20C54 80045854 8E30000C */ lw $s0, 0xc($s1)
/* 20C58 80045858 8E050000 */ lw $a1, ($s0)
/* 20C5C 8004585C 0C0B1EAF */ jal get_variable
/* 20C60 80045860 26100004 */ addiu $s0, $s0, 4
/* 20C64 80045864 8E050000 */ lw $a1, ($s0)
/* 20C68 80045868 26100004 */ addiu $s0, $s0, 4
/* 20C6C 8004586C 0220202D */ daddu $a0, $s1, $zero
/* 20C70 80045870 0C0B1EAF */ jal get_variable
/* 20C74 80045874 0040902D */ daddu $s2, $v0, $zero
/* 20C78 80045878 0220202D */ daddu $a0, $s1, $zero
/* 20C7C 8004587C 8E050000 */ lw $a1, ($s0)
/* 20C80 80045880 0C0B1EAF */ jal get_variable
/* 20C84 80045884 0040982D */ daddu $s3, $v0, $zero
/* 20C88 80045888 0220202D */ daddu $a0, $s1, $zero
/* 20C8C 8004588C 0240282D */ daddu $a1, $s2, $zero
/* 20C90 80045890 0C0B36B0 */ jal resolve_npc
/* 20C94 80045894 0040802D */ daddu $s0, $v0, $zero
/* 20C98 80045898 10400004 */ beqz $v0, .L800458AC
/* 20C9C 8004589C 0040202D */ daddu $a0, $v0, $zero
/* 20CA0 800458A0 0260282D */ daddu $a1, $s3, $zero
/* 20CA4 800458A4 0C012530 */ jal func_800494C0
/* 20CA8 800458A8 0200302D */ daddu $a2, $s0, $zero
.L800458AC:
/* 20CAC 800458AC 24020002 */ addiu $v0, $zero, 2
/* 20CB0 800458B0 8FBF0020 */ lw $ra, 0x20($sp)
/* 20CB4 800458B4 8FB3001C */ lw $s3, 0x1c($sp)
/* 20CB8 800458B8 8FB20018 */ lw $s2, 0x18($sp)
/* 20CBC 800458BC 8FB10014 */ lw $s1, 0x14($sp)
/* 20CC0 800458C0 8FB00010 */ lw $s0, 0x10($sp)
/* 20CC4 800458C4 03E00008 */ jr $ra
/* 20CC8 800458C8 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,30 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80045A58
/* 20E58 80045A58 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 20E5C 80045A5C AFB10014 */ sw $s1, 0x14($sp)
/* 20E60 80045A60 0080882D */ daddu $s1, $a0, $zero
/* 20E64 80045A64 AFBF0018 */ sw $ra, 0x18($sp)
/* 20E68 80045A68 AFB00010 */ sw $s0, 0x10($sp)
/* 20E6C 80045A6C 8E30000C */ lw $s0, 0xc($s1)
/* 20E70 80045A70 8E050000 */ lw $a1, ($s0)
/* 20E74 80045A74 0C0B1EAF */ jal get_variable
/* 20E78 80045A78 26100004 */ addiu $s0, $s0, 4
/* 20E7C 80045A7C 0220202D */ daddu $a0, $s1, $zero
/* 20E80 80045A80 8E050000 */ lw $a1, ($s0)
/* 20E84 80045A84 0C0B1EAF */ jal get_variable
/* 20E88 80045A88 0040802D */ daddu $s0, $v0, $zero
/* 20E8C 80045A8C 0200202D */ daddu $a0, $s0, $zero
/* 20E90 80045A90 0C00FB3A */ jal get_enemy
/* 20E94 80045A94 0040802D */ daddu $s0, $v0, $zero
/* 20E98 80045A98 AC5000D8 */ sw $s0, 0xd8($v0)
/* 20E9C 80045A9C 8FBF0018 */ lw $ra, 0x18($sp)
/* 20EA0 80045AA0 8FB10014 */ lw $s1, 0x14($sp)
/* 20EA4 80045AA4 8FB00010 */ lw $s0, 0x10($sp)
/* 20EA8 80045AA8 24020002 */ addiu $v0, $zero, 2
/* 20EAC 80045AAC 03E00008 */ jr $ra
/* 20EB0 80045AB0 27BD0020 */ addiu $sp, $sp, 0x20
/* 20EB4 80045AB4 00000000 */ nop
/* 20EB8 80045AB8 00000000 */ nop
/* 20EBC 80045ABC 00000000 */ nop

View File

@ -1,18 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel DisablePartner
/* F68E8 802D1F38 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F68EC 802D1F3C AFBF0010 */ sw $ra, 0x10($sp)
/* F68F0 802D1F40 8C82000C */ lw $v0, 0xc($a0)
/* F68F4 802D1F44 0C0B1EAF */ jal get_variable
/* F68F8 802D1F48 8C450000 */ lw $a1, ($v0)
/* F68FC 802D1F4C 2443FFFF */ addiu $v1, $v0, -1
/* F6900 802D1F50 000318C0 */ sll $v1, $v1, 3
/* F6904 802D1F54 3C018011 */ lui $at, 0x8011
/* F6908 802D1F58 00230821 */ addu $at, $at, $v1
/* F690C 802D1F5C A020F2A4 */ sb $zero, -0xd5c($at)
/* F6910 802D1F60 8FBF0010 */ lw $ra, 0x10($sp)
/* F6914 802D1F64 24020002 */ addiu $v0, $zero, 2
/* F6918 802D1F68 03E00008 */ jr $ra
/* F691C 802D1F6C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,31 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel DisablePulseStone
/* F7458 802D2AA8 27BDFFE0 */ addiu $sp, $sp, -0x20
/* F745C 802D2AAC AFBF0018 */ sw $ra, 0x18($sp)
/* F7460 802D2AB0 AFB10014 */ sw $s1, 0x14($sp)
/* F7464 802D2AB4 AFB00010 */ sw $s0, 0x10($sp)
/* F7468 802D2AB8 8C82000C */ lw $v0, 0xc($a0)
/* F746C 802D2ABC 3C108011 */ lui $s0, %hi(gPlayerStatus)
/* F7470 802D2AC0 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus)
/* F7474 802D2AC4 8C450000 */ lw $a1, ($v0)
/* F7478 802D2AC8 0C0B1EAF */ jal get_variable
/* F747C 802D2ACC 0200882D */ daddu $s1, $s0, $zero
/* F7480 802D2AD0 10400005 */ beqz $v0, .L802D2AE8
/* F7484 802D2AD4 2403FF7F */ addiu $v1, $zero, -0x81
/* F7488 802D2AD8 8E020004 */ lw $v0, 4($s0)
/* F748C 802D2ADC 00431024 */ and $v0, $v0, $v1
/* F7490 802D2AE0 080B4ABD */ j .L802D2AF4
/* F7494 802D2AE4 AE020004 */ sw $v0, 4($s0)
.L802D2AE8:
/* F7498 802D2AE8 8E220004 */ lw $v0, 4($s1)
/* F749C 802D2AEC 34420080 */ ori $v0, $v0, 0x80
/* F74A0 802D2AF0 AE220004 */ sw $v0, 4($s1)
.L802D2AF4:
/* F74A4 802D2AF4 8FBF0018 */ lw $ra, 0x18($sp)
/* F74A8 802D2AF8 8FB10014 */ lw $s1, 0x14($sp)
/* F74AC 802D2AFC 8FB00010 */ lw $s0, 0x10($sp)
/* F74B0 802D2B00 24020002 */ addiu $v0, $zero, 2
/* F74B4 802D2B04 03E00008 */ jr $ra
/* F74B8 802D2B08 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,19 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel EnablePartner
/* F68AC 802D1EFC 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F68B0 802D1F00 AFBF0010 */ sw $ra, 0x10($sp)
/* F68B4 802D1F04 8C82000C */ lw $v0, 0xc($a0)
/* F68B8 802D1F08 0C0B1EAF */ jal get_variable
/* F68BC 802D1F0C 8C450000 */ lw $a1, ($v0)
/* F68C0 802D1F10 2443FFFF */ addiu $v1, $v0, -1
/* F68C4 802D1F14 000318C0 */ sll $v1, $v1, 3
/* F68C8 802D1F18 24040001 */ addiu $a0, $zero, 1
/* F68CC 802D1F1C 3C018011 */ lui $at, 0x8011
/* F68D0 802D1F20 00230821 */ addu $at, $at, $v1
/* F68D4 802D1F24 A024F2A4 */ sb $a0, -0xd5c($at)
/* F68D8 802D1F28 8FBF0010 */ lw $ra, 0x10($sp)
/* F68DC 802D1F2C 24020002 */ addiu $v0, $zero, 2
/* F68E0 802D1F30 03E00008 */ jr $ra
/* F68E4 802D1F34 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel FullyRestoreSP
/* F6890 802D1EE0 3C038011 */ lui $v1, %hi(gPlayerData)
/* F6894 802D1EE4 2463F290 */ addiu $v1, $v1, %lo(gPlayerData)
/* F6898 802D1EE8 8062028E */ lb $v0, 0x28e($v1)
/* F689C 802D1EEC 00021200 */ sll $v0, $v0, 8
/* F68A0 802D1EF0 A4620290 */ sh $v0, 0x290($v1)
/* F68A4 802D1EF4 03E00008 */ jr $ra
/* F68A8 802D1EF8 24020002 */ addiu $v0, $zero, 2

View File

@ -1,22 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetCurrentPartner
/* F74BC 802D2B0C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F74C0 802D2B10 AFBF0010 */ sw $ra, 0x10($sp)
/* F74C4 802D2B14 8C82000C */ lw $v0, 0xc($a0)
/* F74C8 802D2B18 3C038011 */ lui $v1, %hi(D_8010EBB0)
/* F74CC 802D2B1C 8063EBB0 */ lb $v1, %lo(D_8010EBB0)($v1)
/* F74D0 802D2B20 8C450000 */ lw $a1, ($v0)
/* F74D4 802D2B24 10600004 */ beqz $v1, .L802D2B38
/* F74D8 802D2B28 0000302D */ daddu $a2, $zero, $zero
/* F74DC 802D2B2C 3C028011 */ lui $v0, %hi(gPlayerData)
/* F74E0 802D2B30 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* F74E4 802D2B34 80460012 */ lb $a2, 0x12($v0)
.L802D2B38:
/* F74E8 802D2B38 0C0B2026 */ jal set_variable
/* F74EC 802D2B3C 00000000 */ nop
/* F74F0 802D2B40 8FBF0010 */ lw $ra, 0x10($sp)
/* F74F4 802D2B44 24020002 */ addiu $v0, $zero, 2
/* F74F8 802D2B48 03E00008 */ jr $ra
/* F74FC 802D2B4C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,26 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel PlaySoundAtPlayer
/* F7688 802D2CD8 27BDFFE0 */ addiu $sp, $sp, -0x20
/* F768C 802D2CDC AFB10014 */ sw $s1, 0x14($sp)
/* F7690 802D2CE0 0080882D */ daddu $s1, $a0, $zero
/* F7694 802D2CE4 AFBF0018 */ sw $ra, 0x18($sp)
/* F7698 802D2CE8 AFB00010 */ sw $s0, 0x10($sp)
/* F769C 802D2CEC 8E30000C */ lw $s0, 0xc($s1)
/* F76A0 802D2CF0 8E050000 */ lw $a1, ($s0)
/* F76A4 802D2CF4 0C0B1EAF */ jal get_variable
/* F76A8 802D2CF8 26100004 */ addiu $s0, $s0, 4
/* F76AC 802D2CFC 0220202D */ daddu $a0, $s1, $zero
/* F76B0 802D2D00 8E050000 */ lw $a1, ($s0)
/* F76B4 802D2D04 0C0B1EAF */ jal get_variable
/* F76B8 802D2D08 0040802D */ daddu $s0, $v0, $zero
/* F76BC 802D2D0C 0200202D */ daddu $a0, $s0, $zero
/* F76C0 802D2D10 0C052736 */ jal play_sound_at_player
/* F76C4 802D2D14 0040282D */ daddu $a1, $v0, $zero
/* F76C8 802D2D18 8FBF0018 */ lw $ra, 0x18($sp)
/* F76CC 802D2D1C 8FB10014 */ lw $s1, 0x14($sp)
/* F76D0 802D2D20 8FB00010 */ lw $s0, 0x10($sp)
/* F76D4 802D2D24 24020002 */ addiu $v0, $zero, 2
/* F76D8 802D2D28 03E00008 */ jr $ra
/* F76DC 802D2D2C 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,52 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetPlayerPos
/* F58A0 802D0EF0 27BDFFD0 */ addiu $sp, $sp, -0x30
/* F58A4 802D0EF4 AFB10014 */ sw $s1, 0x14($sp)
/* F58A8 802D0EF8 0080882D */ daddu $s1, $a0, $zero
/* F58AC 802D0EFC AFBF0018 */ sw $ra, 0x18($sp)
/* F58B0 802D0F00 AFB00010 */ sw $s0, 0x10($sp)
/* F58B4 802D0F04 F7B60028 */ sdc1 $f22, 0x28($sp)
/* F58B8 802D0F08 F7B40020 */ sdc1 $f20, 0x20($sp)
/* F58BC 802D0F0C 8E30000C */ lw $s0, 0xc($s1)
/* F58C0 802D0F10 8E050000 */ lw $a1, ($s0)
/* F58C4 802D0F14 0C0B1EAF */ jal get_variable
/* F58C8 802D0F18 26100004 */ addiu $s0, $s0, 4
/* F58CC 802D0F1C 8E050000 */ lw $a1, ($s0)
/* F58D0 802D0F20 26100004 */ addiu $s0, $s0, 4
/* F58D4 802D0F24 4482B000 */ mtc1 $v0, $f22
/* F58D8 802D0F28 00000000 */ nop
/* F58DC 802D0F2C 4680B5A0 */ cvt.s.w $f22, $f22
/* F58E0 802D0F30 0C0B1EAF */ jal get_variable
/* F58E4 802D0F34 0220202D */ daddu $a0, $s1, $zero
/* F58E8 802D0F38 8E050000 */ lw $a1, ($s0)
/* F58EC 802D0F3C 4482A000 */ mtc1 $v0, $f20
/* F58F0 802D0F40 00000000 */ nop
/* F58F4 802D0F44 4680A520 */ cvt.s.w $f20, $f20
/* F58F8 802D0F48 0C0B1EAF */ jal get_variable
/* F58FC 802D0F4C 0220202D */ daddu $a0, $s1, $zero
/* F5900 802D0F50 44820000 */ mtc1 $v0, $f0
/* F5904 802D0F54 00000000 */ nop
/* F5908 802D0F58 46800020 */ cvt.s.w $f0, $f0
/* F590C 802D0F5C 3C03802E */ lui $v1, %hi(gPlayerNpcPtr)
/* F5910 802D0F60 8C639D20 */ lw $v1, %lo(gPlayerNpcPtr)($v1)
/* F5914 802D0F64 3C048011 */ lui $a0, %hi(gPlayerStatus)
/* F5918 802D0F68 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus)
/* F591C 802D0F6C E4760038 */ swc1 $f22, 0x38($v1)
/* F5920 802D0F70 E4600040 */ swc1 $f0, 0x40($v1)
/* F5924 802D0F74 4600B006 */ mov.s $f0, $f22
/* F5928 802D0F78 E474003C */ swc1 $f20, 0x3c($v1)
/* F592C 802D0F7C E4800028 */ swc1 $f0, 0x28($a0)
/* F5930 802D0F80 C460003C */ lwc1 $f0, 0x3c($v1)
/* F5934 802D0F84 E480002C */ swc1 $f0, 0x2c($a0)
/* F5938 802D0F88 C4600040 */ lwc1 $f0, 0x40($v1)
/* F593C 802D0F8C E4800030 */ swc1 $f0, 0x30($a0)
/* F5940 802D0F90 8FBF0018 */ lw $ra, 0x18($sp)
/* F5944 802D0F94 8FB10014 */ lw $s1, 0x14($sp)
/* F5948 802D0F98 8FB00010 */ lw $s0, 0x10($sp)
/* F594C 802D0F9C D7B60028 */ ldc1 $f22, 0x28($sp)
/* F5950 802D0FA0 D7B40020 */ ldc1 $f20, 0x20($sp)
/* F5954 802D0FA4 24020002 */ addiu $v0, $zero, 2
/* F5958 802D0FA8 03E00008 */ jr $ra
/* F595C 802D0FAC 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel AssignFlag
/* A87B8 801120B8 27BDFFE0 */ addiu $sp, $sp, -0x20
/* A87BC 801120BC AFB10014 */ sw $s1, 0x14($sp)
/* A87C0 801120C0 0080882D */ daddu $s1, $a0, $zero
/* A87C4 801120C4 24020001 */ addiu $v0, $zero, 1
/* A87C8 801120C8 AFBF0018 */ sw $ra, 0x18($sp)
/* A87CC 801120CC AFB00010 */ sw $s0, 0x10($sp)
/* A87D0 801120D0 14A2000B */ bne $a1, $v0, .L80112100
/* A87D4 801120D4 8E30000C */ lw $s0, 0xc($s1)
/* A87D8 801120D8 3C048015 */ lui $a0, 0x8015
/* A87DC 801120DC 8C8412EC */ lw $a0, 0x12ec($a0)
/* A87E0 801120E0 0C04417A */ jal get_entity_by_index
/* A87E4 801120E4 00000000 */ nop
/* A87E8 801120E8 8E050000 */ lw $a1, ($s0)
/* A87EC 801120EC 8C500040 */ lw $s0, 0x40($v0)
/* A87F0 801120F0 0C0B1F6A */ jal get_variable_index
/* A87F4 801120F4 0220202D */ daddu $a0, $s1, $zero
/* A87F8 801120F8 A6020000 */ sh $v0, ($s0)
/* A87FC 801120FC 24020002 */ addiu $v0, $zero, 2
.L80112100:
/* A8800 80112100 8FBF0018 */ lw $ra, 0x18($sp)
/* A8804 80112104 8FB10014 */ lw $s1, 0x14($sp)
/* A8808 80112108 8FB00010 */ lw $s0, 0x10($sp)
/* A880C 8011210C 03E00008 */ jr $ra
/* A8810 80112110 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,44 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel _bound_script_trigger_handler
/* EB02C 802C667C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* EB030 802C6680 AFB00010 */ sw $s0, 0x10($sp)
/* EB034 802C6684 0080802D */ daddu $s0, $a0, $zero
/* EB038 802C6688 AFBF0018 */ sw $ra, 0x18($sp)
/* EB03C 802C668C AFB10014 */ sw $s1, 0x14($sp)
/* EB040 802C6690 8E020014 */ lw $v0, 0x14($s0)
/* EB044 802C6694 14400014 */ bnez $v0, .L802C66E8
/* EB048 802C6698 00000000 */ nop
/* EB04C 802C669C 8E110010 */ lw $s1, 0x10($s0)
/* EB050 802C66A0 0C05171B */ jal is_trigger_bound
/* EB054 802C66A4 0220282D */ daddu $a1, $s1, $zero
/* EB058 802C66A8 14400015 */ bnez $v0, .L802C6700
/* EB05C 802C66AC 0000102D */ daddu $v0, $zero, $zero
/* EB060 802C66B0 0220202D */ daddu $a0, $s1, $zero
/* EB064 802C66B4 8E050018 */ lw $a1, 0x18($s0)
/* EB068 802C66B8 0C0B0CF8 */ jal start_script
/* EB06C 802C66BC 24060020 */ addiu $a2, $zero, 0x20
/* EB070 802C66C0 AE020014 */ sw $v0, 0x14($s0)
/* EB074 802C66C4 8C430144 */ lw $v1, 0x144($v0)
/* EB078 802C66C8 8E04001C */ lw $a0, 0x1c($s0)
/* EB07C 802C66CC AE030034 */ sw $v1, 0x34($s0)
/* EB080 802C66D0 AC440084 */ sw $a0, 0x84($v0)
/* EB084 802C66D4 8E030020 */ lw $v1, 0x20($s0)
/* EB088 802C66D8 AC430088 */ sw $v1, 0x88($v0)
/* EB08C 802C66DC 8E030024 */ lw $v1, 0x24($s0)
/* EB090 802C66E0 AC50014C */ sw $s0, 0x14c($v0)
/* EB094 802C66E4 AC43008C */ sw $v1, 0x8c($v0)
.L802C66E8:
/* EB098 802C66E8 0C0B1059 */ jal does_script_exist
/* EB09C 802C66EC 8E040034 */ lw $a0, 0x34($s0)
/* EB0A0 802C66F0 14400003 */ bnez $v0, .L802C6700
/* EB0A4 802C66F4 24020001 */ addiu $v0, $zero, 1
/* EB0A8 802C66F8 AE000014 */ sw $zero, 0x14($s0)
/* EB0AC 802C66FC 0000102D */ daddu $v0, $zero, $zero
.L802C6700:
/* EB0B0 802C6700 8FBF0018 */ lw $ra, 0x18($sp)
/* EB0B4 802C6704 8FB10014 */ lw $s1, 0x14($sp)
/* EB0B8 802C6708 8FB00010 */ lw $s0, 0x10($sp)
/* EB0BC 802C670C 03E00008 */ jr $ra
/* EB0C0 802C6710 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,109 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_variable_index
/* EC758 802C7DA8 3C02EFE8 */ lui $v0, 0xefe8
/* EC75C 802C7DAC 34422080 */ ori $v0, $v0, 0x2080
/* EC760 802C7DB0 0045102A */ slt $v0, $v0, $a1
/* EC764 802C7DB4 14400003 */ bnez $v0, .L802C7DC4
/* EC768 802C7DB8 3C02F119 */ lui $v0, 0xf119
.L802C7DBC:
/* EC76C 802C7DBC 03E00008 */ jr $ra
/* EC770 802C7DC0 00A0102D */ daddu $v0, $a1, $zero
.L802C7DC4:
/* EC774 802C7DC4 34424D80 */ ori $v0, $v0, 0x4d80
/* EC778 802C7DC8 0045102A */ slt $v0, $v0, $a1
/* EC77C 802C7DCC 1040FFFB */ beqz $v0, .L802C7DBC
/* EC780 802C7DD0 3C02F2E3 */ lui $v0, 0xf2e3
/* EC784 802C7DD4 34421100 */ ori $v0, $v0, 0x1100
/* EC788 802C7DD8 0045102A */ slt $v0, $v0, $a1
/* EC78C 802C7DDC 1040FFF7 */ beqz $v0, .L802C7DBC
/* EC790 802C7DE0 3C02F414 */ lui $v0, 0xf414
/* EC794 802C7DE4 34423E00 */ ori $v0, $v0, 0x3e00
/* EC798 802C7DE8 0045102A */ slt $v0, $v0, $a1
/* EC79C 802C7DEC 54400005 */ bnel $v0, $zero, .L802C7E04
/* EC7A0 802C7DF0 3C02F545 */ lui $v0, 0xf545
/* EC7A4 802C7DF4 3C020C84 */ lui $v0, 0xc84
/* EC7A8 802C7DF8 34425880 */ ori $v0, $v0, 0x5880
/* EC7AC 802C7DFC 03E00008 */ jr $ra
/* EC7B0 802C7E00 00A21021 */ addu $v0, $a1, $v0
.L802C7E04:
/* EC7B4 802C7E04 34426B00 */ ori $v0, $v0, 0x6b00
/* EC7B8 802C7E08 0045102A */ slt $v0, $v0, $a1
/* EC7BC 802C7E0C 54400005 */ bnel $v0, $zero, .L802C7E24
/* EC7C0 802C7E10 3C02F676 */ lui $v0, 0xf676
/* EC7C4 802C7E14 3C020B53 */ lui $v0, 0xb53
/* EC7C8 802C7E18 34422B80 */ ori $v0, $v0, 0x2b80
/* EC7CC 802C7E1C 03E00008 */ jr $ra
/* EC7D0 802C7E20 00A21021 */ addu $v0, $a1, $v0
.L802C7E24:
/* EC7D4 802C7E24 34429800 */ ori $v0, $v0, 0x9800
/* EC7D8 802C7E28 0045102A */ slt $v0, $v0, $a1
/* EC7DC 802C7E2C 54400005 */ bnel $v0, $zero, .L802C7E44
/* EC7E0 802C7E30 3C02F7A7 */ lui $v0, 0xf7a7
/* EC7E4 802C7E34 3C020A21 */ lui $v0, 0xa21
/* EC7E8 802C7E38 3442FE80 */ ori $v0, $v0, 0xfe80
/* EC7EC 802C7E3C 03E00008 */ jr $ra
/* EC7F0 802C7E40 00A21021 */ addu $v0, $a1, $v0
.L802C7E44:
/* EC7F4 802C7E44 3442C500 */ ori $v0, $v0, 0xc500
/* EC7F8 802C7E48 0045102A */ slt $v0, $v0, $a1
/* EC7FC 802C7E4C 54400005 */ bnel $v0, $zero, .L802C7E64
/* EC800 802C7E50 3C02F8D8 */ lui $v0, 0xf8d8
/* EC804 802C7E54 3C0208F0 */ lui $v0, 0x8f0
/* EC808 802C7E58 3442D180 */ ori $v0, $v0, 0xd180
/* EC80C 802C7E5C 03E00008 */ jr $ra
/* EC810 802C7E60 00A21021 */ addu $v0, $a1, $v0
.L802C7E64:
/* EC814 802C7E64 3442F200 */ ori $v0, $v0, 0xf200
/* EC818 802C7E68 0045102A */ slt $v0, $v0, $a1
/* EC81C 802C7E6C 54400005 */ bnel $v0, $zero, .L802C7E84
/* EC820 802C7E70 3C02FA0A */ lui $v0, 0xfa0a
/* EC824 802C7E74 3C0207BF */ lui $v0, 0x7bf
/* EC828 802C7E78 3442A480 */ ori $v0, $v0, 0xa480
/* EC82C 802C7E7C 03E00008 */ jr $ra
/* EC830 802C7E80 00A21021 */ addu $v0, $a1, $v0
.L802C7E84:
/* EC834 802C7E84 34421F00 */ ori $v0, $v0, 0x1f00
/* EC838 802C7E88 0045102A */ slt $v0, $v0, $a1
/* EC83C 802C7E8C 54400005 */ bnel $v0, $zero, .L802C7EA4
/* EC840 802C7E90 3C02FB3B */ lui $v0, 0xfb3b
/* EC844 802C7E94 3C02068E */ lui $v0, 0x68e
/* EC848 802C7E98 34427780 */ ori $v0, $v0, 0x7780
/* EC84C 802C7E9C 03E00008 */ jr $ra
/* EC850 802C7EA0 00A21021 */ addu $v0, $a1, $v0
.L802C7EA4:
/* EC854 802C7EA4 34424C00 */ ori $v0, $v0, 0x4c00
/* EC858 802C7EA8 0045102A */ slt $v0, $v0, $a1
/* EC85C 802C7EAC 54400005 */ bnel $v0, $zero, .L802C7EC4
/* EC860 802C7EB0 3C02FC6C */ lui $v0, 0xfc6c
/* EC864 802C7EB4 3C02055D */ lui $v0, 0x55d
/* EC868 802C7EB8 34424A80 */ ori $v0, $v0, 0x4a80
/* EC86C 802C7EBC 03E00008 */ jr $ra
/* EC870 802C7EC0 00A21021 */ addu $v0, $a1, $v0
.L802C7EC4:
/* EC874 802C7EC4 34427900 */ ori $v0, $v0, 0x7900
/* EC878 802C7EC8 0045102A */ slt $v0, $v0, $a1
/* EC87C 802C7ECC 54400005 */ bnel $v0, $zero, .L802C7EE4
/* EC880 802C7ED0 3C02FD9D */ lui $v0, 0xfd9d
/* EC884 802C7ED4 3C02042C */ lui $v0, 0x42c
/* EC888 802C7ED8 34421D80 */ ori $v0, $v0, 0x1d80
/* EC88C 802C7EDC 03E00008 */ jr $ra
/* EC890 802C7EE0 00A21021 */ addu $v0, $a1, $v0
.L802C7EE4:
/* EC894 802C7EE4 3442A600 */ ori $v0, $v0, 0xa600
/* EC898 802C7EE8 0045102A */ slt $v0, $v0, $a1
/* EC89C 802C7EEC 54400005 */ bnel $v0, $zero, .L802C7F04
/* EC8A0 802C7EF0 3C02FECE */ lui $v0, 0xfece
/* EC8A4 802C7EF4 3C0202FA */ lui $v0, 0x2fa
/* EC8A8 802C7EF8 3442F080 */ ori $v0, $v0, 0xf080
/* EC8AC 802C7EFC 03E00008 */ jr $ra
/* EC8B0 802C7F00 00A21021 */ addu $v0, $a1, $v0
.L802C7F04:
/* EC8B4 802C7F04 3442D300 */ ori $v0, $v0, 0xd300
/* EC8B8 802C7F08 0045102A */ slt $v0, $v0, $a1
/* EC8BC 802C7F0C 1440FFAB */ bnez $v0, .L802C7DBC
/* EC8C0 802C7F10 3C0201C9 */ lui $v0, 0x1c9
/* EC8C4 802C7F14 3442C380 */ ori $v0, $v0, 0xc380
/* EC8C8 802C7F18 03E00008 */ jr $ra
/* EC8CC 802C7F1C 00A21021 */ addu $v0, $a1, $v0

View File

@ -1,109 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_variable_index_alt
/* EC8D0 802C7F20 3C02EFE8 */ lui $v0, 0xefe8
/* EC8D4 802C7F24 34422080 */ ori $v0, $v0, 0x2080
/* EC8D8 802C7F28 0044102A */ slt $v0, $v0, $a0
/* EC8DC 802C7F2C 14400003 */ bnez $v0, .L802C7F3C
/* EC8E0 802C7F30 3C02F119 */ lui $v0, 0xf119
.L802C7F34:
/* EC8E4 802C7F34 03E00008 */ jr $ra
/* EC8E8 802C7F38 0080102D */ daddu $v0, $a0, $zero
.L802C7F3C:
/* EC8EC 802C7F3C 34424D80 */ ori $v0, $v0, 0x4d80
/* EC8F0 802C7F40 0044102A */ slt $v0, $v0, $a0
/* EC8F4 802C7F44 1040FFFB */ beqz $v0, .L802C7F34
/* EC8F8 802C7F48 3C02F2E3 */ lui $v0, 0xf2e3
/* EC8FC 802C7F4C 34421100 */ ori $v0, $v0, 0x1100
/* EC900 802C7F50 0044102A */ slt $v0, $v0, $a0
/* EC904 802C7F54 1040FFF7 */ beqz $v0, .L802C7F34
/* EC908 802C7F58 3C02F414 */ lui $v0, 0xf414
/* EC90C 802C7F5C 34423E00 */ ori $v0, $v0, 0x3e00
/* EC910 802C7F60 0044102A */ slt $v0, $v0, $a0
/* EC914 802C7F64 54400005 */ bnel $v0, $zero, .L802C7F7C
/* EC918 802C7F68 3C02F545 */ lui $v0, 0xf545
/* EC91C 802C7F6C 3C020C84 */ lui $v0, 0xc84
/* EC920 802C7F70 34425880 */ ori $v0, $v0, 0x5880
/* EC924 802C7F74 03E00008 */ jr $ra
/* EC928 802C7F78 00821021 */ addu $v0, $a0, $v0
.L802C7F7C:
/* EC92C 802C7F7C 34426B00 */ ori $v0, $v0, 0x6b00
/* EC930 802C7F80 0044102A */ slt $v0, $v0, $a0
/* EC934 802C7F84 54400005 */ bnel $v0, $zero, .L802C7F9C
/* EC938 802C7F88 3C02F676 */ lui $v0, 0xf676
/* EC93C 802C7F8C 3C020B53 */ lui $v0, 0xb53
/* EC940 802C7F90 34422B80 */ ori $v0, $v0, 0x2b80
/* EC944 802C7F94 03E00008 */ jr $ra
/* EC948 802C7F98 00821021 */ addu $v0, $a0, $v0
.L802C7F9C:
/* EC94C 802C7F9C 34429800 */ ori $v0, $v0, 0x9800
/* EC950 802C7FA0 0044102A */ slt $v0, $v0, $a0
/* EC954 802C7FA4 54400005 */ bnel $v0, $zero, .L802C7FBC
/* EC958 802C7FA8 3C02F7A7 */ lui $v0, 0xf7a7
/* EC95C 802C7FAC 3C020A21 */ lui $v0, 0xa21
/* EC960 802C7FB0 3442FE80 */ ori $v0, $v0, 0xfe80
/* EC964 802C7FB4 03E00008 */ jr $ra
/* EC968 802C7FB8 00821021 */ addu $v0, $a0, $v0
.L802C7FBC:
/* EC96C 802C7FBC 3442C500 */ ori $v0, $v0, 0xc500
/* EC970 802C7FC0 0044102A */ slt $v0, $v0, $a0
/* EC974 802C7FC4 54400005 */ bnel $v0, $zero, .L802C7FDC
/* EC978 802C7FC8 3C02F8D8 */ lui $v0, 0xf8d8
/* EC97C 802C7FCC 3C0208F0 */ lui $v0, 0x8f0
/* EC980 802C7FD0 3442D180 */ ori $v0, $v0, 0xd180
/* EC984 802C7FD4 03E00008 */ jr $ra
/* EC988 802C7FD8 00821021 */ addu $v0, $a0, $v0
.L802C7FDC:
/* EC98C 802C7FDC 3442F200 */ ori $v0, $v0, 0xf200
/* EC990 802C7FE0 0044102A */ slt $v0, $v0, $a0
/* EC994 802C7FE4 54400005 */ bnel $v0, $zero, .L802C7FFC
/* EC998 802C7FE8 3C02FA0A */ lui $v0, 0xfa0a
/* EC99C 802C7FEC 3C0207BF */ lui $v0, 0x7bf
/* EC9A0 802C7FF0 3442A480 */ ori $v0, $v0, 0xa480
/* EC9A4 802C7FF4 03E00008 */ jr $ra
/* EC9A8 802C7FF8 00821021 */ addu $v0, $a0, $v0
.L802C7FFC:
/* EC9AC 802C7FFC 34421F00 */ ori $v0, $v0, 0x1f00
/* EC9B0 802C8000 0044102A */ slt $v0, $v0, $a0
/* EC9B4 802C8004 54400005 */ bnel $v0, $zero, .L802C801C
/* EC9B8 802C8008 3C02FB3B */ lui $v0, 0xfb3b
/* EC9BC 802C800C 3C02068E */ lui $v0, 0x68e
/* EC9C0 802C8010 34427780 */ ori $v0, $v0, 0x7780
/* EC9C4 802C8014 03E00008 */ jr $ra
/* EC9C8 802C8018 00821021 */ addu $v0, $a0, $v0
.L802C801C:
/* EC9CC 802C801C 34424C00 */ ori $v0, $v0, 0x4c00
/* EC9D0 802C8020 0044102A */ slt $v0, $v0, $a0
/* EC9D4 802C8024 54400005 */ bnel $v0, $zero, .L802C803C
/* EC9D8 802C8028 3C02FC6C */ lui $v0, 0xfc6c
/* EC9DC 802C802C 3C02055D */ lui $v0, 0x55d
/* EC9E0 802C8030 34424A80 */ ori $v0, $v0, 0x4a80
/* EC9E4 802C8034 03E00008 */ jr $ra
/* EC9E8 802C8038 00821021 */ addu $v0, $a0, $v0
.L802C803C:
/* EC9EC 802C803C 34427900 */ ori $v0, $v0, 0x7900
/* EC9F0 802C8040 0044102A */ slt $v0, $v0, $a0
/* EC9F4 802C8044 54400005 */ bnel $v0, $zero, .L802C805C
/* EC9F8 802C8048 3C02FD9D */ lui $v0, 0xfd9d
/* EC9FC 802C804C 3C02042C */ lui $v0, 0x42c
/* ECA00 802C8050 34421D80 */ ori $v0, $v0, 0x1d80
/* ECA04 802C8054 03E00008 */ jr $ra
/* ECA08 802C8058 00821021 */ addu $v0, $a0, $v0
.L802C805C:
/* ECA0C 802C805C 3442A600 */ ori $v0, $v0, 0xa600
/* ECA10 802C8060 0044102A */ slt $v0, $v0, $a0
/* ECA14 802C8064 54400005 */ bnel $v0, $zero, .L802C807C
/* ECA18 802C8068 3C02FECE */ lui $v0, 0xfece
/* ECA1C 802C806C 3C0202FA */ lui $v0, 0x2fa
/* ECA20 802C8070 3442F080 */ ori $v0, $v0, 0xf080
/* ECA24 802C8074 03E00008 */ jr $ra
/* ECA28 802C8078 00821021 */ addu $v0, $a0, $v0
.L802C807C:
/* ECA2C 802C807C 3442D300 */ ori $v0, $v0, 0xd300
/* ECA30 802C8080 0044102A */ slt $v0, $v0, $a0
/* ECA34 802C8084 1440FFAB */ bnez $v0, .L802C7F34
/* ECA38 802C8088 3C0201C9 */ lui $v0, 0x1c9
/* ECA3C 802C808C 3442C380 */ ori $v0, $v0, 0xc380
/* ECA40 802C8090 03E00008 */ jr $ra
/* ECA44 802C8094 00821021 */ addu $v0, $a0, $v0

View File

@ -1,73 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_bind
/* EB0C4 802C6714 27BDFFB8 */ addiu $sp, $sp, -0x48
/* EB0C8 802C6718 AFB3003C */ sw $s3, 0x3c($sp)
/* EB0CC 802C671C 0080982D */ daddu $s3, $a0, $zero
/* EB0D0 802C6720 AFBF0044 */ sw $ra, 0x44($sp)
/* EB0D4 802C6724 AFB40040 */ sw $s4, 0x40($sp)
/* EB0D8 802C6728 AFB20038 */ sw $s2, 0x38($sp)
/* EB0DC 802C672C AFB10034 */ sw $s1, 0x34($sp)
/* EB0E0 802C6730 AFB00030 */ sw $s0, 0x30($sp)
/* EB0E4 802C6734 8E70000C */ lw $s0, 0xc($s3)
/* EB0E8 802C6738 8E050000 */ lw $a1, ($s0)
/* EB0EC 802C673C 0C0B1EAF */ jal get_variable
/* EB0F0 802C6740 26100004 */ addiu $s0, $s0, 4
/* EB0F4 802C6744 8E030000 */ lw $v1, ($s0)
/* EB0F8 802C6748 26100004 */ addiu $s0, $s0, 4
/* EB0FC 802C674C 8E110000 */ lw $s1, ($s0)
/* EB100 802C6750 26100004 */ addiu $s0, $s0, 4
/* EB104 802C6754 0260202D */ daddu $a0, $s3, $zero
/* EB108 802C6758 3C060100 */ lui $a2, 0x100
/* EB10C 802C675C 8E120000 */ lw $s2, ($s0)
/* EB110 802C6760 8E140004 */ lw $s4, 4($s0)
/* EB114 802C6764 0040802D */ daddu $s0, $v0, $zero
/* EB118 802C6768 0220282D */ daddu $a1, $s1, $zero
/* EB11C 802C676C 00661825 */ or $v1, $v1, $a2
/* EB120 802C6770 0C0B1EAF */ jal get_variable
/* EB124 802C6774 AFA30010 */ sw $v1, 0x10($sp)
/* EB128 802C6778 0260202D */ daddu $a0, $s3, $zero
/* EB12C 802C677C 0220282D */ daddu $a1, $s1, $zero
/* EB130 802C6780 0C0B1F6A */ jal get_variable_index
/* EB134 802C6784 AFA20018 */ sw $v0, 0x18($sp)
/* EB138 802C6788 27A40010 */ addiu $a0, $sp, 0x10
/* EB13C 802C678C A7A20014 */ sh $v0, 0x14($sp)
/* EB140 802C6790 3C02802C */ lui $v0, 0x802c
/* EB144 802C6794 2442667C */ addiu $v0, $v0, 0x667c
/* EB148 802C6798 AFB20028 */ sw $s2, 0x28($sp)
/* EB14C 802C679C AFA00024 */ sw $zero, 0x24($sp)
/* EB150 802C67A0 0C0515DB */ jal create_trigger
/* EB154 802C67A4 AFA2001C */ sw $v0, 0x1c($sp)
/* EB158 802C67A8 0040882D */ daddu $s1, $v0, $zero
/* EB15C 802C67AC AE300010 */ sw $s0, 0x10($s1)
/* EB160 802C67B0 AE200014 */ sw $zero, 0x14($s1)
/* EB164 802C67B4 92620003 */ lbu $v0, 3($s3)
/* EB168 802C67B8 AE220018 */ sw $v0, 0x18($s1)
/* EB16C 802C67BC 8E650084 */ lw $a1, 0x84($s3)
/* EB170 802C67C0 0C0B1EAF */ jal get_variable
/* EB174 802C67C4 0260202D */ daddu $a0, $s3, $zero
/* EB178 802C67C8 AE22001C */ sw $v0, 0x1c($s1)
/* EB17C 802C67CC 8E650088 */ lw $a1, 0x88($s3)
/* EB180 802C67D0 0C0B1EAF */ jal get_variable
/* EB184 802C67D4 0260202D */ daddu $a0, $s3, $zero
/* EB188 802C67D8 AE220020 */ sw $v0, 0x20($s1)
/* EB18C 802C67DC 8E65008C */ lw $a1, 0x8c($s3)
/* EB190 802C67E0 0C0B1EAF */ jal get_variable
/* EB194 802C67E4 0260202D */ daddu $a0, $s3, $zero
/* EB198 802C67E8 12800005 */ beqz $s4, .L802C6800
/* EB19C 802C67EC AE220024 */ sw $v0, 0x24($s1)
/* EB1A0 802C67F0 0260202D */ daddu $a0, $s3, $zero
/* EB1A4 802C67F4 0280282D */ daddu $a1, $s4, $zero
/* EB1A8 802C67F8 0C0B2026 */ jal set_variable
/* EB1AC 802C67FC 0220302D */ daddu $a2, $s1, $zero
.L802C6800:
/* EB1B0 802C6800 8FBF0044 */ lw $ra, 0x44($sp)
/* EB1B4 802C6804 8FB40040 */ lw $s4, 0x40($sp)
/* EB1B8 802C6808 8FB3003C */ lw $s3, 0x3c($sp)
/* EB1BC 802C680C 8FB20038 */ lw $s2, 0x38($sp)
/* EB1C0 802C6810 8FB10034 */ lw $s1, 0x34($sp)
/* EB1C4 802C6814 8FB00030 */ lw $s0, 0x30($sp)
/* EB1C8 802C6818 24020002 */ addiu $v0, $zero, 2
/* EB1CC 802C681C 03E00008 */ jr $ra
/* EB1D0 802C6820 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,17 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel ClearAmbientSounds
/* FAA98 802D60E8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* FAA9C 802D60EC AFBF0010 */ sw $ra, 0x10($sp)
/* FAAA0 802D60F0 8C82000C */ lw $v0, 0xc($a0)
/* FAAA4 802D60F4 0C0B1EAF */ jal get_variable
/* FAAA8 802D60F8 8C450000 */ lw $a1, ($v0)
/* FAAAC 802D60FC 2404FFFF */ addiu $a0, $zero, -1
/* FAAB0 802D6100 0C051CDA */ jal play_ambient_sounds
/* FAAB4 802D6104 0040282D */ daddu $a1, $v0, $zero
/* FAAB8 802D6108 0002102B */ sltu $v0, $zero, $v0
/* FAABC 802D610C 8FBF0010 */ lw $ra, 0x10($sp)
/* FAAC0 802D6110 00021040 */ sll $v0, $v0, 1
/* FAAC4 802D6114 03E00008 */ jr $ra
/* FAAC8 802D6118 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 GetItemPower
/* FBCDC 802D732C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* FBCE0 802D7330 AFB20018 */ sw $s2, 0x18($sp)
/* FBCE4 802D7334 0080902D */ daddu $s2, $a0, $zero
/* FBCE8 802D7338 AFBF001C */ sw $ra, 0x1c($sp)
/* FBCEC 802D733C AFB10014 */ sw $s1, 0x14($sp)
/* FBCF0 802D7340 AFB00010 */ sw $s0, 0x10($sp)
/* FBCF4 802D7344 8E50000C */ lw $s0, 0xc($s2)
/* FBCF8 802D7348 8E050000 */ lw $a1, ($s0)
/* FBCFC 802D734C 0C0B1EAF */ jal get_variable
/* FBD00 802D7350 26100004 */ addiu $s0, $s0, 4
/* FBD04 802D7354 3C038008 */ lui $v1, %hi(gItemTable)
/* FBD08 802D7358 246378E0 */ addiu $v1, $v1, %lo(gItemTable)
/* FBD0C 802D735C 00028940 */ sll $s1, $v0, 5
/* FBD10 802D7360 02238821 */ addu $s1, $s1, $v1
/* FBD14 802D7364 8E050000 */ lw $a1, ($s0)
/* FBD18 802D7368 8226001B */ lb $a2, 0x1b($s1)
/* FBD1C 802D736C 8E100004 */ lw $s0, 4($s0)
/* FBD20 802D7370 0C0B2026 */ jal set_variable
/* FBD24 802D7374 0240202D */ daddu $a0, $s2, $zero
/* FBD28 802D7378 0240202D */ daddu $a0, $s2, $zero
/* FBD2C 802D737C 8226001C */ lb $a2, 0x1c($s1)
/* FBD30 802D7380 0C0B2026 */ jal set_variable
/* FBD34 802D7384 0200282D */ daddu $a1, $s0, $zero
/* FBD38 802D7388 8FBF001C */ lw $ra, 0x1c($sp)
/* FBD3C 802D738C 8FB20018 */ lw $s2, 0x18($sp)
/* FBD40 802D7390 8FB10014 */ lw $s1, 0x14($sp)
/* FBD44 802D7394 8FB00010 */ lw $s0, 0x10($sp)
/* FBD48 802D7398 24020002 */ addiu $v0, $zero, 2
/* FBD4C 802D739C 03E00008 */ jr $ra
/* FBD50 802D73A0 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -5,6 +5,11 @@
#include "types.h"
#include "si.h"
struct ScriptInstance;
typedef ApiStatus(*ApiFunc)(struct ScriptInstance*, s32);
typedef struct Vec3f {
/* 0x00 */ f32 x;
/* 0x04 */ f32 y;
@ -159,9 +164,16 @@ typedef struct PlayerData {
/* 0x33E */ char unk_33E[2];
} PlayerData; // size = 0x340
typedef union {
struct {
/* 0x0 */ s16 genericFlagIndex;
/* 0x2 */ char unk_2;
} bytes;
s32 flags;
} TriggerFlags;
typedef struct Trigger {
/* 0x00 */ s16 genericFlagIndex;
/* 0x02 */ char unk_02[2];
/* 0x00 */ TriggerFlags flags;
/* 0x04 */ s32 params1;
/* 0x08 */ s32 params2;
/* 0x0C */ UNK_FUN_PTR(functionHandler);
@ -169,7 +181,8 @@ typedef struct Trigger {
/* 0x14 */ struct ScriptInstance* runningScript;
/* 0x18 */ s32 priority;
/* 0x1C */ s32 scriptVars[3];
/* 0x28 */ char unk_28[12];
/* 0x28 */ char unk_28[8];
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 runningScriptID;
} Trigger; // size = 0x38
@ -178,10 +191,11 @@ typedef struct Enemy {
/* 0x04 */ u8 encounterIndex;
/* 0x05 */ s8 encountered;
/* 0x06 */ u8 scriptGroup; /* scripts launched for this npc controller will be assigned this group */
/* 0x07 */ char unk_07;
/* 0x07 */ s8 unk_07;
/* 0x08 */ s16 npcID;
/* 0x0A */ s16 spawnPos[3];
/* 0x10 */ char unk_10[8];
/* 0x10 */ Vec3s unk_10;
/* 0x16 */ char unk_16[2];
/* 0x18 */ struct StaticNpcSettings* npcSettings;
/* 0x1C */ Bytecode* initBytecode;
/* 0x20 */ Bytecode* interactBytecode;
@ -210,7 +224,7 @@ typedef struct Enemy {
/* 0xBC */ char unk_BC[8];
/* 0xC4 */ s32 unk_C4;
/* 0xC8 */ s32 unk_C8;
/* 0xCC */ UNK_PTR animList;
/* 0xCC */ s32* animList;
/* 0xD0 */ UNK_PTR territoryData;
/* 0xD4 */ s16* dropTables;
/* 0xD8 */ u32 tattleString;
@ -233,22 +247,11 @@ typedef struct StaticNpcSettings {
/* 0x2A */ s16 unkFlags;
} StaticNpcSettings; // size = 0x2C
typedef union {
struct {
/* 0x000 */ u8 state;
/* 0x001 */ u8 currentArgc;
/* 0x002 */ u8 currentOpcode;
/* 0x003 */ u8 priority;
} bytes;
s32 flags;
} ScriptFlags;
struct ScriptInstance;
typedef ApiStatus(*ApiFunc)(struct ScriptInstance*, s32);
typedef struct ScriptInstance {
/* 0x000 */ ScriptFlags flags;
/* 0x000 */ u8 state;
/* 0x001 */ u8 currentArgc;
/* 0x002 */ u8 currentOpcode;
/* 0x003 */ u8 priority;
/* 0x004 */ u8 groupFlags;
/* 0x005 */ s8 blocked; /* 1 = blocking */
/* 0x006 */ s8 loopDepth; /* how many nested loops we are in, >= 8 hangs forever */
@ -1446,7 +1449,9 @@ typedef struct EncounterStatus {
/* 0x14 */ s32 songID;
/* 0x18 */ s32 unk_18;
/* 0x1C */ u8 numEncounters; /* number of encounters for current map (in list) */
/* 0x1D */ char unk_1D[3];
/* 0x1D */ s8 currentAreaIndex;
/* 0x1E */ u8 currentMapIndex;
/* 0x1F */ u8 currentEntryIndex;
/* 0x20 */ u8 mapID;
/* 0x21 */ char unk_21[3];
/* 0x24 */ s32* npcGroupList;
@ -1454,9 +1459,11 @@ typedef struct EncounterStatus {
/* 0x88 */ struct Encounter* currentEncounter;
/* 0x8C */ struct Enemy* currentEnemy;
/* 0x90 */ s32 unk_90;
/* 0x94 */ char unk_94[4];
/* 0x94 */ s32 unk_94;
/* 0x98 */ s32 unk_98;
} EncounterStatus; // size = 0x9C
/* 0x9C */ char unk_9C[20];
/* 0xB0 */ s32 defeatFlags[60][12];
} EncounterStatus; // size = 0xE0
typedef struct SaveData {
/* 0x0000 */ char magicString[16]; /* "Mario Story 006" string */

View File

@ -995,7 +995,7 @@ typedef UNK_TYPE HitResult;
#define HitResult_MISS 0x00000006
#define HitResult_HIT_STATIC 0x00000007
#define HitResult_IMMUNE 0x00000008
#define HitResult_TriggerFlagsED_EXPLODE -1
#define HitResult_ED_EXPLODE -1
typedef UNK_TYPE Iter;
#define Iter_FIRST 0xFFFFFFFF
@ -1258,35 +1258,35 @@ typedef s32 NpcId;
#define NpcId_PLAYER 0xFFFFFFFE
#define NpcId_PARTNER 0xFFFFFFFC
typedef UNK_TYPE TriggerFlags;
#define TriggerFlags_FLOOR_TOUCH 0x00000080
#define TriggerFlags_FLOOR_ABOVE 0x00080000
#define TriggerFlags_FLOOR_PRESS_A 0x00000800
#define TriggerFlags_FLOOR_JUMP 0x00000200
#define TriggerFlags_WALL_TOUCH 0x00000400
#define TriggerFlags_WALL_PUSH 0x00000040
#define TriggerFlags_WALL_PRESS_A 0x00000100
#define TriggerFlags_WALL_HAMMER 0x00001000
#define TriggerFlags_CEILING_TOUCH 0x00040000
#define TriggerFlags_POINT_BOMB 0x00100000
#define TriggerFlags_GAME_FLAG_SET 0x00010000
#define TriggerFlags_AREA_FLAG_SET 0x00020000
typedef UNK_TYPE TriggerFlag;
#define TriggerFlag_FLOOR_TOUCH 0x00000080
#define TriggerFlag_FLOOR_ABOVE 0x00080000
#define TriggerFlag_FLOOR_PRESS_A 0x00000800
#define TriggerFlag_FLOOR_JUMP 0x00000200
#define TriggerFlag_WALL_TOUCH 0x00000400
#define TriggerFlag_WALL_PUSH 0x00000040
#define TriggerFlag_WALL_PRESS_A 0x00000100
#define TriggerFlag_WALL_HAMMER 0x00001000
#define TriggerFlag_CEILING_TOUCH 0x00040000
#define TriggerFlag_POINT_BOMB 0x00100000
#define TriggerFlag_GAME_FLAG_SET 0x00010000
#define TriggerFlag_AREA_FLAG_SET 0x00020000
typedef UNK_TYPE Buttons;
#define Buttons_A 0x00008000
#define Buttons_B 0x00004000
#define Buttons_Z 0x00002000
#define Buttons_START 0x00001000
#define Buttons_D_UP 0x00000800
#define Buttons_D_DOWN 0x00000400
#define Buttons_D_LEFT 0x00000200
#define Buttons_D_RIGHT 0x00000100
#define Buttons_L 0x00000020
#define Buttons_R 0x00000010
#define Buttons_C_UP 0x00000008
#define Buttons_C_DOWN 0x00000004
#define Buttons_C_LEFT 0x00000002
#define Buttons_C_RIGHT 0x00000001
typedef UNK_TYPE Button;
#define Button_A 0x00008000
#define Button_B 0x00004000
#define Button_Z 0x00002000
#define Button_START 0x00001000
#define Button_D_UP 0x00000800
#define Button_D_DOWN 0x00000400
#define Button_D_LEFT 0x00000200
#define Button_D_RIGHT 0x00000100
#define Button_L 0x00000020
#define Button_R 0x00000010
#define Button_C_UP 0x00000008
#define Button_C_DOWN 0x00000004
#define Button_C_LEFT 0x00000002
#define Button_C_RIGHT 0x00000001
typedef UNK_TYPE PlayerBuff;
#define PlayerBuff_ALL 0x0FFFFFFF

View File

@ -31,9 +31,13 @@ void get_model_center_and_size(s32 modelID, f32* centerX, f32* centerY, f32* cen
void update_collider_transform(s16 colliderID);
void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z);
s32 is_trigger_bound(Trigger*, Bytecode* script);
Trigger* create_trigger(TriggerDefinition* def);
s32 _bound_script_trigger_handler(Trigger* trigger);
s32 func_800494C0(Npc* npc, s32 arg1, s32 arg2);
s32 get_variable(ScriptInstance* script, Bytecode var);
s32 set_variable(ScriptInstance* script, Bytecode var, s32 value);
f32 get_float_variable(ScriptInstance* script, Bytecode var);
@ -52,6 +56,7 @@ s32 osGetId();
s32 func_800EF394(f32);
s32 does_script_exist(s32 id);
ScriptInstance* start_script(Bytecode* script, s32 priority, s32 flags);
ScriptInstance* start_script_in_group(ScriptInstance* script, s32 priority, s32 flags, s32 groups);
void func_8011B7C0(u16, s32, s32);
@ -75,6 +80,8 @@ Npc* get_npc_unsafe(NpcId npcId);
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr);
void set_npc_yaw(Npc* npcPtr, f32 angle);
Enemy* get_enemy(NpcId npcId);
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
void add_vec2D_polar(f32* x, f32* y, f32 r, f32 theta);

View File

@ -41,6 +41,7 @@ extern u32** gCurrentModelSpecialDlsPtr[32];
extern Entity* gWorldEntityList[30];
extern Entity* gBattleEntityList[30];
extern Entity** gCurrentEntityListPtr[30];
extern s32 gLastCreatedEntityIndex;
extern UNK_TYPE* gWorldDynamicEntityList[16];
extern UNK_TYPE* gBattleDynamicEntityList[16];
@ -122,4 +123,7 @@ extern s32 gNumScripts;
extern f32 D_80286540;
// Scripts
extern Bytecode* SCRIPT_NpcDefeat;
#endif

View File

@ -1,15 +1,19 @@
#include "common.h"
#ifdef NON_MATCHING
void init_demo_data(void) {
GameStatus* gameStatus;
GameStatus* gameStatus2;
if (GAME_STATUS->demoState == 0) {
GAME_STATUS->nextDemoScene = 0;
GAME_STATUS->demoState = 1;
}
gameStatus = GAME_STATUS;
GAME_STATUS->demoStickX = 0;
GAME_STATUS->demoButtonInput = 0;
GAME_STATUS->demoStickY = 0;
gameStatus2 = GAME_STATUS;
gameStatus->demoButtonInput = 0;
gameStatus2->demoStickY = 0;
func_80056228();
set_map_transition_effect(2);
@ -17,9 +21,6 @@ void init_demo_data(void) {
clear_saved_variables();
clear_script_list();
}
#else
INCLUDE_ASM(s32, "code_13480_len_3f0", init_demo_data);
#endif
INCLUDE_ASM(s32, "code_13480_len_3f0", next_demo_scene);

View File

@ -199,6 +199,6 @@ INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_aux);
INCLUDE_ASM(s32, "code_13870_len_6980", bind_npc_interact);
INCLUDE_ASM(s32, "code_13870_len_6980", get_enemy);
INCLUDE_ASM(Enemy*, "code_13870_len_6980", get_enemy, NpcId npcId);
INCLUDE_ASM(s32, "code_13870_len_6980", get_enemy_safe);

View File

@ -1,6 +1,19 @@
#include "common.h"
INCLUDE_ASM(s32, "code_1f580_len_1940", SetEncounterStatusFlags, ScriptInstance* script, s32 isInitialCall);
ApiStatus SetEncounterStatusFlags(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
EncounterStatus* currentEncounter = &gCurrentEncounter;
EncounterStatus* currentEncounter2 = &gCurrentEncounter;
s32 a0 = *args++;
if (get_variable(script, *args)) {
currentEncounter->flags |= a0;
} else {
currentEncounter2->flags &= ~a0;
}
return ApiStatus_DONE2;
}
ApiStatus func_800441F0(ScriptInstance* script, s32 isInitialCall) {
Bytecode arg1 = *script->ptrReadPos;
@ -24,6 +37,32 @@ ApiStatus func_80044290(ScriptInstance* script, s32 isInitialCall) {
}
INCLUDE_ASM(s32, "code_1f580_len_1940", MakeNpcs, ScriptInstance* script, s32 isInitialCall);
/*ApiStatus MakeNpcs(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 var1;
s32 ret;
if (isInitialCall) {
script->functionTemp[0] = 0;
}
if (script->functionTemp[0] != 0) {
if (script->functionTemp[0] != 1) {
return 0;
}
} else {
var1 = get_variable(script, *args++);
make_npcs(var1, GAME_STATUS->mapID, get_variable(script, *args));
script->functionTemp[0] = 1;
return script->functionTemp[0];
}
if (gGameState != script->functionTemp[0]) {
return 2;
}
return script->functionTemp[0];
}*/
INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveNpc, ScriptInstance* script, s32 isInitialCall);
@ -49,7 +88,22 @@ ApiStatus GetOwnerEncounterTrigger(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", DoNpcDefeat, ScriptInstance* script, s32 isInitialCall);
ApiStatus DoNpcDefeat(ScriptInstance* script, s32 isInitialCall) {
Enemy* owner = script->ownerActorID;
Npc* temp_s1 = get_npc_unsafe(owner->npcID);
ScriptInstance* newScript;
kill_script(script);
temp_s1->currentAnim = owner->animList[6];
newScript = start_script(&SCRIPT_NpcDefeat, 10, 0);
owner->defeatScript = newScript;
owner->defeatScriptID = newScript->uniqueID;
newScript->ownerActorID = owner;
newScript->ownerID = owner->npcID;
newScript->groupFlags = owner->scriptGroup;
return ApiStatus_FINISH;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", start_battle);
@ -77,35 +131,270 @@ ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcIdle, ScriptInstance* script, s32 isInitialCall);
ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
NpcId npcID = get_variable(script, *args++);
Bytecode* aiBytecode = (Bytecode*)get_variable(script, *args);
INCLUDE_ASM(s32, "code_1f580_len_1940", RestartNpcAI, ScriptInstance* script, s32 isInitialCall);
if (npcID == NpcId_SELF) {
npcID = owner->npcID;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", EnableNpcAI, ScriptInstance* script, s32 isInitialCall);
get_enemy(npcID)->aiBytecode = aiBytecode;
return ApiStatus_DONE2;
}
ApiStatus RestartNpcAI(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
ScriptInstance* newScript;
s32 groupFlags;
if (npcId == NpcId_SELF) {
npcId = enemy->npcID;
}
enemy = get_enemy(npcId);
if (enemy->flags & 1) {
groupFlags = 10;
} else {
groupFlags = 11;
}
if (enemy->aiScript != NULL) {
kill_script_by_ID(enemy->aiScriptID);
}
enemy->unk_C8 = 100;
newScript = start_script(enemy->aiBytecode, 10, 0);
enemy->aiScript = newScript;
enemy->aiScriptID = newScript->uniqueID;
newScript->ownerActorID = enemy;
newScript->ownerID = script->ownerID;
newScript->groupFlags = groupFlags;
return ApiStatus_DONE2;
}
ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
s32 var2 = get_variable(script, *args);
if (npcId == NpcId_SELF) {
npcId = enemy->npcID;
}
enemy = get_enemy(npcId);
if (var2 != 0) {
if (enemy->aiScript != NULL) {
resume_all_script(enemy->aiScriptID);
}
} else if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAux, ScriptInstance* script, s32 isInitialCall);
ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
Bytecode* auxBytecode = (Bytecode*)get_variable(script, *args);
INCLUDE_ASM(s32, "code_1f580_len_1940", RestartNpcAux, ScriptInstance* script, s32 isInitialCall);
if (npcId == NpcId_SELF) {
npcId = owner->npcID;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", EnableNpcAux, ScriptInstance* script, s32 isInitialCall);
get_enemy(npcId)->auxBytecode = auxBytecode;
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcInteract, ScriptInstance* script, s32 isInitialCall);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcHit, ScriptInstance* script, s32 isInitialCall);
ApiStatus RestartNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
ScriptInstance* newScript;
s32 groupFlags;
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcDefeat, ScriptInstance* script, s32 isInitialCall);
if (npcId == NpcId_SELF) {
npcId = enemy->npcID;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfVar, ScriptInstance* script, s32 isInitialCall);
enemy = get_enemy(npcId);
INCLUDE_ASM(s32, "code_1f580_len_1940", GetSelfVar, ScriptInstance* script, s32 isInitialCall);
if (enemy->flags & 1) {
groupFlags = 10;
} else {
groupFlags = 11;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcVar, ScriptInstance* script, s32 isInitialCall);
if (enemy->auxScript != NULL) {
kill_script_by_ID(enemy->auxScriptID);
}
INCLUDE_ASM(s32, "code_1f580_len_1940", GetNpcVar, ScriptInstance* script, s32 isInitialCall);
newScript = start_script(enemy->auxBytecode, 10, 0);
enemy->auxScript = newScript;
enemy->auxScriptID = newScript->uniqueID;
newScript->ownerActorID = enemy;
newScript->ownerID = npcId;
newScript->groupFlags = groupFlags;
INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfRotation, ScriptInstance* script, s32 isInitialCall);
return ApiStatus_DONE2;
}
ApiStatus EnableNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
s32 var2 = get_variable(script, *args);
if (npcId == NpcId_SELF) {
npcId = enemy->npcID;
}
enemy = get_enemy(npcId);
if (var2 != 0) {
if (enemy->auxScript != NULL) {
resume_all_script(enemy->auxScriptID);
}
} else if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
return ApiStatus_DONE2;
}
ApiStatus BindNpcInteract(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* npc = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
Bytecode* interactBytecode = (Bytecode*)get_variable(script, *args);
if (npcId == NpcId_SELF) {
npcId = npc->npcID;
}
npc = get_enemy(npcId);
if (npc->interactScript != NULL) {
kill_script_by_ID(npc->interactScriptID);
}
npc->interactBytecode = interactBytecode;
return ApiStatus_DONE2;
}
ApiStatus BindNpcHit(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* npc = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
Bytecode* hitBytecode = (Bytecode*)get_variable(script, *args);
if (npcId == NpcId_SELF) {
npcId = npc->npcID;
}
npc = get_enemy(npcId);
if (npc->hitScript != NULL) {
kill_script_by_ID(npc->hitScriptID);
}
npc->hitBytecode = hitBytecode;
return ApiStatus_DONE2;
}
ApiStatus BindNpcDefeat(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
s32 npcId = get_variable(script, *args++);
Bytecode* defeatBytecode = (Bytecode*)get_variable(script, *args);
if (npcId == -1) {
npcId = owner->npcID;
}
get_enemy(npcId)->defeatBytecode = defeatBytecode;
return ApiStatus_DONE2;
}
ApiStatus SetSelfVar(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
s32 var1 = get_variable(script, *args++);
s32 var2 = get_variable(script, *args);
owner->varTable[var1] = var2;
return ApiStatus_DONE2;
}
ApiStatus GetSelfVar(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
set_variable(script, *args, script->ownerActorID->varTable[get_variable(script, *args++)]);
return ApiStatus_DONE2;
}
ApiStatus SetNpcVar(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
NpcId npcID = get_variable(script, *args++);
s32 varIdx = get_variable(script, *args++);
s32 val = get_variable(script, *args);
if (npcID == NpcId_SELF) {
npcID = owner->npcID;
}
get_enemy(npcID)->varTable[varIdx] = val;
return ApiStatus_DONE2;
}
ApiStatus GetNpcVar(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* enemy;
NpcId npcID;
s32 varIdx;
s32 var3;
enemy = script->ownerActorID;
npcID = get_variable(script, *args++);
varIdx = get_variable(script, *args++);
var3 = *args;
if (npcID == NpcId_SELF) {
npcID = enemy->npcID;
}
enemy = get_enemy(npcID);
set_variable(script, var3, enemy->varTable[varIdx]);
return ApiStatus_DONE2;
}
ApiStatus SetSelfRotation(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Npc* self = get_npc_unsafe(script->ownerID);
s32 rotX = get_variable(script, *args++);
s32 rotY = get_variable(script, *args++);
s32 rotZ = get_variable(script, *args++);
self->rotation.x = rotX;
self->rotation.y = rotY;
self->rotation.z = rotZ;
return ApiStatus_DONE2;
}
ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall) {
script->ownerActorID->flags = *script->ptrReadPos;
@ -113,11 +402,11 @@ ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus SetSelfEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
s32 bits = thisPos[0];
s32 bits = args[0];
if (get_variable(script, thisPos[1])) {
if (get_variable(script, args[1])) {
owner->flags |= bits;
} else {
owner->flags &= ~bits;
@ -125,22 +414,69 @@ ApiStatus SetSelfEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045580);
ApiStatus func_80045580(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
Npc* npc = get_npc_unsafe(script->ownerID);
owner->unk_07 = get_variable(script, *args);
owner->unk_10.x = npc->pos.x;
owner->unk_10.y = npc->pos.y;
owner->unk_10.z = npc->pos.z;
return ApiStatus_DONE2;
}
ApiStatus GetSelfNpcID(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, script->ownerActorID->npcID);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", ClearDefeatedEnemies, ScriptInstance* script, s32 isInitialCall);
ApiStatus ClearDefeatedEnemies(ScriptInstance* script, s32 isInitialCall) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
s32 i;
s32 j;
INCLUDE_ASM(s32, "code_1f580_len_1940", SetEnemyFlagBits, ScriptInstance* script, s32 isInitialCall);
for (i = 0; i < 60; i++) {
for (j = 0; j < 12; j++) {
currentEncounter->defeatFlags[i][j] = 0;
}
}
return ApiStatus_DONE2;
}
ApiStatus SetEnemyFlagBits(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* enemy = script->ownerActorID;
NpcId npcId = get_variable(script, *args++);
s32 bits = *args++;
s32 var2 = get_variable(script, *args);
if (npcId == NpcId_SELF) {
npcId = enemy->npcID;
}
enemy = get_enemy(npcId);
if (var2 != NULL) {
enemy->flags |= bits;
} else {
enemy->flags &= ~bits;
}
return ApiStatus_DONE2;
}
ApiStatus func_8004572C(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", GetSelfAnimationFromTable, ScriptInstance* script, s32 isInitialCall);
ApiStatus GetSelfAnimationFromTable(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Enemy* owner = script->ownerActorID;
set_variable(script, *args, owner->animList[get_variable(script, *args++)]);
return ApiStatus_DONE2;
}
ApiStatus func_80045798(ScriptInstance* script, s32 isInitialCall) {
D_8010EF08 = get_variable(script, *script->ptrReadPos);
@ -151,7 +487,7 @@ ApiStatus func_800457C4(ScriptInstance* script, s32 isInitialCall) {
Enemy* ownerActor = script->ownerActorID;
ownerActor->unk_B5 = get_variable(script, *script->ptrReadPos);
return 2;
return ApiStatus_DONE2;
}
ApiStatus func_800457F8(ScriptInstance* script, s32 isInitialCall) {
@ -164,7 +500,23 @@ ApiStatus func_8004580C(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045838);
//INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045838);
ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Npc* npc;
s32 var1 = get_variable(script, *args++);
s32 var2 = get_variable(script, *args++);
s32 var3 = get_variable(script, *args);
npc = resolve_npc(script, var1);
if (npc != NULL) {
func_800494C0(npc, var2, var3);
}
return ApiStatus_DONE2;
do {} while (0); // necessary to match
}
ApiStatus func_800458CC(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, script->ownerActorID->npcSettings->unkFlags & 8);
@ -173,4 +525,11 @@ ApiStatus func_800458CC(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045900);
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045A58);
ApiStatus SetTattleString(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
NpcId enemyId = get_variable(script, *args++);
u32 tattleString = get_variable(script, *args);
get_enemy(enemyId)->tattleString = tattleString;
return ApiStatus_DONE2;
}

View File

@ -185,7 +185,7 @@ INCLUDE_ASM(s32, "code_20ec0_len_5040", func_800490B4);
INCLUDE_ASM(s32, "code_20ec0_len_5040", func_800493EC);
INCLUDE_ASM(s32, "code_20ec0_len_5040", func_800494C0);
INCLUDE_ASM(s32, "code_20ec0_len_5040", func_800494C0, Npc* npc, s32 arg1, s32 arg2);
INCLUDE_ASM(s32, "code_20ec0_len_5040", func_80049550);

View File

@ -245,7 +245,7 @@ s32 check_input_hammer(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData;
if (playerStatus->pressedButtons & Buttons_B) {
if (playerStatus->pressedButtons & Button_B) {
if (!(playerStatus->flags & 4)) {
if (D_8010EBB0[0] != 1 || playerData->currentPartner != PartnerId_WATT) {
if (playerData->hammerLevel != -1) {

View File

@ -48,26 +48,23 @@ ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", SetPlayerPos, ScriptInstance* script, s32 isInitialCall);
/*
ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
Bytecode* args = script->ptrReadPos;
f32 x = get_variable(script, *args++);
f32 y = get_variable(script, *args++);
f32 z = get_variable(script, *args++);
Npc* playerNpc = gPlayerNpc;
playerNpc->pos.x = x;
playerNpc->pos.z = z;
playerNpc->pos.y = y;
gPlayerNpcPtr->pos.x = x;
gPlayerNpcPtr->pos.y = y;
gPlayerNpcPtr->pos.z = z;
playerStatus->position.x = gPlayerNpcPtr->pos.x;
playerStatus->position.y = gPlayerNpcPtr->pos.y;
playerStatus->position.z = gPlayerNpcPtr->pos.z;
playerStatus->position.x = x;
playerStatus->position.y = y;
playerStatus->position.z = z;
return ApiStatus_DONE2;
}
*/
INCLUDE_ASM(s32, "code_F5750", SetPlayerCollisionSize, ScriptInstance* script, s32 isInitialCall);
@ -81,7 +78,22 @@ ApiStatus SetPlayerJumpscale(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#ifdef NON_MATCHING
ApiStatus SetPlayerAnimation(ScriptInstance* script, s32 isInitialCall) {
PlayerAnim animation = get_variable(script, *script->ptrReadPos);
gPlayerNpcPtr->currentAnim = animation;
gPlayerAnimation = animation;
if (animation == 0x80003) {
exec_ShakeCam1(0, 0, 2);
}
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "code_F5750", SetPlayerAnimation, ScriptInstance* script, s32 isInitialCall);
#endif
ApiStatus SetPlayerActionState(ScriptInstance* script, s32 isInitialCall) {
set_action_state(get_variable(script, *script->ptrReadPos));
@ -158,11 +170,28 @@ ApiStatus FullyRestoreHPandFP(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", FullyRestoreSP);
ApiStatus FullyRestoreSP(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
INCLUDE_ASM(s32, "code_F5750", EnablePartner);
playerData->specialBarsFilled = playerData->maxStarPower * 256;
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", DisablePartner);
ApiStatus EnablePartner(ScriptInstance* script, s32 isInitialCall) {
s32 partnerIdx = get_variable(script, *script->ptrReadPos) - 1;
PartnerData* partner = &gPlayerData.partners[partnerIdx];
partner->enabled = TRUE;
return ApiStatus_DONE2;
}
ApiStatus DisablePartner(ScriptInstance* script, s32 isInitialCall) {
s32 partnerIdx = get_variable(script, *script->ptrReadPos) - 1;
PartnerData* partner = &gPlayerData.partners[partnerIdx];
partner->enabled = FALSE;
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", UseEntryHeading);
@ -188,9 +217,32 @@ INCLUDE_ASM(s32, "code_F5750", func_802D286C);
INCLUDE_ASM(s32, "code_F5750", func_802D2884);
INCLUDE_ASM(s32, "code_F5750", DisablePulseStone);
ApiStatus DisablePulseStone(ScriptInstance* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerStatus* playerStatus2 = &gPlayerStatus;
INCLUDE_ASM(s32, "code_F5750", GetCurrentPartner, ScriptInstance* script, s32 isInitialCall);
if (get_variable(script, *script->ptrReadPos)) {
playerStatus->animFlags &= ~0x80;
} else {
playerStatus2->animFlags |= 0x80;
}
return ApiStatus_DONE2;
}
ApiStatus GetCurrentPartner(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Bytecode a0 = *args;
PlayerData* playerData = &gPlayerData;
s32 currentPartner = 0;
if (D_8010EBB0[0] != 0) {
currentPartner = playerData->currentPartner;
}
set_variable(script, a0, currentPartner);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", func_802D2B50);
@ -202,7 +254,14 @@ INCLUDE_ASM(s32, "code_F5750", func_802D2C14);
INCLUDE_ASM(s32, "code_F5750", func_802D2C40);
INCLUDE_ASM(s32, "code_F5750", PlaySoundAtPlayer, ScriptInstance* script, s32 isInitialCall);
ApiStatus PlaySoundAtPlayer(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 var = get_variable(script, *args++);
s32 var2 = get_variable(script, *args++);
play_sound_at_player(var, var2);
return 2;
}
INCLUDE_ASM(s32, "code_F5750", func_802D2D30);

View File

@ -116,7 +116,19 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignAreaFlag, ScriptInstance* script,
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignBlockFlag, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignFlag, ScriptInstance* script, s32 isInitialCall);
//INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignFlag, ScriptInstance* script, s32 isInitialCall);
ApiStatus AssignFlag(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
Trigger* trigger;
if (isInitialCall == TRUE) {
trigger = get_entity_by_index(gLastCreatedEntityIndex)->trigger;
trigger->flags.bytes.genericFlagIndex = get_variable_index(script, *args);
return ApiStatus_DONE2;
}
return ApiStatus_DONE1;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignPanelFlag, ScriptInstance* script, s32 isInitialCall);

View File

@ -35,7 +35,7 @@ void delete_trigger(Trigger* toDelete) {
}
}
INCLUDE_ASM(s32, "code_dbd70_len_700", is_trigger_bound);
INCLUDE_ASM(s32, "code_dbd70_len_700", is_trigger_bound, Trigger* trigger, Bytecode* script);
Trigger* get_trigger_by_id(s32 triggerID) {
return (*gCurrentTriggerListPtr)[triggerID];

View File

@ -10,9 +10,10 @@ INCLUDE_ASM(s32, "code_e79b0_len_1920", init_script_list);
INCLUDE_ASM(s32, "code_e79b0_len_1920", func_802C3390);
INCLUDE_ASM(s32, "code_e79b0_len_1920", start_script);
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script, Bytecode* script, s32 priority, s32 flags);
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script_in_group, ScriptInstance* script, s32 priority, s32 flags, s32 groups);
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script_in_group, ScriptInstance* script, s32 priority,
s32 flags, s32 groups);
INCLUDE_ASM(s32, "code_e79b0_len_1920", start_child_script);
@ -27,7 +28,7 @@ ScriptInstance* restart_script(ScriptInstance* script) {
script->loopDepth = -1;
script->switchDepth = -1;
script->frameCounter = 0;
script->flags.bytes.currentOpcode = 0;
script->currentOpcode = 0;
script->frameCounter = 0;
script->unk_158 = 0;
@ -99,7 +100,7 @@ s32 does_script_exist_by_ref(ScriptInstance* script) {
}
void set_script_priority(ScriptInstance* script, s8 priority) {
script->flags.bytes.priority = priority;
script->priority = priority;
}
void set_script_timescale(ScriptInstance* script, f32 timescale) {
@ -109,7 +110,7 @@ void set_script_timescale(ScriptInstance* script, f32 timescale) {
#ifdef NON_MATCHING
// TODO: figure out why compiler/assembler isn't putting SWC1 in delay slot
void set_global_timespace(f32 timeScale) {
//gGlobalTimeSpace = timeScale;
gGlobalTimeSpace = timeScale;
}
#else
INCLUDE_ASM(s32, "code_e79b0_len_1920", set_global_timespace);
@ -118,7 +119,7 @@ INCLUDE_ASM(s32, "code_e79b0_len_1920", set_global_timespace);
#ifdef NON_MATCHING
// TODO: figure out why compiler/assembler isn't putting LWC1 in delay slot
f32 get_global_timespace(void) {
//return gGlobalTimeSpace;
return gGlobalTimeSpace;
}
#else
INCLUDE_ASM(s32, "code_e79b0_len_1920", get_global_timespace);
@ -170,7 +171,7 @@ void suspend_group_script(ScriptInstance* script, s32 groupFlags) {
}
if ((script->groupFlags & groupFlags) != 0) {
script->flags.bytes.state |= 0x2;
script->state |= 0x2;
}
}
@ -191,7 +192,7 @@ void resume_group_script(ScriptInstance* script, s32 groupFlags) {
}
if ((script->groupFlags & groupFlags) != 0) {
script->flags.bytes.state &= ~0x2;
script->state &= ~0x2;
}
}
@ -315,7 +316,7 @@ void set_script_flags(ScriptInstance* script, s32 flags) {
ScriptInstance* scriptContextPtr;
ScriptInstance* childScript = script->childScript;
script->flags.bytes.state |= flags;
script->state |= flags;
if (childScript != NULL) {
set_script_flags(childScript, flags);
}
@ -334,7 +335,7 @@ void clear_script_flags(ScriptInstance* script, s32 flags) {
ScriptInstance* scriptContextPtr;
ScriptInstance* childScript = script->childScript;
script->flags.bytes.state &= ~flags;
script->state &= ~flags;
if (childScript != NULL) {
clear_script_flags(childScript, flags);
}

View File

@ -6,6 +6,7 @@ s32 si_skip_else(ScriptInstance* script);
s32 si_goto_end_loop(ScriptInstance* script);
s32 si_goto_end_case(ScriptInstance* script);
s32 si_goto_next_case(ScriptInstance* script);
s32 get_variable_index(ScriptInstance* script, s32 var);
f32 fixed_var_to_float(s32 scriptVar) {
if (scriptVar <= -220000000) {
@ -34,13 +35,13 @@ ApiStatus si_handle_goto(ScriptInstance* script) {
}
ApiStatus si_handle_loop(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
s32 loopDepth = ++script->loopDepth;
ASSERT(loopDepth < 8);
script->loopStartTable[loopDepth] = thisPos;
script->loopStartTable[loopDepth] = args;
script->loopCounterTable[loopDepth] = var;
return ApiStatus_DONE2;
@ -120,9 +121,9 @@ ApiStatus si_handle_wait_seconds(ScriptInstance* script) {
}
ApiStatus si_handle_if_equal(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
if (get_variable(script, *thisPos++) != get_variable(script, *thisPos++)) {
if (get_variable(script, *args++) != get_variable(script, *args++)) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -131,9 +132,9 @@ ApiStatus si_handle_if_equal(ScriptInstance* script) {
ApiStatus si_handle_if_not_equal(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
if (get_variable(script, *thisPos++) == get_variable(script, *thisPos++)) {
if (get_variable(script, *args++) == get_variable(script, *args++)) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -141,9 +142,9 @@ ApiStatus si_handle_if_not_equal(ScriptInstance* script) {
}
ApiStatus si_handle_if_less(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
if (get_variable(script, *thisPos++) >= get_variable(script, *thisPos++)) {
if (get_variable(script, *args++) >= get_variable(script, *args++)) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -151,9 +152,9 @@ ApiStatus si_handle_if_less(ScriptInstance* script) {
}
ApiStatus si_handle_if_greater(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
if (get_variable(script, *thisPos++) <= get_variable(script, *thisPos++)) {
if (get_variable(script, *args++) <= get_variable(script, *args++)) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -161,9 +162,9 @@ ApiStatus si_handle_if_greater(ScriptInstance* script) {
}
ApiStatus si_handle_if_less_equal(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
if (get_variable(script, *thisPos++) > get_variable(script, *thisPos++)) {
if (get_variable(script, *args++) > get_variable(script, *args++)) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -171,9 +172,9 @@ ApiStatus si_handle_if_less_equal(ScriptInstance* script) {
}
ApiStatus si_handle_if_greater_equal(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
if (get_variable(script, *thisPos++) < get_variable(script, *thisPos++)) {
if (get_variable(script, *args++) < get_variable(script, *args++)) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -181,10 +182,10 @@ ApiStatus si_handle_if_greater_equal(ScriptInstance* script) {
}
ApiStatus si_handle_if_AND(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
if ((get_variable(script, var) & *thisPos) == 0) {
if ((get_variable(script, var) & *args) == 0) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -192,10 +193,10 @@ ApiStatus si_handle_if_AND(ScriptInstance* script) {
}
ApiStatus si_handle_if_not_AND(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
if ((get_variable(script, var) & *thisPos) != 0) {
if ((get_variable(script, var) & *args) != 0) {
script->ptrNextLine = si_skip_if(script);
return ApiStatus_DONE2;
}
@ -224,12 +225,12 @@ ApiStatus si_handle_switch(ScriptInstance* script) {
}
ApiStatus si_handle_switch_const(ScriptInstance* script) {
Bytecode* thisPos = *script->ptrReadPos;
Bytecode* args = *script->ptrReadPos;
s32 switchDepth = ++script->switchDepth;
ASSERT(switchDepth < 8);
script->switchBlockValue[switchDepth] = thisPos;
script->switchBlockValue[switchDepth] = args;
script->switchBlockState[switchDepth] = 1;
return ApiStatus_DONE2;
@ -486,10 +487,10 @@ ApiStatus si_handle_end_switch(ScriptInstance* script) {
}
ApiStatus si_handle_set_var(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
s32 curPtrReadPos = thisPos[0];
Bytecode* args = script->ptrReadPos;
s32 curPtrReadPos = args[0];
set_variable(script, curPtrReadPos, get_variable(script, thisPos[1]));
set_variable(script, curPtrReadPos, get_variable(script, args[1]));
return ApiStatus_DONE2;
}
@ -499,17 +500,17 @@ ApiStatus si_handle_set_const(ScriptInstance* script) {
}
ApiStatus si_handle_set_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
set_float_variable(script, var, get_float_variable(script, *thisPos));
set_float_variable(script, var, get_float_variable(script, *args));
return ApiStatus_DONE2;
}
ApiStatus si_handle_add(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
s32 result = get_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
s32 result = get_variable(script, *args++);
s32 addend = get_variable(script, var);
result += addend;
@ -519,9 +520,9 @@ ApiStatus si_handle_add(ScriptInstance* script) {
}
ApiStatus si_handle_subtract(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
s32 result = get_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
s32 result = get_variable(script, *args++);
s32 minuend = get_variable(script, var);
result = minuend - result;
@ -531,9 +532,9 @@ ApiStatus si_handle_subtract(ScriptInstance* script) {
}
ApiStatus si_handle_multiply(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
s32 result = get_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
s32 result = get_variable(script, *args++);
s32 multiplier = get_variable(script, var);
result *= multiplier;
@ -543,9 +544,9 @@ ApiStatus si_handle_multiply(ScriptInstance* script) {
}
ApiStatus si_handle_divide(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
s32 result = get_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
s32 result = get_variable(script, *args++);
s32 dividend = get_variable(script, var);
result = dividend / result;
@ -555,9 +556,9 @@ ApiStatus si_handle_divide(ScriptInstance* script) {
}
ApiStatus si_handle_mod(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
s32 result = get_variable(script, *thisPos++) + 0.5;
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
s32 result = get_variable(script, *args++) + 0.5;
s32 num = get_variable(script, var) + 0.5;
result = num % result;
@ -567,9 +568,9 @@ ApiStatus si_handle_mod(ScriptInstance* script) {
}
ApiStatus si_handle_addF(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
f32 result = get_float_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
f32 result = get_float_variable(script, *args++);
f32 addend = get_float_variable(script, var);
result += addend;
@ -579,9 +580,9 @@ ApiStatus si_handle_addF(ScriptInstance* script) {
}
ApiStatus si_handle_subtractF(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
f32 result = get_float_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
f32 result = get_float_variable(script, *args++);
f32 minuend = get_float_variable(script, var);
result = minuend - result;
@ -591,9 +592,9 @@ ApiStatus si_handle_subtractF(ScriptInstance* script) {
}
ApiStatus si_handle_multiplyF(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
f32 result = get_float_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
f32 result = get_float_variable(script, *args++);
f32 multiplier = get_float_variable(script, var);
result *= multiplier;
@ -603,9 +604,9 @@ ApiStatus si_handle_multiplyF(ScriptInstance* script) {
}
ApiStatus si_handle_divideF(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode var = *thisPos++;
f32 result = get_float_variable(script, *thisPos++);
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
f32 result = get_float_variable(script, *args++);
f32 dividend = get_float_variable(script, var);
result = dividend / result;
@ -614,7 +615,6 @@ ApiStatus si_handle_divideF(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_set_int_buffer_ptr(ScriptInstance* script) {
script->buffer = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
@ -626,149 +626,149 @@ ApiStatus si_handle_set_float_buffer_ptr(ScriptInstance* script) {
}
ApiStatus si_handle_get_1_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
var = *args++;
set_variable(script, var, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_2_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
Bytecode var2;
var = *thisPos++;
var = *args++;
set_variable(script, var, *script->buffer++);
var2 = *thisPos++;
var2 = *args++;
set_variable(script, var2, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_3_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
var = *thisPos++;
var = *args++;
set_variable(script, var, *script->buffer++);
var2 = *thisPos++;
var2 = *args++;
set_variable(script, var2, *script->buffer++);
var3 = *thisPos++;
var3 = *args++;
set_variable(script, var3, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_4_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
Bytecode var4;
var = *thisPos++;
var = *args++;
set_variable(script, var, *script->buffer++);
var2 = *thisPos++;
var2 = *args++;
set_variable(script, var2, *script->buffer++);
var3 = *thisPos++;
var3 = *args++;
set_variable(script, var3, *script->buffer++);
var4 = *thisPos++;
var4 = *args++;
set_variable(script, var4, *script->buffer++);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_Nth_word(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
set_variable(script, var, script->buffer[get_variable(script, *thisPos)]);
var = *args++;
set_variable(script, var, script->buffer[get_variable(script, *args)]);
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_1_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
var = *args++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
return ApiStatus_DONE2;
}
ApiStatus si_handle_get_2_float(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
Bytecode var;
Bytecode var2;
var = *thisPos++;
var = *args++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
var2 = *thisPos++;
var2 = *args++;
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* args = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
var = *thisPos++;
var = *args++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
var2 = *thisPos++;
var2 = *args++;
set_float_variable(script, var2, get_float_variable(script, *script->buffer++));
var3 = *thisPos++;
var3 = *args++;
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* args = script->ptrReadPos;
Bytecode var;
Bytecode var2;
Bytecode var3;
Bytecode var4;
var = *thisPos++;
var = *args++;
set_float_variable(script, var, get_float_variable(script, *script->buffer++));
var2 = *thisPos++;
var2 = *args++;
set_float_variable(script, var2, get_float_variable(script, *script->buffer++));
var3 = *thisPos++;
var3 = *args++;
set_float_variable(script, var3, get_float_variable(script, *script->buffer++));
var4 = *thisPos++;
var4 = *args++;
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* args = script->ptrReadPos;
Bytecode var;
var = *thisPos++;
set_float_variable(script, var, script->buffer[get_variable(script, *thisPos)]);
var = *args++;
set_float_variable(script, var, script->buffer[get_variable(script, *args)]);
return ApiStatus_DONE2;
}
@ -784,9 +784,9 @@ ApiStatus si_handle_set_flag_array(ScriptInstance* script) {
}
ApiStatus si_handle_allocate_array(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
s32 size = get_variable(script, *thisPos++);
Bytecode var = *thisPos++;
Bytecode* args = script->ptrReadPos;
s32 size = get_variable(script, *args++);
Bytecode var = *args++;
script->array = (s32)heap_malloc(size * 4);
set_variable(script, var, (s32)script->array);
@ -849,7 +849,7 @@ ApiStatus si_handle_call(ScriptInstance* script) {
script->callFunction = (ApiFunc)get_variable(script, *args++);
newScript = script; // todo fake match
script->ptrReadPos = args;
script->flags.bytes.currentArgc--;
script->currentArgc--;
script->blocked = TRUE;
isInitialCall = TRUE;
func = script->callFunction;
@ -858,12 +858,13 @@ ApiStatus si_handle_call(ScriptInstance* script) {
return func(newScript, isInitialCall); // todo fake match
}
ApiStatus si_handle_exec1(ScriptInstance *script) {
ApiStatus si_handle_exec1(ScriptInstance* script) {
ScriptInstance* newScript;
s32 i;
newScript = start_script_in_group((ScriptInstance*)get_variable(script, *script->ptrReadPos), script->flags.bytes.priority, 0, script->groupFlags);
newScript = start_script_in_group((ScriptInstance*)get_variable(script, *script->ptrReadPos), script->priority, 0,
script->groupFlags);
newScript->ownerActorID = script->ownerActorID;
newScript->ownerID = script->ownerID;
@ -879,19 +880,19 @@ ApiStatus si_handle_exec1(ScriptInstance *script) {
newScript->array = script->array;
newScript->flagArray = script->flagArray;
return ApiStatus_DONE2;
}
ApiStatus si_handle_exec2(ScriptInstance *script) {
ApiStatus si_handle_exec2(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
ScriptInstance* var = (ScriptInstance*)get_variable(script, *args++);
Bytecode arg2 = *args++;
ScriptInstance* newScript;
s32 i;
newScript = start_script_in_group(var, script->flags.bytes.priority, 0, script->groupFlags);
newScript = start_script_in_group(var, script->priority, 0, script->groupFlags);
newScript->ownerActorID = script->ownerActorID;
newScript->ownerID = script->ownerID;
@ -909,13 +910,13 @@ ApiStatus si_handle_exec2(ScriptInstance *script) {
newScript->flagArray = script->flagArray;
set_variable(script, arg2, newScript->uniqueID);
return ApiStatus_DONE2;
}
ApiStatus si_handle_exec_wait(ScriptInstance* script) {
start_child_script(script, get_variable(script, *script->ptrReadPos), 0);
script->flags.bytes.currentOpcode = 0;
script->currentOpcode = 0;
return ApiStatus_FINISH;
}
@ -925,9 +926,64 @@ ApiStatus si_handle_jump(ScriptInstance* script) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_e92d0_len_5da0", _bound_script_trigger_handler, Trigger* trigger);
s32 _bound_script_trigger_handler(Trigger* trigger) {
Bytecode* scriptStart;
ScriptInstance* script;
INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_bind);
if (trigger->runningScript == NULL) {
scriptStart = trigger->scriptStart;
if (is_trigger_bound(trigger, scriptStart)) {
return 0;
}
script = start_script(scriptStart, trigger->priority, 0x20);
trigger->runningScript = script;
trigger->runningScriptID = script->uniqueID;
script->varTable[0] = trigger->scriptVars[0];
script->varTable[1] = trigger->scriptVars[1];
script->varTable[2] = trigger->scriptVars[2];
script->ownerID = trigger;
}
if (!does_script_exist(trigger->runningScriptID)) {
trigger->runningScript = NULL;
return 0;
}
return 1;
}
ApiStatus si_handle_bind(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
Trigger* trigger;
s32 var0 = get_variable(script, *args++);
Bytecode flags = *args++;
Bytecode index = *args++;
Bytecode a3 = *args++;
Bytecode a4 = *args++;
TriggerDefinition def;
def.flags = flags | 0x1000000;
def.flagIndex = get_variable(script, index);
def.colliderIndex = get_variable_index(script, index);
def.inputArg3 = a3;
def.unk_14 = 0;
def.function = _bound_script_trigger_handler;
trigger = create_trigger(&def);
trigger->scriptStart = var0;
trigger->runningScript = NULL;
trigger->priority = script->priority;
trigger->scriptVars[0] = get_variable(script, script->varTable[0]);
trigger->scriptVars[1] = get_variable(script, script->varTable[1]);
trigger->scriptVars[2] = get_variable(script, script->varTable[2]);
if (a4 != 0) {
set_variable(script, a4, trigger);
}
return ApiStatus_DONE2;
}
ApiStatus DeleteTrigger(ScriptInstance* script, s32 isInitialCall) {
delete_trigger(get_variable(script, *script->ptrReadPos));
@ -990,32 +1046,60 @@ ApiStatus si_handle_resume(ScriptInstance* script) {
}
ApiStatus si_handle_does_script_exist(ScriptInstance* script) {
Bytecode* thisPos = script->ptrReadPos;
Bytecode scriptID = get_variable(script, *thisPos++);
Bytecode var2 = *thisPos++;
Bytecode* args = script->ptrReadPos;
Bytecode scriptID = get_variable(script, *args++);
Bytecode var2 = *args++;
set_variable(script, var2, does_script_exist(scriptID));
return ApiStatus_DONE2;
}
void func_802C6AD0(ScriptInstance* script) {
if (script->labelIndices[1] == 0) {
ScriptInstance* newScript = start_script(script->labelIndices[0], script->labelIndices[2], 0x20);
script->labelIndices[1] = newScript;
script->labelPositions[5] = newScript->uniqueID;
newScript->varTable[0] = script->labelIndices[3];
newScript->varTable[1] = script->labelPositions[0];
newScript->varTable[2] = script->labelPositions[1];
newScript->ownerID = script;
void si_standard_trigger_executor(Trigger* trigger) {
if (trigger->runningScript == NULL) {
ScriptInstance* newScript = start_script(trigger->scriptStart, trigger->priority, 0x20);
trigger->runningScript = newScript;
trigger->runningScriptID = newScript->uniqueID;
newScript->varTable[0] = trigger->scriptVars[0];
newScript->varTable[1] = trigger->scriptVars[1];
newScript->varTable[2] = trigger->scriptVars[2];
newScript->ownerID = trigger;
}
if (!does_script_exist(script->labelPositions[5])) {
script->labelIndices[1] = NULL;
script->flags.flags &= ~0x2;
if (!does_script_exist(trigger->runningScriptID)) {
trigger->runningScript = NULL;
trigger->flags.flags &= ~0x2;
}
}
INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_bind_lock, ScriptInstance* script, s32 isInitialCall);
/*ApiStatus si_handle_bind_lock(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
Trigger* trigger;
TriggerDefinition def;
s32 var0 = get_variable(script, *args++);
Bytecode flags = *args++;
Bytecode index = *args++;
s32 var3 = get_variable(script, *args++);
Bytecode a4 = *args++;
Bytecode a5 = *args++;
def.flags = flags | 0x1000000;
def.flagIndex = get_variable(script, index);
def.colliderIndex = get_variable_index(script, index);
def.unk_14 = var3;
def.inputArg3 = a4;
def.function = _bound_script_trigger_handler;
trigger = create_trigger(&def);
trigger->scriptStart = var0;
trigger->runningScript = NULL;
trigger->priority = script->flags.bytes.priority;
trigger->scriptVars[0] = get_variable(script, script->varTable[0]);
trigger->scriptVars[1] = get_variable(script, script->varTable[1]);
trigger->scriptVars[2] = get_variable(script, script->varTable[2]);
return ApiStatus_DONE2;
}*/
INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_thread, ScriptInstance* script, s32 isInitialCall);
@ -1121,9 +1205,91 @@ s32 get_variable(ScriptInstance* script, Bytecode var) {
INCLUDE_ASM(s32, "code_e92d0_len_5da0", get_variable, ScriptInstance* script, Bytecode var);
#endif
INCLUDE_ASM(s32, "code_e92d0_len_5da0", get_variable_index);
s32 get_variable_index(ScriptInstance* script, s32 var) {
if (-270000000 >= var) {
return var;
}
if (-250000000 >= var) {
return var;
}
if (-220000000 >= var) {
return var;
}
if (-200000000 >= var) {
return var + 210000000;
}
if (-180000000 >= var) {
return var + 190000000;
}
if (-160000000 >= var) {
return var + 170000000;
}
if (-140000000 >= var) {
return var + 150000000;
}
if (-120000000 >= var) {
return var + 130000000;
}
if (-100000000 >= var) {
return var + 110000000;
}
if (-80000000 >= var) {
return var + 90000000;
}
if (-60000000 >= var) {
return var + 70000000;
}
if (-40000000 >= var) {
return var + 50000000;
}
if (-20000000 >= var) {
return var + 30000000;
}
return var;
}
INCLUDE_ASM(s32, "code_e92d0_len_5da0", get_variable_index_alt);
s32 get_variable_index_alt(s32 var) {
if (-270000000 >= var) {
return var;
}
if (-250000000 >= var) {
return var;
}
if (-220000000 >= var) {
return var;
}
if (-200000000 >= var) {
return var + 210000000;
}
if (-180000000 >= var) {
return var + 190000000;
}
if (-160000000 >= var) {
return var + 170000000;
}
if (-140000000 >= var) {
return var + 150000000;
}
if (-120000000 >= var) {
return var + 130000000;
}
if (-100000000 >= var) {
return var + 110000000;
}
if (-80000000 >= var) {
return var + 90000000;
}
if (-60000000 >= var) {
return var + 70000000;
}
if (-40000000 >= var) {
return var + 50000000;
}
if (-20000000 >= var) {
return var + 30000000;
}
return var;
}
INCLUDE_ASM(s32, "code_e92d0_len_5da0", set_variable, ScriptInstance* script, Bytecode var, s32 value);

View File

@ -5,19 +5,19 @@ INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5B10);
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5C70);
ApiStatus FadeOutMusic(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
s32* ptrNextPos = ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
s32* ptrNextPos = args++;
return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * 2;
}
ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 musicPlayer = get_variable(script, *ptrReadPos++);
s32 songID = get_variable(script, *ptrReadPos++);
s32 variation = get_variable(script, *ptrReadPos++);
s16 volume = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 musicPlayer = get_variable(script, *args++);
s32 songID = get_variable(script, *args++);
s32 variation = get_variable(script, *args++);
s16 volume = get_variable(script, *args++);
return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * 2;
}
@ -40,69 +40,75 @@ INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6070);
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6090);
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ClearAmbientSounds);
//INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ClearAmbientSounds);
ApiStatus ClearAmbientSounds(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 flags = get_variable(script, *args++);
return (play_ambient_sounds(-1, flags) != 0) * 2;
}
ApiStatus PlayAmbientSounds(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 soundID = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 soundID = get_variable(script, *args++);
return (play_ambient_sounds(soundID, 0xFA) != 0) * 2;
}
ApiStatus PlaySound(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 soundID = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 soundID = get_variable(script, *args++);
play_sound(soundID);
return ApiStatus_DONE2;
}
ApiStatus func_802D617C(ScriptInstance* script, s32 initialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 soundID = get_variable(script, *ptrReadPos++);
s32 value2 = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 soundID = get_variable(script, *args++);
s32 value2 = get_variable(script, *args++);
_play_sound(soundID, value2 & 0xFF, 0, 0);
return ApiStatus_DONE2;
}
ApiStatus PlaySoundAt(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 soundID = get_variable(script, *ptrReadPos++);
s32 value2 = get_variable(script, *ptrReadPos++);
s32 x = get_variable(script, *ptrReadPos++);
s32 y = get_variable(script, *ptrReadPos++);
s32 z = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 soundID = get_variable(script, *args++);
s32 value2 = get_variable(script, *args++);
s32 x = get_variable(script, *args++);
s32 y = get_variable(script, *args++);
s32 z = get_variable(script, *args++);
play_sound_at_position(soundID, value2, x, y, z);
return ApiStatus_DONE2;
}
ApiStatus StopSound(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
stop_sound(get_variable(script, *ptrReadPos++));
stop_sound(get_variable(script, *args++));
return ApiStatus_DONE2;
}
ApiStatus func_802D62E4(ScriptInstance* script, s32 initialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
func_80149A6C(get_variable(script, *ptrReadPos++), 1);
func_80149A6C(get_variable(script, *args++), 1);
return ApiStatus_DONE2;
}
ApiStatus UseDoorSounds(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
gCurrentDoorSoundsSet = get_variable(script, *ptrReadPos++);
gCurrentDoorSoundsSet = get_variable(script, *args++);
return ApiStatus_DONE2;
}
ApiStatus func_802D6340(ScriptInstance* script, s32 initialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
D_80151308 = get_variable(script, *ptrReadPos++);
D_80151308 = get_variable(script, *args++);
return ApiStatus_DONE2;
}
@ -113,8 +119,8 @@ INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6420);
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D663C);
ApiStatus RemoveKeyItemAt(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 index = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 index = get_variable(script, *args++);
s16* ptrKeyItems = (s16*) &gPlayerData.keyItems;
ptrKeyItems[index] = 0;
@ -122,8 +128,8 @@ ApiStatus RemoveKeyItemAt(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus RemoveItemAt(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 index = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 index = get_variable(script, *args++);
s16* ptrInvItems = (s16*) &gPlayerData.invItems;
ptrInvItems[index] = 0;
@ -132,8 +138,8 @@ ApiStatus RemoveItemAt(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus AddKeyItem(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 value = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 value = *args++;
PlayerData* playerData = &gPlayerData;
s32 itemID = get_variable(script, value);
s32 i;
@ -164,9 +170,9 @@ ApiStatus func_802D6954(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus HasKeyItem(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
s32 value = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
s32 value = *args++;
PlayerData* playerData = &gPlayerData;
s32 i;
@ -180,9 +186,9 @@ ApiStatus HasKeyItem(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus FindKeyItem(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
s32 value = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
s32 value = *args++;
PlayerData* playerData = &gPlayerData;
s32 i;
s32 itemIndex;
@ -203,9 +209,9 @@ ApiStatus FindKeyItem(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus AddItem(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
Bytecode outItemIdx = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
Bytecode outItemIdx = *args++;
set_variable(script, outItemIdx, add_item(itemID));
return ApiStatus_DONE2;
@ -217,9 +223,9 @@ ApiStatus func_802D6AF0(ScriptInstance* script, s32 initialCall) {
}
ApiStatus FindItem(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
s32 value = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
s32 value = *args++;
PlayerData* playerData = &gPlayerData;
s32 i;
s32 itemIndex;
@ -240,9 +246,9 @@ ApiStatus FindItem(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus RemoveItem(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
s32 value = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
s32 value = *args++;
PlayerData* playerData = &gPlayerData;
s32 i;
s32 itemIndex;
@ -291,13 +297,13 @@ INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", DropItemEntityB, ScriptInstance* script,
/*
// Close to working
ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemID = get_variable(script, *ptrReadPos++);
s32 x = get_variable(script, *ptrReadPos++);
s32 y = get_variable(script, *ptrReadPos++);
s32 z = get_variable(script, *ptrReadPos++);
s32 itemSpawnMode = get_variable(script, *ptrReadPos++);
s32 pickupFlag = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 itemID = get_variable(script, *args++);
s32 x = get_variable(script, *args++);
s32 y = get_variable(script, *args++);
s32 z = get_variable(script, *args++);
s32 itemSpawnMode = get_variable(script, *args++);
s32 pickupFlag = get_variable(script, *args++);
script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z);
set_item_entity_flags(script, 0x4000);
@ -306,17 +312,17 @@ ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) {
*/
ApiStatus RemoveItemEntity(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 itemEntityIndex = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32 itemEntityIndex = get_variable(script, *args++);
remove_item_entity_by_index(itemEntityIndex);
return ApiStatus_DONE2;
}
ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 badgeID = get_variable(script, *ptrReadPos++);
Bytecode outBadgeIdx = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 badgeID = get_variable(script, *args++);
Bytecode outBadgeIdx = *args++;
set_variable(script, outBadgeIdx, add_badge(badgeID));
return ApiStatus_DONE2;
@ -325,15 +331,15 @@ ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", RemoveBadge, ScriptInstance* script, s32 isInitialCall);
ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
ItemEntity* ptrItemEntity;
s32 itemEntityIndex;
s32 x, y, z;
itemEntityIndex = get_variable(script, *ptrReadPos++);
x = get_variable(script, *ptrReadPos++);
y = get_variable(script, *ptrReadPos++);
z = get_variable(script, *ptrReadPos++);
itemEntityIndex = get_variable(script, *args++);
x = get_variable(script, *args++);
y = get_variable(script, *args++);
z = get_variable(script, *args++);
ptrItemEntity = (ItemEntity*) get_item_entity(itemEntityIndex);
ptrItemEntity->position.x = x;
@ -361,21 +367,16 @@ ApiStatus AddStarPieces(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#ifdef NON_MATCHING
/*
ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
StaticItem* item = &gItemTable[get_variable(script, *ptrReadPos++)];
Bytecode out1 = *ptrReadPos++;
Bytecode out2 = *ptrReadPos++;
Bytecode* args = script->ptrReadPos;
s32 itemIdx = get_variable(script, *args++);
Bytecode out1 = *args++;
Bytecode out2 = *args++;
set_variable(script, out1, item->potencyA);
set_variable(script, out2, item->potencyB);
set_variable(script, out1, (&gItemTable[itemIdx])->potencyA);
set_variable(script, out2, (&gItemTable[itemIdx])->potencyB);
return ApiStatus_DONE2;
}*/
#else
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", GetItemPower, ScriptInstance* script, s32 isInitialCall);
#endif
}
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowGotItem, ScriptInstance* script, s32 isInitialCall);
@ -392,23 +393,23 @@ INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7690);
INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowEmote, ScriptInstance* script, s32 isInitialCall);
ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
remove_effect(get_variable(script, *ptrReadPos++));
remove_effect(get_variable(script, *args++));
return ApiStatus_DONE2;
}
ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32* ptrValue = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32* ptrValue = get_variable(script, *args++);
*ptrValue |= 0x10;
return ApiStatus_DONE2;
}
ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32* ptrValue = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32* ptrValue = get_variable(script, *args++);
s32* ptrTemp = ptrValue[3];
ptrTemp[5] = 10;
@ -416,8 +417,8 @@ ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) {
}
ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32* ptrValue = get_variable(script, *ptrReadPos++);
Bytecode* args = script->ptrReadPos;
s32* ptrValue = get_variable(script, *args++);
s32* ptrTemp = ptrValue[3];
ptrTemp[12] = 5;

View File

@ -1663,6 +1663,7 @@ si_handle_wait;0x802C4B5C
si_handle_wait_seconds;0x802C4BB8
si_skip_else;0x802C8978
si_skip_if;0x802C88FC
si_standard_trigger_executor;0x802C6AD0
sign;0x800294B0
signF;0x80029A7C
sin_cos_deg;0x8002A234

View File

@ -63,6 +63,7 @@ D_800A0900 = 0x800A0900;
gCurrentEncounter = 0x800B0F10;
gCameras = 0x800B1D80;
gCurrentCameraID = 0x80077410;
SCRIPT_NpcDefeat = 0x80077E38;
D_800DC500 = 0x800DC500;
D_8010F6D0 = 0x8010F6D0;
gBackgroundImage = 0x80200000;
@ -103,6 +104,7 @@ D_80159AE2 = 0x80159AE2;
D_80159AE4 = 0x80159AE4;
gCollisionStatus = 0x8015A55A0;
D_8015C7C0 = 0x8015C7C0;
gLastCreatedEntityIndex = 0x801512EC;
gWorldModelList = 0x80151770;
gBattleModelList = 0x80151B70;