Decomp btl_check_enemies_defeated function (#327)

* Decompile btl_check_enemies_defeated function

* Run coverage.py

* Address style for pull request
This commit is contained in:
Nalfein (Kenny) 2021-07-21 02:46:15 -04:00 committed by GitHub
parent 45654bd1a2
commit 32de1484d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 18 deletions

View File

@ -1074,7 +1074,13 @@ INCLUDE_ASM(s32, "190B20", func_80263300);
INCLUDE_ASM(s32, "190B20", btl_are_all_enemies_defeated); INCLUDE_ASM(s32, "190B20", btl_are_all_enemies_defeated);
INCLUDE_ASM(s32, "190B20", btl_check_enemies_defeated); s32 btl_check_enemies_defeated(void) {
if (btl_are_all_enemies_defeated()) {
btl_set_state(0x1A);
return TRUE;
}
return FALSE;
}
s32 btl_check_player_defeated(void) { s32 btl_check_player_defeated(void) {
if (gPlayerData.curHP > 0) { if (gPlayerData.curHP > 0) {

View File

@ -1,17 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel btl_check_enemies_defeated
/* 191D14 80263434 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 191D18 80263438 AFBF0010 */ sw $ra, 0x10($sp)
/* 191D1C 8026343C 0C098CFA */ jal btl_are_all_enemies_defeated
/* 191D20 80263440 00000000 */ nop
/* 191D24 80263444 10400004 */ beqz $v0, .L80263458
/* 191D28 80263448 0000102D */ daddu $v0, $zero, $zero
/* 191D2C 8026344C 0C090464 */ jal btl_set_state
/* 191D30 80263450 2404001A */ addiu $a0, $zero, 0x1a
/* 191D34 80263454 24020001 */ addiu $v0, $zero, 1
.L80263458:
/* 191D38 80263458 8FBF0010 */ lw $ra, 0x10($sp)
/* 191D3C 8026345C 03E00008 */ jr $ra
/* 191D40 80263460 27BD0018 */ addiu $sp, $sp, 0x18