pokeemerald/asm/battle_anim_effects_2.s

7545 lines
117 KiB
ArmAsm
Raw Normal View History

2018-10-23 04:08:38 +02:00
.include "asm/macros.inc"
.include "constants/constants.inc"
.syntax unified
.text
thumb_func_start sub_8103448
sub_8103448: @ 8103448
push {r4,r5,lr}
adds r4, r0, 0
bl sub_80A6838
ldr r5, =gBattleAnimArgs
movs r0, 0
ldrsh r1, [r5, r0]
adds r0, r4, 0
bl sub_80A6864
ldrh r0, [r5, 0x2]
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x22]
ldrh r0, [r5, 0x4]
strh r0, [r4, 0x30]
ldrh r0, [r5, 0x8]
strh r0, [r4, 0x32]
ldrh r0, [r5, 0xA]
strh r0, [r4, 0x34]
ldrh r0, [r5, 0x6]
strh r0, [r4, 0x36]
ldr r1, =move_anim_8074EE0
adds r0, r4, 0
bl StoreSpriteCallbackInData6
ldr r1, =sub_80A6450
str r1, [r4, 0x1C]
adds r0, r4, 0
bl _call_via_r1
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103448
thumb_func_start sub_8103498
sub_8103498: @ 8103498
push {r4,lr}
adds r4, r0, 0
ldr r0, =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bne _081034B4
ldr r0, =gBattleAnimAttacker
b _081034B6
.pool
_081034B4:
ldr r0, =gBattleAnimTarget
_081034B6:
ldrb r0, [r0]
adds r1, r4, 0
bl sub_810310C
movs r0, 0
strh r0, [r4, 0x2E]
strh r0, [r4, 0x30]
ldr r0, =sub_81034D8
str r0, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103498
thumb_func_start sub_81034D8
sub_81034D8: @ 81034D8
push {lr}
adds r1, r0, 0
movs r2, 0x2E
ldrsh r0, [r1, r2]
cmp r0, 0x1
beq _0810350A
cmp r0, 0x1
bgt _081034EE
cmp r0, 0
beq _081034F4
b _08103538
_081034EE:
cmp r0, 0x2
beq _08103524
b _08103538
_081034F4:
ldrh r0, [r1, 0x26]
subs r0, 0x3
strh r0, [r1, 0x26]
ldrh r0, [r1, 0x30]
adds r0, 0x1
strh r0, [r1, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x6
bne _08103538
b _0810351C
_0810350A:
ldrh r0, [r1, 0x26]
adds r0, 0x3
strh r0, [r1, 0x26]
ldrh r0, [r1, 0x30]
subs r0, 0x1
strh r0, [r1, 0x30]
lsls r0, 16
cmp r0, 0
bne _08103538
_0810351C:
ldrh r0, [r1, 0x2E]
adds r0, 0x1
strh r0, [r1, 0x2E]
b _08103538
_08103524:
ldrh r0, [r1, 0x30]
adds r0, 0x1
strh r0, [r1, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x40
bne _08103538
adds r0, r1, 0
bl DestroyAnimSprite
_08103538:
pop {r0}
bx r0
thumb_func_end sub_81034D8
thumb_func_start sub_810353C
sub_810353C: @ 810353C
push {r4,lr}
adds r4, r0, 0
ldr r3, =gSprites
movs r0, 0x32
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
ldrh r1, [r4, 0x30]
ldrh r2, [r0, 0x24]
adds r1, r2
strh r1, [r0, 0x24]
movs r1, 0x30
ldrsh r0, [r4, r1]
negs r0, r0
strh r0, [r4, 0x30]
movs r0, 0x2E
ldrsh r2, [r4, r0]
cmp r2, 0
bne _0810357A
movs r0, 0x32
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
strh r2, [r0, 0x24]
adds r0, r4, 0
bl move_anim_8074EE0
_0810357A:
ldrh r0, [r4, 0x2E]
subs r0, 0x1
strh r0, [r4, 0x2E]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810353C
thumb_func_start sub_810358C
sub_810358C: @ 810358C
push {r4-r6,lr}
adds r5, r0, 0
ldr r4, =gBattleAnimAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldr r1, =gBattlerSpriteIds
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
adds r0, r1
ldrb r6, [r0]
ldrb r0, [r4]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _081035E4
ldr r0, =gBattleAnimArgs
ldrh r1, [r5, 0x20]
ldrh r2, [r0]
subs r1, r2
strh r1, [r5, 0x20]
adds r1, r0, 0
b _081035EE
.pool
_081035E4:
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
ldrh r2, [r5, 0x20]
adds r0, r2
strh r0, [r5, 0x20]
_081035EE:
ldrh r0, [r1, 0x2]
ldrh r2, [r5, 0x22]
adds r0, r2
strh r0, [r5, 0x22]
ldrh r0, [r1, 0x4]
strh r0, [r5, 0x2E]
ldrh r0, [r1, 0x6]
strh r0, [r5, 0x30]
strh r6, [r5, 0x32]
ldr r0, =sub_810353C
str r0, [r5, 0x1C]
adds r2, r5, 0
adds r2, 0x3E
ldrb r0, [r2]
movs r1, 0x4
orrs r0, r1
strb r0, [r2]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_810358C
thumb_func_start sub_8103620
sub_8103620: @ 8103620
push {r4,lr}
adds r4, r0, 0
movs r1, 0x1
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r1, =gBattleAnimArgs
ldrh r0, [r1, 0x4]
strh r0, [r4, 0x2E]
ldrh r0, [r1, 0x6]
strh r0, [r4, 0x30]
ldrh r0, [r1, 0x8]
strh r0, [r4, 0x38]
ldr r0, =sub_80A64B0
str r0, [r4, 0x1C]
ldr r1, =sub_8103658
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103620
thumb_func_start sub_8103658
sub_8103658: @ 8103658
push {lr}
ldrh r1, [r0, 0x30]
strh r1, [r0, 0x2E]
ldrh r1, [r0, 0x20]
strh r1, [r0, 0x32]
ldrh r1, [r0, 0x22]
adds r1, 0xF
strh r1, [r0, 0x36]
2018-11-26 00:00:18 +01:00
ldr r1, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r1, [r0, 0x1C]
ldr r1, =sub_8103680
bl StoreSpriteCallbackInData6
pop {r0}
bx r0
.pool
thumb_func_end sub_8103658
thumb_func_start sub_8103680
sub_8103680: @ 8103680
push {lr}
adds r1, r0, 0
ldrh r2, [r1, 0x38]
movs r3, 0x38
ldrsh r0, [r1, r3]
cmp r0, 0
bne _08103696
adds r0, r1, 0
bl DestroyAnimSprite
b _0810369A
_08103696:
subs r0, r2, 0x1
strh r0, [r1, 0x38]
_0810369A:
pop {r0}
bx r0
thumb_func_end sub_8103680
thumb_func_start sub_81036A0
sub_81036A0: @ 81036A0
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r1, =gBattlerSpriteIds
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
adds r0, r1
ldrb r0, [r0]
movs r1, 0
bl sub_80A7270
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =sub_81036DC
str r1, [r0]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81036A0
thumb_func_start sub_81036DC
sub_81036DC: @ 81036DC
push {r4-r6,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =gBattlerSpriteIds
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
adds r1, r0, r1
ldrb r4, [r1]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
bne _08103718
ldr r1, =gTasks
lsls r2, r5, 2
adds r0, r2, r5
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x8]
negs r0, r0
lsls r0, 16
lsrs r3, r0, 16
adds r6, r2, 0
b _08103726
.pool
_08103718:
ldr r2, =gTasks
lsls r1, r5, 2
adds r0, r1, r5
lsls r0, 3
adds r0, r2
ldrh r3, [r0, 0x8]
adds r6, r1, 0
_08103726:
movs r2, 0x80
lsls r2, 1
adds r0, r4, 0
adds r1, r2, 0
bl obj_id_set_rotscale
ldr r1, =gTasks
adds r0, r6, r5
lsls r0, 3
adds r1, r0, r1
movs r2, 0xA
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08103760
ldrh r0, [r1, 0x8]
adds r0, 0xB0
strh r0, [r1, 0x8]
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r0, r1
ldrh r1, [r0, 0x26]
adds r1, 0x1
b _0810378A
.pool
_08103760:
cmp r0, 0x1
bne _08103776
ldrh r0, [r1, 0xE]
adds r0, 0x1
strh r0, [r1, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1E
bne _081037D0
movs r0, 0x2
b _081037CE
_08103776:
ldrh r0, [r1, 0x8]
subs r0, 0xB0
strh r0, [r1, 0x8]
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r0, r1
ldrh r1, [r0, 0x26]
subs r1, 0x1
_0810378A:
strh r1, [r0, 0x26]
adds r0, r4, 0
bl sub_80A73A0
ldr r0, =gTasks
adds r1, r6, r5
lsls r1, 3
adds r1, r0
movs r3, 0x8
ldrsh r2, [r1, r3]
movs r0, 0xF2
lsls r0, 4
cmp r2, r0
beq _081037AA
cmp r2, 0
bne _081037D0
_081037AA:
ldrh r2, [r1, 0xA]
movs r3, 0xA
ldrsh r0, [r1, r3]
cmp r0, 0x2
bne _081037CC
adds r0, r4, 0
bl sub_80A7344
adds r0, r5, 0
bl DestroyAnimVisualTask
b _081037D0
.pool
_081037CC:
adds r0, r2, 0x1
_081037CE:
strh r0, [r1, 0xA]
_081037D0:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_81036DC
thumb_func_start sub_81037D8
sub_81037D8: @ 81037D8
push {r4,r5,lr}
adds r4, r0, 0
bl sub_80A6838
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _08103804
ldr r0, =gBattleAnimArgs
ldrh r1, [r4, 0x20]
ldrh r2, [r0]
subs r1, r2
strh r1, [r4, 0x20]
adds r5, r0, 0
b _08103810
.pool
_08103804:
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
ldrh r2, [r4, 0x20]
adds r0, r2
strh r0, [r4, 0x20]
adds r5, r1, 0
_08103810:
ldrh r0, [r5, 0x2]
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x22]
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _0810384C
adds r3, r4, 0
adds r3, 0x3F
ldrb r0, [r3]
movs r1, 0x1
adds r2, r0, 0
orrs r2, r1
strb r2, [r3]
movs r1, 0x4
ldrsh r0, [r5, r1]
cmp r0, 0
beq _08103860
movs r0, 0x2
orrs r2, r0
strb r2, [r3]
b _08103860
.pool
_0810384C:
movs r2, 0x4
ldrsh r0, [r5, r2]
cmp r0, 0
beq _08103860
adds r2, r4, 0
adds r2, 0x3F
ldrb r0, [r2]
movs r1, 0x2
orrs r0, r1
strb r0, [r2]
_08103860:
ldr r0, =sub_80A67D8
str r0, [r4, 0x1C]
ldr r1, =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81037D8
thumb_func_start sub_810387C
sub_810387C: @ 810387C
push {r4,lr}
adds r4, r0, 0
movs r1, 0
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r0, =sub_80A67BC
str r0, [r4, 0x1C]
ldr r1, =sub_81038A0
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810387C
thumb_func_start sub_81038A0
sub_81038A0: @ 81038A0
push {lr}
movs r1, 0x6
strh r1, [r0, 0x2E]
ldrh r1, [r0, 0x20]
strh r1, [r0, 0x32]
ldrh r1, [r0, 0x22]
subs r1, 0x20
strh r1, [r0, 0x36]
2018-11-26 00:00:18 +01:00
ldr r1, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r1, [r0, 0x1C]
ldr r1, =DestroyAnimSprite
bl StoreSpriteCallbackInData6
pop {r0}
bx r0
.pool
thumb_func_end sub_81038A0
thumb_func_start sub_81038C8
sub_81038C8: @ 81038C8
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
adds r5, r0, 0
bl IsContest
lsls r0, 24
cmp r0, 0
beq _081038EC
ldr r1, =gBattleAnimArgs
ldrh r0, [r1, 0x4]
negs r0, r0
strh r0, [r1, 0x4]
b _0810390E
.pool
_081038EC:
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _0810390E
ldr r1, =gBattleAnimArgs
ldrh r0, [r1, 0x4]
negs r0, r0
strh r0, [r1, 0x4]
ldrh r0, [r1, 0x2]
negs r0, r0
strh r0, [r1, 0x2]
ldrh r0, [r1, 0x6]
negs r0, r0
strh r0, [r1, 0x6]
_0810390E:
adds r0, r5, 0
movs r1, 0x1
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r4, =gBattleAnimTarget
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
ldr r6, =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r6, 0x4]
adds r0, r1
lsls r0, 16
lsrs r0, 16
mov r8, r0
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
ldrh r2, [r6, 0x6]
adds r0, r2
lsls r0, 16
lsrs r0, 16
adds r7, r0, 0
ldrh r1, [r5, 0x20]
mov r2, r8
lsls r0, r2, 16
asrs r0, 16
subs r0, r1
lsls r0, 16
asrs r0, 16
ldrh r2, [r5, 0x22]
lsls r1, r7, 16
asrs r1, 16
subs r1, r2
lsls r1, 16
asrs r1, 16
bl ArcTan2Neg
lsls r0, 16
movs r1, 0xF0
lsls r1, 24
adds r0, r1
lsrs r4, r0, 16
bl IsContest
lsls r0, 24
cmp r0, 0
beq _08103980
ldr r2, =0xffffa000
adds r0, r4, r2
lsls r0, 16
lsrs r4, r0, 16
_08103980:
movs r3, 0x80
lsls r3, 1
str r4, [sp]
adds r0, r5, 0
movs r1, 0
adds r2, r3, 0
bl sub_80A73E0
ldrh r0, [r6, 0x8]
strh r0, [r5, 0x2E]
mov r0, r8
strh r0, [r5, 0x32]
strh r7, [r5, 0x36]
2018-11-26 00:00:18 +01:00
ldr r0, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r0, [r5, 0x1C]
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_81038C8
thumb_func_start sub_81039CC
sub_81039CC: @ 81039CC
push {lr}
adds r3, r0, 0
ldrh r0, [r3, 0x2E]
subs r1, r0, 0x1
strh r1, [r3, 0x2E]
lsls r0, 16
cmp r0, 0
bgt _081039F6
ldr r2, =gTasks
movs r0, 0x3C
ldrsh r1, [r3, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r2
ldrh r1, [r0, 0xA]
subs r1, 0x1
strh r1, [r0, 0xA]
adds r0, r3, 0
bl DestroySprite
_081039F6:
pop {r0}
bx r0
.pool
thumb_func_end sub_81039CC
thumb_func_start sub_8103A00
sub_8103A00: @ 8103A00
push {r4,lr}
adds r2, r0, 0
movs r0, 0x3C
ldrsh r1, [r2, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
movs r3, 0x2E
ldrsh r1, [r2, r3]
movs r3, 0x12
ldrsh r0, [r4, r3]
cmp r1, r0
ble _08103A34
ldrh r0, [r2, 0x34]
ldrh r1, [r2, 0x38]
adds r0, r1
strh r0, [r2, 0x38]
ldrh r0, [r2, 0x36]
ldrh r3, [r2, 0x3A]
adds r0, r3
b _08103A42
.pool
_08103A34:
ldrh r0, [r2, 0x38]
ldrh r1, [r2, 0x34]
subs r0, r1
strh r0, [r2, 0x38]
ldrh r0, [r2, 0x3A]
ldrh r1, [r2, 0x36]
subs r0, r1
_08103A42:
strh r0, [r2, 0x3A]
ldrh r0, [r2, 0x38]
ldrh r1, [r2, 0x30]
adds r3, r0, r1
strh r3, [r2, 0x30]
ldrh r0, [r2, 0x3A]
ldrh r1, [r2, 0x32]
adds r0, r1
strh r0, [r2, 0x32]
ldrh r1, [r4, 0x16]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08103A66
lsls r0, r3, 16
lsrs r0, 24
negs r0, r0
b _08103A6A
_08103A66:
lsls r0, r3, 16
lsrs r0, 24
_08103A6A:
strh r0, [r2, 0x24]
ldrh r1, [r4, 0x18]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08103A7E
ldrh r0, [r2, 0x32]
lsrs r0, 8
negs r0, r0
b _08103A82
_08103A7E:
ldrh r0, [r2, 0x32]
lsrs r0, 8
_08103A82:
strh r0, [r2, 0x26]
ldrh r0, [r2, 0x2E]
subs r1, r0, 0x1
strh r1, [r2, 0x2E]
lsls r0, 16
cmp r0, 0
bgt _08103A98
movs r0, 0x1E
strh r0, [r2, 0x2E]
ldr r0, =sub_81039CC
str r0, [r2, 0x1C]
_08103A98:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103A00
thumb_func_start sub_8103AA4
sub_8103AA4: @ 8103AA4
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r7, r0, 0
movs r0, 0x3C
ldrsh r1, [r7, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
ldr r1, =gTasks
adds r6, r0, r1
ldrh r2, [r6, 0x16]
movs r1, 0x2
negs r1, r1
adds r0, r1, 0
ands r0, r2
ldrh r3, [r7, 0x30]
adds r2, r0, r3
strh r2, [r7, 0x30]
ldrh r0, [r6, 0x18]
ands r1, r0
ldrh r0, [r7, 0x32]
adds r1, r0
strh r1, [r7, 0x32]
ldrh r1, [r6, 0x16]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08103AEC
lsls r0, r2, 16
lsrs r0, 24
negs r0, r0
b _08103AF0
.pool
_08103AEC:
lsls r0, r2, 16
lsrs r0, 24
_08103AF0:
strh r0, [r7, 0x24]
ldrh r1, [r6, 0x18]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08103B04
ldrh r0, [r7, 0x32]
lsrs r0, 8
negs r0, r0
b _08103B08
_08103B04:
ldrh r0, [r7, 0x32]
lsrs r0, 8
_08103B08:
strh r0, [r7, 0x26]
ldrh r0, [r7, 0x2E]
subs r1, r0, 0x1
strh r1, [r7, 0x2E]
lsls r0, 16
cmp r0, 0
bgt _08103BD4
movs r4, 0
movs r0, 0x8
strh r0, [r7, 0x2E]
movs r0, 0x4
strh r0, [r6, 0x12]
movs r0, 0x80
lsls r0, 5
bl sub_8151624
lsls r0, 16
lsrs r5, r0, 16
ldrh r0, [r7, 0x24]
ldrh r1, [r7, 0x20]
adds r2, r0, r1
strh r2, [r7, 0x20]
ldrh r0, [r7, 0x26]
ldrh r3, [r7, 0x22]
adds r0, r3
strh r0, [r7, 0x22]
strh r4, [r7, 0x26]
strh r4, [r7, 0x24]
ldrh r3, [r6, 0x1E]
movs r0, 0x1E
ldrsh r1, [r6, r0]
lsls r0, r2, 16
asrs r0, 16
cmp r1, r0
blt _08103B52
subs r0, r3, r2
b _08103B54
_08103B52:
subs r0, r2, r3
_08103B54:
lsls r0, 24
lsrs r4, r0, 16
ldrh r3, [r6, 0x20]
movs r0, 0x20
ldrsh r1, [r6, r0]
ldrh r2, [r7, 0x22]
movs r6, 0x22
ldrsh r0, [r7, r6]
cmp r1, r0
blt _08103B6C
subs r0, r3, r2
b _08103B6E
_08103B6C:
subs r0, r2, r3
_08103B6E:
lsls r0, 24
lsrs r0, 16
mov r8, r0
movs r0, 0
strh r0, [r7, 0x32]
strh r0, [r7, 0x30]
strh r0, [r7, 0x3A]
strh r0, [r7, 0x38]
lsls r0, r4, 16
asrs r0, 16
lsls r5, 16
asrs r5, 16
adds r1, r5, 0
bl sub_8151534
adds r4, r0, 0
lsls r4, 16
asrs r4, 16
movs r6, 0xE0
lsls r6, 1
adds r0, r6, 0
bl sub_8151624
adds r1, r0, 0
lsls r1, 16
asrs r1, 16
adds r0, r4, 0
bl sub_8151534
strh r0, [r7, 0x34]
mov r1, r8
lsls r0, r1, 16
asrs r0, 16
adds r1, r5, 0
bl sub_8151534
adds r4, r0, 0
lsls r4, 16
asrs r4, 16
adds r0, r6, 0
bl sub_8151624
adds r1, r0, 0
lsls r1, 16
asrs r1, 16
adds r0, r4, 0
bl sub_8151534
strh r0, [r7, 0x36]
ldr r0, =sub_8103A00
str r0, [r7, 0x1C]
_08103BD4:
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103AA4
thumb_func_start sub_8103BE4
sub_8103BE4: @ 8103BE4
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r1, =gTasks
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r0, r1
movs r1, 0xA
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08103C02
adds r0, r2, 0
bl DestroyAnimVisualTask
_08103C02:
pop {r0}
bx r0
.pool
thumb_func_end sub_8103BE4
thumb_func_start sub_8103C0C
sub_8103C0C: @ 8103C0C
push {r4-r7,lr}
lsls r0, 24
lsrs r7, r0, 24
ldr r1, =gTasks
lsls r0, r7, 2
adds r0, r7
lsls r0, 3
adds r5, r0, r1
ldrh r0, [r5, 0x8]
subs r1, r0, 0x1
strh r1, [r5, 0x8]
lsls r0, 16
cmp r0, 0
bgt _08103CE0
ldr r0, =gUnknown_085933B0
movs r2, 0x1A
ldrsh r1, [r5, r2]
movs r3, 0x1C
ldrsh r2, [r5, r3]
ldrb r3, [r5, 0xC]
ldrb r4, [r5, 0xA]
subs r3, r4
lsls r3, 24
lsrs r3, 24
bl CreateSprite
lsls r0, 24
lsrs r0, 24
mov r12, r0
lsls r0, 4
add r0, r12
lsls r0, 2
ldr r1, =gSprites
adds r6, r0, r1
movs r1, 0x10
ldrsh r0, [r5, r1]
cmp r0, 0x1
beq _08103C6C
cmp r0, 0x2
beq _08103C82
b _08103C90
.pool
_08103C6C:
ldrb r2, [r6, 0x3]
lsls r1, r2, 26
lsrs r1, 27
movs r0, 0x18
orrs r1, r0
lsls r1, 1
subs r0, 0x57
ands r0, r2
orrs r0, r1
strb r0, [r6, 0x3]
b _08103C90
_08103C82:
ldrb r0, [r6, 0x3]
movs r1, 0x3F
negs r1, r1
ands r1, r0
movs r0, 0x10
orrs r1, r0
strb r1, [r6, 0x3]
_08103C90:
ldr r3, =gTasks
lsls r2, r7, 2
adds r2, r7
lsls r2, 3
adds r4, r2, r3
ldrh r0, [r4, 0x12]
ldrh r1, [r4, 0x14]
subs r0, r1
strh r0, [r6, 0x2E]
strh r7, [r6, 0x3C]
movs r1, 0xA
ldrsh r0, [r4, r1]
adds r0, 0xD
lsls r0, 1
adds r0, r2
adds r3, 0x8
adds r0, r3
mov r2, r12
strh r2, [r0]
ldrh r0, [r4, 0xE]
strh r0, [r4, 0x8]
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
movs r0, 0x3F
negs r0, r0
bl BattleAnimAdjustPanning
adds r1, r0, 0
lsls r1, 24
asrs r1, 24
movs r0, 0x9A
bl PlaySE12WithPanning
movs r3, 0xA
ldrsh r0, [r4, r3]
cmp r0, 0x2
ble _08103CE0
ldr r0, =sub_8103BE4
str r0, [r4]
_08103CE0:
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103C0C
thumb_func_start sub_8103CF0
sub_8103CF0: @ 8103CF0
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
lsls r0, 24
lsrs r7, r0, 24
movs r0, 0
mov r9, r0
movs r5, 0
mov r0, sp
mov r1, r9
strh r1, [r0]
mov r4, sp
adds r4, 0x2
strh r1, [r4]
bl IsContest
lsls r0, 24
mov r10, r4
cmp r0, 0
beq _08103D5C
ldr r1, =gTasks
lsls r2, r7, 2
adds r0, r2, r7
lsls r0, 3
adds r0, r1
movs r1, 0x2
strh r1, [r0, 0x10]
ldr r3, =gBattleAnimArgs
ldrh r0, [r3]
negs r0, r0
strh r0, [r3]
ldrh r1, [r3, 0x4]
movs r0, 0x1
ands r0, r1
mov r8, r2
cmp r0, 0
beq _08103D54
movs r0, 0x2
negs r0, r0
ands r0, r1
strh r0, [r3, 0x4]
b _08103DB6
.pool
_08103D54:
movs r0, 0x1
orrs r0, r1
strh r0, [r3, 0x4]
b _08103DB6
_08103D5C:
ldr r1, =gBattlerPositions
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
movs r3, 0x1
adds r0, r3, 0
ands r0, r1
lsls r2, r7, 2
mov r8, r2
cmp r0, 0
bne _08103DB6
ldr r1, =gTasks
adds r0, r2, r7
lsls r0, 3
adds r0, r1
strh r3, [r0, 0x10]
ldr r2, =gBattleAnimArgs
ldrh r0, [r2]
negs r0, r0
strh r0, [r2]
ldrh r0, [r2, 0x2]
negs r0, r0
strh r0, [r2, 0x2]
ldrh r1, [r2, 0x4]
adds r0, r3, 0
ands r0, r1
cmp r0, 0
beq _08103DB0
movs r0, 0x2
negs r0, r0
ands r0, r1
b _08103DB4
.pool
_08103DB0:
movs r0, 0x1
orrs r0, r1
_08103DB4:
strh r0, [r2, 0x4]
_08103DB6:
ldr r5, =gBattleAnimAttacker
ldrb r0, [r5]
movs r1, 0
bl GetBattlerSpriteCoord
ldr r1, =gTasks
mov r3, r8
adds r4, r3, r7
lsls r4, 3
adds r4, r1
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x1A]
adds r6, r0, 0
ldrb r0, [r5]
movs r1, 0x1
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x1C]
mov r9, r0
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _08103E20
ldr r4, =gBattleAnimTarget
ldrb r1, [r4]
movs r0, 0x2
eors r0, r1
bl IsBattlerSpriteVisible
lsls r0, 24
cmp r0, 0
beq _08103E20
ldrb r0, [r4]
movs r1, 0
mov r2, sp
mov r3, r10
bl SetAverageBattlerPositions
b _08103E42
.pool
_08103E20:
mov r5, sp
ldr r4, =gBattleAnimTarget
ldrb r0, [r4]
movs r1, 0
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5]
ldrb r0, [r4]
movs r1, 0x1
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
mov r1, r10
strh r0, [r1]
_08103E42:
mov r4, sp
ldr r0, =gTasks
mov r2, r8
adds r1, r2, r7
lsls r1, 3
adds r1, r0
mov r2, sp
ldr r3, =gBattleAnimArgs
ldrh r0, [r3]
ldrh r2, [r2]
adds r0, r2
strh r0, [r1, 0x1E]
strh r0, [r4]
ldrh r0, [r3, 0x2]
mov r3, r10
ldrh r3, [r3]
adds r0, r3
strh r0, [r1, 0x20]
mov r1, r10
strh r0, [r1]
mov r0, sp
ldrh r2, [r0]
movs r3, 0
ldrsh r0, [r0, r3]
adds r1, r6, 0
cmp r0, r1
blt _08103E88
subs r0, r2, r1
b _08103E8A
.pool
_08103E88:
subs r0, r1, r2
_08103E8A:
lsls r0, 16
lsrs r0, 16
lsls r4, r0, 16
asrs r4, 16
ldr r5, =gBattleAnimArgs
ldrh r1, [r5, 0x4]
movs r0, 0x2
negs r0, r0
ands r0, r1
lsls r0, 16
asrs r0, 16
bl sub_8151624
adds r1, r0, 0
lsls r1, 16
asrs r1, 16
adds r0, r4, 0
bl sub_8151534
ldr r2, =gTasks
mov r3, r8
adds r1, r3, r7
lsls r1, 3
adds r6, r1, r2
strh r0, [r6, 0x12]
movs r1, 0x12
ldrsh r0, [r6, r1]
movs r1, 0x80
bl sub_8151534
strh r0, [r6, 0x14]
ldrh r0, [r5, 0x4]
strh r0, [r6, 0x16]
mov r2, r10
ldrh r1, [r2]
movs r3, 0
ldrsh r0, [r2, r3]
mov r4, r9
cmp r0, r4
blt _08103F08
subs r4, r1, r4
lsls r4, 16
asrs r4, 16
movs r1, 0x12
ldrsh r0, [r6, r1]
bl sub_8151624
adds r1, r0, 0
lsls r1, 16
asrs r1, 16
adds r0, r4, 0
bl sub_8151534
movs r1, 0x2
negs r1, r1
ands r1, r0
strh r1, [r6, 0x18]
b _08103F28
.pool
_08103F08:
subs r4, r1
lsls r4, 16
asrs r4, 16
movs r2, 0x12
ldrsh r0, [r6, r2]
bl sub_8151624
adds r1, r0, 0
lsls r1, 16
asrs r1, 16
adds r0, r4, 0
bl sub_8151534
movs r1, 0x1
orrs r0, r1
strh r0, [r6, 0x18]
_08103F28:
ldr r1, =gTasks
mov r3, r8
adds r0, r3, r7
lsls r0, 3
adds r5, r0, r1
ldr r4, =gBattleAnimArgs
ldrh r0, [r4, 0x6]
strh r0, [r5, 0xE]
ldrh r1, [r4, 0x8]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _08103F78
movs r0, 0x80
eors r0, r1
strh r0, [r4, 0x8]
lsls r0, 16
asrs r0, 16
cmp r0, 0x3F
ble _08103FA0
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
bl sub_80A82E4
lsls r0, 24
lsrs r0, 24
ldr r2, =0x0000ffc0
adds r1, r2, 0
ldrh r4, [r4, 0x8]
adds r1, r4
adds r0, r1
b _08103FB0
.pool
_08103F78:
lsls r0, r1, 16
asrs r0, 16
cmp r0, 0x3F
ble _08103FA0
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
bl sub_80A82E4
lsls r0, 24
lsrs r0, 24
ldr r3, =0x0000ffc0
adds r1, r3, 0
ldrh r4, [r4, 0x8]
adds r1, r4
adds r0, r1
b _08103FB0
.pool
_08103FA0:
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
bl sub_80A82E4
lsls r0, 24
lsrs r0, 24
ldrh r1, [r4, 0x8]
subs r0, r1
_08103FB0:
strh r0, [r5, 0xC]
ldr r0, =gTasks
mov r2, r8
adds r1, r2, r7
lsls r1, 3
adds r1, r0
movs r3, 0xC
ldrsh r0, [r1, r3]
cmp r0, 0x2
bgt _08103FC8
movs r0, 0x3
strh r0, [r1, 0xC]
_08103FC8:
ldr r0, =sub_8103C0C
str r0, [r1]
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103CF0
thumb_func_start sub_8103FE8
sub_8103FE8: @ 8103FE8
push {r4,lr}
adds r4, r0, 0
movs r1, 0
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r0, =gUnknown_085934A0
ldrh r0, [r0, 0x2]
bl IndexOfSpritePaletteTag
lsls r0, 24
lsrs r0, 20
movs r1, 0x80
lsls r1, 1
adds r0, r1
strh r0, [r4, 0x2E]
ldr r0, =sub_8104018
str r0, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8103FE8
thumb_func_start sub_8104018
sub_8104018: @ 8104018
push {r4-r7,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2
bne _0810407C
movs r0, 0
strh r0, [r4, 0x30]
ldrh r5, [r4, 0x2E]
ldr r1, =gPlttBufferFaded
adds r0, r5, 0
adds r0, 0x8
lsls r0, 1
adds r0, r1
ldrh r7, [r0]
adds r6, r1, 0
adds r1, r5, 0
adds r1, 0x9
lsls r0, r5, 1
adds r0, r6
adds r2, r0, 0
adds r2, 0x10
movs r3, 0x7
lsls r1, 1
adds r1, r6
_08104050:
ldrh r0, [r1]
strh r0, [r2]
adds r1, 0x2
adds r2, 0x2
subs r3, 0x1
cmp r3, 0
bge _08104050
adds r0, r5, 0
adds r0, 0xF
lsls r0, 1
adds r0, r6
strh r7, [r0]
ldrh r0, [r4, 0x32]
adds r0, 0x1
strh r0, [r4, 0x32]
lsls r0, 16
asrs r0, 16
cmp r0, 0x18
bne _0810407C
adds r0, r4, 0
bl DestroyAnimSprite
_0810407C:
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104018
thumb_func_start sub_8104088
sub_8104088: @ 8104088
push {r4-r7,lr}
sub sp, 0x4
adds r5, r0, 0
movs r1, 0x1
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r4, =gBattleAnimTarget
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r6, r0, 24
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
ldr r4, =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r4, 0x6]
adds r0, r1
lsls r0, 16
lsrs r7, r0, 16
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _081040CC
ldrh r0, [r4, 0x4]
negs r0, r0
strh r0, [r4, 0x4]
_081040CC:
lsls r0, r6, 16
asrs r0, 16
ldrh r1, [r4, 0x4]
adds r0, r1
lsls r0, 16
ldrh r1, [r5, 0x20]
lsrs r6, r0, 16
asrs r0, 16
subs r0, r1
lsls r0, 16
asrs r0, 16
ldrh r2, [r5, 0x22]
lsls r1, r7, 16
asrs r1, 16
subs r1, r2
lsls r1, 16
asrs r1, 16
bl ArcTan2Neg
lsls r0, 16
movs r1, 0xC0
lsls r1, 24
adds r0, r1
lsrs r0, 16
movs r3, 0x80
lsls r3, 1
str r0, [sp]
adds r0, r5, 0
movs r1, 0
adds r2, r3, 0
bl sub_80A73E0
ldrh r0, [r4, 0x8]
strh r0, [r5, 0x2E]
strh r6, [r5, 0x32]
strh r7, [r5, 0x36]
ldr r0, =sub_80A7000
str r0, [r5, 0x1C]
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104088
thumb_func_start sub_810413C
sub_810413C: @ 810413C
ldr r1, =0x0000fff0
strh r1, [r0, 0x32]
ldrh r1, [r0, 0x22]
adds r1, 0x8
strh r1, [r0, 0x22]
ldr r1, =sub_8104154
str r1, [r0, 0x1C]
bx lr
.pool
thumb_func_end sub_810413C
thumb_func_start sub_8104154
sub_8104154: @ 8104154
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
adds r0, 0x80
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r0, 24
strh r0, [r4, 0x24]
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
bne _08104178
ldrh r0, [r4, 0x24]
negs r0, r0
strh r0, [r4, 0x24]
_08104178:
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r2, 0x32
ldrsh r1, [r4, r2]
bl Sin
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x30]
adds r0, 0x5
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x7E
ble _081041B8
movs r0, 0
strh r0, [r4, 0x30]
movs r1, 0x32
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
strh r0, [r4, 0x32]
ldrh r0, [r4, 0x34]
adds r0, 0x1
strh r0, [r4, 0x34]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2
bne _081041B8
adds r0, r4, 0
bl DestroyAnimSprite
_081041B8:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104154
thumb_func_start sub_81041C4
sub_81041C4: @ 81041C4
push {r4,r5,lr}
adds r4, r0, 0
movs r1, 0x1
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
movs r0, 0x14
strh r0, [r4, 0x2E]
ldr r5, =gBattleAnimTarget
ldrb r0, [r5]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x32]
ldrb r0, [r5]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x36]
2018-11-26 00:00:18 +01:00
ldr r0, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r0, [r4, 0x1C]
adds r2, r4, 0
adds r2, 0x2C
ldrb r0, [r2]
movs r1, 0x80
orrs r0, r1
strb r0, [r2]
ldr r1, =sub_810421C
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81041C4
thumb_func_start sub_810421C
sub_810421C: @ 810421C
push {r4,lr}
adds r4, r0, 0
movs r0, 0x3F
bl BattleAnimAdjustPanning
adds r1, r0, 0
lsls r1, 24
asrs r1, 24
movs r0, 0xA6
bl PlaySE12WithPanning
ldrh r0, [r4, 0x24]
ldrh r1, [r4, 0x20]
adds r0, r1
movs r1, 0
strh r0, [r4, 0x20]
ldrh r0, [r4, 0x26]
ldrh r2, [r4, 0x22]
adds r0, r2
strh r0, [r4, 0x22]
strh r1, [r4, 0x26]
strh r1, [r4, 0x24]
movs r2, 0
movs r1, 0x7
adds r0, r4, 0
adds r0, 0x3C
_08104250:
strh r2, [r0]
subs r0, 0x2
subs r1, 0x1
cmp r1, 0
bge _08104250
bl Random2
lsls r0, 16
lsrs r0, 16
movs r1, 0x7
ands r0, r1
ldr r2, =0x0000fff4
adds r1, r2, 0
subs r1, r0
strh r1, [r4, 0x3A]
bl Random2
lsls r0, 16
lsrs r0, 16
movs r1, 0xA0
bl __umodsi3
adds r0, 0xA0
strh r0, [r4, 0x3C]
ldr r0, =sub_81042A0
str r0, [r4, 0x1C]
adds r2, r4, 0
adds r2, 0x2C
ldrb r1, [r2]
movs r0, 0x7F
ands r0, r1
strb r0, [r2]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810421C
thumb_func_start sub_81042A0
sub_81042A0: @ 81042A0
push {r4,lr}
adds r4, r0, 0
ldrh r1, [r4, 0x3C]
ldrh r2, [r4, 0x2E]
adds r0, r1, r2
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r2, r0, 24
strh r2, [r4, 0x24]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _081042BE
negs r0, r2
strh r0, [r4, 0x24]
_081042BE:
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r2, 0x3A
ldrsh r1, [r4, r2]
bl Sin
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x30]
adds r0, 0x8
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x7E
ble _081042FE
movs r0, 0
strh r0, [r4, 0x30]
movs r1, 0x32
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
strh r0, [r4, 0x32]
ldrh r0, [r4, 0x34]
adds r0, 0x1
strh r0, [r4, 0x34]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
bne _081042FE
adds r0, r4, 0
bl DestroyAnimSprite
_081042FE:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_81042A0
thumb_func_start sub_8104304
sub_8104304: @ 8104304
push {r4,lr}
adds r4, r0, 0
movs r1, 0
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
bne _08104322
ldrh r0, [r4, 0x22]
adds r0, 0x10
strh r0, [r4, 0x22]
_08104322:
ldr r1, =gBattleAnimArgs
ldrh r0, [r1, 0x8]
strh r0, [r4, 0x2E]
ldrh r0, [r1, 0x4]
strh r0, [r4, 0x30]
ldrh r0, [r1, 0xA]
strh r0, [r4, 0x32]
ldrh r0, [r1, 0xC]
strh r0, [r4, 0x34]
ldrh r0, [r1, 0x6]
strh r0, [r4, 0x36]
ldr r0, =sub_80A62EC
str r0, [r4, 0x1C]
ldr r1, =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData6
ldr r1, [r4, 0x1C]
adds r0, r4, 0
bl _call_via_r1
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104304
thumb_func_start sub_8104364
sub_8104364: @ 8104364
push {r4-r7,lr}
mov r7, r8
push {r7}
adds r5, r0, 0
movs r7, 0x20
ldr r4, =0x0000ffe0
movs r0, 0x10
mov r8, r0
ldr r6, =0x0000fff0
ldr r0, =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
beq _08104390
adds r7, r4, 0
movs r4, 0x20
mov r8, r6
movs r6, 0x10
adds r0, r5, 0
movs r1, 0x1
bl StartSpriteAnim
_08104390:
lsls r0, r7, 16
asrs r0, 16
ldrh r1, [r5, 0x20]
adds r0, r1
strh r0, [r5, 0x20]
lsls r0, r4, 16
asrs r0, 16
ldrh r1, [r5, 0x22]
adds r0, r1
strh r0, [r5, 0x22]
movs r0, 0x6
strh r0, [r5, 0x2E]
ldr r4, =gBattleAnimTarget
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
add r0, r8
strh r0, [r5, 0x32]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
adds r0, r6
strh r0, [r5, 0x36]
2018-11-26 00:00:18 +01:00
ldr r0, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r0, [r5, 0x1C]
ldr r1, =sub_81043F8
adds r0, r5, 0
bl StoreSpriteCallbackInData6
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104364
thumb_func_start sub_81043F8
sub_81043F8: @ 81043F8
push {lr}
adds r2, r0, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _0810440E
adds r0, r2, 0
bl DestroyAnimSprite
_0810440E:
pop {r0}
bx r0
thumb_func_end sub_81043F8
thumb_func_start sub_8104414
sub_8104414: @ 8104414
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r5, r0, 0
movs r0, 0x20
mov r8, r0
ldr r4, =0x0000ffe0
movs r2, 0x10
mov r9, r2
ldr r6, =0x0000fff0
ldr r7, =gBattleAnimArgs
ldrh r1, [r7]
movs r2, 0
ldrsh r0, [r7, r2]
cmp r0, 0
beq _08104448
mov r8, r4
movs r4, 0x20
mov r9, r6
movs r6, 0x10
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl StartSpriteAnim
_08104448:
mov r0, r8
lsls r1, r0, 16
asrs r1, 16
ldrh r2, [r5, 0x20]
adds r1, r2
strh r1, [r5, 0x20]
lsls r0, r4, 16
asrs r0, 16
ldrh r2, [r5, 0x22]
adds r0, r2
strh r0, [r5, 0x22]
movs r0, 0x6
strh r0, [r5, 0x2E]
strh r1, [r5, 0x30]
ldr r4, =gBattleAnimTarget
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
add r0, r9
strh r0, [r5, 0x32]
ldrh r0, [r5, 0x22]
strh r0, [r5, 0x34]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
adds r0, r6
strh r0, [r5, 0x36]
adds r0, r5, 0
bl InitAnimLinearTranslation
ldrh r0, [r7]
strh r0, [r5, 0x38]
ldrh r0, [r5, 0x2E]
strh r0, [r5, 0x3A]
ldr r0, =sub_81044BC
str r0, [r5, 0x1C]
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104414
thumb_func_start sub_81044BC
sub_81044BC: @ 81044BC
push {r4,lr}
adds r4, r0, 0
bl TranslateAnimLinear
lsls r0, 24
cmp r0, 0
beq _08104520
adds r0, r4, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08104520
adds r0, r4, 0
movs r1, 0
bl SeekSpriteAnim
adds r2, r4, 0
adds r2, 0x2C
ldrb r0, [r2]
movs r1, 0x40
orrs r0, r1
strb r0, [r2]
ldrh r0, [r4, 0x24]
ldrh r1, [r4, 0x20]
adds r0, r1
movs r2, 0
strh r0, [r4, 0x20]
ldrh r0, [r4, 0x26]
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x22]
movs r0, 0x2
strh r0, [r4, 0x24]
ldr r0, =0x0000fffe
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x3A]
strh r0, [r4, 0x2E]
ldrh r0, [r4, 0x30]
movs r1, 0x1
eors r0, r1
strh r0, [r4, 0x30]
ldrh r0, [r4, 0x32]
eors r0, r1
strh r0, [r4, 0x32]
strh r2, [r4, 0x36]
strh r2, [r4, 0x34]
ldr r0, =sub_8104530
str r0, [r4, 0x1C]
_08104520:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81044BC
thumb_func_start sub_8104530
sub_8104530: @ 8104530
push {r4,lr}
adds r4, r0, 0
movs r1, 0x34
ldrsh r0, [r4, r1]
cmp r0, 0
beq _08104548
ldrh r0, [r4, 0x24]
negs r0, r0
strh r0, [r4, 0x24]
ldrh r0, [r4, 0x26]
negs r0, r0
strh r0, [r4, 0x26]
_08104548:
ldrh r0, [r4, 0x34]
movs r1, 0x1
eors r0, r1
movs r1, 0
strh r0, [r4, 0x34]
ldrh r0, [r4, 0x36]
adds r0, 0x1
strh r0, [r4, 0x36]
lsls r0, 16
asrs r0, 16
cmp r0, 0x33
bne _0810458A
strh r1, [r4, 0x26]
strh r1, [r4, 0x24]
strh r1, [r4, 0x36]
strh r1, [r4, 0x34]
adds r2, r4, 0
adds r2, 0x2C
ldrb r1, [r2]
movs r0, 0x41
negs r0, r0
ands r0, r1
strb r0, [r2]
ldrh r0, [r4, 0x38]
movs r1, 0x1
eors r1, r0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl StartSpriteAnim
ldr r0, =sub_8104594
str r0, [r4, 0x1C]
_0810458A:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104530
thumb_func_start sub_8104594
sub_8104594: @ 8104594
push {r4,lr}
adds r4, r0, 0
bl TranslateAnimLinear
lsls r0, 24
cmp r0, 0
beq _081045A8
adds r0, r4, 0
bl DestroyAnimSprite
_081045A8:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8104594
thumb_func_start sub_81045B0
sub_81045B0: @ 81045B0
push {r4,r5,lr}
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
movs r0, 0x1
bl GetAnimBattlerSpriteId
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r4, 0
movs r1, 0x1
bl sub_80A7270
adds r0, r4, 0
movs r1, 0xD0
movs r2, 0xD0
movs r3, 0
bl obj_id_set_rotscale
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r0, r1
ldrb r0, [r0, 0x5]
lsrs r0, 4
adds r0, 0x10
movs r1, 0
bl sub_80A750C
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
movs r1, 0x50
strh r1, [r0, 0x8]
ldr r1, =sub_8104614
str r1, [r0]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81045B0
thumb_func_start sub_8104614
sub_8104614: @ 8104614
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
ldrh r1, [r0, 0x8]
subs r1, 0x1
strh r1, [r0, 0x8]
lsls r1, 16
asrs r1, 16
movs r0, 0x1
negs r0, r0
cmp r1, r0
bne _08104664
movs r0, 0x1
bl GetAnimBattlerSpriteId
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r4, 0
bl sub_80A7344
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r0, r1
ldrb r0, [r0, 0x5]
lsrs r0, 4
adds r0, 0x10
movs r1, 0x1
bl sub_80A750C
adds r0, r5, 0
bl DestroyAnimVisualTask
_08104664:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104614
thumb_func_start sub_8104674
sub_8104674: @ 8104674
push {r4,r5,lr}
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
movs r0, 0
bl GetAnimBattlerSpriteId
lsls r0, 24
lsrs r0, 24
movs r5, 0
strh r0, [r4, 0x8]
movs r1, 0
bl sub_80A7270
strh r5, [r4, 0xA]
strh r5, [r4, 0xC]
strh r5, [r4, 0xE]
movs r0, 0x80
lsls r0, 1
strh r0, [r4, 0x10]
strh r5, [r4, 0x12]
strh r5, [r4, 0x14]
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl sub_80A82E4
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x16]
ldr r0, =sub_81046CC
str r0, [r4]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104674
thumb_func_start sub_81046CC
sub_81046CC: @ 81046CC
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
movs r1, 0xA
ldrsh r0, [r4, r1]
cmp r0, 0x5
bls _081046E6
b _081047F6
_081046E6:
lsls r0, 2
ldr r1, =_081046F8
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_081046F8:
.4byte _08104710
.4byte _08104758
.4byte _0810478E
.4byte _08104794
.4byte _081047A4
.4byte _081047D8
_08104710:
movs r2, 0xC
ldrsh r0, [r4, r2]
cmp r0, 0
beq _08104720
cmp r0, 0x3
beq _08104720
cmp r0, 0x6
bne _08104728
_08104720:
adds r0, r4, 0
adds r1, r5, 0
bl sub_8104800
_08104728:
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
ldrh r0, [r4, 0x10]
adds r0, 0x28
strh r0, [r4, 0x10]
ldrb r0, [r4, 0x8]
movs r1, 0x10
ldrsh r2, [r4, r1]
adds r1, r2, 0
movs r3, 0
bl obj_id_set_rotscale
ldrb r0, [r4, 0x8]
bl sub_80A7E6C
movs r2, 0xC
ldrsh r0, [r4, r2]
cmp r0, 0x20
bne _081047F6
ldrh r0, [r4, 0x12]
adds r0, 0x1
strh r0, [r4, 0x12]
b _081047D0
_08104758:
movs r1, 0x14
ldrsh r0, [r4, r1]
cmp r0, 0
bne _081047F6
movs r2, 0x12
ldrsh r1, [r4, r2]
cmp r1, 0x3
bne _0810476E
strh r0, [r4, 0xC]
strh r1, [r4, 0xA]
b _081047F6
_0810476E:
strh r0, [r4, 0xC]
strh r0, [r4, 0xE]
movs r2, 0x80
lsls r2, 1
strh r2, [r4, 0x10]
ldrb r0, [r4, 0x8]
adds r1, r2, 0
movs r3, 0
bl obj_id_set_rotscale
ldrb r0, [r4, 0x8]
bl sub_80A7E6C
movs r0, 0x2
strh r0, [r4, 0xA]
b _081047F6
_0810478E:
movs r0, 0
strh r0, [r4, 0xA]
b _081047F6
_08104794:
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
lsls r0, 16
asrs r0, 16
cmp r0, 0x20
ble _081047F6
b _081047CC
_081047A4:
ldrh r0, [r4, 0xC]
adds r0, 0x2
strh r0, [r4, 0xC]
ldrh r0, [r4, 0x10]
subs r0, 0x50
strh r0, [r4, 0x10]
ldrb r0, [r4, 0x8]
movs r1, 0x10
ldrsh r2, [r4, r1]
adds r1, r2, 0
movs r3, 0
bl obj_id_set_rotscale
ldrb r0, [r4, 0x8]
bl sub_80A7E6C
movs r2, 0xC
ldrsh r0, [r4, r2]
cmp r0, 0x20
bne _081047F6
_081047CC:
movs r0, 0
strh r0, [r4, 0xC]
_081047D0:
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
b _081047F6
_081047D8:
ldrb r0, [r4, 0x8]
bl sub_80A7344
ldr r2, =gSprites
movs r0, 0x26
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0
strh r1, [r0, 0x26]
adds r0, r5, 0
bl DestroyAnimVisualTask
_081047F6:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81046CC
thumb_func_start sub_8104800
sub_8104800: @ 8104800
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
adds r7, r0, 0
lsls r1, 24
lsrs r1, 24
mov r9, r1
movs r0, 0
bl duplicate_obj_of_side_rel2move_in_transparent_mode
lsls r0, 16
lsrs r0, 16
mov r8, r0
lsls r0, 16
asrs r4, r0, 16
cmp r4, 0
blt _081048DA
bl AllocOamMatrix
lsls r0, 24
lsrs r6, r0, 24
cmp r6, 0xFF
bne _08104844
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
ldr r1, =gSprites
adds r0, r1
bl obj_delete_but_dont_free_vram
b _081048DA
.pool
_08104844:
ldr r5, =gSprites
lsls r3, r4, 4
adds r3, r4
lsls r3, 2
adds r4, r3, r5
ldrb r1, [r4, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r1
movs r1, 0x4
orrs r0, r1
movs r1, 0x3
orrs r0, r1
strb r0, [r4, 0x1]
adds r2, r4, 0
adds r2, 0x2C
ldrb r0, [r2]
movs r1, 0x80
orrs r0, r1
strb r0, [r2]
movs r0, 0x1F
ands r6, r0
lsls r2, r6, 1
ldrb r1, [r4, 0x3]
movs r0, 0x3F
negs r0, r0
ands r0, r1
orrs r0, r2
strb r0, [r4, 0x3]
ldrb r0, [r7, 0x16]
ldrb r1, [r7, 0xE]
subs r0, r1
adds r1, r4, 0
adds r1, 0x43
strb r0, [r1]
ldrh r0, [r7, 0xE]
adds r0, 0x1
strh r0, [r7, 0xE]
ldrh r0, [r7, 0x14]
adds r0, 0x1
strh r0, [r7, 0x14]
movs r0, 0x10
strh r0, [r4, 0x2E]
mov r0, r9
strh r0, [r4, 0x30]
movs r0, 0x6
strh r0, [r4, 0x32]
adds r5, 0x1C
adds r3, r5
ldr r0, =sub_81048F0
str r0, [r3]
mov r1, r8
lsls r0, r1, 24
lsrs r0, 24
movs r1, 0x10
ldrsh r2, [r7, r1]
adds r1, r2, 0
movs r3, 0
bl obj_id_set_rotscale
ldrb r0, [r4, 0x1]
movs r3, 0x4
negs r3, r3
ands r3, r0
movs r0, 0x1
orrs r3, r0
strb r3, [r4, 0x1]
lsrs r1, r3, 6
ldrb r2, [r4, 0x3]
lsrs r2, 6
lsls r3, 30
lsrs r3, 30
adds r0, r4, 0
bl CalcCenterToCornerVec
_081048DA:
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104800
thumb_func_start sub_81048F0
sub_81048F0: @ 81048F0
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
subs r0, 0x1
strh r0, [r4, 0x2E]
lsls r0, 16
cmp r0, 0
bne _0810492E
ldr r3, =gTasks
movs r0, 0x32
ldrsh r1, [r4, r0]
lsls r1, 1
movs r0, 0x30
ldrsh r2, [r4, r0]
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r1, r0
adds r3, 0x8
adds r1, r3
ldrh r0, [r1]
subs r0, 0x1
strh r0, [r1]
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl FreeOamMatrix
adds r0, r4, 0
bl obj_delete_but_dont_free_vram
_0810492E:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81048F0
thumb_func_start sub_8104938
sub_8104938: @ 8104938
push {r4,r5,lr}
lsls r0, 24
lsrs r2, r0, 24
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
ldr r5, =gBattleAnimArgs
movs r1, 0x2
ldrsh r0, [r5, r1]
cmp r0, 0
bne _08104964
adds r0, r2, 0
bl DestroyAnimVisualTask
b _0810498A
.pool
_08104964:
ldrb r0, [r5]
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
movs r2, 0
strh r1, [r4, 0x8]
strh r2, [r4, 0xA]
ldrh r0, [r5, 0x2]
strh r0, [r4, 0xC]
strh r2, [r4, 0xE]
strh r2, [r4, 0x10]
ldr r2, =gUnknown_085935E8
adds r0, r4, 0
bl sub_80A7CFC
ldr r0, =sub_8104998
str r0, [r4]
_0810498A:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104938
thumb_func_start sub_8104998
sub_8104998: @ 8104998
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
movs r0, 0xA
ldrsh r5, [r4, r0]
cmp r5, 0x1
beq _08104A00
cmp r5, 0x1
bgt _081049C0
cmp r5, 0
beq _081049CA
b _08104AA8
.pool
_081049C0:
cmp r5, 0x2
beq _08104A34
cmp r5, 0x3
beq _08104A64
b _08104AA8
_081049CA:
adds r0, r4, 0
bl sub_80A7D34
ldrh r2, [r4, 0x10]
adds r2, 0x3
strh r2, [r4, 0x10]
ldr r3, =gSprites
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
ldrh r1, [r0, 0x26]
adds r1, r2
strh r1, [r0, 0x26]
ldrh r0, [r4, 0xE]
adds r0, 0x1
strh r0, [r4, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, 0x7
ble _08104AA8
strh r5, [r4, 0xE]
b _08104A5C
.pool
_08104A00:
adds r0, r4, 0
bl sub_80A7D34
ldr r2, =gSprites
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r4, 0x10]
ldrh r2, [r0, 0x26]
adds r1, r2
strh r1, [r0, 0x26]
ldrh r0, [r4, 0xE]
adds r0, 0x1
strh r0, [r4, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, 0x7
ble _08104AA8
movs r0, 0
strh r0, [r4, 0xE]
b _08104A5C
.pool
_08104A34:
movs r1, 0x10
ldrsh r0, [r4, r1]
cmp r0, 0
beq _08104A5C
ldr r2, =gSprites
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r0, 0x26]
subs r1, 0x2
strh r1, [r0, 0x26]
ldrh r0, [r4, 0x10]
subs r0, 0x2
strh r0, [r4, 0x10]
b _08104AA8
.pool
_08104A5C:
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
b _08104AA8
_08104A64:
adds r0, r4, 0
bl sub_80A7D34
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
bne _08104AA8
ldrh r0, [r4, 0xC]
subs r0, 0x1
strh r0, [r4, 0xC]
lsls r0, 16
cmp r0, 0
bne _08104A9C
ldr r2, =gSprites
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
strh r5, [r0, 0x26]
adds r0, r6, 0
bl DestroyAnimVisualTask
b _08104AA8
.pool
_08104A9C:
ldrb r1, [r4, 0x8]
ldr r2, =gUnknown_085935E8
adds r0, r4, 0
bl sub_80A7CFC
strh r5, [r4, 0xA]
_08104AA8:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104998
thumb_func_start sub_8104AB4
sub_8104AB4: @ 8104AB4
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
movs r0, 0
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
ldr r2, =gUnknown_08593608
adds r0, r4, 0
bl sub_80A7CFC
ldr r0, =sub_8104AF0
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104AB4
thumb_func_start sub_8104AF0
sub_8104AF0: @ 8104AF0
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
ldr r1, =gTasks
adds r0, r1
bl sub_80A7D34
lsls r0, 24
cmp r0, 0
bne _08104B10
adds r0, r4, 0
bl DestroyAnimVisualTask
_08104B10:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104AF0
thumb_func_start sub_8104B1C
sub_8104B1C: @ 8104B1C
push {r4,r5,lr}
adds r4, r0, 0
ldr r5, =gBattleAnimAttacker
ldrb r0, [r5]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
bne _08104B50
adds r0, r4, 0
movs r1, 0
bl StartSpriteAnim
ldrb r0, [r5]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
adds r0, 0x20
strh r0, [r4, 0x20]
movs r0, 0x40
b _08104B6A
.pool
_08104B50:
adds r0, r4, 0
movs r1, 0x1
bl StartSpriteAnim
ldrb r0, [r5]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
subs r0, 0x20
strh r0, [r4, 0x20]
ldr r0, =0x0000ffc0
_08104B6A:
strh r0, [r4, 0x30]
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
movs r1, 0
strh r0, [r4, 0x22]
movs r0, 0x34
strh r0, [r4, 0x2E]
strh r1, [r4, 0x32]
strh r1, [r4, 0x34]
strh r1, [r4, 0x36]
ldr r1, =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData6
ldr r0, =sub_80A656C
str r0, [r4, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104B1C
thumb_func_start sub_8104BAC
sub_8104BAC: @ 8104BAC
push {r4-r6,lr}
adds r6, r0, 0
ldr r0, =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08104BC8
ldr r0, =gBattleAnimAttacker
b _08104BCA
.pool
_08104BC8:
ldr r0, =gBattleAnimTarget
_08104BCA:
ldrb r5, [r0]
adds r0, r5, 0
bl GetBattlerSide
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08104BE4
ldr r1, =gBattleAnimArgs
movs r2, 0x2
ldrsh r0, [r1, r2]
negs r0, r0
strh r0, [r1, 0x2]
_08104BE4:
adds r0, r5, 0
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
ldr r4, =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r4, 0x2]
adds r0, r1
strh r0, [r6, 0x20]
adds r0, r5, 0
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
ldrh r4, [r4, 0x4]
adds r0, r4
strh r0, [r6, 0x22]
lsls r0, 16
asrs r0, 16
cmp r0, 0x7
bgt _08104C16
movs r0, 0x8
strh r0, [r6, 0x22]
_08104C16:
ldr r1, =move_anim_8074EE0
adds r0, r6, 0
bl StoreSpriteCallbackInData6
ldr r0, =sub_80A67BC
str r0, [r6, 0x1C]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104BAC
thumb_func_start sub_8104C38
sub_8104C38: @ 8104C38
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
movs r0, 0
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
movs r0, 0
strh r1, [r4, 0x8]
strh r0, [r4, 0xA]
ldr r2, =gUnknown_085936A4
adds r0, r4, 0
bl sub_80A7CFC
ldr r0, =sub_8104C78
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104C38
thumb_func_start sub_8104C78
sub_8104C78: @ 8104C78
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
ldr r1, =gTasks
adds r0, r1
bl sub_80A7D34
lsls r0, 24
cmp r0, 0
bne _08104C98
adds r0, r4, 0
bl DestroyAnimVisualTask
_08104C98:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104C78
thumb_func_start sub_8104CA4
sub_8104CA4: @ 8104CA4
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
ldr r0, =gTasks
adds r4, r1, r0
movs r0, 0
bl GetAnimBattlerSpriteId
lsls r0, 24
lsrs r0, 24
movs r2, 0
strh r0, [r4, 0x8]
strh r2, [r4, 0xA]
movs r0, 0x4
strh r0, [r4, 0xC]
movs r0, 0x7
strh r0, [r4, 0xE]
movs r0, 0x3
strh r0, [r4, 0x10]
ldr r3, =gSprites
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
ldrh r0, [r0, 0x20]
strh r0, [r4, 0x12]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
ldrh r0, [r0, 0x22]
strh r0, [r4, 0x14]
strh r2, [r4, 0x16]
strh r2, [r4, 0x18]
movs r0, 0x2
strh r0, [r4, 0x1A]
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08104D0E
movs r1, 0xC
ldrsh r0, [r4, r1]
negs r0, r0
strh r0, [r4, 0xC]
_08104D0E:
ldr r0, =sub_8104D28
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104CA4
thumb_func_start sub_8104D28
sub_8104D28: @ 8104D28
push {r4,r5,lr}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
ldr r1, =gTasks
adds r3, r0, r1
ldrh r0, [r3, 0x16]
adds r0, 0x1
strh r0, [r3, 0x16]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2
ble _08104D8E
movs r0, 0
strh r0, [r3, 0x16]
ldrh r0, [r3, 0x18]
adds r0, 0x1
strh r0, [r3, 0x18]
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _08104D78
ldr r2, =gSprites
movs r0, 0x8
ldrsh r1, [r3, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r3, 0x1A]
ldrh r2, [r0, 0x22]
adds r1, r2
b _08104D8C
.pool
_08104D78:
ldr r2, =gSprites
movs r5, 0x8
ldrsh r1, [r3, r5]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r0, 0x22]
ldrh r2, [r3, 0x1A]
subs r1, r2
_08104D8C:
strh r1, [r0, 0x22]
_08104D8E:
movs r1, 0xA
ldrsh r0, [r3, r1]
cmp r0, 0x1
beq _08104DDC
cmp r0, 0x1
bgt _08104DA4
cmp r0, 0
beq _08104DAA
b _08104E6C
.pool
_08104DA4:
cmp r0, 0x2
beq _08104E0C
b _08104E6C
_08104DAA:
ldr r2, =gSprites
movs r5, 0x8
ldrsh r1, [r3, r5]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r3, 0xC]
ldrh r2, [r0, 0x20]
adds r1, r2
strh r1, [r0, 0x20]
ldrh r0, [r3, 0xE]
subs r0, 0x1
strh r0, [r3, 0xE]
lsls r0, 16
cmp r0, 0
bne _08104E6C
movs r0, 0xE
strh r0, [r3, 0xE]
movs r0, 0x1
strh r0, [r3, 0xA]
b _08104E6C
.pool
_08104DDC:
ldr r2, =gSprites
movs r5, 0x8
ldrsh r1, [r3, r5]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r0, 0x20]
ldrh r2, [r3, 0xC]
subs r1, r2
strh r1, [r0, 0x20]
ldrh r0, [r3, 0xE]
subs r0, 0x1
strh r0, [r3, 0xE]
lsls r0, 16
cmp r0, 0
bne _08104E6C
movs r0, 0x7
strh r0, [r3, 0xE]
movs r0, 0x2
strh r0, [r3, 0xA]
b _08104E6C
.pool
_08104E0C:
ldr r2, =gSprites
movs r0, 0x8
ldrsh r1, [r3, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r3, 0xC]
ldrh r5, [r0, 0x20]
adds r1, r5
strh r1, [r0, 0x20]
ldrh r0, [r3, 0xE]
subs r0, 0x1
strh r0, [r3, 0xE]
lsls r0, 16
asrs r1, r0, 16
cmp r1, 0
bne _08104E6C
ldrh r0, [r3, 0x10]
subs r0, 0x1
strh r0, [r3, 0x10]
lsls r0, 16
cmp r0, 0
beq _08104E48
movs r0, 0x7
strh r0, [r3, 0xE]
strh r1, [r3, 0xA]
b _08104E6C
.pool
_08104E48:
ldrh r1, [r3, 0x18]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _08104E66
movs r0, 0x8
ldrsh r1, [r3, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r0, 0x22]
ldrh r2, [r3, 0x1A]
subs r1, r2
strh r1, [r0, 0x22]
_08104E66:
adds r0, r4, 0
bl DestroyAnimVisualTask
_08104E6C:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8104D28
thumb_func_start sub_8104E74
sub_8104E74: @ 8104E74
push {r4-r6,lr}
sub sp, 0xC
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
ldr r0, =gTasks
adds r5, r1, r0
ldr r4, =gBattleAnimTarget
ldrb r0, [r4]
bl GetBattlerYCoordWithElevation
lsls r0, 24
lsrs r0, 24
adds r0, 0x20
movs r1, 0
strh r0, [r5, 0x8]
movs r0, 0x4
strh r0, [r5, 0xA]
strh r1, [r5, 0xC]
strh r1, [r5, 0xE]
strh r1, [r5, 0x10]
strh r1, [r5, 0x12]
ldrb r0, [r4]
bl sub_80A861C
strh r0, [r5, 0x26]
ldrb r0, [r4]
bl sub_80A8364
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08104ED4
ldr r0, =gBattle_BG1_X
ldrh r0, [r0]
strh r0, [r5, 0x14]
ldr r0, =0x04000014
b _08104EDC
.pool
_08104ED4:
ldr r0, =gBattle_BG2_X
ldrh r0, [r0]
strh r0, [r5, 0x14]
ldr r0, =0x04000018
_08104EDC:
str r0, [sp]
ldrh r0, [r5, 0x8]
adds r1, r0, 0
subs r1, 0x40
lsls r2, r1, 16
lsls r0, 16
cmp r2, r0
bgt _08104F1A
ldr r4, =gScanlineEffectRegBuffers
movs r0, 0xF0
lsls r0, 3
adds r6, r4, r0
_08104EF4:
asrs r3, r2, 16
cmp r3, 0
blt _08104F0C
lsls r1, r3, 1
adds r2, r1, r4
ldrh r0, [r5, 0x14]
adds r0, 0xF0
strh r0, [r2]
adds r1, r6
ldrh r0, [r5, 0x14]
adds r0, 0xF0
strh r0, [r1]
_08104F0C:
adds r0, r3, 0x1
lsls r2, r0, 16
asrs r1, r2, 16
movs r3, 0x8
ldrsh r0, [r5, r3]
cmp r1, r0
ble _08104EF4
_08104F1A:
ldr r0, =0xa2600001
str r0, [sp, 0x4]
mov r1, sp
movs r2, 0
movs r0, 0x1
strb r0, [r1, 0x8]
mov r0, sp
strb r2, [r0, 0x9]
ldr r0, [sp]
ldr r1, [sp, 0x4]
ldr r2, [sp, 0x8]
bl ScanlineEffect_SetParams
ldr r0, =sub_8104F54
str r0, [r5]
add sp, 0xC
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104E74
thumb_func_start sub_8104F54
sub_8104F54: @ 8104F54
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
ldr r1, =gTasks
adds r3, r0, r1
movs r1, 0x10
ldrsh r0, [r3, r1]
cmp r0, 0
beq _08104F78
cmp r0, 0x1
beq _08104F8E
b _0810500E
.pool
_08104F78:
ldrh r0, [r3, 0x12]
adds r0, 0x1
strh r0, [r3, 0x12]
lsls r0, 16
asrs r0, 16
cmp r0, 0x14
ble _0810500E
ldrh r0, [r3, 0x10]
adds r0, 0x1
strh r0, [r3, 0x10]
b _0810500E
_08104F8E:
ldrh r0, [r3, 0xA]
adds r0, 0x1
strh r0, [r3, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x3
ble _0810500E
movs r0, 0
strh r0, [r3, 0xA]
ldrh r1, [r3, 0xE]
movs r0, 0x3
ands r0, r1
strh r0, [r3, 0xC]
ldrh r0, [r3, 0x8]
subs r0, r1
strh r0, [r3, 0x12]
movs r2, 0xC
ldrsh r1, [r3, r2]
cmp r1, 0x1
beq _08104FC4
cmp r1, 0x1
ble _08104FCC
cmp r1, 0x2
beq _08104FC8
cmp r1, 0x3
beq _08104FC8
b _08104FCC
_08104FC4:
subs r0, 0x2
b _08104FCA
_08104FC8:
adds r0, 0x1
_08104FCA:
strh r0, [r3, 0x12]
_08104FCC:
movs r1, 0x12
ldrsh r0, [r3, r1]
cmp r0, 0
blt _08104FF0
ldr r2, =gScanlineEffectRegBuffers
lsls r0, 1
adds r0, r2
ldrh r1, [r3, 0x14]
strh r1, [r0]
movs r1, 0x12
ldrsh r0, [r3, r1]
lsls r0, 1
movs r1, 0xF0
lsls r1, 3
adds r2, r1
adds r0, r2
ldrh r1, [r3, 0x14]
strh r1, [r0]
_08104FF0:
ldrh r0, [r3, 0xE]
adds r0, 0x1
strh r0, [r3, 0xE]
lsls r0, 16
asrs r0, 16
movs r2, 0x26
ldrsh r1, [r3, r2]
cmp r0, r1
blt _0810500E
ldr r1, =gScanlineEffect
movs r0, 0x3
strb r0, [r1, 0x15]
adds r0, r4, 0
bl DestroyAnimVisualTask
_0810500E:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8104F54
thumb_func_start sub_810501C
sub_810501C: @ 810501C
push {r4-r6,lr}
adds r4, r0, 0
ldr r6, =gBattleAnimTarget
ldrb r0, [r6]
movs r1, 0
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
subs r0, 0x10
movs r5, 0
strh r0, [r4, 0x20]
ldrb r0, [r6]
bl GetBattlerYCoordWithElevation
lsls r0, 24
lsrs r0, 24
adds r0, 0x10
strh r0, [r4, 0x22]
strh r5, [r4, 0x2E]
strh r5, [r4, 0x30]
strh r5, [r4, 0x32]
movs r0, 0x10
strh r0, [r4, 0x34]
strh r5, [r4, 0x36]
ldrb r0, [r6]
movs r1, 0
bl sub_80A861C
adds r0, 0x2
strh r0, [r4, 0x38]
movs r0, 0x3F
bl BattleAnimAdjustPanning
lsls r0, 24
asrs r0, 24
strh r0, [r4, 0x3A]
ldr r0, =sub_8105078
str r0, [r4, 0x1C]
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_810501C
thumb_func_start sub_8105078
sub_8105078: @ 8105078
push {r4,lr}
adds r4, r0, 0
movs r0, 0x2E
ldrsh r1, [r4, r0]
cmp r1, 0x1
beq _081050DC
cmp r1, 0x1
bgt _0810508E
cmp r1, 0
beq _08105094
b _081051BC
_0810508E:
cmp r1, 0x2
beq _0810516E
b _081051BC
_08105094:
ldrh r0, [r4, 0x32]
adds r0, 0x1
strh r0, [r4, 0x32]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _081050BE
strh r1, [r4, 0x32]
adds r3, r4, 0
adds r3, 0x3E
ldrb r2, [r3]
lsrs r1, r2, 2
movs r0, 0x1
eors r1, r0
ands r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
_081050BE:
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x10
ble _081051BC
adds r2, r4, 0
adds r2, 0x3E
ldrb r0, [r2]
movs r1, 0x5
negs r1, r1
ands r1, r0
strb r1, [r2]
b _08105166
_081050DC:
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x3
ble _08105122
ldrh r2, [r4, 0x32]
movs r3, 0x32
ldrsh r1, [r4, r3]
movs r3, 0x38
ldrsh r0, [r4, r3]
cmp r1, r0
bge _08105122
movs r0, 0
strh r0, [r4, 0x30]
ldrh r0, [r4, 0x22]
subs r0, 0x1
strh r0, [r4, 0x22]
adds r0, r2, 0x1
strh r0, [r4, 0x32]
movs r1, 0x32
ldrsh r0, [r4, r1]
movs r1, 0xA
bl __modsi3
lsls r0, 16
cmp r0, 0
bne _08105122
ldrh r1, [r4, 0x3A]
lsls r1, 24
asrs r1, 24
movs r0, 0xCD
bl PlaySE12WithPanning
_08105122:
ldrh r0, [r4, 0x34]
ldrh r2, [r4, 0x36]
adds r1, r0, r2
strh r1, [r4, 0x36]
lsls r0, r1, 16
asrs r2, r0, 16
cmp r2, 0x1F
ble _08105136
movs r0, 0x40
b _08105144
_08105136:
movs r0, 0x20
negs r0, r0
cmp r2, r0
bgt _08105150
movs r2, 0x40
negs r2, r2
adds r0, r2, 0
_08105144:
subs r0, r1
strh r0, [r4, 0x36]
movs r3, 0x34
ldrsh r0, [r4, r3]
negs r0, r0
strh r0, [r4, 0x34]
_08105150:
ldrh r0, [r4, 0x36]
movs r2, 0
strh r0, [r4, 0x24]
movs r0, 0x38
ldrsh r1, [r4, r0]
movs r3, 0x32
ldrsh r0, [r4, r3]
cmp r1, r0
bne _081051BC
strh r2, [r4, 0x30]
strh r2, [r4, 0x32]
_08105166:
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
b _081051BC
_0810516E:
ldrh r0, [r4, 0x32]
adds r0, 0x1
strh r0, [r4, 0x32]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _0810519A
movs r0, 0
strh r0, [r4, 0x32]
adds r3, r4, 0
adds r3, 0x3E
ldrb r2, [r3]
lsrs r1, r2, 2
movs r0, 0x1
eors r1, r0
ands r1, r0
lsls r1, 2
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
_0810519A:
ldrh r0, [r4, 0x30]
adds r0, 0x1
strh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 16
cmp r0, 0x10
ble _081051BC
adds r2, r4, 0
adds r2, 0x3E
ldrb r1, [r2]
movs r0, 0x5
negs r0, r0
ands r0, r1
strb r0, [r2]
adds r0, r4, 0
bl DestroyAnimSprite
_081051BC:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8105078
thumb_func_start sub_81051C4
sub_81051C4: @ 81051C4
push {r4-r7,lr}
sub sp, 0x4
adds r6, r0, 0
movs r5, 0
mov r0, sp
strh r5, [r0]
mov r1, sp
adds r1, 0x2
strh r5, [r1]
ldr r0, =gBattleAnimArgs
movs r3, 0x4
ldrsh r2, [r0, r3]
adds r7, r1, 0
adds r1, r0, 0
cmp r2, 0
bne _081051F0
ldr r0, =gBattleAnimAttacker
b _081051F2
.pool
_081051F0:
ldr r0, =gBattleAnimTarget
_081051F2:
ldrb r5, [r0]
ldrb r1, [r1, 0x6]
movs r0, 0x1
adds r4, r0, 0
eors r4, r1
bl IsDoubleBattle
lsls r0, 24
cmp r0, 0
beq _0810526A
movs r1, 0x2
adds r0, r5, 0
eors r0, r1
bl IsBattlerSpriteVisible
lsls r0, 24
cmp r0, 0
beq _0810526A
adds r0, r5, 0
adds r1, r4, 0
mov r2, sp
adds r3, r7, 0
bl SetAverageBattlerPositions
cmp r4, 0
bne _08105230
adds r0, r5, 0
movs r1, 0
b _08105234
.pool
_08105230:
adds r0, r5, 0
movs r1, 0x2
_08105234:
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r4, r0, 24
adds r0, r5, 0
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _08105260
ldr r2, =gBattleAnimArgs
mov r0, sp
ldrh r1, [r0]
subs r1, r4
ldrh r0, [r2]
subs r1, r0
subs r0, r1
strh r0, [r2]
b _0810526A
.pool
_08105260:
ldr r1, =gBattleAnimArgs
mov r0, sp
ldrh r0, [r0]
subs r0, r4
strh r0, [r1]
_0810526A:
ldr r1, =sub_80A77C8
str r1, [r6, 0x1C]
adds r0, r6, 0
bl _call_via_r1
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_81051C4
thumb_func_start sub_8105284
sub_8105284: @ 8105284
push {r4,lr}
adds r4, r0, 0
bl TranslateAnimLinear
lsls r0, 24
cmp r0, 0
beq _0810529E
adds r0, r4, 0
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroyAnimSprite
_0810529E:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8105284
thumb_func_start sub_81052A4
sub_81052A4: @ 81052A4
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
adds r5, r0, 0
movs r6, 0
mov r0, sp
strh r6, [r0]
mov r1, sp
adds r1, 0x2
strh r6, [r1]
ldr r0, =gBattleAnimArgs
movs r2, 0xA
ldrsh r0, [r0, r2]
cmp r0, 0
bne _081052DC
ldr r0, =gBattleAnimAttacker
ldrb r7, [r0]
ldr r0, =gBattleAnimTarget
b _081052E2
.pool
_081052DC:
ldr r0, =gBattleAnimTarget
ldrb r7, [r0]
ldr r0, =gBattleAnimAttacker
_081052E2:
ldrb r0, [r0]
mov r8, r0
ldr r0, =gBattleAnimArgs
movs r3, 0xC
ldrsh r0, [r0, r3]
cmp r0, 0
bne _08105308
movs r0, 0
mov r10, r0
movs r1, 0x1
str r1, [sp, 0x4]
b _08105310
.pool
_08105308:
movs r2, 0x2
mov r10, r2
movs r3, 0x3
str r3, [sp, 0x4]
_08105310:
adds r0, r7, 0
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _0810536C
adds r0, r7, 0
mov r1, r10
bl GetBattlerSpriteCoord
lsls r0, 24
ldr r1, =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r1]
adds r0, r1
lsls r0, 16
lsrs r0, 16
mov r9, r0
movs r0, 0x2
mov r4, r8
eors r4, r0
adds r0, r4, 0
bl IsBattlerSpriteVisible
lsls r0, 24
cmp r0, 0
beq _0810535C
ldr r2, =gSprites
ldr r0, =gBattlerSpriteIds
adds r0, r4, r0
b _081053EA
.pool
_0810535C:
ldr r2, =gSprites
ldr r0, =gBattlerSpriteIds
add r0, r8
b _081053EA
.pool
_0810536C:
adds r0, r7, 0
mov r1, r10
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
ldr r1, =gBattleAnimArgs
ldrh r1, [r1]
subs r0, r1
lsls r0, 16
lsrs r0, 16
mov r9, r0
bl IsContest
lsls r0, 24
cmp r0, 0
bne _081053E4
movs r0, 0x2
adds r4, r7, 0
eors r4, r0
adds r0, r4, 0
bl IsBattlerSpriteVisible
lsls r0, 24
cmp r0, 0
beq _081053E4
ldr r3, =gSprites
ldr r2, =gBattlerSpriteIds
adds r0, r7, r2
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r6, r0, r3
adds r2, r4, r2
ldrb r1, [r2]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, r0, r3
movs r0, 0x20
ldrsh r1, [r6, r0]
movs r3, 0x20
ldrsh r0, [r2, r3]
cmp r1, r0
bge _081053E0
adds r0, r2, 0
adds r0, 0x43
ldrb r0, [r0]
adds r0, 0x1
b _081053FA
.pool
_081053E0:
adds r0, r6, 0
b _081053F4
_081053E4:
ldr r2, =gSprites
ldr r0, =gBattlerSpriteIds
adds r0, r7, r0
_081053EA:
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
_081053F4:
adds r0, 0x43
ldrb r0, [r0]
subs r0, 0x1
_081053FA:
adds r1, r5, 0
adds r1, 0x43
strb r0, [r1]
adds r0, r7, 0
ldr r1, [sp, 0x4]
bl GetBattlerSpriteCoord
lsls r0, 24
ldr r4, =gBattleAnimArgs
lsrs r0, 24
ldrh r1, [r4, 0x2]
adds r0, r1
lsls r0, 16
lsrs r6, r0, 16
bl IsContest
lsls r0, 24
cmp r0, 0
bne _0810544C
movs r1, 0x2
mov r0, r8
eors r0, r1
bl IsBattlerSpriteVisible
lsls r0, 24
cmp r0, 0
beq _0810544C
ldrb r1, [r4, 0xC]
mov r0, r8
mov r2, sp
mov r3, sp
adds r3, 0x2
bl SetAverageBattlerPositions
b _0810546C
.pool
_0810544C:
mov r4, sp
mov r0, r8
mov r1, r10
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4]
mov r0, r8
ldr r1, [sp, 0x4]
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
mov r2, sp
strh r0, [r2, 0x2]
_0810546C:
mov r0, r8
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _08105490
mov r3, sp
mov r2, sp
ldr r1, =gBattleAnimArgs
ldrh r0, [r1, 0x6]
ldrh r2, [r2]
adds r0, r2
strh r0, [r3]
adds r2, r1, 0
b _0810549E
.pool
_08105490:
mov r3, sp
mov r0, sp
ldr r2, =gBattleAnimArgs
ldrh r0, [r0]
ldrh r1, [r2, 0x6]
subs r0, r1
strh r0, [r3]
_0810549E:
ldrh r1, [r2, 0x8]
mov r3, sp
ldrh r3, [r3, 0x2]
adds r1, r3
mov r0, sp
strh r1, [r0, 0x2]
mov r3, r9
strh r3, [r5, 0x30]
strh r3, [r5, 0x20]
strh r6, [r5, 0x34]
strh r6, [r5, 0x22]
ldrh r0, [r0]
strh r0, [r5, 0x32]
strh r1, [r5, 0x36]
ldrh r0, [r2]
strh r0, [r5, 0x2E]
adds r0, r5, 0
bl InitAnimLinearTranslation
ldr r1, =sub_8105284
str r1, [r5, 0x1C]
adds r0, r5, 0
bl _call_via_r1
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_81052A4
thumb_func_start sub_81054E8
sub_81054E8: @ 81054E8
push {r4,lr}
adds r4, r0, 0
ldr r0, =0x000027db
bl IndexOfSpritePaletteTag
lsls r0, 24
lsrs r0, 24
cmp r0, 0xFF
beq _0810550E
lsls r0, 20
ldr r1, =0x01010000
adds r0, r1
lsrs r0, 16
ldr r1, =gBattleAnimArgs
ldrb r2, [r1, 0xA]
ldrh r3, [r1, 0x8]
movs r1, 0xF
bl BlendPalette
_0810550E:
adds r0, r4, 0
movs r1, 0x1
bl StartSpriteAffineAnim
ldr r1, =sub_80A77C8
str r1, [r4, 0x1C]
adds r0, r4, 0
bl _call_via_r1
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81054E8
thumb_func_start sub_8105538
sub_8105538: @ 8105538
push {r4,lr}
adds r4, r0, 0
movs r1, 0
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
movs r1, 0xA0
cmp r0, 0
beq _08105554
ldr r1, =0x0000ff60
_08105554:
movs r0, 0xE0
lsls r0, 2
strh r0, [r4, 0x2E]
strh r1, [r4, 0x30]
ldr r0, =gBattleAnimArgs
ldrh r0, [r0, 0x4]
strh r0, [r4, 0x3C]
ldr r0, =sub_810557C
str r0, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105538
thumb_func_start sub_810557C
sub_810557C: @ 810557C
push {r4,r5,lr}
adds r4, r0, 0
ldrh r2, [r4, 0x2E]
lsls r0, r2, 16
asrs r0, 24
ldrh r1, [r4, 0x26]
subs r1, r0
movs r5, 0
strh r1, [r4, 0x26]
ldrh r0, [r4, 0x30]
lsls r0, 16
asrs r0, 24
strh r0, [r4, 0x24]
subs r2, 0x20
strh r2, [r4, 0x2E]
ldr r0, =gBattleAnimAttacker
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
movs r1, 0xA0
cmp r0, 0
beq _081055AC
ldr r1, =0x0000ff60
_081055AC:
lsls r0, r1, 16
asrs r0, 16
ldrh r1, [r4, 0x30]
adds r0, r1
strh r0, [r4, 0x30]
ldrh r1, [r4, 0x26]
movs r2, 0x26
ldrsh r0, [r4, r2]
cmp r0, 0
ble _081055E0
ldrh r2, [r4, 0x22]
adds r0, r1, r2
strh r0, [r4, 0x22]
ldrh r0, [r4, 0x24]
ldrh r1, [r4, 0x20]
adds r0, r1
strh r0, [r4, 0x20]
strh r5, [r4, 0x26]
strh r5, [r4, 0x24]
strh r5, [r4, 0x2E]
adds r0, r4, 0
movs r1, 0x1
bl StartSpriteAffineAnim
ldr r0, =sub_81055F4
str r0, [r4, 0x1C]
_081055E0:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_810557C
thumb_func_start sub_81055F4
sub_81055F4: @ 81055F4
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
adds r1, r0, 0x1
strh r1, [r4, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x13
ble _08105612
adds r0, r4, 0
movs r1, 0x2
bl StartSpriteAffineAnim
ldr r0, =sub_810561C
str r0, [r4, 0x1C]
_08105612:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81055F4
thumb_func_start sub_810561C
sub_810561C: @ 810561C
push {r4,lr}
adds r4, r0, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _08105682
adds r0, r4, 0
movs r1, 0x1
bl StartSpriteAffineAnim
movs r0, 0
strh r0, [r4, 0x2E]
movs r1, 0x3C
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08105668
ldrh r2, [r4, 0x4]
lsls r1, r2, 22
lsrs r1, 22
adds r1, 0x10
ldr r3, =0x000003ff
adds r0, r3, 0
ands r1, r0
ldr r0, =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r4, 0x4]
ldr r0, =sub_8105694
b _08105680
.pool
_08105668:
ldrh r2, [r4, 0x4]
lsls r1, r2, 22
lsrs r1, 22
adds r1, 0x20
ldr r3, =0x000003ff
adds r0, r3, 0
ands r1, r0
ldr r0, =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r4, 0x4]
ldr r0, =sub_810571C
_08105680:
str r0, [r4, 0x1C]
_08105682:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810561C
thumb_func_start sub_8105694
sub_8105694: @ 8105694
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x26]
subs r0, 0x2
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x9
bne _081056CA
movs r0, 0x10
strh r0, [r4, 0x2E]
movs r0, 0
strh r0, [r4, 0x30]
movs r1, 0xFD
lsls r1, 6
movs r0, 0x50
bl SetGpuReg
ldrh r1, [r4, 0x2E]
movs r0, 0x52
bl SetGpuReg
ldr r0, =sub_81056D4
str r0, [r4, 0x1C]
_081056CA:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105694
thumb_func_start sub_81056D4
sub_81056D4: @ 81056D4
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x30]
adds r1, r0, 0x1
strh r1, [r4, 0x30]
lsls r0, 16
asrs r0, 16
movs r1, 0x3
bl __modsi3
lsls r0, 16
cmp r0, 0
bne _08105712
ldrh r1, [r4, 0x2E]
subs r1, 0x1
strh r1, [r4, 0x2E]
movs r0, 0x10
subs r0, r1
lsls r0, 8
orrs r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
bl SetGpuReg
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08105712
ldr r0, =sub_810571C
str r0, [r4, 0x1C]
_08105712:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81056D4
thumb_func_start sub_810571C
sub_810571C: @ 810571C
push {lr}
adds r3, r0, 0
ldr r0, =gBattleAnimArgs
ldrh r1, [r0, 0xE]
ldr r0, =0x0000ffff
cmp r1, r0
bne _08105754
adds r2, r3, 0
adds r2, 0x3E
ldrb r0, [r2]
movs r1, 0x4
orrs r0, r1
strb r0, [r2]
movs r1, 0x3C
ldrsh r0, [r3, r1]
cmp r0, 0
bne _08105750
ldr r0, =sub_810575C
b _08105752
.pool
_08105750:
ldr r0, =DestroyAnimSprite
_08105752:
str r0, [r3, 0x1C]
_08105754:
pop {r0}
bx r0
.pool
thumb_func_end sub_810571C
thumb_func_start sub_810575C
sub_810575C: @ 810575C
push {r4,lr}
adds r4, r0, 0
movs r0, 0x50
movs r1, 0
bl SetGpuReg
movs r0, 0x52
movs r1, 0
bl SetGpuReg
adds r0, r4, 0
bl DestroyAnimSprite
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_810575C
thumb_func_start sub_810577C
sub_810577C: @ 810577C
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
movs r0, 0
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
strh r1, [r4, 0x8]
ldr r2, =gUnknown_085938B0
adds r0, r4, 0
bl sub_80A7CFC
ldr r0, =sub_81057B8
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810577C
thumb_func_start sub_81057B8
sub_81057B8: @ 81057B8
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
adds r0, r4, 0
bl sub_80A7D34
lsls r0, 24
lsrs r3, r0, 24
cmp r3, 0
bne _08105802
ldr r2, =gSprites
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
strh r3, [r0, 0x26]
movs r0, 0x8
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3E
ldrb r1, [r0]
movs r2, 0x4
orrs r1, r2
strb r1, [r0]
adds r0, r5, 0
bl DestroyAnimVisualTask
_08105802:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81057B8
thumb_func_start sub_8105810
sub_8105810: @ 8105810
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
ldr r0, =gTasks
adds r4, r1, r0
movs r0, 0
strh r0, [r4, 0x8]
strh r0, [r4, 0xA]
strh r0, [r4, 0xC]
strh r0, [r4, 0xE]
movs r0, 0x3
strh r0, [r4, 0x20]
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
bne _08105850
ldr r0, =0x0000ffff
strh r0, [r4, 0x22]
movs r0, 0x8
b _08105856
.pool
_08105850:
movs r0, 0x1
strh r0, [r4, 0x22]
ldr r0, =0x0000fff8
_08105856:
strh r0, [r4, 0x24]
movs r0, 0x1
bl GetAnimBattlerSpriteId
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x26]
ldr r0, =sub_8105878
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105810
thumb_func_start sub_8105878
sub_8105878: @ 8105878
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r3, r0, r1
movs r0, 0x8
ldrsh r4, [r3, r0]
cmp r4, 0x1
beq _081058CC
cmp r4, 0x1
bgt _081058A0
cmp r4, 0
beq _081058AA
b _08105992
.pool
_081058A0:
cmp r4, 0x2
beq _08105948
cmp r4, 0x3
beq _08105962
b _08105992
_081058AA:
ldr r2, =gSprites
movs r0, 0x26
ldrsh r1, [r3, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r3, 0x24]
ldrh r2, [r0, 0x24]
adds r1, r2
strh r1, [r0, 0x24]
strh r4, [r3, 0xA]
strh r4, [r3, 0xC]
strh r4, [r3, 0xE]
b _0810595A
.pool
_081058CC:
ldrh r0, [r3, 0xA]
adds r0, 0x1
strh r0, [r3, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _08105992
movs r0, 0
strh r0, [r3, 0xA]
ldrh r0, [r3, 0xC]
adds r0, 0x1
strh r0, [r3, 0xC]
ands r0, r4
lsls r0, 16
cmp r0, 0
beq _08105904
ldr r2, =gSprites
movs r4, 0x26
ldrsh r1, [r3, r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r0, 0x24]
adds r1, 0x6
b _08105916
.pool
_08105904:
ldr r2, =gSprites
movs r0, 0x26
ldrsh r1, [r3, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r0, 0x24]
subs r1, 0x6
_08105916:
strh r1, [r0, 0x24]
ldrh r0, [r3, 0xE]
adds r0, 0x1
strh r0, [r3, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
ble _08105992
ldrh r1, [r3, 0xC]
movs r0, 0x1
ands r0, r1
cmp r0, 0
beq _0810595A
movs r1, 0x26
ldrsh r0, [r3, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r2
ldrh r0, [r1, 0x24]
subs r0, 0x6
strh r0, [r1, 0x24]
b _0810595A
.pool
_08105948:
ldrh r0, [r3, 0x20]
subs r0, 0x1
strh r0, [r3, 0x20]
lsls r0, 16
cmp r0, 0
beq _0810595A
movs r0, 0
strh r0, [r3, 0x8]
b _08105992
_0810595A:
ldrh r0, [r3, 0x8]
adds r0, 0x1
strh r0, [r3, 0x8]
b _08105992
_08105962:
ldr r2, =gSprites
movs r4, 0x26
ldrsh r1, [r3, r4]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrh r1, [r3, 0x22]
ldrh r4, [r0, 0x24]
adds r1, r4
strh r1, [r0, 0x24]
movs r0, 0x26
ldrsh r1, [r3, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0x24
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08105992
adds r0, r5, 0
bl DestroyAnimVisualTask
_08105992:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105878
thumb_func_start sub_810599C
sub_810599C: @ 810599C
push {r4,lr}
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
movs r0, 0
strh r0, [r4, 0x8]
strh r0, [r4, 0xA]
strh r0, [r4, 0xC]
strh r0, [r4, 0xE]
movs r0, 0x1
strh r0, [r4, 0x10]
movs r0, 0xE
strh r0, [r4, 0x22]
movs r0, 0x2
strh r0, [r4, 0x24]
movs r0, 0
bl GetAnimBattlerSpriteId
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x26]
ldr r0, =sub_81059E0
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810599C
thumb_func_start sub_81059E0
sub_81059E0: @ 81059E0
push {r4-r6,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
movs r0, 0x8
ldrsh r2, [r4, r0]
cmp r2, 0
bne _08105AA6
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
lsls r0, 16
asrs r0, 16
movs r3, 0x10
ldrsh r1, [r4, r3]
cmp r0, r1
ble _08105AA6
strh r2, [r4, 0xA]
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _08105A3C
ldr r3, =gSprites
movs r6, 0x26
ldrsh r1, [r4, r6]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
adds r0, 0x3E
ldrb r2, [r0]
movs r1, 0x5
negs r1, r1
ands r1, r2
b _08105A52
.pool
_08105A3C:
ldr r3, =gSprites
movs r0, 0x26
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
adds r0, 0x3E
ldrb r1, [r0]
movs r2, 0x4
orrs r1, r2
_08105A52:
strb r1, [r0]
ldrh r0, [r4, 0xE]
adds r0, 0x1
movs r2, 0
strh r0, [r4, 0xE]
lsls r0, 16
asrs r0, 16
movs r6, 0x22
ldrsh r1, [r4, r6]
cmp r0, r1
blt _08105AA6
ldrh r0, [r4, 0x10]
adds r0, 0x1
strh r0, [r4, 0x10]
lsls r0, 16
asrs r0, 16
movs r6, 0x24
ldrsh r1, [r4, r6]
cmp r0, r1
bge _08105A88
strh r2, [r4, 0xA]
strh r2, [r4, 0xC]
strh r2, [r4, 0xE]
b _08105AA6
.pool
_08105A88:
movs r0, 0x26
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r3
adds r0, 0x3E
ldrb r2, [r0]
movs r1, 0x5
negs r1, r1
ands r1, r2
strb r1, [r0]
adds r0, r5, 0
bl DestroyAnimVisualTask
_08105AA6:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_81059E0
thumb_func_start sub_8105AAC
sub_8105AAC: @ 8105AAC
push {r4,r5,lr}
lsls r0, 24
lsrs r0, 24
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
movs r0, 0
strh r0, [r4, 0x8]
movs r1, 0x4
strh r1, [r4, 0xA]
strh r0, [r4, 0xC]
strh r0, [r4, 0xE]
strh r0, [r4, 0x10]
strh r0, [r4, 0x12]
strh r0, [r4, 0x14]
strh r0, [r4, 0x16]
strh r0, [r4, 0x18]
strh r0, [r4, 0x22]
ldr r5, =gBattleAnimAttacker
ldrb r0, [r5]
movs r1, 0
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x24]
ldrb r0, [r5]
movs r1, 0x1
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x26]
ldr r0, =sub_8105B08
str r0, [r4]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105AAC
thumb_func_start sub_8105B08
sub_8105B08: @ 8105B08
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
ldr r1, =gTasks
adds r4, r0, r1
movs r0, 0x18
ldrsh r2, [r4, r0]
cmp r2, 0x1
beq _08105B74
cmp r2, 0x1
bgt _08105B30
cmp r2, 0
beq _08105B36
b _08105B90
.pool
_08105B30:
cmp r2, 0x2
beq _08105B8C
b _08105B90
_08105B36:
ldrh r0, [r4, 0x10]
adds r0, 0x1
strh r0, [r4, 0x10]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
ble _08105B90
strh r2, [r4, 0x10]
ldrh r0, [r4, 0x12]
adds r0, 0x1
movs r1, 0x1
ands r0, r1
strh r0, [r4, 0x12]
ldrh r0, [r4, 0x14]
adds r0, 0x1
strh r0, [r4, 0x14]
lsls r0, 16
asrs r0, 16
cmp r0, 0x14
ble _08105B90
movs r1, 0x16
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08105B6E
strh r2, [r4, 0x14]
movs r0, 0x1
strh r0, [r4, 0x18]
b _08105B90
_08105B6E:
movs r0, 0x2
strh r0, [r4, 0x18]
b _08105B90
_08105B74:
movs r1, 0
strh r1, [r4, 0x12]
ldrh r0, [r4, 0x10]
adds r0, 0x1
strh r0, [r4, 0x10]
lsls r0, 16
asrs r0, 16
cmp r0, 0x14
ble _08105B90
strh r2, [r4, 0x16]
strh r1, [r4, 0x18]
b _08105B90
_08105B8C:
movs r0, 0x1
strh r0, [r4, 0x12]
_08105B90:
movs r2, 0x8
ldrsh r5, [r4, r2]
cmp r5, 0
beq _08105B9E
cmp r5, 0x1
beq _08105C34
b _08105C42
_08105B9E:
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
ble _08105C42
strh r5, [r4, 0xA]
ldr r0, =gUnknown_085938DC
movs r3, 0x24
ldrsh r1, [r4, r3]
movs r3, 0x26
ldrsh r2, [r4, r3]
movs r3, 0
bl CreateSprite
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0x40
beq _08105C42
ldr r0, =gSprites
lsls r1, r2, 4
adds r1, r2
lsls r1, 2
adds r1, r0
strh r6, [r1, 0x2E]
movs r0, 0xD
strh r0, [r1, 0x30]
ldr r2, =gUnknown_085938F4
movs r3, 0xC
ldrsh r0, [r4, r3]
lsls r0, 1
adds r0, r2
ldrb r0, [r0]
lsls r0, 24
asrs r0, 24
strh r0, [r1, 0x24]
movs r3, 0xC
ldrsh r0, [r4, r3]
lsls r0, 1
adds r2, 0x1
adds r0, r2
ldrb r0, [r0]
lsls r0, 24
asrs r0, 24
strh r0, [r1, 0x26]
ldrh r0, [r4, 0x22]
adds r0, 0x1
strh r0, [r4, 0x22]
ldrh r0, [r4, 0xC]
adds r0, 0x1
strh r0, [r4, 0xC]
lsls r0, 16
asrs r0, 16
cmp r0, 0x3
ble _08105C42
strh r5, [r4, 0xC]
ldrh r0, [r4, 0xE]
adds r0, 0x1
strh r0, [r4, 0xE]
lsls r0, 16
asrs r0, 16
cmp r0, 0x5
ble _08105C42
ldrh r0, [r4, 0x8]
adds r0, 0x1
strh r0, [r4, 0x8]
b _08105C42
.pool
_08105C34:
movs r1, 0x22
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08105C42
adds r0, r6, 0
bl DestroyAnimVisualTask
_08105C42:
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8105B08
thumb_func_start sub_8105C48
sub_8105C48: @ 8105C48
push {r4,lr}
adds r3, r0, 0
ldr r4, =gTasks
movs r0, 0x2E
ldrsh r1, [r3, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r4
movs r1, 0x3E
adds r1, r3
mov r12, r1
movs r2, 0x1
ldrb r1, [r0, 0x12]
ands r1, r2
lsls r1, 2
mov r0, r12
ldrb r2, [r0]
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
mov r1, r12
strb r0, [r1]
adds r0, r3, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08105CAA
movs r0, 0x30
ldrsh r1, [r3, r0]
lsls r1, 1
movs r0, 0x2E
ldrsh r2, [r3, r0]
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r1, r0
adds r0, r4, 0
adds r0, 0x8
adds r1, r0
ldrh r0, [r1]
subs r0, 0x1
strh r0, [r1]
adds r0, r3, 0
bl DestroySprite
_08105CAA:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105C48
thumb_func_start sub_8105CB4
sub_8105CB4: @ 8105CB4
push {r4-r6,lr}
sub sp, 0x4
lsls r0, 24
lsrs r6, r0, 24
ldr r0, =0x000027de
bl IndexOfSpritePaletteTag
mov r1, sp
strb r0, [r1]
movs r4, 0x1
ldr r0, =0x00002710
adds r5, r0, 0
_08105CCC:
subs r0, r5, r4
lsls r0, 16
lsrs r0, 16
bl AllocSpritePalette
mov r2, sp
adds r1, r2, r4
strb r0, [r1]
adds r4, 0x1
cmp r4, 0x2
ble _08105CCC
movs r0, 0x80
lsls r0, 6
bl AllocZeroed
adds r1, r0, 0
ldr r0, =gMonSpritesGfxPtr
ldr r0, [r0]
movs r2, 0xBE
lsls r2, 1
adds r0, r2
str r1, [r0]
ldr r0, =gBattleAnimSpritePalette_206
bl LZDecompressWram
movs r4, 0
_08105D00:
ldr r5, =gMonSpritesGfxPtr
ldr r0, [r5]
movs r1, 0xBE
lsls r1, 1
adds r0, r1
lsls r1, r4, 6
ldr r0, [r0]
adds r0, r1
mov r2, sp
adds r1, r2, r4
ldrb r1, [r1]
lsls r1, 20
movs r2, 0x80
lsls r2, 17
adds r1, r2
lsrs r1, 16
movs r2, 0x20
bl LoadPalette
adds r4, 0x1
cmp r4, 0x2
ble _08105D00
ldr r0, [r5]
movs r4, 0xBE
lsls r4, 1
adds r0, r4
ldr r0, [r0]
bl Free
ldr r0, [r5]
adds r0, r4
movs r1, 0
str r1, [r0]
adds r0, r6, 0
bl DestroyAnimVisualTask
add sp, 0x4
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105CB4
thumb_func_start sub_8105D60
sub_8105D60: @ 8105D60
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
ldr r5, =gUnknown_08593950
movs r4, 0x2
_08105D6A:
ldrh r0, [r5]
bl FreeSpritePaletteByTag
adds r5, 0x2
subs r4, 0x1
cmp r4, 0
bge _08105D6A
adds r0, r6, 0
bl DestroyAnimVisualTask
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105D60
thumb_func_start sub_8105D88
sub_8105D88: @ 8105D88
push {r4,r5,lr}
adds r5, r0, 0
lsls r1, 24
lsls r2, 24
lsrs r3, r2, 24
movs r0, 0x1
ands r3, r0
negs r0, r3
orrs r0, r3
asrs r0, 31
movs r3, 0x20
ands r0, r3
ldrh r4, [r5, 0x4]
lsls r3, r4, 22
lsrs r3, 22
lsrs r1, 22
adds r0, r1
adds r3, r0
ldr r1, =0x000003ff
adds r0, r1, 0
ands r3, r0
ldr r0, =0xfffffc00
ands r0, r4
orrs r0, r3
strh r0, [r5, 0x4]
ldr r0, =gUnknown_08593950
lsrs r2, 25
lsls r2, 1
adds r2, r0
ldrh r0, [r2]
bl IndexOfSpritePaletteTag
lsls r0, 4
ldrb r2, [r5, 0x5]
movs r1, 0xF
ands r1, r2
orrs r1, r0
strb r1, [r5, 0x5]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105D88
thumb_func_start sub_8105DE8
sub_8105DE8: @ 8105DE8
push {r4-r6,lr}
adds r5, r0, 0
movs r1, 0
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r6, =gBattleAnimAttacker
ldrb r0, [r6]
bl GetBattlerSide
lsls r0, 24
cmp r0, 0
beq _08105E08
ldr r1, =gBattleAnimArgs
ldrh r0, [r1, 0x4]
negs r0, r0
strh r0, [r1, 0x4]
_08105E08:
ldr r4, =gBattleAnimArgs
ldrh r0, [r4, 0x8]
strh r0, [r5, 0x2E]
ldrb r0, [r6]
movs r1, 0
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
ldrh r1, [r4, 0x4]
adds r0, r1
strh r0, [r5, 0x32]
ldrb r0, [r6]
movs r1, 0x1
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
ldrh r1, [r4, 0x6]
adds r0, r1
strh r0, [r5, 0x36]
2018-11-26 00:00:18 +01:00
ldr r0, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r0, [r5, 0x1C]
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
ldrb r1, [r4, 0xA]
ldrb r2, [r4, 0xC]
adds r0, r5, 0
bl sub_8105D88
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105DE8
thumb_func_start sub_8105E60
sub_8105E60: @ 8105E60
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
bne _08105E7A
adds r0, r4, 0
movs r1, 0
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
_08105E7A:
movs r1, 0x30
ldrsh r0, [r4, r1]
movs r1, 0x8
bl Sin
strh r0, [r4, 0x24]
ldrh r2, [r4, 0x32]
lsls r0, r2, 16
asrs r0, 24
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x30]
adds r0, 0x7
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x30]
subs r2, 0x80
strh r2, [r4, 0x32]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0x3C
bne _08105EAA
adds r0, r4, 0
bl DestroyAnimSprite
_08105EAA:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8105E60
thumb_func_start sub_8105EB0
sub_8105EB0: @ 8105EB0
push {r4-r7,lr}
lsls r0, 24
lsrs r7, r0, 24
bl IsContest
lsls r0, 24
movs r6, 0xF0
cmp r0, 0
beq _08105EC4
movs r6, 0x98
_08105EC4:
movs r5, 0
ldr r1, =gBattle_WIN0H
strh r6, [r1]
ldr r4, =gBattle_WIN0V
movs r0, 0xA0
strh r0, [r4]
ldrh r1, [r1]
movs r0, 0x40
bl SetGpuReg
ldrh r1, [r4]
movs r0, 0x44
bl SetGpuReg
ldr r1, =0x00003f1f
movs r0, 0x48
bl SetGpuReg
ldr r1, =0x00003f3f
movs r0, 0x4A
bl SetGpuReg
movs r0, 0x50
movs r1, 0xC8
bl SetGpuReg
movs r0, 0x54
movs r1, 0x10
bl SetGpuReg
ldr r1, =gTasks
lsls r0, r7, 2
adds r0, r7
lsls r0, 3
adds r0, r1
strh r5, [r0, 0x8]
strh r6, [r0, 0xA]
ldr r1, =sub_8105F30
str r1, [r0]
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105EB0
thumb_func_start sub_8105F30
sub_8105F30: @ 8105F30
push {r4,lr}
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r3, r1, r2
ldrh r0, [r3, 0x8]
adds r4, r0, 0
adds r4, 0xD
strh r4, [r3, 0x8]
ldrh r0, [r3, 0xA]
adds r2, r0, 0
subs r2, 0xD
strh r2, [r3, 0xA]
lsls r1, r4, 16
lsls r0, r2, 16
cmp r1, r0
blt _08105F70
ldr r0, =gBattle_WIN0H
movs r1, 0
strh r1, [r0]
ldr r0, =sub_8105F84
str r0, [r3]
b _08105F78
.pool
_08105F70:
ldr r1, =gBattle_WIN0H
lsls r0, r4, 8
orrs r2, r0
strh r2, [r1]
_08105F78:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105F30
thumb_func_start sub_8105F84
sub_8105F84: @ 8105F84
push {r4,r5,lr}
sub sp, 0xC
lsls r0, 24
lsrs r0, 24
adds r5, r0, 0
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r1, r0, r1
ldrh r0, [r1, 0x1C]
adds r0, 0x1
movs r4, 0
strh r0, [r1, 0x1C]
lsls r0, 16
asrs r0, 16
cmp r0, 0x5
bne _08105FD8
movs r0, 0x88
strh r0, [r1, 0x1E]
movs r0, 0x50
movs r1, 0x88
bl SetGpuReg
str r4, [sp]
str r4, [sp, 0x4]
str r4, [sp, 0x8]
movs r0, 0x1
movs r1, 0
movs r2, 0
movs r3, 0
bl sub_80A75AC
ldr r2, =0x00007fff
movs r1, 0x10
bl BlendPalettes
b _0810600C
.pool
_08105FD8:
cmp r0, 0x4
ble _0810600C
ldr r0, =gBattle_WIN0H
strh r4, [r0]
ldr r0, =gBattle_WIN0V
strh r4, [r0]
ldr r4, =0x00003f3f
movs r0, 0x48
adds r1, r4, 0
bl SetGpuReg
movs r0, 0x4A
adds r1, r4, 0
bl SetGpuReg
movs r0, 0x50
movs r1, 0
bl SetGpuReg
movs r0, 0x54
movs r1, 0
bl SetGpuReg
adds r0, r5, 0
bl DestroyAnimVisualTask
_0810600C:
add sp, 0xC
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8105F84
thumb_func_start sub_8106020
sub_8106020: @ 8106020
push {r4-r6,lr}
lsls r0, 24
lsrs r0, 24
adds r6, r0, 0
movs r0, 0x1
bl GetAnimBattlerSpriteId
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gTasks
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r5, r0, r1
ldrh r0, [r5, 0x8]
adds r0, 0x1
strh r0, [r5, 0x8]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
bne _0810607C
movs r0, 0x1
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
ldr r2, =gUnknown_08593988
adds r0, r5, 0
bl sub_80A7CFC
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r0, r1
movs r1, 0x4
strh r1, [r0, 0x24]
b _081060A4
.pool
_0810607C:
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r4, r0, r1
ldrh r0, [r4, 0x24]
negs r0, r0
strh r0, [r4, 0x24]
adds r0, r5, 0
bl sub_80A7D34
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _081060A4
strh r0, [r4, 0x24]
strh r0, [r4, 0x26]
adds r0, r6, 0
bl DestroyAnimVisualTask
_081060A4:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106020
thumb_func_start sub_81060B0
sub_81060B0: @ 81060B0
push {r4-r6,lr}
lsls r0, 24
lsrs r0, 24
adds r6, r0, 0
movs r0, 0
bl GetAnimBattlerSpriteId
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gTasks
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r5, r0, r1
ldrh r0, [r5, 0x8]
adds r0, 0x1
strh r0, [r5, 0x8]
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
bne _0810610C
movs r0, 0
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
ldr r2, =gUnknown_08593988
adds r0, r5, 0
bl sub_80A7CFC
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r0, r1
movs r1, 0x4
strh r1, [r0, 0x24]
b _08106134
.pool
_0810610C:
ldr r1, =gSprites
lsls r0, r4, 4
adds r0, r4
lsls r0, 2
adds r4, r0, r1
ldrh r0, [r4, 0x24]
negs r0, r0
strh r0, [r4, 0x24]
adds r0, r5, 0
bl sub_80A7D34
lsls r0, 24
lsrs r0, 24
cmp r0, 0
bne _08106134
strh r0, [r4, 0x24]
strh r0, [r4, 0x26]
adds r0, r6, 0
bl DestroyAnimVisualTask
_08106134:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_81060B0
thumb_func_start sub_8106140
sub_8106140: @ 8106140
push {r4,r5,lr}
adds r4, r0, 0
movs r1, 0x1
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
movs r0, 0x5F
strh r0, [r4, 0x2E]
ldrh r0, [r4, 0x20]
strh r0, [r4, 0x30]
ldr r5, =gBattleAnimTarget
ldrb r0, [r5]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x32]
ldrh r0, [r4, 0x22]
strh r0, [r4, 0x34]
ldrb r0, [r5]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x36]
adds r0, r4, 0
bl InitAnimLinearTranslation
ldr r0, =sub_810618C
str r0, [r4, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106140
thumb_func_start sub_810618C
sub_810618C: @ 810618C
push {r4,lr}
adds r4, r0, 0
bl TranslateAnimLinear
lsls r0, 24
cmp r0, 0
bne _081061B6
movs r1, 0x38
ldrsh r0, [r4, r1]
movs r1, 0xE
bl Sin
ldrh r1, [r4, 0x26]
adds r0, r1
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x38]
adds r0, 0x4
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x38]
b _081061BC
_081061B6:
adds r0, r4, 0
bl DestroyAnimSprite
_081061BC:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_810618C
thumb_func_start sub_81061C4
sub_81061C4: @ 81061C4
push {r4,lr}
adds r4, r0, 0
ldrh r2, [r4, 0x2E]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _081061E8
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
strh r0, [r4, 0x30]
ldrh r0, [r1, 0x2]
strh r0, [r4, 0x32]
adds r0, r2, 0x1
strh r0, [r4, 0x2E]
b _08106244
.pool
_081061E8:
ldrh r0, [r4, 0x30]
ldrh r2, [r4, 0x36]
adds r0, r2
strh r0, [r4, 0x36]
lsls r0, 16
asrs r0, 24
strh r0, [r4, 0x24]
movs r1, 0x34
ldrsh r0, [r4, r1]
movs r2, 0x32
ldrsh r1, [r4, r2]
bl Sin
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x34]
adds r0, 0x3
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x34]
cmp r0, 0x64
ble _08106236
movs r0, 0x34
ldrsh r1, [r4, r0]
lsrs r0, r1, 31
adds r0, r1, r0
asrs r0, 1
lsls r0, 1
subs r1, r0
adds r3, r4, 0
adds r3, 0x3E
movs r0, 0x1
ands r1, r0
lsls r1, 2
ldrb r2, [r3]
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
_08106236:
movs r1, 0x34
ldrsh r0, [r4, r1]
cmp r0, 0x78
ble _08106244
adds r0, r4, 0
bl DestroyAnimSprite
_08106244:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_81061C4
thumb_func_start sub_810624C
sub_810624C: @ 810624C
push {lr}
ldr r2, =gBattleAnimArgs
ldrh r1, [r2]
strh r1, [r0, 0x20]
movs r1, 0xA0
strh r1, [r0, 0x22]
ldrh r1, [r2, 0x4]
strh r1, [r0, 0x2E]
ldrh r1, [r2, 0x2]
strh r1, [r0, 0x30]
ldr r1, =sub_80A64B0
str r1, [r0, 0x1C]
ldr r1, =sub_810627C
bl StoreSpriteCallbackInData6
pop {r0}
bx r0
.pool
thumb_func_end sub_810624C
thumb_func_start sub_810627C
sub_810627C: @ 810627C
push {r4,r5,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x30]
ldrh r1, [r4, 0x32]
adds r0, r1
strh r0, [r4, 0x32]
lsls r0, 16
lsrs r0, 24
negs r0, r0
strh r0, [r4, 0x26]
movs r1, 0x34
ldrsh r0, [r4, r1]
movs r1, 0x4
bl Sin
strh r0, [r4, 0x24]
ldrh r0, [r4, 0x34]
adds r0, 0x3
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x34]
ldrh r0, [r4, 0x26]
ldrh r1, [r4, 0x22]
adds r0, r1
lsls r0, 16
asrs r5, r0, 16
cmp r5, 0x48
bgt _081062E2
movs r0, 0x34
ldrsh r1, [r4, r0]
lsrs r0, r1, 31
adds r0, r1, r0
asrs r0, 1
lsls r0, 1
subs r1, r0
adds r3, r4, 0
adds r3, 0x3E
movs r0, 0x1
ands r1, r0
lsls r1, 2
ldrb r2, [r3]
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
cmp r5, 0x40
bgt _081062E2
adds r0, r4, 0
bl DestroyAnimSprite
_081062E2:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_810627C
thumb_func_start sub_81062E8
sub_81062E8: @ 81062E8
push {r4,r5,lr}
sub sp, 0x10
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =0x00003f42
movs r0, 0x50
bl SetGpuReg
movs r1, 0x80
lsls r1, 5
movs r0, 0x52
bl SetGpuReg
movs r0, 0x1
movs r1, 0x4
movs r2, 0x3
bl SetAnimBgAttribute
movs r0, 0x1
movs r1, 0
movs r2, 0
bl SetAnimBgAttribute
bl IsContest
lsls r0, 24
cmp r0, 0
bne _0810632A
movs r0, 0x1
movs r1, 0x3
movs r2, 0x1
bl SetAnimBgAttribute
_0810632A:
ldr r0, =gBattle_BG1_X
movs r1, 0
strh r1, [r0]
ldr r4, =gBattle_BG1_Y
strh r1, [r4]
movs r0, 0x14
movs r1, 0
bl SetGpuReg
ldrh r1, [r4]
movs r0, 0x16
bl SetGpuReg
mov r0, sp
bl sub_80A6B30
mov r0, sp
ldrb r0, [r0, 0x9]
ldr r1, =gUnknown_08C232E0
mov r2, sp
ldrh r2, [r2, 0xA]
bl sub_80A6CC0
ldr r1, =gUnknown_08C23D78
mov r0, sp
movs r2, 0
bl sub_80A6D60
ldr r0, =gUnknown_08C23D50
mov r1, sp
ldrb r1, [r1, 0x8]
lsls r1, 4
movs r2, 0x20
bl LoadCompressedPalette
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
ldr r1, =sub_81063A8
str r1, [r0]
add sp, 0x10
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81062E8
thumb_func_start sub_81063A8
sub_81063A8: @ 81063A8
push {r4,r5,lr}
sub sp, 0x10
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
movs r2, 0x20
ldrsh r0, [r0, r2]
adds r2, r1, 0
cmp r0, 0x4
bls _081063C6
b _081064F0
_081063C6:
lsls r0, 2
ldr r1, =_081063D8
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_081063D8:
.4byte _081063EC
.4byte _08106430
.4byte _08106452
.4byte _08106496
.4byte _081064BC
_081063EC:
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r4, r0, r2
ldrh r0, [r4, 0x1C]
adds r0, 0x1
movs r5, 0
strh r0, [r4, 0x1C]
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
bne _081064F0
strh r5, [r4, 0x1C]
ldrh r1, [r4, 0x1E]
adds r1, 0x1
strh r1, [r4, 0x1E]
movs r0, 0x10
subs r0, r1
lsls r0, 8
orrs r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
bl SetGpuReg
movs r1, 0x1E
ldrsh r0, [r4, r1]
cmp r0, 0x10
bne _081064F0
ldrh r0, [r4, 0x20]
adds r0, 0x1
strh r0, [r4, 0x20]
strh r5, [r4, 0x1E]
b _081064F0
_08106430:
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r1, r0, r2
ldrh r0, [r1, 0x1E]
adds r0, 0x1
strh r0, [r1, 0x1E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x8D
bne _081064F0
movs r0, 0x10
strh r0, [r1, 0x1E]
ldrh r0, [r1, 0x20]
adds r0, 0x1
strh r0, [r1, 0x20]
b _081064F0
_08106452:
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r4, r0, r2
ldrh r0, [r4, 0x1C]
adds r0, 0x1
strh r0, [r4, 0x1C]
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
bne _081064F0
movs r0, 0
strh r0, [r4, 0x1C]
ldrh r1, [r4, 0x1E]
subs r1, 0x1
strh r1, [r4, 0x1E]
movs r0, 0x10
subs r0, r1
lsls r0, 8
orrs r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
bl SetGpuReg
movs r2, 0x1E
ldrsh r1, [r4, r2]
cmp r1, 0
bne _081064F0
ldrh r0, [r4, 0x20]
adds r0, 0x1
strh r0, [r4, 0x20]
strh r1, [r4, 0x1E]
b _081064F0
_08106496:
mov r0, sp
bl sub_80A6B30
mov r0, sp
ldrb r0, [r0, 0x9]
bl sub_80A6C68
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldrh r1, [r0, 0x20]
adds r1, 0x1
strh r1, [r0, 0x20]
b _081064F0
.pool
_081064BC:
bl IsContest
lsls r0, 24
cmp r0, 0
bne _081064D0
movs r0, 0x1
movs r1, 0x3
movs r2, 0
bl SetAnimBgAttribute
_081064D0:
movs r0, 0x50
movs r1, 0
bl SetGpuReg
movs r0, 0x52
movs r1, 0
bl SetGpuReg
movs r0, 0x1
movs r1, 0x4
movs r2, 0x1
bl SetAnimBgAttribute
adds r0, r4, 0
bl DestroyAnimVisualTask
_081064F0:
add sp, 0x10
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_81063A8
thumb_func_start sub_81064F8
sub_81064F8: @ 81064F8
push {r4,r5,lr}
sub sp, 0x10
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =0x00003f42
movs r0, 0x50
bl SetGpuReg
movs r1, 0x80
lsls r1, 5
movs r0, 0x52
bl SetGpuReg
movs r0, 0x1
movs r1, 0x4
movs r2, 0x1
bl SetAnimBgAttribute
movs r0, 0x1
movs r1, 0
movs r2, 0
bl SetAnimBgAttribute
bl IsContest
lsls r0, 24
cmp r0, 0
bne _0810653A
movs r0, 0x1
movs r1, 0x3
movs r2, 0x1
bl SetAnimBgAttribute
_0810653A:
ldr r0, =gBattle_BG1_X
movs r1, 0
strh r1, [r0]
ldr r4, =gBattle_BG1_Y
strh r1, [r4]
movs r0, 0x14
movs r1, 0
bl SetGpuReg
ldrh r1, [r4]
movs r0, 0x16
bl SetGpuReg
mov r0, sp
bl sub_80A6B30
bl IsContest
lsls r0, 24
cmp r0, 0
beq _08106578
ldr r1, =gBattleAnimBackgroundTilemap_ScaryFaceContest
b _0810658A
.pool
_08106578:
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
bl GetBattlerSide
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _0810659C
ldr r1, =gBattleAnimBackgroundTilemap_ScaryFacePlayer
_0810658A:
mov r0, sp
movs r2, 0
bl sub_80A6D60
b _081065A6
.pool
_0810659C:
ldr r1, =gBattleAnimBackgroundTilemap_ScaryFaceOpponent
mov r0, sp
movs r2, 0
bl sub_80A6D60
_081065A6:
mov r0, sp
ldrb r0, [r0, 0x9]
ldr r1, =gUnknown_08C249F8
mov r2, sp
ldrh r2, [r2, 0xA]
bl sub_80A6CC0
ldr r0, =gUnknown_08C249D0
mov r1, sp
ldrb r1, [r1, 0x8]
lsls r1, 4
movs r2, 0x20
bl LoadCompressedPalette
ldr r1, =gTasks
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
ldr r1, =sub_81065EC
str r1, [r0]
add sp, 0x10
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81064F8
thumb_func_start sub_81065EC
sub_81065EC: @ 81065EC
push {r4,r5,lr}
sub sp, 0x10
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gTasks
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
movs r2, 0x20
ldrsh r0, [r0, r2]
adds r2, r1, 0
cmp r0, 0x4
bls _0810660A
b _08106730
_0810660A:
lsls r0, 2
ldr r1, =_0810661C
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
_0810661C:
.4byte _08106630
.4byte _08106674
.4byte _08106696
.4byte _081066DA
.4byte _081066FC
_08106630:
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r4, r0, r2
ldrh r0, [r4, 0x1C]
adds r0, 0x1
movs r5, 0
strh r0, [r4, 0x1C]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2
bne _08106730
strh r5, [r4, 0x1C]
ldrh r1, [r4, 0x1E]
adds r1, 0x1
strh r1, [r4, 0x1E]
movs r0, 0x10
subs r0, r1
lsls r0, 8
orrs r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
bl SetGpuReg
movs r1, 0x1E
ldrsh r0, [r4, r1]
cmp r0, 0xE
bne _08106730
ldrh r0, [r4, 0x20]
adds r0, 0x1
strh r0, [r4, 0x20]
strh r5, [r4, 0x1E]
b _08106730
_08106674:
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r1, r0, r2
ldrh r0, [r1, 0x1E]
adds r0, 0x1
strh r0, [r1, 0x1E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x15
bne _08106730
movs r0, 0xE
strh r0, [r1, 0x1E]
ldrh r0, [r1, 0x20]
adds r0, 0x1
strh r0, [r1, 0x20]
b _08106730
_08106696:
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r4, r0, r2
ldrh r0, [r4, 0x1C]
adds r0, 0x1
strh r0, [r4, 0x1C]
lsls r0, 16
asrs r0, 16
cmp r0, 0x2
bne _08106730
movs r0, 0
strh r0, [r4, 0x1C]
ldrh r1, [r4, 0x1E]
subs r1, 0x1
strh r1, [r4, 0x1E]
movs r0, 0x10
subs r0, r1
lsls r0, 8
orrs r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
bl SetGpuReg
movs r2, 0x1E
ldrsh r1, [r4, r2]
cmp r1, 0
bne _08106730
ldrh r0, [r4, 0x20]
adds r0, 0x1
strh r0, [r4, 0x20]
strh r1, [r4, 0x1E]
b _08106730
_081066DA:
mov r0, sp
bl sub_80A6B30
movs r0, 0x1
bl sub_80A6C68
movs r0, 0x2
bl sub_80A6C68
ldr r0, =gTasks
lsls r1, r4, 2
adds r1, r4
lsls r1, 3
adds r1, r0
ldrh r0, [r1, 0x20]
adds r0, 0x1
strh r0, [r1, 0x20]
_081066FC:
bl IsContest
lsls r0, 24
cmp r0, 0
bne _08106710
movs r0, 0x1
movs r1, 0x3
movs r2, 0
bl SetAnimBgAttribute
_08106710:
movs r0, 0x50
movs r1, 0
bl SetGpuReg
movs r0, 0x52
movs r1, 0
bl SetGpuReg
movs r0, 0x1
movs r1, 0x4
movs r2, 0x1
bl SetAnimBgAttribute
adds r0, r4, 0
bl DestroyAnimVisualTask
_08106730:
add sp, 0x10
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81065EC
thumb_func_start sub_810673C
sub_810673C: @ 810673C
push {r4,r5,lr}
adds r4, r0, 0
ldr r5, =gBattleAnimAttacker
ldrb r0, [r5]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x20]
ldrb r0, [r5]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x22]
adds r2, r4, 0
adds r2, 0x2C
ldrb r0, [r2]
movs r1, 0x80
orrs r0, r1
strb r0, [r2]
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
strh r0, [r4, 0x2E]
ldrh r0, [r1, 0x2]
strh r0, [r4, 0x30]
ldrb r0, [r5]
bl sub_80A82E4
lsls r0, 24
lsrs r0, 24
strh r0, [r4, 0x3C]
ldr r1, =sub_810679C
str r1, [r4, 0x1C]
adds r0, r4, 0
bl _call_via_r1
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_810673C
thumb_func_start sub_810679C
sub_810679C: @ 810679C
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x30]
subs r0, 0x40
lsls r0, 16
lsrs r0, 16
cmp r0, 0x7F
bhi _081067B2
ldrh r0, [r4, 0x3C]
adds r0, 0x1
b _081067B6
_081067B2:
ldrh r0, [r4, 0x3C]
subs r0, 0x1
_081067B6:
adds r1, r4, 0
adds r1, 0x43
strb r0, [r1]
movs r1, 0x30
ldrsh r0, [r4, r1]
ldrh r1, [r4, 0x32]
lsls r1, 16
asrs r1, 24
bl Sin
strh r0, [r4, 0x24]
movs r2, 0x30
ldrsh r0, [r4, r2]
ldrh r1, [r4, 0x34]
lsls r1, 16
asrs r1, 24
bl Cos
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x30]
adds r0, 0x9
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x30]
movs r3, 0x38
ldrsh r2, [r4, r3]
cmp r2, 0
beq _08106828
cmp r2, 0x1
bne _08106858
ldr r1, =0xfffffc00
adds r0, r1, 0
ldrh r2, [r4, 0x32]
adds r0, r2
strh r0, [r4, 0x32]
ldr r3, =0xffffff00
adds r0, r3, 0
ldrh r1, [r4, 0x34]
adds r0, r1
strh r0, [r4, 0x34]
ldrh r0, [r4, 0x36]
adds r0, 0x1
strh r0, [r4, 0x36]
lsls r0, 16
asrs r0, 16
movs r2, 0x2E
ldrsh r1, [r4, r2]
cmp r0, r1
bne _08106858
movs r0, 0x2
strh r0, [r4, 0x38]
b _08106868
.pool
_08106828:
movs r3, 0x80
lsls r3, 3
adds r0, r3, 0
ldrh r1, [r4, 0x32]
adds r0, r1
strh r0, [r4, 0x32]
movs r3, 0x80
lsls r3, 1
adds r0, r3, 0
ldrh r1, [r4, 0x34]
adds r0, r1
strh r0, [r4, 0x34]
ldrh r0, [r4, 0x36]
adds r0, 0x1
strh r0, [r4, 0x36]
lsls r0, 16
asrs r0, 16
movs r3, 0x2E
ldrsh r1, [r4, r3]
cmp r0, r1
bne _08106858
strh r2, [r4, 0x36]
movs r0, 0x1
strh r0, [r4, 0x38]
_08106858:
ldr r0, =gBattleAnimArgs
ldrh r1, [r0, 0xE]
ldr r0, =0x0000ffff
cmp r1, r0
bne _08106868
adds r0, r4, 0
bl DestroyAnimSprite
_08106868:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_810679C
thumb_func_start sub_8106878
sub_8106878: @ 8106878
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, =gBattleAnimAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldr r4, =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0xA
bl Sin
strh r0, [r5, 0x2E]
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0x7
bl Cos
strh r0, [r5, 0x30]
ldr r0, =sub_81068CC
str r0, [r5, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106878
thumb_func_start sub_81068CC
sub_81068CC: @ 81068CC
push {lr}
adds r2, r0, 0
ldrh r0, [r2, 0x2E]
ldrh r1, [r2, 0x24]
adds r0, r1
strh r0, [r2, 0x24]
ldrh r0, [r2, 0x30]
ldrh r3, [r2, 0x26]
adds r0, r3
strh r0, [r2, 0x26]
movs r1, 0x20
ldrsh r0, [r2, r1]
movs r3, 0x24
ldrsh r1, [r2, r3]
adds r0, r1
adds r0, 0x10
movs r1, 0x88
lsls r1, 1
cmp r0, r1
bhi _0810690A
movs r0, 0x22
ldrsh r1, [r2, r0]
movs r3, 0x26
ldrsh r0, [r2, r3]
adds r1, r0
cmp r1, 0xA0
bgt _0810690A
movs r0, 0x10
negs r0, r0
cmp r1, r0
bge _08106910
_0810690A:
adds r0, r2, 0
bl DestroyAnimSprite
_08106910:
pop {r0}
bx r0
thumb_func_end sub_81068CC
thumb_func_start sub_8106914
sub_8106914: @ 8106914
push {lr}
adds r2, r0, 0
ldrh r0, [r2, 0x2E]
ldrh r1, [r2, 0x24]
adds r0, r1
strh r0, [r2, 0x24]
ldrh r0, [r2, 0x30]
ldrh r3, [r2, 0x26]
adds r0, r3
strh r0, [r2, 0x26]
ldrh r0, [r2, 0x34]
adds r1, r0, 0x1
strh r1, [r2, 0x34]
lsls r0, 16
asrs r0, 16
movs r3, 0x32
ldrsh r1, [r2, r3]
cmp r0, r1
blt _08106940
adds r0, r2, 0
bl DestroyAnimSprite
_08106940:
pop {r0}
bx r0
thumb_func_end sub_8106914
thumb_func_start sub_8106944
sub_8106944: @ 8106944
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, =gBattleAnimAttacker
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldr r4, =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0xA
bl Sin
strh r0, [r5, 0x2E]
movs r1, 0
ldrsh r0, [r4, r1]
movs r1, 0x7
bl Cos
strh r0, [r5, 0x30]
ldrh r0, [r4, 0x2]
strh r0, [r5, 0x32]
ldr r0, =sub_8106914
str r0, [r5, 0x1C]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106944
thumb_func_start sub_810699C
sub_810699C: @ 810699C
push {lr}
adds r2, r0, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _081069B2
adds r0, r2, 0
bl DestroyAnimSprite
_081069B2:
pop {r0}
bx r0
thumb_func_end sub_810699C
thumb_func_start sub_81069B8
sub_81069B8: @ 81069B8
push {r4,lr}
adds r4, r0, 0
movs r1, 0x1
2018-11-26 00:00:18 +01:00
bl InitAnimSpritePos
2018-10-23 04:08:38 +02:00
ldr r0, =sub_810699C
str r0, [r4, 0x1C]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_81069B8
thumb_func_start sub_81069D0
sub_81069D0: @ 81069D0
push {r4,r5,lr}
adds r4, r0, 0
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _081069EE
ldr r0, =gBattleAnimArgs
ldrh r1, [r0]
ldrh r2, [r4, 0x20]
adds r1, r2
strh r1, [r4, 0x20]
ldrh r0, [r0, 0x2]
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x22]
_081069EE:
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
movs r2, 0x2E
ldrsh r1, [r4, r2]
lsls r0, r1, 2
adds r0, r1
lsls r5, r0, 1
movs r0, 0xFF
ands r5, r0
adds r0, r5, 0
movs r1, 0x50
bl Sin
lsls r0, 16
asrs r0, 24
strh r0, [r4, 0x24]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0x4F
bgt _08106A32
adds r0, r5, 0
movs r1, 0x50
bl Cos
movs r2, 0x2E
ldrsh r1, [r4, r2]
lsrs r2, r1, 31
adds r1, r2
asrs r1, 1
lsls r0, 16
asrs r0, 24
adds r1, r0
strh r1, [r4, 0x26]
_08106A32:
movs r0, 0x2E
ldrsh r2, [r4, r0]
cmp r2, 0x5A
ble _08106A50
ldrh r0, [r4, 0x32]
adds r0, 0x1
strh r0, [r4, 0x32]
movs r0, 0x32
ldrsh r1, [r4, r0]
lsrs r0, r1, 31
adds r1, r0
asrs r1, 1
ldrh r0, [r4, 0x24]
subs r0, r1
strh r0, [r4, 0x24]
_08106A50:
cmp r2, 0x64
ble _08106A5A
adds r0, r4, 0
bl DestroyAnimSprite
_08106A5A:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81069D0
thumb_func_start sub_8106A64
sub_8106A64: @ 8106A64
push {r4,lr}
adds r4, r0, 0
ldrh r0, [r4, 0x38]
adds r0, 0x1
strh r0, [r4, 0x38]
movs r1, 0x34
ldrsh r0, [r4, r1]
movs r1, 0x5
bl Sin
strh r0, [r4, 0x24]
movs r1, 0x38
ldrsh r0, [r4, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
strh r0, [r4, 0x26]
ldrh r0, [r4, 0x34]
adds r0, 0x3
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x34]
movs r1, 0x38
ldrsh r0, [r4, r1]
cmp r0, 0x14
ble _08106ABA
adds r1, r0, 0
lsrs r0, r1, 31
adds r0, r1, r0
asrs r0, 1
lsls r0, 1
subs r1, r0
adds r3, r4, 0
adds r3, 0x3E
movs r0, 0x1
ands r1, r0
lsls r1, 2
ldrb r2, [r3]
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
_08106ABA:
movs r1, 0x38
ldrsh r0, [r4, r1]
cmp r0, 0x1E
ble _08106AC8
adds r0, r4, 0
bl DestroyAnimSprite
_08106AC8:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8106A64
thumb_func_start sub_8106AD0
sub_8106AD0: @ 8106AD0
push {r4,r5,lr}
adds r4, r0, 0
ldrh r2, [r4, 0x2E]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08106AF4
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
strh r0, [r4, 0x30]
ldrh r0, [r1, 0x2]
strh r0, [r4, 0x32]
adds r0, r2, 0x1
strh r0, [r4, 0x2E]
b _08106B48
.pool
_08106AF4:
ldrh r0, [r4, 0x30]
ldrh r2, [r4, 0x36]
adds r0, r2
movs r5, 0
strh r0, [r4, 0x36]
lsls r0, 16
asrs r0, 24
strh r0, [r4, 0x24]
movs r1, 0x34
ldrsh r0, [r4, r1]
movs r2, 0x32
ldrsh r1, [r4, r2]
bl Sin
adds r2, r0, 0
strh r2, [r4, 0x26]
ldrh r0, [r4, 0x34]
adds r0, 0x3
movs r1, 0xFF
ands r0, r1
strh r0, [r4, 0x34]
cmp r0, 0x46
ble _08106B48
ldr r0, =sub_8106A64
str r0, [r4, 0x1C]
ldrh r0, [r4, 0x24]
ldrh r1, [r4, 0x20]
adds r0, r1
strh r0, [r4, 0x20]
ldrh r1, [r4, 0x22]
adds r0, r2, r1
strh r0, [r4, 0x22]
strh r5, [r4, 0x24]
strh r5, [r4, 0x26]
bl Random2
lsls r0, 16
lsrs r0, 16
movs r1, 0xB4
bl __umodsi3
strh r0, [r4, 0x34]
_08106B48:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106AD0
thumb_func_start sub_8106B54
sub_8106B54: @ 8106B54
push {r4,lr}
adds r4, r0, 0
movs r1, 0x34
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08106B8E
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
ldrh r2, [r4, 0x20]
adds r0, r2
strh r0, [r4, 0x20]
ldrh r0, [r1, 0x2]
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x22]
adds r0, r4, 0
movs r1, 0
bl StartSpriteAnim
ldr r0, =gBattleAnimTarget
ldrb r0, [r0]
bl sub_80A82E4
subs r0, 0x1
adds r1, r4, 0
adds r1, 0x43
strb r0, [r1]
movs r0, 0x1
strh r0, [r4, 0x32]
_08106B8E:
ldrh r0, [r4, 0x32]
ldrh r2, [r4, 0x2E]
adds r0, r2
strh r0, [r4, 0x2E]
movs r1, 0x2E
ldrsh r0, [r4, r1]
lsls r1, r0, 2
adds r0, r1, 0
cmp r1, 0
bge _08106BA4
adds r0, 0xFF
_08106BA4:
asrs r0, 8
lsls r0, 8
subs r0, r1, r0
strh r0, [r4, 0x30]
lsls r0, 16
cmp r0, 0
bge _08106BB6
movs r0, 0
strh r0, [r4, 0x30]
_08106BB6:
movs r0, 0x30
ldrsh r2, [r4, r0]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bge _08106BC4
adds r0, 0x3
_08106BC4:
asrs r0, 2
movs r1, 0x1E
subs r1, r0
adds r0, r2, 0
bl Cos
strh r0, [r4, 0x24]
movs r0, 0x30
ldrsh r2, [r4, r0]
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bge _08106BE0
adds r0, 0x7
_08106BE0:
asrs r0, 3
movs r1, 0xA
subs r1, r0
adds r0, r2, 0
bl Sin
strh r0, [r4, 0x26]
movs r2, 0x30
ldrsh r0, [r4, r2]
cmp r0, 0x80
ble _08106C04
ldrh r1, [r4, 0x32]
movs r2, 0x32
ldrsh r0, [r4, r2]
cmp r0, 0
ble _08106C04
ldr r0, =0x0000ffff
strh r0, [r4, 0x32]
_08106C04:
movs r1, 0x30
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08106C18
movs r2, 0x32
ldrsh r0, [r4, r2]
cmp r0, 0
bge _08106C18
movs r0, 0x1
strh r0, [r4, 0x32]
_08106C18:
ldrh r0, [r4, 0x34]
adds r1, r0, 0x1
strh r1, [r4, 0x34]
subs r0, 0x9
lsls r0, 16
lsrs r0, 16
cmp r0, 0x46
bls _08106C5C
movs r0, 0x2E
ldrsh r1, [r4, r0]
lsrs r0, r1, 31
adds r0, r1, r0
asrs r0, 1
lsls r0, 1
subs r1, r0
adds r3, r4, 0
adds r3, 0x3E
movs r0, 0x1
ands r1, r0
lsls r1, 2
ldrb r2, [r3]
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
b _08106C6A
.pool
_08106C5C:
adds r2, r4, 0
adds r2, 0x3E
ldrb r1, [r2]
movs r0, 0x5
negs r0, r0
ands r0, r1
strb r0, [r2]
_08106C6A:
movs r1, 0x34
ldrsh r0, [r4, r1]
cmp r0, 0x5A
ble _08106C78
adds r0, r4, 0
bl DestroyAnimSprite
_08106C78:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8106B54
thumb_func_start sub_8106C80
sub_8106C80: @ 8106C80
push {r4,lr}
adds r4, r0, 0
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08106CB4
ldr r1, =gBattleAnimArgs
ldrh r0, [r1]
ldrh r2, [r4, 0x20]
adds r0, r2
strh r0, [r4, 0x20]
ldrh r0, [r1, 0x2]
ldrh r2, [r4, 0x22]
adds r0, r2
strh r0, [r4, 0x22]
ldrb r1, [r1, 0x4]
adds r0, r4, 0
bl StartSpriteAnim
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
b _08106CC8
.pool
_08106CB4:
adds r0, r4, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08106CC8
adds r0, r4, 0
bl DestroyAnimSprite
_08106CC8:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8106C80
thumb_func_start sub_8106CD0
sub_8106CD0: @ 8106CD0
push {r4,r5,lr}
adds r5, r0, 0
ldr r1, =gBattleAnimArgs
movs r2, 0x4
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08106CEC
adds r0, r5, 0
bl DestroyAnimSprite
b _08106D50
.pool
_08106CEC:
movs r2, 0
ldrsh r0, [r1, r2]
cmp r0, 0
bne _08106CFC
ldr r4, =gBattleAnimAttacker
b _08106CFE
.pool
_08106CFC:
ldr r4, =gBattleAnimTarget
_08106CFE:
ldrb r0, [r4]
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x22]
ldr r0, =gBattleAnimArgs
movs r2, 0x2
ldrsh r1, [r0, r2]
adds r2, r0, 0
cmp r1, 0
bne _08106D34
ldrh r0, [r5, 0x20]
adds r0, 0x20
b _08106D38
.pool
_08106D34:
ldrh r0, [r5, 0x20]
subs r0, 0x20
_08106D38:
strh r0, [r5, 0x20]
ldrh r0, [r2, 0x4]
strh r0, [r5, 0x2E]
ldrh r1, [r2, 0x2]
strh r1, [r5, 0x30]
lsls r1, 24
lsrs r1, 24
adds r0, r5, 0
bl StartSpriteAnim
ldr r0, =sub_8106D5C
str r0, [r5, 0x1C]
_08106D50:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106CD0
thumb_func_start sub_8106D5C
sub_8106D5C: @ 8106D5C
push {lr}
adds r2, r0, 0
adds r0, 0x3F
ldrb r1, [r0]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _08106D8C
ldrh r0, [r2, 0x2E]
subs r0, 0x1
strh r0, [r2, 0x2E]
lsls r0, 16
cmp r0, 0
beq _08106D86
ldrh r1, [r2, 0x30]
lsls r1, 24
lsrs r1, 24
adds r0, r2, 0
bl StartSpriteAnim
b _08106D8C
_08106D86:
adds r0, r2, 0
bl DestroyAnimSprite
_08106D8C:
pop {r0}
bx r0
thumb_func_end sub_8106D5C
thumb_func_start sub_8106D90
sub_8106D90: @ 8106D90
push {r4,r5,lr}
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
ldr r0, =gBattleAnimArgs
ldrb r0, [r0]
bl GetAnimBattlerSpriteId
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
lsls r4, r5, 2
adds r4, r5
lsls r4, 3
ldr r0, =gTasks
adds r4, r0
ldr r2, =gUnknown_08593B98
adds r0, r4, 0
bl sub_80A7CFC
ldr r0, =sub_8106DD4
str r0, [r4]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106D90
thumb_func_start sub_8106DD4
sub_8106DD4: @ 8106DD4
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
ldr r1, =gTasks
adds r0, r1
bl sub_80A7D34
lsls r0, 24
cmp r0, 0
bne _08106DF4
adds r0, r4, 0
bl DestroyAnimVisualTask
_08106DF4:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106DD4
thumb_func_start sub_8106E00
sub_8106E00: @ 8106E00
push {r4-r7,lr}
adds r5, r0, 0
ldr r0, =gBattleAnimArgs
movs r1, 0
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08106E1C
ldr r0, =gBattleAnimAttacker
b _08106E1E
.pool
_08106E1C:
ldr r0, =gBattleAnimTarget
_08106E1E:
ldrb r6, [r0]
adds r0, r6, 0
bl GetBattlerSide
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
bne _08106E38
ldr r1, =gBattleAnimArgs
movs r2, 0x2
ldrsh r0, [r1, r2]
negs r0, r0
strh r0, [r1, 0x2]
_08106E38:
adds r0, r6, 0
movs r1, 0x2
bl GetBattlerSpriteCoord
lsls r0, 24
ldr r7, =gBattleAnimArgs
lsrs r0, 24
ldrh r3, [r7, 0x2]
adds r0, r3
movs r4, 0
strh r0, [r5, 0x20]
adds r0, r6, 0
movs r1, 0x3
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
ldrh r1, [r7, 0x4]
adds r0, r1
strh r0, [r5, 0x22]
strh r4, [r5, 0x2E]
ldrh r1, [r5, 0x20]
lsls r1, 3
strh r1, [r5, 0x30]
lsls r0, 3
strh r0, [r5, 0x32]
movs r2, 0x2
ldrsh r0, [r7, r2]
lsls r0, 3
cmp r0, 0
bge _08106E78
adds r0, 0x7
_08106E78:
asrs r0, 3
strh r0, [r5, 0x34]
movs r3, 0x4
ldrsh r0, [r7, r3]
lsls r0, 3
cmp r0, 0
bge _08106E88
adds r0, 0x7
_08106E88:
asrs r0, 3
strh r0, [r5, 0x36]
ldrh r2, [r5, 0x4]
lsls r1, r2, 22
lsrs r1, 22
movs r3, 0x6
ldrsh r0, [r7, r3]
lsls r0, 4
adds r1, r0
ldr r3, =0x000003ff
adds r0, r3, 0
ands r1, r0
ldr r0, =0xfffffc00
ands r0, r2
orrs r0, r1
strh r0, [r5, 0x4]
ldr r0, =sub_8106EC8
str r0, [r5, 0x1C]
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106E00
thumb_func_start sub_8106EC8
sub_8106EC8: @ 8106EC8
push {lr}
adds r2, r0, 0
ldrh r0, [r2, 0x34]
ldrh r1, [r2, 0x30]
adds r0, r1
strh r0, [r2, 0x30]
ldrh r1, [r2, 0x36]
ldrh r3, [r2, 0x32]
adds r1, r3
strh r1, [r2, 0x32]
lsls r0, 16
asrs r0, 19
strh r0, [r2, 0x20]
lsls r1, 16
asrs r1, 19
strh r1, [r2, 0x22]
ldrh r0, [r2, 0x2E]
adds r0, 0x1
strh r0, [r2, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0x10
ble _08106EFC
adds r0, r2, 0
bl DestroyAnimSprite
_08106EFC:
pop {r0}
bx r0
thumb_func_end sub_8106EC8
thumb_func_start sub_8106F00
sub_8106F00: @ 8106F00
push {r4,lr}
adds r4, r0, 0
movs r1, 0x2E
ldrsh r0, [r4, r1]
cmp r0, 0
bne _08106F22
ldr r0, =gBattleAnimArgs
ldrh r1, [r0]
movs r0, 0x78
subs r0, r1
strh r0, [r4, 0x30]
adds r2, r4, 0
adds r2, 0x3E
ldrb r0, [r2]
movs r1, 0x4
orrs r0, r1
strb r0, [r2]
_08106F22:
ldrh r0, [r4, 0x2E]
adds r0, 0x1
strh r0, [r4, 0x2E]
lsls r0, 16
asrs r0, 16
movs r2, 0x30
ldrsh r1, [r4, r2]
cmp r0, r1
bne _08106F40
ldrb r0, [r4, 0x5]
lsrs r0, 4
adds r0, 0x10
movs r1, 0
bl sub_80A750C
_08106F40:
movs r0, 0x2E
ldrsh r1, [r4, r0]
movs r2, 0x30
ldrsh r0, [r4, r2]
adds r0, 0x50
cmp r1, r0
bne _08106F54
adds r0, r4, 0
bl DestroyAnimSprite
_08106F54:
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106F00
thumb_func_start sub_8106F60
sub_8106F60: @ 8106F60
push {r4-r6,lr}
adds r6, r0, 0
movs r1, 0x2E
ldrsh r0, [r6, r1]
cmp r0, 0
bne _08106F8E
movs r5, 0x78
strh r5, [r6, 0x20]
ldr r4, =gBattleAnimArgs
movs r2, 0
ldrsh r0, [r4, r2]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
subs r0, 0xF
strh r0, [r6, 0x22]
ldrb r1, [r4, 0x2]
adds r0, r6, 0
bl StartSpriteAnim
strh r5, [r6, 0x38]
ldrh r0, [r4, 0x4]
strh r0, [r6, 0x34]
_08106F8E:
ldrh r0, [r6, 0x2E]
adds r0, 0x1
movs r5, 0
strh r0, [r6, 0x2E]
movs r1, 0x2E
ldrsh r0, [r6, r1]
lsrs r1, r0, 31
adds r0, r1
asrs r0, 1
strh r0, [r6, 0x30]
movs r2, 0x2E
ldrsh r0, [r6, r2]
lsls r4, r0, 1
adds r4, r0
ldrh r0, [r6, 0x34]
adds r4, r0
movs r2, 0xFF
ldrh r0, [r6, 0x3A]
adds r0, 0xA
movs r1, 0xFF
ands r0, r1
strh r0, [r6, 0x3A]
ands r4, r2
adds r0, r4, 0
movs r1, 0x64
bl Cos
strh r0, [r6, 0x24]
adds r0, r4, 0
movs r1, 0xA
bl Sin
adds r4, r0, 0
movs r1, 0x3A
ldrsh r0, [r6, r1]
movs r1, 0x4
bl Cos
ldrh r2, [r6, 0x30]
adds r4, r2
adds r0, r4
strh r0, [r6, 0x26]
movs r0, 0x2E
ldrsh r1, [r6, r0]
movs r2, 0x38
ldrsh r0, [r6, r2]
cmp r1, r0
ble _0810700A
ldr r0, =sub_8107018
str r0, [r6, 0x1C]
strh r5, [r6, 0x2E]
adds r0, r6, 0
bl oamt_add_pos2_onto_pos1
movs r0, 0x5
strh r0, [r6, 0x32]
strh r5, [r6, 0x36]
strh r5, [r6, 0x34]
adds r0, r6, 0
movs r1, 0x1
bl StartSpriteAffineAnim
_0810700A:
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8106F60
thumb_func_start sub_8107018
sub_8107018: @ 8107018
push {lr}
adds r1, r0, 0
ldrh r0, [r1, 0x2E]
adds r0, 0x1
strh r0, [r1, 0x2E]
lsls r0, 16
asrs r0, 16
cmp r0, 0xA
ble _08107032
movs r0, 0
strh r0, [r1, 0x2E]
ldr r0, =sub_810703C
str r0, [r1, 0x1C]
_08107032:
pop {r0}
bx r0
.pool
thumb_func_end sub_8107018
thumb_func_start sub_810703C
sub_810703C: @ 810703C
push {r4,lr}
adds r4, r0, 0
ldrh r1, [r4, 0x32]
ldrh r2, [r4, 0x34]
adds r0, r1, r2
strh r0, [r4, 0x34]
strh r0, [r4, 0x26]
adds r1, 0x1
strh r1, [r4, 0x32]
lsls r0, 16
asrs r0, 16
cmp r0, 0x30
ble _08107066
lsls r0, r1, 16
cmp r0, 0
ble _08107066
ldrh r0, [r4, 0x36]
subs r1, r0, 0x5
strh r1, [r4, 0x32]
adds r0, 0x1
strh r0, [r4, 0x36]
_08107066:
movs r1, 0x36
ldrsh r0, [r4, r1]
cmp r0, 0x3
ble _08107098
movs r2, 0x32
ldrsh r1, [r4, r2]
lsrs r0, r1, 31
adds r0, r1, r0
asrs r0, 1
lsls r0, 1
subs r1, r0
adds r3, r4, 0
adds r3, 0x3E
movs r0, 0x1
ands r1, r0
lsls r1, 2
ldrb r2, [r3]
movs r0, 0x5
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r3]
adds r0, r4, 0
bl DestroyAnimSprite
_08107098:
movs r1, 0x36
ldrsh r0, [r4, r1]
cmp r0, 0x4
bne _081070A6
adds r0, r4, 0
bl DestroyAnimSprite
_081070A6:
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_810703C
thumb_func_start sub_81070AC
sub_81070AC: @ 81070AC
push {r4,r5,lr}
adds r5, r0, 0
ldr r0, =gBattleTypeFlags
ldr r0, [r0]
movs r1, 0x1
ands r0, r1
cmp r0, 0
beq _081070F8
ldr r4, =gBattleAnimAttacker
ldrb r1, [r4]
movs r0, 0x2
eors r0, r1
bl IsBattlerSpriteVisible
lsls r0, 24
cmp r0, 0
beq _081070F8
ldrb r0, [r4]
adds r2, r5, 0
adds r2, 0x20
adds r3, r5, 0
adds r3, 0x22
movs r1, 0
bl SetAverageBattlerPositions
ldrh r0, [r5, 0x22]
adds r0, 0x28
strh r0, [r5, 0x22]
adds r0, r5, 0
movs r1, 0x1
bl StartSpriteAffineAnim
b _08107118
.pool
_081070F8:
ldr r4, =gBattleAnimAttacker
ldrb r0, [r4]
movs r1, 0
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
strh r0, [r5, 0x20]
ldrb r0, [r4]
movs r1, 0x1
bl GetBattlerSpriteCoord
lsls r0, 24
lsrs r0, 24
adds r0, 0x28
strh r0, [r5, 0x22]
_08107118:
movs r0, 0xD
strh r0, [r5, 0x2E]
ldrh r0, [r5, 0x20]
strh r0, [r5, 0x32]
ldrh r0, [r5, 0x22]
subs r0, 0x48
strh r0, [r5, 0x36]
2018-11-26 00:00:18 +01:00
ldr r0, =StartAnimLinearTranslation
2018-10-23 04:08:38 +02:00
str r0, [r5, 0x1C]
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_81070AC
thumb_func_start AnimTask_IsFuryCutterHitRight
AnimTask_IsFuryCutterHitRight: @ 8107144
push {lr}
lsls r0, 24
lsrs r0, 24
ldr r3, =gBattleAnimArgs
ldr r1, =gAnimDisableStructPtr
ldr r1, [r1]
ldrb r2, [r1, 0x10]
movs r1, 0x1
ands r1, r2
strh r1, [r3, 0xE]
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
thumb_func_end AnimTask_IsFuryCutterHitRight
thumb_func_start AnimTask_GetFuryCutterHitCount
AnimTask_GetFuryCutterHitCount: @ 8107168
push {lr}
lsls r0, 24
lsrs r0, 24
ldr r2, =gBattleAnimArgs
ldr r1, =gAnimDisableStructPtr
ldr r1, [r1]
ldrb r1, [r1, 0x10]
strh r1, [r2, 0xE]
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
thumb_func_end AnimTask_GetFuryCutterHitCount
.align 2, 0