pokeemerald/asm/battle_controller_wally.s

4756 lines
74 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 WallyBufferRunCommand
WallyBufferRunCommand: @ 81683F4
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 _08168440
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 _0816843C
ldr r0, =gWallyBufferCommands
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 _08168440
.pool
_0816843C:
bl WallyBufferExecCompleted
_08168440:
pop {r0}
bx r0
thumb_func_end WallyBufferRunCommand
thumb_func_start sub_8168444
sub_8168444: @ 8168444
push {r4,r5,lr}
ldr r1, =gBattleStruct
ldr r0, [r1]
adds r0, 0x94
ldrb r0, [r0]
adds r4, r1, 0
cmp r0, 0x5
bls _08168456
b _08168564
_08168456:
lsls r0, 2
ldr r1, =_08168468
adds r0, r1
ldr r0, [r0]
mov pc, r0
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
.align 2, 0
_08168468:
.4byte _08168480
.4byte _08168492
.4byte _081684B0
.4byte _081684CE
.4byte _08168508
.4byte _08168540
_08168480:
ldr r0, [r4]
adds r0, 0x96
movs r1, 0x40
strb r1, [r0]
ldr r1, [r4]
adds r1, 0x94
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
_08168492:
ldr r1, [r4]
adds r1, 0x96
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08168564
movs r0, 0x5
bl PlaySE
movs r0, 0x1
movs r1, 0
b _081684E4
_081684B0:
ldr r1, [r4]
adds r1, 0x96
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08168564
movs r0, 0x5
bl PlaySE
movs r0, 0x1
movs r1, 0
b _081684E4
_081684CE:
ldr r1, [r4]
adds r1, 0x96
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08168564
movs r0, 0x1
movs r1, 0x9
_081684E4:
movs r2, 0
2017-10-22 18:43:15 +02:00
bl EmitTwoReturnValues
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
ldr r1, [r4]
adds r1, 0x94
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
ldr r0, [r4]
adds r0, 0x95
strb r5, [r0]
ldr r0, [r4]
adds r0, 0x96
movs r1, 0x40
strb r1, [r0]
b _08168564
_08168508:
ldr r1, [r4]
adds r1, 0x96
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
lsls r0, 24
cmp r0, 0
bne _08168564
movs r0, 0x5
bl PlaySE
movs r0, 0
2017-10-09 18:18:40 +02:00
bl ActionSelectionDestroyCursorAt
2017-09-02 20:56:53 +02:00
movs r0, 0x1
movs r1, 0
2017-10-09 18:18:40 +02:00
bl ActionSelectionCreateCursorAt
2017-09-02 20:56:53 +02:00
ldr r0, [r4]
adds r0, 0x96
movs r1, 0x40
strb r1, [r0]
ldr r1, [r4]
adds r1, 0x94
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
b _08168564
_08168540:
ldr r1, [r4]
adds r1, 0x96
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
lsls r0, 24
cmp r0, 0
bne _08168564
movs r0, 0x5
bl PlaySE
movs r0, 0x1
movs r1, 0x1
movs r2, 0
2017-10-22 18:43:15 +02:00
bl EmitTwoReturnValues
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_08168564:
pop {r4,r5}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_8168444
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_816856C
sub_816856C: @ 816856C
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 _08168590
bl WallyBufferExecCompleted
_08168590:
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_816856C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81685A4
sub_81685A4: @ 81685A4
push {lr}
2016-11-01 18:08:48 +01:00
movs r0, 0
2017-09-02 20:56:53 +02:00
bl IsTextPrinterActive
lsls r0, 16
cmp r0, 0
bne _081685B6
bl WallyBufferExecCompleted
_081685B6:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end sub_81685A4
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start bx_wait_t5
bx_wait_t5: @ 81685BC
push {lr}
ldr r0, =gDoingBattleAnim
ldrb r0, [r0]
cmp r0, 0
bne _081685CA
bl WallyBufferExecCompleted
_081685CA:
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_wait_t5
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_81685D4
sub_81685D4: @ 81685D4
push {lr}
ldr r0, =gPaletteFade
ldrb r1, [r0, 0x7]
movs r0, 0x80
2016-11-01 18:08:48 +01:00
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _081685FC
ldr r1, =gBattleBankFunc
2017-08-31 16:48:24 +02:00
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, =sub_8168610
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
bl nullsub_35
bl FreeAllWindowBuffers
bl DoWallyTutorialBagMenu
_081685FC:
pop {r0}
bx r0
.pool
thumb_func_end sub_81685D4
thumb_func_start sub_8168610
sub_8168610: @ 8168610
push {lr}
ldr r0, =gMain
ldr r1, [r0, 0x4]
2017-09-25 00:09:13 +02:00
ldr r0, =BattleMainCB2
2017-09-02 20:56:53 +02:00
cmp r1, r0
bne _08168636
ldr r0, =gPaletteFade
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
bne _08168636
2017-09-13 11:16:26 +02:00
ldr r0, =gScriptItemId
2017-09-02 20:56:53 +02:00
ldrh r1, [r0]
movs r0, 0x1
2017-10-22 18:43:15 +02:00
bl EmitOneReturnValue
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_08168636:
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_8168610
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_816864C
sub_816864C: @ 816864C
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
2017-09-02 20:56:53 +02:00
mov r7, r8
push {r7}
2017-10-01 18:54:01 +02:00
ldr r4, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r0, [r4]
ldr r5, =gActiveBank
ldrb r2, [r5]
ldr r1, [r0, 0x4]
lsls r3, r2, 1
adds r0, r3, r2
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r0, r1
ldrb r1, [r0]
movs r7, 0x88
adds r0, r7, 0
2016-11-01 18:08:48 +01:00
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _08168684
ldr r0, =gBattlePartyID
adds r0, r3, r0
ldrh r1, [r0]
movs r0, 0x64
muls r1, r0
ldr r0, =gPlayerParty
adds r1, r0
adds r0, r2, 0
bl sub_8172EF0
_08168684:
ldr r1, [r4]
ldrb r0, [r5]
movs r6, 0x2
adds r2, r6, 0
eors r2, r0
ldr r1, [r1, 0x4]
lsls r3, r2, 1
adds r0, r3, r2
lsls r0, 2
adds r0, r1
ldrb r1, [r0]
adds r0, r7, 0
ands r0, r1
cmp r0, 0
bne _081686B6
ldr r0, =gBattlePartyID
adds r0, r3, r0
ldrh r1, [r0]
movs r0, 0x64
muls r1, r0
ldr r0, =gPlayerParty
adds r1, r0
adds r0, r2, 0
bl sub_8172EF0
_081686B6:
ldr r0, [r4]
ldrb r2, [r5]
ldr r3, [r0, 0x4]
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r3
ldrb r1, [r0]
movs r4, 0x8
adds r0, r4, 0
ands r0, r1
cmp r0, 0
beq _081686D2
b _081687DC
_081686D2:
2016-11-01 18:08:48 +01:00
adds r1, r2, 0
2017-09-02 20:56:53 +02:00
eors r1, r6
2016-11-01 18:08:48 +01:00
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r3
ldrb r1, [r0]
2017-09-02 20:56:53 +02:00
adds r0, r4, 0
2016-11-01 18:08:48 +01:00
ands r0, r1
2017-09-02 20:56:53 +02:00
cmp r0, 0
bne _081687DC
ldr r0, =gSprites
mov r8, r0
ldr r7, =gUnknown_03005D7C
adds r0, r2, r7
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
mov r4, r8
adds r4, 0x1C
adds r0, r4
2016-11-01 18:08:48 +01:00
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 _081687DC
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
2017-09-02 20:56:53 +02:00
adds r0, r4
2016-11-01 18:08:48 +01:00
ldr r0, [r0]
cmp r0, r3
2017-09-02 20:56:53 +02:00
bne _081687DC
2017-10-09 18:18:40 +02:00
bl IsDoubleBattle
2016-11-01 18:08:48 +01:00
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _0816877A
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 _0816877A
ldrb r0, [r5]
eors r0, r6
adds r0, r7
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
add r0, r8
bl DestroySprite
2017-09-08 22:27:27 +02:00
ldr r4, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
adds r1, r6, 0
2016-11-01 18:08:48 +01:00
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
2017-10-09 18:18:40 +02:00
bl UpdateHealthboxAttribute
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
eors r0, r6
2016-11-01 18:08:48 +01:00
bl sub_8076918
2017-09-02 20:56:53 +02:00
ldrb r0, [r5]
eors r0, r6
2016-11-01 18:08:48 +01:00
adds r0, r4
ldrb r0, [r0]
2017-10-09 18:18:40 +02:00
bl SetHealthboxSpriteVisible
2017-09-02 20:56:53 +02:00
_0816877A:
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
2017-10-09 18:18:40 +02:00
bl UpdateHealthboxAttribute
2016-11-01 18:08:48 +01:00
ldrb r0, [r4]
bl sub_8076918
ldrb r0, [r4]
adds r0, r5
ldrb r0, [r0]
2017-10-09 18:18:40 +02:00
bl SetHealthboxSpriteVisible
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
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_8168818
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_081687DC:
pop {r3}
2016-11-01 18:08:48 +01:00
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
2017-09-02 20:56:53 +02:00
thumb_func_end sub_816864C
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8168818
sub_8168818: @ 8168818
push {r4-r7,lr}
mov r7, r8
push {r7}
movs r4, 0
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2017-09-08 22:27:27 +02:00
ldr r0, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
ldr r1, =gActiveBank
mov r8, r1
ldrb r3, [r1]
adds r0, r3, r0
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 r2, 0x1C
adds r0, r2
ldr r1, [r0]
ldr r0, =SpriteCallbackDummy
cmp r1, r0
bne _08168842
movs r4, 0x1
_08168842:
cmp r4, 0
beq _08168904
2017-10-01 18:54:01 +02:00
ldr r7, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r0, [r7]
ldr r4, [r0, 0x4]
lsls r0, r3, 1
adds r0, r3
lsls r0, 2
adds r2, r0, r4
ldrb r1, [r2, 0x1]
movs r5, 0x1
adds r0, r5, 0
ands r0, r1
2016-11-01 18:08:48 +01:00
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _08168904
movs r6, 0x2
adds r1, r6, 0
eors r1, r3
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r4
ldrb r1, [r0, 0x1]
adds r0, r5, 0
ands r0, r1
2016-11-01 18:08:48 +01:00
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _08168904
ldrb r1, [r2]
movs r3, 0x7F
adds r0, r3, 0
ands r0, r1
strb r0, [r2]
ldr r0, [r7]
mov r1, r8
ldrb r2, [r1]
ldr r0, [r0, 0x4]
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r2, [r1, 0x1]
movs r4, 0x2
negs r4, r4
adds r0, r4, 0
ands r0, r2
strb r0, [r1, 0x1]
ldr r2, [r7]
mov r1, r8
ldrb r0, [r1]
adds r1, r6, 0
eors r1, r0
ldr r2, [r2, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0]
ands r3, r1
strb r3, [r0]
ldr r2, [r7]
mov r1, r8
ldrb r0, [r1]
adds r1, r6, 0
eors r1, r0
ldr r2, [r2, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r0, 0x1]
ands r4, r1
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeSpritePaletteByTag
ldr r0, =c3_0802FDF4
movs r1, 0xA
bl CreateTask
ldr r2, =gBattlePartyID
mov r0, r8
ldrb r1, [r0]
lsls r0, r1, 1
adds r0, r2
ldrh r2, [r0]
movs r0, 0x64
muls r0, r2
ldr r2, =gPlayerParty
adds r0, r2
bl sub_805E990
bl WallyBufferExecCompleted
_08168904:
pop {r3}
mov r8, r3
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_8168818
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8168934
sub_8168934: @ 8168934
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]
2017-10-09 18:18:40 +02:00
bl SetHealthboxSpriteVisible
2016-11-01 18:08:48 +01:00
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 _0816897C
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
adds r0, r6
ldrb r0, [r0]
movs r2, 0
2017-10-18 00:00:46 +02:00
bl UpdateHpTextInHealthbox
2017-09-02 20:56:53 +02:00
b _08168996
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816897C:
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 WallyBufferExecCompleted
_08168996:
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_8168934
thumb_func_start bx_blink_t5
bx_blink_t5: @ 81689A4
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 _081689F0
movs r3, 0
movs r0, 0
strh r0, [r4, 0x30]
adds r2, r4, 0
adds r2, 0x3E
ldrb r1, [r2]
subs r0, 0x5
ands r0, r1
strb r0, [r2]
ldr r0, =gDoingBattleAnim
strb r3, [r0]
bl WallyBufferExecCompleted
b _08168A1A
.pool
_081689F0:
ldrh r0, [r4, 0x30]
movs r1, 0x3
ands r0, r1
cmp r0, 0
bne _08168A14
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]
_08168A14:
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
_08168A1A:
pop {r4}
pop {r0}
bx r0
thumb_func_end bx_blink_t5
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8168A20
sub_8168A20: @ 8168A20
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
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 _08168A74
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]
2017-10-09 18:18:40 +02:00
bl SetHealthboxSpriteInvisible
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_08168A74:
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_8168A20
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8168A90
sub_8168A90: @ 8168A90
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
ldr r2, =gSprites
2017-08-31 16:48:24 +02:00
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 _08168AB4
bl WallyBufferExecCompleted
_08168AB4:
pop {r0}
bx r0
.pool
thumb_func_end sub_8168A90
thumb_func_start sub_8168AC8
sub_8168AC8: @ 8168AC8
push {lr}
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
ldr r2, [r2, 0x4]
lsls r0, r1, 1
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-09-02 20:56:53 +02:00
lsls r0, 2
adds r0, r2
2016-11-01 18:08:48 +01:00
ldrb r1, [r0]
2017-09-02 20:56:53 +02:00
movs r0, 0x20
2016-11-01 18:08:48 +01:00
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _08168AEA
bl WallyBufferExecCompleted
_08168AEA:
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_8168AC8
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start WallyBufferExecCompleted
WallyBufferExecCompleted: @ 8168AF8
push {r4,lr}
sub sp, 0x4
ldr r1, =gBattleBankFunc
ldr r4, =gActiveBank
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, =WallyBufferRunCommand
str r1, [r0]
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x2
2016-11-01 18:08:48 +01:00
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _08168B4C
2017-09-06 21:18:50 +02:00
bl GetMultiplayerId
2017-09-02 20:56:53 +02:00
mov r1, sp
strb r0, [r1]
movs r0, 0x2
movs r1, 0x4
mov r2, sp
bl PrepareBufferDataTransferLink
ldr r1, =gBattleBufferA
ldrb r0, [r4]
lsls r0, 9
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-09-02 20:56:53 +02:00
movs r1, 0x38
strb r1, [r0]
b _08168B5E
.pool
_08168B4C:
ldr r2, =gBattleExecBuffer
ldr r1, =gBitTable
ldrb r0, [r4]
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r0, r1
2016-11-01 18:08:48 +01:00
ldr r1, [r0]
2017-09-02 20:56:53 +02:00
ldr r0, [r2]
bics r0, r1
str r0, [r2]
_08168B5E:
add sp, 0x4
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 WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8168B70
sub_8168B70: @ 8168B70
push {lr}
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r2, [r0]
ldr r0, =gActiveBank
ldrb r1, [r0]
ldr r2, [r2, 0x4]
2016-11-01 18:08:48 +01:00
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
2017-09-02 20:56:53 +02:00
adds r0, r2
ldrb r1, [r0]
movs r0, 0x10
2016-11-01 18:08:48 +01:00
ands r0, r1
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _08168B92
bl WallyBufferExecCompleted
_08168B92:
pop {r0}
bx r0
.pool
thumb_func_end sub_8168B70
thumb_func_start WallyHandleGetMonData
WallyHandleGetMonData: @ 8168BA0
2017-09-02 20:56:53 +02:00
push {r4-r6,lr}
sub sp, 0x100
movs r6, 0
ldr r1, =gBattleBufferA
ldr r0, =gActiveBank
ldrb r2, [r0]
lsls r0, r2, 9
adds r1, 0x2
adds r1, r0, r1
ldrb r0, [r1]
cmp r0, 0
bne _08168BD8
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 sub_8168C14
2016-11-01 18:08:48 +01:00
adds r6, r0, 0
2017-09-02 20:56:53 +02:00
b _08168BFA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08168BD8:
2016-11-01 18:08:48 +01:00
ldrb r4, [r1]
movs r5, 0
2017-09-02 20:56:53 +02:00
_08168BDC:
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 _08168BF2
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 sub_8168C14
2016-11-01 18:08:48 +01:00
adds r6, r0
2017-09-02 20:56:53 +02:00
_08168BF2:
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 _08168BDC
_08168BFA:
2016-11-01 18:08:48 +01:00
lsls r1, r6, 16
lsrs r1, 16
movs r0, 0x1
mov r2, sp
2017-10-14 11:34:26 +02:00
bl EmitDataTransfer
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
add sp, 0x100
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end WallyHandleGetMonData
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8168C14
sub_8168C14: @ 8168C14
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 _08168C3E
bl _081693AA
_08168C3E:
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
ldr r1, =_08168C54
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
_08168C54:
.4byte _08168D44
.4byte _08168F68
.4byte _08168F78
.4byte _08168F88
.4byte _08168FF0
.4byte _08168FF0
.4byte _08168FF0
.4byte _08168FF0
.4byte _0816900C
.4byte _08169048
.4byte _08169048
.4byte _08169048
.4byte _08169048
.4byte _081693AA
.4byte _081693AA
.4byte _081693AA
.4byte _081693AA
.4byte _08169064
.4byte _08169074
.4byte _081690A4
.4byte _081690B4
.4byte _081690C4
.4byte _081690D4
.4byte _081690E4
.4byte _081690F4
.4byte _08169104
.4byte _08169114
.4byte _08169124
.4byte _08169134
.4byte _08169144
.4byte _08169154
.4byte _08169164
.4byte _081691B4
.4byte _081691C4
.4byte _081691D4
.4byte _081691E4
.4byte _081691F4
.4byte _08169204
.4byte _08169214
.4byte _08169224
.4byte _08169234
.4byte _08169268
.4byte _08169278
.4byte _08169288
.4byte _08169298
.4byte _081692A8
.4byte _081692B8
.4byte _081692C8
.4byte _081692D8
.4byte _081692F8
.4byte _08169308
.4byte _08169318
.4byte _08169328
.4byte _08169338
.4byte _08169348
.4byte _08169358
.4byte _08169368
.4byte _08169378
.4byte _08169388
.4byte _08169398
_08168D44:
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
_08168D90:
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 _08168D90
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
_08168F48:
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 _08168F48
b _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08168F68:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08168F78:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08168F88:
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
_08168F9E:
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 _08168F9E
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
_08168FDC:
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 _08168FDC
b _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08168FF0:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816900C:
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
_08169018:
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 _08169018
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 _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169048:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169064:
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 _0816907E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169074:
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
_0816907E:
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 _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081690A4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081690B4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081690C4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081690D4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081690E4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081690F4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169104:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169114:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169124:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169134:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169144:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169154:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169164:
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 _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081691B4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081691C4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081691D4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081691E4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081691F4:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169204:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169214:
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 _0816923E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169224:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169234:
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
_0816923E:
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 _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169268:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169278:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169288:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169298:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081692A8:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081692B8:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081692C8:
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 _081692E2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081692D8:
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
_081692E2:
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 _081693AA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081692F8:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169308:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169318:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169328:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169338:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169348:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169358:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169368:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169378:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169388:
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 _081693A2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169398:
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
_081693A2:
bl GetMonData
2016-11-01 18:08:48 +01:00
strb r0, [r7]
movs r6, 0x1
2017-09-02 20:56:53 +02:00
_081693AA:
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 sub_8168C14
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleGetRawMonData
WallyHandleGetRawMonData: @ 81693C0
2016-11-01 18:08:48 +01:00
push {lr}
bl PlayerHandleGetRawMonData
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleGetRawMonData
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleSetMonData
WallyHandleSetMonData: @ 81693CC
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 _081693FC
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_8169424
b _0816941A
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081693FC:
2016-11-01 18:08:48 +01:00
ldrb r4, [r1]
movs r5, 0
2017-09-02 20:56:53 +02:00
_08169400:
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 _0816940E
2016-11-01 18:08:48 +01:00
adds r0, r5, 0
2017-09-02 20:56:53 +02:00
bl sub_8169424
_0816940E:
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 _08169400
_0816941A:
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end WallyHandleSetMonData
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_8169424
sub_8169424: @ 8169424
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 _08169450
bl _08169DEA
_08169450:
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
ldr r1, =_08169468
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
_08169468:
.4byte _08169558
.4byte _081696F0
.4byte _08169710
.4byte _08169730
.4byte _08169788
.4byte _08169788
.4byte _08169788
.4byte _08169788
.4byte _081697B0
.4byte _08169814
.4byte _08169814
.4byte _08169814
.4byte _08169814
.4byte _08169DEA
.4byte _08169DEA
.4byte _08169DEA
.4byte _08169DEA
.4byte _08169844
.4byte _08169864
.4byte _08169884
.4byte _081698A4
.4byte _081698C4
.4byte _081698E4
.4byte _08169904
.4byte _08169924
.4byte _08169944
.4byte _08169964
.4byte _08169984
.4byte _081699A4
.4byte _081699C4
.4byte _081699E4
.4byte _08169A04
.4byte _08169A74
.4byte _08169A94
.4byte _08169AB4
.4byte _08169AD4
.4byte _08169AF4
.4byte _08169B14
.4byte _08169B34
.4byte _08169B54
.4byte _08169B74
.4byte _08169B94
.4byte _08169BB4
.4byte _08169BD4
.4byte _08169BF4
.4byte _08169C14
.4byte _08169C34
.4byte _08169C54
.4byte _08169C74
.4byte _08169C94
.4byte _08169CB4
.4byte _08169CD4
.4byte _08169CF4
.4byte _08169D14
.4byte _08169D34
.4byte _08169D54
.4byte _08169D74
.4byte _08169D94
.4byte _08169DB4
.4byte _08169DD4
_08169558:
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
_081695BE:
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 _081695BE
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081696F0:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169710:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169730:
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
_0816974A:
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 _0816974A
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169788:
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 _0816982C
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081697B0:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169814:
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
_0816982C:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169844:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169864:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169884:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081698A4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081698C4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081698E4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169904:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169924:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169944:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169964:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169984:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081699A4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081699C4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_081699E4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169A04:
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 _08169B24
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169A74:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169A94:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169AB4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169AD4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169AF4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169B14:
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
_08169B24:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169B34:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169B54:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169B74:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169B94:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169BB4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169BD4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169BF4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169C14:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169C34:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169C54:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169C74:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169C94:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169CB4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169CD4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169CF4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169D14:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169D34:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169D54:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169D74:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169D94:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169DB4:
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 _08169DEA
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_08169DD4:
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
_08169DEA:
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_8169424
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleSetRawMonData
WallyHandleSetRawMonData: @ 8169E20
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleSetRawMonData
2017-09-02 20:56:53 +02:00
thumb_func_start WallyHandleLoadMonSprite
WallyHandleLoadMonSprite: @ 8169E2C
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
pop {r0}
bx r0
thumb_func_end WallyHandleLoadMonSprite
2017-09-02 20:56:53 +02:00
thumb_func_start WallyHandleSwitchInAnim
WallyHandleSwitchInAnim: @ 8169E38
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
pop {r0}
bx r0
thumb_func_end WallyHandleSwitchInAnim
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleReturnMonToBall
WallyHandleReturnMonToBall: @ 8169E44
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-09-02 20:56:53 +02:00
ldr r0, =gBattleBufferA
2017-08-31 16:48:24 +02:00
ldr r6, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r2, [r6]
2017-09-02 20:56:53 +02:00
lsls r1, r2, 9
adds r0, 0x1
adds r1, r0
ldrb r0, [r1]
2016-11-01 18:08:48 +01:00
cmp r0, 0
2017-09-02 20:56:53 +02:00
bne _08169E80
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x1
2017-10-22 18:43:15 +02:00
bl DoSpecialBattleAnimation
2017-09-02 20:56:53 +02:00
ldr r0, =gBattleBankFunc
ldrb r1, [r6]
lsls r1, 2
adds r1, r0
ldr r0, =sub_8168A20
str r0, [r1]
b _08169EB6
.pool
_08169E80:
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
2016-11-01 18:08:48 +01:00
lsls r0, 2
2017-09-02 20:56:53 +02:00
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]
2016-11-01 18:08:48 +01:00
adds r0, r1
2017-09-02 20:56:53 +02:00
ldrb r0, [r0]
2017-10-09 18:18:40 +02:00
bl SetHealthboxSpriteInvisible
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_08169EB6:
2016-11-01 18:08:48 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleReturnMonToBall
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleDrawTrainerPic
WallyHandleDrawTrainerPic: @ 8169EC8
2017-09-02 20:56:53 +02:00
push {r4-r6,lr}
ldr r4, =gActiveBank
ldrb r1, [r4]
movs r0, 0x6
bl DecompressTrainerBackPic
2017-09-02 20:56:53 +02:00
ldrb r0, [r4]
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
2017-09-02 20:56:53 +02:00
movs r0, 0x6
2017-09-11 18:27:54 +02:00
bl sub_806A12C
2017-09-02 20:56:53 +02:00
ldr r0, =gUnknown_0202499C
2017-10-09 18:18:40 +02:00
ldr r1, =gTrainerBackPicCoords
2017-09-02 20:56:53 +02:00
ldrb r1, [r1, 0x18]
movs r2, 0x8
subs r2, r1
lsls r2, 18
movs r1, 0xA0
lsls r1, 15
adds r2, r1
asrs r2, 16
movs r1, 0x50
movs r3, 0x1E
bl CreateSprite
2017-08-31 16:48:24 +02:00
ldr r6, =gBankSpriteIds
2017-09-02 20:56:53 +02:00
ldrb r1, [r4]
2016-11-01 18:08:48 +01:00
adds r1, r6
strb r0, [r1]
2017-09-02 20:56:53 +02:00
ldr r5, =gSprites
ldrb r3, [r4]
2016-11-01 18:08:48 +01:00
adds r0, r3, r6
ldrb r0, [r0]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
2017-09-02 20:56:53 +02:00
adds r1, r5
2016-11-01 18:08:48 +01:00
lsls r3, 4
ldrb r2, [r1, 0x5]
movs r0, 0xF
ands r0, r2
orrs r0, r3
strb r0, [r1, 0x5]
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
2017-09-02 20:56:53 +02:00
movs r1, 0xF0
strh r1, [r0, 0x24]
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
adds r0, r5
2017-09-02 20:56:53 +02:00
ldr r1, =0x0000fffe
2016-11-01 18:08:48 +01:00
strh r1, [r0, 0x2E]
ldrb r0, [r4]
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 r5, 0x1C
2016-11-01 18:08:48 +01:00
adds r0, r5
2017-09-02 20:56:53 +02:00
ldr r1, =sub_805D7AC
2016-11-01 18:08:48 +01:00
str r1, [r0]
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_816856C
2016-11-01 18:08:48 +01:00
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleDrawTrainerPic
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleTrainerSlide
WallyHandleTrainerSlide: @ 8169F94
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
2017-09-02 20:56:53 +02:00
ldr r4, =gActiveBank
ldrb r1, [r4]
movs r0, 0x6
bl DecompressTrainerBackPic
2017-09-02 20:56:53 +02:00
ldrb r0, [r4]
bl GetBankIdentity
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
movs r0, 0x6
2017-09-11 18:27:54 +02:00
bl sub_806A12C
2017-09-02 20:56:53 +02:00
ldr r0, =gUnknown_0202499C
2017-10-09 18:18:40 +02:00
ldr r1, =gTrainerBackPicCoords
2017-09-02 20:56:53 +02:00
ldrb r1, [r1, 0x18]
movs r2, 0x8
subs r2, r1
lsls r2, 18
movs r1, 0xA0
lsls r1, 15
adds r2, r1
asrs r2, 16
movs r1, 0x50
movs r3, 0x1E
bl CreateSprite
ldr r6, =gBankSpriteIds
ldrb r1, [r4]
adds r1, r6
strb r0, [r1]
ldr r5, =gSprites
ldrb r3, [r4]
adds r0, r3, r6
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 r0, [r4]
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-09-02 20:56:53 +02:00
adds r0, r5
ldr r1, =0x0000ffa0
strh r1, [r0, 0x24]
ldrb r0, [r4]
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-09-02 20:56:53 +02:00
adds r0, r5
movs r1, 0x2
strh r1, [r0, 0x2E]
ldrb r0, [r4]
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-09-02 20:56:53 +02:00
adds r5, 0x1C
adds r0, r5
ldr r1, =sub_805D7AC
2016-11-01 18:08:48 +01:00
str r1, [r0]
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_8168A90
2016-11-01 18:08:48 +01:00
str r1, [r0]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleTrainerSlide
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleTrainerSlideBack
WallyHandleTrainerSlideBack: @ 816A060
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleTrainerSlideBack
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleFaintAnimation
WallyHandleFaintAnimation: @ 816A06C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleFaintAnimation
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd11
WallyHandleCmd11: @ 816A078
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd11
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd12
WallyHandleCmd12: @ 816A084
2017-09-02 20:56:53 +02:00
push {r4,r5,lr}
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r0, [r0]
ldr r1, [r0, 0x8]
movs r0, 0x4
strb r0, [r1, 0x8]
ldr r1, =gDoingBattleAnim
movs r0, 0x1
strb r0, [r1]
ldr r5, =gActiveBank
ldrb r4, [r5]
movs r0, 0x1
2017-09-26 22:39:59 +02:00
bl GetBankByIdentity
2017-09-02 20:56:53 +02:00
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x4
2017-10-22 18:43:15 +02:00
bl DoSpecialBattleAnimation
2017-09-02 20:56:53 +02:00
ldr r1, =gBattleBankFunc
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
ldr r1, =bx_wait_t5
str r1, [r0]
pop {r4,r5}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
.pool
thumb_func_end WallyHandleCmd12
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleBallThrow
WallyHandleBallThrow: @ 816A0D8
2017-09-02 20:56:53 +02:00
push {r4,r5,lr}
ldr r1, =gBattleBufferA
2017-08-31 16:48:24 +02:00
ldr r5, =gActiveBank
2016-11-01 18:08:48 +01:00
ldrb r0, [r5]
2017-09-02 20:56:53 +02:00
lsls r0, 9
adds r1, 0x1
adds r0, r1
ldrb r1, [r0]
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r0, [r0]
ldr r0, [r0, 0x8]
strb r1, [r0, 0x8]
ldr r1, =gDoingBattleAnim
movs r0, 0x1
strb r0, [r1]
ldrb r4, [r5]
movs r0, 0x1
2017-09-26 22:39:59 +02:00
bl GetBankByIdentity
2017-09-02 20:56:53 +02:00
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
adds r0, r4, 0
adds r1, r4, 0
movs r3, 0x4
2017-10-22 18:43:15 +02:00
bl DoSpecialBattleAnimation
2017-09-02 20:56:53 +02:00
ldr r1, =gBattleBankFunc
ldrb r0, [r5]
lsls r0, 2
adds r0, r1
ldr r1, =bx_wait_t5
str r1, [r0]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleBallThrow
2017-09-02 20:56:53 +02:00
thumb_func_start WallyHandlePause
WallyHandlePause: @ 816A138
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
pop {r0}
bx r0
thumb_func_end WallyHandlePause
2017-09-02 20:56:53 +02:00
thumb_func_start WallyHandleMoveAnimation
WallyHandleMoveAnimation: @ 816A144
2017-09-02 20:56:53 +02:00
push {r4-r6,lr}
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
ldr r6, =gActiveBank
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
2017-10-14 23:37:44 +02:00
ldr r5, =gAnimMoveTurn
2017-09-02 20:56:53 +02:00
mov r1, r12
adds r1, 0x3
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
2017-10-14 16:55:25 +02:00
ldr r4, =gAnimMovePower
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-10-14 16:55:25 +02:00
ldr r4, =gAnimMoveDmg
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-10-14 16:55:25 +02:00
ldr r3, =gAnimFriendship
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-10-14 16:55:25 +02:00
ldr r3, =gAnimDisableStructPtr
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, =gTransformedPersonalities
2017-09-02 20:56:53 +02:00
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 IsMoveWithoutAnimation
2016-11-01 18:08:48 +01:00
lsls r0, 24
lsrs r3, r0, 24
cmp r3, 0
2017-09-02 20:56:53 +02:00
beq _0816A23C
bl WallyBufferExecCompleted
b _0816A25A
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816A23C:
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
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_5
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_0816A25A:
pop {r4-r6}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleMoveAnimation
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start bx_move_anim_5
bx_move_anim_5: @ 816A26C
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-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
2017-09-02 20:56:53 +02:00
mov r9, r0
2016-11-01 18:08:48 +01:00
adds r0, r1, r0
ldrb r4, [r0]
2017-09-02 20:56:53 +02:00
adds r2, 0x2
mov r8, r2
add r1, r8
ldrb r0, [r1]
2016-11-01 18:08:48 +01:00
lsls r0, 8
orrs r4, r0
2017-10-01 18:54:01 +02:00
ldr r7, =gBattleSpritesDataPtr
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 _0816A2F6
2016-11-01 18:08:48 +01:00
cmp r2, 0x1
2017-09-02 20:56:53 +02:00
bgt _0816A2BC
2016-11-01 18:08:48 +01:00
cmp r2, 0
2017-09-02 20:56:53 +02:00
beq _0816A2C6
b _0816A3AC
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816A2BC:
2016-11-01 18:08:48 +01:00
cmp r2, 0x2
2017-09-02 20:56:53 +02:00
beq _0816A320
2016-11-01 18:08:48 +01:00
cmp r2, 0x3
2017-09-02 20:56:53 +02:00
beq _0816A370
b _0816A3AC
_0816A2C6:
2016-11-01 18:08:48 +01:00
ldr r1, [r5]
lsls r0, r3, 2
2017-09-02 20:56:53 +02:00
adds r0, r1
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
beq _0816A2E2
adds r0, r3, 0
adds r1, r3, 0
adds r2, r3, 0
2016-11-01 18:08:48 +01:00
movs r3, 0x5
2017-10-22 18:43:15 +02:00
bl DoSpecialBattleAnimation
2017-09-02 20:56:53 +02:00
_0816A2E2:
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 _0816A3AC
_0816A2F6:
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 _0816A3AC
2016-11-01 18:08:48 +01:00
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
2017-10-14 16:55:25 +02:00
bl DoMoveAnim
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, 0x2
strb r1, [r0, 0x4]
2017-09-02 20:56:53 +02:00
b _0816A3AC
_0816A320:
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 _0816A3AC
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 _0816A354
2016-11-01 18:08:48 +01:00
adds r0, r2, 0
adds r1, r2, 0
movs r3, 0x6
2017-10-22 18:43:15 +02:00
bl DoSpecialBattleAnimation
2017-09-02 20:56:53 +02:00
_0816A354:
2016-11-01 18:08:48 +01:00
ldr r0, [r7]
ldrb r1, [r6]
2017-09-02 20:56:53 +02:00
ldr r2, [r0, 0x4]
2016-11-01 18:08:48 +01:00
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 _0816A3AC
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816A370:
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 _0816A3AC
2016-11-01 18:08:48 +01:00
bl sub_805E394
ldrb r0, [r6]
lsls r2, r0, 9
2017-09-02 20:56:53 +02:00
mov r3, r9
2016-11-01 18:08:48 +01:00
adds r1, r2, r3
ldrb r1, [r1]
2017-09-02 20:56:53 +02:00
add r2, r8
2016-11-01 18:08:48 +01:00
ldrb r2, [r2]
lsls r2, 8
orrs r1, r2
bl TrySetBehindSubstituteSpriteBit
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
strb r4, [r0, 0x4]
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_0816A3AC:
pop {r3,r4}
2016-11-01 18:08:48 +01:00
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
thumb_func_end bx_move_anim_5
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandlePrintString
WallyHandlePrintString: @ 816A3B8
2017-09-02 20:56:53 +02:00
push {r4,lr}
2017-10-01 01:12:42 +02:00
ldr r0, =gBattle_BG0_X
2016-11-01 18:08:48 +01:00
movs r1, 0
strh r1, [r0]
2017-10-01 01:12:42 +02:00
ldr r0, =gBattle_BG0_Y
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 BattleHandleAddTextPrinter
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_81685A4
2016-11-01 18:08:48 +01:00
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
thumb_func_end WallyHandlePrintString
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandlePrintStringPlayerOnly
WallyHandlePrintStringPlayerOnly: @ 816A40C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
ldr r0, =gActiveBank
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
cmp r0, 0
bne _0816A428
bl WallyHandlePrintString
2017-09-02 20:56:53 +02:00
b _0816A42C
.pool
_0816A428:
bl WallyBufferExecCompleted
_0816A42C:
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandlePrintStringPlayerOnly
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_816A430
sub_816A430: @ 816A430
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl IsDma3ManagerBusyWithBgCopy
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0816A456
2017-10-01 01:12:42 +02:00
ldr r0, =gBattle_BG0_X
2017-09-02 20:56:53 +02:00
strh r1, [r0]
2017-10-01 01:12:42 +02:00
ldr r1, =gBattle_BG0_Y
2017-09-02 20:56:53 +02:00
movs r0, 0xA0
strh r0, [r1]
ldr r1, =gBattleBankFunc
ldr r0, =gActiveBank
ldrb r0, [r0]
lsls r0, 2
adds r0, r1
ldr r1, =sub_8168444
str r1, [r0]
_0816A456:
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_816A430
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleChooseAction
WallyHandleChooseAction: @ 816A470
2017-09-02 20:56:53 +02:00
push {r4,lr}
ldr r1, =gBattleBankFunc
ldr r0, =gActiveBank
ldrb r0, [r0]
lsls r0, 2
adds r0, r1
ldr r1, =sub_816A430
str r1, [r0]
ldr r0, =gText_BattleMenu
2017-09-02 20:56:53 +02:00
movs r1, 0x2
bl BattleHandleAddTextPrinter
2017-09-02 20:56:53 +02:00
movs r4, 0
_0816A48A:
lsls r0, r4, 24
lsrs r0, 24
2017-10-09 18:18:40 +02:00
bl ActionSelectionDestroyCursorAt
2017-09-02 20:56:53 +02:00
adds r4, 0x1
cmp r4, 0x3
ble _0816A48A
2017-10-02 23:32:39 +02:00
ldr r1, =gActionSelectionCursor
2017-09-02 20:56:53 +02:00
ldr r0, =gActiveBank
ldrb r0, [r0]
adds r0, r1
ldrb r0, [r0]
movs r1, 0
2017-10-09 18:18:40 +02:00
bl ActionSelectionCreateCursorAt
ldr r0, =gText_WhatWillWallyDo
2017-09-26 22:39:59 +02:00
bl BattleStringExpandPlaceholdersToDisplayedString
ldr r0, =gDisplayedStringBattle
2017-09-02 20:56:53 +02:00
movs r1, 0x1
bl BattleHandleAddTextPrinter
2017-09-02 20:56:53 +02:00
pop {r4}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
.pool
thumb_func_end WallyHandleChooseAction
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd19
WallyHandleCmd19: @ 816A4D8
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
pop {r0}
bx r0
thumb_func_end WallyHandleCmd19
2017-09-02 20:56:53 +02:00
thumb_func_start WallyHandleChooseMove
WallyHandleChooseMove: @ 816A4E4
2017-09-02 20:56:53 +02:00
push {r4,lr}
ldr r4, =gBattleStruct
ldr r1, [r4]
adds r0, r1, 0
adds r0, 0x95
ldrb r0, [r0]
cmp r0, 0x1
beq _0816A522
cmp r0, 0x1
bgt _0816A504
cmp r0, 0
beq _0816A50A
b _0816A574
.pool
_0816A504:
cmp r0, 0x2
beq _0816A550
b _0816A574
_0816A50A:
2017-10-22 18:43:15 +02:00
bl InitMoveSelectionsVarsAndStrings
2017-09-02 20:56:53 +02:00
ldr r1, [r4]
adds r1, 0x95
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
ldr r0, [r4]
adds r0, 0x97
movs r1, 0x50
strb r1, [r0]
b _0816A574
_0816A522:
bl IsDma3ManagerBusyWithBgCopy
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0
bne _0816A574
2017-10-01 01:12:42 +02:00
ldr r0, =gBattle_BG0_X
2017-09-02 20:56:53 +02:00
strh r1, [r0]
2017-10-01 01:12:42 +02:00
ldr r1, =gBattle_BG0_Y
2017-09-02 20:56:53 +02:00
movs r2, 0xA0
lsls r2, 1
adds r0, r2, 0
strh r0, [r1]
ldr r1, [r4]
adds r1, 0x95
ldrb r0, [r1]
adds r0, 0x1
strb r0, [r1]
b _0816A574
.pool
_0816A550:
adds r1, 0x97
ldrb r0, [r1]
subs r0, 0x1
strb r0, [r1]
lsls r0, 24
cmp r0, 0
bne _0816A574
movs r0, 0x5
bl PlaySE
movs r2, 0x80
lsls r2, 1
movs r0, 0x1
movs r1, 0xA
2017-10-22 18:43:15 +02:00
bl EmitTwoReturnValues
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_0816A574:
pop {r4}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleChooseMove
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleOpenBag
WallyHandleOpenBag: @ 816A57C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
sub sp, 0x4
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
ldr r1, =gBattleBankFunc
ldr r2, =gActiveBank
ldrb r0, [r2]
lsls r0, 2
adds r0, r1
ldr r1, =sub_81685D4
str r1, [r0]
2017-09-11 11:35:41 +02:00
ldr r1, =gBankInMenu
2017-09-02 20:56:53 +02:00
ldrb r0, [r2]
strb r0, [r1]
add sp, 0x4
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
2017-09-02 20:56:53 +02:00
.pool
thumb_func_end WallyHandleOpenBag
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleChoosePokemon
WallyHandleChoosePokemon: @ 816A5BC
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleChoosePokemon
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd23
WallyHandleCmd23: @ 816A5C8
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd23
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleHealthBarUpdate
WallyHandleHealthBarUpdate: @ 816A5D4
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
2017-10-18 23:52:21 +02:00
bl LoadBattleBarGfx
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 _0816A664
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
2017-10-16 18:12:27 +02:00
bl SetBattleBarStruct
2017-09-02 20:56:53 +02:00
b _0816A69E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816A664:
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 r4, =gHealthBoxesIds
2017-09-02 20:56:53 +02:00
adds r1, r0, r4
2016-11-01 18:08:48 +01:00
ldrb r1, [r1]
str r7, [sp]
movs r3, 0
2017-10-16 18:12:27 +02:00
bl SetBattleBarStruct
2017-09-02 20:56:53 +02:00
mov r1, r9
ldrb r0, [r1]
adds r0, r4
ldrb r0, [r0]
movs r1, 0
movs r2, 0
2017-10-18 00:00:46 +02:00
bl UpdateHpTextInHealthbox
2017-09-02 20:56:53 +02:00
_0816A69E:
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, =sub_8168934
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
thumb_func_end WallyHandleHealthBarUpdate
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleExpUpdate
WallyHandleExpUpdate: @ 816A6D4
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleExpUpdate
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleStatusIconUpdate
WallyHandleStatusIconUpdate: @ 816A6E0
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleStatusIconUpdate
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleStatusAnimation
WallyHandleStatusAnimation: @ 816A6EC
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleStatusAnimation
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleStatusXor
WallyHandleStatusXor: @ 816A6F8
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleStatusXor
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleDataTransfer
WallyHandleDataTransfer: @ 816A704
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleDataTransfer
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleDMA3Transfer
WallyHandleDMA3Transfer: @ 816A710
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleDMA3Transfer
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandlePlayBGM
WallyHandlePlayBGM: @ 816A71C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandlePlayBGM
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd32
WallyHandleCmd32: @ 816A728
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd32
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd33
WallyHandleCmd33: @ 816A734
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd33
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd34
WallyHandleCmd34: @ 816A740
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd34
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd35
WallyHandleCmd35: @ 816A74C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd35
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd36
WallyHandleCmd36: @ 816A758
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd36
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd37
WallyHandleCmd37: @ 816A764
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd37
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd38
WallyHandleCmd38: @ 816A770
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd38
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd39
WallyHandleCmd39: @ 816A77C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd39
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd40
WallyHandleCmd40: @ 816A788
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd40
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleHitAnimation
WallyHandleHitAnimation: @ 816A794
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 _0816A7C8
bl WallyBufferExecCompleted
b _0816A7F2
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816A7C8:
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]
2017-10-22 18:43:15 +02:00
bl DoHitAnimHealthboxEffect
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_t5
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
_0816A7F2:
2016-11-01 18:08:48 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleHitAnimation
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd42
WallyHandleCmd42: @ 816A804
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd42
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleEffectivenessSound
WallyHandleEffectivenessSound: @ 816A810
2017-09-02 20:56:53 +02:00
push {lr}
2017-08-31 16:48:24 +02:00
ldr r2, =gBattleBufferA
2017-09-02 20:56:53 +02:00
ldr r0, =gActiveBank
ldrb r1, [r0]
2016-11-01 18:08:48 +01:00
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
2017-09-02 20:56:53 +02:00
bl PlaySE
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleEffectivenessSound
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandlePlayFanfareOrBGM
WallyHandlePlayFanfareOrBGM: @ 816A840
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 _0816A87C
2017-09-22 21:33:49 +02:00
bl BattleMusicStop
2016-11-01 18:08:48 +01:00
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 _0816A890
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816A87C:
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
_0816A890:
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end WallyHandlePlayFanfareOrBGM
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleFaintingCry
WallyHandleFaintingCry: @ 816A89C
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
2017-09-02 20:56:53 +02:00
bl PlayCry1
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleFaintingCry
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleIntroSlide
WallyHandleIntroSlide: @ 816A8D8
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]
2017-10-22 18:43:15 +02:00
bl HandleIntroSlide
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 WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleIntroSlide
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleIntroTrainerBallThrow
WallyHandleIntroTrainerBallThrow: @ 816A90C
2016-11-01 18:08:48 +01:00
push {r4-r7,lr}
2017-09-02 20:56:53 +02:00
ldr r6, =gBankSpriteIds
ldr r7, =gActiveBank
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
ldr r5, =gSprites
2016-11-01 18:08:48 +01:00
adds r0, r5
2017-09-02 20:56:53 +02:00
bl oamt_add_pos2_onto_pos1
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
adds r0, r5
2016-11-01 18:08:48 +01:00
movs r1, 0x32
strh r1, [r0, 0x2E]
2017-09-02 20:56:53 +02:00
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
adds r0, r5
2016-11-01 18:08:48 +01:00
ldr r1, =0x0000ffd8
strh r1, [r0, 0x32]
2017-09-02 20:56:53 +02:00
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
adds r0, r5
2016-11-01 18:08:48 +01:00
ldrh r1, [r0, 0x22]
strh r1, [r0, 0x36]
2017-09-02 20:56:53 +02:00
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
adds r1, r5, 0
2016-11-01 18:08:48 +01:00
adds r1, 0x1C
adds r0, r1
ldr r1, =sub_80A6EEC
str r1, [r0]
2017-09-02 20:56:53 +02:00
ldrb r2, [r7]
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, r5
2017-09-02 20:56:53 +02:00
strh r2, [r0, 0x38]
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
adds r0, r5
2016-11-01 18:08:48 +01:00
ldr r1, =sub_805CC00
2017-09-04 12:22:04 +02:00
bl StoreSpriteCallbackInData6
2017-09-02 20:56:53 +02:00
ldrb r0, [r7]
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-09-02 20:56:53 +02:00
adds r0, r5
2016-11-01 18:08:48 +01:00
movs r1, 0x1
2017-09-02 12:12:09 +02:00
bl StartSpriteAnim
2017-09-02 20:56:53 +02:00
ldr r0, =0x0000d6f8
2017-09-02 13:11:19 +02:00
bl AllocSpritePalette
2017-09-02 20:56:53 +02:00
adds r4, r0, 0
lsls r4, 24
ldr r0, =gTrainerBackPicPaletteTable
ldr r0, [r0, 0x30]
lsrs r4, 20
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
ldrb r0, [r7]
adds r0, r6
2016-11-01 18:08:48 +01:00
ldrb r0, [r0]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
2017-09-02 20:56:53 +02:00
adds r1, r5
2016-11-01 18:08:48 +01:00
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_816AC04
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
2017-09-02 20:56:53 +02:00
ldrb r0, [r7]
2016-11-01 18:08:48 +01:00
strh r0, [r1, 0x8]
2017-10-01 18:54:01 +02:00
ldr r3, =gBattleSpritesDataPtr
2016-11-01 18:08:48 +01:00
ldr r0, [r3]
2017-09-02 20:56:53 +02:00
ldrb r2, [r7]
2016-11-01 18:08:48 +01:00
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 _0816AA24
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
_0816AA24:
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
2017-09-02 20:56:53 +02:00
ldrb r0, [r7]
2016-11-01 18:08:48 +01:00
lsls r0, 2
adds r0, r1
2017-09-02 20:56:53 +02:00
ldr r1, =nullsub_21
2016-11-01 18:08:48 +01:00
str r1, [r0]
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleIntroTrainerBallThrow
2017-09-02 20:56:53 +02:00
thumb_func_start sub_816AA80
sub_816AA80: @ 816AA80
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
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r0, [r0]
ldr r1, [r0]
lsls r0, r6, 2
adds r0, r1
movs r1, 0
strh r1, [r0, 0x2]
ldr r0, =gBattlePartyID
lsls r2, r6, 1
adds r2, r0
ldr r0, =gBattleBufferA
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
adds r0, r1
movs r1, 0xB
bl GetMonData
mov r8, r0
lsls r0, 16
lsrs r0, 16
mov r8, r0
ldr r0, =sub_805D714
bl CreateInvisibleSpriteWithCallback
ldr r1, =gUnknown_03005D7C
mov r9, r1
add r9, r6
mov r1, r9
strb r0, [r1]
adds r0, r6, 0
bl GetBankIdentity
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
mov r0, r8
bl sub_806A068
ldr r0, =gUnknown_0202499C
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
ldr r4, =gBankSpriteIds
adds r4, r6, r4
strb r0, [r4]
ldr r5, =gSprites
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
2017-09-02 20:56:53 +02:00
adds r6, r1
ldrb r1, [r6]
bl StartSpriteAnim
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
ldr r1, =SpriteCallbackDummy
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
thumb_func_end sub_816AA80
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start sub_816AC04
sub_816AC04: @ 816AC04
push {r4-r6,lr}
2016-11-01 18:08:48 +01:00
lsls r0, 24
2017-09-02 20:56:53 +02:00
lsrs r6, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2017-09-02 20:56:53 +02:00
lsls r0, r6, 2
adds r0, r6
2016-11-01 18:08:48 +01:00
lsls r0, 3
adds r1, r0, r1
ldrh r2, [r1, 0xA]
movs r3, 0xA
ldrsh r0, [r1, r3]
2017-09-02 20:56:53 +02:00
cmp r0, 0x1E
bgt _0816AC28
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 _0816AC5E
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816AC28:
ldr r4, =gActiveBank
ldrb r5, [r4]
2016-11-01 18:08:48 +01:00
ldrh r0, [r1, 0x8]
2017-09-02 20:56:53 +02:00
strb r0, [r4]
2017-08-31 16:48:24 +02:00
ldr r0, =gBattleBufferA
2017-09-02 20:56:53 +02:00
ldrb r1, [r4]
2016-11-01 18:08:48 +01:00
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]
2017-09-02 20:56:53 +02:00
ldrb r0, [r4]
bl sub_816AA80
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_816864C
2016-11-01 18:08:48 +01:00
str r1, [r0]
2017-09-02 20:56:53 +02:00
strb r5, [r4]
adds r0, r6, 0
2016-11-01 18:08:48 +01:00
bl DestroyTask
2017-09-02 20:56:53 +02:00
_0816AC5E:
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_816AC04
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleDrawPartyStatusSummary
WallyHandleDrawPartyStatusSummary: @ 816AC78
2017-09-02 20:56:53 +02: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, 0x1
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _0816ACA8
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 _0816ACA8
bl WallyBufferExecCompleted
b _0816ACE6
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816ACA8:
2017-10-01 18:54:01 +02:00
ldr r0, =gBattleSpritesDataPtr
2017-09-02 20:56:53 +02:00
ldr r0, [r0]
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]
2017-09-02 20:56:53 +02:00
lsls r4, r0, 9
ldr r3, =gBattleBufferA + 4
2017-09-02 20:56:53 +02:00
adds r1, r4, r3
subs r2, r3, 0x3
adds r2, r4, r2
2016-11-01 18:08:48 +01:00
ldrb r2, [r2]
2017-09-02 20:56:53 +02:00
subs r3, 0x2
adds r4, r3
ldrb r3, [r4]
2017-10-18 21:42:00 +02:00
bl CreatePartyStatusSummarySprites
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
strb r0, [r1]
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
_0816ACE6:
pop {r4,r5}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleDrawPartyStatusSummary
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd49
WallyHandleCmd49: @ 816ACFC
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd49
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd50
WallyHandleCmd50: @ 816AD08
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleCmd50
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleSpriteInvisibility
WallyHandleSpriteInvisibility: @ 816AD14
2017-09-02 20:56:53 +02:00
push {lr}
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleSpriteInvisibility
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleBattleAnimation
WallyHandleBattleAnimation: @ 816AD20
2016-11-01 18:08:48 +01:00
push {r4-r6,lr}
sub sp, 0x4
2017-09-02 20:56:53 +02:00
ldr r5, =gBattleBufferA
ldr r6, =gActiveBank
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
2017-10-22 18:43:15 +02:00
bl DoBattleAnimationFromTable
2016-11-01 18:08:48 +01:00
lsls r0, 24
cmp r0, 0
2017-09-02 20:56:53 +02:00
beq _0816AD60
bl WallyBufferExecCompleted
b _0816AD6C
2016-11-01 18:08:48 +01:00
.pool
2017-09-02 20:56:53 +02:00
_0816AD60:
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, =sub_8168AC8
2016-11-01 18:08:48 +01:00
str r0, [r1]
2017-09-02 20:56:53 +02:00
_0816AD6C:
2016-11-01 18:08:48 +01:00
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleBattleAnimation
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleLinkStandbyMsg
WallyHandleLinkStandbyMsg: @ 816AD7C
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleLinkStandbyMsg
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleResetActionMoveSelection
WallyHandleResetActionMoveSelection: @ 816AD88
2016-11-01 18:08:48 +01:00
push {lr}
2017-09-02 20:56:53 +02:00
bl WallyBufferExecCompleted
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
thumb_func_end WallyHandleResetActionMoveSelection
2016-11-01 18:08:48 +01:00
thumb_func_start WallyHandleCmd55
WallyHandleCmd55: @ 816AD94
2017-09-02 20:56:53 +02:00
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 WallyBufferExecCompleted
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x6
ands r0, r1
cmp r0, 0x2
bne _0816ADD0
ldr r0, =gBattleBankFunc
ldrb r1, [r4]
lsls r1, 2
adds r1, r0
ldr r0, =sub_80587B0
str r0, [r1]
_0816ADD0:
pop {r4}
2016-11-01 18:08:48 +01:00
pop {r0}
bx r0
.pool
thumb_func_end WallyHandleCmd55
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
thumb_func_start nullsub_118
nullsub_118: @ 816ADF0
2016-11-01 18:08:48 +01:00
bx lr
2017-09-02 20:56:53 +02:00
thumb_func_end nullsub_118
2016-11-01 18:08:48 +01:00
2017-09-02 20:56:53 +02:00
.align 2, 0 @ Don't pad with nop.