Skip to content

Commit

Permalink
Merge pull request #146 from Eebit/ui_targetselection
Browse files Browse the repository at this point in the history
Decompile ui_targetselection into uiselecttarget
  • Loading branch information
RevoSucks authored Apr 17, 2022
2 parents c2b7de2 + 5543e6c commit 94d53ef
Show file tree
Hide file tree
Showing 19 changed files with 574 additions and 830 deletions.
2 changes: 1 addition & 1 deletion asm/bb.s
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ sub_8035A0C: @ 0x08035A0C
adds r6, #0x4c
movs r0, #0
ldrsh r4, [r6, r0]
bl sub_804FD28
bl GetSelectTargetCount
cmp r4, r0
bne _08035A2A
adds r0, r5, #0
Expand Down
6 changes: 3 additions & 3 deletions asm/bmcommanddbg.s
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ CanUnitUseAttack: @ 0x08034428
str r0, [r1]
ldr r0, _0803446C @ AddUnitToTargetListIfNotAllied
bl ForEachUnitInRange
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _0803445A
movs r0, #1
Expand All @@ -201,7 +201,7 @@ CanActiveUnitUseRescue: @ 0x08034470
ldr r0, _08034488 @ gActiveUnit
ldr r0, [r0]
bl MakeRescueTargetList
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08034484
movs r0, #1
Expand All @@ -219,7 +219,7 @@ CanActiveUnitUseTrade: @ 0x0803448C
ldr r0, _080344A4 @ gActiveUnit
ldr r0, [r0]
bl MakeTradeTargetList
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _080344A0
movs r0, #1
Expand Down
36 changes: 18 additions & 18 deletions asm/bmmenu.s
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ RescueUsability: @ 0x080228A4
bne _080228D4
adds r0, r2, #0
bl MakeRescueTargetList
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _080228D4
movs r0, #1
Expand Down Expand Up @@ -516,7 +516,7 @@ DropUsability: @ 0x08022910
beq _08022940
adds r0, r2, #0
bl MakeDropTargetList
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08022940
movs r0, #1
Expand Down Expand Up @@ -592,7 +592,7 @@ TakeUsability: @ 0x0802298C
bne _080229CC
adds r0, r3, #0
bl MakeTakeTargetList
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _080229CC
movs r0, #1
Expand Down Expand Up @@ -648,7 +648,7 @@ GiveUsability: @ 0x080229F4
beq _08022A34
adds r0, r3, #0
bl sub_8025594
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08022A34
movs r0, #1
Expand Down Expand Up @@ -992,7 +992,7 @@ UnknownMenu_IsAvailable: @ 0x08022CA4
ldr r0, [r5]
adds r1, r4, #0
bl MakeTargetListForWeapon
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08022CE8
movs r0, #1
Expand Down Expand Up @@ -1341,7 +1341,7 @@ ItemSubMenu_IsTradeAvailable: @ 0x08022F34
bne _08022F80
adds r0, r2, #0
bl MakeTradeTargetList
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08022F80
movs r0, #1
Expand Down Expand Up @@ -1570,7 +1570,7 @@ sub_80230F0: @ 0x080230F0
bne _0802314E
adds r0, r2, #0
bl sub_8025B6C
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08023118
_0802310E:
Expand Down Expand Up @@ -1697,7 +1697,7 @@ PlayCommandEffect: @ 0x080231D0
ldr r6, _08023248 @ gActiveUnit
ldr r0, [r6]
bl sub_8025B6C
bl sub_804FD28
bl GetSelectTargetCount
negs r1, r0
orrs r1, r0
lsrs r1, r1, #0x1f
Expand Down Expand Up @@ -3083,7 +3083,7 @@ TalkCommandUsability: @ 0x08023C80
bne _08023C9E
adds r0, r2, #0
bl sub_8025610
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _08023CA8
_08023C9E:
Expand Down Expand Up @@ -3167,12 +3167,12 @@ SupportCommandUsability: @ 0x08023D14
bne _08023D40
adds r0, r2, #0
bl MakeTargetListForSupport
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08023D40
ldr r0, [r4]
bl sub_8025610
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08023D48
_08023D40:
Expand Down Expand Up @@ -3268,7 +3268,7 @@ _08023DD8:
ldr r0, [r4]
movs r1, #0x1e
bl MakeTargetListForDoorAndBridges
bl sub_804FD28
bl GetSelectTargetCount
movs r1, #3
cmp r0, #0
beq _08023DEC
Expand Down Expand Up @@ -3385,7 +3385,7 @@ _08023E98: .4byte gActiveUnit
_08023E9C:
adds r0, r2, #0
bl sub_80258A4
bl sub_804FD28
bl GetSelectTargetCount
movs r1, #3
cmp r0, #0
beq _08023EAE
Expand Down Expand Up @@ -3841,7 +3841,7 @@ StealCommandUsability: @ 0x0802418C
bne _080241BC
adds r0, r2, #0
bl MakeTargetListForSteal
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _080241C4
_080241BC:
Expand Down Expand Up @@ -4140,7 +4140,7 @@ SummonCommandUsability: @ 0x080243D8
bne _0802445A
adds r0, r2, #0
bl sub_8025CA4
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _0802445A
ldr r4, _08024428 @ 0x0000FFFF
Expand Down Expand Up @@ -4995,7 +4995,7 @@ _080249D8:
ldr r0, [r5]
adds r1, r4, #0
bl MakeTargetListForWeapon
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _080249CC
_08024A06:
Expand Down Expand Up @@ -5047,7 +5047,7 @@ AttackBallistaCommandUsability: @ 0x08024A28
lsls r2, r2, #1
adds r1, r1, r2
bl MakeTargetListForWeapon
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _08024A70
_08024A66:
Expand Down Expand Up @@ -5077,7 +5077,7 @@ ItemMenu_Is1stCommandAvailable: @ 0x08024A88
ldr r0, _08024AA0 @ gActiveUnit
ldr r0, [r0]
bl sub_8025B6C
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
beq _08024AA4
movs r0, #1
Expand Down
6 changes: 3 additions & 3 deletions asm/bmtarget.s
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,13 @@ MakeTradeTargetList: @ 0x080252D0
ands r0, r1
cmp r0, #0
beq _08025332
bl sub_804FD28
bl GetSelectTargetCount
adds r4, r0, #0
ldr r0, [r6]
ldrb r0, [r0, #0x1b]
bl GetUnit
bl _call_via_r7
bl sub_804FD28
bl GetSelectTargetCount
cmp r4, r0
beq _08025332
adds r0, r4, #0
Expand Down Expand Up @@ -2917,7 +2917,7 @@ sub_8026414: @ 0x08026414
mov r7, r8
push {r7}
mov r8, r0
bl sub_804FD28
bl GetSelectTargetCount
adds r7, r0, #0
movs r6, #0
cmp r6, r7
Expand Down
12 changes: 6 additions & 6 deletions asm/bmusailment.s
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ sub_8035E20: @ 0x08035E20
ldr r0, _08035E3C @ gRAMChapterData
ldrb r0, [r0, #0xf]
bl sub_8025904
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _08035E40
adds r0, r4, #0
Expand Down Expand Up @@ -534,7 +534,7 @@ sub_8035E50: @ 0x08035E50
strb r0, [r1, #0xc]
movs r0, #0
ldrsh r4, [r5, r0]
bl sub_804FD28
bl GetSelectTargetCount
cmp r4, r0
bne _08035E8C
adds r0, r7, #0
Expand Down Expand Up @@ -710,7 +710,7 @@ sub_8035FB8: @ 0x08035FB8
bl sub_80259EC
movs r0, #4
bl sub_8026414
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _08035FE0
adds r0, r4, #0
Expand Down Expand Up @@ -834,7 +834,7 @@ sub_80360B8: @ 0x080360B8
ldr r0, _080360D4 @ gRAMChapterData
ldrb r0, [r0, #0xf]
bl sub_8025A64
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _080360D8
adds r0, r4, #0
Expand Down Expand Up @@ -934,7 +934,7 @@ _08036184: .4byte gActionData
sub_8036188: @ 0x08036188
push {r4, lr}
adds r4, r0, #0
bl sub_804FD28
bl GetSelectTargetCount
cmp r0, #0
bne _0803619C
adds r0, r4, #0
Expand Down Expand Up @@ -1085,7 +1085,7 @@ sub_80362A4: @ 0x080362A4
strb r0, [r1, #0xc]
movs r0, #0
ldrsh r4, [r4, r0]
bl sub_804FD28
bl GetSelectTargetCount
cmp r4, r0
bne _080362E0
adds r0, r7, #0
Expand Down
6 changes: 3 additions & 3 deletions asm/bmusemind.s
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ ExecFortify: @ 0x0802F154
adds r0, r5, #0
bl GetUnitItemHealAmount
adds r6, r0, #0
bl sub_804FD28
bl GetSelectTargetCount
adds r5, r0, #0
movs r4, #0
cmp r4, r5
Expand Down Expand Up @@ -794,7 +794,7 @@ sub_802F208: @ 0x0802F208
ldrb r0, [r0, #0xc]
bl GetUnit
bl MakeTargetListForFuckingNightmare
bl sub_804FD28
bl GetSelectTargetCount
adds r6, r0, #0
movs r5, #0
cmp r5, r6
Expand Down Expand Up @@ -925,7 +925,7 @@ sub_802F30C: @ 0x0802F30C
ldrb r0, [r4, #0xc]
bl GetUnit
bl MakeTargetListForLatona
bl sub_804FD28
bl GetSelectTargetCount
adds r6, r0, #0
movs r5, #0
cmp r5, r6
Expand Down
Loading

0 comments on commit 94d53ef

Please sign in to comment.