diff --git a/include/variables.h b/include/variables.h index 16e326e9d1..c90a4aeec0 100644 --- a/include/variables.h +++ b/include/variables.h @@ -211,8 +211,6 @@ extern s32 gItemMenuScrollUpIcon; // Stats extern s32 gStatsMenuIconIDs[12]; - - extern s32 gGameState; extern s16 gNpcCount; extern s32 D_8009A64C; diff --git a/src/1A5830.c b/src/1A5830.c index f0e3f6f5b4..210b393089 100644 --- a/src/1A5830.c +++ b/src/1A5830.c @@ -400,7 +400,80 @@ ApiStatus func_8027CC10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_ASM(s32, "1A5830", EnemyDamageTarget); +ApiStatus EnemyDamageTarget(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + BattleStatus* battleStatus = &gBattleStatus; + ActorID actorID = get_variable(script, *args++); + Actor* actor; + s32 outVar; + s32 hitResult; + u8 attackStatus; + s32 battleStatusFlags1Temp; + s32 battleFlagsModifier; + + if (actorID == ACTOR_SELF) { + actorID = script->owner1.enemyID; + } + + actor = get_actor(actorID); + outVar = *args++; + battleStatus->currentAttackElement = *args++; + battleStatus->currentAttackEventSuppression = *args++; + battleStatus->currentAttackStatus = *args++; + battleStatus->currentAttackDamage = get_variable(script, *args++); + battleFlagsModifier = *args++; + + if (battleFlagsModifier & 0x10) { + gBattleStatus.flags1 |= 0x10; + gBattleStatus.flags1 &= ~0x20; + } else if (battleFlagsModifier & 0x20) { + gBattleStatus.flags1 &= ~0x10; + gBattleStatus.flags1 |= 0x20; + } else { + gBattleStatus.flags1 &= ~0x10; + gBattleStatus.flags1 &= ~0x20; + } + + if (battleFlagsModifier & 0x40) { + gBattleStatus.flags1 |= 0x40; + } else { + gBattleStatus.flags1 &= ~0x40; + } + if (battleFlagsModifier & 0x200) { + gBattleStatus.flags1 |= 0x200; + } else { + gBattleStatus.flags1 &= ~0x200; + } + if (battleFlagsModifier & 0x80) { + gBattleStatus.flags1 |= 0x80; + } else { + gBattleStatus.flags1 &= ~0x80; + } + + attackStatus = battleStatus->currentAttackStatus; + battleStatus->currentTargetID = actor->targetActorID; + + battleStatus->currentTargetPart = actor->targetPartIndex; + battleStatus->statusChance = attackStatus; + + if ((attackStatus & 0xFF) == 0xFF) { + battleStatus->statusChance = 0; + } + + battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; + hitResult = calc_enemy_damage_target(actor); + + if (hitResult < 0) { + return ApiStatus_FINISH; + } + + set_variable(script, outVar, hitResult); + if (!(does_script_exist_by_ref(script))) { + return ApiStatus_FINISH; + } + + return ApiStatus_DONE2; +} ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall) { BattleStatus* battleStatus = &gBattleStatus; @@ -440,8 +513,77 @@ ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall) return ApiStatus_DONE2; } +ApiStatus EnemyTestTarget(ScriptInstance *script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + BattleStatus* battleStatus = &gBattleStatus; + ActorID actorID = get_variable(script, *args++); + Actor *actor; + s32 outVar; + s32 hitResult; + u8 attackStatus; + s32 battleStatusFlags1Temp; + s32 battleFlagsModifier; -INCLUDE_ASM(s32, "1A5830", EnemyTestTarget); + if (actorID == ACTOR_SELF) { + actorID = script->owner1.enemyID; + } + + actor = get_actor(actorID); + outVar = *args++; + battleStatus->currentAttackElement = *args++; + battleStatus->currentAttackEventSuppression = 0; + battleStatus->currentAttackStatus = *args++; + battleStatus->currentAttackDamage = get_variable(script, *args++); + battleFlagsModifier = *args++; + + if (battleFlagsModifier & 0x10) { + gBattleStatus.flags1 |= 0x10; + gBattleStatus.flags1 &= ~0x20; + } else if (battleFlagsModifier & 0x20) { + gBattleStatus.flags1 &= ~0x10; + gBattleStatus.flags1 |= 0x20; + } else { + gBattleStatus.flags1 &= ~0x10; + gBattleStatus.flags1 &= ~0x20; + } + + if (battleFlagsModifier & 0x40) { + gBattleStatus.flags1 |= 0x40; + } else { + gBattleStatus.flags1 &= ~0x40; + } + if (battleFlagsModifier & 0x200) { + gBattleStatus.flags1 |= 0x200; + } else { + gBattleStatus.flags1 &= ~0x200; + } + if (battleFlagsModifier & 0x80) { + gBattleStatus.flags1 |= 0x80; + } else { + gBattleStatus.flags1 &= ~0x80; + } + + attackStatus = battleStatus->currentAttackStatus; + battleStatus->currentTargetID = actor->targetActorID; + + battleStatus->currentTargetPart = actor->targetPartIndex; + battleStatus->statusChance = attackStatus; + + if ((attackStatus & 0xFF) == 0xFF) { + battleStatus->statusChance = 0; + } + + battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8; + hitResult = calc_enemy_test_target(actor); + + if (hitResult < 0) { + return ApiStatus_FINISH; + } + + set_variable(script, outVar, hitResult); + + return ApiStatus_DONE2; +} ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; diff --git a/src/1a1f0_len_5390.c b/src/1a1f0_len_5390.c index 0ef4f1829e..ad8d1bd786 100644 --- a/src/1a1f0_len_5390.c +++ b/src/1a1f0_len_5390.c @@ -334,7 +334,7 @@ void draw_encounters_pre_battle(void) { } } -extern s16 D_8009A668; +extern s16* D_8009A668; INCLUDE_ASM(s32, "1a1f0_len_5390", show_first_strike_message); diff --git a/src/EA6FD0.c b/src/EA6FD0.c index 88e6958fd8..c84a706a8b 100644 --- a/src/EA6FD0.c +++ b/src/EA6FD0.c @@ -1,3 +1,11 @@ #include "common.h" -INCLUDE_ASM(s32, "EA6FD0", func_80240000_EA6FD0); +s32 func_80240000_EA6FD0(void) { + s32 temp = dead_get_variable(NULL, SI_SAVE_VAR(0)); + + if (temp <= 0x26) { + return 0x19010F; + } else { + return 0x190110; + } +} diff --git a/src/EB8E50.c b/src/EB8E50.c index 93d89d22b5..789c17438a 100644 --- a/src/EB8E50.c +++ b/src/EB8E50.c @@ -9,4 +9,7 @@ const char ascii_EC2028[] = "flo_09"; const char ascii_EC2030[] = "flo_08"; static const f64 rodata_alignment = 0.0; -INCLUDE_ASM(s32, "EB8E50", func_80240000_EB8E50); +ApiStatus func_80240000_EB8E50(void) { + func_80077BD0(0, 0, 0, 0, 0, 0); + return ApiStatus_DONE2; +} diff --git a/ver/us/asm/nonmatchings/1A5830/EnemyDamageTarget.s b/ver/us/asm/nonmatchings/1A5830/EnemyDamageTarget.s deleted file mode 100644 index 8216cb83e1..0000000000 --- a/ver/us/asm/nonmatchings/1A5830/EnemyDamageTarget.s +++ /dev/null @@ -1,154 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel EnemyDamageTarget -/* 1AB594 8027CCB4 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 1AB598 8027CCB8 AFB3001C */ sw $s3, 0x1c($sp) -/* 1AB59C 8027CCBC 0080982D */ daddu $s3, $a0, $zero -/* 1AB5A0 8027CCC0 AFBF0024 */ sw $ra, 0x24($sp) -/* 1AB5A4 8027CCC4 AFB40020 */ sw $s4, 0x20($sp) -/* 1AB5A8 8027CCC8 AFB20018 */ sw $s2, 0x18($sp) -/* 1AB5AC 8027CCCC AFB10014 */ sw $s1, 0x14($sp) -/* 1AB5B0 8027CCD0 AFB00010 */ sw $s0, 0x10($sp) -/* 1AB5B4 8027CCD4 8E70000C */ lw $s0, 0xc($s3) -/* 1AB5B8 8027CCD8 8E050000 */ lw $a1, ($s0) -/* 1AB5BC 8027CCDC 0C0B1EAF */ jal get_variable -/* 1AB5C0 8027CCE0 26100004 */ addiu $s0, $s0, 4 -/* 1AB5C4 8027CCE4 0040202D */ daddu $a0, $v0, $zero -/* 1AB5C8 8027CCE8 3C11800E */ lui $s1, %hi(gBattleStatus) -/* 1AB5CC 8027CCEC 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) -/* 1AB5D0 8027CCF0 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AB5D4 8027CCF4 14820002 */ bne $a0, $v0, .L8027CD00 -/* 1AB5D8 8027CCF8 00000000 */ nop -/* 1AB5DC 8027CCFC 8E640148 */ lw $a0, 0x148($s3) -.L8027CD00: -/* 1AB5E0 8027CD00 0C09A75B */ jal get_actor -/* 1AB5E4 8027CD04 00000000 */ nop -/* 1AB5E8 8027CD08 8E140000 */ lw $s4, ($s0) -/* 1AB5EC 8027CD0C 26100004 */ addiu $s0, $s0, 4 -/* 1AB5F0 8027CD10 8E030000 */ lw $v1, ($s0) -/* 1AB5F4 8027CD14 26100004 */ addiu $s0, $s0, 4 -/* 1AB5F8 8027CD18 0260202D */ daddu $a0, $s3, $zero -/* 1AB5FC 8027CD1C 0040902D */ daddu $s2, $v0, $zero -/* 1AB600 8027CD20 AE230188 */ sw $v1, 0x188($s1) -/* 1AB604 8027CD24 8E030000 */ lw $v1, ($s0) -/* 1AB608 8027CD28 26100004 */ addiu $s0, $s0, 4 -/* 1AB60C 8027CD2C AE23018C */ sw $v1, 0x18c($s1) -/* 1AB610 8027CD30 8E030000 */ lw $v1, ($s0) -/* 1AB614 8027CD34 26100004 */ addiu $s0, $s0, 4 -/* 1AB618 8027CD38 AE230190 */ sw $v1, 0x190($s1) -/* 1AB61C 8027CD3C 8E050000 */ lw $a1, ($s0) -/* 1AB620 8027CD40 0C0B1EAF */ jal get_variable -/* 1AB624 8027CD44 26100004 */ addiu $s0, $s0, 4 -/* 1AB628 8027CD48 A622017E */ sh $v0, 0x17e($s1) -/* 1AB62C 8027CD4C 8E050000 */ lw $a1, ($s0) -/* 1AB630 8027CD50 30A20010 */ andi $v0, $a1, 0x10 -/* 1AB634 8027CD54 10400004 */ beqz $v0, .L8027CD68 -/* 1AB638 8027CD58 2403FFDF */ addiu $v1, $zero, -0x21 -/* 1AB63C 8027CD5C 8E220000 */ lw $v0, ($s1) -/* 1AB640 8027CD60 0809F364 */ j .L8027CD90 -/* 1AB644 8027CD64 34420010 */ ori $v0, $v0, 0x10 -.L8027CD68: -/* 1AB648 8027CD68 30A20020 */ andi $v0, $a1, 0x20 -/* 1AB64C 8027CD6C 10400005 */ beqz $v0, .L8027CD84 -/* 1AB650 8027CD70 2403FFEF */ addiu $v1, $zero, -0x11 -/* 1AB654 8027CD74 8E220000 */ lw $v0, ($s1) -/* 1AB658 8027CD78 00431024 */ and $v0, $v0, $v1 -/* 1AB65C 8027CD7C 0809F365 */ j .L8027CD94 -/* 1AB660 8027CD80 34420020 */ ori $v0, $v0, 0x20 -.L8027CD84: -/* 1AB664 8027CD84 8E220000 */ lw $v0, ($s1) -/* 1AB668 8027CD88 00431024 */ and $v0, $v0, $v1 -/* 1AB66C 8027CD8C 2403FFDF */ addiu $v1, $zero, -0x21 -.L8027CD90: -/* 1AB670 8027CD90 00431024 */ and $v0, $v0, $v1 -.L8027CD94: -/* 1AB674 8027CD94 AE220000 */ sw $v0, ($s1) -/* 1AB678 8027CD98 30A20040 */ andi $v0, $a1, 0x40 -/* 1AB67C 8027CD9C 10400007 */ beqz $v0, .L8027CDBC -/* 1AB680 8027CDA0 2404FFBF */ addiu $a0, $zero, -0x41 -/* 1AB684 8027CDA4 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1AB688 8027CDA8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1AB68C 8027CDAC 8C620000 */ lw $v0, ($v1) -/* 1AB690 8027CDB0 34420040 */ ori $v0, $v0, 0x40 -/* 1AB694 8027CDB4 0809F374 */ j .L8027CDD0 -/* 1AB698 8027CDB8 AC620000 */ sw $v0, ($v1) -.L8027CDBC: -/* 1AB69C 8027CDBC 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1AB6A0 8027CDC0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1AB6A4 8027CDC4 8C430000 */ lw $v1, ($v0) -/* 1AB6A8 8027CDC8 00641824 */ and $v1, $v1, $a0 -/* 1AB6AC 8027CDCC AC430000 */ sw $v1, ($v0) -.L8027CDD0: -/* 1AB6B0 8027CDD0 30A20200 */ andi $v0, $a1, 0x200 -/* 1AB6B4 8027CDD4 10400007 */ beqz $v0, .L8027CDF4 -/* 1AB6B8 8027CDD8 2404FDFF */ addiu $a0, $zero, -0x201 -/* 1AB6BC 8027CDDC 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1AB6C0 8027CDE0 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1AB6C4 8027CDE4 8C620000 */ lw $v0, ($v1) -/* 1AB6C8 8027CDE8 34420200 */ ori $v0, $v0, 0x200 -/* 1AB6CC 8027CDEC 0809F382 */ j .L8027CE08 -/* 1AB6D0 8027CDF0 AC620000 */ sw $v0, ($v1) -.L8027CDF4: -/* 1AB6D4 8027CDF4 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1AB6D8 8027CDF8 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1AB6DC 8027CDFC 8C430000 */ lw $v1, ($v0) -/* 1AB6E0 8027CE00 00641824 */ and $v1, $v1, $a0 -/* 1AB6E4 8027CE04 AC430000 */ sw $v1, ($v0) -.L8027CE08: -/* 1AB6E8 8027CE08 30A20080 */ andi $v0, $a1, 0x80 -/* 1AB6EC 8027CE0C 10400007 */ beqz $v0, .L8027CE2C -/* 1AB6F0 8027CE10 2404FF7F */ addiu $a0, $zero, -0x81 -/* 1AB6F4 8027CE14 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1AB6F8 8027CE18 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1AB6FC 8027CE1C 8C620000 */ lw $v0, ($v1) -/* 1AB700 8027CE20 34420080 */ ori $v0, $v0, 0x80 -/* 1AB704 8027CE24 0809F390 */ j .L8027CE40 -/* 1AB708 8027CE28 AC620000 */ sw $v0, ($v1) -.L8027CE2C: -/* 1AB70C 8027CE2C 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1AB710 8027CE30 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1AB714 8027CE34 8C430000 */ lw $v1, ($v0) -/* 1AB718 8027CE38 00641824 */ and $v1, $v1, $a0 -/* 1AB71C 8027CE3C AC430000 */ sw $v1, ($v0) -.L8027CE40: -/* 1AB720 8027CE40 96420428 */ lhu $v0, 0x428($s2) -/* 1AB724 8027CE44 92230193 */ lbu $v1, 0x193($s1) -/* 1AB728 8027CE48 A62201A0 */ sh $v0, 0x1a0($s1) -/* 1AB72C 8027CE4C 92420426 */ lbu $v0, 0x426($s2) -/* 1AB730 8027CE50 A2230194 */ sb $v1, 0x194($s1) -/* 1AB734 8027CE54 306300FF */ andi $v1, $v1, 0xff -/* 1AB738 8027CE58 A22201A2 */ sb $v0, 0x1a2($s1) -/* 1AB73C 8027CE5C 240200FF */ addiu $v0, $zero, 0xff -/* 1AB740 8027CE60 50620001 */ beql $v1, $v0, .L8027CE68 -/* 1AB744 8027CE64 A2200194 */ sb $zero, 0x194($s1) -.L8027CE68: -/* 1AB748 8027CE68 8E220190 */ lw $v0, 0x190($s1) -/* 1AB74C 8027CE6C 0240202D */ daddu $a0, $s2, $zero -/* 1AB750 8027CE70 30420F00 */ andi $v0, $v0, 0xf00 -/* 1AB754 8027CE74 00021203 */ sra $v0, $v0, 8 -/* 1AB758 8027CE78 0C09DD0B */ jal calc_enemy_damage_target -/* 1AB75C 8027CE7C A2220195 */ sb $v0, 0x195($s1) -/* 1AB760 8027CE80 0440000B */ bltz $v0, .L8027CEB0 -/* 1AB764 8027CE84 0260202D */ daddu $a0, $s3, $zero -/* 1AB768 8027CE88 0280282D */ daddu $a1, $s4, $zero -/* 1AB76C 8027CE8C 0C0B2026 */ jal set_variable -/* 1AB770 8027CE90 0040302D */ daddu $a2, $v0, $zero -/* 1AB774 8027CE94 0C0B1069 */ jal does_script_exist_by_ref -/* 1AB778 8027CE98 0260202D */ daddu $a0, $s3, $zero -/* 1AB77C 8027CE9C 0040182D */ daddu $v1, $v0, $zero -/* 1AB780 8027CEA0 10600004 */ beqz $v1, .L8027CEB4 -/* 1AB784 8027CEA4 240200FF */ addiu $v0, $zero, 0xff -/* 1AB788 8027CEA8 0809F3AD */ j .L8027CEB4 -/* 1AB78C 8027CEAC 24020002 */ addiu $v0, $zero, 2 -.L8027CEB0: -/* 1AB790 8027CEB0 240200FF */ addiu $v0, $zero, 0xff -.L8027CEB4: -/* 1AB794 8027CEB4 8FBF0024 */ lw $ra, 0x24($sp) -/* 1AB798 8027CEB8 8FB40020 */ lw $s4, 0x20($sp) -/* 1AB79C 8027CEBC 8FB3001C */ lw $s3, 0x1c($sp) -/* 1AB7A0 8027CEC0 8FB20018 */ lw $s2, 0x18($sp) -/* 1AB7A4 8027CEC4 8FB10014 */ lw $s1, 0x14($sp) -/* 1AB7A8 8027CEC8 8FB00010 */ lw $s0, 0x10($sp) -/* 1AB7AC 8027CECC 03E00008 */ jr $ra -/* 1AB7B0 8027CED0 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/1A5830/EnemyTestTarget.s b/ver/us/asm/nonmatchings/1A5830/EnemyTestTarget.s deleted file mode 100644 index 19a8f258fd..0000000000 --- a/ver/us/asm/nonmatchings/1A5830/EnemyTestTarget.s +++ /dev/null @@ -1,147 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel EnemyTestTarget -/* 1AB898 8027CFB8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 1AB89C 8027CFBC AFB3001C */ sw $s3, 0x1c($sp) -/* 1AB8A0 8027CFC0 0080982D */ daddu $s3, $a0, $zero -/* 1AB8A4 8027CFC4 AFBF0024 */ sw $ra, 0x24($sp) -/* 1AB8A8 8027CFC8 AFB40020 */ sw $s4, 0x20($sp) -/* 1AB8AC 8027CFCC AFB20018 */ sw $s2, 0x18($sp) -/* 1AB8B0 8027CFD0 AFB10014 */ sw $s1, 0x14($sp) -/* 1AB8B4 8027CFD4 AFB00010 */ sw $s0, 0x10($sp) -/* 1AB8B8 8027CFD8 8E70000C */ lw $s0, 0xc($s3) -/* 1AB8BC 8027CFDC 8E050000 */ lw $a1, ($s0) -/* 1AB8C0 8027CFE0 0C0B1EAF */ jal get_variable -/* 1AB8C4 8027CFE4 26100004 */ addiu $s0, $s0, 4 -/* 1AB8C8 8027CFE8 0040202D */ daddu $a0, $v0, $zero -/* 1AB8CC 8027CFEC 3C11800E */ lui $s1, %hi(gBattleStatus) -/* 1AB8D0 8027CFF0 2631C070 */ addiu $s1, $s1, %lo(gBattleStatus) -/* 1AB8D4 8027CFF4 2402FF81 */ addiu $v0, $zero, -0x7f -/* 1AB8D8 8027CFF8 14820002 */ bne $a0, $v0, .L8027D004 -/* 1AB8DC 8027CFFC 00000000 */ nop -/* 1AB8E0 8027D000 8E640148 */ lw $a0, 0x148($s3) -.L8027D004: -/* 1AB8E4 8027D004 0C09A75B */ jal get_actor -/* 1AB8E8 8027D008 00000000 */ nop -/* 1AB8EC 8027D00C 8E140000 */ lw $s4, ($s0) -/* 1AB8F0 8027D010 26100004 */ addiu $s0, $s0, 4 -/* 1AB8F4 8027D014 8E030000 */ lw $v1, ($s0) -/* 1AB8F8 8027D018 26100004 */ addiu $s0, $s0, 4 -/* 1AB8FC 8027D01C 0260202D */ daddu $a0, $s3, $zero -/* 1AB900 8027D020 0040902D */ daddu $s2, $v0, $zero -/* 1AB904 8027D024 AE20018C */ sw $zero, 0x18c($s1) -/* 1AB908 8027D028 AE230188 */ sw $v1, 0x188($s1) -/* 1AB90C 8027D02C 8E030000 */ lw $v1, ($s0) -/* 1AB910 8027D030 26100004 */ addiu $s0, $s0, 4 -/* 1AB914 8027D034 AE230190 */ sw $v1, 0x190($s1) -/* 1AB918 8027D038 8E050000 */ lw $a1, ($s0) -/* 1AB91C 8027D03C 0C0B1EAF */ jal get_variable -/* 1AB920 8027D040 26100004 */ addiu $s0, $s0, 4 -/* 1AB924 8027D044 A622017E */ sh $v0, 0x17e($s1) -/* 1AB928 8027D048 8E050000 */ lw $a1, ($s0) -/* 1AB92C 8027D04C 30A20010 */ andi $v0, $a1, 0x10 -/* 1AB930 8027D050 10400004 */ beqz $v0, .L8027D064 -/* 1AB934 8027D054 2403FFDF */ addiu $v1, $zero, -0x21 -/* 1AB938 8027D058 8E220000 */ lw $v0, ($s1) -/* 1AB93C 8027D05C 0809F423 */ j .L8027D08C -/* 1AB940 8027D060 34420010 */ ori $v0, $v0, 0x10 -.L8027D064: -/* 1AB944 8027D064 30A20020 */ andi $v0, $a1, 0x20 -/* 1AB948 8027D068 10400005 */ beqz $v0, .L8027D080 -/* 1AB94C 8027D06C 2403FFEF */ addiu $v1, $zero, -0x11 -/* 1AB950 8027D070 8E220000 */ lw $v0, ($s1) -/* 1AB954 8027D074 00431024 */ and $v0, $v0, $v1 -/* 1AB958 8027D078 0809F424 */ j .L8027D090 -/* 1AB95C 8027D07C 34420020 */ ori $v0, $v0, 0x20 -.L8027D080: -/* 1AB960 8027D080 8E220000 */ lw $v0, ($s1) -/* 1AB964 8027D084 00431024 */ and $v0, $v0, $v1 -/* 1AB968 8027D088 2403FFDF */ addiu $v1, $zero, -0x21 -.L8027D08C: -/* 1AB96C 8027D08C 00431024 */ and $v0, $v0, $v1 -.L8027D090: -/* 1AB970 8027D090 AE220000 */ sw $v0, ($s1) -/* 1AB974 8027D094 30A20040 */ andi $v0, $a1, 0x40 -/* 1AB978 8027D098 10400007 */ beqz $v0, .L8027D0B8 -/* 1AB97C 8027D09C 2404FFBF */ addiu $a0, $zero, -0x41 -/* 1AB980 8027D0A0 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1AB984 8027D0A4 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1AB988 8027D0A8 8C620000 */ lw $v0, ($v1) -/* 1AB98C 8027D0AC 34420040 */ ori $v0, $v0, 0x40 -/* 1AB990 8027D0B0 0809F433 */ j .L8027D0CC -/* 1AB994 8027D0B4 AC620000 */ sw $v0, ($v1) -.L8027D0B8: -/* 1AB998 8027D0B8 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1AB99C 8027D0BC 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1AB9A0 8027D0C0 8C430000 */ lw $v1, ($v0) -/* 1AB9A4 8027D0C4 00641824 */ and $v1, $v1, $a0 -/* 1AB9A8 8027D0C8 AC430000 */ sw $v1, ($v0) -.L8027D0CC: -/* 1AB9AC 8027D0CC 30A20200 */ andi $v0, $a1, 0x200 -/* 1AB9B0 8027D0D0 10400007 */ beqz $v0, .L8027D0F0 -/* 1AB9B4 8027D0D4 2404FDFF */ addiu $a0, $zero, -0x201 -/* 1AB9B8 8027D0D8 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1AB9BC 8027D0DC 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1AB9C0 8027D0E0 8C620000 */ lw $v0, ($v1) -/* 1AB9C4 8027D0E4 34420200 */ ori $v0, $v0, 0x200 -/* 1AB9C8 8027D0E8 0809F441 */ j .L8027D104 -/* 1AB9CC 8027D0EC AC620000 */ sw $v0, ($v1) -.L8027D0F0: -/* 1AB9D0 8027D0F0 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1AB9D4 8027D0F4 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1AB9D8 8027D0F8 8C430000 */ lw $v1, ($v0) -/* 1AB9DC 8027D0FC 00641824 */ and $v1, $v1, $a0 -/* 1AB9E0 8027D100 AC430000 */ sw $v1, ($v0) -.L8027D104: -/* 1AB9E4 8027D104 30A20080 */ andi $v0, $a1, 0x80 -/* 1AB9E8 8027D108 10400007 */ beqz $v0, .L8027D128 -/* 1AB9EC 8027D10C 2404FF7F */ addiu $a0, $zero, -0x81 -/* 1AB9F0 8027D110 3C03800E */ lui $v1, %hi(gBattleStatus) -/* 1AB9F4 8027D114 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) -/* 1AB9F8 8027D118 8C620000 */ lw $v0, ($v1) -/* 1AB9FC 8027D11C 34420080 */ ori $v0, $v0, 0x80 -/* 1ABA00 8027D120 0809F44F */ j .L8027D13C -/* 1ABA04 8027D124 AC620000 */ sw $v0, ($v1) -.L8027D128: -/* 1ABA08 8027D128 3C02800E */ lui $v0, %hi(gBattleStatus) -/* 1ABA0C 8027D12C 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) -/* 1ABA10 8027D130 8C430000 */ lw $v1, ($v0) -/* 1ABA14 8027D134 00641824 */ and $v1, $v1, $a0 -/* 1ABA18 8027D138 AC430000 */ sw $v1, ($v0) -.L8027D13C: -/* 1ABA1C 8027D13C 96420428 */ lhu $v0, 0x428($s2) -/* 1ABA20 8027D140 92230193 */ lbu $v1, 0x193($s1) -/* 1ABA24 8027D144 A62201A0 */ sh $v0, 0x1a0($s1) -/* 1ABA28 8027D148 92420426 */ lbu $v0, 0x426($s2) -/* 1ABA2C 8027D14C A2230194 */ sb $v1, 0x194($s1) -/* 1ABA30 8027D150 306300FF */ andi $v1, $v1, 0xff -/* 1ABA34 8027D154 A22201A2 */ sb $v0, 0x1a2($s1) -/* 1ABA38 8027D158 240200FF */ addiu $v0, $zero, 0xff -/* 1ABA3C 8027D15C 50620001 */ beql $v1, $v0, .L8027D164 -/* 1ABA40 8027D160 A2200194 */ sb $zero, 0x194($s1) -.L8027D164: -/* 1ABA44 8027D164 8E220190 */ lw $v0, 0x190($s1) -/* 1ABA48 8027D168 0240202D */ daddu $a0, $s2, $zero -/* 1ABA4C 8027D16C 30420F00 */ andi $v0, $v0, 0xf00 -/* 1ABA50 8027D170 00021203 */ sra $v0, $v0, 8 -/* 1ABA54 8027D174 0C09DC7E */ jal calc_enemy_test_target -/* 1ABA58 8027D178 A2220195 */ sb $v0, 0x195($s1) -/* 1ABA5C 8027D17C 04400006 */ bltz $v0, .L8027D198 -/* 1ABA60 8027D180 0260202D */ daddu $a0, $s3, $zero -/* 1ABA64 8027D184 0280282D */ daddu $a1, $s4, $zero -/* 1ABA68 8027D188 0C0B2026 */ jal set_variable -/* 1ABA6C 8027D18C 0040302D */ daddu $a2, $v0, $zero -/* 1ABA70 8027D190 0809F467 */ j .L8027D19C -/* 1ABA74 8027D194 24020002 */ addiu $v0, $zero, 2 -.L8027D198: -/* 1ABA78 8027D198 240200FF */ addiu $v0, $zero, 0xff -.L8027D19C: -/* 1ABA7C 8027D19C 8FBF0024 */ lw $ra, 0x24($sp) -/* 1ABA80 8027D1A0 8FB40020 */ lw $s4, 0x20($sp) -/* 1ABA84 8027D1A4 8FB3001C */ lw $s3, 0x1c($sp) -/* 1ABA88 8027D1A8 8FB20018 */ lw $s2, 0x18($sp) -/* 1ABA8C 8027D1AC 8FB10014 */ lw $s1, 0x14($sp) -/* 1ABA90 8027D1B0 8FB00010 */ lw $s0, 0x10($sp) -/* 1ABA94 8027D1B4 03E00008 */ jr $ra -/* 1ABA98 8027D1B8 27BD0028 */ addiu $sp, $sp, 0x28 diff --git a/ver/us/asm/nonmatchings/EA6FD0/func_80240000_EA6FD0.s b/ver/us/asm/nonmatchings/EA6FD0/func_80240000_EA6FD0.s deleted file mode 100644 index 1fae6be4ba..0000000000 --- a/ver/us/asm/nonmatchings/EA6FD0/func_80240000_EA6FD0.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_EA6FD0 -/* EA6FD0 80240000 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* EA6FD4 80240004 AFBF0010 */ sw $ra, 0x10($sp) -/* EA6FD8 80240008 3C05F5DE */ lui $a1, 0xf5de -/* EA6FDC 8024000C 34A50180 */ ori $a1, $a1, 0x180 -/* EA6FE0 80240010 0C0B53A3 */ jal dead_get_variable -/* EA6FE4 80240014 0000202D */ daddu $a0, $zero, $zero -/* EA6FE8 80240018 28430027 */ slti $v1, $v0, 0x27 -/* EA6FEC 8024001C 3C020019 */ lui $v0, 0x19 -/* EA6FF0 80240020 14600003 */ bnez $v1, .L80240030 -/* EA6FF4 80240024 3442010F */ ori $v0, $v0, 0x10f -/* EA6FF8 80240028 3C020019 */ lui $v0, 0x19 -/* EA6FFC 8024002C 34420110 */ ori $v0, $v0, 0x110 -.L80240030: -/* EA7000 80240030 8FBF0010 */ lw $ra, 0x10($sp) -/* EA7004 80240034 03E00008 */ jr $ra -/* EA7008 80240038 27BD0018 */ addiu $sp, $sp, 0x18 -/* EA700C 8024003C 00000000 */ nop diff --git a/ver/us/asm/nonmatchings/EB8E50/func_80240000_EB8E50.s b/ver/us/asm/nonmatchings/EB8E50/func_80240000_EB8E50.s deleted file mode 100644 index 884c7e915f..0000000000 --- a/ver/us/asm/nonmatchings/EB8E50/func_80240000_EB8E50.s +++ /dev/null @@ -1,20 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_EB8E50 -/* EB8E50 80240000 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* EB8E54 80240004 0000202D */ daddu $a0, $zero, $zero -/* EB8E58 80240008 0080282D */ daddu $a1, $a0, $zero -/* EB8E5C 8024000C 0080302D */ daddu $a2, $a0, $zero -/* EB8E60 80240010 0080382D */ daddu $a3, $a0, $zero -/* EB8E64 80240014 AFBF0018 */ sw $ra, 0x18($sp) -/* EB8E68 80240018 AFA00010 */ sw $zero, 0x10($sp) -/* EB8E6C 8024001C 0C01DEF4 */ jal func_80077BD0 -/* EB8E70 80240020 AFA00014 */ sw $zero, 0x14($sp) -/* EB8E74 80240024 8FBF0018 */ lw $ra, 0x18($sp) -/* EB8E78 80240028 24020002 */ addiu $v0, $zero, 2 -/* EB8E7C 8024002C 03E00008 */ jr $ra -/* EB8E80 80240030 27BD0020 */ addiu $sp, $sp, 0x20 -/* EB8E84 80240034 00000000 */ nop -/* EB8E88 80240038 00000000 */ nop -/* EB8E8C 8024003C 00000000 */ nop