papermario/ver/us/asm/nonmatchings/16c8e0/btl_draw_ui.s
Lightning 1c64f15db1
Make a 224 functions show up in the elf (#530)
* Make a 224 functions show up in the elf

* fix up appendGfx_model (as an example)

* Changed all L labels to .L for local jump tables. Did not change global jump tables found in /data/ as .L is for local only

* Decompile even more misc battle map funcs (#531)

* decompile misc battle map funcs

* fix warnings

* Decompile misc battle map funcs (#528)

* .

* .

* resolve issues

* Update fx_api.c

* Update fx_api.c

* Make a 224 functions show up in the elf

* fix up appendGfx_model (as an example)

* Changed all L labels to .L for local jump tables. Did not change global jump tables found in /data/ as .L is for local only

* Fix merge issue

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
Co-authored-by: Alexander Faßbender <31699028+Brotenko@users.noreply.github.com>
2021-11-16 16:19:38 +09:00

237 lines
11 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
.balign 8
dlabel jtbl_8029C9F8
.word .L8023EB20_16D400, .L8023EC10_16D4F0, .L8023EC40_16D520, .L8023ED00_16D5E0, .L8023EB60_16D440, .L8023EB70_16D450, .L8023EB30_16D410, .L8023EB40_16D420, .L8023EB50_16D430, .L8023EB80_16D460, .L8023EB90_16D470, .L8023EBA0_16D480, .L8023EBB0_16D490, .L8023EBC0_16D4A0, .L8023EBE0_16D4C0, .L8023EBD0_16D4B0, .L8023EBF0_16D4D0, .L8023EC00_16D4E0, .L8023EC70_16D550, .L8023EC60_16D540, .L8023EC50_16D530, .L8023EC20_16D500, .L8023EC30_16D510, .L8023ECB0_16D590, .L8023ECC0_16D5A0, .L8023EC80_16D560, .L8023ECD0_16D5B0, .L8023ECE0_16D5C0, .L8023ECA0_16D580, .L8023ECF0_16D5D0, .L8023ED38_16D618, .L8023EC90_16D570, .L8023ED20_16D600, .L8023ED10_16D5F0, .L8023ED30_16D610, 0
.section .text
glabel btl_draw_ui
/* 16D35C 8023EA7C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 16D360 8023EA80 AFB10014 */ sw $s1, 0x14($sp)
/* 16D364 8023EA84 0000882D */ daddu $s1, $zero, $zero
/* 16D368 8023EA88 AFBF0018 */ sw $ra, 0x18($sp)
/* 16D36C 8023EA8C AFB00010 */ sw $s0, 0x10($sp)
/* 16D370 8023EA90 3C10800E */ lui $s0, %hi(gBattleState)
/* 16D374 8023EA94 8E10C068 */ lw $s0, %lo(gBattleState)($s0)
/* 16D378 8023EA98 3C04800E */ lui $a0, %hi(D_800DC4D0)
/* 16D37C 8023EA9C 2484C4D0 */ addiu $a0, $a0, %lo(D_800DC4D0)
/* 16D380 8023EAA0 8C820000 */ lw $v0, ($a0)
/* 16D384 8023EAA4 12020005 */ beq $s0, $v0, .L8023EABC
/* 16D388 8023EAA8 0200182D */ daddu $v1, $s0, $zero
/* 16D38C 8023EAAC 0040802D */ daddu $s0, $v0, $zero
/* 16D390 8023EAB0 AC830000 */ sw $v1, ($a0)
/* 16D394 8023EAB4 0808FABA */ j .L8023EAE8
/* 16D398 8023EAB8 24110001 */ addiu $s1, $zero, 1
.L8023EABC:
/* 16D39C 8023EABC 2402FFFF */ addiu $v0, $zero, -1
/* 16D3A0 8023EAC0 16020007 */ bne $s0, $v0, .L8023EAE0
/* 16D3A4 8023EAC4 00000000 */ nop
/* 16D3A8 8023EAC8 0C0900EF */ jal btl_update_starpoints_display
/* 16D3AC 8023EACC 00000000 */ nop
/* 16D3B0 8023EAD0 0C08FFE8 */ jal btl_draw_enemy_health_bars
/* 16D3B4 8023EAD4 00000000 */ nop
/* 16D3B8 8023EAD8 0808FB50 */ j .L8023ED40
/* 16D3BC 8023EADC 00000000 */ nop
.L8023EAE0:
/* 16D3C0 8023EAE0 12000099 */ beqz $s0, .L8023ED48
/* 16D3C4 8023EAE4 00000000 */ nop
.L8023EAE8:
/* 16D3C8 8023EAE8 0C0900EF */ jal btl_update_starpoints_display
/* 16D3CC 8023EAEC 00000000 */ nop
/* 16D3D0 8023EAF0 0C08FFE8 */ jal btl_draw_enemy_health_bars
/* 16D3D4 8023EAF4 00000000 */ nop
/* 16D3D8 8023EAF8 1620008F */ bnez $s1, .L8023ED38_16D618
/* 16D3DC 8023EAFC 2603FFFF */ addiu $v1, $s0, -1
/* 16D3E0 8023EB00 2C620023 */ sltiu $v0, $v1, 0x23
/* 16D3E4 8023EB04 1040008C */ beqz $v0, .L8023ED38_16D618
/* 16D3E8 8023EB08 00031080 */ sll $v0, $v1, 2
/* 16D3EC 8023EB0C 3C01802A */ lui $at, %hi(jtbl_8029C9F8)
/* 16D3F0 8023EB10 00220821 */ addu $at, $at, $v0
/* 16D3F4 8023EB14 8C22C9F8 */ lw $v0, %lo(jtbl_8029C9F8)($at)
/* 16D3F8 8023EB18 00400008 */ jr $v0
/* 16D3FC 8023EB1C 00000000 */ nop
.L8023EB20_16D400:
/* 16D400 8023EB20 0C0906AE */ jal btl_state_draw_normal_start
/* 16D404 8023EB24 00000000 */ nop
/* 16D408 8023EB28 0808FB4E */ j .L8023ED38_16D618
/* 16D40C 8023EB2C 00000000 */ nop
.L8023EB30_16D410:
/* 16D410 8023EB30 0C090AB0 */ jal btl_state_draw_begin_player_turn
/* 16D414 8023EB34 00000000 */ nop
/* 16D418 8023EB38 0808FB4E */ j .L8023ED38_16D618
/* 16D41C 8023EB3C 00000000 */ nop
.L8023EB40_16D420:
/* 16D420 8023EB40 0C090BBE */ jal btl_state_draw_begin_partner_turn
/* 16D424 8023EB44 00000000 */ nop
/* 16D428 8023EB48 0808FB4E */ j .L8023ED38_16D618
/* 16D42C 8023EB4C 00000000 */ nop
.L8023EB50_16D430:
/* 16D430 8023EB50 0C090E44 */ jal func_80243910
/* 16D434 8023EB54 00000000 */ nop
/* 16D438 8023EB58 0808FB4E */ j .L8023ED38_16D618
/* 16D43C 8023EB5C 00000000 */ nop
.L8023EB60_16D440:
/* 16D440 8023EB60 0C090807 */ jal btl_state_draw_begin_turn
/* 16D444 8023EB64 00000000 */ nop
/* 16D448 8023EB68 0808FB4E */ j .L8023ED38_16D618
/* 16D44C 8023EB6C 00000000 */ nop
.L8023EB70_16D450:
/* 16D450 8023EB70 0C090FF5 */ jal btl_state_draw_end_turn
/* 16D454 8023EB74 00000000 */ nop
/* 16D458 8023EB78 0808FB4E */ j .L8023ED38_16D618
/* 16D45C 8023EB7C 00000000 */ nop
.L8023EB80_16D460:
/* 16D460 8023EB80 0C090AEA */ jal btl_state_draw_switch_to_player
/* 16D464 8023EB84 00000000 */ nop
/* 16D468 8023EB88 0808FB4E */ j .L8023ED38_16D618
/* 16D46C 8023EB8C 00000000 */ nop
.L8023EB90_16D470:
/* 16D470 8023EB90 0C090BF6 */ jal btl_state_draw_switch_to_partner
/* 16D474 8023EB94 00000000 */ nop
/* 16D478 8023EB98 0808FB4E */ j .L8023ED38_16D618
/* 16D47C 8023EB9C 00000000 */ nop
.L8023EBA0_16D480:
/* 16D480 8023EBA0 0C090E74 */ jal btl_state_draw_prepare_menu
/* 16D484 8023EBA4 00000000 */ nop
/* 16D488 8023EBA8 0808FB4E */ j .L8023ED38_16D618
/* 16D48C 8023EBAC 00000000 */ nop
.L8023EBB0_16D490:
/* 16D490 8023EBB0 0C0AA060 */ jal btl_state_draw_player_menu
/* 16D494 8023EBB4 00000000 */ nop
/* 16D498 8023EBB8 0808FB4E */ j .L8023ED38_16D618
/* 16D49C 8023EBBC 00000000 */ nop
.L8023EBC0_16D4A0:
/* 16D4A0 8023EBC0 0C0AA6BA */ jal btl_state_draw_partner_menu
/* 16D4A4 8023EBC4 00000000 */ nop
/* 16D4A8 8023EBC8 0808FB4E */ j .L8023ED38_16D618
/* 16D4AC 8023EBCC 00000000 */ nop
.L8023EBD0_16D4B0:
/* 16D4B0 8023EBD0 0C0AA990 */ jal btl_state_draw_twink_menu
/* 16D4B4 8023EBD4 00000000 */ nop
/* 16D4B8 8023EBD8 0808FB4E */ j .L8023ED38_16D618
/* 16D4BC 8023EBDC 00000000 */ nop
.L8023EBE0_16D4C0:
/* 16D4C0 8023EBE0 0C0AA817 */ jal btl_state_draw_peach_menu
/* 16D4C4 8023EBE4 00000000 */ nop
/* 16D4C8 8023EBE8 0808FB4E */ j .L8023ED38_16D618
/* 16D4CC 8023EBEC 00000000 */ nop
.L8023EBF0_16D4D0:
/* 16D4D0 8023EBF0 0C0AAB36 */ jal btl_state_draw_select_target
/* 16D4D4 8023EBF4 00000000 */ nop
/* 16D4D8 8023EBF8 0808FB4E */ j .L8023ED38_16D618
/* 16D4DC 8023EBFC 00000000 */ nop
.L8023EC00_16D4E0:
/* 16D4E0 8023EC00 0C091912 */ jal btl_state_draw_player_move
/* 16D4E4 8023EC04 00000000 */ nop
/* 16D4E8 8023EC08 0808FB4E */ j .L8023ED38_16D618
/* 16D4EC 8023EC0C 00000000 */ nop
.L8023EC10_16D4F0:
/* 16D4F0 8023EC10 0C09203C */ jal btl_state_draw_first_stike
/* 16D4F4 8023EC14 00000000 */ nop
/* 16D4F8 8023EC18 0808FB4E */ j .L8023ED38_16D618
/* 16D4FC 8023EC1C 00000000 */ nop
.L8023EC20_16D500:
/* 16D500 8023EC20 0C091ACB */ jal filemenu_main_update_code
/* 16D504 8023EC24 00000000 */ nop
/* 16D508 8023EC28 0808FB4E */ j .L8023ED38_16D618
/* 16D50C 8023EC2C 00000000 */ nop
.L8023EC30_16D510:
/* 16D510 8023EC30 0C091CA9 */ jal btl_state_draw_end_partner_turn
/* 16D514 8023EC34 00000000 */ nop
/* 16D518 8023EC38 0808FB4E */ j .L8023ED38_16D618
/* 16D51C 8023EC3C 00000000 */ nop
.L8023EC40_16D520:
/* 16D520 8023EC40 0C09217F */ jal btl_state_draw_partner_striking_first
/* 16D524 8023EC44 00000000 */ nop
/* 16D528 8023EC48 0808FB4E */ j .L8023ED38_16D618
/* 16D52C 8023EC4C 00000000 */ nop
.L8023EC50_16D530:
/* 16D530 8023EC50 0C091EBF */ jal btl_state_draw_enemy_move
/* 16D534 8023EC54 00000000 */ nop
/* 16D538 8023EC58 0808FB4E */ j .L8023ED38_16D618
/* 16D53C 8023EC5C 00000000 */ nop
.L8023EC60_16D540:
/* 16D540 8023EC60 0C091D5A */ jal btl_state_draw_next_enemy
/* 16D544 8023EC64 00000000 */ nop
/* 16D548 8023EC68 0808FB4E */ j .L8023ED38_16D618
/* 16D54C 8023EC6C 00000000 */ nop
.L8023EC70_16D550:
/* 16D550 8023EC70 0C091C85 */ jal btl_state_draw_partner_move
/* 16D554 8023EC74 00000000 */ nop
/* 16D558 8023EC78 0808FB4E */ j .L8023ED38_16D618
/* 16D55C 8023EC7C 00000000 */ nop
.L8023EC80_16D560:
/* 16D560 8023EC80 0C0911C2 */ jal btl_state_draw_victory
/* 16D564 8023EC84 00000000 */ nop
/* 16D568 8023EC88 0808FB4E */ j .L8023ED38_16D618
/* 16D56C 8023EC8C 00000000 */ nop
.L8023EC90_16D570:
/* 16D570 8023EC90 0C091364 */ jal btl_state_draw_end_battle
/* 16D574 8023EC94 00000000 */ nop
/* 16D578 8023EC98 0808FB4E */ j .L8023ED38_16D618
/* 16D57C 8023EC9C 00000000 */ nop
.L8023ECA0_16D580:
/* 16D580 8023ECA0 0C0916B2 */ jal btl_state_draw_change_partner
/* 16D584 8023ECA4 00000000 */ nop
/* 16D588 8023ECA8 0808FB4E */ j .L8023ED38_16D618
/* 16D58C 8023ECAC 00000000 */ nop
.L8023ECB0_16D590:
/* 16D590 8023ECB0 0C09150E */ jal btl_state_draw_run_away
/* 16D594 8023ECB4 00000000 */ nop
/* 16D598 8023ECB8 0808FB4E */ j .L8023ED38_16D618
/* 16D59C 8023ECBC 00000000 */ nop
.L8023ECC0_16D5A0:
/* 16D5A0 8023ECC0 0C0913BE */ jal btl_state_draw_defend
/* 16D5A4 8023ECC4 00000000 */ nop
/* 16D5A8 8023ECC8 0808FB4E */ j .L8023ED38_16D618
/* 16D5AC 8023ECCC 00000000 */ nop
.L8023ECD0_16D5B0:
/* 16D5B0 8023ECD0 0C0915AC */ jal btl_state_draw_defeat
/* 16D5B4 8023ECD4 00000000 */ nop
/* 16D5B8 8023ECD8 0808FB4E */ j .L8023ED38_16D618
/* 16D5BC 8023ECDC 00000000 */ nop
.L8023ECE0_16D5C0:
/* 16D5C0 8023ECE0 0C091000 */ jal btl_state_draw_1C
/* 16D5C4 8023ECE4 00000000 */ nop
/* 16D5C8 8023ECE8 0808FB4E */ j .L8023ED38_16D618
/* 16D5CC 8023ECEC 00000000 */ nop
.L8023ECF0_16D5D0:
/* 16D5D0 8023ECF0 0C091292 */ jal btl_state_draw_end_training_battle
/* 16D5D4 8023ECF4 00000000 */ nop
/* 16D5D8 8023ECF8 0808FB4E */ j .L8023ED38_16D618
/* 16D5DC 8023ECFC 00000000 */ nop
.L8023ED00_16D5E0:
/* 16D5E0 8023ED00 0C0922A9 */ jal btl_state_draw_enemy_striking_first
/* 16D5E4 8023ED04 00000000 */ nop
/* 16D5E8 8023ED08 0808FB4E */ j .L8023ED38_16D618
/* 16D5EC 8023ED0C 00000000 */ nop
.L8023ED10_16D5F0:
/* 16D5F0 8023ED10 0C0AACCE */ jal btl_state_draw_22
/* 16D5F4 8023ED14 00000000 */ nop
/* 16D5F8 8023ED18 0808FB4E */ j .L8023ED38_16D618
/* 16D5FC 8023ED1C 00000000 */ nop
.L8023ED20_16D600:
/* 16D600 8023ED20 0C09806F */ jal btl_state_draw_celebration
/* 16D604 8023ED24 00000000 */ nop
/* 16D608 8023ED28 0808FB4E */ j .L8023ED38_16D618
/* 16D60C 8023ED2C 00000000 */ nop
.L8023ED30_16D610:
/* 16D610 8023ED30 0C09235E */ jal btl_state_draw_end_demo_battle
/* 16D614 8023ED34 00000000 */ nop
.L8023ED38_16D618:
/* 16D618 8023ED38 0C093BC2 */ jal btl_draw_popup_messages
/* 16D61C 8023ED3C 00000000 */ nop
.L8023ED40:
/* 16D620 8023ED40 0C03A5CF */ jal draw_status_ui
/* 16D624 8023ED44 00000000 */ nop
.L8023ED48:
/* 16D628 8023ED48 8FBF0018 */ lw $ra, 0x18($sp)
/* 16D62C 8023ED4C 8FB10014 */ lw $s1, 0x14($sp)
/* 16D630 8023ED50 8FB00010 */ lw $s0, 0x10($sp)
/* 16D634 8023ED54 03E00008 */ jr $ra
/* 16D638 8023ED58 27BD0020 */ addiu $sp, $sp, 0x20