pokeemerald/asm/battle_controller_player_partner.s

6348 lines
96 KiB
ArmAsm
Raw Normal View History

2016-11-01 18:08:48 +01:00
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
2017-09-02 20:56:53 +02:00
thumb_func_start nullsub_77
nullsub_77: @ 81BADF0
2016-11-01 18:08:48 +01:00
bx lr
2017-09-02 20:56:53 +02:00
thumb_func_end nullsub_77
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start SetBankFuncToPlayerPartnerBufferRunCommand
SetBankFuncToPlayerPartnerBufferRunCommand: @ 81BADF4
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =PlayerPartnerBufferRunCommand
2016-11-01 18:08:48 +01:00
str r1, [r0]
bx lr
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end SetBankFuncToPlayerPartnerBufferRunCommand
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start PlayerPartnerBufferRunCommand
PlayerPartnerBufferRunCommand: @ 81BAE10
2016-11-01 18:08:48 +01:00
push {lr}
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleExecBuffer
2017-02-02 05:15:38 +01:00
ldr r1, =gBitTable
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r3, [r0]
lsls r0, r3, 2
adds r0, r1
ldr r1, [r2]
ldr r0, [r0]
ands r1, r0
cmp r1, 0
2017-09-02 20:56:53 +02:00
beq _081BAE5C
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBufferA
2016-11-01 18:08:48 +01:00
lsls r1, r3, 9
adds r1, r0
ldrb r0, [r1]
cmp r0, 0x38
2017-09-02 20:56:53 +02:00
bhi _081BAE58
ldr r0, =gPlayerPartnerBufferCommands
2016-11-01 18:08:48 +01:00
ldrb r1, [r1]
lsls r1, 2
adds r1, r0
ldr r0, [r1]
bl _call_via_r0
2017-09-02 20:56:53 +02:00
b _081BAE5C
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BAE58:
bl PlayerPartnerBufferExecCompleted
_081BAE5C:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end PlayerPartnerBufferRunCommand
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BAE60
sub_81BAE60: @ 81BAE60
2016-11-01 18:08:48 +01:00
push {lr}
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
ldr r1, =gBankSpriteIds
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, 0x1C
adds r0, r2
ldr r1, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r1, r0
2017-09-02 20:56:53 +02:00
bne _081BAE84
bl PlayerPartnerBufferExecCompleted
_081BAE84:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BAE60
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BAE98
sub_81BAE98: @ 81BAE98
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-08-31 16:48:24 +02:00
ldr r6, =gSprites
ldr r5, =gBankSpriteIds
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r1, r6, 0
adds r1, 0x1C
adds r0, r1
ldr r1, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r1, r0
2017-09-02 20:56:53 +02:00
bne _081BAEE8
2016-11-01 18:08:48 +01:00
movs r0, 0
bl nullsub_25
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r6
2017-09-02 01:42:44 +02:00
bl FreeSpriteOamMatrix
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r6
bl DestroySprite
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
_081BAEE8:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BAE98
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BAF00
sub_81BAF00: @ 81BAF00
2016-11-01 18:08:48 +01:00
push {r4,lr}
2016-11-01 19:35:16 +01:00
ldr r4, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r1, [r4]
2017-08-31 16:48:24 +02:00
ldr r3, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r3]
ldr r2, [r1, 0x4]
lsls r1, r0, 1
adds r1, r0
lsls r1, 2
adds r1, r2
ldrb r0, [r1, 0x9]
subs r0, 0x1
strb r0, [r1, 0x9]
lsls r0, 24
lsrs r0, 24
cmp r0, 0xFF
2017-09-02 20:56:53 +02:00
bne _081BAF38
2016-11-01 18:08:48 +01:00
ldr r0, [r4]
ldrb r1, [r3]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0
strb r1, [r0, 0x9]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
_081BAF38:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BAF00
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BAF48
sub_81BAF48: @ 81BAF48
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
movs r6, 0
bl battle_type_is_double
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BAF6C
2016-11-01 18:08:48 +01:00
bl battle_type_is_double
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BAFA0
2017-02-02 05:15:38 +01:00
ldr r0, =gBattleTypeFlags
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BAFA0
_081BAF6C:
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2017-09-08 22:27:27 +02:00
ldr r1, =gHealthBoxesIds
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, 0x1C
adds r0, r2
ldr r1, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r1, r0
2017-09-02 20:56:53 +02:00
bne _081BAFD8
b _081BAFD6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BAFA0:
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2017-09-08 22:27:27 +02:00
ldr r5, =gHealthBoxesIds
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r3, [r0]
adds r0, r3, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r4, r2, 0
adds r4, 0x1C
adds r0, r4
ldr r2, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r2, r0
2017-09-02 20:56:53 +02:00
bne _081BAFD8
2016-11-01 18:08:48 +01:00
movs r0, 0x2
eors r3, r0
adds r0, r3, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
ldr r0, [r0]
cmp r0, r2
2017-09-02 20:56:53 +02:00
bne _081BAFD8
_081BAFD6:
2016-11-01 18:08:48 +01:00
movs r6, 0x1
2017-09-02 20:56:53 +02:00
_081BAFD8:
2017-09-02 17:03:46 +02:00
bl IsCryPlayingOrClearCrySongs
2016-11-01 18:08:48 +01:00
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BAFE4
2016-11-01 18:08:48 +01:00
movs r6, 0
2017-09-02 20:56:53 +02:00
_081BAFE4:
2016-11-01 18:08:48 +01:00
cmp r6, 0
2017-09-02 20:56:53 +02:00
beq _081BB00A
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
2017-08-31 16:48:24 +02:00
ldr r3, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r3]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x3
strb r1, [r0, 0x9]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r3]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BAF00
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BB00A:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BAF48
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB02C
sub_81BB02C: @ 81BB02C
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
mov r12, r0
ldr r0, [r0]
2017-08-31 16:48:24 +02:00
ldr r7, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r7]
ldr r3, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r4, r0, r3
ldrb r1, [r4]
movs r5, 0x8
adds r0, r5, 0
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BB058
b _081BB196
_081BB058:
2016-11-01 18:08:48 +01:00
movs r1, 0x2
mov r8, r1
adds r1, r2, 0
mov r0, r8
eors r1, r0
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r3
ldrb r1, [r0]
adds r0, r5, 0
ands r0, r1
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0
2017-09-02 20:56:53 +02:00
beq _081BB07A
b _081BB196
_081BB07A:
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2016-11-01 18:08:48 +01:00
mov r10, r1
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_03005D7C
2016-11-01 18:08:48 +01:00
mov r9, r0
adds r0, r2, r0
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
mov r5, r10
adds r5, 0x1C
adds r0, r5
ldr r3, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r3, r0
2017-09-02 20:56:53 +02:00
bne _081BB196
2017-08-31 16:48:24 +02:00
ldr r0, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
adds r0, r2, r0
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r0, [r0]
cmp r0, r3
2017-09-02 20:56:53 +02:00
bne _081BB196
2016-11-01 18:08:48 +01:00
ldrb r0, [r4, 0x9]
adds r0, 0x1
strb r0, [r4, 0x9]
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
2017-09-02 20:56:53 +02:00
beq _081BB196
2016-11-01 18:08:48 +01:00
mov r1, r12
ldr r0, [r1]
ldrb r1, [r7]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
strb r6, [r0, 0x9]
bl battle_type_is_double
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BB134
2017-02-02 05:15:38 +01:00
ldr r0, =gBattleTypeFlags
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BB134
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
mov r1, r8
eors r0, r1
add r0, r9
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
add r0, r10
bl DestroySprite
2017-09-08 22:27:27 +02:00
ldr r4, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
mov r1, r8
eors r1, r0
adds r0, r1, r4
ldrb r0, [r0]
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r1, 1
adds r1, r2
ldrh r2, [r1]
movs r1, 0x64
muls r1, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r1, r2
movs r2, 0
bl healthbar_draw_field_maybe
ldrb r0, [r7]
mov r1, r8
eors r0, r1
bl sub_8076918
ldrb r0, [r7]
mov r1, r8
eors r0, r1
adds r0, r4
ldrb r0, [r0]
bl sub_80729D0
2017-09-02 20:56:53 +02:00
_081BB134:
2016-11-01 19:35:16 +01:00
ldr r1, =gUnknown_03005D7C
2017-08-31 16:48:24 +02:00
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
adds r0, r1
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2016-11-01 18:08:48 +01:00
adds r0, r1
bl DestroySprite
2017-09-08 22:27:27 +02:00
ldr r5, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
ldrb r1, [r4]
adds r0, r1, r5
ldrb r0, [r0]
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r1, 1
adds r1, r2
ldrh r2, [r1]
movs r1, 0x64
muls r1, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r1, r2
movs r2, 0
bl healthbar_draw_field_maybe
ldrb r0, [r4]
bl sub_8076918
ldrb r0, [r4]
adds r0, r5
ldrb r0, [r0]
bl sub_80729D0
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r2, [r0, 0x8]
ldrb r1, [r2, 0x9]
movs r0, 0x2
negs r0, r0
ands r0, r1
strb r0, [r2, 0x9]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BAF48
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BB196:
2016-11-01 18:08:48 +01:00
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BB02C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB1D4
sub_81BB1D4: @ 81BB1D4
2016-11-01 18:08:48 +01:00
push {lr}
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
ldr r1, =gBankSpriteIds
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r1, r0, r2
adds r0, r1, 0
adds r0, 0x3F
ldrb r0, [r0]
lsls r0, 27
cmp r0, 0
2017-09-02 20:56:53 +02:00
bge _081BB202
2016-11-01 18:08:48 +01:00
movs r2, 0x24
ldrsh r0, [r1, r2]
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BB202
bl PlayerPartnerBufferExecCompleted
_081BB202:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BB1D4
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start bx_t3_healthbar_update
bx_t3_healthbar_update: @ 81BB214
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
2017-09-08 22:27:27 +02:00
ldr r6, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
adds r1, r0, r6
ldrb r1, [r1]
movs r2, 0
movs r3, 0
bl sub_8074AA0
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldrb r0, [r5]
adds r0, r6
ldrb r0, [r0]
bl sub_80729D0
lsls r4, 16
asrs r1, r4, 16
movs r0, 0x1
negs r0, r0
cmp r1, r0
2017-09-02 20:56:53 +02:00
beq _081BB25C
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
adds r0, r6
ldrb r0, [r0]
movs r2, 0
bl heathbar_draw_hp
2017-09-02 20:56:53 +02:00
b _081BB276
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BB25C:
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
lsls r0, r1, 1
adds r0, r2
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r2
bl sub_805E990
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
_081BB276:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end bx_t3_healthbar_update
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB284
sub_81BB284: @ 81BB284
push {lr}
movs r0, 0
bl IsTextPrinterActive
lsls r0, 16
cmp r0, 0
bne _081BB296
bl PlayerPartnerBufferExecCompleted
_081BB296:
pop {r0}
bx r0
thumb_func_end sub_81BB284
thumb_func_start sub_81BB29C
sub_81BB29C: @ 81BB29C
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
lsls r0, 24
lsrs r0, 24
mov r9, r0
ldr r1, =gTasks
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
add r0, r9
lsls r0, 3
adds r0, r1
mov r8, r0
ldrb r0, [r0, 0x8]
mov r10, r0
mov r1, r8
ldrb r7, [r1, 0xC]
str r7, [sp, 0x8]
ldrh r2, [r1, 0xA]
str r2, [sp, 0xC]
bl battle_type_is_double
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
beq _081BB2E2
2017-08-31 16:48:24 +02:00
ldr r1, =gBattlePartyID
2017-09-02 20:56:53 +02:00
lsls r0, r7, 1
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-09-02 20:56:53 +02:00
ldrh r0, [r0]
cmp r10, r0
bne _081BB2E2
b _081BB3F8
_081BB2E2:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
2017-09-02 20:56:53 +02:00
mov r1, r10
muls r1, r0
ldr r0, =gPlayerParty
adds r6, r1, r0
adds r0, r6, 0
2016-11-01 18:08:48 +01:00
movs r1, 0xB
bl GetMonData
2017-09-02 20:56:53 +02:00
adds r5, r0, 0
lsls r5, 16
lsrs r5, 16
adds r0, r6, 0
movs r1, 0x38
bl GetMonData
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
movs r1, 0x19
bl GetMonData
str r0, [sp, 0x4]
ldr r3, =gExperienceTables
adds r4, 0x1
lsls r4, 2
ldr r2, =gBaseStats
lsls r1, r5, 3
subs r1, r5
lsls r1, 2
adds r1, r2
ldrb r2, [r1, 0x13]
movs r1, 0xCA
lsls r1, 1
muls r1, r2
adds r4, r1
adds r4, r3
ldr r2, [r4]
str r2, [sp]
ldr r3, [sp, 0xC]
lsls r1, r3, 16
asrs r1, 16
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-09-02 20:56:53 +02:00
cmp r0, r2
bcc _081BB3D0
adds r0, r6, 0
movs r1, 0x19
mov r2, sp
bl SetMonData
adds r0, r6, 0
2017-09-05 20:13:34 +02:00
bl CalculateMonStats
2017-09-02 20:56:53 +02:00
ldr r2, [sp]
add r0, sp, 0x4
ldrh r0, [r0]
subs r2, r0
ldr r0, [sp, 0xC]
subs r2, r0, r2
ldr r4, =gActiveBank
ldrb r5, [r4]
strb r7, [r4]
lsls r2, 16
lsrs r2, 16
movs r0, 0x1
movs r1, 0xB
bl dp01_build_cmdbuf_x21_a_bb
strb r5, [r4]
bl battle_type_is_double
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _081BB3B8
ldr r2, =gBattlePartyID
lsls r0, r7, 1
adds r0, r2
mov r1, r10
ldrh r0, [r0]
cmp r1, r0
beq _081BB396
movs r0, 0x2
eors r7, r0
lsls r0, r7, 1
adds r0, r2
ldrh r0, [r0]
cmp r1, r0
bne _081BB3B8
_081BB396:
ldr r0, =sub_81BB628
b _081BB3FA
.pool
_081BB3B8:
ldr r0, =gTasks
mov r2, r9
lsls r1, r2, 2
add r1, r9
lsls r1, 3
adds r1, r0
ldr r0, =sub_81BB740
b _081BB3FC
.pool
_081BB3D0:
str r0, [sp, 0x4]
add r2, sp, 0x4
adds r0, r6, 0
movs r1, 0x19
bl SetMonData
ldr r1, =gBattleBankFunc
ldr r3, [sp, 0x8]
lsls r0, r3, 2
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB284
str r1, [r0]
mov r0, r9
bl DestroyTask
b _081BB3FE
.pool
_081BB3F8:
ldr r0, =sub_81BB414
_081BB3FA:
mov r1, r8
_081BB3FC:
str r0, [r1]
_081BB3FE:
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BB29C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB414
sub_81BB414: @ 81BB414
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-09-02 20:56:53 +02:00
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
sub sp, 0x4
lsls r0, 24
lsrs r0, 24
ldr r1, =gTasks
lsls r2, r0, 2
mov r8, r2
add r8, r0
mov r0, r8
lsls r0, 3
mov r8, r0
add r8, r1
mov r2, r8
ldrb r1, [r2, 0x8]
movs r0, 0xA
ldrsh r2, [r2, r0]
mov r9, r2
mov r2, r8
ldrb r2, [r2, 0xC]
mov r10, r2
movs r0, 0x64
adds r6, r1, 0
muls r6, r0
ldr r0, =gPlayerParty
adds r6, r0
adds r0, r6, 0
movs r1, 0x38
bl GetMonData
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
movs r1, 0xB
bl GetMonData
adds r5, r0, 0
lsls r5, 16
lsrs r5, 16
adds r0, r6, 0
movs r1, 0x19
bl GetMonData
adds r3, r0, 0
ldr r6, =gExperienceTables
lsls r1, r4, 2
ldr r2, =gBaseStats
lsls r0, r5, 3
subs r0, r5
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r0, r2
ldrb r2, [r0, 0x13]
movs r0, 0xCA
lsls r0, 1
muls r0, r2
adds r1, r0
adds r1, r6
ldr r1, [r1]
subs r3, r1
adds r4, 0x1
lsls r4, 2
adds r4, r0
adds r4, r6
ldr r2, [r4]
subs r2, r1
2017-09-08 22:27:27 +02:00
ldr r0, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
add r0, r10
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
2017-09-02 20:56:53 +02:00
mov r0, r9
negs r0, r0
str r0, [sp]
mov r0, r10
bl sub_807294C
movs r0, 0x21
bl PlaySE
ldr r0, =sub_81BB4E4
mov r1, r8
str r0, [r1]
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BB414
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB4E4
sub_81BB4E4: @ 81BB4E4
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
lsls r0, 24
lsrs r0, 24
mov r8, r0
ldr r1, =gTasks
lsls r0, 2
add r0, r8
lsls r0, 3
adds r6, r0, r1
ldrh r1, [r6, 0x1C]
movs r2, 0x1C
ldrsh r0, [r6, r2]
cmp r0, 0xC
bgt _081BB514
adds r0, r1, 0x1
strh r0, [r6, 0x1C]
b _081BB610
.pool
_081BB514:
ldrb r0, [r6, 0x8]
mov r9, r0
ldrh r2, [r6, 0xA]
mov r10, r2
ldrb r7, [r6, 0xC]
2017-09-08 22:27:27 +02:00
ldr r5, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
adds r5, r7, r5
ldrb r1, [r5]
adds r0, r7, 0
movs r2, 0x1
movs r3, 0
bl sub_8074AA0
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldrb r0, [r5]
bl sub_80729D0
lsls r4, 16
asrs r4, 16
movs r0, 0x1
negs r0, r0
cmp r4, r0
bne _081BB610
movs r0, 0x21
bl m4aSongNumStop
movs r0, 0x64
mov r1, r9
muls r1, r0
ldr r0, =gPlayerParty
adds r5, r1, r0
adds r0, r5, 0
movs r1, 0x38
bl GetMonData
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r5, 0
movs r1, 0x19
bl GetMonData
str r0, [sp, 0x4]
adds r0, r5, 0
movs r1, 0xB
bl GetMonData
lsls r0, 16
lsrs r0, 16
ldr r3, =gExperienceTables
adds r4, 0x1
lsls r4, 2
ldr r2, =gBaseStats
lsls r1, r0, 3
subs r1, r0
lsls r1, 2
adds r1, r2
ldrb r1, [r1, 0x13]
movs r0, 0xCA
lsls r0, 1
muls r0, r1
adds r4, r0
adds r4, r3
ldr r1, [r4]
str r1, [sp]
mov r2, r10
lsls r0, r2, 16
asrs r4, r0, 16
ldr r0, [sp, 0x4]
adds r0, r4
cmp r0, r1
blt _081BB5F4
adds r0, r5, 0
movs r1, 0x19
mov r2, sp
bl SetMonData
adds r0, r5, 0
2017-09-05 20:13:34 +02:00
bl CalculateMonStats
2017-09-02 20:56:53 +02:00
ldr r2, [sp]
add r0, sp, 0x4
ldrh r0, [r0]
subs r2, r0
subs r2, r4, r2
ldr r4, =gActiveBank
ldrb r5, [r4]
strb r7, [r4]
lsls r2, 16
lsrs r2, 16
movs r0, 0x1
movs r1, 0xB
bl dp01_build_cmdbuf_x21_a_bb
strb r5, [r4]
ldr r0, =sub_81BB628
str r0, [r6]
b _081BB610
.pool
_081BB5F4:
str r0, [sp, 0x4]
add r2, sp, 0x4
adds r0, r5, 0
movs r1, 0x19
bl SetMonData
ldr r1, =gBattleBankFunc
lsls r0, r7, 2
adds r0, r1
ldr r1, =sub_81BB284
str r1, [r0]
mov r0, r8
bl DestroyTask
_081BB610:
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BB4E4
thumb_func_start sub_81BB628
sub_81BB628: @ 81BB628
push {r4-r6,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
ldrb r4, [r0, 0xC]
ldrb r6, [r0, 0x8]
bl battle_type_is_double
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _081BB65C
ldr r1, =gBattlePartyID
movs r0, 0x2
adds r2, r4, 0
eors r2, r0
lsls r0, r2, 1
adds r0, r1
ldrh r0, [r0]
cmp r6, r0
bne _081BB65C
adds r4, r2, 0
_081BB65C:
adds r0, r4, 0
adds r1, r4, 0
adds r2, r4, 0
movs r3, 0
bl move_anim_start_t4
ldr r0, =gTasks
lsls r1, r5, 2
adds r1, r5
lsls r1, 3
adds r1, r0
ldr r0, =sub_81BB688
str r0, [r1]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BB628
thumb_func_start sub_81BB688
sub_81BB688: @ 81BB688
push {r4-r7,lr}
lsls r0, 24
lsrs r6, r0, 24
ldr r1, =gTasks
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r2, r0, r1
ldrb r5, [r2, 0xC]
ldr r0, =gUnknown_020244D0
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r5, 1
adds r0, r5
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x40
ands r0, r1
cmp r0, 0
bne _081BB72A
ldrb r4, [r2, 0x8]
movs r0, 0x64
adds r1, r4, 0
muls r1, r0
ldr r0, =gPlayerParty
adds r7, r1, r0
adds r0, r7, 0
movs r1, 0x38
bl GetMonData
bl battle_type_is_double
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _081BB708
ldr r1, =gBattlePartyID
movs r0, 0x2
adds r2, r5, 0
eors r2, r0
lsls r0, r2, 1
adds r0, r1
ldrh r0, [r0]
cmp r4, r0
bne _081BB708
2017-09-08 22:27:27 +02:00
ldr r0, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
adds r0, r2, r0
ldrb r0, [r0]
adds r1, r7, 0
movs r2, 0
bl healthbar_draw_field_maybe
b _081BB71C
.pool
_081BB708:
2017-09-08 22:27:27 +02:00
ldr r0, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
adds r0, r5, r0
ldrb r0, [r0]
movs r1, 0x64
muls r1, r4
ldr r2, =gPlayerParty
adds r1, r2
movs r2, 0
bl healthbar_draw_field_maybe
_081BB71C:
ldr r0, =gTasks
lsls r1, r6, 2
adds r1, r6
lsls r1, 3
adds r1, r0
ldr r0, =sub_81BB740
str r0, [r1]
_081BB72A:
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BB688
thumb_func_start sub_81BB740
sub_81BB740: @ 81BB740
push {r4,r5,lr}
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
ldr r0, =gTasks
lsls r4, r5, 2
adds r4, r5
lsls r4, 3
adds r4, r0
ldrb r1, [r4, 0x8]
movs r0, 0x64
muls r0, r1
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x38
bl GetMonData
ldrb r0, [r4, 0xC]
ldr r1, =gBattleBankFunc
lsls r0, 2
adds r0, r1
ldr r1, =sub_81BB284
str r1, [r0]
adds r0, r5, 0
bl DestroyTask
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BB740
thumb_func_start sub_81BB78C
sub_81BB78C: @ 81BB78C
push {r4-r6,lr}
ldr r6, =gSprites
ldr r5, =gBankSpriteIds
ldr r4, =gActiveBank
ldrb r2, [r4]
adds r0, r2, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r6
movs r3, 0x22
ldrsh r1, [r0, r3]
movs r3, 0x26
ldrsh r0, [r0, r3]
adds r1, r0
cmp r1, 0xA0
ble _081BB808
ldr r1, =gBattlePartyID
lsls r0, r2, 1
adds r0, r1
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0xB
bl GetMonData
lsls r0, 16
lsrs r0, 16
bl nullsub_24
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r6
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl FreeOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r6
bl DestroySprite
2017-09-08 22:27:27 +02:00
ldr r1, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
ldrb r0, [r4]
adds r0, r1
ldrb r0, [r0]
bl sub_8072984
bl PlayerPartnerBufferExecCompleted
_081BB808:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BB78C
thumb_func_start sub_81BB828
sub_81BB828: @ 81BB828
push {r4-r6,lr}
ldr r0, =gUnknown_020244D0
ldr r0, [r0]
ldr r6, =gActiveBank
ldrb r2, [r6]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x40
ands r0, r1
cmp r0, 0
bne _081BB87C
ldr r5, =gBankSpriteIds
adds r0, r2, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
bl DestroySprite
2017-09-08 22:27:27 +02:00
ldr r1, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
ldrb r0, [r6]
adds r0, r1
ldrb r0, [r0]
bl sub_8072984
bl PlayerPartnerBufferExecCompleted
_081BB87C:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BB828
thumb_func_start sub_81BB898
sub_81BB898: @ 81BB898
push {lr}
movs r0, 0
bl IsTextPrinterActive
lsls r0, 16
cmp r0, 0
bne _081BB8AA
bl PlayerPartnerBufferExecCompleted
_081BB8AA:
pop {r0}
bx r0
thumb_func_end sub_81BB898
thumb_func_start bx_blink_t3
bx_blink_t3: @ 81BB8B0
push {r4,lr}
ldr r1, =gBankSpriteIds
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
ldr r2, =gSprites
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r4, r0, r2
movs r1, 0x30
ldrsh r0, [r4, r1]
cmp r0, 0x20
bne _081BB8FC
movs r3, 0
movs r0, 0
2016-11-01 18:08:48 +01:00
strh r0, [r4, 0x30]
adds r2, r4, 0
adds r2, 0x3E
ldrb r1, [r2]
subs r0, 0x5
ands r0, r1
strb r0, [r2]
2017-08-31 16:48:24 +02:00
ldr r0, =gDoingBattleAnim
2016-11-01 18:08:48 +01:00
strb r3, [r0]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
b _081BB926
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BB8FC:
2016-11-01 18:08:48 +01:00
ldrh r0, [r4, 0x30]
movs r1, 0x3
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BB920
2016-11-01 18:08:48 +01:00
adds r3, r4, 0
adds r3, 0x3E
ldrb r2, [r3]
lsls r0, r2, 29
lsrs r0, 31
movs r1, 0x1
eors r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
2017-09-02 20:56:53 +02:00
_081BB920:
2016-11-01 18:08:48 +01:00
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
2017-09-02 20:56:53 +02:00
_081BB926:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end bx_blink_t3
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB92C
sub_81BB92C: @ 81BB92C
2016-11-01 18:08:48 +01:00
push {r4,lr}
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2017-09-08 22:27:27 +02:00
ldr r0, =gHealthBoxesIds
2017-08-31 16:48:24 +02:00
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r3, [r4]
adds r0, r3, r0
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, 0x1C
adds r0, r2
ldr r1, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r1, r0
2017-09-02 20:56:53 +02:00
bne _081BB97E
2016-11-01 18:08:48 +01:00
adds r0, r3, 0
bl sub_805E408
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldrb r2, [r4]
ldr r1, [r0]
lsls r0, r2, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BB972
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x6
bl move_anim_start_t4
2017-09-02 20:56:53 +02:00
_081BB972:
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r1, [r4]
lsls r1, 2
adds r1, r0
2017-09-02 20:56:53 +02:00
ldr r0, =dp01t_35_3_free_vram
2016-11-01 18:08:48 +01:00
str r0, [r1]
2017-09-02 20:56:53 +02:00
_081BB97E:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BB92C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start dp01t_35_3_free_vram
dp01t_35_3_free_vram: @ 81BB9A0
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r1, [r0]
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r3, [r0]
ldr r1, [r1, 0x4]
lsls r0, r3, 1
adds r0, r3
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x40
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BB9DC
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
ldr r0, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
adds r0, r3, r0
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, 0x1C
adds r0, r2
ldr r1, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r1, r0
2017-09-02 20:56:53 +02:00
bne _081BB9DC
bl PlayerPartnerBufferExecCompleted
_081BB9DC:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end dp01t_35_3_free_vram
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BB9F4
sub_81BB9F4: @ 81BB9F4
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
2016-11-01 19:35:16 +01:00
ldr r3, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r3]
2017-08-31 16:48:24 +02:00
ldr r7, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r7]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r2, r0, r2
ldrb r1, [r2, 0x1]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BBAB0
2016-11-01 18:08:48 +01:00
ldrb r1, [r2]
movs r0, 0x7F
ands r0, r1
strb r0, [r2]
ldr r0, [r3]
ldrb r2, [r7]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r2, [r1, 0x1]
movs r0, 0x2
negs r0, r0
ands r0, r2
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
2017-09-02 01:42:44 +02:00
bl FreeSpriteTilesByTag
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
2017-09-02 01:42:44 +02:00
bl FreeSpritePaletteByTag
2016-11-01 18:08:48 +01:00
ldr r0, =c3_0802FDF4
movs r1, 0xA
bl CreateTask
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
mov r8, r0
ldrb r1, [r7]
lsls r0, r1, 1
add r0, r8
ldrh r0, [r0]
movs r6, 0x64
muls r0, r6
ldr r5, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r5
bl sub_805E990
2017-08-31 16:48:24 +02:00
ldr r1, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
adds r0, r1
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0
2017-09-02 12:12:09 +02:00
bl StartSpriteAnim
2017-09-08 22:27:27 +02:00
ldr r4, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
ldrb r1, [r7]
adds r0, r1, r4
ldrb r0, [r0]
lsls r1, 1
add r1, r8
ldrh r1, [r1]
muls r1, r6
adds r1, r5
movs r2, 0
bl healthbar_draw_field_maybe
ldrb r0, [r7]
bl sub_8076918
ldrb r0, [r7]
adds r0, r4
ldrb r0, [r0]
bl sub_80729D0
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB92C
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BBAB0:
2016-11-01 18:08:48 +01:00
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BB9F4
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BBAE8
sub_81BBAE8: @ 81BBAE8
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2016-11-01 19:35:16 +01:00
ldr r6, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
2017-08-31 16:48:24 +02:00
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r4]
ldr r1, [r0, 0x4]
lsls r3, r2, 1
adds r0, r3, r2
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x88
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BBB1A
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
adds r0, r3, r0
ldrh r1, [r0]
movs r0, 0x64
muls r1, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r1, r0
adds r0, r2, 0
bl sub_8172EF0
2017-09-02 20:56:53 +02:00
_081BBB1A:
2017-08-31 16:48:24 +02:00
ldr r5, =gSprites
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_03005D7C
2016-11-01 18:08:48 +01:00
ldrb r2, [r4]
adds r0, r2, r0
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r3, r0, 2
adds r0, r5, 0
adds r0, 0x1C
adds r0, r3, r0
ldr r1, [r0]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
cmp r1, r0
2017-09-02 20:56:53 +02:00
bne _081BBB60
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x8
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BBB60
2016-11-01 18:08:48 +01:00
adds r0, r3, r5
bl DestroySprite
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB9F4
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BBB60:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BBAE8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start PlayerPartnerBufferExecCompleted
PlayerPartnerBufferExecCompleted: @ 81BBB8C
2016-11-01 18:08:48 +01:00
push {r4,lr}
sub sp, 0x4
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =PlayerPartnerBufferRunCommand
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-02-02 05:15:38 +01:00
ldr r0, =gBattleTypeFlags
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
movs r1, 0x2
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BBBE0
2017-09-06 21:18:50 +02:00
bl GetMultiplayerId
2016-11-01 18:08:48 +01:00
mov r1, sp
strb r0, [r1]
movs r0, 0x2
movs r1, 0x4
mov r2, sp
2017-08-31 16:48:24 +02:00
bl PrepareBufferDataTransferLink
ldr r1, =gBattleBufferA
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 9
adds r0, r1
movs r1, 0x38
strb r1, [r0]
2017-09-02 20:56:53 +02:00
b _081BBBF2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BBBE0:
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleExecBuffer
2017-02-02 05:15:38 +01:00
ldr r1, =gBitTable
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
ldr r1, [r0]
ldr r0, [r2]
bics r0, r1
str r0, [r2]
2017-09-02 20:56:53 +02:00
_081BBBF2:
2016-11-01 18:08:48 +01:00
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BBC04
sub_81BBC04: @ 81BBC04
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r2, [r0]
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
ldr r2, [r2, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BBC26
bl PlayerPartnerBufferExecCompleted
_081BBC26:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BBC04
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start bx_80E8A6C
bx_80E8A6C: @ 81BBC34
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r2, [r0]
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
ldr r2, [r2, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BBC56
bl PlayerPartnerBufferExecCompleted
_081BBC56:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end bx_80E8A6C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start dp01t_00_3_getattr
dp01t_00_3_getattr: @ 81BBC64
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
sub sp, 0x100
movs r6, 0
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBufferA
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r0]
lsls r0, r2, 9
adds r1, 0x2
adds r1, r0, r1
ldrb r0, [r1]
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BBC9C
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r1, r2, 1
adds r1, r0
ldrb r0, [r1]
mov r1, sp
2017-09-02 20:56:53 +02:00
bl dp01_getattr_by_ch1_for_player_pokemon
2016-11-01 18:08:48 +01:00
adds r6, r0, 0
2017-09-02 20:56:53 +02:00
b _081BBCBE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BBC9C:
2016-11-01 18:08:48 +01:00
ldrb r4, [r1]
movs r5, 0
2017-09-02 20:56:53 +02:00
_081BBCA0:
2016-11-01 18:08:48 +01:00
movs r0, 0x1
ands r0, r4
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BBCB6
2016-11-01 18:08:48 +01:00
lsls r0, r5, 24
lsrs r0, 24
mov r2, sp
adds r1, r2, r6
2017-09-02 20:56:53 +02:00
bl dp01_getattr_by_ch1_for_player_pokemon
2016-11-01 18:08:48 +01:00
adds r6, r0
2017-09-02 20:56:53 +02:00
_081BBCB6:
2016-11-01 18:08:48 +01:00
lsrs r4, 1
adds r5, 0x1
cmp r5, 0x5
2017-09-02 20:56:53 +02:00
ble _081BBCA0
_081BBCBE:
2016-11-01 18:08:48 +01:00
lsls r1, r6, 16
lsrs r1, 16
movs r0, 0x1
mov r2, sp
bl dp01_build_cmdbuf_x1D_1D_numargs_varargs
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
add sp, 0x100
pop {r4-r6}
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end dp01t_00_3_getattr
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start dp01_getattr_by_ch1_for_player_pokemon
dp01_getattr_by_ch1_for_player_pokemon: @ 81BBCD8
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x90
adds r7, r1, 0
lsls r0, 24
lsrs r5, r0, 24
movs r6, 0
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleBufferA
ldr r3, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r3]
lsls r0, 9
adds r1, r2, 0x1
adds r0, r1
ldrb r0, [r0]
cmp r0, 0x3B
2017-09-02 20:56:53 +02:00
bls _081BBD02
bl _081BC46E
_081BBD02:
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
ldr r1, =_081BBD18
2016-11-01 18:08:48 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2017-09-02 20:56:53 +02:00
_081BBD18:
.4byte _081BBE08
.4byte _081BC02C
.4byte _081BC03C
.4byte _081BC04C
.4byte _081BC0B4
.4byte _081BC0B4
.4byte _081BC0B4
.4byte _081BC0B4
.4byte _081BC0D0
.4byte _081BC10C
.4byte _081BC10C
.4byte _081BC10C
.4byte _081BC10C
.4byte _081BC46E
.4byte _081BC46E
.4byte _081BC46E
.4byte _081BC46E
.4byte _081BC128
.4byte _081BC138
.4byte _081BC168
.4byte _081BC178
.4byte _081BC188
.4byte _081BC198
.4byte _081BC1A8
.4byte _081BC1B8
.4byte _081BC1C8
.4byte _081BC1D8
.4byte _081BC1E8
.4byte _081BC1F8
.4byte _081BC208
.4byte _081BC218
.4byte _081BC228
.4byte _081BC278
.4byte _081BC288
.4byte _081BC298
.4byte _081BC2A8
.4byte _081BC2B8
.4byte _081BC2C8
.4byte _081BC2D8
.4byte _081BC2E8
.4byte _081BC2F8
.4byte _081BC32C
.4byte _081BC33C
.4byte _081BC34C
.4byte _081BC35C
.4byte _081BC36C
.4byte _081BC37C
.4byte _081BC38C
.4byte _081BC39C
.4byte _081BC3BC
.4byte _081BC3CC
.4byte _081BC3DC
.4byte _081BC3EC
.4byte _081BC3FC
.4byte _081BC40C
.4byte _081BC41C
.4byte _081BC42C
.4byte _081BC43C
.4byte _081BC44C
.4byte _081BC45C
_081BBE08:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
adds r0, r4, 0
movs r1, 0xB
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1]
adds r0, r4, 0
movs r1, 0xC
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x2E]
movs r6, 0
add r0, sp, 0x24
mov r9, r0
movs r1, 0x3B
add r1, sp
mov r10, r1
mov r2, sp
adds r2, 0x2B
str r2, [sp, 0x80]
mov r0, sp
adds r0, 0x2A
str r0, [sp, 0x7C]
mov r1, sp
adds r1, 0x68
str r1, [sp, 0x8C]
adds r2, 0x5
str r2, [sp, 0x84]
adds r0, 0x12
str r0, [sp, 0x88]
mov r8, r4
add r4, sp, 0xC
2017-09-02 20:56:53 +02:00
_081BBE54:
2016-11-01 18:08:48 +01:00
adds r1, r6, 0
adds r1, 0xD
mov r0, r8
bl GetMonData
2016-11-01 18:08:48 +01:00
strh r0, [r4]
adds r1, r6, 0
adds r1, 0x11
mov r0, r8
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r2, r9
adds r1, r2, r6
strb r0, [r1]
adds r4, 0x2
adds r6, 0x1
cmp r6, 0x3
2017-09-02 20:56:53 +02:00
ble _081BBE54
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
adds r0, r4, 0
movs r1, 0x15
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, r10
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x20
bl GetMonData
2016-11-01 18:08:48 +01:00
ldr r2, [sp, 0x80]
strb r0, [r2]
adds r0, r4, 0
movs r1, 0x19
bl GetMonData
2016-11-01 18:08:48 +01:00
str r0, [sp, 0x44]
adds r0, r4, 0
movs r1, 0x27
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
movs r5, 0x1F
ands r0, r5
ldrb r2, [r3, 0x14]
movs r1, 0x20
negs r1, r1
ands r1, r2
orrs r1, r0
strb r1, [r3, 0x14]
adds r0, r4, 0
movs r1, 0x28
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
movs r6, 0x1F
ands r0, r6
lsls r0, 5
ldrh r2, [r3, 0x14]
ldr r1, =0xfffffc1f
ands r1, r2
orrs r1, r0
strh r1, [r3, 0x14]
adds r0, r4, 0
movs r1, 0x29
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
ands r0, r5
lsls r0, 2
ldrb r2, [r3, 0x15]
movs r1, 0x7D
negs r1, r1
ands r1, r2
orrs r1, r0
strb r1, [r3, 0x15]
adds r0, r4, 0
movs r1, 0x2A
bl GetMonData
2016-11-01 18:08:48 +01:00
movs r1, 0x1F
ands r1, r0
lsls r1, 15
ldr r0, [sp, 0x14]
ldr r2, =0xfff07fff
ands r0, r2
orrs r0, r1
str r0, [sp, 0x14]
adds r0, r4, 0
movs r1, 0x2B
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
ands r0, r6
lsls r0, 4
ldrh r2, [r3, 0x16]
ldr r1, =0xfffffe0f
ands r1, r2
orrs r1, r0
strh r1, [r3, 0x16]
adds r0, r4, 0
movs r1, 0x2C
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
ands r0, r5
lsls r0, 1
ldrb r2, [r3, 0x17]
movs r1, 0x3F
negs r1, r1
ands r1, r2
orrs r1, r0
strb r1, [r3, 0x17]
adds r0, r4, 0
movs r1, 0
bl GetMonData
2016-11-01 18:08:48 +01:00
str r0, [sp, 0x48]
adds r0, r4, 0
movs r1, 0x37
bl GetMonData
2016-11-01 18:08:48 +01:00
str r0, [sp, 0x4C]
adds r0, r4, 0
movs r1, 0x38
bl GetMonData
2016-11-01 18:08:48 +01:00
ldr r1, [sp, 0x7C]
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x39
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x28]
adds r0, r4, 0
movs r1, 0x3A
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x2C]
adds r0, r4, 0
movs r1, 0x3B
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x2]
adds r0, r4, 0
movs r1, 0x3C
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x4]
adds r0, r4, 0
movs r1, 0x3D
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x6]
adds r0, r4, 0
movs r1, 0x3E
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0x8]
adds r0, r4, 0
movs r1, 0x3F
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
strh r0, [r1, 0xA]
adds r0, r4, 0
movs r1, 0x2D
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
movs r1, 0x1
ands r0, r1
lsls r0, 6
ldrb r2, [r3, 0x17]
movs r1, 0x41
negs r1, r1
ands r1, r2
orrs r1, r0
strb r1, [r3, 0x17]
adds r0, r4, 0
movs r1, 0x2E
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r3, sp
lsls r0, 7
ldrb r2, [r3, 0x17]
movs r1, 0x7F
ands r1, r2
orrs r1, r0
strb r1, [r3, 0x17]
adds r0, r4, 0
movs r1, 0x1
bl GetMonData
2016-11-01 18:08:48 +01:00
str r0, [sp, 0x54]
adds r0, r4, 0
movs r1, 0x2
ldr r2, [sp, 0x8C]
bl GetMonData
2016-11-01 18:08:48 +01:00
ldr r0, [sp, 0x84]
ldr r1, [sp, 0x8C]
2017-01-14 20:53:20 +01:00
bl StringCopy10
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x7
ldr r2, [sp, 0x88]
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r2, sp
movs r6, 0
2017-09-02 20:56:53 +02:00
_081BC00C:
2016-11-01 18:08:48 +01:00
adds r0, r7, r6
adds r1, r2, r6
ldrb r1, [r1]
strb r1, [r0]
adds r6, 0x1
cmp r6, 0x57
2017-09-02 20:56:53 +02:00
bls _081BC00C
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC02C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0xB
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC03C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0xC
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC04C:
2016-11-01 18:08:48 +01:00
movs r6, 0
add r2, sp, 0x58
mov r9, r2
add r0, sp, 0x60
mov r10, r0
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r1, r0
mov r8, r9
2017-09-02 20:56:53 +02:00
_081BC062:
2016-11-01 18:08:48 +01:00
adds r1, r6, 0
adds r1, 0xD
adds r0, r4, 0
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, r8
strh r0, [r1]
adds r1, r6, 0
adds r1, 0x11
adds r0, r4, 0
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r2, r10
adds r1, r2, r6
strb r0, [r1]
movs r0, 0x2
add r8, r0
adds r6, 0x1
cmp r6, 0x3
2017-09-02 20:56:53 +02:00
ble _081BC062
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x15
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r1, r9
strb r0, [r1, 0xC]
mov r2, r9
movs r6, 0
2017-09-02 20:56:53 +02:00
_081BC0A0:
2016-11-01 18:08:48 +01:00
adds r0, r7, r6
adds r1, r2, r6
ldrb r1, [r1]
strb r1, [r0]
adds r6, 0x1
cmp r6, 0xF
2017-09-02 20:56:53 +02:00
bls _081BC0A0
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC0B4:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
ldrb r1, [r3]
lsls r1, 9
adds r2, 0x1
adds r1, r2
ldrb r1, [r1]
adds r1, 0x9
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC0D0:
2016-11-01 18:08:48 +01:00
movs r6, 0
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
mov r8, r2
2017-09-02 20:56:53 +02:00
_081BC0DC:
2016-11-01 18:08:48 +01:00
adds r1, r6, 0
adds r1, 0x11
mov r2, r8
adds r0, r4, r2
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r1, r7, r6
strb r0, [r1]
adds r6, 0x1
cmp r6, 0x3
2017-09-02 20:56:53 +02:00
ble _081BC0DC
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x15
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r1, r7, r6
strb r0, [r1]
adds r6, 0x1
2017-09-02 20:56:53 +02:00
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC10C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
ldrb r1, [r3]
lsls r1, 9
adds r2, 0x1
adds r1, r2
ldrb r1, [r1]
adds r1, 0x8
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC128:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1
2017-09-02 20:56:53 +02:00
b _081BC142
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC138:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x19
2017-09-02 20:56:53 +02:00
_081BC142:
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r1, r0, 0
strb r1, [r7]
movs r0, 0xFF
lsls r0, 8
ands r0, r1
lsrs r0, 8
strb r0, [r7, 0x1]
movs r0, 0xFF
lsls r0, 16
ands r0, r1
lsrs r0, 16
strb r0, [r7, 0x2]
movs r6, 0x3
2017-09-02 20:56:53 +02:00
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC168:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1A
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC178:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1B
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC188:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1C
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC198:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1D
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC1A8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1E
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC1B8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x1F
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC1C8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x20
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC1D8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x22
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC1E8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x23
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC1F8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x24
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC208:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x25
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC218:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x26
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC228:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
adds r0, r4, 0
movs r1, 0x27
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7]
adds r0, r4, 0
movs r1, 0x28
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7, 0x1]
adds r0, r4, 0
movs r1, 0x29
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7, 0x2]
adds r0, r4, 0
movs r1, 0x2A
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7, 0x3]
adds r0, r4, 0
movs r1, 0x2B
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7, 0x4]
adds r0, r4, 0
movs r1, 0x2C
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7, 0x5]
movs r6, 0x6
2017-09-02 20:56:53 +02:00
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC278:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x27
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC288:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x28
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC298:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x29
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC2A8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x2A
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC2B8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x2B
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC2C8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x2C
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC2D8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0
2017-09-02 20:56:53 +02:00
b _081BC302
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC2E8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x9
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC2F8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x37
2017-09-02 20:56:53 +02:00
_081BC302:
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r1, r0, 0
strb r1, [r7]
movs r0, 0xFF
lsls r0, 8
ands r0, r1
lsrs r0, 8
strb r0, [r7, 0x1]
movs r0, 0xFF
lsls r0, 16
ands r0, r1
lsrs r0, 16
strb r0, [r7, 0x2]
lsrs r0, r1, 24
strb r0, [r7, 0x3]
movs r6, 0x4
2017-09-02 20:56:53 +02:00
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC32C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x38
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC33C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x39
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC34C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3A
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC35C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3B
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC36C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3C
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC37C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3D
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC38C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3E
2017-09-02 20:56:53 +02:00
b _081BC3A6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC39C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3F
2017-09-02 20:56:53 +02:00
_081BC3A6:
bl GetMonData
2016-11-01 18:08:48 +01:00
lsls r0, 16
lsrs r0, 16
strb r0, [r7]
lsrs r0, 8
strb r0, [r7, 0x1]
movs r6, 0x2
2017-09-02 20:56:53 +02:00
b _081BC46E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC3BC:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x16
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC3CC:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x17
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC3DC:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x18
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC3EC:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x21
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC3FC:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x2F
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC40C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x30
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC41C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x32
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC42C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x33
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC43C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x34
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC44C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x35
2017-09-02 20:56:53 +02:00
b _081BC466
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC45C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x36
2017-09-02 20:56:53 +02:00
_081BC466:
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7]
movs r6, 0x1
2017-09-02 20:56:53 +02:00
_081BC46E:
2016-11-01 18:08:48 +01:00
adds r0, r6, 0
add sp, 0x90
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end dp01_getattr_by_ch1_for_player_pokemon
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BC484
sub_81BC484: @ 81BC484
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BC484
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BC490
sub_81BC490: @ 81BC490
2016-11-01 18:08:48 +01:00
push {r4,r5,lr}
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBufferA
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r0]
lsls r0, r2, 9
adds r1, 0x2
adds r1, r0, r1
ldrb r0, [r1]
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BC4C0
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r1, r2, 1
adds r1, r0
ldrb r0, [r1]
2017-09-02 20:56:53 +02:00
bl sub_81BC4E8
b _081BC4DE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC4C0:
2016-11-01 18:08:48 +01:00
ldrb r4, [r1]
movs r5, 0
2017-09-02 20:56:53 +02:00
_081BC4C4:
2016-11-01 18:08:48 +01:00
movs r0, 0x1
ands r0, r4
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BC4D2
2016-11-01 18:08:48 +01:00
adds r0, r5, 0
2017-09-02 20:56:53 +02:00
bl sub_81BC4E8
_081BC4D2:
2016-11-01 18:08:48 +01:00
lsrs r4, 1
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0x5
2017-09-02 20:56:53 +02:00
bls _081BC4C4
_081BC4DE:
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4,r5}
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BC490
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BC4E8
sub_81BC4E8: @ 81BC4E8
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x34
lsls r0, 24
lsrs r5, r0, 24
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r0, 9
ldr r2, =gBattleBufferA + 3
2016-11-01 18:08:48 +01:00
adds r3, r0, r2
adds r6, r3, 0
subs r1, r2, 0x2
adds r0, r1
ldrb r0, [r0]
adds r7, r2, 0
cmp r0, 0x3B
2017-09-02 20:56:53 +02:00
bls _081BC514
bl _081BCEAE
_081BC514:
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
ldr r1, =_081BC52C
2016-11-01 18:08:48 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2017-09-02 20:56:53 +02:00
_081BC52C:
.4byte _081BC61C
.4byte _081BC7B4
.4byte _081BC7D4
.4byte _081BC7F4
.4byte _081BC84C
.4byte _081BC84C
.4byte _081BC84C
.4byte _081BC84C
.4byte _081BC874
.4byte _081BC8D8
.4byte _081BC8D8
.4byte _081BC8D8
.4byte _081BC8D8
.4byte _081BCEAE
.4byte _081BCEAE
.4byte _081BCEAE
.4byte _081BCEAE
.4byte _081BC908
.4byte _081BC928
.4byte _081BC948
.4byte _081BC968
.4byte _081BC988
.4byte _081BC9A8
.4byte _081BC9C8
.4byte _081BC9E8
.4byte _081BCA08
.4byte _081BCA28
.4byte _081BCA48
.4byte _081BCA68
.4byte _081BCA88
.4byte _081BCAA8
.4byte _081BCAC8
.4byte _081BCB38
.4byte _081BCB58
.4byte _081BCB78
.4byte _081BCB98
.4byte _081BCBB8
.4byte _081BCBD8
.4byte _081BCBF8
.4byte _081BCC18
.4byte _081BCC38
.4byte _081BCC58
.4byte _081BCC78
.4byte _081BCC98
.4byte _081BCCB8
.4byte _081BCCD8
.4byte _081BCCF8
.4byte _081BCD18
.4byte _081BCD38
.4byte _081BCD58
.4byte _081BCD78
.4byte _081BCD98
.4byte _081BCDB8
.4byte _081BCDD8
.4byte _081BCDF8
.4byte _081BCE18
.4byte _081BCE38
.4byte _081BCE58
.4byte _081BCE78
.4byte _081BCE98
_081BC61C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
adds r0, r4, 0
movs r1, 0xB
adds r2, r6, 0
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r2, r6, 0
adds r2, 0x2E
adds r0, r4, 0
movs r1, 0xC
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
movs r0, 0
mov r8, r0
movs r0, 0x3B
adds r0, r6
mov r10, r0
adds r0, r6, 0
adds r0, 0x2B
str r0, [sp, 0x20]
adds r0, 0x19
str r0, [sp, 0x28]
adds r0, 0x4
str r0, [sp, 0x2C]
adds r0, 0x4
str r0, [sp, 0x30]
subs r0, 0x22
str r0, [sp, 0x1C]
subs r0, 0x2
str r0, [sp, 0x18]
adds r0, 0x4
str r0, [sp, 0x24]
adds r0, r6, 0x2
str r0, [sp, 0x4]
adds r0, r6, 0x4
str r0, [sp, 0x8]
adds r0, r6, 0x6
str r0, [sp, 0xC]
adds r0, 0x2
str r0, [sp, 0x10]
adds r0, 0x2
str r0, [sp, 0x14]
mov r9, r4
adds r7, r6, 0
adds r7, 0x24
adds r4, r6, 0
adds r4, 0xC
2017-09-02 20:56:53 +02:00
_081BC682:
2016-11-01 18:08:48 +01:00
mov r1, r8
adds r1, 0xD
mov r0, r9
adds r2, r4, 0
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, r8
adds r1, 0x11
mov r0, r9
adds r2, r7, 0
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r7, 0x1
adds r4, 0x2
movs r0, 0x1
add r8, r0
mov r0, r8
cmp r0, 0x3
2017-09-02 20:56:53 +02:00
ble _081BC682
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
adds r0, r4, 0
movs r1, 0x15
mov r2, r10
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x20
ldr r2, [sp, 0x20]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x19
ldr r2, [sp, 0x28]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r0, [r6, 0x14]
lsls r0, 27
lsrs r0, 27
mov r1, sp
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x27
mov r2, sp
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
ldrh r0, [r6, 0x14]
lsls r0, 22
lsrs r0, 27
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x28
mov r2, sp
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
ldrb r0, [r6, 0x15]
lsls r0, 25
lsrs r0, 27
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x29
mov r2, sp
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
ldr r0, [r6, 0x14]
lsls r0, 12
lsrs r0, 27
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x2A
mov r2, sp
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
ldrh r0, [r6, 0x16]
lsls r0, 23
lsrs r0, 27
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x2B
mov r2, sp
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, sp
ldrb r0, [r6, 0x17]
lsls r0, 26
lsrs r0, 27
strb r0, [r1]
adds r0, r4, 0
movs r1, 0x2C
mov r2, sp
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0
ldr r2, [sp, 0x2C]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x37
ldr r2, [sp, 0x30]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x38
ldr r2, [sp, 0x1C]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x39
ldr r2, [sp, 0x18]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x3A
ldr r2, [sp, 0x24]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x3B
ldr r2, [sp, 0x4]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x3C
ldr r2, [sp, 0x8]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x3D
ldr r2, [sp, 0xC]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x3E
ldr r2, [sp, 0x10]
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r0, r4, 0
movs r1, 0x3F
ldr r2, [sp, 0x14]
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC7B4:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0xB
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC7D4:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0xC
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC7F4:
2016-11-01 18:08:48 +01:00
movs r0, 0
mov r8, r0
movs r0, 0xC
adds r0, r3
mov r9, r0
movs r0, 0x64
adds r1, r5, 0
muls r1, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r7, r1, r0
adds r6, r3, 0
adds r6, 0x8
adds r4, r3, 0
2017-09-02 20:56:53 +02:00
_081BC80E:
2016-11-01 18:08:48 +01:00
mov r1, r8
adds r1, 0xD
adds r0, r7, 0
adds r2, r4, 0
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
mov r1, r8
adds r1, 0x11
adds r0, r7, 0
adds r2, r6, 0
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
adds r6, 0x1
adds r4, 0x2
movs r0, 0x1
add r8, r0
mov r0, r8
cmp r0, 0x3
2017-09-02 20:56:53 +02:00
ble _081BC80E
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x15
mov r2, r9
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC84C:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r3, =gBattleBufferA
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r1, r3, 0x1
adds r1, r2, r1
ldrb r1, [r1]
adds r1, 0x9
2017-09-02 20:56:53 +02:00
b _081BC8F0
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC874:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r2, r7
adds r0, r4, 0
movs r1, 0x11
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x1
adds r2, r0
adds r0, r4, 0
movs r1, 0x12
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x2
adds r2, r0
adds r0, r4, 0
movs r1, 0x13
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x3
adds r2, r0
adds r0, r4, 0
movs r1, 0x14
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x4
adds r2, r0
adds r0, r4, 0
movs r1, 0x15
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC8D8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r3, =gBattleBufferA
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r1, r3, 0x1
adds r1, r2, r1
ldrb r1, [r1]
adds r1, 0x8
2017-09-02 20:56:53 +02:00
_081BC8F0:
2016-11-01 18:08:48 +01:00
adds r3, 0x3
adds r2, r3
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC908:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC928:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x19
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC948:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1A
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC968:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1B
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC988:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1C
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC9A8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1D
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC9C8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1E
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BC9E8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x1F
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCA08:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x20
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCA28:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x22
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCA48:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x23
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCA68:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x24
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCA88:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x25
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCAA8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x26
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCAC8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
adds r4, r5, 0
muls r4, r0
ldr r0, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r4, r0
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r2, r7
adds r0, r4, 0
movs r1, 0x27
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x1
adds r2, r0
adds r0, r4, 0
movs r1, 0x28
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x2
adds r2, r0
adds r0, r4, 0
movs r1, 0x29
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x3
adds r2, r0
adds r0, r4, 0
movs r1, 0x2A
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x4
adds r2, r0
adds r0, r4, 0
movs r1, 0x2B
2017-08-31 16:48:24 +02:00
bl SetMonData
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
lsls r2, 9
adds r0, r7, 0x5
adds r2, r0
adds r0, r4, 0
2017-09-02 20:56:53 +02:00
b _081BCBE8
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCB38:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x27
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCB58:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x28
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCB78:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x29
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCB98:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x2A
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCBB8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x2B
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCBD8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
2017-09-02 20:56:53 +02:00
_081BCBE8:
2016-11-01 18:08:48 +01:00
movs r1, 0x2C
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCBF8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCC18:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x9
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCC38:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x37
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCC58:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x38
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCC78:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x39
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCC98:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x3A
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCCB8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x3B
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCCD8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x3C
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCCF8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x3D
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCD18:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x3E
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCD38:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x3F
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCD58:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x16
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCD78:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x17
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCD98:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x18
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCDB8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x21
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCDD8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x2F
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCDF8:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x30
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCE18:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x32
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCE38:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x33
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCE58:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x34
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCE78:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x35
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
b _081BCEAE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BCE98:
2016-11-01 18:08:48 +01:00
movs r0, 0x64
muls r0, r5
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-08-31 16:48:24 +02:00
ldr r1, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r1]
lsls r2, 9
adds r2, r7
movs r1, 0x36
2017-08-31 16:48:24 +02:00
bl SetMonData
2017-09-02 20:56:53 +02:00
_081BCEAE:
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 1
adds r0, r2
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r2
bl sub_805E990
add sp, 0x34
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BC4E8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BCEE4
sub_81BCEE4: @ 81BCEE4
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
2017-08-31 16:48:24 +02:00
ldr r1, =gBattlePartyID
ldr r7, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r7]
lsls r0, r2, 1
adds r0, r1
ldrh r1, [r0]
movs r0, 0x64
adds r3, r1, 0
muls r3, r0
2017-08-31 16:48:24 +02:00
ldr r4, =gBattleBufferA
2016-11-01 18:08:48 +01:00
lsls r2, 9
adds r0, r4, 0x1
adds r0, r2, r0
ldrb r0, [r0]
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
adds r5, r3, r0
movs r3, 0
adds r0, r4, 0x2
adds r2, r0
ldrb r2, [r2]
cmp r3, r2
2017-09-02 20:56:53 +02:00
bcs _081BCF3C
2016-11-01 18:08:48 +01:00
adds r6, r4, 0
adds r2, r7, 0
adds r4, r0, 0
2017-09-02 20:56:53 +02:00
_081BCF1A:
2016-11-01 18:08:48 +01:00
adds r1, r5, r3
ldrb r0, [r2]
lsls r0, 9
adds r0, 0x3
adds r0, r3, r0
adds r0, r6
ldrb r0, [r0]
strb r0, [r1]
adds r0, r3, 0x1
lsls r0, 24
lsrs r3, r0, 24
ldrb r0, [r2]
lsls r0, 9
adds r0, r4
ldrb r0, [r0]
cmp r3, r0
2017-09-02 20:56:53 +02:00
bcc _081BCF1A
_081BCF3C:
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BCEE4
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BCF58
sub_81BCF58: @ 81BCF58
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
mov r6, r8
push {r6}
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
mov r8, r0
2017-08-31 16:48:24 +02:00
ldr r6, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r6]
lsls r0, r1, 1
add r0, r8
ldrh r0, [r0]
movs r5, 0x64
muls r0, r5
ldr r4, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r4
bl sub_805DD7C
ldrb r0, [r6]
lsls r0, 1
add r0, r8
ldrh r0, [r0]
muls r0, r5
adds r0, r4
movs r1, 0xB
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
ldrb r0, [r6]
2017-08-31 16:48:24 +02:00
bl GetBankIdentity
2016-11-01 18:08:48 +01:00
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_806A068
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_0202499C
2016-11-01 18:08:48 +01:00
mov r8, r0
ldrb r0, [r6]
movs r1, 0x2
bl sub_80A5C6C
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
ldrb r0, [r6]
bl sub_80A6138
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldrb r0, [r6]
bl sub_80A82E4
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
mov r0, r8
adds r1, r5, 0
adds r2, r4, 0
bl CreateSprite
2017-08-31 16:48:24 +02:00
ldr r4, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
ldrb r1, [r6]
adds r1, r4
strb r0, [r1]
2017-08-31 16:48:24 +02:00
ldr r5, =gSprites
2016-11-01 18:08:48 +01:00
ldrb r0, [r6]
adds r0, r4
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =0x0000ff10
strh r1, [r0, 0x24]
ldrb r2, [r6]
adds r0, r2, r4
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
strh r2, [r0, 0x2E]
ldrb r3, [r6]
adds r0, r3, r4
ldrb r0, [r0]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r5
lsls r3, 4
ldrb r2, [r1, 0x5]
movs r0, 0xF
ands r0, r2
orrs r0, r3
strb r0, [r1, 0x5]
ldrb r2, [r6]
adds r4, r2, r4
ldrb r1, [r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
2017-09-11 11:35:41 +02:00
ldr r1, =gBattleMonForms
2016-11-01 18:08:48 +01:00
adds r2, r1
ldrb r1, [r2]
2017-09-02 12:12:09 +02:00
bl StartSpriteAnim
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r6]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB1D4
2016-11-01 18:08:48 +01:00
str r1, [r0]
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BCF58
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD074
sub_81BD074: @ 81BD074
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
2017-08-31 16:48:24 +02:00
ldr r4, =gBattleBufferA
2016-11-01 18:08:48 +01:00
lsls r1, r0, 9
adds r6, r4, 0x2
adds r1, r6
ldrb r1, [r1]
bl sub_805EF84
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r1, r0, 1
adds r1, r2
lsls r0, 9
adds r4, 0x1
adds r0, r4
ldrb r0, [r0]
strh r0, [r1]
ldrb r1, [r5]
lsls r0, r1, 1
adds r0, r2
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r2
bl sub_805DD7C
ldrb r0, [r5]
lsls r1, r0, 9
adds r1, r6
ldrb r1, [r1]
2017-09-02 20:56:53 +02:00
bl sub_81BD0E4
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BBAE8
2016-11-01 18:08:48 +01:00
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD074
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD0E4
sub_81BD0E4: @ 81BD0E4
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
mov r6, r10
mov r5, r9
mov r4, r8
push {r4-r6}
adds r6, r0, 0
lsls r6, 24
lsrs r6, 24
lsls r1, 24
lsrs r1, 24
adds r0, r6, 0
bl sub_805EF84
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r2, r6, 1
adds r2, r0
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBufferA
2016-11-01 18:08:48 +01:00
lsls r1, r6, 9
adds r0, 0x1
adds r1, r0
ldrb r0, [r1]
strh r0, [r2]
ldrh r1, [r2]
movs r0, 0x64
muls r0, r1
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0xB
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r8, r0
lsls r0, 16
lsrs r0, 16
mov r8, r0
ldr r0, =sub_805D714
bl CreateInvisibleSpriteWithCallback
2016-11-01 19:35:16 +01:00
ldr r1, =gUnknown_03005D7C
2016-11-01 18:08:48 +01:00
mov r9, r1
add r9, r6
mov r1, r9
strb r0, [r1]
adds r0, r6, 0
2017-08-31 16:48:24 +02:00
bl GetBankIdentity
2016-11-01 18:08:48 +01:00
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl sub_806A068
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_0202499C
2016-11-01 18:08:48 +01:00
mov r10, r0
adds r0, r6, 0
movs r1, 0x2
bl sub_80A5C6C
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
adds r0, r6, 0
bl sub_80A6138
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
bl sub_80A82E4
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
mov r0, r10
adds r1, r5, 0
adds r2, r4, 0
bl CreateSprite
2017-08-31 16:48:24 +02:00
ldr r4, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
adds r4, r6, r4
strb r0, [r4]
2017-08-31 16:48:24 +02:00
ldr r5, =gSprites
2016-11-01 18:08:48 +01:00
mov r0, r9
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
ldrb r1, [r4]
strh r1, [r0, 0x30]
mov r0, r9
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
strh r6, [r0, 0x32]
ldrb r1, [r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
strh r6, [r0, 0x2E]
ldrb r1, [r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
mov r1, r8
strh r1, [r0, 0x32]
ldrb r0, [r4]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r5
lsls r3, r6, 4
ldrb r2, [r1, 0x5]
movs r0, 0xF
ands r0, r2
orrs r0, r3
strb r0, [r1, 0x5]
ldrb r1, [r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
2017-09-11 11:35:41 +02:00
ldr r1, =gBattleMonForms
2016-11-01 18:08:48 +01:00
adds r6, r1
ldrb r1, [r6]
2017-09-02 12:12:09 +02:00
bl StartSpriteAnim
2016-11-01 18:08:48 +01:00
ldrb r1, [r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
adds r0, 0x3E
ldrb r1, [r0]
movs r2, 0x4
orrs r1, r2
strb r1, [r0]
ldrb r1, [r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r1, r5, 0
adds r1, 0x1C
adds r0, r1
2017-09-01 23:40:13 +02:00
ldr r1, =SpriteCallbackDummy
2016-11-01 18:08:48 +01:00
str r1, [r0]
movs r0, 0
movs r1, 0xFF
bl sub_80753E8
mov r1, r9
ldrb r2, [r1]
lsls r1, r2, 4
adds r1, r2
lsls r1, 2
adds r1, r5
lsls r0, 24
lsrs r0, 24
strh r0, [r1, 0x2E]
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD0E4
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD260
sub_81BD260: @ 81BD260
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBufferA
ldr r6, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r6]
lsls r0, r2, 9
adds r1, 0x1
adds r0, r1
ldrb r3, [r0]
cmp r3, 0
2017-09-02 20:56:53 +02:00
bne _081BD2A8
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
strb r3, [r0, 0x4]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r6]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BD2F0
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
b _081BD2DE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BD2A8:
2017-08-31 16:48:24 +02:00
ldr r5, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
adds r0, r2, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-08-31 16:48:24 +02:00
ldr r4, =gSprites
2016-11-01 18:08:48 +01:00
adds r0, r4
2017-09-02 01:42:44 +02:00
bl FreeSpriteOamMatrix
2016-11-01 18:08:48 +01:00
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
bl DestroySprite
2017-09-08 22:27:27 +02:00
ldr r1, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
ldrb r0, [r6]
adds r0, r1
ldrb r0, [r0]
bl sub_8072984
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
_081BD2DE:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD260
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD2F0
sub_81BD2F0: @ 81BD2F0
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2016-11-01 19:35:16 +01:00
ldr r6, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r4, [r6]
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
ldr r1, [r4, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r3, r0, r1
ldrb r0, [r3, 0x4]
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BD318
2016-11-01 18:08:48 +01:00
cmp r0, 0x1
2017-09-02 20:56:53 +02:00
beq _081BD346
b _081BD36E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BD318:
2016-11-01 18:08:48 +01:00
ldr r1, [r4]
lsls r0, r2, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BD332
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x5
bl move_anim_start_t4
2017-09-02 20:56:53 +02:00
_081BD332:
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x1
strb r1, [r0, 0x4]
2017-09-02 20:56:53 +02:00
b _081BD36E
_081BD346:
2016-11-01 18:08:48 +01:00
ldrb r1, [r3]
movs r0, 0x40
ands r0, r1
lsls r0, 24
lsrs r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BD36E
2016-11-01 18:08:48 +01:00
strb r0, [r3, 0x4]
ldrb r2, [r5]
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x1
bl move_anim_start_t4
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB828
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BD36E:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD2F0
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD37C
sub_81BD37C: @ 81BD37C
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
2017-09-02 20:56:53 +02:00
mov r7, r9
mov r6, r8
push {r6,r7}
2017-09-11 14:42:13 +02:00
ldr r2, =gPartnerTrainerId
2017-09-02 20:56:53 +02:00
ldrh r1, [r2]
ldr r0, =0x00000c03
cmp r1, r0
bne _081BD3A8
movs r4, 0x7
movs r0, 0x5A
mov r9, r0
ldr r0, =gUnknown_08305D2C
ldrb r1, [r0, 0x1C]
b _081BD3BE
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BD3A8:
ldrh r0, [r2]
bl sub_8162AA0
lsls r0, 24
lsrs r4, r0, 24
movs r0, 0x20
mov r9, r0
ldr r1, =gUnknown_083054E0
lsls r0, r4, 2
adds r0, r1
ldrb r1, [r0]
_081BD3BE:
movs r0, 0x8
subs r0, r1
lsls r0, 18
movs r1, 0xA0
lsls r1, 15
adds r0, r1
lsrs r7, r0, 16
2017-09-11 14:42:13 +02:00
ldr r0, =gPartnerTrainerId
2017-09-02 20:56:53 +02:00
ldrh r1, [r0]
ldr r0, =0x00000c03
cmp r1, r0
bne _081BD494
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
adds r0, r4, 0
bl sub_805DF84
ldrb r0, [r5]
2017-08-31 16:48:24 +02:00
bl GetBankIdentity
2016-11-01 18:08:48 +01:00
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
2017-09-11 18:27:54 +02:00
bl sub_806A12C
2016-11-01 19:35:16 +01:00
ldr r6, =gUnknown_0202499C
2017-09-02 20:56:53 +02:00
mov r8, r9
lsls r4, r7, 16
2016-11-01 18:08:48 +01:00
asrs r4, 16
ldrb r0, [r5]
bl sub_80A82E4
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
adds r0, r6, 0
mov r1, r8
adds r2, r4, 0
bl CreateSprite
2017-08-31 16:48:24 +02:00
ldr r6, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
adds r1, r6
strb r0, [r1]
2017-08-31 16:48:24 +02:00
ldr r4, =gSprites
2016-11-01 18:08:48 +01:00
ldrb r3, [r5]
adds r0, r3, r6
ldrb r0, [r0]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r4
lsls r3, 4
ldrb r2, [r1, 0x5]
movs r0, 0xF
ands r0, r2
orrs r0, r3
strb r0, [r1, 0x5]
ldrb r0, [r5]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r0, r4
movs r1, 0xF0
strh r1, [r0, 0x24]
ldrb r0, [r5]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
ldr r1, =0x0000fffe
strh r1, [r0, 0x2E]
ldrb r0, [r5]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r4, 0x1C
adds r0, r4
ldr r1, =sub_805D7AC
str r1, [r0]
b _081BD57C
.pool
_081BD494:
adds r5, r4, 0
ldr r6, =gActiveBank
ldrb r1, [r6]
adds r0, r5, 0
bl sub_805DF38
ldrb r0, [r6]
bl GetBankIdentity
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl sub_806A1C0
ldr r0, =gUnknown_0202499C
mov r8, r0
lsls r4, r7, 16
asrs r4, 16
ldrb r0, [r6]
bl sub_80A82E4
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
mov r0, r8
mov r1, r9
adds r2, r4, 0
bl CreateSprite
ldr r4, =gBankSpriteIds
ldrb r1, [r6]
adds r1, r4
strb r0, [r1]
ldr r0, =gTrainerFrontPicPaletteTable
lsls r5, 3
adds r5, r0
ldrh r0, [r5, 0x4]
bl IndexOfSpritePaletteTag
ldr r5, =gSprites
ldrb r1, [r6]
adds r1, r4
ldrb r1, [r1]
lsls r2, r1, 4
adds r2, r1
lsls r2, 2
adds r2, r5
lsls r0, 4
ldrb r3, [r2, 0x5]
movs r1, 0xF
ands r1, r3
orrs r1, r0
strb r1, [r2, 0x5]
ldrb r0, [r6]
adds r0, r4
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
2016-11-01 18:08:48 +01:00
movs r1, 0xF0
strh r1, [r0, 0x24]
2017-09-02 20:56:53 +02:00
ldrb r0, [r6]
adds r0, r4
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r0, r5
movs r1, 0x30
strh r1, [r0, 0x26]
ldrb r0, [r6]
2016-11-01 18:08:48 +01:00
adds r0, r4
2017-09-02 20:56:53 +02:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
2016-11-01 18:08:48 +01:00
ldr r1, =0x0000fffe
strh r1, [r0, 0x2E]
2017-09-02 20:56:53 +02:00
ldrb r0, [r6]
adds r0, r4
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r1, r5, 0
adds r1, 0x1C
adds r0, r1
2016-11-01 18:08:48 +01:00
ldr r1, =sub_805D7AC
str r1, [r0]
2017-09-02 20:56:53 +02:00
ldrb r0, [r6]
adds r0, r4
ldrb r0, [r0]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r5
ldrb r2, [r1, 0x1]
movs r0, 0x4
negs r0, r0
ands r0, r2
strb r0, [r1, 0x1]
ldrb r0, [r6]
adds r0, r4
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
adds r0, 0x3F
ldrb r1, [r0]
movs r2, 0x1
orrs r1, r2
strb r1, [r0]
_081BD57C:
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2017-09-02 20:56:53 +02:00
ldr r0, =gActiveBank
ldrb r0, [r0]
2016-11-01 18:08:48 +01:00
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BAE60
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
pop {r3,r4}
2016-11-01 18:08:48 +01:00
mov r8, r3
2017-09-02 20:56:53 +02:00
mov r9, r4
2016-11-01 18:08:48 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD37C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD5BC
sub_81BD5BC: @ 81BD5BC
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD5BC
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD5C8
sub_81BD5C8: @ 81BD5C8
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-08-31 16:48:24 +02:00
ldr r6, =gBankSpriteIds
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-08-31 16:48:24 +02:00
ldr r5, =gSprites
2016-11-01 18:08:48 +01:00
adds r0, r5
bl oamt_add_pos2_onto_pos1
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
movs r1, 0x23
strh r1, [r0, 0x2E]
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
ldr r1, =0x0000ffd8
strh r1, [r0, 0x32]
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
ldrh r1, [r0, 0x22]
strh r1, [r0, 0x36]
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r1, r5, 0
adds r1, 0x1C
adds r0, r1
ldr r1, =sub_80A6EEC
str r1, [r0]
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
2017-09-01 23:40:13 +02:00
ldr r1, =SpriteCallbackDummy
2017-09-04 12:22:04 +02:00
bl StoreSpriteCallbackInData6
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BAE98
2016-11-01 18:08:48 +01:00
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD5C8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD674
sub_81BD674: @ 81BD674
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2016-11-01 19:35:16 +01:00
ldr r6, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r4, [r6]
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r5]
ldr r0, [r4, 0x4]
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r3, r1, r0
ldrb r0, [r3, 0x4]
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BD6C8
2016-11-01 18:08:48 +01:00
ldr r1, [r4]
lsls r0, r2, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BD6A8
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x5
bl move_anim_start_t4
2017-09-02 20:56:53 +02:00
_081BD6A8:
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0, 0x4]
adds r1, 0x1
strb r1, [r0, 0x4]
2017-09-02 20:56:53 +02:00
b _081BD73E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BD6C8:
2016-11-01 18:08:48 +01:00
ldrb r1, [r3]
movs r0, 0x40
ands r0, r1
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
2017-09-02 20:56:53 +02:00
bne _081BD73E
2016-11-01 18:08:48 +01:00
strb r4, [r3, 0x4]
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
lsls r0, r1, 1
adds r0, r2
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r2
bl sub_805E990
movs r1, 0x40
negs r1, r1
movs r0, 0x10
2017-09-02 17:03:46 +02:00
bl PlaySE12WithPanning
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
ldr r3, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
adds r0, r3
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
strh r4, [r0, 0x30]
ldrb r0, [r5]
adds r0, r3
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x5
strh r1, [r0, 0x32]
ldrb r0, [r5]
adds r0, r3
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, 0x1C
adds r0, r2
ldr r1, =sub_8039C00
str r1, [r0]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB78C
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BD73E:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD674
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD760
sub_81BD760: @ 81BD760
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD760
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD76C
sub_81BD76C: @ 81BD76C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD76C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD778
sub_81BD778: @ 81BD778
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD778
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD784
sub_81BD784: @ 81BD784
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD784
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BD790
sub_81BD790: @ 81BD790
push {r4-r6,lr}
ldr r6, =gActiveBank
ldrb r0, [r6]
2016-11-01 18:08:48 +01:00
bl mplay_80342A4
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BD7A2
b _081BD8B6
_081BD7A2:
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBufferA
2016-11-01 18:08:48 +01:00
mov r12, r0
2017-09-02 20:56:53 +02:00
ldrb r2, [r6]
lsls r2, 9
2016-11-01 18:08:48 +01:00
adds r0, 0x1
2017-09-02 20:56:53 +02:00
adds r0, r2, r0
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
mov r1, r12
2017-09-02 20:56:53 +02:00
adds r1, 0x2
adds r1, r2, r1
ldrb r1, [r1]
lsls r1, 8
orrs r0, r1
ldr r5, =gUnknown_02038432
mov r1, r12
adds r1, 0x3
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
2017-09-03 20:13:23 +02:00
ldr r4, =gMovePowerMoveAnim
2017-09-02 20:56:53 +02:00
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
adds r1, 0x4
adds r1, r2, r1
ldrb r3, [r1]
mov r1, r12
adds r1, 0x5
adds r2, r1
ldrb r1, [r2]
lsls r1, 8
orrs r3, r1
strh r3, [r4]
2017-09-03 20:13:23 +02:00
ldr r4, =gMoveDmgMoveAnim
2017-09-02 20:56:53 +02:00
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
adds r1, 0x6
adds r1, r2, r1
ldrb r3, [r1]
mov r1, r12
adds r1, 0x7
adds r1, r2, r1
ldrb r1, [r1]
lsls r1, 8
orrs r3, r1
mov r1, r12
adds r1, 0x8
adds r1, r2, r1
ldrb r1, [r1]
lsls r1, 16
orrs r3, r1
mov r1, r12
adds r1, 0x9
adds r2, r1
ldrb r1, [r2]
lsls r1, 24
orrs r3, r1
str r3, [r4]
2017-09-03 20:13:23 +02:00
ldr r3, =gHappinessMoveAnim
2017-09-02 20:56:53 +02:00
ldrb r1, [r6]
2016-11-01 18:08:48 +01:00
lsls r1, 9
2017-09-02 20:56:53 +02:00
mov r2, r12
adds r2, 0xA
adds r1, r2
ldrb r1, [r1]
strb r1, [r3]
2017-09-03 20:13:23 +02:00
ldr r4, =gWeatherMoveAnim
2017-09-02 20:56:53 +02:00
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
adds r1, 0xC
adds r1, r2, r1
ldrb r3, [r1]
mov r1, r12
adds r1, 0xD
adds r2, r1
ldrb r1, [r2]
lsls r1, 8
orrs r3, r1
strh r3, [r4]
2017-09-03 20:13:23 +02:00
ldr r3, =gDisableStructMoveAnim
2017-09-02 20:56:53 +02:00
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
adds r1, 0x10
adds r2, r1
str r2, [r3]
ldr r3, =gUnknown_020244BC
ldrb r1, [r6]
lsls r1, 2
adds r1, r3
ldr r2, [r2]
str r2, [r1]
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
bl sub_805DB8C
lsls r0, 24
lsrs r3, r0, 24
cmp r3, 0
2017-09-02 20:56:53 +02:00
beq _081BD898
bl PlayerPartnerBufferExecCompleted
b _081BD8B6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BD898:
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
2017-09-02 20:56:53 +02:00
ldrb r1, [r6]
2016-11-01 18:08:48 +01:00
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
strb r3, [r0, 0x4]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2017-09-02 20:56:53 +02:00
ldrb r0, [r6]
2016-11-01 18:08:48 +01:00
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =bx_move_anim_3
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BD8B6:
pop {r4-r6}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BD790
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start bx_move_anim_3
bx_move_anim_3: @ 81BD8C8
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleBufferA
ldr r6, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r3, [r6]
lsls r1, r3, 9
adds r0, r2, 0x1
mov r10, r0
adds r0, r1, r0
ldrb r4, [r0]
adds r5, r2, 0x2
mov r9, r5
adds r0, r1, r5
ldrb r0, [r0]
lsls r0, 8
orrs r4, r0
adds r2, 0xB
adds r1, r2
ldrb r1, [r1]
mov r8, r1
2016-11-01 19:35:16 +01:00
ldr r7, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r5, [r7]
ldr r1, [r5, 0x4]
lsls r0, r3, 1
adds r0, r3
lsls r0, 2
adds r0, r1
ldrb r2, [r0, 0x4]
cmp r2, 0x1
2017-09-02 20:56:53 +02:00
beq _081BD960
2016-11-01 18:08:48 +01:00
cmp r2, 0x1
2017-09-02 20:56:53 +02:00
bgt _081BD920
2016-11-01 18:08:48 +01:00
cmp r2, 0
2017-09-02 20:56:53 +02:00
beq _081BD92A
b _081BDA3C
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BD920:
2016-11-01 18:08:48 +01:00
cmp r2, 0x2
2017-09-02 20:56:53 +02:00
beq _081BD98A
2016-11-01 18:08:48 +01:00
cmp r2, 0x3
2017-09-02 20:56:53 +02:00
beq _081BDA00
b _081BDA3C
_081BD92A:
2016-11-01 18:08:48 +01:00
ldr r1, [r5]
lsls r0, r3, 2
adds r1, r0, r1
ldrb r2, [r1]
movs r0, 0xC
ands r0, r2
cmp r0, 0x4
2017-09-02 20:56:53 +02:00
bne _081BD94C
2016-11-01 18:08:48 +01:00
movs r0, 0x8
orrs r0, r2
strb r0, [r1]
ldrb r2, [r6]
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x5
bl move_anim_start_t4
2017-09-02 20:56:53 +02:00
_081BD94C:
2016-11-01 18:08:48 +01:00
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x1
strb r1, [r0, 0x4]
2017-09-02 20:56:53 +02:00
b _081BDA3C
_081BD960:
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
movs r0, 0x40
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BDA3C
2016-11-01 18:08:48 +01:00
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x2
strb r1, [r0, 0x4]
2017-09-02 20:56:53 +02:00
b _081BDA3C
_081BD98A:
2017-09-03 20:13:23 +02:00
ldr r0, =gAnimScriptCallback
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
bl _call_via_r0
2017-09-03 20:13:23 +02:00
ldr r0, =gAnimScriptActive
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BDA3C
2016-11-01 18:08:48 +01:00
movs r0, 0x1
bl sub_805EB9C
ldr r0, [r7]
ldrb r2, [r6]
ldr r1, [r0]
lsls r0, r2, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BD9D8
2016-11-01 18:08:48 +01:00
mov r0, r8
cmp r0, 0x1
2017-09-02 20:56:53 +02:00
bhi _081BD9D8
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x6
bl move_anim_start_t4
ldr r0, [r7]
ldrb r1, [r6]
ldr r0, [r0]
lsls r1, 2
adds r1, r0
ldrb r2, [r1]
movs r0, 0x9
negs r0, r0
ands r0, r2
strb r0, [r1]
2017-09-02 20:56:53 +02:00
_081BD9D8:
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r2, [r0]
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
ldr r2, [r2, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x3
strb r1, [r0, 0x4]
2017-09-02 20:56:53 +02:00
b _081BDA3C
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BDA00:
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
movs r0, 0x40
ands r0, r1
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
2017-09-02 20:56:53 +02:00
bne _081BDA3C
2016-11-01 18:08:48 +01:00
bl sub_805E394
ldrb r0, [r6]
lsls r2, r0, 9
mov r3, r10
adds r1, r2, r3
ldrb r1, [r1]
add r2, r9
ldrb r2, [r2]
lsls r2, 8
orrs r1, r2
bl sub_805E94C
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
strb r4, [r0, 0x4]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
_081BDA3C:
2016-11-01 18:08:48 +01:00
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end bx_move_anim_3
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDA4C
sub_81BDA4C: @ 81BDA4C
push {r4,lr}
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02022E14
2016-11-01 18:08:48 +01:00
movs r1, 0
strh r1, [r0]
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02022E16
2016-11-01 18:08:48 +01:00
strh r1, [r0]
2017-09-02 20:56:53 +02:00
ldr r4, =gActiveBank
ldrb r0, [r4]
lsls r0, 9
ldr r1, =gBattleBufferA + 2
2017-09-02 20:56:53 +02:00
adds r0, r1
ldrh r0, [r0]
2017-09-05 20:13:34 +02:00
bl BufferStringBattle
ldr r0, =gDisplayedStringBattle
2016-11-01 18:08:48 +01:00
movs r1, 0
bl battle_show_message_maybe
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2017-09-02 20:56:53 +02:00
ldrb r0, [r4]
2016-11-01 18:08:48 +01:00
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB898
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81BDA4C
thumb_func_start sub_81BDAA0
sub_81BDAA0: @ 81BDAA0
push {lr}
bl PlayerPartnerBufferExecCompleted
pop {r0}
bx r0
thumb_func_end sub_81BDAA0
thumb_func_start sub_81BDAAC
sub_81BDAAC: @ 81BDAAC
push {lr}
bl sub_8063880
bl PlayerPartnerBufferExecCompleted
pop {r0}
bx r0
thumb_func_end sub_81BDAAC
thumb_func_start sub_81BDABC
sub_81BDABC: @ 81BDABC
push {lr}
bl PlayerPartnerBufferExecCompleted
pop {r0}
bx r0
thumb_func_end sub_81BDABC
thumb_func_start sub_81BDAC8
sub_81BDAC8: @ 81BDAC8
push {r4-r6,lr}
ldr r6, =gActiveBank
ldrb r4, [r6]
lsls r4, 9
ldr r0, =gBattleBufferA + 4
2017-09-02 20:56:53 +02:00
adds r4, r0
movs r0, 0xF
bl BattleAI_SetupAIData
2017-09-05 09:41:48 +02:00
bl BattleAI_ChooseMoveOrAction
2017-09-02 20:56:53 +02:00
lsls r0, 24
lsrs r5, r0, 24
ldr r2, =gBattleMoves
lsls r0, r5, 1
adds r4, r0
ldrh r1, [r4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0, 0x6]
movs r0, 0x12
ands r0, r1
cmp r0, 0
beq _081BDB02
ldr r1, =gBankTarget
ldrb r0, [r6]
strb r0, [r1]
_081BDB02:
ldrh r1, [r4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0, 0x6]
movs r0, 0x8
ands r0, r1
cmp r0, 0
beq _081BDB3C
movs r0, 0x1
bl GetBankByPlayerAI
ldr r4, =gBankTarget
strb r0, [r4]
ldr r0, =gAbsentBankFlags
ldrb r1, [r0]
ldr r2, =gBitTable
ldrb r0, [r4]
lsls r0, 2
adds r0, r2
ldr r0, [r0]
ands r1, r0
cmp r1, 0
beq _081BDB3C
movs r0, 0x3
bl GetBankByPlayerAI
strb r0, [r4]
_081BDB3C:
ldr r0, =gBankTarget
ldrb r2, [r0]
lsls r2, 8
orrs r2, r5
movs r0, 0x1
movs r1, 0xA
bl dp01_build_cmdbuf_x21_a_bb
bl PlayerPartnerBufferExecCompleted
pop {r4-r6}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDAC8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDB70
sub_81BDB70: @ 81BDB70
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDB70
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDB7C
sub_81BDB7C: @ 81BDB7C
push {r4-r6,lr}
bl sub_8063A90
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0x6
bne _081BDBD0
movs r0, 0
bl GetBankByPlayerAI
lsls r0, 24
lsrs r6, r0, 24
movs r0, 0x2
bl GetBankByPlayerAI
lsls r0, 24
lsrs r5, r0, 24
movs r4, 0x3
b _081BDBA4
_081BDBA2:
adds r4, 0x1
_081BDBA4:
cmp r4, 0x5
bgt _081BDBD0
movs r0, 0x64
muls r0, r4
ldr r1, =gPlayerParty
adds r0, r1
movs r1, 0x39
bl GetMonData
cmp r0, 0
beq _081BDBA2
ldr r1, =gBattlePartyID
lsls r0, r6, 1
adds r0, r1
ldrh r0, [r0]
cmp r4, r0
beq _081BDBA2
lsls r0, r5, 1
adds r0, r1
ldrh r0, [r0]
cmp r4, r0
beq _081BDBA2
_081BDBD0:
ldr r0, =gActiveBank
ldrb r0, [r0]
ldr r1, =gBattleStruct
ldr r1, [r1]
adds r0, r1
adds r0, 0x5C
strb r4, [r0]
lsls r1, r4, 24
lsrs r1, 24
movs r0, 0x1
movs r2, 0
bl dp01_build_cmdbuf_x22_a_three_bytes
bl PlayerPartnerBufferExecCompleted
pop {r4-r6}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
.pool
thumb_func_end sub_81BDB7C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDC04
sub_81BDC04: @ 81BDC04
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDC04
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDC10
sub_81BDC10: @ 81BDC10
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
movs r0, 0
bl load_gfxc_health_bar
2017-08-31 16:48:24 +02:00
ldr r3, =gBattleBufferA
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
mov r9, r0
ldrb r4, [r0]
lsls r2, r4, 9
adds r0, r3, 0x2
adds r0, r2, r0
ldrb r1, [r0]
adds r3, 0x3
adds r2, r3
ldrb r0, [r2]
lsls r0, 8
orrs r1, r0
lsls r1, 16
asrs r7, r1, 16
ldr r0, =0x00007fff
cmp r7, r0
2017-09-02 20:56:53 +02:00
beq _081BDCA0
2017-08-31 16:48:24 +02:00
ldr r6, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r0, r4, 1
adds r0, r6
ldrh r0, [r0]
movs r5, 0x64
muls r0, r5
ldr r4, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r4
movs r1, 0x3A
bl GetMonData
2016-11-01 18:08:48 +01:00
mov r8, r0
mov r1, r9
ldrb r0, [r1]
lsls r0, 1
adds r0, r6
ldrh r0, [r0]
muls r0, r5
adds r0, r4
movs r1, 0x39
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r3, r0, 0
mov r1, r9
ldrb r0, [r1]
2017-09-08 22:27:27 +02:00
ldr r1, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
adds r1, r0, r1
ldrb r1, [r1]
str r7, [sp]
mov r2, r8
bl sub_807294C
2017-09-02 20:56:53 +02:00
b _081BDCCA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BDCA0:
2017-08-31 16:48:24 +02:00
ldr r1, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r0, r4, 1
adds r0, r1
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0x3A
bl GetMonData
2016-11-01 18:08:48 +01:00
adds r2, r0, 0
mov r1, r9
ldrb r0, [r1]
2017-09-08 22:27:27 +02:00
ldr r1, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
adds r1, r0, r1
ldrb r1, [r1]
str r7, [sp]
movs r3, 0
bl sub_807294C
2017-09-02 20:56:53 +02:00
_081BDCCA:
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =bx_t3_healthbar_update
2016-11-01 18:08:48 +01:00
str r1, [r0]
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDC10
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDD00
sub_81BDD00: @ 81BDD00
push {r4-r7,lr}
ldr r5, =gBattleBufferA
ldr r6, =gActiveBank
ldrb r0, [r6]
lsls r0, 9
adds r1, r5, 0x1
adds r0, r1
ldrb r7, [r0]
movs r0, 0x64
adds r1, r7, 0
muls r1, r0
ldr r0, =gPlayerParty
adds r4, r1, r0
adds r0, r4, 0
movs r1, 0x38
bl GetMonData
cmp r0, 0x63
bls _081BDD38
bl PlayerPartnerBufferExecCompleted
b _081BDD84
.pool
_081BDD38:
movs r0, 0x1
bl load_gfxc_health_bar
adds r0, r4, 0
movs r1, 0xB
bl GetMonData
ldrb r1, [r6]
lsls r1, 9
adds r0, r5, 0x2
adds r0, r1, r0
ldrb r4, [r0]
adds r0, r5, 0x3
adds r1, r0
ldrb r0, [r1]
lsls r0, 8
orrs r4, r0
ldr r0, =sub_81BB29C
movs r1, 0xA
bl CreateTask
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
strh r7, [r1, 0x8]
strh r4, [r1, 0xA]
ldrb r0, [r6]
strh r0, [r1, 0xC]
ldr r1, =gBattleBankFunc
ldrb r0, [r6]
lsls r0, 2
adds r0, r1
ldr r1, =nullsub_21
str r1, [r0]
_081BDD84:
pop {r4-r7}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
.pool
thumb_func_end sub_81BDD00
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDD9C
sub_81BDD9C: @ 81BDD9C
2016-11-01 18:08:48 +01:00
push {r4,lr}
2017-08-31 16:48:24 +02:00
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
bl mplay_80342A4
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BDDF0
2017-09-08 22:27:27 +02:00
ldr r0, =gHealthBoxesIds
2016-11-01 18:08:48 +01:00
ldrb r1, [r4]
adds r0, r1, r0
ldrb r0, [r0]
2017-08-31 16:48:24 +02:00
ldr r2, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r1, 1
adds r1, r2
ldrh r2, [r1]
movs r1, 0x64
muls r1, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r1, r2
movs r2, 0x9
bl healthbar_draw_field_maybe
ldrb r2, [r4]
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r2, [r1]
movs r0, 0x11
negs r0, r0
ands r0, r2
strb r0, [r1]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BBC04
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BDDF0:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDD9C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDE14
sub_81BDE14: @ 81BDE14
2016-11-01 18:08:48 +01:00
push {r4,r5,lr}
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
bl mplay_80342A4
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BDE64
2017-08-31 16:48:24 +02:00
ldr r4, =gBattleBufferA
2016-11-01 18:08:48 +01:00
ldrb r3, [r5]
lsls r3, 9
adds r0, r4, 0x1
adds r0, r3, r0
ldrb r0, [r0]
adds r1, r4, 0x2
adds r1, r3, r1
ldrb r1, [r1]
adds r2, r4, 0x3
adds r2, r3, r2
ldrb r2, [r2]
lsls r2, 8
orrs r1, r2
adds r2, r4, 0x4
adds r2, r3, r2
ldrb r2, [r2]
lsls r2, 16
orrs r1, r2
adds r4, 0x5
adds r3, r4
ldrb r2, [r3]
lsls r2, 24
orrs r1, r2
bl move_anim_start_t2_for_situation
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BBC04
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BDE64:
2016-11-01 18:08:48 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDE14
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDE7C
sub_81BDE7C: @ 81BDE7C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDE7C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDE88
sub_81BDE88: @ 81BDE88
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDE88
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDE94
sub_81BDE94: @ 81BDE94
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDE94
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDEA0
sub_81BDEA0: @ 81BDEA0
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDEA0
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDEAC
sub_81BDEAC: @ 81BDEAC
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDEAC
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDEB8
sub_81BDEB8: @ 81BDEB8
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDEB8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDEC4
sub_81BDEC4: @ 81BDEC4
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDEC4
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDED0
sub_81BDED0: @ 81BDED0
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDED0
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDEDC
sub_81BDEDC: @ 81BDEDC
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDEDC
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDEE8
sub_81BDEE8: @ 81BDEE8
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r2, =gUnknown_02022D0C
2016-11-01 18:08:48 +01:00
ldrb r1, [r2]
movs r0, 0x80
negs r0, r0
ands r0, r1
strb r0, [r2]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDEE8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDF04
sub_81BDF04: @ 81BDF04
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r3, =gUnknown_02022D0C
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBufferA
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r0, 9
adds r1, 0x1
adds r0, r1
ldrb r0, [r0]
movs r1, 0x7F
ands r1, r0
ldrb r2, [r3]
movs r0, 0x80
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDF04
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDF3C
sub_81BDF3C: @ 81BDF3C
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r2, =gUnknown_02022D0C
2016-11-01 18:08:48 +01:00
ldrb r1, [r2]
movs r0, 0x7F
ands r0, r1
strb r0, [r2]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDF3C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDF54
sub_81BDF54: @ 81BDF54
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r3, =gUnknown_02022D0C
2016-11-01 18:08:48 +01:00
ldr r1, [r3]
lsls r1, 24
lsrs r1, 31
movs r0, 0x1
eors r1, r0
lsls r1, 7
ldrb r2, [r3]
movs r0, 0x7F
ands r0, r2
orrs r0, r1
strb r0, [r3]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDF54
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start dp01t_29_3_blink
dp01t_29_3_blink: @ 81BDF7C
2016-11-01 18:08:48 +01:00
push {r4,lr}
2017-08-31 16:48:24 +02:00
ldr r3, =gSprites
ldr r2, =gBankSpriteIds
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
adds r0, r2
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
adds r0, 0x3E
ldrb r0, [r0]
lsls r0, 29
cmp r0, 0
2017-09-02 20:56:53 +02:00
bge _081BDFB0
bl PlayerPartnerBufferExecCompleted
b _081BDFDA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BDFB0:
2017-08-31 16:48:24 +02:00
ldr r1, =gDoingBattleAnim
2016-11-01 18:08:48 +01:00
movs r0, 0x1
strb r0, [r1]
ldrb r0, [r4]
adds r0, r2
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
movs r1, 0
strh r1, [r0, 0x30]
ldrb r0, [r4]
bl sub_80769F4
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =bx_blink_t3
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BDFDA:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end dp01t_29_3_blink
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDFEC
sub_81BDFEC: @ 81BDFEC
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDFEC
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BDFF8
sub_81BDFF8: @ 81BDFF8
2016-11-01 18:08:48 +01:00
push {r4,lr}
2017-08-31 16:48:24 +02:00
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
2017-08-31 16:48:24 +02:00
bl GetBankSide
2016-11-01 18:08:48 +01:00
lsls r0, 24
movs r3, 0x3F
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BE00C
2016-11-01 18:08:48 +01:00
movs r3, 0xC0
2017-09-02 20:56:53 +02:00
_081BE00C:
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleBufferA
2016-11-01 18:08:48 +01:00
ldrb r1, [r4]
lsls r1, 9
adds r0, r2, 0x1
adds r0, r1, r0
ldrb r0, [r0]
adds r2, 0x2
adds r1, r2
ldrb r1, [r1]
lsls r1, 8
orrs r0, r1
lsls r1, r3, 24
asrs r1, 24
2017-09-02 17:03:46 +02:00
bl PlaySE12WithPanning
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BDFF8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE03C
sub_81BE03C: @ 81BE03C
2016-11-01 18:08:48 +01:00
push {r4,r5,lr}
2017-08-31 16:48:24 +02:00
ldr r4, =gBattleBufferA
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r3, r0, 9
adds r0, r4, 0x3
adds r0, r3, r0
ldrb r0, [r0]
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE078
2016-11-01 18:08:48 +01:00
bl sub_805EA60
ldrb r1, [r5]
lsls r1, 9
adds r0, r4, 0x1
adds r0, r1, r0
ldrb r0, [r0]
adds r2, r4, 0x2
adds r1, r2
ldrb r1, [r1]
lsls r1, 8
orrs r0, r1
2017-09-02 16:03:53 +02:00
bl PlayBGM
2017-09-02 20:56:53 +02:00
b _081BE08C
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BE078:
2016-11-01 18:08:48 +01:00
adds r0, r4, 0x1
adds r0, r3, r0
ldrb r0, [r0]
adds r1, r4, 0x2
adds r1, r3, r1
ldrb r1, [r1]
lsls r1, 8
orrs r0, r1
2017-09-02 16:03:53 +02:00
bl PlayFanfare
2017-09-02 20:56:53 +02:00
_081BE08C:
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4,r5}
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE03C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE098
sub_81BE098: @ 81BE098
2016-11-01 18:08:48 +01:00
push {lr}
2017-08-31 16:48:24 +02:00
ldr r1, =gBattlePartyID
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r0, 1
adds r0, r1
ldrh r1, [r0]
movs r0, 0x64
muls r0, r1
ldr r1, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r1
movs r1, 0xB
bl GetMonData
2016-11-01 18:08:48 +01:00
lsls r0, 16
lsrs r0, 16
movs r1, 0x19
negs r1, r1
movs r2, 0x5
2017-09-02 16:03:53 +02:00
bl PlayCry3
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE098
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start dp01t_2E_3_battle_intro
dp01t_2E_3_battle_intro: @ 81BE0D8
2016-11-01 18:08:48 +01:00
push {lr}
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBufferA
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r0, 9
adds r1, 0x1
adds r0, r1
ldrb r0, [r0]
bl battle_intro_launch
2016-11-01 19:35:16 +01:00
ldr r2, =gUnknown_020243FC
2016-11-01 18:08:48 +01:00
ldrh r0, [r2]
movs r1, 0x1
orrs r0, r1
strh r0, [r2]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end dp01t_2E_3_battle_intro
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE10C
sub_81BE10C: @ 81BE10C
push {r4-r6,lr}
ldr r6, =gBankSpriteIds
ldr r5, =gActiveBank
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-08-31 16:48:24 +02:00
ldr r4, =gSprites
2016-11-01 18:08:48 +01:00
adds r0, r4
bl oamt_add_pos2_onto_pos1
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
movs r1, 0x32
strh r1, [r0, 0x2E]
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
ldr r1, =0x0000ffd8
strh r1, [r0, 0x32]
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
ldrh r1, [r0, 0x22]
strh r1, [r0, 0x36]
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r1, r4, 0
adds r1, 0x1C
adds r0, r1
ldr r1, =sub_80A6EEC
str r1, [r0]
2017-09-02 20:56:53 +02:00
ldrb r2, [r5]
adds r0, r2, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
strh r2, [r0, 0x38]
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
ldr r1, =sub_805CC00
2017-09-04 12:22:04 +02:00
bl StoreSpriteCallbackInData6
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
movs r1, 0x1
2017-09-02 12:12:09 +02:00
bl StartSpriteAnim
2016-11-01 18:08:48 +01:00
ldr r0, =0x0000d6f9
2017-09-02 13:11:19 +02:00
bl AllocSpritePalette
2016-11-01 18:08:48 +01:00
lsls r0, 24
2017-09-02 20:56:53 +02:00
lsrs r4, r0, 24
2017-09-11 14:42:13 +02:00
ldr r2, =gPartnerTrainerId
2017-09-02 20:56:53 +02:00
ldrh r1, [r2]
ldr r0, =0x00000c03
cmp r1, r0
bne _081BE1FC
ldr r0, =gTrainerBackPicPaletteTable
ldr r0, [r0, 0x38]
lsls r4, 4
movs r2, 0x80
lsls r2, 1
adds r1, r4, r2
movs r2, 0x20
bl LoadCompressedPalette
b _081BE21A
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BE1FC:
ldrh r0, [r2]
bl sub_8162AA0
lsls r0, 24
ldr r1, =gTrainerFrontPicPaletteTable
lsrs r0, 21
2016-11-01 18:08:48 +01:00
adds r0, r1
ldr r0, [r0]
2017-09-02 20:56:53 +02:00
lsls r4, 4
2016-11-01 18:08:48 +01:00
movs r2, 0x80
lsls r2, 1
adds r1, r4, r2
movs r2, 0x20
bl LoadCompressedPalette
2017-09-02 20:56:53 +02:00
_081BE21A:
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
ldr r1, =gBankSpriteIds
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
adds r0, r1
ldrb r0, [r0]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r2
ldrb r2, [r1, 0x5]
movs r0, 0xF
ands r0, r2
orrs r0, r4
strb r0, [r1, 0x5]
2017-09-02 20:56:53 +02:00
ldr r0, =sub_81BE2C8
2016-11-01 18:08:48 +01:00
movs r1, 0x5
bl CreateTask
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r4, =gTasks
2016-11-01 18:08:48 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r4
ldrb r0, [r5]
strh r0, [r1, 0x8]
2016-11-01 19:35:16 +01:00
ldr r3, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r3]
ldrb r2, [r5]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE27E
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244B4
2016-11-01 18:08:48 +01:00
adds r0, r2, r0
ldrb r1, [r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r4
ldr r1, =sub_8073C30
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BE27E:
2016-11-01 18:08:48 +01:00
ldr r0, [r3]
ldr r2, [r0, 0x8]
ldrb r0, [r2, 0x9]
movs r1, 0x1
orrs r0, r1
strb r0, [r2, 0x9]
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =nullsub_77
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
pop {r4-r6}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE10C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE2C8
sub_81BE2C8: @ 81BE2C8
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
lsls r0, 24
lsrs r0, 24
mov r8, r0
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2016-11-01 18:08:48 +01:00
lsls r0, 2
add r0, r8
lsls r0, 3
adds r1, r0, r1
ldrh r2, [r1, 0xA]
movs r3, 0xA
ldrsh r0, [r1, r3]
cmp r0, 0x17
2017-09-02 20:56:53 +02:00
bgt _081BE2F4
2016-11-01 18:08:48 +01:00
adds r0, r2, 0x1
strh r0, [r1, 0xA]
2017-09-02 20:56:53 +02:00
b _081BE3B0
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BE2F4:
2017-08-31 16:48:24 +02:00
ldr r7, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
mov r9, r0
ldrh r0, [r1, 0x8]
strb r0, [r7]
bl battle_type_is_double
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE314
2017-02-02 05:15:38 +01:00
ldr r0, =gBattleTypeFlags
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
movs r1, 0x40
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE344
_081BE314:
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBufferA
2016-11-01 18:08:48 +01:00
ldrb r1, [r7]
lsls r2, r1, 9
adds r0, 0x1
adds r2, r0
2017-08-31 16:48:24 +02:00
ldr r0, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r1, 1
adds r1, r0
ldrh r0, [r1]
strb r0, [r2]
ldrb r0, [r7]
movs r1, 0
2017-09-02 20:56:53 +02:00
bl sub_81BD0E4
b _081BE398
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BE344:
2017-08-31 16:48:24 +02:00
ldr r4, =gBattleBufferA
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
lsls r1, r0, 9
adds r4, 0x1
adds r1, r4
2017-08-31 16:48:24 +02:00
ldr r5, =gBattlePartyID
2016-11-01 18:08:48 +01:00
lsls r0, 1
adds r0, r5
ldrh r0, [r0]
strb r0, [r1]
ldrb r0, [r7]
movs r1, 0
2017-09-02 20:56:53 +02:00
bl sub_81BD0E4
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
movs r6, 0x2
eors r0, r6
strb r0, [r7]
ldrb r0, [r7]
lsls r1, r0, 9
adds r1, r4
lsls r0, 1
adds r0, r5
ldrh r0, [r0]
strb r0, [r1]
ldrb r1, [r7]
lsls r0, r1, 1
adds r0, r5
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r2, =gPlayerParty
2016-11-01 18:08:48 +01:00
adds r0, r2
bl sub_805DD7C
ldrb r0, [r7]
movs r1, 0
2017-09-02 20:56:53 +02:00
bl sub_81BD0E4
2016-11-01 18:08:48 +01:00
ldrb r0, [r7]
eors r0, r6
strb r0, [r7]
2017-09-02 20:56:53 +02:00
_081BE398:
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
ldr r2, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r2]
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =sub_81BB02C
2016-11-01 18:08:48 +01:00
str r1, [r0]
mov r3, r9
strb r3, [r2]
mov r0, r8
bl DestroyTask
2017-09-02 20:56:53 +02:00
_081BE3B0:
2016-11-01 18:08:48 +01:00
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE2C8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start dp01t_30_3_80EB11C
dp01t_30_3_80EB11C: @ 81BE3D4
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBufferA
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r0]
lsls r0, r2, 9
adds r1, 0x1
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE404
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
2017-08-31 16:48:24 +02:00
bl GetBankSide
2016-11-01 18:08:48 +01:00
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BE404
bl PlayerPartnerBufferExecCompleted
b _081BE478
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BE404:
2016-11-01 19:35:16 +01:00
ldr r6, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0]
movs r2, 0x1
orrs r1, r2
strb r1, [r0]
ldrb r0, [r5]
lsls r3, r0, 9
ldr r4, =gBattleBufferA + 4
2016-11-01 18:08:48 +01:00
adds r1, r3, r4
subs r2, r4, 0x3
adds r2, r3, r2
ldrb r2, [r2]
subs r4, 0x2
adds r3, r4
ldrb r3, [r3]
bl sub_80735DC
2016-11-01 19:35:16 +01:00
ldr r2, =gUnknown_020244B4
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
adds r1, r2
movs r3, 0
strb r0, [r1]
ldr r0, [r6]
ldrb r1, [r5]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
strb r3, [r0, 0x5]
ldrb r2, [r5]
lsls r0, r2, 9
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE46C
2016-11-01 18:08:48 +01:00
ldr r0, [r6]
ldr r1, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
movs r1, 0x5D
strb r1, [r0, 0x5]
2017-09-02 20:56:53 +02:00
_081BE46C:
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBankFunc
2016-11-01 18:08:48 +01:00
ldrb r1, [r5]
lsls r1, 2
adds r1, r0
2017-09-02 20:56:53 +02:00
ldr r0, =sub_81BE498
2016-11-01 18:08:48 +01:00
str r0, [r1]
2017-09-02 20:56:53 +02:00
_081BE478:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end dp01t_30_3_80EB11C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE498
sub_81BE498: @ 81BE498
2016-11-01 18:08:48 +01:00
push {r4,lr}
2016-11-01 19:35:16 +01:00
ldr r4, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r0, [r4]
2017-08-31 16:48:24 +02:00
ldr r3, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r1, [r3]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0, 0x5]
adds r2, r1, 0x1
strb r2, [r0, 0x5]
lsls r1, 24
lsrs r1, 24
cmp r1, 0x5C
2017-09-02 20:56:53 +02:00
bls _081BE4D0
2016-11-01 18:08:48 +01:00
ldr r0, [r4]
ldrb r1, [r3]
ldr r2, [r0, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0
strb r1, [r0, 0x5]
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
_081BE4D0:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE498
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE4E0
sub_81BE4E0: @ 81BE4E0
2016-11-01 18:08:48 +01:00
push {lr}
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_020244D0
2016-11-01 18:08:48 +01:00
ldr r1, [r0]
2017-08-31 16:48:24 +02:00
ldr r0, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r3, [r0]
ldr r1, [r1, 0x4]
lsls r0, r3, 1
adds r0, r3
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE512
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
ldr r0, =gUnknown_020244B4
2016-11-01 18:08:48 +01:00
adds r0, r3, r0
ldrb r1, [r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r2
ldr r1, =sub_8073C30
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081BE512:
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE4E0
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE530
sub_81BE530: @ 81BE530
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE530
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE53C
sub_81BE53C: @ 81BE53C
2016-11-01 18:08:48 +01:00
push {r4,lr}
2017-08-31 16:48:24 +02:00
ldr r4, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
bl sub_80A6A90
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE582
2017-08-31 16:48:24 +02:00
ldr r3, =gSprites
ldr r0, =gBankSpriteIds
2016-11-01 18:08:48 +01:00
ldrb r1, [r4]
adds r0, r1, r0
ldrb r0, [r0]
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
adds r2, r3
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBufferA
2016-11-01 18:08:48 +01:00
lsls r1, 9
adds r0, 0x1
adds r1, r0
adds r2, 0x3E
movs r0, 0x1
ldrb r1, [r1]
ands r1, r0
lsls r1, 2
ldrb r3, [r2]
movs r0, 0x5
negs r0, r0
ands r0, r3
orrs r0, r1
strb r0, [r2]
ldrb r0, [r4]
bl sub_805E408
2017-09-02 20:56:53 +02:00
_081BE582:
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE53C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE59C
sub_81BE59C: @ 81BE59C
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
sub sp, 0x4
2017-09-02 20:56:53 +02:00
ldr r6, =gActiveBank
ldrb r0, [r6]
2016-11-01 18:08:48 +01:00
bl mplay_80342A4
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081BE5F4
ldr r5, =gBattleBufferA
ldrb r2, [r6]
2016-11-01 18:08:48 +01:00
lsls r1, r2, 9
2017-09-02 20:56:53 +02:00
adds r0, r5, 0x1
2016-11-01 18:08:48 +01:00
adds r0, r1, r0
ldrb r3, [r0]
2017-09-02 20:56:53 +02:00
adds r0, r5, 0x2
adds r0, r1, r0
ldrb r4, [r0]
adds r5, 0x3
adds r1, r5
2016-11-01 18:08:48 +01:00
ldrb r0, [r1]
lsls r0, 8
2017-09-02 20:56:53 +02:00
orrs r4, r0
str r4, [sp]
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
bl move_anim_start_t3
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _081BE5E8
bl PlayerPartnerBufferExecCompleted
b _081BE5F4
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081BE5E8:
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBankFunc
2017-09-02 20:56:53 +02:00
ldrb r1, [r6]
2016-11-01 18:08:48 +01:00
lsls r1, 2
adds r1, r0
2017-09-02 20:56:53 +02:00
ldr r0, =bx_80E8A6C
2016-11-01 18:08:48 +01:00
str r0, [r1]
2017-09-02 20:56:53 +02:00
_081BE5F4:
2016-11-01 18:08:48 +01:00
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE59C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE604
sub_81BE604: @ 81BE604
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE604
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE610
sub_81BE610: @ 81BE610
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE610
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81BE61C
sub_81BE61C: @ 81BE61C
push {r4,lr}
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleOutcome
2017-09-02 20:56:53 +02:00
ldr r1, =gBattleBufferA
ldr r4, =gActiveBank
ldrb r0, [r4]
2016-11-01 18:08:48 +01:00
lsls r0, 9
2017-09-02 20:56:53 +02:00
adds r1, 0x1
2016-11-01 18:08:48 +01:00
adds r0, r1
ldrb r0, [r0]
strb r0, [r2]
movs r0, 0x5
2017-09-02 16:03:53 +02:00
bl FadeOutMapMusic
2016-11-01 18:08:48 +01:00
movs r0, 0x3
bl BeginFastPaletteFade
2017-09-02 20:56:53 +02:00
bl PlayerPartnerBufferExecCompleted
2017-08-31 16:48:24 +02:00
ldr r1, =gBattleBankFunc
2017-09-02 20:56:53 +02:00
ldrb r0, [r4]
2016-11-01 18:08:48 +01:00
lsls r0, 2
adds r0, r1
ldr r1, =sub_80587B0
str r1, [r0]
2017-09-02 20:56:53 +02:00
pop {r4}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81BE61C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start nullsub_128
nullsub_128: @ 81BE668
2016-11-01 18:08:48 +01:00
bx lr
2017-09-02 20:56:53 +02:00
thumb_func_end nullsub_128
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
.align 2, 0 @ Don't pad with nop.