mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
🐱
This commit is contained in:
parent
9e9ce5bb29
commit
e1b4b8b594
@ -1,18 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel CheckButtonDown
|
||||
/* 19C9E8 8026E108 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19C9EC 8026E10C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19C9F0 8026E110 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19C9F4 8026E114 3C06800E */ lui $a2, 0x800e
|
||||
/* 19C9F8 8026E118 8CC6C280 */ lw $a2, -0x3d80($a2)
|
||||
/* 19C9FC 8026E11C 8C430000 */ lw $v1, ($v0)
|
||||
/* 19CA00 8026E120 8C450004 */ lw $a1, 4($v0)
|
||||
/* 19CA04 8026E124 00C33024 */ and $a2, $a2, $v1
|
||||
/* 19CA08 8026E128 0C0B2026 */ jal set_variable
|
||||
/* 19CA0C 8026E12C 0006302B */ sltu $a2, $zero, $a2
|
||||
/* 19CA10 8026E130 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19CA14 8026E134 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19CA18 8026E138 03E00008 */ jr $ra
|
||||
/* 19CA1C 8026E13C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,18 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel CheckButtonHeld
|
||||
/* 19C9B0 8026E0D0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19C9B4 8026E0D4 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19C9B8 8026E0D8 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19C9BC 8026E0DC 3C06800E */ lui $a2, 0x800e
|
||||
/* 19C9C0 8026E0E0 8CC6C288 */ lw $a2, -0x3d78($a2)
|
||||
/* 19C9C4 8026E0E4 8C430000 */ lw $v1, ($v0)
|
||||
/* 19C9C8 8026E0E8 8C450004 */ lw $a1, 4($v0)
|
||||
/* 19C9CC 8026E0EC 00C33024 */ and $a2, $a2, $v1
|
||||
/* 19C9D0 8026E0F0 0C0B2026 */ jal set_variable
|
||||
/* 19C9D4 8026E0F4 0006302B */ sltu $a2, $zero, $a2
|
||||
/* 19C9D8 8026E0F8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19C9DC 8026E0FC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19C9E0 8026E100 03E00008 */ jr $ra
|
||||
/* 19C9E4 8026E104 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,18 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel CheckButtonPress
|
||||
/* 19C978 8026E098 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19C97C 8026E09C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19C980 8026E0A0 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19C984 8026E0A4 3C06800E */ lui $a2, 0x800e
|
||||
/* 19C988 8026E0A8 8CC6C284 */ lw $a2, -0x3d7c($a2)
|
||||
/* 19C98C 8026E0AC 8C430000 */ lw $v1, ($v0)
|
||||
/* 19C990 8026E0B0 8C450004 */ lw $a1, 4($v0)
|
||||
/* 19C994 8026E0B4 00C33024 */ and $a2, $a2, $v1
|
||||
/* 19C998 8026E0B8 0C0B2026 */ jal set_variable
|
||||
/* 19C99C 8026E0BC 0006302B */ sltu $a2, $zero, $a2
|
||||
/* 19C9A0 8026E0C0 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19C9A4 8026E0C4 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19C9A8 8026E0C8 03E00008 */ jr $ra
|
||||
/* 19C9AC 8026E0CC 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,21 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel EnemyCreateTargetList
|
||||
/* 19CBF0 8026E310 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19CBF4 8026E314 0080102D */ daddu $v0, $a0, $zero
|
||||
/* 19CBF8 8026E318 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 19CBFC 8026E31C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19CC00 8026E320 8C440148 */ lw $a0, 0x148($v0)
|
||||
/* 19CC04 8026E324 0C09A75B */ jal get_actor
|
||||
/* 19CC08 8026E328 8C50000C */ lw $s0, 0xc($v0)
|
||||
/* 19CC0C 8026E32C 8E030000 */ lw $v1, ($s0)
|
||||
/* 19CC10 8026E330 3C01800E */ lui $at, 0x800e
|
||||
/* 19CC14 8026E334 AC23C1F4 */ sw $v1, -0x3e0c($at)
|
||||
/* 19CC18 8026E338 0C098C12 */ jal enemy_create_target_list
|
||||
/* 19CC1C 8026E33C 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19CC20 8026E340 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 19CC24 8026E344 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19CC28 8026E348 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19CC2C 8026E34C 03E00008 */ jr $ra
|
||||
/* 19CC30 8026E350 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetBattleFlags
|
||||
/* 19B5F0 8026CD10 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19B5F4 8026CD14 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19B5F8 8026CD18 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19B5FC 8026CD1C 3C06800E */ lui $a2, %hi(gBattleStatus)
|
||||
/* 19B600 8026CD20 8CC6C070 */ lw $a2, %lo(gBattleStatus)($a2)
|
||||
/* 19B604 8026CD24 0C0B2026 */ jal set_variable
|
||||
/* 19B608 8026CD28 8C450000 */ lw $a1, ($v0)
|
||||
/* 19B60C 8026CD2C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19B610 8026CD30 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19B614 8026CD34 03E00008 */ jr $ra
|
||||
/* 19B618 8026CD38 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetBattleFlags2
|
||||
/* 19B680 8026CDA0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19B684 8026CDA4 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19B688 8026CDA8 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19B68C 8026CDAC 3C06800E */ lui $a2, 0x800e
|
||||
/* 19B690 8026CDB0 8CC6C074 */ lw $a2, -0x3f8c($a2)
|
||||
/* 19B694 8026CDB4 0C0B2026 */ jal set_variable
|
||||
/* 19B698 8026CDB8 8C450000 */ lw $a1, ($v0)
|
||||
/* 19B69C 8026CDBC 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19B6A0 8026CDC0 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19B6A4 8026CDC4 03E00008 */ jr $ra
|
||||
/* 19B6A8 8026CDC8 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetBattlePhase
|
||||
/* 198708 80269E28 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19870C 80269E2C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 198710 80269E30 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 198714 80269E34 3C06800E */ lui $a2, 0x800e
|
||||
/* 198718 80269E38 80C6C217 */ lb $a2, -0x3de9($a2)
|
||||
/* 19871C 80269E3C 0C0B2026 */ jal set_variable
|
||||
/* 198720 80269E40 8C450000 */ lw $a1, ($v0)
|
||||
/* 198724 80269E44 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 198728 80269E48 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19872C 80269E4C 03E00008 */ jr $ra
|
||||
/* 198730 80269E50 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetBattleState
|
||||
/* 19CA20 8026E140 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19CA24 8026E144 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19CA28 8026E148 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19CA2C 8026E14C 3C06800E */ lui $a2, 0x800e
|
||||
/* 19CA30 8026E150 8CC6C068 */ lw $a2, -0x3f98($a2)
|
||||
/* 19CA34 8026E154 0C0B2026 */ jal set_variable
|
||||
/* 19CA38 8026E158 8C450000 */ lw $a1, ($v0)
|
||||
/* 19CA3C 8026E15C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19CA40 8026E160 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19CA44 8026E164 03E00008 */ jr $ra
|
||||
/* 19CA48 8026E168 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetLastElement
|
||||
/* 198734 80269E54 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 198738 80269E58 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19873C 80269E5C 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 198740 80269E60 3C06800E */ lui $a2, 0x800e
|
||||
/* 198744 80269E64 8CC6C1F8 */ lw $a2, -0x3e08($a2)
|
||||
/* 198748 80269E68 0C0B2026 */ jal set_variable
|
||||
/* 19874C 80269E6C 8C450000 */ lw $a1, ($v0)
|
||||
/* 198750 80269E70 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 198754 80269E74 24020002 */ addiu $v0, $zero, 2
|
||||
/* 198758 80269E78 03E00008 */ jr $ra
|
||||
/* 19875C 80269E7C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,14 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetOwnerID
|
||||
/* 19C6E0 8026DE00 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19C6E4 8026DE04 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19C6E8 8026DE08 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19C6EC 8026DE0C 8C860148 */ lw $a2, 0x148($a0)
|
||||
/* 19C6F0 8026DE10 0C0B2026 */ jal set_variable
|
||||
/* 19C6F4 8026DE14 8C450000 */ lw $a1, ($v0)
|
||||
/* 19C6F8 8026DE18 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19C6FC 8026DE1C 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19C700 8026DE20 03E00008 */ jr $ra
|
||||
/* 19C704 8026DE24 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetPlayerActorID
|
||||
/* 19D254 8026E974 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19D258 8026E978 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19D25C 8026E97C 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19D260 8026E980 3C06800E */ lui $a2, 0x800e
|
||||
/* 19D264 8026E984 84C6C218 */ lh $a2, -0x3de8($a2)
|
||||
/* 19D268 8026E988 0C0B2026 */ jal set_variable
|
||||
/* 19D26C 8026E98C 8C450000 */ lw $a1, ($v0)
|
||||
/* 19D270 8026E990 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19D274 8026E994 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19D278 8026E998 03E00008 */ jr $ra
|
||||
/* 19D27C 8026E99C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetPlayerHP
|
||||
/* 1A2B14 80274234 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 1A2B18 80274238 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 1A2B1C 8027423C 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 1A2B20 80274240 3C068011 */ lui $a2, 0x8011
|
||||
/* 1A2B24 80274244 80C6F292 */ lb $a2, -0xd6e($a2)
|
||||
/* 1A2B28 80274248 0C0B2026 */ jal set_variable
|
||||
/* 1A2B2C 8027424C 8C450000 */ lw $a1, ($v0)
|
||||
/* 1A2B30 80274250 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 1A2B34 80274254 24020002 */ addiu $v0, $zero, 2
|
||||
/* 1A2B38 80274258 03E00008 */ jr $ra
|
||||
/* 1A2B3C 8027425C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,21 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel PlayerCreateTargetList
|
||||
/* 19CBAC 8026E2CC 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19CBB0 8026E2D0 0080102D */ daddu $v0, $a0, $zero
|
||||
/* 19CBB4 8026E2D4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 19CBB8 8026E2D8 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19CBBC 8026E2DC 8C440148 */ lw $a0, 0x148($v0)
|
||||
/* 19CBC0 8026E2E0 0C09A75B */ jal get_actor
|
||||
/* 19CBC4 8026E2E4 8C50000C */ lw $s0, 0xc($v0)
|
||||
/* 19CBC8 8026E2E8 8E030000 */ lw $v1, ($s0)
|
||||
/* 19CBCC 8026E2EC 3C01800E */ lui $at, 0x800e
|
||||
/* 19CBD0 8026E2F0 AC23C1F4 */ sw $v1, -0x3e0c($at)
|
||||
/* 19CBD4 8026E2F4 0C098C0B */ jal player_create_target_list
|
||||
/* 19CBD8 8026E2F8 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19CBDC 8026E2FC 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 19CBE0 8026E300 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19CBE4 8026E304 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19CBE8 8026E308 03E00008 */ jr $ra
|
||||
/* 19CBEC 8026E30C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,13 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel RemovePlayerBuffs
|
||||
/* 19DD2C 8026F44C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19DD30 8026F450 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 19DD34 8026F454 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19DD38 8026F458 0C099D15 */ jal remove_player_buffs
|
||||
/* 19DD3C 8026F45C 8C440000 */ lw $a0, ($v0)
|
||||
/* 19DD40 8026F460 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 19DD44 8026F464 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19DD48 8026F468 03E00008 */ jr $ra
|
||||
/* 19DD4C 8026F46C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,31 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel SetBattleFlagBits
|
||||
/* 19B61C 8026CD3C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19B620 8026CD40 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 19B624 8026CD44 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19B628 8026CD48 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19B62C 8026CD4C 8C450004 */ lw $a1, 4($v0)
|
||||
/* 19B630 8026CD50 0C0B1EAF */ jal get_variable
|
||||
/* 19B634 8026CD54 8C500000 */ lw $s0, ($v0)
|
||||
/* 19B638 8026CD58 10400007 */ beqz $v0, .L8026CD78
|
||||
/* 19B63C 8026CD5C 00102027 */ nor $a0, $zero, $s0
|
||||
/* 19B640 8026CD60 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 19B644 8026CD64 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 19B648 8026CD68 8C620000 */ lw $v0, ($v1)
|
||||
/* 19B64C 8026CD6C 00501025 */ or $v0, $v0, $s0
|
||||
/* 19B650 8026CD70 0809B363 */ j .L8026CD8C
|
||||
/* 19B654 8026CD74 AC620000 */ sw $v0, ($v1)
|
||||
.L8026CD78:
|
||||
/* 19B658 8026CD78 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 19B65C 8026CD7C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 19B660 8026CD80 8C430000 */ lw $v1, ($v0)
|
||||
/* 19B664 8026CD84 00641824 */ and $v1, $v1, $a0
|
||||
/* 19B668 8026CD88 AC430000 */ sw $v1, ($v0)
|
||||
.L8026CD8C:
|
||||
/* 19B66C 8026CD8C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 19B670 8026CD90 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19B674 8026CD94 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19B678 8026CD98 03E00008 */ jr $ra
|
||||
/* 19B67C 8026CD9C 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,16 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel SetBattleInputButtons
|
||||
/* 19C948 8026E068 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 19C94C 8026E06C 8C450000 */ lw $a1, ($v0)
|
||||
/* 19C950 8026E070 24420004 */ addiu $v0, $v0, 4
|
||||
/* 19C954 8026E074 8C430000 */ lw $v1, ($v0)
|
||||
/* 19C958 8026E078 8C440004 */ lw $a0, 4($v0)
|
||||
/* 19C95C 8026E07C 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 19C960 8026E080 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 19C964 8026E084 AC450210 */ sw $a1, 0x210($v0)
|
||||
/* 19C968 8026E088 AC430214 */ sw $v1, 0x214($v0)
|
||||
/* 19C96C 8026E08C AC440218 */ sw $a0, 0x218($v0)
|
||||
/* 19C970 8026E090 03E00008 */ jr $ra
|
||||
/* 19C974 8026E094 24020002 */ addiu $v0, $zero, 2
|
@ -1,17 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel SetOwnerID
|
||||
/* 19C708 8026DE28 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 19C70C 8026DE2C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19C710 8026DE30 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 19C714 8026DE34 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 19C718 8026DE38 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 19C71C 8026DE3C 0C0B1EAF */ jal get_variable
|
||||
/* 19C720 8026DE40 8C450000 */ lw $a1, ($v0)
|
||||
/* 19C724 8026DE44 AE020148 */ sw $v0, 0x148($s0)
|
||||
/* 19C728 8026DE48 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 19C72C 8026DE4C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19C730 8026DE50 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19C734 8026DE54 03E00008 */ jr $ra
|
||||
/* 19C738 8026DE58 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,18 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel count_targets
|
||||
/* 197F40 80269660 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 197F44 80269664 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 197F48 80269668 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 197F4C 8026966C 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 197F50 80269670 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 197F54 80269674 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 197F58 80269678 A0450197 */ sb $a1, 0x197($v0)
|
||||
/* 197F5C 8026967C 0C098C0B */ jal player_create_target_list
|
||||
/* 197F60 80269680 AC460184 */ sw $a2, 0x184($v0)
|
||||
/* 197F64 80269684 8202040C */ lb $v0, 0x40c($s0)
|
||||
/* 197F68 80269688 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 197F6C 8026968C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 197F70 80269690 03E00008 */ jr $ra
|
||||
/* 197F74 80269694 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel dispatch_damage_event_player_0
|
||||
/* 1A1C5C 8027337C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 1A1C60 80273380 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 1A1C64 80273384 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 1A1C68 80273388 0000302D */ daddu $a2, $zero, $zero
|
||||
/* 1A1C6C 8027338C AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 1A1C70 80273390 AC400188 */ sw $zero, 0x188($v0)
|
||||
/* 1A1C74 80273394 0C09CC6F */ jal dispatch_damage_event_player
|
||||
/* 1A1C78 80273398 A040019A */ sb $zero, 0x19a($v0)
|
||||
/* 1A1C7C 8027339C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 1A1C80 802733A0 03E00008 */ jr $ra
|
||||
/* 1A1C84 802733A4 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,11 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel dispatch_damage_event_player_1
|
||||
/* 1A1C88 802733A8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 1A1C8C 802733AC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 1A1C90 802733B0 0C09CC6F */ jal dispatch_damage_event_player
|
||||
/* 1A1C94 802733B4 24060001 */ addiu $a2, $zero, 1
|
||||
/* 1A1C98 802733B8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 1A1C9C 802733BC 03E00008 */ jr $ra
|
||||
/* 1A1CA0 802733C0 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -603,13 +603,14 @@ typedef struct BattleStatus {
|
||||
/* 0x197 */ u8 targetHomeIndex; /* some sort of home idnex used for target list construction */
|
||||
/* 0x198 */ u8 powerBounceCounter;
|
||||
/* 0x199 */ u8 wasStatusInflicted; /* during last attack */
|
||||
/* 0x19A */ char unk_19A[6];
|
||||
/* 0x19A */ s8 unk_19A;
|
||||
/* 0x19B */ char unk_19B[5];
|
||||
/* 0x1A0 */ s16 currentTargetID; /* selected? */
|
||||
/* 0x1A2 */ u8 currentTargetPart; /* selected? */
|
||||
/* 0x1A3 */ char unk_1A3;
|
||||
/* 0x1A4 */ s16 currentTargetID2;
|
||||
/* 0x1A6 */ u8 currentTargetPart2;
|
||||
/* 0x1A7 */ u8 battlePhase;
|
||||
/* 0x1A7 */ s8 battlePhase;
|
||||
/* 0x1A8 */ s16 attackerActorID;
|
||||
/* 0x1AA */ char unk_1AA[4];
|
||||
/* 0x1AE */ s16 submenuIcons[24]; /* icon IDs */
|
||||
|
@ -20,6 +20,7 @@ extern StaticItem gItemTable[364];
|
||||
extern s16 gMainGameState; /* 0 = battle, 1 = pause, 2 = world */
|
||||
extern UNK_FUN_PTR(gCurrentUpdateFunction);
|
||||
|
||||
extern s32 gBattleState;
|
||||
extern BattleStatus gBattleStatus;
|
||||
|
||||
extern ScriptList gWorldScriptList;
|
||||
|
@ -1,6 +1,13 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", count_targets);
|
||||
s8 count_targets(Actor* actor, s32 targetHomeIndex, s32 targetSelectionFlags) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
|
||||
battleStatus->targetHomeIndex = targetHomeIndex;
|
||||
battleStatus->currentTargetListFlags = targetSelectionFlags;
|
||||
player_create_target_list(actor);
|
||||
return actor->targetListLength;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", get_nearest_home_index);
|
||||
|
||||
@ -18,9 +25,15 @@ INCLUDE_ASM(Actor*, "code_197F40", get_actor, s32 actorID);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", LoadBattleSection);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetBattlePhase);
|
||||
ApiStatus GetBattlePhase(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gBattleStatus.battlePhase);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetLastElement);
|
||||
ApiStatus GetLastElement(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gBattleStatus.currentAttackElement);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", func_80269E80);
|
||||
|
||||
@ -148,11 +161,28 @@ INCLUDE_ASM(s32, "code_197F40", SetPartScale);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetPartScale);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetBattleFlags);
|
||||
ApiStatus GetBattleFlags(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gBattleStatus.flags1);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", SetBattleFlagBits);
|
||||
ApiStatus SetBattleFlagBits(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode a0 = *args++;
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetBattleFlags2);
|
||||
if (get_variable(script, *args)) {
|
||||
gBattleStatus.flags1 |= a0;
|
||||
} else {
|
||||
gBattleStatus.flags1 &= ~a0;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetBattleFlags2(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gBattleStatus.flags2);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", SetBattleFlagBits2);
|
||||
|
||||
@ -196,9 +226,15 @@ INCLUDE_ASM(s32, "code_197F40", func_8026DA94);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", SummonEnemy);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetOwnerID);
|
||||
ApiStatus GetOwnerID(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, script->ownerActorID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", SetOwnerID);
|
||||
ApiStatus SetOwnerID(ScriptInstance* script, s32 isInitialCall) {
|
||||
script->ownerActorID = get_variable(script, *script->ptrReadPos);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ActorExists(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode isExist;
|
||||
@ -235,15 +271,54 @@ ApiStatus SetBattleInputMask(ScriptInstance* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", SetBattleInputButtons);
|
||||
ApiStatus SetBattleInputButtons(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 currentButtonsDown = *args++;
|
||||
s32 currentButtonsPressed = *args++;
|
||||
s32 currentButtonsHeld = *args;
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", CheckButtonPress);
|
||||
battleStatus->currentButtonsDown = currentButtonsDown;
|
||||
battleStatus->currentButtonsPressed = currentButtonsPressed;
|
||||
battleStatus->currentButtonsHeld = currentButtonsHeld;
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", CheckButtonHeld);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", CheckButtonDown);
|
||||
ApiStatus CheckButtonPress(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode buttons = *args++;
|
||||
Bytecode out = *args;
|
||||
s32 buttonsPressed = gBattleStatus.currentButtonsPressed;
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetBattleState);
|
||||
set_variable(script, out, (buttonsPressed & buttons) != 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CheckButtonHeld(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode buttons = *args++;
|
||||
Bytecode out = *args;
|
||||
s32 buttonsHeld = gBattleStatus.currentButtonsHeld;
|
||||
|
||||
set_variable(script, out, (buttonsHeld & buttons) != 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus CheckButtonDown(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Bytecode buttons = *args++;
|
||||
Bytecode out = *args;
|
||||
s32 buttonsDown = gBattleStatus.currentButtonsDown;
|
||||
|
||||
set_variable(script, out, (buttonsDown & buttons) != 0);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetBattleState(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gBattleState);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", func_8026E16C);
|
||||
|
||||
@ -253,9 +328,25 @@ INCLUDE_ASM(s32, "code_197F40", func_8026E208);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", func_8026E260);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", PlayerCreateTargetList);
|
||||
ApiStatus PlayerCreateTargetList(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->ownerActorID);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", EnemyCreateTargetList);
|
||||
gBattleStatus.currentTargetListFlags = *args;
|
||||
player_create_target_list(actor);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus EnemyCreateTargetList(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->ownerActorID);
|
||||
|
||||
gBattleStatus.currentTargetListFlags = *args;
|
||||
enemy_create_target_list(actor);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", InitTargetIterator);
|
||||
|
||||
@ -271,7 +362,10 @@ INCLUDE_ASM(s32, "code_197F40", GetOwnerTarget);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", func_8026E914);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetPlayerActorID);
|
||||
ApiStatus GetAttackerActorID(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gBattleStatus.attackerActorID);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", func_8026E9A0);
|
||||
|
||||
@ -299,7 +393,10 @@ INCLUDE_ASM(s32, "code_197F40", func_8026F1A0);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetStatusFlags);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", RemovePlayerBuffs);
|
||||
ApiStatus RemovePlayerBuffs(ScriptInstance* script, s32 isInitialCall) {
|
||||
remove_player_buffs(*script->ptrReadPos);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", SetPartAlpha);
|
||||
|
||||
@ -369,9 +466,17 @@ INCLUDE_ASM(s32, "code_197F40", calc_player_damage_enemy);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", dispatch_damage_event_player);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", dispatch_damage_event_player_0);
|
||||
void dispatch_damage_event_player_0(s32 damageAmount, Event event) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", dispatch_damage_event_player_1);
|
||||
battleStatus->currentAttackElement = Element_END;
|
||||
battleStatus->unk_19A = 0;
|
||||
dispatch_damage_event_player(damageAmount, event, FALSE);
|
||||
}
|
||||
|
||||
void dispatch_damage_event_player_1(s32 damageAmount, Event event) {
|
||||
dispatch_damage_event_player(damageAmount, event, TRUE);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetMenuSelection);
|
||||
|
||||
@ -385,7 +490,11 @@ INCLUDE_ASM(s32, "code_197F40", PlayerRunToGoal);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", CancelablePlayerRunToGoal);
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", GetPlayerHP);
|
||||
ApiStatus GetPlayerHP(ScriptInstance* script, s32 isInitialCall) {
|
||||
set_variable(script, *script->ptrReadPos, gPlayerData.curHP);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM(s32, "code_197F40", PlayerDamageEnemy);
|
||||
|
||||
|
@ -242,7 +242,7 @@ GetPartTargetFlags;0x8026D2AC
|
||||
GetPartYaw;0x8026B4C0
|
||||
GetPartnerPos;0x802CF438
|
||||
GetPlayerActionState;0x802D1DD0
|
||||
GetPlayerActorID;0x8026E974
|
||||
GetAttackerActorID;0x8026E974
|
||||
GetPlayerAnimation;0x802D1E94
|
||||
GetPlayerHP;0x80274234
|
||||
GetPlayerPos;0x802D1DFC
|
||||
@ -1879,3 +1879,7 @@ SetTattleString;0x80045A58
|
||||
gPauseMenuStrings;0x8026F778
|
||||
gEffectTable;0x8007F214
|
||||
gMoveScriptTable;0x80293E80
|
||||
gStaticScriptCounter;0x802D9CA0
|
||||
D_802D9CA4;0x802D9CA4
|
||||
gGlobalTimeSpace;0x802D9CA8
|
||||
gBattleState;0x800DC068
|
||||
|
@ -13,9 +13,6 @@ gWorldScriptList = 0x802DA490;
|
||||
gBattleScriptList = 0x802DA690;
|
||||
gNumScripts = 0x802DA488;
|
||||
gCurrentScriptListPtr = 0x802DA890;
|
||||
gStaticScriptCounter = 0x802D9CA0;
|
||||
D_802D9CA4 = 0x802D9CA4;
|
||||
gGlobalTimeSpace = 0x802D9CA8;
|
||||
gPlayerNpcPtr = 0x802D9D20;
|
||||
D_80147574 = 0x80147574;
|
||||
D_8010EBB0 = 0x8010EBB0;
|
||||
@ -59,6 +56,7 @@ D_8010F094 = 0x8010F094;
|
||||
|
||||
D_800D9620 = 0x800D9620;
|
||||
|
||||
gBattleState = 0x800DC068;
|
||||
gBattleStatus = 0x800DC070;
|
||||
|
||||
mapScriptLibStart = 0x7E0E80;
|
||||
|
Loading…
Reference in New Issue
Block a user