merge master

This commit is contained in:
dark-samus 2020-11-21 02:45:11 -05:00
commit 48487dbab0
49 changed files with 3805 additions and 4678 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,71 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel delete_player_actor
/* 16F648 80240D68 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 16F64C 80240D6C AFB10014 */ sw $s1, 0x14($sp)
/* 16F650 80240D70 0080882D */ daddu $s1, $a0, $zero
/* 16F654 80240D74 AFB00010 */ sw $s0, 0x10($sp)
/* 16F658 80240D78 0000802D */ daddu $s0, $zero, $zero
/* 16F65C 80240D7C AFBF0020 */ sw $ra, 0x20($sp)
/* 16F660 80240D80 AFB3001C */ sw $s3, 0x1c($sp)
/* 16F664 80240D84 AFB20018 */ sw $s2, 0x18($sp)
/* 16F668 80240D88 0220202D */ daddu $a0, $s1, $zero
.L80240D8C:
/* 16F66C 80240D8C 0C099C8D */ jal remove_actor_decoration
/* 16F670 80240D90 0200282D */ daddu $a1, $s0, $zero
/* 16F674 80240D94 26100001 */ addiu $s0, $s0, 1
/* 16F678 80240D98 2A020002 */ slti $v0, $s0, 2
/* 16F67C 80240D9C 1440FFFB */ bnez $v0, .L80240D8C
/* 16F680 80240DA0 0220202D */ daddu $a0, $s1, $zero
/* 16F684 80240DA4 8E2201D0 */ lw $v0, 0x1d0($s1)
/* 16F688 80240DA8 10400003 */ beqz $v0, .L80240DB8
/* 16F68C 80240DAC 00000000 */ nop
/* 16F690 80240DB0 0C0B102B */ jal kill_script_by_ID
/* 16F694 80240DB4 8E2401E0 */ lw $a0, 0x1e0($s1)
.L80240DB8:
/* 16F698 80240DB8 8E2201D8 */ lw $v0, 0x1d8($s1)
/* 16F69C 80240DBC 10400003 */ beqz $v0, .L80240DCC
/* 16F6A0 80240DC0 00000000 */ nop
/* 16F6A4 80240DC4 0C0B102B */ jal kill_script_by_ID
/* 16F6A8 80240DC8 8E2401E8 */ lw $a0, 0x1e8($s1)
.L80240DCC:
/* 16F6AC 80240DCC 8E2201D4 */ lw $v0, 0x1d4($s1)
/* 16F6B0 80240DD0 10400003 */ beqz $v0, .L80240DE0
/* 16F6B4 80240DD4 00000000 */ nop
/* 16F6B8 80240DD8 0C0B102B */ jal kill_script_by_ID
/* 16F6BC 80240DDC 8E2401E4 */ lw $a0, 0x1e4($s1)
.L80240DE0:
/* 16F6C0 80240DE0 8E3001F4 */ lw $s0, 0x1f4($s1)
/* 16F6C4 80240DE4 8E24042C */ lw $a0, 0x42c($s1)
/* 16F6C8 80240DE8 8E1300C0 */ lw $s3, 0xc0($s0)
/* 16F6CC 80240DEC 0C0448CA */ jal func_80112328
/* 16F6D0 80240DF0 8E120010 */ lw $s2, 0x10($s0)
/* 16F6D4 80240DF4 0C011DBD */ jal func_800476F4
/* 16F6D8 80240DF8 86240436 */ lh $a0, 0x436($s1)
/* 16F6DC 80240DFC 0C016914 */ jal remove_effect
/* 16F6E0 80240E00 8E240440 */ lw $a0, 0x440($s1)
/* 16F6E4 80240E04 8E220200 */ lw $v0, 0x200($s1)
/* 16F6E8 80240E08 10400003 */ beqz $v0, .L80240E18
/* 16F6EC 80240E0C 00000000 */ nop
/* 16F6F0 80240E10 8C42000C */ lw $v0, 0xc($v0)
/* 16F6F4 80240E14 AC400024 */ sw $zero, 0x24($v0)
.L80240E18:
/* 16F6F8 80240E18 0C00AB4B */ jal heap_free
/* 16F6FC 80240E1C 0240202D */ daddu $a0, $s2, $zero
/* 16F700 80240E20 0C00AB4B */ jal heap_free
/* 16F704 80240E24 0260202D */ daddu $a0, $s3, $zero
/* 16F708 80240E28 0C00AB4B */ jal heap_free
/* 16F70C 80240E2C 0200202D */ daddu $a0, $s0, $zero
/* 16F710 80240E30 0C00AB4B */ jal heap_free
/* 16F714 80240E34 0220202D */ daddu $a0, $s1, $zero
/* 16F718 80240E38 8FBF0020 */ lw $ra, 0x20($sp)
/* 16F71C 80240E3C 8FB3001C */ lw $s3, 0x1c($sp)
/* 16F720 80240E40 8FB20018 */ lw $s2, 0x18($sp)
/* 16F724 80240E44 8FB10014 */ lw $s1, 0x14($sp)
/* 16F728 80240E48 8FB00010 */ lw $s0, 0x10($sp)
/* 16F72C 80240E4C 03E00008 */ jr $ra
/* 16F730 80240E50 27BD0028 */ addiu $sp, $sp, 0x28
/* 16F734 80240E54 00000000 */ nop
/* 16F738 80240E58 00000000 */ nop
/* 16F73C 80240E5C 00000000 */ nop

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8023FF84
/* 16E864 8023FF84 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 16E868 8023FF88 AFBF0010 */ sw $ra, 0x10($sp)
/* 16E86C 8023FF8C 0C099F12 */ jal show_foreground_models_unsafe
/* 16E870 8023FF90 00000000 */ nop
/* 16E874 8023FF94 8FBF0010 */ lw $ra, 0x10($sp)
/* 16E878 8023FF98 03E00008 */ jr $ra
/* 16E87C 8023FF9C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,74 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_dpad_input_radial
/* 16C8E0 8023E000 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 16C8E4 8023E004 AFB00010 */ sw $s0, 0x10($sp)
/* 16C8E8 8023E008 0080802D */ daddu $s0, $a0, $zero
/* 16C8EC 8023E00C AFB10014 */ sw $s1, 0x14($sp)
/* 16C8F0 8023E010 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 16C8F4 8023E014 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 16C8F8 8023E018 AFBF0018 */ sw $ra, 0x18($sp)
/* 16C8FC 8023E01C F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 16C900 8023E020 F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 16C904 8023E024 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 16C908 8023E028 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 16C90C 8023E02C F7B40020 */ sdc1 $f20, 0x20($sp)
/* 16C910 8023E030 C456021C */ lwc1 $f22, 0x21c($v0)
/* 16C914 8023E034 4680B5A0 */ cvt.s.w $f22, $f22
/* 16C918 8023E038 C4400220 */ lwc1 $f0, 0x220($v0)
/* 16C91C 8023E03C 46800020 */ cvt.s.w $f0, $f0
/* 16C920 8023E040 94430212 */ lhu $v1, 0x212($v0)
/* 16C924 8023E044 3C014270 */ lui $at, 0x4270
/* 16C928 8023E048 4481D000 */ mtc1 $at, $f26
/* 16C92C 8023E04C 30620F00 */ andi $v0, $v1, 0xf00
/* 16C930 8023E050 1040000F */ beqz $v0, .L8023E090
/* 16C934 8023E054 00A0882D */ daddu $s1, $a1, $zero
/* 16C938 8023E058 4480B000 */ mtc1 $zero, $f22
/* 16C93C 8023E05C 30620800 */ andi $v0, $v1, 0x800
/* 16C940 8023E060 10400002 */ beqz $v0, .L8023E06C
/* 16C944 8023E064 4600B006 */ mov.s $f0, $f22
/* 16C948 8023E068 4600D006 */ mov.s $f0, $f26
.L8023E06C:
/* 16C94C 8023E06C 30620400 */ andi $v0, $v1, 0x400
/* 16C950 8023E070 54400001 */ bnel $v0, $zero, .L8023E078
/* 16C954 8023E074 4600D007 */ neg.s $f0, $f26
.L8023E078:
/* 16C958 8023E078 30620200 */ andi $v0, $v1, 0x200
/* 16C95C 8023E07C 54400001 */ bnel $v0, $zero, .L8023E084
/* 16C960 8023E080 4600D587 */ neg.s $f22, $f26
.L8023E084:
/* 16C964 8023E084 30620100 */ andi $v0, $v1, 0x100
/* 16C968 8023E088 54400001 */ bnel $v0, $zero, .L8023E090
/* 16C96C 8023E08C 4600D586 */ mov.s $f22, $f26
.L8023E090:
/* 16C970 8023E090 4406B000 */ mfc1 $a2, $f22
/* 16C974 8023E094 4480C000 */ mtc1 $zero, $f24
/* 16C978 8023E098 46000707 */ neg.s $f28, $f0
/* 16C97C 8023E09C 4407E000 */ mfc1 $a3, $f28
/* 16C980 8023E0A0 4600C306 */ mov.s $f12, $f24
/* 16C984 8023E0A4 0C00A7B5 */ jal dist2D
/* 16C988 8023E0A8 4600C386 */ mov.s $f14, $f24
/* 16C98C 8023E0AC 46000506 */ mov.s $f20, $f0
/* 16C990 8023E0B0 4614D03E */ c.le.s $f26, $f20
/* 16C994 8023E0B4 00000000 */ nop
/* 16C998 8023E0B8 45030001 */ bc1tl .L8023E0C0
/* 16C99C 8023E0BC 4600D506 */ mov.s $f20, $f26
.L8023E0C0:
/* 16C9A0 8023E0C0 4600C306 */ mov.s $f12, $f24
/* 16C9A4 8023E0C4 4406B000 */ mfc1 $a2, $f22
/* 16C9A8 8023E0C8 4407E000 */ mfc1 $a3, $f28
/* 16C9AC 8023E0CC 0C00A720 */ jal atan2
/* 16C9B0 8023E0D0 46006386 */ mov.s $f14, $f12
/* 16C9B4 8023E0D4 E6000000 */ swc1 $f0, ($s0)
/* 16C9B8 8023E0D8 E6340000 */ swc1 $f20, ($s1)
/* 16C9BC 8023E0DC 8FBF0018 */ lw $ra, 0x18($sp)
/* 16C9C0 8023E0E0 8FB10014 */ lw $s1, 0x14($sp)
/* 16C9C4 8023E0E4 8FB00010 */ lw $s0, 0x10($sp)
/* 16C9C8 8023E0E8 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 16C9CC 8023E0EC D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 16C9D0 8023E0F0 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 16C9D4 8023E0F4 D7B60028 */ ldc1 $f22, 0x28($sp)
/* 16C9D8 8023E0F8 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 16C9DC 8023E0FC 03E00008 */ jr $ra
/* 16C9E0 8023E100 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -1,18 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel update_actor_shadows
/* 16CCE4 8023E404 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 16CCE8 8023E408 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0)
/* 16CCEC 8023E40C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 16CCF0 8023E410 30420001 */ andi $v0, $v0, 1
/* 16CCF4 8023E414 10400005 */ beqz $v0, .L8023E42C
/* 16CCF8 8023E418 AFBF0010 */ sw $ra, 0x10($sp)
/* 16CCFC 8023E41C 0C0957D7 */ jal update_enemy_shadows
/* 16CD00 8023E420 00000000 */ nop
/* 16CD04 8023E424 0C0957EB */ jal update_hero_shadows
/* 16CD08 8023E428 00000000 */ nop
.L8023E42C:
/* 16CD0C 8023E42C 8FBF0010 */ lw $ra, 0x10($sp)
/* 16CD10 8023E430 03E00008 */ jr $ra
/* 16CD14 8023E434 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,45 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel CountPlayerTargets
/* 198A2C 8026A14C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 198A30 8026A150 AFB10014 */ sw $s1, 0x14($sp)
/* 198A34 8026A154 0080882D */ daddu $s1, $a0, $zero
/* 198A38 8026A158 AFBF0020 */ sw $ra, 0x20($sp)
/* 198A3C 8026A15C AFB3001C */ sw $s3, 0x1c($sp)
/* 198A40 8026A160 AFB20018 */ sw $s2, 0x18($sp)
/* 198A44 8026A164 AFB00010 */ sw $s0, 0x10($sp)
/* 198A48 8026A168 8E30000C */ lw $s0, 0xc($s1)
/* 198A4C 8026A16C 8E050000 */ lw $a1, ($s0)
/* 198A50 8026A170 0C0B1EAF */ jal get_variable
/* 198A54 8026A174 26100004 */ addiu $s0, $s0, 4
/* 198A58 8026A178 0040202D */ daddu $a0, $v0, $zero
/* 198A5C 8026A17C 2402FF81 */ addiu $v0, $zero, -0x7f
/* 198A60 8026A180 8E120000 */ lw $s2, ($s0)
/* 198A64 8026A184 14820002 */ bne $a0, $v0, .L8026A190
/* 198A68 8026A188 8E130004 */ lw $s3, 4($s0)
/* 198A6C 8026A18C 8E240148 */ lw $a0, 0x148($s1)
.L8026A190:
/* 198A70 8026A190 0C09A75B */ jal get_actor
/* 198A74 8026A194 00000000 */ nop
/* 198A78 8026A198 0040802D */ daddu $s0, $v0, $zero
/* 198A7C 8026A19C 8E06014C */ lw $a2, 0x14c($s0)
/* 198A80 8026A1A0 C60C0144 */ lwc1 $f12, 0x144($s0)
/* 198A84 8026A1A4 0C09A5A6 */ jal get_nearest_home_index
/* 198A88 8026A1A8 C60E0148 */ lwc1 $f14, 0x148($s0)
/* 198A8C 8026A1AC 0200202D */ daddu $a0, $s0, $zero
/* 198A90 8026A1B0 0040282D */ daddu $a1, $v0, $zero
/* 198A94 8026A1B4 0C09A598 */ jal count_targets
/* 198A98 8026A1B8 0240302D */ daddu $a2, $s2, $zero
/* 198A9C 8026A1BC 0220202D */ daddu $a0, $s1, $zero
/* 198AA0 8026A1C0 0260282D */ daddu $a1, $s3, $zero
/* 198AA4 8026A1C4 0C0B2026 */ jal set_variable
/* 198AA8 8026A1C8 0040302D */ daddu $a2, $v0, $zero
/* 198AAC 8026A1CC 8FBF0020 */ lw $ra, 0x20($sp)
/* 198AB0 8026A1D0 8FB3001C */ lw $s3, 0x1c($sp)
/* 198AB4 8026A1D4 8FB20018 */ lw $s2, 0x18($sp)
/* 198AB8 8026A1D8 8FB10014 */ lw $s1, 0x14($sp)
/* 198ABC 8026A1DC 8FB00010 */ lw $s0, 0x10($sp)
/* 198AC0 8026A1E0 24020002 */ addiu $v0, $zero, 2
/* 198AC4 8026A1E4 03E00008 */ jr $ra
/* 198AC8 8026A1E8 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,62 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel ForceHomePos
/* 198ACC 8026A1EC 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 198AD0 8026A1F0 AFB20018 */ sw $s2, 0x18($sp)
/* 198AD4 8026A1F4 0080902D */ daddu $s2, $a0, $zero
/* 198AD8 8026A1F8 AFBF001C */ sw $ra, 0x1c($sp)
/* 198ADC 8026A1FC AFB10014 */ sw $s1, 0x14($sp)
/* 198AE0 8026A200 AFB00010 */ sw $s0, 0x10($sp)
/* 198AE4 8026A204 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 198AE8 8026A208 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 198AEC 8026A20C F7B40020 */ sdc1 $f20, 0x20($sp)
/* 198AF0 8026A210 8E50000C */ lw $s0, 0xc($s2)
/* 198AF4 8026A214 8E050000 */ lw $a1, ($s0)
/* 198AF8 8026A218 0C0B1EAF */ jal get_variable
/* 198AFC 8026A21C 26100004 */ addiu $s0, $s0, 4
/* 198B00 8026A220 0040882D */ daddu $s1, $v0, $zero
/* 198B04 8026A224 2402FF81 */ addiu $v0, $zero, -0x7f
/* 198B08 8026A228 16220002 */ bne $s1, $v0, .L8026A234
/* 198B0C 8026A22C 00000000 */ nop
/* 198B10 8026A230 8E510148 */ lw $s1, 0x148($s2)
.L8026A234:
/* 198B14 8026A234 8E050000 */ lw $a1, ($s0)
/* 198B18 8026A238 26100004 */ addiu $s0, $s0, 4
/* 198B1C 8026A23C 0C0B1EAF */ jal get_variable
/* 198B20 8026A240 0240202D */ daddu $a0, $s2, $zero
/* 198B24 8026A244 8E050000 */ lw $a1, ($s0)
/* 198B28 8026A248 26100004 */ addiu $s0, $s0, 4
/* 198B2C 8026A24C 4482C000 */ mtc1 $v0, $f24
/* 198B30 8026A250 00000000 */ nop
/* 198B34 8026A254 4680C620 */ cvt.s.w $f24, $f24
/* 198B38 8026A258 0C0B1EAF */ jal get_variable
/* 198B3C 8026A25C 0240202D */ daddu $a0, $s2, $zero
/* 198B40 8026A260 8E050000 */ lw $a1, ($s0)
/* 198B44 8026A264 4482B000 */ mtc1 $v0, $f22
/* 198B48 8026A268 00000000 */ nop
/* 198B4C 8026A26C 4680B5A0 */ cvt.s.w $f22, $f22
/* 198B50 8026A270 0C0B1EAF */ jal get_variable
/* 198B54 8026A274 0240202D */ daddu $a0, $s2, $zero
/* 198B58 8026A278 4482A000 */ mtc1 $v0, $f20
/* 198B5C 8026A27C 00000000 */ nop
/* 198B60 8026A280 4680A520 */ cvt.s.w $f20, $f20
/* 198B64 8026A284 0C09A75B */ jal get_actor
/* 198B68 8026A288 0220202D */ daddu $a0, $s1, $zero
/* 198B6C 8026A28C 0040182D */ daddu $v1, $v0, $zero
/* 198B70 8026A290 E4780138 */ swc1 $f24, 0x138($v1)
/* 198B74 8026A294 E4780144 */ swc1 $f24, 0x144($v1)
/* 198B78 8026A298 E476013C */ swc1 $f22, 0x13c($v1)
/* 198B7C 8026A29C E4760148 */ swc1 $f22, 0x148($v1)
/* 198B80 8026A2A0 E4740140 */ swc1 $f20, 0x140($v1)
/* 198B84 8026A2A4 E474014C */ swc1 $f20, 0x14c($v1)
/* 198B88 8026A2A8 8FBF001C */ lw $ra, 0x1c($sp)
/* 198B8C 8026A2AC 8FB20018 */ lw $s2, 0x18($sp)
/* 198B90 8026A2B0 8FB10014 */ lw $s1, 0x14($sp)
/* 198B94 8026A2B4 8FB00010 */ lw $s0, 0x10($sp)
/* 198B98 8026A2B8 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 198B9C 8026A2BC D7B60028 */ ldc1 $f22, 0x28($sp)
/* 198BA0 8026A2C0 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 198BA4 8026A2C4 24020002 */ addiu $v0, $zero, 2
/* 198BA8 8026A2C8 03E00008 */ jr $ra
/* 198BAC 8026A2CC 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,35 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetIndexFromHome
/* 1989B4 8026A0D4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 1989B8 8026A0D8 AFB10014 */ sw $s1, 0x14($sp)
/* 1989BC 8026A0DC 0080882D */ daddu $s1, $a0, $zero
/* 1989C0 8026A0E0 AFBF0018 */ sw $ra, 0x18($sp)
/* 1989C4 8026A0E4 AFB00010 */ sw $s0, 0x10($sp)
/* 1989C8 8026A0E8 8E30000C */ lw $s0, 0xc($s1)
/* 1989CC 8026A0EC 8E050000 */ lw $a1, ($s0)
/* 1989D0 8026A0F0 0C0B1EAF */ jal get_variable
/* 1989D4 8026A0F4 26100004 */ addiu $s0, $s0, 4
/* 1989D8 8026A0F8 0040202D */ daddu $a0, $v0, $zero
/* 1989DC 8026A0FC 2402FF81 */ addiu $v0, $zero, -0x7f
/* 1989E0 8026A100 14820002 */ bne $a0, $v0, .L8026A10C
/* 1989E4 8026A104 8E100000 */ lw $s0, ($s0)
/* 1989E8 8026A108 8E240148 */ lw $a0, 0x148($s1)
.L8026A10C:
/* 1989EC 8026A10C 0C09A75B */ jal get_actor
/* 1989F0 8026A110 00000000 */ nop
/* 1989F4 8026A114 8C460140 */ lw $a2, 0x140($v0)
/* 1989F8 8026A118 C44C0138 */ lwc1 $f12, 0x138($v0)
/* 1989FC 8026A11C 0C09A5A6 */ jal get_nearest_home_index
/* 198A00 8026A120 C44E013C */ lwc1 $f14, 0x13c($v0)
/* 198A04 8026A124 0220202D */ daddu $a0, $s1, $zero
/* 198A08 8026A128 0200282D */ daddu $a1, $s0, $zero
/* 198A0C 8026A12C 0C0B2026 */ jal set_variable
/* 198A10 8026A130 0040302D */ daddu $a2, $v0, $zero
/* 198A14 8026A134 8FBF0018 */ lw $ra, 0x18($sp)
/* 198A18 8026A138 8FB10014 */ lw $s1, 0x14($sp)
/* 198A1C 8026A13C 8FB00010 */ lw $s0, 0x10($sp)
/* 198A20 8026A140 24020002 */ addiu $v0, $zero, 2
/* 198A24 8026A144 03E00008 */ jr $ra
/* 198A28 8026A148 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,35 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetIndexFromPos
/* 19893C 8026A05C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 198940 8026A060 AFB10014 */ sw $s1, 0x14($sp)
/* 198944 8026A064 0080882D */ daddu $s1, $a0, $zero
/* 198948 8026A068 AFBF0018 */ sw $ra, 0x18($sp)
/* 19894C 8026A06C AFB00010 */ sw $s0, 0x10($sp)
/* 198950 8026A070 8E30000C */ lw $s0, 0xc($s1)
/* 198954 8026A074 8E050000 */ lw $a1, ($s0)
/* 198958 8026A078 0C0B1EAF */ jal get_variable
/* 19895C 8026A07C 26100004 */ addiu $s0, $s0, 4
/* 198960 8026A080 0040202D */ daddu $a0, $v0, $zero
/* 198964 8026A084 2402FF81 */ addiu $v0, $zero, -0x7f
/* 198968 8026A088 14820002 */ bne $a0, $v0, .L8026A094
/* 19896C 8026A08C 8E100000 */ lw $s0, ($s0)
/* 198970 8026A090 8E240148 */ lw $a0, 0x148($s1)
.L8026A094:
/* 198974 8026A094 0C09A75B */ jal get_actor
/* 198978 8026A098 00000000 */ nop
/* 19897C 8026A09C 8C46014C */ lw $a2, 0x14c($v0)
/* 198980 8026A0A0 C44C0144 */ lwc1 $f12, 0x144($v0)
/* 198984 8026A0A4 0C09A5A6 */ jal get_nearest_home_index
/* 198988 8026A0A8 C44E0148 */ lwc1 $f14, 0x148($v0)
/* 19898C 8026A0AC 0220202D */ daddu $a0, $s1, $zero
/* 198990 8026A0B0 0200282D */ daddu $a1, $s0, $zero
/* 198994 8026A0B4 0C0B2026 */ jal set_variable
/* 198998 8026A0B8 0040302D */ daddu $a2, $v0, $zero
/* 19899C 8026A0BC 8FBF0018 */ lw $ra, 0x18($sp)
/* 1989A0 8026A0C0 8FB10014 */ lw $s1, 0x14($sp)
/* 1989A4 8026A0C4 8FB00010 */ lw $s0, 0x10($sp)
/* 1989A8 8026A0C8 24020002 */ addiu $v0, $zero, 2
/* 1989AC 8026A0CC 03E00008 */ jr $ra
/* 1989B0 8026A0D0 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,22 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetTargetListLength
/* 19D144 8026E864 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 19D148 8026E868 AFB00010 */ sw $s0, 0x10($sp)
/* 19D14C 8026E86C 0080802D */ daddu $s0, $a0, $zero
/* 19D150 8026E870 AFBF0018 */ sw $ra, 0x18($sp)
/* 19D154 8026E874 AFB10014 */ sw $s1, 0x14($sp)
/* 19D158 8026E878 8E040148 */ lw $a0, 0x148($s0)
/* 19D15C 8026E87C 0C09A75B */ jal get_actor
/* 19D160 8026E880 8E11000C */ lw $s1, 0xc($s0)
/* 19D164 8026E884 8E250000 */ lw $a1, ($s1)
/* 19D168 8026E888 8046040C */ lb $a2, 0x40c($v0)
/* 19D16C 8026E88C 0C0B2026 */ jal set_variable
/* 19D170 8026E890 0200202D */ daddu $a0, $s0, $zero
/* 19D174 8026E894 8FBF0018 */ lw $ra, 0x18($sp)
/* 19D178 8026E898 8FB10014 */ lw $s1, 0x14($sp)
/* 19D17C 8026E89C 8FB00010 */ lw $s0, 0x10($sp)
/* 19D180 8026E8A0 24020002 */ addiu $v0, $zero, 2
/* 19D184 8026E8A4 03E00008 */ jr $ra
/* 19D188 8026E8A8 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,31 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetGoalToHome
/* 1987A4 80269EC4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1987A8 80269EC8 AFB00010 */ sw $s0, 0x10($sp)
/* 1987AC 80269ECC 0080802D */ daddu $s0, $a0, $zero
/* 1987B0 80269ED0 AFBF0014 */ sw $ra, 0x14($sp)
/* 1987B4 80269ED4 8E02000C */ lw $v0, 0xc($s0)
/* 1987B8 80269ED8 0C0B1EAF */ jal get_variable
/* 1987BC 80269EDC 8C450000 */ lw $a1, ($v0)
/* 1987C0 80269EE0 0040202D */ daddu $a0, $v0, $zero
/* 1987C4 80269EE4 2402FF81 */ addiu $v0, $zero, -0x7f
/* 1987C8 80269EE8 14820002 */ bne $a0, $v0, .L80269EF4
/* 1987CC 80269EEC 00000000 */ nop
/* 1987D0 80269EF0 8E040148 */ lw $a0, 0x148($s0)
.L80269EF4:
/* 1987D4 80269EF4 0C09A75B */ jal get_actor
/* 1987D8 80269EF8 00000000 */ nop
/* 1987DC 80269EFC 0040182D */ daddu $v1, $v0, $zero
/* 1987E0 80269F00 C4600138 */ lwc1 $f0, 0x138($v1)
/* 1987E4 80269F04 C462013C */ lwc1 $f2, 0x13c($v1)
/* 1987E8 80269F08 C4640140 */ lwc1 $f4, 0x140($v1)
/* 1987EC 80269F0C E4600018 */ swc1 $f0, 0x18($v1)
/* 1987F0 80269F10 E462001C */ swc1 $f2, 0x1c($v1)
/* 1987F4 80269F14 E4640020 */ swc1 $f4, 0x20($v1)
/* 1987F8 80269F18 8FBF0014 */ lw $ra, 0x14($sp)
/* 1987FC 80269F1C 8FB00010 */ lw $s0, 0x10($sp)
/* 198800 80269F20 24020002 */ addiu $v0, $zero, 2
/* 198804 80269F24 03E00008 */ jr $ra
/* 198808 80269F28 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetGoalToTarget
/* 198C88 8026A3A8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 198C8C 8026A3AC AFB00010 */ sw $s0, 0x10($sp)
/* 198C90 8026A3B0 0080802D */ daddu $s0, $a0, $zero
/* 198C94 8026A3B4 AFBF0014 */ sw $ra, 0x14($sp)
/* 198C98 8026A3B8 8E02000C */ lw $v0, 0xc($s0)
/* 198C9C 8026A3BC 0C0B1EAF */ jal get_variable
/* 198CA0 8026A3C0 8C450000 */ lw $a1, ($v0)
/* 198CA4 8026A3C4 0040202D */ daddu $a0, $v0, $zero
/* 198CA8 8026A3C8 2402FF81 */ addiu $v0, $zero, -0x7f
/* 198CAC 8026A3CC 14820002 */ bne $a0, $v0, .L8026A3D8
/* 198CB0 8026A3D0 00000000 */ nop
/* 198CB4 8026A3D4 8E040148 */ lw $a0, 0x148($s0)
.L8026A3D8:
/* 198CB8 8026A3D8 0C09A75B */ jal get_actor
/* 198CBC 8026A3DC 00000000 */ nop
/* 198CC0 8026A3E0 84450428 */ lh $a1, 0x428($v0)
/* 198CC4 8026A3E4 80460426 */ lb $a2, 0x426($v0)
/* 198CC8 8026A3E8 0C09A5D5 */ jal set_goal_pos_to_part
/* 198CCC 8026A3EC 2444000C */ addiu $a0, $v0, 0xc
/* 198CD0 8026A3F0 8FBF0014 */ lw $ra, 0x14($sp)
/* 198CD4 8026A3F4 8FB00010 */ lw $s0, 0x10($sp)
/* 198CD8 8026A3F8 24020002 */ addiu $v0, $zero, 2
/* 198CDC 8026A3FC 03E00008 */ jr $ra
/* 198CE0 8026A400 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,59 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetHomePos
/* 198BB0 8026A2D0 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 198BB4 8026A2D4 AFB20018 */ sw $s2, 0x18($sp)
/* 198BB8 8026A2D8 0080902D */ daddu $s2, $a0, $zero
/* 198BBC 8026A2DC AFBF001C */ sw $ra, 0x1c($sp)
/* 198BC0 8026A2E0 AFB10014 */ sw $s1, 0x14($sp)
/* 198BC4 8026A2E4 AFB00010 */ sw $s0, 0x10($sp)
/* 198BC8 8026A2E8 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 198BCC 8026A2EC F7B60028 */ sdc1 $f22, 0x28($sp)
/* 198BD0 8026A2F0 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 198BD4 8026A2F4 8E50000C */ lw $s0, 0xc($s2)
/* 198BD8 8026A2F8 8E050000 */ lw $a1, ($s0)
/* 198BDC 8026A2FC 0C0B1EAF */ jal get_variable
/* 198BE0 8026A300 26100004 */ addiu $s0, $s0, 4
/* 198BE4 8026A304 0040882D */ daddu $s1, $v0, $zero
/* 198BE8 8026A308 2402FF81 */ addiu $v0, $zero, -0x7f
/* 198BEC 8026A30C 16220002 */ bne $s1, $v0, .L8026A318
/* 198BF0 8026A310 00000000 */ nop
/* 198BF4 8026A314 8E510148 */ lw $s1, 0x148($s2)
.L8026A318:
/* 198BF8 8026A318 8E050000 */ lw $a1, ($s0)
/* 198BFC 8026A31C 26100004 */ addiu $s0, $s0, 4
/* 198C00 8026A320 0C0B1EAF */ jal get_variable
/* 198C04 8026A324 0240202D */ daddu $a0, $s2, $zero
/* 198C08 8026A328 8E050000 */ lw $a1, ($s0)
/* 198C0C 8026A32C 26100004 */ addiu $s0, $s0, 4
/* 198C10 8026A330 4482C000 */ mtc1 $v0, $f24
/* 198C14 8026A334 00000000 */ nop
/* 198C18 8026A338 4680C620 */ cvt.s.w $f24, $f24
/* 198C1C 8026A33C 0C0B1EAF */ jal get_variable
/* 198C20 8026A340 0240202D */ daddu $a0, $s2, $zero
/* 198C24 8026A344 8E050000 */ lw $a1, ($s0)
/* 198C28 8026A348 4482B000 */ mtc1 $v0, $f22
/* 198C2C 8026A34C 00000000 */ nop
/* 198C30 8026A350 4680B5A0 */ cvt.s.w $f22, $f22
/* 198C34 8026A354 0C0B1EAF */ jal get_variable
/* 198C38 8026A358 0240202D */ daddu $a0, $s2, $zero
/* 198C3C 8026A35C 4482A000 */ mtc1 $v0, $f20
/* 198C40 8026A360 00000000 */ nop
/* 198C44 8026A364 4680A520 */ cvt.s.w $f20, $f20
/* 198C48 8026A368 0C09A75B */ jal get_actor
/* 198C4C 8026A36C 0220202D */ daddu $a0, $s1, $zero
/* 198C50 8026A370 0040182D */ daddu $v1, $v0, $zero
/* 198C54 8026A374 E4780138 */ swc1 $f24, 0x138($v1)
/* 198C58 8026A378 E476013C */ swc1 $f22, 0x13c($v1)
/* 198C5C 8026A37C E4740140 */ swc1 $f20, 0x140($v1)
/* 198C60 8026A380 8FBF001C */ lw $ra, 0x1c($sp)
/* 198C64 8026A384 8FB20018 */ lw $s2, 0x18($sp)
/* 198C68 8026A388 8FB10014 */ lw $s1, 0x14($sp)
/* 198C6C 8026A38C 8FB00010 */ lw $s0, 0x10($sp)
/* 198C70 8026A390 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 198C74 8026A394 D7B60028 */ ldc1 $f22, 0x28($sp)
/* 198C78 8026A398 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 198C7C 8026A39C 24020002 */ addiu $v0, $zero, 2
/* 198C80 8026A3A0 03E00008 */ jr $ra
/* 198C84 8026A3A4 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,31 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetIdleGoalToHome
/* 19880C 80269F2C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 198810 80269F30 AFB00010 */ sw $s0, 0x10($sp)
/* 198814 80269F34 0080802D */ daddu $s0, $a0, $zero
/* 198818 80269F38 AFBF0014 */ sw $ra, 0x14($sp)
/* 19881C 80269F3C 8E02000C */ lw $v0, 0xc($s0)
/* 198820 80269F40 0C0B1EAF */ jal get_variable
/* 198824 80269F44 8C450000 */ lw $a1, ($v0)
/* 198828 80269F48 0040202D */ daddu $a0, $v0, $zero
/* 19882C 80269F4C 2402FF81 */ addiu $v0, $zero, -0x7f
/* 198830 80269F50 14820002 */ bne $a0, $v0, .L80269F5C
/* 198834 80269F54 00000000 */ nop
/* 198838 80269F58 8E040148 */ lw $a0, 0x148($s0)
.L80269F5C:
/* 19883C 80269F5C 0C09A75B */ jal get_actor
/* 198840 80269F60 00000000 */ nop
/* 198844 80269F64 0040182D */ daddu $v1, $v0, $zero
/* 198848 80269F68 C4600138 */ lwc1 $f0, 0x138($v1)
/* 19884C 80269F6C C462013C */ lwc1 $f2, 0x13c($v1)
/* 198850 80269F70 C4640140 */ lwc1 $f4, 0x140($v1)
/* 198854 80269F74 E46000D4 */ swc1 $f0, 0xd4($v1)
/* 198858 80269F78 E46200D8 */ swc1 $f2, 0xd8($v1)
/* 19885C 80269F7C E46400DC */ swc1 $f4, 0xdc($v1)
/* 198860 80269F80 8FBF0014 */ lw $ra, 0x14($sp)
/* 198864 80269F84 8FB00010 */ lw $s0, 0x10($sp)
/* 198868 80269F88 24020002 */ addiu $v0, $zero, 2
/* 19886C 80269F8C 03E00008 */ jr $ra
/* 198870 80269F90 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,53 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_nearest_home_index
/* 197F78 80269698 3C014220 */ lui $at, 0x4220
/* 197F7C 8026969C 44810000 */ mtc1 $at, $f0
/* 197F80 802696A0 00000000 */ nop
/* 197F84 802696A4 4600703C */ c.lt.s $f14, $f0
/* 197F88 802696A8 00000000 */ nop
/* 197F8C 802696AC 45010010 */ bc1t .L802696F0
/* 197F90 802696B0 0000102D */ daddu $v0, $zero, $zero
/* 197F94 802696B4 3C0142AA */ lui $at, 0x42aa
/* 197F98 802696B8 44810000 */ mtc1 $at, $f0
/* 197F9C 802696BC 00000000 */ nop
/* 197FA0 802696C0 4600703C */ c.lt.s $f14, $f0
/* 197FA4 802696C4 00000000 */ nop
/* 197FA8 802696C8 45010009 */ bc1t .L802696F0
/* 197FAC 802696CC 24020001 */ addiu $v0, $zero, 1
/* 197FB0 802696D0 3C0142C8 */ lui $at, 0x42c8
/* 197FB4 802696D4 44810000 */ mtc1 $at, $f0
/* 197FB8 802696D8 00000000 */ nop
/* 197FBC 802696DC 4600703C */ c.lt.s $f14, $f0
/* 197FC0 802696E0 00000000 */ nop
/* 197FC4 802696E4 45000002 */ bc1f .L802696F0
/* 197FC8 802696E8 24020003 */ addiu $v0, $zero, 3
/* 197FCC 802696EC 24020002 */ addiu $v0, $zero, 2
.L802696F0:
/* 197FD0 802696F0 3C0141C8 */ lui $at, 0x41c8
/* 197FD4 802696F4 44810000 */ mtc1 $at, $f0
/* 197FD8 802696F8 00000000 */ nop
/* 197FDC 802696FC 4600603C */ c.lt.s $f12, $f0
/* 197FE0 80269700 00000000 */ nop
/* 197FE4 80269704 45010010 */ bc1t .L80269748
/* 197FE8 80269708 0000182D */ daddu $v1, $zero, $zero
/* 197FEC 8026970C 3C014282 */ lui $at, 0x4282
/* 197FF0 80269710 44810000 */ mtc1 $at, $f0
/* 197FF4 80269714 00000000 */ nop
/* 197FF8 80269718 4600603C */ c.lt.s $f12, $f0
/* 197FFC 8026971C 00000000 */ nop
/* 198000 80269720 45010009 */ bc1t .L80269748
/* 198004 80269724 24030001 */ addiu $v1, $zero, 1
/* 198008 80269728 3C0142D2 */ lui $at, 0x42d2
/* 19800C 8026972C 44810000 */ mtc1 $at, $f0
/* 198010 80269730 00000000 */ nop
/* 198014 80269734 4600603C */ c.lt.s $f12, $f0
/* 198018 80269738 00000000 */ nop
/* 19801C 8026973C 45000002 */ bc1f .L80269748
/* 198020 80269740 24030003 */ addiu $v1, $zero, 3
/* 198024 80269744 24030002 */ addiu $v1, $zero, 2
.L80269748:
/* 198028 80269748 00021080 */ sll $v0, $v0, 2
/* 19802C 8026974C 03E00008 */ jr $ra
/* 198030 80269750 00621025 */ or $v0, $v1, $v0

View File

@ -1,23 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_actor_current_position
/* 198504 80269C24 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 198508 80269C28 F7B40018 */ sdc1 $f20, 0x18($sp)
/* 19850C 80269C2C 4485A000 */ mtc1 $a1, $f20
/* 198510 80269C30 F7B60020 */ sdc1 $f22, 0x20($sp)
/* 198514 80269C34 4486B000 */ mtc1 $a2, $f22
/* 198518 80269C38 F7B80028 */ sdc1 $f24, 0x28($sp)
/* 19851C 80269C3C 4487C000 */ mtc1 $a3, $f24
/* 198520 80269C40 AFBF0010 */ sw $ra, 0x10($sp)
/* 198524 80269C44 0C09A75B */ jal get_actor
/* 198528 80269C48 00000000 */ nop
/* 19852C 80269C4C E4540144 */ swc1 $f20, 0x144($v0)
/* 198530 80269C50 E4560148 */ swc1 $f22, 0x148($v0)
/* 198534 80269C54 E458014C */ swc1 $f24, 0x14c($v0)
/* 198538 80269C58 8FBF0010 */ lw $ra, 0x10($sp)
/* 19853C 80269C5C D7B80028 */ ldc1 $f24, 0x28($sp)
/* 198540 80269C60 D7B60020 */ ldc1 $f22, 0x20($sp)
/* 198544 80269C64 D7B40018 */ ldc1 $f20, 0x18($sp)
/* 198548 80269C68 03E00008 */ jr $ra
/* 19854C 80269C6C 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,23 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_actor_home_position
/* 198600 80269D20 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 198604 80269D24 F7B40018 */ sdc1 $f20, 0x18($sp)
/* 198608 80269D28 4485A000 */ mtc1 $a1, $f20
/* 19860C 80269D2C F7B60020 */ sdc1 $f22, 0x20($sp)
/* 198610 80269D30 4486B000 */ mtc1 $a2, $f22
/* 198614 80269D34 F7B80028 */ sdc1 $f24, 0x28($sp)
/* 198618 80269D38 4487C000 */ mtc1 $a3, $f24
/* 19861C 80269D3C AFBF0010 */ sw $ra, 0x10($sp)
/* 198620 80269D40 0C09A75B */ jal get_actor
/* 198624 80269D44 00000000 */ nop
/* 198628 80269D48 E4540138 */ swc1 $f20, 0x138($v0)
/* 19862C 80269D4C E456013C */ swc1 $f22, 0x13c($v0)
/* 198630 80269D50 E4580140 */ swc1 $f24, 0x140($v0)
/* 198634 80269D54 8FBF0010 */ lw $ra, 0x10($sp)
/* 198638 80269D58 D7B80028 */ ldc1 $f24, 0x28($sp)
/* 19863C 80269D5C D7B60020 */ ldc1 $f22, 0x20($sp)
/* 198640 80269D60 D7B40018 */ ldc1 $f20, 0x18($sp)
/* 198644 80269D64 03E00008 */ jr $ra
/* 198648 80269D68 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,48 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel DispatchDamageEvent
/* 1ABA9C 8027D1BC 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 1ABAA0 8027D1C0 AFB20018 */ sw $s2, 0x18($sp)
/* 1ABAA4 8027D1C4 0080902D */ daddu $s2, $a0, $zero
/* 1ABAA8 8027D1C8 AFBF001C */ sw $ra, 0x1c($sp)
/* 1ABAAC 8027D1CC AFB10014 */ sw $s1, 0x14($sp)
/* 1ABAB0 8027D1D0 AFB00010 */ sw $s0, 0x10($sp)
/* 1ABAB4 8027D1D4 8E50000C */ lw $s0, 0xc($s2)
/* 1ABAB8 8027D1D8 8E050000 */ lw $a1, ($s0)
/* 1ABABC 8027D1DC 0C0B1EAF */ jal get_variable
/* 1ABAC0 8027D1E0 26100004 */ addiu $s0, $s0, 4
/* 1ABAC4 8027D1E4 0040202D */ daddu $a0, $v0, $zero
/* 1ABAC8 8027D1E8 2402FF81 */ addiu $v0, $zero, -0x7f
/* 1ABACC 8027D1EC 14820002 */ bne $a0, $v0, .L8027D1F8
/* 1ABAD0 8027D1F0 00000000 */ nop
/* 1ABAD4 8027D1F4 8E440148 */ lw $a0, 0x148($s2)
.L8027D1F8:
/* 1ABAD8 8027D1F8 0C09A75B */ jal get_actor
/* 1ABADC 8027D1FC 00000000 */ nop
/* 1ABAE0 8027D200 8E050000 */ lw $a1, ($s0)
/* 1ABAE4 8027D204 26100004 */ addiu $s0, $s0, 4
/* 1ABAE8 8027D208 0240202D */ daddu $a0, $s2, $zero
/* 1ABAEC 8027D20C 0C0B1EAF */ jal get_variable
/* 1ABAF0 8027D210 0040882D */ daddu $s1, $v0, $zero
/* 1ABAF4 8027D214 0240202D */ daddu $a0, $s2, $zero
/* 1ABAF8 8027D218 8E050000 */ lw $a1, ($s0)
/* 1ABAFC 8027D21C 0C0B1EAF */ jal get_variable
/* 1ABB00 8027D220 0040802D */ daddu $s0, $v0, $zero
/* 1ABB04 8027D224 0220202D */ daddu $a0, $s1, $zero
/* 1ABB08 8027D228 0200282D */ daddu $a1, $s0, $zero
/* 1ABB0C 8027D22C 0C09E23E */ jal dispatch_damage_event_actor_0
/* 1ABB10 8027D230 0040302D */ daddu $a2, $v0, $zero
/* 1ABB14 8027D234 04420005 */ bltzl $v0, .L8027D24C
/* 1ABB18 8027D238 0000102D */ daddu $v0, $zero, $zero
/* 1ABB1C 8027D23C 0C0B1069 */ jal does_script_exist_by_ref
/* 1ABB20 8027D240 0240202D */ daddu $a0, $s2, $zero
/* 1ABB24 8027D244 0002102B */ sltu $v0, $zero, $v0
/* 1ABB28 8027D248 00021040 */ sll $v0, $v0, 1
.L8027D24C:
/* 1ABB2C 8027D24C 8FBF001C */ lw $ra, 0x1c($sp)
/* 1ABB30 8027D250 8FB20018 */ lw $s2, 0x18($sp)
/* 1ABB34 8027D254 8FB10014 */ lw $s1, 0x14($sp)
/* 1ABB38 8027D258 8FB00010 */ lw $s0, 0x10($sp)
/* 1ABB3C 8027D25C 03E00008 */ jr $ra
/* 1ABB40 8027D260 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,45 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel dispatch_event_actor
/* 1A5A40 80277160 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 1A5A44 80277164 AFB00010 */ sw $s0, 0x10($sp)
/* 1A5A48 80277168 0080802D */ daddu $s0, $a0, $zero
/* 1A5A4C 8027716C AFBF001C */ sw $ra, 0x1c($sp)
/* 1A5A50 80277170 AFB20018 */ sw $s2, 0x18($sp)
/* 1A5A54 80277174 AFB10014 */ sw $s1, 0x14($sp)
/* 1A5A58 80277178 8E1201D8 */ lw $s2, 0x1d8($s0)
/* 1A5A5C 8027717C 8E0201C8 */ lw $v0, 0x1c8($s0)
/* 1A5A60 80277180 8E1101E8 */ lw $s1, 0x1e8($s0)
/* 1A5A64 80277184 1040000A */ beqz $v0, .L802771B0
/* 1A5A68 80277188 0040202D */ daddu $a0, $v0, $zero
/* 1A5A6C 8027718C A20501F0 */ sb $a1, 0x1f0($s0)
/* 1A5A70 80277190 2405000A */ addiu $a1, $zero, 0xa
/* 1A5A74 80277194 0C0B0CF8 */ jal start_script
/* 1A5A78 80277198 24060020 */ addiu $a2, $zero, 0x20
/* 1A5A7C 8027719C AE0201D8 */ sw $v0, 0x1d8($s0)
/* 1A5A80 802771A0 8C430144 */ lw $v1, 0x144($v0)
/* 1A5A84 802771A4 86040192 */ lh $a0, 0x192($s0)
/* 1A5A88 802771A8 AE0301E8 */ sw $v1, 0x1e8($s0)
/* 1A5A8C 802771AC AC440148 */ sw $a0, 0x148($v0)
.L802771B0:
/* 1A5A90 802771B0 8E0201D4 */ lw $v0, 0x1d4($s0)
/* 1A5A94 802771B4 10400006 */ beqz $v0, .L802771D0
/* 1A5A98 802771B8 00000000 */ nop
/* 1A5A9C 802771BC 0C0B11E4 */ jal get_script_by_index
/* 1A5AA0 802771C0 8E0401E4 */ lw $a0, 0x1e4($s0)
/* 1A5AA4 802771C4 0C0B102B */ jal kill_script_by_ID
/* 1A5AA8 802771C8 8E0401E4 */ lw $a0, 0x1e4($s0)
/* 1A5AAC 802771CC AE0001D4 */ sw $zero, 0x1d4($s0)
.L802771D0:
/* 1A5AB0 802771D0 12400003 */ beqz $s2, .L802771E0
/* 1A5AB4 802771D4 00000000 */ nop
/* 1A5AB8 802771D8 0C0B102B */ jal kill_script_by_ID
/* 1A5ABC 802771DC 0220202D */ daddu $a0, $s1, $zero
.L802771E0:
/* 1A5AC0 802771E0 8FBF001C */ lw $ra, 0x1c($sp)
/* 1A5AC4 802771E4 8FB20018 */ lw $s2, 0x18($sp)
/* 1A5AC8 802771E8 8FB10014 */ lw $s1, 0x14($sp)
/* 1A5ACC 802771EC 8FB00010 */ lw $s0, 0x10($sp)
/* 1A5AD0 802771F0 03E00008 */ jr $ra
/* 1A5AD4 802771F4 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,22 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80276F50
/* 1A5830 80276F50 8C8301F4 */ lw $v1, 0x1f4($a0)
/* 1A5834 80276F54 1060000B */ beqz $v1, .L80276F84
/* 1A5838 80276F58 0000202D */ daddu $a0, $zero, $zero
/* 1A583C 80276F5C 3C05000C */ lui $a1, 0xc
.L80276F60:
/* 1A5840 80276F60 8C62007C */ lw $v0, 0x7c($v1)
/* 1A5844 80276F64 00451024 */ and $v0, $v0, $a1
/* 1A5848 80276F68 10400003 */ beqz $v0, .L80276F78
/* 1A584C 80276F6C 00000000 */ nop
/* 1A5850 80276F70 0809DBE1 */ j .L80276F84
/* 1A5854 80276F74 24040001 */ addiu $a0, $zero, 1
.L80276F78:
/* 1A5858 80276F78 8C63000C */ lw $v1, 0xc($v1)
/* 1A585C 80276F7C 1460FFF8 */ bnez $v1, .L80276F60
/* 1A5860 80276F80 00000000 */ nop
.L80276F84:
/* 1A5864 80276F84 03E00008 */ jr $ra
/* 1A5868 80276F88 0080102D */ daddu $v0, $a0, $zero

View File

@ -1,42 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8027D434
/* 1ABD14 8027D434 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 1ABD18 8027D438 AFB20018 */ sw $s2, 0x18($sp)
/* 1ABD1C 8027D43C 0080902D */ daddu $s2, $a0, $zero
/* 1ABD20 8027D440 AFBF001C */ sw $ra, 0x1c($sp)
/* 1ABD24 8027D444 AFB10014 */ sw $s1, 0x14($sp)
/* 1ABD28 8027D448 AFB00010 */ sw $s0, 0x10($sp)
/* 1ABD2C 8027D44C 8E51000C */ lw $s1, 0xc($s2)
/* 1ABD30 8027D450 8E250000 */ lw $a1, ($s1)
/* 1ABD34 8027D454 0C0B1EAF */ jal get_variable
/* 1ABD38 8027D458 26310004 */ addiu $s1, $s1, 4
/* 1ABD3C 8027D45C 0040802D */ daddu $s0, $v0, $zero
/* 1ABD40 8027D460 2402FF81 */ addiu $v0, $zero, -0x7f
/* 1ABD44 8027D464 16020002 */ bne $s0, $v0, .L8027D470
/* 1ABD48 8027D468 00000000 */ nop
/* 1ABD4C 8027D46C 8E500148 */ lw $s0, 0x148($s2)
.L8027D470:
/* 1ABD50 8027D470 8E250000 */ lw $a1, ($s1)
/* 1ABD54 8027D474 26310004 */ addiu $s1, $s1, 4
/* 1ABD58 8027D478 0C0B1EAF */ jal get_variable
/* 1ABD5C 8027D47C 0240202D */ daddu $a0, $s2, $zero
/* 1ABD60 8027D480 0200202D */ daddu $a0, $s0, $zero
/* 1ABD64 8027D484 0C09A75B */ jal get_actor
/* 1ABD68 8027D488 0040802D */ daddu $s0, $v0, $zero
/* 1ABD6C 8027D48C 0040202D */ daddu $a0, $v0, $zero
/* 1ABD70 8027D490 0C099117 */ jal get_actor_part
/* 1ABD74 8027D494 0200282D */ daddu $a1, $s0, $zero
/* 1ABD78 8027D498 0240202D */ daddu $a0, $s2, $zero
/* 1ABD7C 8027D49C 8E250000 */ lw $a1, ($s1)
/* 1ABD80 8027D4A0 0C0B1EAF */ jal get_variable
/* 1ABD84 8027D4A4 0040802D */ daddu $s0, $v0, $zero
/* 1ABD88 8027D4A8 A6020070 */ sh $v0, 0x70($s0)
/* 1ABD8C 8027D4AC 8FBF001C */ lw $ra, 0x1c($sp)
/* 1ABD90 8027D4B0 8FB20018 */ lw $s2, 0x18($sp)
/* 1ABD94 8027D4B4 8FB10014 */ lw $s1, 0x14($sp)
/* 1ABD98 8027D4B8 8FB00010 */ lw $s0, 0x10($sp)
/* 1ABD9C 8027D4BC 24020002 */ addiu $v0, $zero, 2
/* 1ABDA0 8027D4C0 03E00008 */ jr $ra
/* 1ABDA4 8027D4C4 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -591,7 +591,7 @@ typedef struct BattleStatus {
/* 0x196 */ char unk_196; /* 0x196 */ char unk_196;
/* 0x197 */ u8 targetHomeIndex; /* some sort of home idnex used for target list construction */ /* 0x197 */ u8 targetHomeIndex; /* some sort of home idnex used for target list construction */
/* 0x198 */ u8 powerBounceCounter; /* 0x198 */ u8 powerBounceCounter;
/* 0x199 */ u8 wasStatusInflicted; /* during last attack */ /* 0x199 */ s8 wasStatusInflicted; /* during last attack */
/* 0x19A */ s8 unk_19A; /* 0x19A */ s8 unk_19A;
/* 0x19B */ char unk_19B[5]; /* 0x19B */ char unk_19B[5];
/* 0x1A0 */ s16 currentTargetID; /* selected? */ /* 0x1A0 */ s16 currentTargetID; /* selected? */
@ -610,8 +610,8 @@ typedef struct BattleStatus {
/* 0x210 */ s32 currentButtonsDown; /* 0x210 */ s32 currentButtonsDown;
/* 0x214 */ s32 currentButtonsPressed; /* 0x214 */ s32 currentButtonsPressed;
/* 0x218 */ s32 currentButtonsHeld; /* 0x218 */ s32 currentButtonsHeld;
/* 0x21C */ f32 stickX; /* 0x21C */ s32 stickX;
/* 0x220 */ f32 stickY; /* 0x220 */ s32 stickY;
/* 0x224 */ s32 inputBitmask; /* 0x224 */ s32 inputBitmask;
/* 0x228 */ s32 dpadX; /* 0-360 */ /* 0x228 */ s32 dpadX; /* 0-360 */
/* 0x22C */ s32 dpadY; /* 0-60 */ /* 0x22C */ s32 dpadY; /* 0-60 */
@ -1053,7 +1053,7 @@ typedef struct ActorPart {
/* 0x64 */ f32 yaw; /* 0x64 */ f32 yaw;
/* 0x68 */ s16 unkOffset[2]; /* 0x68 */ s16 unkOffset[2];
/* 0x6C */ s16 targetOffset[2]; /* 0x6C */ s16 targetOffset[2];
/* 0x70 */ s16 unk; /* 0x70 */ s16 unk_70;
/* 0x72 */ u8 size[2]; /* 0x72 */ u8 size[2];
/* 0x74 */ u8 verticalStretch; /* 0x74 */ u8 verticalStretch;
/* 0x75 */ char unk_75[3]; /* 0x75 */ char unk_75[3];
@ -1217,13 +1217,17 @@ typedef struct Zone {
/* 0x28 */ s32 flag; /* 0x28 */ s32 flag;
} Zone; // size = 0x2C } Zone; // size = 0x2C
typedef struct ActorMovePos {
/* 0x00 */ Vec3f current;
/* 0x0C */ Vec3f goal;
/* 0x18 */ Vec3f end;
} ActorMovePos; // size = 0x20;
typedef struct Actor { typedef struct Actor {
/* 0x000 */ s32 flags; /* 0x000 */ s32 flags;
/* 0x004 */ char unk_04[4]; /* 0x004 */ char unk_04[4];
/* 0x008 */ struct StaticActorData* staticActorData; /* 0x008 */ struct StaticActorData* staticActorData;
/* 0x00C */ Vec3f moveCurrentPos; /* 0x00C */ ActorMovePos movePos;
/* 0x018 */ Vec3f moveGoalPos;
/* 0x024 */ Vec3f moveEndPos; /* where other actors should target this one at. saved before partner switching */
/* 0x030 */ char unk_30[24]; /* 0x030 */ char unk_30[24];
/* 0x048 */ f32 jumpAccel; /* 0x048 */ f32 jumpAccel;
/* 0x04C */ f32 moveSpeed; /* 0x04C */ f32 moveSpeed;
@ -1299,7 +1303,9 @@ typedef struct Actor {
/* 0x1F8 */ s16 lastDamageTaken; /* 0x1F8 */ s16 lastDamageTaken;
/* 0x1FA */ s16 hpChangeCounter; /* 0x1FA */ s16 hpChangeCounter;
/* 0x1FC */ s16 damageCounter; /* 0x1FC */ s16 damageCounter;
/* 0x1FE */ char unk_1FE[9]; /* 0x1FE */ char unk_1FE[2];
/* 0x200 */ s32** unk_200; // Probably a struct but not sure what yet
/* 0x204 */ char unk_204[3];
/* 0x207 */ u8 extraCoinBonus; /* 0x207 */ u8 extraCoinBonus;
/* 0x208 */ s8 unk_208; /* 0x208 */ s8 unk_208;
/* 0x209 */ char unk_209[3]; /* 0x209 */ char unk_209[3];
@ -1324,10 +1330,10 @@ typedef struct Actor {
/* 0x224 */ u8 chillOutTurns; /* 0x224 */ u8 chillOutTurns;
/* 0x225 */ char unk_225[7]; /* 0x225 */ char unk_225[7];
/* 0x22C */ struct SelectableTarget targetData[24]; /* 0x22C */ struct SelectableTarget targetData[24];
/* 0x40C */ u8 targetListLength; /* 0x40C */ s8 targetListLength;
/* 0x40D */ u8 targetIndexList[24]; /* into targetData */ /* 0x40D */ u8 targetIndexList[24]; /* into targetData */
/* 0x425 */ u8 selectedTargetIndex; /* into target index list */ /* 0x425 */ u8 selectedTargetIndex; /* into target index list */
/* 0x426 */ u8 targetPartIndex; /* 0x426 */ s8 targetPartIndex;
/* 0x427 */ char unk_427; /* 0x427 */ char unk_427;
/* 0x428 */ s16 targetActorID; /* 0x428 */ s16 targetActorID;
/* 0x42A */ char unk_42A[2]; /* 0x42A */ char unk_42A[2];

View File

@ -101,6 +101,7 @@ void func_800ED5D0(Npc* partner);
s32 func_800EF394(f32); s32 func_800EF394(f32);
s32 does_script_exist(s32 id); s32 does_script_exist(s32 id);
s32 does_script_exist_by_ref(ScriptInstance* script);
ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState); ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState);
ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags); ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags);

View File

@ -17,6 +17,7 @@
#define PANIC() ASSERT(0) #define PANIC() ASSERT(0)
#define STATIC_ASSERT(condition) enum { static_assert_fail = 1/(!!(condition)) } // Causes division by zero ("not integer constant") if false #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 GAME_STATUS (*gGameStatusPtr)
#define PLAYER_STATUS (&gPlayerStatus) #define PLAYER_STATUS (&gPlayerStatus)
#define PLAYER_DATA (&gPlayerData) #define PLAYER_DATA (&gPlayerData)

View File

@ -50,7 +50,10 @@ INCLUDE_ASM(s32, "code_16F740", func_802439D8);
void func_80243FD4(void) { 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) { void func_80244000(void) {
} }
@ -84,9 +87,15 @@ INCLUDE_ASM(s32, "code_16F740", func_80245440);
void func_802456B0(void) { 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); INCLUDE_ASM(s32, "code_16F740", update_swap_partner);

View File

@ -1,6 +1,42 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "code_16c8e0", get_dpad_input_radial); void get_dpad_input_radial(f32* angle, f32* magnitude) {
BattleStatus* battleStatus = &gBattleStatus;
u16 currentButtonsDown;
f32 stickX;
f32 stickY;
f32 mag;
f32 maxMagnitude = 60.0f;
stickX = battleStatus->stickX;
stickY = battleStatus->stickY;
currentButtonsDown = battleStatus->currentButtonsDown;
if (currentButtonsDown & 0xF00) {
stickY = 0.0f;
stickX = 0.0f;
if (currentButtonsDown & 0x800) {
stickY = maxMagnitude;
}
if (currentButtonsDown & 0x400) {
stickY = -maxMagnitude;
}
if (currentButtonsDown & 0x200) {
stickX = -maxMagnitude;
}
if (currentButtonsDown & 0x100) {
stickX = maxMagnitude;
}
}
mag = dist2D(0.0f, 0.0f, stickX, -stickY);
if (mag >= maxMagnitude) {
mag = maxMagnitude;
}
*angle = atan2(0.0f, 0.0f, stickX, -stickY);
*magnitude = mag;
}
INCLUDE_ASM(s32, "code_16c8e0", func_8023E104); INCLUDE_ASM(s32, "code_16c8e0", func_8023E104);
@ -11,7 +47,12 @@ INCLUDE_ASM(s32, "code_16c8e0", initialize_battle);
void func_8023E3FC(void) { void func_8023E3FC(void) {
} }
INCLUDE_ASM(s32, "code_16c8e0", update_actor_shadows); void update_actor_shadows(void) {
if (gBattleStatus.flags1 & 1) {
update_enemy_shadows();
update_hero_shadows();
}
}
INCLUDE_ASM(s32, "code_16c8e0", update_battle_state); INCLUDE_ASM(s32, "code_16c8e0", update_battle_state);
@ -23,7 +64,9 @@ INCLUDE_ASM(s32, "code_16c8e0", func_8023F060);
INCLUDE_ASM(s32, "code_16c8e0", func_8023F088); INCLUDE_ASM(s32, "code_16c8e0", func_8023F088);
INCLUDE_ASM(s32, "code_16c8e0", func_8023FF84); void func_8023FF84(void) {
show_foreground_models_unsafe();
}
INCLUDE_ASM(s32, "code_16c8e0", draw_enemy_health_bars); INCLUDE_ASM(s32, "code_16c8e0", draw_enemy_health_bars);
@ -35,4 +78,40 @@ INCLUDE_ASM(s32, "code_16c8e0", func_80240AA8);
INCLUDE_ASM(s32, "code_16c8e0", delete_actor); INCLUDE_ASM(s32, "code_16c8e0", delete_actor);
INCLUDE_ASM(s32, "code_16c8e0", delete_player_actor); void delete_player_actor(Actor* player) {
struct ActorPart* partsTable;
struct ActorPartMovement* movement;
struct DecorationTable* decorationTable;
s32 i;
for (i = 0; i < 2; i++) {
remove_actor_decoration(player, i);
}
if (player->idleScript != NULL) {
kill_script_by_ID(player->idleScriptID);
}
if (player->onHitScript != NULL) {
kill_script_by_ID(player->onHitID);
}
if (player->takeTurnScript != NULL) {
kill_script_by_ID(player->takeTurnID);
}
partsTable = player->partsTable;
decorationTable = partsTable->decorationTable;
movement = partsTable->movement;
func_80112328(player->shadow);
func_800476F4(player->unk_436);
remove_effect(player->ptrDefuffIcon);
if (player->unk_200 != NULL) {
player->unk_200[3][9] = 0;
}
heap_free(movement);
heap_free(decorationTable);
heap_free(partsTable);
heap_free(player);
}

View File

@ -52,9 +52,17 @@ INCLUDE_ASM(s32, "code_17D6A0", ShowMessageBox);
INCLUDE_ASM(s32, "code_17D6A0", ShowVariableMessageBox); 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); INCLUDE_ASM(s32, "code_17D6A0", ForceCloseMessageBox);

View File

@ -1,13 +1,306 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "code_17FEB0", calc_item_check_hit); HitResult calc_item_check_hit(void) {
BattleStatus* battleStatus = BATTLE_STATUS;
ActorMovePos* movePos = &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, movePos->goal.x, movePos->goal.y, movePos->goal.z);
return HitResult_IMMUNE;
}
if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) {
play_sound_at_position(0xE9, 0, movePos->goal.x, movePos->goal.y, movePos->goal.z);
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", 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;
}

View File

@ -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", 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) { ApiStatus MultiplyByActorScale(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
s8 count_targets(Actor* actor, s32 targetHomeIndex, s32 targetSelectionFlags) { s32 count_targets(Actor* actor, s32 targetHomeIndex, s32 targetSelectionFlags) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
battleStatus->targetHomeIndex = targetHomeIndex; battleStatus->targetHomeIndex = targetHomeIndex;
@ -9,17 +9,54 @@ s8 count_targets(Actor* actor, s32 targetHomeIndex, s32 targetSelectionFlags) {
return actor->targetListLength; return actor->targetListLength;
} }
INCLUDE_ASM(s32, "code_197F40", get_nearest_home_index); s32 get_nearest_home_index(f32 x, f32 y, f32 z) {
s32 xVal;
s32 yVal;
INCLUDE_ASM(s32, "code_197F40", set_goal_pos_to_part); if (y < 40.0f) {
xVal = 0;
} else if (y < 85.0f) {
xVal = 1;
} else if (y < 100.0f) {
xVal = 2;
} else {
xVal = 3;
}
if (x < 25.0f) {
yVal = 0;
} else if (x < 65.0f) {
yVal = 1;
} else if (x < 105.0f) {
yVal = 2;
} else {
yVal = 3;
}
return yVal | (xVal << 2);
}
INCLUDE_ASM(void, "code_197F40", set_goal_pos_to_part, f32* goalPos, ActorId target, s32 partIndex);
INCLUDE_ASM(s32, "code_197F40", set_part_goal_to_actor_part); INCLUDE_ASM(s32, "code_197F40", set_part_goal_to_actor_part);
INCLUDE_ASM(s32, "code_197F40", set_actor_current_position); void set_actor_current_position(ActorId actorID, f32 x, f32 y, f32 z) {
Actor* actor = get_actor(actorID);
actor->currentPos.x = x;
actor->currentPos.y = y;
actor->currentPos.z = z;
}
INCLUDE_ASM(s32, "code_197F40", set_part_absolute_position); INCLUDE_ASM(s32, "code_197F40", set_part_absolute_position);
INCLUDE_ASM(s32, "code_197F40", set_actor_home_position); void set_actor_home_position(ActorId actorID, f32 x, f32 y, f32 z) {
Actor* actor = get_actor(actorID);
actor->homePos.x = x;
actor->homePos.y = y;
actor->homePos.z = z;
}
INCLUDE_ASM(Actor*, "code_197F40", get_actor, s32 actorID); INCLUDE_ASM(Actor*, "code_197F40", get_actor, s32 actorID);
@ -39,23 +76,151 @@ INCLUDE_ASM(s32, "code_197F40", func_80269E80);
INCLUDE_ASM(s32, "code_197F40", func_80269EAC); INCLUDE_ASM(s32, "code_197F40", func_80269EAC);
INCLUDE_ASM(s32, "code_197F40", SetGoalToHome); ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) {
ActorId actorID = get_variable(script, *script->ptrReadPos);
Actor* actor;
INCLUDE_ASM(s32, "code_197F40", SetIdleGoalToHome); if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
actor->movePos.goal.x = actor->homePos.x;
actor->movePos.goal.y = actor->homePos.y;
actor->movePos.goal.z = actor->homePos.z;
return ApiStatus_DONE2;
}
ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall) {
ActorId actorID = get_variable(script, *script->ptrReadPos);
Actor* actor;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
actor->flyGoalPos.x = actor->homePos.x;
actor->flyGoalPos.y = actor->homePos.y;
actor->flyGoalPos.z = actor->homePos.z;
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetGoalToIndex); INCLUDE_ASM(s32, "code_197F40", SetGoalToIndex);
INCLUDE_ASM(s32, "code_197F40", GetIndexFromPos); ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
s32 a1 = *args++;
Actor* actor;
INCLUDE_ASM(s32, "code_197F40", GetIndexFromHome); if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
INCLUDE_ASM(s32, "code_197F40", CountPlayerTargets); actor = get_actor(actorID);
set_variable(script, a1, get_nearest_home_index(actor->currentPos.x, actor->currentPos.y, actor->currentPos.z));
INCLUDE_ASM(s32, "code_197F40", ForceHomePos); return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetHomePos); ApiStatus GetIndexFromHome(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
s32 a1 = *args++;
Actor* actor;
INCLUDE_ASM(s32, "code_197F40", SetGoalToTarget); if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
set_variable(script, a1, get_nearest_home_index(actor->homePos.x, actor->homePos.y, actor->homePos.z));
return ApiStatus_DONE2;
}
ApiStatus CountPlayerTargets(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
s32 targetSelectionFlags = *args++;
s32 outVar = *args++;
Actor* actor;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
set_variable(script, outVar, count_targets(actor, get_nearest_home_index(actor->currentPos.x, actor->currentPos.y,
actor->currentPos.z), targetSelectionFlags));
return ApiStatus_DONE2;
}
ApiStatus ForceHomePos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
f32 x, y, z;
Actor* actor;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
x = get_variable(script, *args++);
y = get_variable(script, *args++);
z = get_variable(script, *args++);
actor = get_actor(actorID);
actor->homePos.x = x;
actor->currentPos.x = x;
actor->homePos.y = y;
actor->currentPos.y = y;
actor->homePos.z = z;
actor->currentPos.z = z;
return ApiStatus_DONE2;
}
ApiStatus SetHomePos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
f32 x, y, z;
Actor* actor;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
x = get_variable(script, *args++);
y = get_variable(script, *args++);
z = get_variable(script, *args++);
actor = get_actor(actorID);
actor->homePos.x = x;
actor->homePos.y = y;
actor->homePos.z = z;
return ApiStatus_DONE2;
}
ApiStatus SetGoalToTarget(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
Actor* actor;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
set_goal_pos_to_part(&actor->movePos, actor->targetActorID, actor->targetPartIndex);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetPartGoalToTarget); INCLUDE_ASM(s32, "code_197F40", SetPartGoalToTarget);
@ -356,7 +521,12 @@ INCLUDE_ASM(s32, "code_197F40", ChooseNextTarget);
INCLUDE_ASM(s32, "code_197F40", func_8026E558); INCLUDE_ASM(s32, "code_197F40", func_8026E558);
INCLUDE_ASM(s32, "code_197F40", GetTargetListLength); ApiStatus GetTargetListLength(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
set_variable(script, *args, get_actor(script->owner1.actorID)->targetListLength);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", GetOwnerTarget); INCLUDE_ASM(s32, "code_197F40", GetOwnerTarget);

View File

@ -1,12 +1,52 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "code_1A5830", func_80276F50); void dispatch_event_actor(Actor* actor, Event event);
INCLUDE_ASM(s32, "code_1A5830", dispatch_event_general); s32 func_80276F50(Actor* actor) {
ActorPart* partIt = actor->partsTable;
s32 ret = FALSE;
while (partIt != NULL) {
if (partIt->eventFlags & 0xC0000) {
ret = TRUE;
break;
} else {
partIt = partIt->nextPart;
}
}
return ret;
}
void dispatch_event_general(Actor* actor, Event event);
INCLUDE_ASM(void, "code_1A5830", dispatch_event_general, Actor* actor, Event event);
INCLUDE_ASM(s32, "code_1A5830", play_hit_sound); INCLUDE_ASM(s32, "code_1A5830", play_hit_sound);
INCLUDE_ASM(s32, "code_1A5830", dispatch_event_actor); void dispatch_event_actor(Actor* actor, Event event) {
ScriptInstance* onHitScript = actor->onHitScript;
ScriptID onHitID = actor->onHitID;
if (actor->onHitCode != NULL) {
ScriptInstance* newScript;
actor->lastEventType = event;
newScript = start_script(actor->onHitCode, 0xA, 0x20);
actor->onHitScript = newScript;
actor->onHitID = newScript->id;
newScript->owner1.actorID = actor->actorID;
}
if (actor->takeTurnScript != NULL) {
get_script_by_index(actor->takeTurnID);
kill_script_by_ID(actor->takeTurnID);
actor->takeTurnScript = NULL;
}
if (onHitScript != NULL) {
kill_script_by_ID(onHitID);
}
}
INCLUDE_ASM(s32, "code_1A5830", calc_enemy_test_target); INCLUDE_ASM(s32, "code_1A5830", calc_enemy_test_target);
@ -229,7 +269,27 @@ INCLUDE_ASM(s32, "code_1A5830", EnemyFollowupAfflictTarget);
INCLUDE_ASM(s32, "code_1A5830", EnemyTestTarget); INCLUDE_ASM(s32, "code_1A5830", EnemyTestTarget);
INCLUDE_ASM(s32, "code_1A5830", DispatchDamageEvent); ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
Actor* actor;
s32 damageAmount;
s32 scriptExists;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
actor = get_actor(actorID);
damageAmount = get_variable(script, *args++);
if (dispatch_damage_event_actor_0(actor, damageAmount, get_variable(script, *args++)) < 0) {
return ApiStatus_BLOCK;
}
scriptExists = does_script_exist_by_ref(script) != 0;
return scriptExists * ApiStatus_DONE2;
}
ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) { ApiStatus DispatchEvent(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -267,7 +327,21 @@ ApiStatus func_8027D32C(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "code_1A5830", SetTargetOffset); INCLUDE_ASM(s32, "code_1A5830", SetTargetOffset);
INCLUDE_ASM(s32, "code_1A5830", func_8027D434); ApiStatus func_8027D434(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActorId actorID = get_variable(script, *args++);
s32 partIndex;
ActorPart* part;
if (actorID == ActorId_SELF) {
actorID = script->owner1.actorID;
}
partIndex = get_variable(script, *args++);
part = get_actor_part(get_actor(actorID), partIndex);
part->unk_70 = get_variable(script, *args++);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1A5830", func_8027D4C8); INCLUDE_ASM(s32, "code_1A5830", func_8027D4C8);
@ -392,7 +466,19 @@ ApiStatus GetLastDamage(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "code_1A5830", EnableActorGlow); INCLUDE_ASM(s32, "code_1A5830", EnableActorGlow);
// Cannot get gBattleStatus to load via lui+addiu no matter what I do
#ifdef NON_MATCHING
ApiStatus WasStatusInflicted(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
get_variable(script, *args++);
set_variable(script, *args++, gBattleStatus.wasStatusInflicted);
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "code_1A5830", WasStatusInflicted); INCLUDE_ASM(s32, "code_1A5830", WasStatusInflicted);
#endif
INCLUDE_ASM(s32, "code_1A5830", CopyStatusEffects); INCLUDE_ASM(s32, "code_1A5830", CopyStatusEffects);

View File

@ -524,10 +524,10 @@ s32 does_script_exist(s32 id) {
for (i = 0; i < MAX_SCRIPTS; i++) { for (i = 0; i < MAX_SCRIPTS; i++) {
scriptContextPtr = (*gCurrentScriptListPtr)[i]; scriptContextPtr = (*gCurrentScriptListPtr)[i];
if (scriptContextPtr != NULL && scriptContextPtr->id == id) { if (scriptContextPtr != NULL && scriptContextPtr->id == id) {
return 1; return TRUE;
} }
} }
return 0; return FALSE;
} }
s32 does_script_exist_by_ref(ScriptInstance* script) { s32 does_script_exist_by_ref(ScriptInstance* script) {
@ -535,10 +535,10 @@ s32 does_script_exist_by_ref(ScriptInstance* script) {
for (i = 0; i < MAX_SCRIPTS; i++) { for (i = 0; i < MAX_SCRIPTS; i++) {
if (script == (*gCurrentScriptListPtr)[i]) { if (script == (*gCurrentScriptListPtr)[i]) {
return 1; return TRUE;
} }
} }
return 0; return FALSE;
} }
void set_script_priority(ScriptInstance* script, s8 priority) { void set_script_priority(ScriptInstance* script, s8 priority) {

File diff suppressed because it is too large Load Diff