mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
various decomp, cleaning splat.yaml
This commit is contained in:
parent
a0ec3e79c3
commit
f1279977bd
@ -1,12 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel DisablePartnerBlur
|
||||
/* 173FB8 802456D8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 173FBC 802456DC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 173FC0 802456E0 0C09519A */ jal disable_partner_blur
|
||||
/* 173FC4 802456E4 00000000 */ nop
|
||||
/* 173FC8 802456E8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 173FCC 802456EC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 173FD0 802456F0 03E00008 */ jr $ra
|
||||
/* 173FD4 802456F4 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,12 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel EnablePartnerBlur
|
||||
/* 173F98 802456B8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 173F9C 802456BC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 173FA0 802456C0 0C095191 */ jal enable_partner_blur
|
||||
/* 173FA4 802456C4 00000000 */ nop
|
||||
/* 173FA8 802456C8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 173FAC 802456CC 24020002 */ addiu $v0, $zero, 2
|
||||
/* 173FB0 802456D0 03E00008 */ jr $ra
|
||||
/* 173FB4 802456D4 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 func_80243FDC
|
||||
/* 1728BC 80243FDC 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 1728C0 80243FE0 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 1728C4 80243FE4 0C093903 */ jal func_8024E40C
|
||||
/* 1728C8 80243FE8 24040002 */ addiu $a0, $zero, 2
|
||||
/* 1728CC 80243FEC 0C090464 */ jal func_80241190
|
||||
/* 1728D0 80243FF0 2404000C */ addiu $a0, $zero, 0xc
|
||||
/* 1728D4 80243FF4 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 1728D8 80243FF8 03E00008 */ jr $ra
|
||||
/* 1728DC 80243FFC 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -3,4 +3,4 @@
|
||||
|
||||
glabel pause_cleanup
|
||||
/* 172FE8 80244708 03E00008 */ jr $ra
|
||||
/* 172FEC 8024470C 00000000 */ nop
|
||||
/* 172FEC 8024470C 00000000 */ nop
|
||||
|
@ -1,22 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel IsMessageBoxDisplayed
|
||||
/* 17FC64 80251384 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 17FC68 80251388 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 17FC6C 8025138C 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 17FC70 80251390 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 17FC74 80251394 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 17FC78 80251398 8E02000C */ lw $v0, 0xc($s0)
|
||||
/* 17FC7C 8025139C 0C093EAD */ jal is_popup_displayed
|
||||
/* 17FC80 802513A0 8C510000 */ lw $s1, ($v0)
|
||||
/* 17FC84 802513A4 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 17FC88 802513A8 0040302D */ daddu $a2, $v0, $zero
|
||||
/* 17FC8C 802513AC 0C0B2026 */ jal set_variable
|
||||
/* 17FC90 802513B0 0220282D */ daddu $a1, $s1, $zero
|
||||
/* 17FC94 802513B4 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 17FC98 802513B8 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 17FC9C 802513BC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 17FCA0 802513C0 24020002 */ addiu $v0, $zero, 2
|
||||
/* 17FCA4 802513C4 03E00008 */ jr $ra
|
||||
/* 17FCA8 802513C8 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,13 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel WaitForMessageBoxDone
|
||||
/* 17FCAC 802513CC 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 17FCB0 802513D0 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 17FCB4 802513D4 0C093EAD */ jal is_popup_displayed
|
||||
/* 17FCB8 802513D8 00000000 */ nop
|
||||
/* 17FCBC 802513DC 2C420001 */ sltiu $v0, $v0, 1
|
||||
/* 17FCC0 802513E0 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 17FCC4 802513E4 00021040 */ sll $v0, $v0, 1
|
||||
/* 17FCC8 802513E8 03E00008 */ jr $ra
|
||||
/* 17FCCC 802513EC 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,152 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel ItemAfflictEnemy
|
||||
/* 181204 80252924 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 181208 80252928 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 18120C 8025292C 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 181210 80252930 AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* 181214 80252934 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 181218 80252938 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 18121C 8025293C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 181220 80252940 8E50000C */ lw $s0, 0xc($s2)
|
||||
/* 181224 80252944 3C11800E */ lui $s1, %hi(gBattleStatus)
|
||||
/* 181228 80252948 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
|
||||
/* 18122C 8025294C 8E130000 */ lw $s3, ($s0)
|
||||
/* 181230 80252950 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181234 80252954 8E020000 */ lw $v0, ($s0)
|
||||
/* 181238 80252958 26100004 */ addiu $s0, $s0, 4
|
||||
/* 18123C 8025295C AE20018C */ sw $zero, 0x18c($s1)
|
||||
/* 181240 80252960 AE220188 */ sw $v0, 0x188($s1)
|
||||
/* 181244 80252964 8E020000 */ lw $v0, ($s0)
|
||||
/* 181248 80252968 26100004 */ addiu $s0, $s0, 4
|
||||
/* 18124C 8025296C AE220190 */ sw $v0, 0x190($s1)
|
||||
/* 181250 80252970 8E050000 */ lw $a1, ($s0)
|
||||
/* 181254 80252974 0C0B1EAF */ jal get_variable
|
||||
/* 181258 80252978 26100004 */ addiu $s0, $s0, 4
|
||||
/* 18125C 8025297C 8E230190 */ lw $v1, 0x190($s1)
|
||||
/* 181260 80252980 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 181264 80252984 00621825 */ or $v1, $v1, $v0
|
||||
/* 181268 80252988 AE230190 */ sw $v1, 0x190($s1)
|
||||
/* 18126C 8025298C 8E050000 */ lw $a1, ($s0)
|
||||
/* 181270 80252990 0C0B1EAF */ jal get_variable
|
||||
/* 181274 80252994 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181278 80252998 A622017E */ sh $v0, 0x17e($s1)
|
||||
/* 18127C 8025299C 8E100000 */ lw $s0, ($s0)
|
||||
/* 181280 802529A0 24020030 */ addiu $v0, $zero, 0x30
|
||||
/* 181284 802529A4 32030030 */ andi $v1, $s0, 0x30
|
||||
/* 181288 802529A8 54620004 */ bnel $v1, $v0, .L802529BC
|
||||
/* 18128C 802529AC 32020010 */ andi $v0, $s0, 0x10
|
||||
/* 181290 802529B0 8E220000 */ lw $v0, ($s1)
|
||||
/* 181294 802529B4 08094A7F */ j .L802529FC
|
||||
/* 181298 802529B8 34420030 */ ori $v0, $v0, 0x30
|
||||
.L802529BC:
|
||||
/* 18129C 802529BC 10400004 */ beqz $v0, .L802529D0
|
||||
/* 1812A0 802529C0 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
/* 1812A4 802529C4 8E220000 */ lw $v0, ($s1)
|
||||
/* 1812A8 802529C8 08094A7E */ j .L802529F8
|
||||
/* 1812AC 802529CC 34420010 */ ori $v0, $v0, 0x10
|
||||
.L802529D0:
|
||||
/* 1812B0 802529D0 32020020 */ andi $v0, $s0, 0x20
|
||||
/* 1812B4 802529D4 10400005 */ beqz $v0, .L802529EC
|
||||
/* 1812B8 802529D8 2403FFEF */ addiu $v1, $zero, -0x11
|
||||
/* 1812BC 802529DC 8E220000 */ lw $v0, ($s1)
|
||||
/* 1812C0 802529E0 00431024 */ and $v0, $v0, $v1
|
||||
/* 1812C4 802529E4 08094A7F */ j .L802529FC
|
||||
/* 1812C8 802529E8 34420020 */ ori $v0, $v0, 0x20
|
||||
.L802529EC:
|
||||
/* 1812CC 802529EC 8E220000 */ lw $v0, ($s1)
|
||||
/* 1812D0 802529F0 00431024 */ and $v0, $v0, $v1
|
||||
/* 1812D4 802529F4 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
.L802529F8:
|
||||
/* 1812D8 802529F8 00431024 */ and $v0, $v0, $v1
|
||||
.L802529FC:
|
||||
/* 1812DC 802529FC AE220000 */ sw $v0, ($s1)
|
||||
/* 1812E0 80252A00 32020040 */ andi $v0, $s0, 0x40
|
||||
/* 1812E4 80252A04 10400007 */ beqz $v0, .L80252A24
|
||||
/* 1812E8 80252A08 2404FFBF */ addiu $a0, $zero, -0x41
|
||||
/* 1812EC 80252A0C 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 1812F0 80252A10 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 1812F4 80252A14 8C620000 */ lw $v0, ($v1)
|
||||
/* 1812F8 80252A18 34420040 */ ori $v0, $v0, 0x40
|
||||
/* 1812FC 80252A1C 08094A8E */ j .L80252A38
|
||||
/* 181300 80252A20 AC620000 */ sw $v0, ($v1)
|
||||
.L80252A24:
|
||||
/* 181304 80252A24 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181308 80252A28 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 18130C 80252A2C 8C430000 */ lw $v1, ($v0)
|
||||
/* 181310 80252A30 00641824 */ and $v1, $v1, $a0
|
||||
/* 181314 80252A34 AC430000 */ sw $v1, ($v0)
|
||||
.L80252A38:
|
||||
/* 181318 80252A38 32020200 */ andi $v0, $s0, 0x200
|
||||
/* 18131C 80252A3C 10400007 */ beqz $v0, .L80252A5C
|
||||
/* 181320 80252A40 2404FDFF */ addiu $a0, $zero, -0x201
|
||||
/* 181324 80252A44 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181328 80252A48 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 18132C 80252A4C 8C620000 */ lw $v0, ($v1)
|
||||
/* 181330 80252A50 34420200 */ ori $v0, $v0, 0x200
|
||||
/* 181334 80252A54 08094A9C */ j .L80252A70
|
||||
/* 181338 80252A58 AC620000 */ sw $v0, ($v1)
|
||||
.L80252A5C:
|
||||
/* 18133C 80252A5C 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181340 80252A60 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 181344 80252A64 8C430000 */ lw $v1, ($v0)
|
||||
/* 181348 80252A68 00641824 */ and $v1, $v1, $a0
|
||||
/* 18134C 80252A6C AC430000 */ sw $v1, ($v0)
|
||||
.L80252A70:
|
||||
/* 181350 80252A70 32020080 */ andi $v0, $s0, 0x80
|
||||
/* 181354 80252A74 10400007 */ beqz $v0, .L80252A94
|
||||
/* 181358 80252A78 2404FF7F */ addiu $a0, $zero, -0x81
|
||||
/* 18135C 80252A7C 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181360 80252A80 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 181364 80252A84 8C620000 */ lw $v0, ($v1)
|
||||
/* 181368 80252A88 34420080 */ ori $v0, $v0, 0x80
|
||||
/* 18136C 80252A8C 08094AAA */ j .L80252AA8
|
||||
/* 181370 80252A90 AC620000 */ sw $v0, ($v1)
|
||||
.L80252A94:
|
||||
/* 181374 80252A94 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181378 80252A98 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 18137C 80252A9C 8C430000 */ lw $v1, ($v0)
|
||||
/* 181380 80252AA0 00641824 */ and $v1, $v1, $a0
|
||||
/* 181384 80252AA4 AC430000 */ sw $v1, ($v0)
|
||||
.L80252AA8:
|
||||
/* 181388 80252AA8 0C09A75B */ jal get_actor
|
||||
/* 18138C 80252AAC 8E440148 */ lw $a0, 0x148($s2)
|
||||
/* 181390 80252AB0 94430428 */ lhu $v1, 0x428($v0)
|
||||
/* 181394 80252AB4 A62301A0 */ sh $v1, 0x1a0($s1)
|
||||
/* 181398 80252AB8 92230193 */ lbu $v1, 0x193($s1)
|
||||
/* 18139C 80252ABC 90420426 */ lbu $v0, 0x426($v0)
|
||||
/* 1813A0 80252AC0 A2230194 */ sb $v1, 0x194($s1)
|
||||
/* 1813A4 80252AC4 306300FF */ andi $v1, $v1, 0xff
|
||||
/* 1813A8 80252AC8 A22201A2 */ sb $v0, 0x1a2($s1)
|
||||
/* 1813AC 80252ACC 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 1813B0 80252AD0 50620001 */ beql $v1, $v0, .L80252AD8
|
||||
/* 1813B4 80252AD4 A2200194 */ sb $zero, 0x194($s1)
|
||||
.L80252AD8:
|
||||
/* 1813B8 80252AD8 8E220190 */ lw $v0, 0x190($s1)
|
||||
/* 1813BC 80252ADC 30420F00 */ andi $v0, $v0, 0xf00
|
||||
/* 1813C0 80252AE0 00021203 */ sra $v0, $v0, 8
|
||||
/* 1813C4 80252AE4 0C0945BA */ jal calc_item_damage_enemy
|
||||
/* 1813C8 80252AE8 A2220195 */ sb $v0, 0x195($s1)
|
||||
/* 1813CC 80252AEC 0440000B */ bltz $v0, .L80252B1C
|
||||
/* 1813D0 80252AF0 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1813D4 80252AF4 0260282D */ daddu $a1, $s3, $zero
|
||||
/* 1813D8 80252AF8 0C0B2026 */ jal set_variable
|
||||
/* 1813DC 80252AFC 0040302D */ daddu $a2, $v0, $zero
|
||||
/* 1813E0 80252B00 0C0B1069 */ jal does_script_exist_by_ref
|
||||
/* 1813E4 80252B04 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1813E8 80252B08 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 1813EC 80252B0C 10600004 */ beqz $v1, .L80252B20
|
||||
/* 1813F0 80252B10 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 1813F4 80252B14 08094AC8 */ j .L80252B20
|
||||
/* 1813F8 80252B18 24020002 */ addiu $v0, $zero, 2
|
||||
.L80252B1C:
|
||||
/* 1813FC 80252B1C 240200FF */ addiu $v0, $zero, 0xff
|
||||
.L80252B20:
|
||||
/* 181400 80252B20 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* 181404 80252B24 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 181408 80252B28 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 18140C 80252B2C 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 181410 80252B30 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 181414 80252B34 03E00008 */ jr $ra
|
||||
/* 181418 80252B38 27BD0028 */ addiu $sp, $sp, 0x28
|
@ -1,142 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel ItemCheckHit
|
||||
/* 181620 80252D40 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 181624 80252D44 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 181628 80252D48 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 18162C 80252D4C AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* 181630 80252D50 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 181634 80252D54 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 181638 80252D58 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 18163C 80252D5C 8E50000C */ lw $s0, 0xc($s2)
|
||||
/* 181640 80252D60 3C11800E */ lui $s1, %hi(gBattleStatus)
|
||||
/* 181644 80252D64 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
|
||||
/* 181648 80252D68 8E130000 */ lw $s3, ($s0)
|
||||
/* 18164C 80252D6C 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181650 80252D70 8E020000 */ lw $v0, ($s0)
|
||||
/* 181654 80252D74 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181658 80252D78 AE20018C */ sw $zero, 0x18c($s1)
|
||||
/* 18165C 80252D7C AE220188 */ sw $v0, 0x188($s1)
|
||||
/* 181660 80252D80 8E020000 */ lw $v0, ($s0)
|
||||
/* 181664 80252D84 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181668 80252D88 AE220190 */ sw $v0, 0x190($s1)
|
||||
/* 18166C 80252D8C 8E050000 */ lw $a1, ($s0)
|
||||
/* 181670 80252D90 0C0B1EAF */ jal get_variable
|
||||
/* 181674 80252D94 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181678 80252D98 A622017E */ sh $v0, 0x17e($s1)
|
||||
/* 18167C 80252D9C 8E100000 */ lw $s0, ($s0)
|
||||
/* 181680 80252DA0 24020030 */ addiu $v0, $zero, 0x30
|
||||
/* 181684 80252DA4 32030030 */ andi $v1, $s0, 0x30
|
||||
/* 181688 80252DA8 54620004 */ bnel $v1, $v0, .L80252DBC
|
||||
/* 18168C 80252DAC 32020010 */ andi $v0, $s0, 0x10
|
||||
/* 181690 80252DB0 8E220000 */ lw $v0, ($s1)
|
||||
/* 181694 80252DB4 08094B7F */ j .L80252DFC
|
||||
/* 181698 80252DB8 34420030 */ ori $v0, $v0, 0x30
|
||||
.L80252DBC:
|
||||
/* 18169C 80252DBC 10400004 */ beqz $v0, .L80252DD0
|
||||
/* 1816A0 80252DC0 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
/* 1816A4 80252DC4 8E220000 */ lw $v0, ($s1)
|
||||
/* 1816A8 80252DC8 08094B7E */ j .L80252DF8
|
||||
/* 1816AC 80252DCC 34420010 */ ori $v0, $v0, 0x10
|
||||
.L80252DD0:
|
||||
/* 1816B0 80252DD0 32020020 */ andi $v0, $s0, 0x20
|
||||
/* 1816B4 80252DD4 10400005 */ beqz $v0, .L80252DEC
|
||||
/* 1816B8 80252DD8 2403FFEF */ addiu $v1, $zero, -0x11
|
||||
/* 1816BC 80252DDC 8E220000 */ lw $v0, ($s1)
|
||||
/* 1816C0 80252DE0 00431024 */ and $v0, $v0, $v1
|
||||
/* 1816C4 80252DE4 08094B7F */ j .L80252DFC
|
||||
/* 1816C8 80252DE8 34420020 */ ori $v0, $v0, 0x20
|
||||
.L80252DEC:
|
||||
/* 1816CC 80252DEC 8E220000 */ lw $v0, ($s1)
|
||||
/* 1816D0 80252DF0 00431024 */ and $v0, $v0, $v1
|
||||
/* 1816D4 80252DF4 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
.L80252DF8:
|
||||
/* 1816D8 80252DF8 00431024 */ and $v0, $v0, $v1
|
||||
.L80252DFC:
|
||||
/* 1816DC 80252DFC AE220000 */ sw $v0, ($s1)
|
||||
/* 1816E0 80252E00 32020040 */ andi $v0, $s0, 0x40
|
||||
/* 1816E4 80252E04 10400007 */ beqz $v0, .L80252E24
|
||||
/* 1816E8 80252E08 2404FFBF */ addiu $a0, $zero, -0x41
|
||||
/* 1816EC 80252E0C 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 1816F0 80252E10 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 1816F4 80252E14 8C620000 */ lw $v0, ($v1)
|
||||
/* 1816F8 80252E18 34420040 */ ori $v0, $v0, 0x40
|
||||
/* 1816FC 80252E1C 08094B8E */ j .L80252E38
|
||||
/* 181700 80252E20 AC620000 */ sw $v0, ($v1)
|
||||
.L80252E24:
|
||||
/* 181704 80252E24 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181708 80252E28 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 18170C 80252E2C 8C430000 */ lw $v1, ($v0)
|
||||
/* 181710 80252E30 00641824 */ and $v1, $v1, $a0
|
||||
/* 181714 80252E34 AC430000 */ sw $v1, ($v0)
|
||||
.L80252E38:
|
||||
/* 181718 80252E38 32020200 */ andi $v0, $s0, 0x200
|
||||
/* 18171C 80252E3C 10400007 */ beqz $v0, .L80252E5C
|
||||
/* 181720 80252E40 2404FDFF */ addiu $a0, $zero, -0x201
|
||||
/* 181724 80252E44 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181728 80252E48 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 18172C 80252E4C 8C620000 */ lw $v0, ($v1)
|
||||
/* 181730 80252E50 34420200 */ ori $v0, $v0, 0x200
|
||||
/* 181734 80252E54 08094B9C */ j .L80252E70
|
||||
/* 181738 80252E58 AC620000 */ sw $v0, ($v1)
|
||||
.L80252E5C:
|
||||
/* 18173C 80252E5C 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181740 80252E60 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 181744 80252E64 8C430000 */ lw $v1, ($v0)
|
||||
/* 181748 80252E68 00641824 */ and $v1, $v1, $a0
|
||||
/* 18174C 80252E6C AC430000 */ sw $v1, ($v0)
|
||||
.L80252E70:
|
||||
/* 181750 80252E70 32020080 */ andi $v0, $s0, 0x80
|
||||
/* 181754 80252E74 10400007 */ beqz $v0, .L80252E94
|
||||
/* 181758 80252E78 2404FF7F */ addiu $a0, $zero, -0x81
|
||||
/* 18175C 80252E7C 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181760 80252E80 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 181764 80252E84 8C620000 */ lw $v0, ($v1)
|
||||
/* 181768 80252E88 34420080 */ ori $v0, $v0, 0x80
|
||||
/* 18176C 80252E8C 08094BAA */ j .L80252EA8
|
||||
/* 181770 80252E90 AC620000 */ sw $v0, ($v1)
|
||||
.L80252E94:
|
||||
/* 181774 80252E94 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181778 80252E98 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 18177C 80252E9C 8C430000 */ lw $v1, ($v0)
|
||||
/* 181780 80252EA0 00641824 */ and $v1, $v1, $a0
|
||||
/* 181784 80252EA4 AC430000 */ sw $v1, ($v0)
|
||||
.L80252EA8:
|
||||
/* 181788 80252EA8 0C09A75B */ jal get_actor
|
||||
/* 18178C 80252EAC 8E440148 */ lw $a0, 0x148($s2)
|
||||
/* 181790 80252EB0 94430428 */ lhu $v1, 0x428($v0)
|
||||
/* 181794 80252EB4 A62301A0 */ sh $v1, 0x1a0($s1)
|
||||
/* 181798 80252EB8 92230193 */ lbu $v1, 0x193($s1)
|
||||
/* 18179C 80252EBC 90420426 */ lbu $v0, 0x426($v0)
|
||||
/* 1817A0 80252EC0 A2230194 */ sb $v1, 0x194($s1)
|
||||
/* 1817A4 80252EC4 306300FF */ andi $v1, $v1, 0xff
|
||||
/* 1817A8 80252EC8 A22201A2 */ sb $v0, 0x1a2($s1)
|
||||
/* 1817AC 80252ECC 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 1817B0 80252ED0 50620001 */ beql $v1, $v0, .L80252ED8
|
||||
/* 1817B4 80252ED4 A2200194 */ sb $zero, 0x194($s1)
|
||||
.L80252ED8:
|
||||
/* 1817B8 80252ED8 8E220190 */ lw $v0, 0x190($s1)
|
||||
/* 1817BC 80252EDC 30420F00 */ andi $v0, $v0, 0xf00
|
||||
/* 1817C0 80252EE0 00021203 */ sra $v0, $v0, 8
|
||||
/* 1817C4 80252EE4 0C094574 */ jal calc_item_check_hit
|
||||
/* 1817C8 80252EE8 A2220195 */ sb $v0, 0x195($s1)
|
||||
/* 1817CC 80252EEC 04400006 */ bltz $v0, .L80252F08
|
||||
/* 1817D0 80252EF0 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1817D4 80252EF4 0260282D */ daddu $a1, $s3, $zero
|
||||
/* 1817D8 80252EF8 0C0B2026 */ jal set_variable
|
||||
/* 1817DC 80252EFC 0040302D */ daddu $a2, $v0, $zero
|
||||
/* 1817E0 80252F00 08094BC3 */ j .L80252F0C
|
||||
/* 1817E4 80252F04 24020002 */ addiu $v0, $zero, 2
|
||||
.L80252F08:
|
||||
/* 1817E8 80252F08 240200FF */ addiu $v0, $zero, 0xff
|
||||
.L80252F0C:
|
||||
/* 1817EC 80252F0C 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* 1817F0 80252F10 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 1817F4 80252F14 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 1817F8 80252F18 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 1817FC 80252F1C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 181800 80252F20 03E00008 */ jr $ra
|
||||
/* 181804 80252F24 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
/* 181808 80252F28 00000000 */ nop
|
||||
/* 18180C 80252F2C 00000000 */ nop
|
@ -1,145 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel ItemDamageEnemy
|
||||
/* 181008 80252728 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 18100C 8025272C AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 181010 80252730 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 181014 80252734 AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* 181018 80252738 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 18101C 8025273C AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 181020 80252740 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 181024 80252744 8E50000C */ lw $s0, 0xc($s2)
|
||||
/* 181028 80252748 3C11800E */ lui $s1, %hi(gBattleStatus)
|
||||
/* 18102C 8025274C 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
|
||||
/* 181030 80252750 8E130000 */ lw $s3, ($s0)
|
||||
/* 181034 80252754 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181038 80252758 8E020000 */ lw $v0, ($s0)
|
||||
/* 18103C 8025275C 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181040 80252760 AE20018C */ sw $zero, 0x18c($s1)
|
||||
/* 181044 80252764 AE220188 */ sw $v0, 0x188($s1)
|
||||
/* 181048 80252768 8E020000 */ lw $v0, ($s0)
|
||||
/* 18104C 8025276C 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181050 80252770 AE220190 */ sw $v0, 0x190($s1)
|
||||
/* 181054 80252774 8E050000 */ lw $a1, ($s0)
|
||||
/* 181058 80252778 0C0B1EAF */ jal get_variable
|
||||
/* 18105C 8025277C 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181060 80252780 A622017E */ sh $v0, 0x17e($s1)
|
||||
/* 181064 80252784 8E100000 */ lw $s0, ($s0)
|
||||
/* 181068 80252788 24020030 */ addiu $v0, $zero, 0x30
|
||||
/* 18106C 8025278C 32030030 */ andi $v1, $s0, 0x30
|
||||
/* 181070 80252790 54620004 */ bnel $v1, $v0, .L802527A4
|
||||
/* 181074 80252794 32020010 */ andi $v0, $s0, 0x10
|
||||
/* 181078 80252798 8E220000 */ lw $v0, ($s1)
|
||||
/* 18107C 8025279C 080949F9 */ j .L802527E4
|
||||
/* 181080 802527A0 34420030 */ ori $v0, $v0, 0x30
|
||||
.L802527A4:
|
||||
/* 181084 802527A4 10400004 */ beqz $v0, .L802527B8
|
||||
/* 181088 802527A8 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
/* 18108C 802527AC 8E220000 */ lw $v0, ($s1)
|
||||
/* 181090 802527B0 080949F8 */ j .L802527E0
|
||||
/* 181094 802527B4 34420010 */ ori $v0, $v0, 0x10
|
||||
.L802527B8:
|
||||
/* 181098 802527B8 32020020 */ andi $v0, $s0, 0x20
|
||||
/* 18109C 802527BC 10400005 */ beqz $v0, .L802527D4
|
||||
/* 1810A0 802527C0 2403FFEF */ addiu $v1, $zero, -0x11
|
||||
/* 1810A4 802527C4 8E220000 */ lw $v0, ($s1)
|
||||
/* 1810A8 802527C8 00431024 */ and $v0, $v0, $v1
|
||||
/* 1810AC 802527CC 080949F9 */ j .L802527E4
|
||||
/* 1810B0 802527D0 34420020 */ ori $v0, $v0, 0x20
|
||||
.L802527D4:
|
||||
/* 1810B4 802527D4 8E220000 */ lw $v0, ($s1)
|
||||
/* 1810B8 802527D8 00431024 */ and $v0, $v0, $v1
|
||||
/* 1810BC 802527DC 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
.L802527E0:
|
||||
/* 1810C0 802527E0 00431024 */ and $v0, $v0, $v1
|
||||
.L802527E4:
|
||||
/* 1810C4 802527E4 AE220000 */ sw $v0, ($s1)
|
||||
/* 1810C8 802527E8 32020040 */ andi $v0, $s0, 0x40
|
||||
/* 1810CC 802527EC 10400007 */ beqz $v0, .L8025280C
|
||||
/* 1810D0 802527F0 2404FFBF */ addiu $a0, $zero, -0x41
|
||||
/* 1810D4 802527F4 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 1810D8 802527F8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 1810DC 802527FC 8C620000 */ lw $v0, ($v1)
|
||||
/* 1810E0 80252800 34420040 */ ori $v0, $v0, 0x40
|
||||
/* 1810E4 80252804 08094A08 */ j .L80252820
|
||||
/* 1810E8 80252808 AC620000 */ sw $v0, ($v1)
|
||||
.L8025280C:
|
||||
/* 1810EC 8025280C 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 1810F0 80252810 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 1810F4 80252814 8C430000 */ lw $v1, ($v0)
|
||||
/* 1810F8 80252818 00641824 */ and $v1, $v1, $a0
|
||||
/* 1810FC 8025281C AC430000 */ sw $v1, ($v0)
|
||||
.L80252820:
|
||||
/* 181100 80252820 32020200 */ andi $v0, $s0, 0x200
|
||||
/* 181104 80252824 10400007 */ beqz $v0, .L80252844
|
||||
/* 181108 80252828 2404FDFF */ addiu $a0, $zero, -0x201
|
||||
/* 18110C 8025282C 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181110 80252830 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 181114 80252834 8C620000 */ lw $v0, ($v1)
|
||||
/* 181118 80252838 34420200 */ ori $v0, $v0, 0x200
|
||||
/* 18111C 8025283C 08094A16 */ j .L80252858
|
||||
/* 181120 80252840 AC620000 */ sw $v0, ($v1)
|
||||
.L80252844:
|
||||
/* 181124 80252844 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181128 80252848 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 18112C 8025284C 8C430000 */ lw $v1, ($v0)
|
||||
/* 181130 80252850 00641824 */ and $v1, $v1, $a0
|
||||
/* 181134 80252854 AC430000 */ sw $v1, ($v0)
|
||||
.L80252858:
|
||||
/* 181138 80252858 32020080 */ andi $v0, $s0, 0x80
|
||||
/* 18113C 8025285C 10400007 */ beqz $v0, .L8025287C
|
||||
/* 181140 80252860 2404FF7F */ addiu $a0, $zero, -0x81
|
||||
/* 181144 80252864 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181148 80252868 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 18114C 8025286C 8C620000 */ lw $v0, ($v1)
|
||||
/* 181150 80252870 34420080 */ ori $v0, $v0, 0x80
|
||||
/* 181154 80252874 08094A24 */ j .L80252890
|
||||
/* 181158 80252878 AC620000 */ sw $v0, ($v1)
|
||||
.L8025287C:
|
||||
/* 18115C 8025287C 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181160 80252880 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 181164 80252884 8C430000 */ lw $v1, ($v0)
|
||||
/* 181168 80252888 00641824 */ and $v1, $v1, $a0
|
||||
/* 18116C 8025288C AC430000 */ sw $v1, ($v0)
|
||||
.L80252890:
|
||||
/* 181170 80252890 0C09A75B */ jal get_actor
|
||||
/* 181174 80252894 8E440148 */ lw $a0, 0x148($s2)
|
||||
/* 181178 80252898 94430428 */ lhu $v1, 0x428($v0)
|
||||
/* 18117C 8025289C A62301A0 */ sh $v1, 0x1a0($s1)
|
||||
/* 181180 802528A0 92230193 */ lbu $v1, 0x193($s1)
|
||||
/* 181184 802528A4 90420426 */ lbu $v0, 0x426($v0)
|
||||
/* 181188 802528A8 A2230194 */ sb $v1, 0x194($s1)
|
||||
/* 18118C 802528AC 306300FF */ andi $v1, $v1, 0xff
|
||||
/* 181190 802528B0 A22201A2 */ sb $v0, 0x1a2($s1)
|
||||
/* 181194 802528B4 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 181198 802528B8 50620001 */ beql $v1, $v0, .L802528C0
|
||||
/* 18119C 802528BC A2200194 */ sb $zero, 0x194($s1)
|
||||
.L802528C0:
|
||||
/* 1811A0 802528C0 8E220190 */ lw $v0, 0x190($s1)
|
||||
/* 1811A4 802528C4 30420F00 */ andi $v0, $v0, 0xf00
|
||||
/* 1811A8 802528C8 00021203 */ sra $v0, $v0, 8
|
||||
/* 1811AC 802528CC 0C0945BA */ jal calc_item_damage_enemy
|
||||
/* 1811B0 802528D0 A2220195 */ sb $v0, 0x195($s1)
|
||||
/* 1811B4 802528D4 0440000B */ bltz $v0, .L80252904
|
||||
/* 1811B8 802528D8 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1811BC 802528DC 0260282D */ daddu $a1, $s3, $zero
|
||||
/* 1811C0 802528E0 0C0B2026 */ jal set_variable
|
||||
/* 1811C4 802528E4 0040302D */ daddu $a2, $v0, $zero
|
||||
/* 1811C8 802528E8 0C0B1069 */ jal does_script_exist_by_ref
|
||||
/* 1811CC 802528EC 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1811D0 802528F0 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 1811D4 802528F4 10600004 */ beqz $v1, .L80252908
|
||||
/* 1811D8 802528F8 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 1811DC 802528FC 08094A42 */ j .L80252908
|
||||
/* 1811E0 80252900 24020002 */ addiu $v0, $zero, 2
|
||||
.L80252904:
|
||||
/* 1811E4 80252904 240200FF */ addiu $v0, $zero, 0xff
|
||||
.L80252908:
|
||||
/* 1811E8 80252908 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* 1811EC 8025290C 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 1811F0 80252910 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 1811F4 80252914 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 1811F8 80252918 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 1811FC 8025291C 03E00008 */ jr $ra
|
||||
/* 181200 80252920 27BD0028 */ addiu $sp, $sp, 0x28
|
@ -1,80 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel calc_item_check_hit
|
||||
/* 17FEB0 802515D0 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 17FEB4 802515D4 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 17FEB8 802515D8 3C13800E */ lui $s3, %hi(gBattleStatus)
|
||||
/* 17FEBC 802515DC 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus)
|
||||
/* 17FEC0 802515E0 AFBF0028 */ sw $ra, 0x28($sp)
|
||||
/* 17FEC4 802515E4 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 17FEC8 802515E8 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 17FECC 802515EC AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 17FED0 802515F0 8E6500D8 */ lw $a1, 0xd8($s3)
|
||||
/* 17FED4 802515F4 966301A0 */ lhu $v1, 0x1a0($s3)
|
||||
/* 17FED8 802515F8 866401A0 */ lh $a0, 0x1a0($s3)
|
||||
/* 17FEDC 802515FC 926201A2 */ lbu $v0, 0x1a2($s3)
|
||||
/* 17FEE0 80251600 827201A2 */ lb $s2, 0x1a2($s3)
|
||||
/* 17FEE4 80251604 24B1000C */ addiu $s1, $a1, 0xc
|
||||
/* 17FEE8 80251608 A66301A4 */ sh $v1, 0x1a4($s3)
|
||||
/* 17FEEC 8025160C 0C09A75B */ jal get_actor
|
||||
/* 17FEF0 80251610 A26201A6 */ sb $v0, 0x1a6($s3)
|
||||
/* 17FEF4 80251614 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 17FEF8 80251618 1200002B */ beqz $s0, .L802516C8
|
||||
/* 17FEFC 8025161C 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 17FF00 80251620 0C099117 */ jal get_actor_part
|
||||
/* 17FF04 80251624 0240282D */ daddu $a1, $s2, $zero
|
||||
/* 17FF08 80251628 14400003 */ bnez $v0, .L80251638
|
||||
/* 17FF0C 8025162C 00000000 */ nop
|
||||
.L80251630:
|
||||
/* 17FF10 80251630 0809458C */ j .L80251630
|
||||
/* 17FF14 80251634 00000000 */ nop
|
||||
.L80251638:
|
||||
/* 17FF18 80251638 8C44007C */ lw $a0, 0x7c($v0)
|
||||
/* 17FF1C 8025163C 30820020 */ andi $v0, $a0, 0x20
|
||||
/* 17FF20 80251640 14400022 */ bnez $v0, .L802516CC
|
||||
/* 17FF24 80251644 24020006 */ addiu $v0, $zero, 6
|
||||
/* 17FF28 80251648 82030218 */ lb $v1, 0x218($s0)
|
||||
/* 17FF2C 8025164C 2402000E */ addiu $v0, $zero, 0xe
|
||||
/* 17FF30 80251650 14620003 */ bne $v1, $v0, .L80251660
|
||||
/* 17FF34 80251654 2402000C */ addiu $v0, $zero, 0xc
|
||||
/* 17FF38 80251658 080945B3 */ j .L802516CC
|
||||
/* 17FF3C 8025165C 24020006 */ addiu $v0, $zero, 6
|
||||
.L80251660:
|
||||
/* 17FF40 80251660 82030214 */ lb $v1, 0x214($s0)
|
||||
/* 17FF44 80251664 1462000A */ bne $v1, $v0, .L80251690
|
||||
/* 17FF48 80251668 00000000 */ nop
|
||||
/* 17FF4C 8025166C C6200014 */ lwc1 $f0, 0x14($s1)
|
||||
/* 17FF50 80251670 2404010C */ addiu $a0, $zero, 0x10c
|
||||
/* 17FF54 80251674 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 17FF58 80251678 8E26000C */ lw $a2, 0xc($s1)
|
||||
/* 17FF5C 8025167C 8E270010 */ lw $a3, 0x10($s1)
|
||||
/* 17FF60 80251680 0C052757 */ jal play_sound_at_position
|
||||
/* 17FF64 80251684 0000282D */ daddu $a1, $zero, $zero
|
||||
/* 17FF68 80251688 080945B3 */ j .L802516CC
|
||||
/* 17FF6C 8025168C 24020008 */ addiu $v0, $zero, 8
|
||||
.L80251690:
|
||||
/* 17FF70 80251690 8E620188 */ lw $v0, 0x188($s3)
|
||||
/* 17FF74 80251694 30420080 */ andi $v0, $v0, 0x80
|
||||
/* 17FF78 80251698 1040000B */ beqz $v0, .L802516C8
|
||||
/* 17FF7C 8025169C 30820010 */ andi $v0, $a0, 0x10
|
||||
/* 17FF80 802516A0 10400009 */ beqz $v0, .L802516C8
|
||||
/* 17FF84 802516A4 240400E9 */ addiu $a0, $zero, 0xe9
|
||||
/* 17FF88 802516A8 C6200014 */ lwc1 $f0, 0x14($s1)
|
||||
/* 17FF8C 802516AC E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 17FF90 802516B0 8E26000C */ lw $a2, 0xc($s1)
|
||||
/* 17FF94 802516B4 8E270010 */ lw $a3, 0x10($s1)
|
||||
/* 17FF98 802516B8 0C052757 */ jal play_sound_at_position
|
||||
/* 17FF9C 802516BC 0000282D */ daddu $a1, $zero, $zero
|
||||
/* 17FFA0 802516C0 080945B3 */ j .L802516CC
|
||||
/* 17FFA4 802516C4 24020004 */ addiu $v0, $zero, 4
|
||||
.L802516C8:
|
||||
/* 17FFA8 802516C8 0000102D */ daddu $v0, $zero, $zero
|
||||
.L802516CC:
|
||||
/* 17FFAC 802516CC 8FBF0028 */ lw $ra, 0x28($sp)
|
||||
/* 17FFB0 802516D0 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 17FFB4 802516D4 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 17FFB8 802516D8 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 17FFBC 802516DC 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 17FFC0 802516E0 03E00008 */ jr $ra
|
||||
/* 17FFC4 802516E4 27BD0030 */ addiu $sp, $sp, 0x30
|
@ -1,147 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80252B3C
|
||||
/* 18141C 80252B3C 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 181420 80252B40 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 181424 80252B44 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 181428 80252B48 AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* 18142C 80252B4C AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 181430 80252B50 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 181434 80252B54 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 181438 80252B58 8E50000C */ lw $s0, 0xc($s2)
|
||||
/* 18143C 80252B5C 3C11800E */ lui $s1, %hi(gBattleStatus)
|
||||
/* 181440 80252B60 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus)
|
||||
/* 181444 80252B64 8E130000 */ lw $s3, ($s0)
|
||||
/* 181448 80252B68 26100004 */ addiu $s0, $s0, 4
|
||||
/* 18144C 80252B6C 8E020000 */ lw $v0, ($s0)
|
||||
/* 181450 80252B70 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181454 80252B74 AE20018C */ sw $zero, 0x18c($s1)
|
||||
/* 181458 80252B78 AE220188 */ sw $v0, 0x188($s1)
|
||||
/* 18145C 80252B7C 8E050000 */ lw $a1, ($s0)
|
||||
/* 181460 80252B80 0C0B1EAF */ jal get_variable
|
||||
/* 181464 80252B84 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181468 80252B88 AE220190 */ sw $v0, 0x190($s1)
|
||||
/* 18146C 80252B8C 8E050000 */ lw $a1, ($s0)
|
||||
/* 181470 80252B90 26100004 */ addiu $s0, $s0, 4
|
||||
/* 181474 80252B94 0C0B1EAF */ jal get_variable
|
||||
/* 181478 80252B98 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 18147C 80252B9C A622017E */ sh $v0, 0x17e($s1)
|
||||
/* 181480 80252BA0 8E100000 */ lw $s0, ($s0)
|
||||
/* 181484 80252BA4 24020030 */ addiu $v0, $zero, 0x30
|
||||
/* 181488 80252BA8 32030030 */ andi $v1, $s0, 0x30
|
||||
/* 18148C 80252BAC 54620004 */ bnel $v1, $v0, .L80252BC0
|
||||
/* 181490 80252BB0 32020010 */ andi $v0, $s0, 0x10
|
||||
/* 181494 80252BB4 8E220000 */ lw $v0, ($s1)
|
||||
/* 181498 80252BB8 08094B00 */ j .L80252C00
|
||||
/* 18149C 80252BBC 34420030 */ ori $v0, $v0, 0x30
|
||||
.L80252BC0:
|
||||
/* 1814A0 80252BC0 10400004 */ beqz $v0, .L80252BD4
|
||||
/* 1814A4 80252BC4 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
/* 1814A8 80252BC8 8E220000 */ lw $v0, ($s1)
|
||||
/* 1814AC 80252BCC 08094AFF */ j .L80252BFC
|
||||
/* 1814B0 80252BD0 34420010 */ ori $v0, $v0, 0x10
|
||||
.L80252BD4:
|
||||
/* 1814B4 80252BD4 32020020 */ andi $v0, $s0, 0x20
|
||||
/* 1814B8 80252BD8 10400005 */ beqz $v0, .L80252BF0
|
||||
/* 1814BC 80252BDC 2403FFEF */ addiu $v1, $zero, -0x11
|
||||
/* 1814C0 80252BE0 8E220000 */ lw $v0, ($s1)
|
||||
/* 1814C4 80252BE4 00431024 */ and $v0, $v0, $v1
|
||||
/* 1814C8 80252BE8 08094B00 */ j .L80252C00
|
||||
/* 1814CC 80252BEC 34420020 */ ori $v0, $v0, 0x20
|
||||
.L80252BF0:
|
||||
/* 1814D0 80252BF0 8E220000 */ lw $v0, ($s1)
|
||||
/* 1814D4 80252BF4 00431024 */ and $v0, $v0, $v1
|
||||
/* 1814D8 80252BF8 2403FFDF */ addiu $v1, $zero, -0x21
|
||||
.L80252BFC:
|
||||
/* 1814DC 80252BFC 00431024 */ and $v0, $v0, $v1
|
||||
.L80252C00:
|
||||
/* 1814E0 80252C00 AE220000 */ sw $v0, ($s1)
|
||||
/* 1814E4 80252C04 32020040 */ andi $v0, $s0, 0x40
|
||||
/* 1814E8 80252C08 10400007 */ beqz $v0, .L80252C28
|
||||
/* 1814EC 80252C0C 2404FFBF */ addiu $a0, $zero, -0x41
|
||||
/* 1814F0 80252C10 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 1814F4 80252C14 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 1814F8 80252C18 8C620000 */ lw $v0, ($v1)
|
||||
/* 1814FC 80252C1C 34420040 */ ori $v0, $v0, 0x40
|
||||
/* 181500 80252C20 08094B0F */ j .L80252C3C
|
||||
/* 181504 80252C24 AC620000 */ sw $v0, ($v1)
|
||||
.L80252C28:
|
||||
/* 181508 80252C28 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 18150C 80252C2C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 181510 80252C30 8C430000 */ lw $v1, ($v0)
|
||||
/* 181514 80252C34 00641824 */ and $v1, $v1, $a0
|
||||
/* 181518 80252C38 AC430000 */ sw $v1, ($v0)
|
||||
.L80252C3C:
|
||||
/* 18151C 80252C3C 32020200 */ andi $v0, $s0, 0x200
|
||||
/* 181520 80252C40 10400007 */ beqz $v0, .L80252C60
|
||||
/* 181524 80252C44 2404FDFF */ addiu $a0, $zero, -0x201
|
||||
/* 181528 80252C48 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 18152C 80252C4C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 181530 80252C50 8C620000 */ lw $v0, ($v1)
|
||||
/* 181534 80252C54 34420200 */ ori $v0, $v0, 0x200
|
||||
/* 181538 80252C58 08094B1D */ j .L80252C74
|
||||
/* 18153C 80252C5C AC620000 */ sw $v0, ($v1)
|
||||
.L80252C60:
|
||||
/* 181540 80252C60 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 181544 80252C64 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 181548 80252C68 8C430000 */ lw $v1, ($v0)
|
||||
/* 18154C 80252C6C 00641824 */ and $v1, $v1, $a0
|
||||
/* 181550 80252C70 AC430000 */ sw $v1, ($v0)
|
||||
.L80252C74:
|
||||
/* 181554 80252C74 32020080 */ andi $v0, $s0, 0x80
|
||||
/* 181558 80252C78 10400007 */ beqz $v0, .L80252C98
|
||||
/* 18155C 80252C7C 2404FF7F */ addiu $a0, $zero, -0x81
|
||||
/* 181560 80252C80 3C03800E */ lui $v1, %hi(gBattleStatus)
|
||||
/* 181564 80252C84 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
|
||||
/* 181568 80252C88 8C620000 */ lw $v0, ($v1)
|
||||
/* 18156C 80252C8C 34420080 */ ori $v0, $v0, 0x80
|
||||
/* 181570 80252C90 08094B2B */ j .L80252CAC
|
||||
/* 181574 80252C94 AC620000 */ sw $v0, ($v1)
|
||||
.L80252C98:
|
||||
/* 181578 80252C98 3C02800E */ lui $v0, %hi(gBattleStatus)
|
||||
/* 18157C 80252C9C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
|
||||
/* 181580 80252CA0 8C430000 */ lw $v1, ($v0)
|
||||
/* 181584 80252CA4 00641824 */ and $v1, $v1, $a0
|
||||
/* 181588 80252CA8 AC430000 */ sw $v1, ($v0)
|
||||
.L80252CAC:
|
||||
/* 18158C 80252CAC 0C09A75B */ jal get_actor
|
||||
/* 181590 80252CB0 8E440148 */ lw $a0, 0x148($s2)
|
||||
/* 181594 80252CB4 94430428 */ lhu $v1, 0x428($v0)
|
||||
/* 181598 80252CB8 A62301A0 */ sh $v1, 0x1a0($s1)
|
||||
/* 18159C 80252CBC 92230193 */ lbu $v1, 0x193($s1)
|
||||
/* 1815A0 80252CC0 90420426 */ lbu $v0, 0x426($v0)
|
||||
/* 1815A4 80252CC4 A2230194 */ sb $v1, 0x194($s1)
|
||||
/* 1815A8 80252CC8 306300FF */ andi $v1, $v1, 0xff
|
||||
/* 1815AC 80252CCC A22201A2 */ sb $v0, 0x1a2($s1)
|
||||
/* 1815B0 80252CD0 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 1815B4 80252CD4 50620001 */ beql $v1, $v0, .L80252CDC
|
||||
/* 1815B8 80252CD8 A2200194 */ sb $zero, 0x194($s1)
|
||||
.L80252CDC:
|
||||
/* 1815BC 80252CDC 8E220190 */ lw $v0, 0x190($s1)
|
||||
/* 1815C0 80252CE0 30420F00 */ andi $v0, $v0, 0xf00
|
||||
/* 1815C4 80252CE4 00021203 */ sra $v0, $v0, 8
|
||||
/* 1815C8 80252CE8 0C0945BA */ jal calc_item_damage_enemy
|
||||
/* 1815CC 80252CEC A2220195 */ sb $v0, 0x195($s1)
|
||||
/* 1815D0 80252CF0 0440000B */ bltz $v0, .L80252D20
|
||||
/* 1815D4 80252CF4 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1815D8 80252CF8 0260282D */ daddu $a1, $s3, $zero
|
||||
/* 1815DC 80252CFC 0C0B2026 */ jal set_variable
|
||||
/* 1815E0 80252D00 0040302D */ daddu $a2, $v0, $zero
|
||||
/* 1815E4 80252D04 0C0B1069 */ jal does_script_exist_by_ref
|
||||
/* 1815E8 80252D08 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 1815EC 80252D0C 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 1815F0 80252D10 10600004 */ beqz $v1, .L80252D24
|
||||
/* 1815F4 80252D14 240200FF */ addiu $v0, $zero, 0xff
|
||||
/* 1815F8 80252D18 08094B49 */ j .L80252D24
|
||||
/* 1815FC 80252D1C 24020002 */ addiu $v0, $zero, 2
|
||||
.L80252D20:
|
||||
/* 181600 80252D20 240200FF */ addiu $v0, $zero, 0xff
|
||||
.L80252D24:
|
||||
/* 181604 80252D24 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* 181608 80252D28 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 18160C 80252D2C 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 181610 80252D30 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 181614 80252D34 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 181618 80252D38 03E00008 */ jr $ra
|
||||
/* 18161C 80252D3C 27BD0028 */ addiu $sp, $sp, 0x28
|
@ -1,15 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80253FB0
|
||||
/* 182890 80253FB0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 182894 80253FB4 24020003 */ addiu $v0, $zero, 3
|
||||
/* 182898 80253FB8 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 18289C 80253FBC 3C01800B */ lui $at, %hi(gCurrentEncounter+0x9)
|
||||
/* 1828A0 80253FC0 A0220F19 */ sb $v0, %lo(gCurrentEncounter+0x9)($at)
|
||||
/* 1828A4 80253FC4 0C090464 */ jal func_80241190
|
||||
/* 1828A8 80253FC8 24040020 */ addiu $a0, $zero, 0x20
|
||||
/* 1828AC 80253FCC 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 1828B0 80253FD0 24020002 */ addiu $v0, $zero, 2
|
||||
/* 1828B4 80253FD4 03E00008 */ jr $ra
|
||||
/* 1828B8 80253FD8 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1203,9 +1203,7 @@ typedef struct Actor {
|
||||
/* 0x000 */ s32 flags;
|
||||
/* 0x004 */ char unk_04[4];
|
||||
/* 0x008 */ struct StaticActorData* staticActorData;
|
||||
/* 0x00C */ Vec3f moveCurrentPos;
|
||||
/* 0x018 */ Vec3f moveGoalPos;
|
||||
/* 0x024 */ Vec3f moveEndPos; /* where other actors should target this one at. saved before partner switching */
|
||||
/* 0x00C */ Vec3f movePos[3]; // current, goal, end
|
||||
/* 0x030 */ char unk_30[24];
|
||||
/* 0x048 */ f32 jumpAccel;
|
||||
/* 0x04C */ f32 moveSpeed;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#define PANIC() ASSERT(0)
|
||||
#define STATIC_ASSERT(condition) enum { static_assert_fail = 1/(!!(condition)) } // Causes division by zero ("not integer constant") if false
|
||||
|
||||
#define BATTLE_STATUS (&gBattleStatus)
|
||||
#define GAME_STATUS (*gGameStatusPtr)
|
||||
#define PLAYER_STATUS (&gPlayerStatus)
|
||||
#define PLAYER_DATA (&gPlayerData)
|
||||
|
@ -50,7 +50,10 @@ INCLUDE_ASM(s32, "code_16F740", func_802439D8);
|
||||
void func_80243FD4(void) {
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_16F740", func_80243FDC);
|
||||
void func_80243FDC(void) {
|
||||
func_8024E40C(2);
|
||||
func_80241190(12);
|
||||
}
|
||||
|
||||
void func_80244000(void) {
|
||||
}
|
||||
@ -84,9 +87,15 @@ INCLUDE_ASM(s32, "code_16F740", func_80245440);
|
||||
void func_802456B0(void) {
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_16F740", EnablePartnerBlur);
|
||||
ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
|
||||
enable_partner_blur();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_16F740", DisablePartnerBlur);
|
||||
ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
|
||||
disable_partner_blur();
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_16F740", update_swap_partner);
|
||||
|
||||
|
@ -52,9 +52,17 @@ INCLUDE_ASM(s32, "code_17D6A0", ShowMessageBox);
|
||||
|
||||
INCLUDE_ASM(s32, "code_17D6A0", ShowVariableMessageBox);
|
||||
|
||||
INCLUDE_ASM(s32, "code_17D6A0", IsMessageBoxDisplayed);
|
||||
ApiStatus IsMessageBoxDisplayed(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 outVar = *args++;
|
||||
|
||||
INCLUDE_ASM(s32, "code_17D6A0", WaitForMessageBoxDone);
|
||||
set_variable(script, outVar, is_popup_displayed());
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus WaitForMessageBoxDone(ScriptInstance* script, s32 isInitialCall) {
|
||||
return !is_popup_displayed() * ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_17D6A0", ForceCloseMessageBox);
|
||||
|
||||
|
@ -1,13 +1,306 @@
|
||||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(s32, "code_17FEB0", calc_item_check_hit);
|
||||
HitResult calc_item_check_hit(void) {
|
||||
BattleStatus* battleStatus = BATTLE_STATUS;
|
||||
f32* pos = &battleStatus->playerActor->movePos;
|
||||
s32 actorID = battleStatus->currentTargetID;
|
||||
s8 currentTargetPartS8;
|
||||
u32 currentTargetPart;
|
||||
Actor* actor;
|
||||
ActorPart* actorPart;
|
||||
|
||||
currentTargetPart = currentTargetPartS8 = battleStatus->currentTargetPart;
|
||||
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
|
||||
battleStatus->currentTargetPart2 = currentTargetPartS8;
|
||||
|
||||
actor = get_actor(actorID);
|
||||
if (actor != NULL) {
|
||||
actorPart = get_actor_part(actor, currentTargetPart);
|
||||
ASSERT(actorPart != NULL);
|
||||
|
||||
if (!(actorPart->eventFlags & 0x20)) {
|
||||
if (actor->transStatus == 0xE) {
|
||||
return HitResult_MISS;
|
||||
}
|
||||
if (actor->stoneStatus == 0xC) {
|
||||
play_sound_at_position(0x10C, 0, pos[3], pos[4], pos[5]);
|
||||
return HitResult_IMMUNE;
|
||||
}
|
||||
if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) {
|
||||
play_sound_at_position(0xE9, 0, pos[3], pos[4], pos[5]);
|
||||
return HitResult_LANDED_ON_SPIKE;
|
||||
}
|
||||
} else {
|
||||
return HitResult_MISS;
|
||||
}
|
||||
}
|
||||
return HitResult_HIT;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_17FEB0", calc_item_damage_enemy);
|
||||
|
||||
INCLUDE_ASM(s32, "code_17FEB0", ItemDamageEnemy);
|
||||
ApiStatus ItemDamageEnemy(ScriptInstance* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemDamageOut = *args++;
|
||||
s32 a5;
|
||||
Actor* actor;
|
||||
s32 itemDamage;
|
||||
s32 flag = 0x10;
|
||||
|
||||
INCLUDE_ASM(s32, "code_17FEB0", ItemAfflictEnemy);
|
||||
battleStatus->currentAttackElement = *args++;
|
||||
battleStatus->currentAttackEventSuppression = 0;
|
||||
battleStatus->currentAttackStatus = *args++;
|
||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
||||
a5 = *args++;
|
||||
|
||||
INCLUDE_ASM(s32, "code_17FEB0", func_80252B3C);
|
||||
if ((a5 & 0x30) == 0x30) {
|
||||
battleStatus->flags1 |= 0x30;
|
||||
} else if (a5 & flag) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 | flag) & ~0x20;
|
||||
} else if (a5 & 0x20) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) | 0x20;
|
||||
} else {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) & ~0x20;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_17FEB0", ItemCheckHit);
|
||||
if (a5 & 0x40) {
|
||||
BATTLE_STATUS->flags1 |= 0x40;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x40;
|
||||
}
|
||||
|
||||
if (a5 & 0x200) {
|
||||
BATTLE_STATUS->flags1 |= 0x200;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x200;
|
||||
}
|
||||
|
||||
if (a5 & 0x80) {
|
||||
BATTLE_STATUS->flags1 |= 0x80;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x80;
|
||||
}
|
||||
|
||||
actor = get_actor(script->owner1.actorID);
|
||||
battleStatus->currentTargetID = actor->targetActorID;
|
||||
battleStatus->currentTargetPart = actor->targetPartIndex;
|
||||
battleStatus->statusChance = battleStatus->currentAttackStatus;
|
||||
|
||||
if ((battleStatus->statusChance & 0xFF) == 0xFF) {
|
||||
battleStatus->statusChance = 0;
|
||||
}
|
||||
|
||||
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
|
||||
|
||||
itemDamage = calc_item_damage_enemy();
|
||||
if (itemDamage < 0) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
set_variable(script, itemDamageOut, itemDamage);
|
||||
if (!does_script_exist_by_ref(script)) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ItemAfflictEnemy(ScriptInstance* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemDamageOut = *args++;
|
||||
s32 a5;
|
||||
Actor* actor;
|
||||
s32 itemDamage;
|
||||
s32 flag = 0x10;
|
||||
|
||||
battleStatus->currentAttackElement = *args++;
|
||||
battleStatus->currentAttackEventSuppression = 0;
|
||||
battleStatus->currentAttackStatus = *args++;
|
||||
battleStatus->currentAttackStatus |= get_variable(script, *args++);
|
||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
||||
a5 = *args++;
|
||||
|
||||
if ((a5 & 0x30) == 0x30) {
|
||||
battleStatus->flags1 |= 0x30;
|
||||
} else if (a5 & flag) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 | flag) & ~0x20;
|
||||
} else if (a5 & 0x20) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) | 0x20;
|
||||
} else {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) & ~0x20;
|
||||
}
|
||||
|
||||
if (a5 & 0x40) {
|
||||
BATTLE_STATUS->flags1 |= 0x40;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x40;
|
||||
}
|
||||
|
||||
if (a5 & 0x200) {
|
||||
BATTLE_STATUS->flags1 |= 0x200;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x200;
|
||||
}
|
||||
|
||||
if (a5 & 0x80) {
|
||||
BATTLE_STATUS->flags1 |= 0x80;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x80;
|
||||
}
|
||||
|
||||
actor = get_actor(script->owner1.actorID);
|
||||
battleStatus->currentTargetID = actor->targetActorID;
|
||||
battleStatus->currentTargetPart = actor->targetPartIndex;
|
||||
battleStatus->statusChance = battleStatus->currentAttackStatus;
|
||||
|
||||
if ((battleStatus->statusChance & 0xFF) == 0xFF) {
|
||||
battleStatus->statusChance = 0;
|
||||
}
|
||||
|
||||
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
|
||||
|
||||
itemDamage = calc_item_damage_enemy();
|
||||
if (itemDamage < 0) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
set_variable(script, itemDamageOut, itemDamage);
|
||||
if (!does_script_exist_by_ref(script)) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_80252B3C(ScriptInstance* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemDamageOut = *args++;
|
||||
s32 a5;
|
||||
Actor* actor;
|
||||
s32 itemDamage;
|
||||
s32 flag = 0x10;
|
||||
|
||||
battleStatus->currentAttackElement = *args++;
|
||||
battleStatus->currentAttackEventSuppression = 0;
|
||||
battleStatus->currentAttackStatus = get_variable(script, *args++);
|
||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
||||
a5 = *args++;
|
||||
|
||||
if ((a5 & 0x30) == 0x30) {
|
||||
battleStatus->flags1 |= 0x30;
|
||||
} else if (a5 & flag) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 | flag) & ~0x20;
|
||||
} else if (a5 & 0x20) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) | 0x20;
|
||||
} else {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) & ~0x20;
|
||||
}
|
||||
|
||||
if (a5 & 0x40) {
|
||||
BATTLE_STATUS->flags1 |= 0x40;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x40;
|
||||
}
|
||||
|
||||
if (a5 & 0x200) {
|
||||
BATTLE_STATUS->flags1 |= 0x200;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x200;
|
||||
}
|
||||
|
||||
if (a5 & 0x80) {
|
||||
BATTLE_STATUS->flags1 |= 0x80;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x80;
|
||||
}
|
||||
|
||||
actor = get_actor(script->owner1.actorID);
|
||||
battleStatus->currentTargetID = actor->targetActorID;
|
||||
battleStatus->currentTargetPart = actor->targetPartIndex;
|
||||
battleStatus->statusChance = battleStatus->currentAttackStatus;
|
||||
|
||||
if ((battleStatus->statusChance & 0xFF) == 0xFF) {
|
||||
battleStatus->statusChance = 0;
|
||||
}
|
||||
|
||||
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
|
||||
|
||||
itemDamage = calc_item_damage_enemy();
|
||||
if (itemDamage < 0) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
set_variable(script, itemDamageOut, itemDamage);
|
||||
if (!does_script_exist_by_ref(script)) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus ItemCheckHit(ScriptInstance* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 itemDamageOut = *args++;
|
||||
s32 a5;
|
||||
Actor* actor;
|
||||
s32 itemDamage;
|
||||
s32 flag = 0x10;
|
||||
|
||||
battleStatus->currentAttackElement = *args++;
|
||||
battleStatus->currentAttackEventSuppression = 0;
|
||||
battleStatus->currentAttackStatus = *args++;
|
||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
||||
a5 = *args++;
|
||||
|
||||
if ((a5 & 0x30) == 0x30) {
|
||||
battleStatus->flags1 |= 0x30;
|
||||
} else if (a5 & flag) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 | flag) & ~0x20;
|
||||
} else if (a5 & 0x20) {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) | 0x20;
|
||||
} else {
|
||||
battleStatus->flags1 = (battleStatus->flags1 & ~flag) & ~0x20;
|
||||
}
|
||||
|
||||
if (a5 & 0x40) {
|
||||
BATTLE_STATUS->flags1 |= 0x40;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x40;
|
||||
}
|
||||
|
||||
if (a5 & 0x200) {
|
||||
BATTLE_STATUS->flags1 |= 0x200;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x200;
|
||||
}
|
||||
|
||||
if (a5 & 0x80) {
|
||||
BATTLE_STATUS->flags1 |= 0x80;
|
||||
} else {
|
||||
BATTLE_STATUS->flags1 &= ~0x80;
|
||||
}
|
||||
|
||||
actor = get_actor(script->owner1.actorID);
|
||||
battleStatus->currentTargetID = actor->targetActorID;
|
||||
battleStatus->currentTargetPart = actor->targetPartIndex;
|
||||
battleStatus->statusChance = battleStatus->currentAttackStatus;
|
||||
|
||||
if ((battleStatus->statusChance & 0xFF) == 0xFF) {
|
||||
battleStatus->statusChance = 0;
|
||||
}
|
||||
|
||||
battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;
|
||||
|
||||
itemDamage = calc_item_check_hit();
|
||||
if (itemDamage < 0) {
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
set_variable(script, itemDamageOut, itemDamage);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -198,7 +198,12 @@ INCLUDE_ASM(s32, "code_181810", save_tattle_flags);
|
||||
|
||||
INCLUDE_ASM(s32, "code_181810", load_tattle_flags);
|
||||
|
||||
INCLUDE_ASM(s32, "code_181810", func_80253FB0);
|
||||
ApiStatus func_80253FB0(ScriptInstance* script, s32 isInitialCall) {
|
||||
gCurrentEncounter.battleOutcome = 3;
|
||||
func_80241190(0x20);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus MultiplyByActorScale(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
6160
tools/splat.yaml
6160
tools/splat.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user