mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
9551 lines
150 KiB
ArmAsm
9551 lines
150 KiB
ArmAsm
.include "asm/macros.inc"
|
|
.include "constants/constants.inc"
|
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
thumb_func_start sub_80FE840
|
|
sub_80FE840: @ 80FE840
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
ldr r5, =gBattleAnimArgs
|
|
ldrh r0, [r5]
|
|
ldrh r1, [r4, 0x20]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x20]
|
|
ldrh r0, [r5, 0x2]
|
|
ldrh r1, [r4, 0x22]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x22]
|
|
ldrh r0, [r5, 0x4]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r5, 0x6]
|
|
strh r0, [r4, 0x30]
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FE87C
|
|
ldrh r0, [r5, 0x8]
|
|
negs r0, r0
|
|
b _080FE87E
|
|
.pool
|
|
_080FE87C:
|
|
ldrh r0, [r5, 0x8]
|
|
_080FE87E:
|
|
strh r0, [r4, 0x34]
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0xA]
|
|
strh r0, [r4, 0x36]
|
|
ldr r0, =sub_80FE898
|
|
str r0, [r4, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FE840
|
|
|
|
thumb_func_start sub_80FE898
|
|
sub_80FE898: @ 80FE898
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldrh r1, [r4, 0x2E]
|
|
movs r2, 0x2E
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
ble _080FE8D4
|
|
subs r0, r1, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r1, [r4, 0x32]
|
|
lsls r0, r1, 16
|
|
asrs r0, 24
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r1, r0
|
|
strh r1, [r4, 0x32]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r2, 0x34
|
|
ldrsh r1, [r4, r2]
|
|
bl Sin
|
|
strh r0, [r4, 0x24]
|
|
ldrh r0, [r4, 0x36]
|
|
ldrh r1, [r4, 0x38]
|
|
adds r0, r1
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
b _080FE8DA
|
|
_080FE8D4:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FE8DA:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FE898
|
|
|
|
thumb_func_start sub_80FE8E0
|
|
sub_80FE8E0: @ 80FE8E0
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A69CC
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0x4]
|
|
strh r0, [r4, 0x2E]
|
|
ldr r5, =gBattleAnimAttacker
|
|
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]
|
|
ldr r0, =sub_80A6EEC
|
|
str r0, [r4, 0x1C]
|
|
ldr r1, =move_anim_8074EE0
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FE8E0
|
|
|
|
thumb_func_start sub_80FE930
|
|
sub_80FE930: @ 80FE930
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A69CC
|
|
ldr r5, =gBattleAnimArgs
|
|
ldrb r1, [r5, 0x6]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
ldrh r0, [r5, 0x4]
|
|
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]
|
|
ldr r0, =sub_80A6EEC
|
|
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_80FE930
|
|
|
|
thumb_func_start sub_80FE988
|
|
sub_80FE988: @ 80FE988
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A69CC
|
|
ldr r6, =gBattleAnimArgs
|
|
ldrh r0, [r6, 0x4]
|
|
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
|
|
ldrh r0, [r6, 0x6]
|
|
strh r0, [r4, 0x38]
|
|
ldr r1, =sub_80FE9E4
|
|
str r1, [r4, 0x1C]
|
|
adds r0, r4, 0
|
|
bl _call_via_r1
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FE988
|
|
|
|
thumb_func_start sub_80FE9E4
|
|
sub_80FE9E4: @ 80FE9E4
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl TranslateAnimLinear
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FE9FA
|
|
adds r0, r4, 0
|
|
bl DestroySprite
|
|
b _080FEA4E
|
|
_080FE9FA:
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x7F
|
|
ble _080FEA14
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A82E4
|
|
adds r0, 0x1
|
|
b _080FEA1E
|
|
.pool
|
|
_080FEA14:
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A82E4
|
|
adds r0, 0x6
|
|
_080FEA1E:
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x5
|
|
bl Sin
|
|
ldrh r1, [r4, 0x24]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0xE
|
|
bl Cos
|
|
ldrh r1, [r4, 0x26]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0xF
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
_080FEA4E:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FE9E4
|
|
|
|
thumb_func_start sub_80FEA58
|
|
sub_80FEA58: @ 80FEA58
|
|
push {r4-r6,lr}
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r6, r0, 0
|
|
ldr r1, =gTasks
|
|
lsls r0, r6, 2
|
|
adds r0, r6
|
|
lsls r0, 3
|
|
adds r5, r0, r1
|
|
ldrh r0, [r5, 0x8]
|
|
subs r0, 0x1
|
|
movs r2, 0
|
|
strh r0, [r5, 0x8]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r1, 0x1
|
|
negs r1, r1
|
|
cmp r0, r1
|
|
bne _080FEAB2
|
|
ldrh r0, [r5, 0xA]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0xA]
|
|
movs r0, 0x6
|
|
strh r0, [r5, 0x8]
|
|
ldr r1, =gBattleAnimArgs
|
|
movs r0, 0xF
|
|
strh r0, [r1]
|
|
strh r2, [r1, 0x2]
|
|
movs r0, 0x50
|
|
strh r0, [r1, 0x4]
|
|
strh r2, [r1, 0x6]
|
|
ldr r4, =gUnknown_08592210
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A82E4
|
|
adds r3, r0, 0
|
|
adds r3, 0x1
|
|
lsls r3, 24
|
|
lsrs r3, 24
|
|
adds r0, r4, 0
|
|
movs r1, 0
|
|
movs r2, 0
|
|
bl CreateSpriteAndAnimate
|
|
_080FEAB2:
|
|
movs r1, 0xA
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0xF
|
|
bne _080FEAC0
|
|
adds r0, r6, 0
|
|
bl DestroyAnimVisualTask
|
|
_080FEAC0:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEA58
|
|
|
|
thumb_func_start sub_80FEAD8
|
|
sub_80FEAD8: @ 80FEAD8
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A6980
|
|
ldr r6, =gBattleAnimArgs
|
|
ldrh r0, [r6, 0x6]
|
|
strh r0, [r4, 0x2E]
|
|
ldr r5, =gBattleAnimAttacker
|
|
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]
|
|
ldrh r0, [r6, 0x4]
|
|
strh r0, [r4, 0x38]
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldr r0, =sub_80FEB28
|
|
str r0, [r4, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEAD8
|
|
|
|
thumb_func_start sub_80FEB28
|
|
sub_80FEB28: @ 80FEB28
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FEB3C
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FEB3C:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FEB28
|
|
|
|
thumb_func_start sub_80FEB44
|
|
sub_80FEB44: @ 80FEB44
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
bl Random2
|
|
adds r1, r0, 0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x7
|
|
ands r1, r0
|
|
adds r0, r5, 0
|
|
bl StartSpriteAnim
|
|
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]
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FEB90
|
|
ldrh r0, [r5, 0x20]
|
|
subs r0, 0x14
|
|
b _080FEB94
|
|
.pool
|
|
_080FEB90:
|
|
ldrh r0, [r5, 0x20]
|
|
adds r0, 0x14
|
|
_080FEB94:
|
|
strh r0, [r5, 0x20]
|
|
bl Random2
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
movs r1, 0x1F
|
|
ands r0, r1
|
|
adds r0, 0x40
|
|
strh r0, [r5, 0x2E]
|
|
ldrh r0, [r5, 0x20]
|
|
strh r0, [r5, 0x30]
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
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
|
|
strh r0, [r5, 0x36]
|
|
adds r0, r5, 0
|
|
bl sub_80A7160
|
|
bl Random2
|
|
movs r1, 0xFF
|
|
ands r1, r0
|
|
strh r1, [r5, 0x38]
|
|
adds r0, r5, 0
|
|
adds r0, 0x43
|
|
ldrb r0, [r0]
|
|
strh r0, [r5, 0x3A]
|
|
ldr r1, =sub_80FEBFC
|
|
str r1, [r5, 0x1C]
|
|
adds r0, r5, 0
|
|
bl _call_via_r1
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEB44
|
|
|
|
thumb_func_start sub_80FEBFC
|
|
sub_80FEBFC: @ 80FEBFC
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl sub_80A70E8
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FEC12
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
b _080FEC42
|
|
_080FEC12:
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0xC
|
|
bl Cos
|
|
ldrh r1, [r4, 0x26]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x26]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x7E
|
|
bgt _080FEC2E
|
|
ldrh r0, [r4, 0x3A]
|
|
b _080FEC32
|
|
_080FEC2E:
|
|
ldrh r0, [r4, 0x3A]
|
|
adds r0, 0x1
|
|
_080FEC32:
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0x18
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
_080FEC42:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FEBFC
|
|
|
|
thumb_func_start sub_80FEC48
|
|
sub_80FEC48: @ 80FEC48
|
|
push {r4-r6,lr}
|
|
adds r6, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A69CC
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FEC68
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1, 0x4]
|
|
negs r0, r0
|
|
strh r0, [r1, 0x4]
|
|
_080FEC68:
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrh r0, [r4, 0x8]
|
|
strh r0, [r6, 0x2E]
|
|
ldr r5, =gBattleAnimTarget
|
|
ldrb r0, [r5]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r4, 0x4]
|
|
adds r0, r1
|
|
strh r0, [r6, 0x32]
|
|
ldrb r0, [r5]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r4, 0x6]
|
|
adds r0, r1
|
|
strh r0, [r6, 0x36]
|
|
ldrh r0, [r4, 0xA]
|
|
strh r0, [r6, 0x38]
|
|
adds r0, r6, 0
|
|
bl sub_80A68D4
|
|
ldr r0, =sub_80FECB8
|
|
str r0, [r6, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEC48
|
|
|
|
thumb_func_start sub_80FECB8
|
|
sub_80FECB8: @ 80FECB8
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FECE2
|
|
adds r2, r4, 0
|
|
adds r2, 0x3E
|
|
ldrb r0, [r2]
|
|
movs r1, 0x4
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r4, 0x1C]
|
|
ldr r1, =sub_80FECF0
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
_080FECE2:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FECB8
|
|
|
|
thumb_func_start sub_80FECF0
|
|
sub_80FECF0: @ 80FECF0
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
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
|
|
movs r1, 0x1
|
|
bl StartSpriteAnim
|
|
movs r0, 0x3C
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r4, 0x1C]
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FECF0
|
|
|
|
thumb_func_start sub_80FED28
|
|
sub_80FED28: @ 80FED28
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A6980
|
|
ldr r5, =gBattleAnimArgs
|
|
ldrb r1, [r5, 0x8]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
movs r1, 0x8
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0x1
|
|
bne _080FED52
|
|
ldrb r0, [r4, 0x1]
|
|
movs r1, 0xD
|
|
negs r1, r1
|
|
ands r1, r0
|
|
movs r0, 0x4
|
|
orrs r1, r0
|
|
strb r1, [r4, 0x1]
|
|
_080FED52:
|
|
ldrh r0, [r5, 0x6]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r5, 0x4]
|
|
strh r0, [r4, 0x30]
|
|
ldr r1, =sub_80FED74
|
|
str r1, [r4, 0x1C]
|
|
adds r0, r4, 0
|
|
bl _call_via_r1
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FED28
|
|
|
|
thumb_func_start sub_80FED74
|
|
sub_80FED74: @ 80FED74
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x20
|
|
bl Sin
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x3
|
|
negs r1, r1
|
|
bl Cos
|
|
ldrh r1, [r4, 0x32]
|
|
adds r1, 0x18
|
|
strh r1, [r4, 0x32]
|
|
lsls r1, 16
|
|
asrs r1, 24
|
|
adds r0, r1
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x30]
|
|
subs r0, 0x40
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0x7F
|
|
bhi _080FEDC8
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A8328
|
|
movs r1, 0x3
|
|
ands r1, r0
|
|
lsls r1, 2
|
|
ldrb r2, [r4, 0x5]
|
|
movs r0, 0xD
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
b _080FEDEC
|
|
.pool
|
|
_080FEDC8:
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A8328
|
|
adds r0, 0x1
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
cmp r2, 0x3
|
|
bls _080FEDDC
|
|
movs r2, 0x3
|
|
_080FEDDC:
|
|
movs r0, 0x3
|
|
ands r2, r0
|
|
lsls r2, 2
|
|
ldrb r1, [r4, 0x5]
|
|
movs r0, 0xD
|
|
negs r0, r0
|
|
ands r0, r1
|
|
orrs r0, r2
|
|
_080FEDEC:
|
|
strb r0, [r4, 0x5]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x2
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r4, 0x2E]
|
|
subs r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r1, 0x1
|
|
negs r1, r1
|
|
cmp r0, r1
|
|
bne _080FEE10
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FEE10:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FED74
|
|
|
|
thumb_func_start sub_80FEE1C
|
|
sub_80FEE1C: @ 80FEE1C
|
|
push {r4,lr}
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FEE36
|
|
bl IsDoubleBattle
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FEE3E
|
|
_080FEE36:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimVisualTask
|
|
b _080FEE70
|
|
_080FEE3E:
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A8364
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x1
|
|
bne _080FEE60
|
|
movs r0, 0x2
|
|
movs r1, 0x4
|
|
movs r2, 0x3
|
|
bl SetAnimBgAttribute
|
|
b _080FEE6A
|
|
.pool
|
|
_080FEE60:
|
|
movs r0, 0x1
|
|
movs r1, 0x4
|
|
movs r2, 0x1
|
|
bl SetAnimBgAttribute
|
|
_080FEE6A:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimVisualTask
|
|
_080FEE70:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FEE1C
|
|
|
|
thumb_func_start sub_80FEE78
|
|
sub_80FEE78: @ 80FEE78
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0
|
|
bl sub_80A69CC
|
|
ldr r5, =gBattleAnimArgs
|
|
ldrh r0, [r5, 0x6]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r4, 0x20]
|
|
strh r0, [r4, 0x30]
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r4, 0x22]
|
|
strh r0, [r4, 0x34]
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r5, [r5, 0x4]
|
|
adds r0, r5
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl InitAnimLinearTranslation
|
|
movs r0, 0x40
|
|
strh r0, [r4, 0x38]
|
|
ldr r1, =sub_80FEECC
|
|
str r1, [r4, 0x1C]
|
|
adds r0, r4, 0
|
|
bl _call_via_r1
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEE78
|
|
|
|
thumb_func_start sub_80FEECC
|
|
sub_80FEECC: @ 80FEECC
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl TranslateAnimLinear
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FEF38
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x20
|
|
bl Sin
|
|
ldrh r1, [r4, 0x24]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x5
|
|
negs r1, r1
|
|
bl Cos
|
|
ldrh r1, [r4, 0x26]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x38]
|
|
subs r0, 0x40
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0x7F
|
|
bhi _080FEF18
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl sub_80A82E4
|
|
subs r0, 0x1
|
|
b _080FEF22
|
|
.pool
|
|
_080FEF18:
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl sub_80A82E4
|
|
adds r0, 0x1
|
|
_080FEF22:
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0x5
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
b _080FEF3E
|
|
.pool
|
|
_080FEF38:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FEF3E:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FEECC
|
|
|
|
thumb_func_start sub_80FEF44
|
|
sub_80FEF44: @ 80FEF44
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A69CC
|
|
ldr r5, =gBattleAnimArgs
|
|
ldrh r0, [r5, 0x6]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r4, 0x20]
|
|
strh r0, [r4, 0x30]
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r4, 0x22]
|
|
strh r0, [r4, 0x34]
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r5, [r5, 0x4]
|
|
adds r0, r5
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl InitAnimLinearTranslation
|
|
movs r0, 0x40
|
|
strh r0, [r4, 0x38]
|
|
ldr r1, =sub_80FEF98
|
|
str r1, [r4, 0x1C]
|
|
adds r0, r4, 0
|
|
bl _call_via_r1
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEF44
|
|
|
|
thumb_func_start sub_80FEF98
|
|
sub_80FEF98: @ 80FEF98
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl TranslateAnimLinear
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FEFF0
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x8
|
|
bl Sin
|
|
ldrh r1, [r4, 0x24]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x24]
|
|
ldrh r1, [r4, 0x38]
|
|
adds r0, r1, 0
|
|
subs r0, 0x3B
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0x4
|
|
bls _080FEFD0
|
|
adds r0, r1, 0
|
|
subs r0, 0xBB
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0x4
|
|
bhi _080FEFE4
|
|
_080FEFD0:
|
|
ldrb r2, [r4, 0x3]
|
|
lsls r1, r2, 26
|
|
lsrs r1, 27
|
|
movs r0, 0x8
|
|
eors r1, r0
|
|
lsls r1, 1
|
|
subs r0, 0x47
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r4, 0x3]
|
|
_080FEFE4:
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0x5
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
b _080FEFF6
|
|
_080FEFF0:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FEFF6:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FEF98
|
|
|
|
thumb_func_start sub_80FEFFC
|
|
sub_80FEFFC: @ 80FEFFC
|
|
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]
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r1, 0x2]
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r1, 0x4]
|
|
strh r0, [r4, 0x32]
|
|
ldr r0, =sub_80FF044
|
|
str r0, [r4, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FEFFC
|
|
|
|
thumb_func_start sub_80FF044
|
|
sub_80FF044: @ 80FF044
|
|
push {lr}
|
|
adds r1, r0, 0
|
|
ldrh r0, [r1, 0x32]
|
|
movs r2, 0x32
|
|
ldrsh r3, [r1, r2]
|
|
cmp r3, 0
|
|
bne _080FF078
|
|
ldrh r0, [r1, 0x30]
|
|
movs r2, 0x1
|
|
ands r2, r0
|
|
cmp r2, 0
|
|
beq _080FF066
|
|
movs r0, 0x80
|
|
strh r0, [r1, 0x2E]
|
|
strh r3, [r1, 0x30]
|
|
strh r3, [r1, 0x32]
|
|
b _080FF06C
|
|
_080FF066:
|
|
strh r2, [r1, 0x2E]
|
|
strh r2, [r1, 0x30]
|
|
strh r2, [r1, 0x32]
|
|
_080FF06C:
|
|
ldr r0, =sub_80FF090
|
|
str r0, [r1, 0x1C]
|
|
b _080FF08C
|
|
.pool
|
|
_080FF078:
|
|
subs r0, 0x1
|
|
strh r0, [r1, 0x32]
|
|
ldrh r0, [r1, 0x2E]
|
|
ldrh r2, [r1, 0x20]
|
|
adds r0, r2
|
|
strh r0, [r1, 0x20]
|
|
ldrh r0, [r1, 0x30]
|
|
ldrh r2, [r1, 0x22]
|
|
adds r0, r2
|
|
strh r0, [r1, 0x22]
|
|
_080FF08C:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FF044
|
|
|
|
thumb_func_start sub_80FF090
|
|
sub_80FF090: @ 80FF090
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FF0B4
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x19
|
|
bl Sin
|
|
negs r0, r0
|
|
b _080FF0BE
|
|
.pool
|
|
_080FF0B4:
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x19
|
|
bl Sin
|
|
_080FF0BE:
|
|
strh r0, [r4, 0x24]
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x2
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
movs r1, 0x1
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
bne _080FF0DE
|
|
ldrh r0, [r4, 0x26]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x26]
|
|
_080FF0DE:
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x50
|
|
ble _080FF0EC
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FF0EC:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FF090
|
|
|
|
thumb_func_start sub_80FF0F4
|
|
sub_80FF0F4: @ 80FF0F4
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0x1
|
|
bl sub_80A69CC
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FF114
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1, 0x4]
|
|
negs r0, r0
|
|
strh r0, [r1, 0x4]
|
|
_080FF114:
|
|
ldr r6, =gBattleAnimArgs
|
|
ldrh r0, [r6, 0x8]
|
|
strh r0, [r5, 0x2E]
|
|
movs r1, 0xC
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
bne _080FF154
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r6, 0x4]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x32]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r6, [r6, 0x6]
|
|
adds r0, r6
|
|
b _080FF174
|
|
.pool
|
|
_080FF154:
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
adds r2, r5, 0
|
|
adds r2, 0x32
|
|
adds r3, r5, 0
|
|
adds r3, 0x36
|
|
movs r1, 0x1
|
|
bl SetAverageBattlerPositions
|
|
ldrh r0, [r6, 0x4]
|
|
ldrh r1, [r5, 0x32]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x32]
|
|
ldrh r0, [r6, 0x6]
|
|
ldrh r1, [r5, 0x36]
|
|
adds r0, r1
|
|
_080FF174:
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0xA]
|
|
strh r0, [r5, 0x38]
|
|
adds r0, r5, 0
|
|
bl sub_80A68D4
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r4, 24
|
|
lsls r0, 24
|
|
cmp r4, r0
|
|
bne _080FF1AC
|
|
movs r0, 0x1
|
|
b _080FF1AE
|
|
.pool
|
|
_080FF1AC:
|
|
movs r0, 0
|
|
_080FF1AE:
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =sub_80FF1C0
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF0F4
|
|
|
|
thumb_func_start sub_80FF1C0
|
|
sub_80FF1C0: @ 80FF1C0
|
|
push {r4-r7,lr}
|
|
adds r6, r0, 0
|
|
movs r7, 0
|
|
ldrh r5, [r6, 0x2E]
|
|
ldrh r4, [r6, 0x3C]
|
|
movs r0, 0x1
|
|
strh r0, [r6, 0x2E]
|
|
adds r0, r6, 0
|
|
bl TranslateAnimArc
|
|
ldrh r0, [r6, 0x3C]
|
|
strh r5, [r6, 0x2E]
|
|
lsls r4, 16
|
|
asrs r4, 16
|
|
cmp r4, 0xC8
|
|
ble _080FF1F2
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x37
|
|
bgt _080FF1F2
|
|
ldrh r0, [r6, 0x6]
|
|
cmp r0, 0
|
|
bne _080FF1F8
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0x6]
|
|
_080FF1F2:
|
|
ldrh r0, [r6, 0x6]
|
|
cmp r0, 0
|
|
beq _080FF22A
|
|
_080FF1F8:
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
beq _080FF22A
|
|
adds r3, r6, 0
|
|
adds r3, 0x3E
|
|
ldrb r2, [r3]
|
|
lsls r0, r2, 29
|
|
lsrs r0, 31
|
|
movs r1, 0x1
|
|
eors r1, r0
|
|
lsls r1, 2
|
|
movs r0, 0x5
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r3]
|
|
ldrh r0, [r6, 0x6]
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0x6]
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0x1E
|
|
bne _080FF22A
|
|
movs r7, 0x1
|
|
_080FF22A:
|
|
movs r2, 0x20
|
|
ldrsh r0, [r6, r2]
|
|
movs r2, 0x24
|
|
ldrsh r1, [r6, r2]
|
|
adds r0, r1
|
|
adds r0, 0x10
|
|
movs r1, 0x88
|
|
lsls r1, 1
|
|
cmp r0, r1
|
|
bhi _080FF254
|
|
movs r0, 0x22
|
|
ldrsh r1, [r6, r0]
|
|
movs r2, 0x26
|
|
ldrsh r0, [r6, r2]
|
|
adds r1, r0
|
|
cmp r1, 0xA0
|
|
bgt _080FF254
|
|
movs r0, 0x10
|
|
negs r0, r0
|
|
cmp r1, r0
|
|
bge _080FF256
|
|
_080FF254:
|
|
movs r7, 0x1
|
|
_080FF256:
|
|
cmp r7, 0
|
|
beq _080FF260
|
|
adds r0, r6, 0
|
|
bl DestroyAnimSprite
|
|
_080FF260:
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FF1C0
|
|
|
|
thumb_func_start sub_80FF268
|
|
sub_80FF268: @ 80FF268
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl IsDoubleBattle
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x1
|
|
bne _080FF28A
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
adds r2, r4, 0
|
|
adds r2, 0x20
|
|
adds r3, r4, 0
|
|
adds r3, 0x22
|
|
movs r1, 0x1
|
|
bl SetAverageBattlerPositions
|
|
_080FF28A:
|
|
ldrh r0, [r4, 0x22]
|
|
adds r0, 0x20
|
|
strh r0, [r4, 0x22]
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r1, 0x2]
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r1, 0x4]
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r1, 0x6]
|
|
strh r0, [r4, 0x34]
|
|
ldrh r0, [r1, 0x8]
|
|
strh r0, [r4, 0x36]
|
|
ldr r0, =sub_80FF2BC
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF268
|
|
|
|
thumb_func_start sub_80FF2BC
|
|
sub_80FF2BC: @ 80FF2BC
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
ldrh r1, [r4, 0x30]
|
|
movs r2, 0x30
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0xFF
|
|
bne _080FF2D2
|
|
ldrh r0, [r4, 0x22]
|
|
subs r0, 0x2
|
|
strh r0, [r4, 0x22]
|
|
b _080FF2E0
|
|
_080FF2D2:
|
|
cmp r0, 0
|
|
ble _080FF2E0
|
|
ldrh r0, [r4, 0x22]
|
|
subs r0, 0x2
|
|
strh r0, [r4, 0x22]
|
|
subs r0, r1, 0x2
|
|
strh r0, [r4, 0x30]
|
|
_080FF2E0:
|
|
ldrh r3, [r4, 0x32]
|
|
ldrh r5, [r4, 0x38]
|
|
adds r2, r3, r5
|
|
strh r2, [r4, 0x38]
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r4, r0]
|
|
movs r5, 0x36
|
|
ldrsh r0, [r4, r5]
|
|
cmp r1, r0
|
|
bge _080FF2F8
|
|
adds r0, r2, r3
|
|
strh r0, [r4, 0x38]
|
|
_080FF2F8:
|
|
ldrh r1, [r4, 0x38]
|
|
movs r0, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r2, 0x34
|
|
ldrsh r1, [r4, r2]
|
|
bl Cos
|
|
strh r0, [r4, 0x24]
|
|
movs r5, 0x38
|
|
ldrsh r0, [r4, r5]
|
|
movs r1, 0x5
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x7F
|
|
bgt _080FF338
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A8328
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
subs r0, 0x1
|
|
b _080FF346
|
|
.pool
|
|
_080FF338:
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl sub_80A8328
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, 0x1
|
|
_080FF346:
|
|
movs r1, 0x3
|
|
ands r0, r1
|
|
lsls r0, 2
|
|
ldrb r2, [r4, 0x5]
|
|
movs r1, 0xD
|
|
negs r1, r1
|
|
ands r1, r2
|
|
orrs r1, r0
|
|
strb r1, [r4, 0x5]
|
|
ldrh r0, [r4, 0x2E]
|
|
subs r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bne _080FF36A
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FF36A:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF2BC
|
|
|
|
thumb_func_start sub_80FF374
|
|
sub_80FF374: @ 80FF374
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0
|
|
bl sub_80A6980
|
|
adds r2, r5, 0
|
|
adds r2, 0x2C
|
|
ldrb r0, [r2]
|
|
movs r1, 0x80
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrb r1, [r4, 0x4]
|
|
adds r0, r5, 0
|
|
bl StartSpriteAffineAnim
|
|
ldrh r0, [r4, 0x4]
|
|
strh r0, [r5, 0x3A]
|
|
ldrh r0, [r4, 0x6]
|
|
strh r0, [r5, 0x3C]
|
|
ldr r0, =sub_80FF3B0
|
|
str r0, [r5, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF374
|
|
|
|
thumb_func_start sub_80FF3B0
|
|
sub_80FF3B0: @ 80FF3B0
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0, 0xE]
|
|
ldr r0, =0x0000ffff
|
|
cmp r1, r0
|
|
bne _080FF3DA
|
|
adds r2, r4, 0
|
|
adds r2, 0x2C
|
|
ldrb r1, [r2]
|
|
movs r0, 0x7F
|
|
ands r0, r1
|
|
strb r0, [r2]
|
|
movs r0, 0x1
|
|
bl GetAnimBattlerSpriteId
|
|
movs r0, 0x80
|
|
lsls r0, 1
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_80FF3EC
|
|
str r0, [r4, 0x1C]
|
|
_080FF3DA:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF3B0
|
|
|
|
thumb_func_start sub_80FF3EC
|
|
sub_80FF3EC: @ 80FF3EC
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r0, 0x1
|
|
bl GetAnimBattlerSpriteId
|
|
movs r1, 0x32
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
bne _080FF404
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0xB
|
|
b _080FF408
|
|
_080FF404:
|
|
ldrh r0, [r4, 0x2E]
|
|
subs r0, 0xB
|
|
_080FF408:
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x6
|
|
bne _080FF424
|
|
movs r0, 0
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r4, 0x32]
|
|
movs r1, 0x1
|
|
eors r0, r1
|
|
strh r0, [r4, 0x32]
|
|
_080FF424:
|
|
adds r0, r4, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x20
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _080FF452
|
|
ldrh r0, [r4, 0x3C]
|
|
subs r0, 0x1
|
|
strh r0, [r4, 0x3C]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
ble _080FF44C
|
|
ldrh r1, [r4, 0x3A]
|
|
lsls r1, 24
|
|
lsrs r1, 24
|
|
adds r0, r4, 0
|
|
bl StartSpriteAffineAnim
|
|
b _080FF452
|
|
_080FF44C:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FF452:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FF3EC
|
|
|
|
thumb_func_start sub_80FF458
|
|
sub_80FF458: @ 80FF458
|
|
push {r4-r7,lr}
|
|
mov r7, r10
|
|
mov r6, r9
|
|
mov r5, r8
|
|
push {r5-r7}
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
movs r0, 0x1
|
|
bl GetAnimBattlerSpriteId
|
|
lsls r0, 24
|
|
lsrs r1, r0, 24
|
|
ldr r0, =gSprites
|
|
mov r10, r0
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
mov r2, r10
|
|
adds r7, r0, r2
|
|
adds r0, r7, 0
|
|
adds r0, 0x3E
|
|
ldrb r0, [r0]
|
|
lsls r0, 29
|
|
cmp r0, 0
|
|
bge _080FF498
|
|
adds r0, r4, 0
|
|
bl DestroyAnimVisualTask
|
|
b _080FF51C
|
|
.pool
|
|
_080FF498:
|
|
adds r0, r1, 0
|
|
movs r1, 0x1
|
|
bl sub_80A7270
|
|
ldr r0, =gTasks
|
|
lsls r6, r4, 2
|
|
adds r6, r4
|
|
lsls r6, 3
|
|
adds r6, r0
|
|
ldrb r0, [r7, 0x5]
|
|
lsls r0, 28
|
|
lsrs r0, 30
|
|
strh r0, [r6, 0x24]
|
|
ldr r0, =gBattleAnimTarget
|
|
mov r9, r0
|
|
ldrb r0, [r0]
|
|
bl sub_80A8328
|
|
movs r1, 0x3
|
|
mov r8, r1
|
|
mov r1, r8
|
|
ands r1, r0
|
|
lsls r1, 2
|
|
ldrb r2, [r7, 0x5]
|
|
movs r5, 0xD
|
|
negs r5, r5
|
|
adds r0, r5, 0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r7, 0x5]
|
|
movs r0, 0x3
|
|
bl GetAnimBattlerSpriteId
|
|
lsls r0, 24
|
|
lsrs r1, r0, 24
|
|
lsls r4, r1, 4
|
|
adds r4, r1
|
|
lsls r4, 2
|
|
add r4, r10
|
|
ldrb r0, [r4, 0x5]
|
|
lsls r0, 28
|
|
lsrs r0, 30
|
|
strh r0, [r6, 0x26]
|
|
mov r2, r9
|
|
ldrb r1, [r2]
|
|
movs r0, 0x2
|
|
eors r0, r1
|
|
bl sub_80A8328
|
|
mov r1, r8
|
|
ands r1, r0
|
|
lsls r1, 2
|
|
ldrb r0, [r4, 0x5]
|
|
ands r5, r0
|
|
orrs r5, r1
|
|
strb r5, [r4, 0x5]
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1]
|
|
strh r0, [r6, 0x8]
|
|
ldrh r0, [r1, 0x2]
|
|
strh r0, [r6, 0xA]
|
|
movs r0, 0x80
|
|
lsls r0, 1
|
|
strh r0, [r6, 0x1E]
|
|
ldr r0, =sub_80FF53C
|
|
str r0, [r6]
|
|
_080FF51C:
|
|
pop {r3-r5}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
mov r10, r5
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF458
|
|
|
|
thumb_func_start sub_80FF53C
|
|
sub_80FF53C: @ 80FF53C
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
lsls r4, 24
|
|
lsrs r4, 24
|
|
movs r0, 0x1
|
|
bl GetAnimBattlerSpriteId
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r6, r0, 0
|
|
ldr r1, =gTasks
|
|
lsls r0, r4, 2
|
|
adds r0, r4
|
|
lsls r0, 3
|
|
adds r4, r0, r1
|
|
ldrh r1, [r4, 0x8]
|
|
ldrh r0, [r4, 0x1C]
|
|
adds r1, r0
|
|
strh r1, [r4, 0x1C]
|
|
ldr r2, =gSprites
|
|
lsls r0, r6, 4
|
|
adds r0, r6
|
|
lsls r0, 2
|
|
adds r5, r0, r2
|
|
lsls r1, 16
|
|
asrs r1, 24
|
|
strh r1, [r5, 0x24]
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FF586
|
|
ldrh r0, [r5, 0x24]
|
|
negs r0, r0
|
|
strh r0, [r5, 0x24]
|
|
_080FF586:
|
|
ldrh r0, [r4, 0x1E]
|
|
adds r0, 0x10
|
|
strh r0, [r4, 0x1E]
|
|
movs r0, 0x1E
|
|
ldrsh r2, [r4, r0]
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
movs r3, 0
|
|
bl obj_id_set_rotscale
|
|
adds r0, r6, 0
|
|
bl sub_80A7E6C
|
|
ldrh r0, [r4, 0xA]
|
|
subs r0, 0x1
|
|
strh r0, [r4, 0xA]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0
|
|
bne _080FF5B4
|
|
strh r0, [r4, 0x8]
|
|
ldr r0, =sub_80FF5CC
|
|
str r0, [r4]
|
|
_080FF5B4:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF53C
|
|
|
|
thumb_func_start sub_80FF5CC
|
|
sub_80FF5CC: @ 80FF5CC
|
|
push {r4-r7,lr}
|
|
lsls r0, 24
|
|
lsrs r3, r0, 24
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0, 0xE]
|
|
ldr r0, =0x0000ffff
|
|
cmp r1, r0
|
|
bne _080FF660
|
|
ldr r0, =gTasks
|
|
lsls r2, r3, 2
|
|
adds r1, r2, r3
|
|
lsls r1, 3
|
|
adds r7, r1, r0
|
|
movs r1, 0x8
|
|
ldrsh r5, [r7, r1]
|
|
adds r4, r0, 0
|
|
cmp r5, 0
|
|
bne _080FF674
|
|
movs r0, 0x1
|
|
bl GetAnimBattlerSpriteId
|
|
adds r4, r0, 0
|
|
lsls r4, 24
|
|
lsrs r4, 24
|
|
adds r0, r4, 0
|
|
bl sub_80A7344
|
|
ldr r6, =gSprites
|
|
lsls r1, r4, 4
|
|
adds r1, r4
|
|
lsls r1, 2
|
|
adds r1, r6
|
|
strh r5, [r1, 0x24]
|
|
strh r5, [r1, 0x26]
|
|
movs r5, 0x3
|
|
ldrh r2, [r7, 0x24]
|
|
ands r2, r5
|
|
lsls r2, 2
|
|
ldrb r3, [r1, 0x5]
|
|
movs r4, 0xD
|
|
negs r4, r4
|
|
adds r0, r4, 0
|
|
ands r0, r3
|
|
orrs r0, r2
|
|
strb r0, [r1, 0x5]
|
|
movs r0, 0x3
|
|
bl GetAnimBattlerSpriteId
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
lsls r1, r0, 4
|
|
adds r1, r0
|
|
lsls r1, 2
|
|
adds r1, r6
|
|
ldrh r0, [r7, 0x26]
|
|
ands r0, r5
|
|
lsls r0, 2
|
|
ldrb r2, [r1, 0x5]
|
|
ands r4, r2
|
|
orrs r4, r0
|
|
strb r4, [r1, 0x5]
|
|
ldrh r0, [r7, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r7, 0x8]
|
|
b _080FF68E
|
|
.pool
|
|
_080FF660:
|
|
ldr r1, =gTasks
|
|
lsls r2, r3, 2
|
|
adds r0, r2, r3
|
|
lsls r0, 3
|
|
adds r0, r1
|
|
movs r4, 0x8
|
|
ldrsh r0, [r0, r4]
|
|
adds r4, r1, 0
|
|
cmp r0, 0
|
|
beq _080FF68E
|
|
_080FF674:
|
|
adds r1, r2, r3
|
|
lsls r1, 3
|
|
adds r1, r4
|
|
ldrh r0, [r1, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x8]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3
|
|
bne _080FF68E
|
|
adds r0, r3, 0
|
|
bl DestroyAnimVisualTask
|
|
_080FF68E:
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF5CC
|
|
|
|
thumb_func_start sub_80FF698
|
|
sub_80FF698: @ 80FF698
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0
|
|
beq _080FF6AA
|
|
cmp r0, 0x1
|
|
beq _080FF704
|
|
b _080FF756
|
|
_080FF6AA:
|
|
ldr r6, =gBattleAnimTarget
|
|
ldrb r0, [r6]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FF6C2
|
|
ldr r1, =gBattleAnimArgs
|
|
movs r2, 0
|
|
ldrsh r0, [r1, r2]
|
|
negs r0, r0
|
|
strh r0, [r1]
|
|
_080FF6C2:
|
|
ldrb r0, [r6]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
ldr r4, =gBattleAnimArgs
|
|
lsrs r0, 24
|
|
ldrh r1, [r4]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x20]
|
|
ldrb r0, [r6]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r4, [r4, 0x2]
|
|
adds r0, r4
|
|
strh r0, [r5, 0x22]
|
|
adds r2, r5, 0
|
|
adds r2, 0x3E
|
|
ldrb r0, [r2]
|
|
movs r1, 0x4
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
ldrh r0, [r5, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x2E]
|
|
b _080FF756
|
|
.pool
|
|
_080FF704:
|
|
adds r2, r5, 0
|
|
adds r2, 0x3E
|
|
ldrb r1, [r2]
|
|
movs r0, 0x5
|
|
negs r0, r0
|
|
ands r0, r1
|
|
strb r0, [r2]
|
|
adds r0, r5, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x20
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _080FF756
|
|
adds r0, r5, 0
|
|
movs r1, 0x1
|
|
bl ChangeSpriteAffineAnim
|
|
movs r0, 0x19
|
|
strh r0, [r5, 0x2E]
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x32]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =sub_80A70C0
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
_080FF756:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF698
|
|
|
|
thumb_func_start sub_80FF768
|
|
sub_80FF768: @ 80FF768
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0
|
|
bne _080FF7D4
|
|
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, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x22]
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrh r0, [r4]
|
|
strh r0, [r5, 0x24]
|
|
ldrh r0, [r4, 0x2]
|
|
strh r0, [r5, 0x26]
|
|
ldrb r0, [r4, 0x4]
|
|
adds r0, 0x1E
|
|
adds r1, r5, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrb r1, [r4, 0x6]
|
|
adds r0, r5, 0
|
|
bl StartSpriteAnim
|
|
ldrh r0, [r4, 0x8]
|
|
strh r0, [r5, 0x32]
|
|
ldrh r0, [r5, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x2E]
|
|
movs r2, 0x22
|
|
ldrsh r0, [r5, r2]
|
|
movs r2, 0x26
|
|
ldrsh r1, [r5, r2]
|
|
adds r0, r1
|
|
cmp r0, 0x78
|
|
ble _080FF7D4
|
|
ldrh r0, [r5, 0x22]
|
|
adds r1, r0, 0
|
|
subs r1, 0x78
|
|
ldrh r2, [r5, 0x26]
|
|
adds r0, r2
|
|
adds r1, r0
|
|
strh r1, [r5, 0x22]
|
|
_080FF7D4:
|
|
ldr r0, =sub_80FF8DC
|
|
str r0, [r5, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF768
|
|
|
|
thumb_func_start sub_80FF7EC
|
|
sub_80FF7EC: @ 80FF7EC
|
|
push {r4-r6,lr}
|
|
mov r6, r10
|
|
mov r5, r9
|
|
mov r4, r8
|
|
push {r4-r6}
|
|
sub sp, 0x4
|
|
mov r9, r0
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
adds r5, r0, 0
|
|
lsls r5, 24
|
|
lsrs r5, 24
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
mov r8, r0
|
|
mov r0, r8
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
mov r8, r0
|
|
ldr r6, =gBattleAnimTarget
|
|
ldrb r0, [r6]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
adds r4, r0, 0
|
|
lsls r4, 24
|
|
lsrs r4, 24
|
|
ldrb r0, [r6]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
adds r2, r0, 0
|
|
lsls r2, 24
|
|
subs r4, r5
|
|
lsls r4, 16
|
|
lsrs r2, 24
|
|
mov r1, r8
|
|
subs r2, r1
|
|
lsls r2, 16
|
|
lsrs r2, 16
|
|
lsrs r3, r4, 16
|
|
mov r10, r3
|
|
asrs r4, 16
|
|
ldr r6, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r6, r1]
|
|
muls r0, r4
|
|
movs r1, 0x64
|
|
str r2, [sp]
|
|
bl __divsi3
|
|
adds r5, r0
|
|
mov r3, r9
|
|
strh r5, [r3, 0x20]
|
|
ldr r2, [sp]
|
|
lsls r0, r2, 16
|
|
asrs r0, 16
|
|
movs r3, 0
|
|
ldrsh r1, [r6, r3]
|
|
muls r0, r1
|
|
movs r1, 0x64
|
|
bl __divsi3
|
|
add r8, r0
|
|
mov r1, r8
|
|
mov r0, r9
|
|
strh r1, [r0, 0x22]
|
|
ldrh r0, [r6, 0x2]
|
|
mov r3, r9
|
|
strh r0, [r3, 0x24]
|
|
ldrh r0, [r6, 0x4]
|
|
strh r0, [r3, 0x26]
|
|
ldrb r0, [r6, 0x6]
|
|
adds r0, 0x1E
|
|
mov r1, r9
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrb r1, [r6, 0x8]
|
|
mov r0, r9
|
|
bl StartSpriteAnim
|
|
ldrh r0, [r6, 0xA]
|
|
mov r1, r9
|
|
strh r0, [r1, 0x32]
|
|
ldr r0, =sub_80FF8DC
|
|
str r0, [r1, 0x1C]
|
|
ldr r1, =gUnknown_0203A0F8
|
|
mov r3, r9
|
|
ldrh r0, [r3, 0x20]
|
|
strh r0, [r1]
|
|
ldrh r0, [r3, 0x22]
|
|
strh r0, [r1, 0x2]
|
|
mov r0, r10
|
|
strh r0, [r1, 0x4]
|
|
ldr r2, [sp]
|
|
strh r2, [r1, 0x6]
|
|
add sp, 0x4
|
|
pop {r3-r5}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
mov r10, r5
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF7EC
|
|
|
|
thumb_func_start sub_80FF8DC
|
|
sub_80FF8DC: @ 80FF8DC
|
|
push {lr}
|
|
adds r3, r0, 0
|
|
ldrh r1, [r3, 0x2E]
|
|
adds r1, 0x1
|
|
strh r1, [r3, 0x2E]
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
movs r2, 0x32
|
|
ldrsh r0, [r3, r2]
|
|
subs r0, 0xA
|
|
cmp r1, r0
|
|
ble _080FF91C
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r3, r0]
|
|
lsrs r0, r1, 31
|
|
adds r0, r1, r0
|
|
asrs r0, 1
|
|
lsls r0, 1
|
|
subs r1, r0
|
|
movs r2, 0x3E
|
|
adds r2, r3
|
|
mov r12, r2
|
|
movs r0, 0x1
|
|
ands r1, r0
|
|
lsls r1, 2
|
|
ldrb r2, [r2]
|
|
movs r0, 0x5
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
mov r1, r12
|
|
strb r0, [r1]
|
|
_080FF91C:
|
|
movs r2, 0x2E
|
|
ldrsh r1, [r3, r2]
|
|
movs r2, 0x32
|
|
ldrsh r0, [r3, r2]
|
|
cmp r1, r0
|
|
ble _080FF92E
|
|
adds r0, r3, 0
|
|
bl DestroyAnimSprite
|
|
_080FF92E:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FF8DC
|
|
|
|
thumb_func_start sub_80FF934
|
|
sub_80FF934: @ 80FF934
|
|
push {r4-r6,lr}
|
|
adds r6, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
bne _080FF974
|
|
ldr r5, =gBattleAnimAttacker
|
|
ldrb r0, [r5]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
ldr r4, =gBattleAnimArgs
|
|
lsrs r0, 24
|
|
ldrh r2, [r4]
|
|
adds r0, r2
|
|
strh r0, [r6, 0x20]
|
|
ldrb r0, [r5]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r4, 0x2]
|
|
adds r0, r1
|
|
strh r0, [r6, 0x22]
|
|
ldrh r0, [r4, 0x4]
|
|
strh r0, [r6, 0x30]
|
|
ldrh r0, [r4, 0x6]
|
|
strh r0, [r6, 0x32]
|
|
ldrh r0, [r4, 0x8]
|
|
strh r0, [r6, 0x34]
|
|
_080FF974:
|
|
ldrh r0, [r6, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0x2E]
|
|
ldrh r1, [r6, 0x30]
|
|
muls r0, r1
|
|
strh r0, [r6, 0x24]
|
|
movs r2, 0x2E
|
|
ldrsh r1, [r6, r2]
|
|
lsls r0, r1, 2
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
movs r2, 0x32
|
|
ldrsh r1, [r6, r2]
|
|
bl Sin
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r6, r0]
|
|
movs r2, 0x34
|
|
ldrsh r0, [r6, r2]
|
|
cmp r1, r0
|
|
ble _080FF9AA
|
|
adds r0, r6, 0
|
|
bl DestroyAnimSprite
|
|
_080FF9AA:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FF934
|
|
|
|
thumb_func_start sub_80FF9B8
|
|
sub_80FF9B8: @ 80FF9B8
|
|
push {r4,r5,lr}
|
|
movs r2, 0x20
|
|
ldrsh r4, [r0, r2]
|
|
lsls r4, 8
|
|
movs r3, 0x22
|
|
ldrsh r2, [r0, r3]
|
|
orrs r4, r2
|
|
movs r5, 0x3A
|
|
ldrsh r2, [r0, r5]
|
|
lsls r2, 8
|
|
movs r5, 0x3C
|
|
ldrsh r3, [r0, r5]
|
|
orrs r2, r3
|
|
lsls r1, 8
|
|
strh r4, [r0, 0x38]
|
|
strh r2, [r0, 0x3A]
|
|
strh r1, [r0, 0x3C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FF9B8
|
|
|
|
thumb_func_start sub_80FF9E0
|
|
sub_80FF9E0: @ 80FF9E0
|
|
push {r4-r7,lr}
|
|
mov r7, r10
|
|
mov r6, r9
|
|
mov r5, r8
|
|
push {r5-r7}
|
|
mov r8, r0
|
|
ldrh r0, [r0, 0x38]
|
|
lsrs r1, r0, 8
|
|
mov r10, r1
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
mov r9, r0
|
|
mov r1, r8
|
|
ldrh r0, [r1, 0x3A]
|
|
lsrs r2, r0, 8
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
ldrh r1, [r1, 0x3C]
|
|
lsls r0, r1, 16
|
|
asrs r0, 24
|
|
lsls r0, 16
|
|
lsrs r6, r0, 16
|
|
movs r3, 0xFF
|
|
ands r3, r1
|
|
cmp r2, 0
|
|
bne _080FFA1A
|
|
movs r2, 0x20
|
|
negs r2, r2
|
|
b _080FFA22
|
|
_080FFA1A:
|
|
cmp r2, 0xFF
|
|
bne _080FFA22
|
|
movs r2, 0x88
|
|
lsls r2, 1
|
|
_080FFA22:
|
|
mov r0, r9
|
|
subs r4, r0
|
|
lsls r4, 16
|
|
lsrs r4, 16
|
|
mov r1, r10
|
|
subs r0, r2, r1
|
|
lsls r5, r3, 16
|
|
asrs r5, 16
|
|
muls r0, r5
|
|
lsls r1, r6, 16
|
|
asrs r7, r1, 16
|
|
adds r1, r7, 0
|
|
bl __divsi3
|
|
adds r6, r0, 0
|
|
lsls r4, 16
|
|
asrs r4, 16
|
|
adds r0, r4, 0
|
|
muls r0, r5
|
|
adds r1, r7, 0
|
|
bl __divsi3
|
|
add r6, r10
|
|
mov r1, r8
|
|
strh r6, [r1, 0x20]
|
|
add r0, r9
|
|
strh r0, [r1, 0x22]
|
|
adds r5, 0x1
|
|
lsls r5, 16
|
|
lsrs r3, r5, 16
|
|
asrs r5, 16
|
|
cmp r5, r7
|
|
beq _080FFA74
|
|
lsls r1, r7, 8
|
|
lsls r0, r3, 16
|
|
asrs r0, 16
|
|
orrs r0, r1
|
|
mov r1, r8
|
|
strh r0, [r1, 0x3C]
|
|
movs r0, 0
|
|
b _080FFA76
|
|
_080FFA74:
|
|
movs r0, 0x1
|
|
_080FFA76:
|
|
pop {r3-r5}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
mov r10, r5
|
|
pop {r4-r7}
|
|
pop {r1}
|
|
bx r1
|
|
thumb_func_end sub_80FF9E0
|
|
|
|
thumb_func_start sub_80FFA84
|
|
sub_80FFA84: @ 80FFA84
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0xA
|
|
bne _080FFA98
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAffineAnim
|
|
_080FFA98:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x32
|
|
ble _080FFAAC
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FFAAC:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FFA84
|
|
|
|
thumb_func_start sub_80FFAB4
|
|
sub_80FFAB4: @ 80FFAB4
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
lsls r0, 7
|
|
movs r2, 0x36
|
|
ldrsh r1, [r4, r2]
|
|
bl __divsi3
|
|
ldrh r1, [r4, 0x2E]
|
|
adds r1, r0
|
|
movs r5, 0
|
|
strh r1, [r4, 0x2E]
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
cmp r1, 0x7F
|
|
ble _080FFADE
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
strh r5, [r4, 0x2E]
|
|
_080FFADE:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x80
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r1, 0x30
|
|
ldrsh r2, [r4, r1]
|
|
lsls r2, 3
|
|
movs r1, 0x1E
|
|
subs r1, r2
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
adds r0, r4, 0
|
|
bl sub_80FF9E0
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FFB0E
|
|
strh r5, [r4, 0x26]
|
|
strh r5, [r4, 0x2E]
|
|
ldr r0, =sub_80FFA84
|
|
str r0, [r4, 0x1C]
|
|
_080FFB0E:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFAB4
|
|
|
|
thumb_func_start sub_80FFB18
|
|
sub_80FFB18: @ 80FFB18
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0
|
|
bl sub_80A69CC
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r6, r0, 24
|
|
ldrb r0, [r4]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r1, [r0]
|
|
movs r0, 0x2
|
|
eors r0, r1
|
|
ldrb r4, [r4]
|
|
cmp r0, r4
|
|
bne _080FFB68
|
|
strh r6, [r5, 0x3A]
|
|
adds r0, r2, 0
|
|
adds r0, 0xA
|
|
strh r0, [r5, 0x3C]
|
|
adds r0, r5, 0
|
|
movs r1, 0x3C
|
|
bl sub_80FF9B8
|
|
movs r0, 0x1
|
|
b _080FFB7A
|
|
.pool
|
|
_080FFB68:
|
|
strh r6, [r5, 0x3A]
|
|
adds r0, r2, 0
|
|
adds r0, 0xA
|
|
strh r0, [r5, 0x3C]
|
|
adds r0, r5, 0
|
|
movs r1, 0x3C
|
|
bl sub_80FF9B8
|
|
movs r0, 0x3
|
|
_080FFB7A:
|
|
strh r0, [r5, 0x34]
|
|
movs r0, 0x3C
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =sub_80FFAB4
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFB18
|
|
|
|
thumb_func_start sub_80FFB90
|
|
sub_80FFB90: @ 80FFB90
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
lsls r0, 7
|
|
movs r2, 0x36
|
|
ldrsh r1, [r4, r2]
|
|
bl __divsi3
|
|
ldrh r1, [r4, 0x2E]
|
|
adds r1, r0
|
|
movs r5, 0
|
|
strh r1, [r4, 0x2E]
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
cmp r1, 0x7F
|
|
ble _080FFBBA
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
strh r5, [r4, 0x2E]
|
|
_080FFBBA:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x80
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r1, 0x30
|
|
ldrsh r2, [r4, r1]
|
|
lsls r2, 3
|
|
movs r1, 0x1E
|
|
subs r1, r2
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
adds r0, r4, 0
|
|
bl sub_80FF9E0
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FFBEC
|
|
strh r5, [r4, 0x26]
|
|
strh r5, [r4, 0x2E]
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FFBEC:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FFB90
|
|
|
|
thumb_func_start sub_80FFBF4
|
|
sub_80FFBF4: @ 80FFBF4
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r6, r0, 24
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0
|
|
bne _080FFC38
|
|
strh r0, [r5, 0x3A]
|
|
adds r0, r6, 0
|
|
adds r0, 0xA
|
|
strh r0, [r5, 0x3C]
|
|
adds r0, r5, 0
|
|
movs r1, 0x28
|
|
bl sub_80FF9B8
|
|
movs r0, 0x3
|
|
strh r0, [r5, 0x34]
|
|
movs r0, 0x3C
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =sub_80FFAB4
|
|
b _080FFC62
|
|
.pool
|
|
_080FFC38:
|
|
movs r0, 0xFF
|
|
strh r0, [r5, 0x3A]
|
|
adds r0, r6, 0
|
|
adds r0, 0xA
|
|
strh r0, [r5, 0x3C]
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FFC50
|
|
movs r0, 0
|
|
strh r0, [r5, 0x3A]
|
|
_080FFC50:
|
|
adds r0, r5, 0
|
|
movs r1, 0x28
|
|
bl sub_80FF9B8
|
|
movs r0, 0x3
|
|
strh r0, [r5, 0x34]
|
|
movs r0, 0x3C
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =sub_80FFB90
|
|
_080FFC62:
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFBF4
|
|
|
|
thumb_func_start sub_80FFC70
|
|
sub_80FFC70: @ 80FFC70
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
bne _080FFC8A
|
|
adds r0, r4, 0
|
|
movs r1, 0
|
|
bl sub_80A6980
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0x4]
|
|
strh r0, [r4, 0x30]
|
|
_080FFC8A:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r1, [r4, 0x30]
|
|
muls r0, r1
|
|
strh r0, [r4, 0x26]
|
|
adds r0, r4, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x10
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _080FFCAA
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FFCAA:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFC70
|
|
|
|
thumb_func_start sub_80FFCB4
|
|
sub_80FFCB4: @ 80FFCB4
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0
|
|
bl sub_80A6980
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r6, r0, 24
|
|
ldrb r0, [r4]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r1, [r0]
|
|
movs r0, 0x2
|
|
eors r0, r1
|
|
ldrb r4, [r4]
|
|
cmp r0, r4
|
|
bne _080FFD04
|
|
strh r6, [r5, 0x3A]
|
|
adds r0, r2, 0
|
|
adds r0, 0xA
|
|
strh r0, [r5, 0x3C]
|
|
adds r0, r5, 0
|
|
movs r1, 0x3C
|
|
bl sub_80FF9B8
|
|
movs r0, 0x1
|
|
b _080FFD16
|
|
.pool
|
|
_080FFD04:
|
|
strh r6, [r5, 0x3A]
|
|
adds r0, r2, 0
|
|
adds r0, 0xA
|
|
strh r0, [r5, 0x3C]
|
|
adds r0, r5, 0
|
|
movs r1, 0x3C
|
|
bl sub_80FF9B8
|
|
movs r0, 0x3
|
|
_080FFD16:
|
|
strh r0, [r5, 0x34]
|
|
movs r0, 0x3C
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =sub_80FFD2C
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFCB4
|
|
|
|
thumb_func_start sub_80FFD2C
|
|
sub_80FFD2C: @ 80FFD2C
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
lsls r0, 7
|
|
movs r2, 0x36
|
|
ldrsh r1, [r4, r2]
|
|
bl __divsi3
|
|
ldrh r1, [r4, 0x2E]
|
|
adds r1, r0
|
|
movs r5, 0
|
|
strh r1, [r4, 0x2E]
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
cmp r1, 0x7F
|
|
ble _080FFD56
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
strh r5, [r4, 0x2E]
|
|
_080FFD56:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x80
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r1, 0x30
|
|
ldrsh r2, [r4, r1]
|
|
lsls r2, 3
|
|
movs r1, 0x1E
|
|
subs r1, r2
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bne _080FFD8A
|
|
movs r0, 0x3F
|
|
bl BattleAnimAdjustPanning
|
|
adds r1, r0, 0
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
movs r0, 0x7D
|
|
bl PlaySE12WithPanning
|
|
_080FFD8A:
|
|
adds r0, r4, 0
|
|
bl sub_80FF9E0
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _080FFDB2
|
|
strh r5, [r4, 0x26]
|
|
strh r5, [r4, 0x2E]
|
|
ldr r0, =sub_80FFA84
|
|
str r0, [r4, 0x1C]
|
|
movs r0, 0x40
|
|
negs r0, r0
|
|
bl BattleAnimAdjustPanning
|
|
adds r1, r0, 0
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
movs r0, 0x7D
|
|
bl PlaySE12WithPanning
|
|
_080FFDB2:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFD2C
|
|
|
|
thumb_func_start sub_80FFDBC
|
|
sub_80FFDBC: @ 80FFDBC
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
bne _080FFE50
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FFDE4
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0, 0x2]
|
|
strh r1, [r4, 0x30]
|
|
movs r1, 0x78
|
|
strh r1, [r4, 0x20]
|
|
adds r5, r0, 0
|
|
b _080FFE06
|
|
.pool
|
|
_080FFDE4:
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0x2
|
|
ldrsh r3, [r0, r1]
|
|
adds r1, r3, 0
|
|
subs r1, 0x20
|
|
adds r2, r1, 0
|
|
adds r5, r0, 0
|
|
cmp r1, 0
|
|
bge _080FFDFA
|
|
adds r2, r3, 0
|
|
adds r2, 0xDF
|
|
_080FFDFA:
|
|
asrs r0, r2, 8
|
|
lsls r0, 8
|
|
subs r0, r1, r0
|
|
strh r0, [r4, 0x30]
|
|
movs r0, 0x46
|
|
strh r0, [r4, 0x20]
|
|
_080FFE06:
|
|
ldrh r0, [r5]
|
|
strh r0, [r4, 0x22]
|
|
strh r0, [r4, 0x32]
|
|
movs r0, 0x14
|
|
strh r0, [r4, 0x36]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x3C
|
|
bl Cos
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x14
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
ldr r0, =sub_80FFE58
|
|
str r0, [r4, 0x1C]
|
|
ldrh r0, [r4, 0x30]
|
|
subs r0, 0x1
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0xBE
|
|
bhi _080FFE48
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
movs r0, 0x1F
|
|
b _080FFE4E
|
|
.pool
|
|
_080FFE48:
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
movs r0, 0x1D
|
|
_080FFE4E:
|
|
strb r0, [r1]
|
|
_080FFE50:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FFDBC
|
|
|
|
thumb_func_start sub_80FFE58
|
|
sub_80FFE58: @ 80FFE58
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
beq _080FFE6A
|
|
cmp r0, 0x1
|
|
beq _080FFE9A
|
|
b _080FFEBA
|
|
_080FFE6A:
|
|
ldrh r5, [r4, 0x32]
|
|
movs r1, 0x32
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x4E
|
|
ble _080FFE82
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x34]
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAffineAnim
|
|
b _080FFEBA
|
|
_080FFE82:
|
|
movs r1, 0x36
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0xA
|
|
bl __divsi3
|
|
adds r0, r5, r0
|
|
strh r0, [r4, 0x32]
|
|
ldrh r1, [r4, 0x36]
|
|
adds r1, 0x3
|
|
strh r1, [r4, 0x36]
|
|
strh r0, [r4, 0x22]
|
|
b _080FFEBA
|
|
_080FFE9A:
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
beq _080FFEBA
|
|
adds r0, r4, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x20
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _080FFEBA
|
|
movs r0, 0
|
|
strh r0, [r4, 0x2E]
|
|
strh r0, [r4, 0x32]
|
|
ldr r0, =sub_80FFEC4
|
|
str r0, [r4, 0x1C]
|
|
_080FFEBA:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFE58
|
|
|
|
thumb_func_start sub_80FFEC4
|
|
sub_80FFEC4: @ 80FFEC4
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldr r5, =gUnknown_08592700
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r4, r0]
|
|
lsls r0, r1, 1
|
|
adds r3, r0, r1
|
|
adds r0, r5, 0x1
|
|
adds r0, r3, r0
|
|
ldrh r2, [r4, 0x32]
|
|
movs r6, 0x32
|
|
ldrsh r1, [r4, r6]
|
|
ldrb r0, [r0]
|
|
lsls r0, 24
|
|
asrs r0, 24
|
|
cmp r1, r0
|
|
bne _080FFF10
|
|
adds r0, r5, 0x2
|
|
adds r0, r3, r0
|
|
ldrb r0, [r0]
|
|
lsls r0, 24
|
|
asrs r0, 24
|
|
cmp r0, 0x7F
|
|
bne _080FFEFC
|
|
movs r0, 0
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_80FFF7C
|
|
str r0, [r4, 0x1C]
|
|
_080FFEFC:
|
|
movs r0, 0
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
b _080FFF76
|
|
.pool
|
|
_080FFF10:
|
|
adds r0, r2, 0x1
|
|
strh r0, [r4, 0x32]
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r4, r0]
|
|
lsls r0, r1, 1
|
|
adds r0, r1
|
|
adds r1, r0, r5
|
|
movs r2, 0
|
|
ldrsb r2, [r1, r2]
|
|
adds r1, r5, 0x2
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
lsls r0, 24
|
|
asrs r0, 24
|
|
muls r0, r2
|
|
ldrh r1, [r4, 0x30]
|
|
adds r0, r1
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x30]
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _080FFF5E
|
|
ldrh r0, [r4, 0x30]
|
|
subs r0, 0x1
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
cmp r0, 0xBE
|
|
bhi _080FFF56
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
movs r0, 0x1F
|
|
b _080FFF5C
|
|
_080FFF56:
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
movs r0, 0x1D
|
|
_080FFF5C:
|
|
strb r0, [r1]
|
|
_080FFF5E:
|
|
movs r6, 0x30
|
|
ldrsh r0, [r4, r6]
|
|
movs r1, 0x3C
|
|
bl Cos
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x14
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
_080FFF76:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FFEC4
|
|
|
|
thumb_func_start sub_80FFF7C
|
|
sub_80FFF7C: @ 80FFF7C
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x14
|
|
ble _080FFF8E
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_080FFF8E:
|
|
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]
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80FFF7C
|
|
|
|
thumb_func_start sub_80FFFC0
|
|
sub_80FFFC0: @ 80FFFC0
|
|
push {r4-r6,lr}
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r6, r0, 0
|
|
lsls r0, r6, 2
|
|
adds r0, r6
|
|
lsls r0, 3
|
|
ldr r1, =gTasks
|
|
adds r5, r0, r1
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
bl sub_80A82E4
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
subs r0, 0x1
|
|
strh r0, [r5, 0x10]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x14]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x16]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x1
|
|
bl sub_80A861C
|
|
strh r0, [r5, 0x1C]
|
|
ldrb r0, [r4]
|
|
movs r1, 0
|
|
bl sub_80A861C
|
|
strh r0, [r5, 0x1E]
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r2, 0x1
|
|
negs r2, r2
|
|
adds r1, r2, 0
|
|
cmp r0, 0x1
|
|
bne _08100028
|
|
movs r1, 0x1
|
|
_08100028:
|
|
strh r1, [r5, 0x12]
|
|
movs r3, 0x12
|
|
ldrsh r0, [r5, r3]
|
|
lsls r0, 6
|
|
movs r1, 0x38
|
|
subs r1, r0
|
|
strh r1, [r5, 0x1A]
|
|
ldrh r0, [r5, 0x16]
|
|
subs r0, r1
|
|
ldrh r1, [r5, 0x14]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x18]
|
|
ldr r0, =gUnknown_08592778
|
|
movs r2, 0x18
|
|
ldrsh r1, [r5, r2]
|
|
movs r3, 0x1A
|
|
ldrsh r2, [r5, r3]
|
|
ldrb r3, [r5, 0x10]
|
|
bl CreateSprite
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0xC]
|
|
cmp r0, 0x40
|
|
bne _08100060
|
|
adds r0, r6, 0
|
|
bl DestroyAnimVisualTask
|
|
_08100060:
|
|
ldr r4, =gSprites
|
|
movs r0, 0xC
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
movs r1, 0xA
|
|
strh r1, [r0, 0x2E]
|
|
movs r2, 0xC
|
|
ldrsh r1, [r5, r2]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
ldrh r1, [r5, 0x18]
|
|
strh r1, [r0, 0x30]
|
|
movs r3, 0xC
|
|
ldrsh r0, [r5, r3]
|
|
lsls r2, r0, 4
|
|
adds r2, r0
|
|
lsls r2, 2
|
|
adds r2, r4
|
|
movs r1, 0x1C
|
|
ldrsh r0, [r5, r1]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r3, 0x12
|
|
ldrsh r1, [r5, r3]
|
|
muls r1, r0
|
|
ldrh r0, [r5, 0x14]
|
|
subs r0, r1
|
|
strh r0, [r2, 0x32]
|
|
movs r0, 0xC
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
ldrh r1, [r5, 0x1A]
|
|
strh r1, [r0, 0x34]
|
|
movs r1, 0xC
|
|
ldrsh r0, [r5, r1]
|
|
lsls r1, r0, 4
|
|
adds r1, r0
|
|
lsls r1, 2
|
|
adds r1, r4
|
|
movs r2, 0x1E
|
|
ldrsh r0, [r5, r2]
|
|
lsrs r2, r0, 31
|
|
adds r0, r2
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r3, 0x12
|
|
ldrsh r2, [r5, r3]
|
|
muls r0, r2
|
|
ldrh r2, [r5, 0x16]
|
|
adds r0, r2
|
|
strh r0, [r1, 0x36]
|
|
movs r3, 0xC
|
|
ldrsh r1, [r5, r3]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
bl sub_8100504
|
|
movs r1, 0xC
|
|
ldrsh r2, [r5, r1]
|
|
lsls r1, r2, 4
|
|
adds r1, r2
|
|
lsls r1, 2
|
|
adds r1, r4
|
|
strh r0, [r1, 0x38]
|
|
movs r2, 0xC
|
|
ldrsh r1, [r5, r2]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
bl sub_80A68D4
|
|
ldr r0, =sub_8100128
|
|
str r0, [r5]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_80FFFC0
|
|
|
|
thumb_func_start sub_8100128
|
|
sub_8100128: @ 8100128
|
|
push {r4-r6,lr}
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
lsls r0, r2, 2
|
|
adds r0, r2
|
|
lsls r0, 3
|
|
ldr r1, =gTasks
|
|
adds r6, r0, r1
|
|
movs r0, 0xC
|
|
ldrsh r1, [r6, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
ldr r1, =gSprites
|
|
adds r4, r0, r1
|
|
movs r1, 0x8
|
|
ldrsh r5, [r6, r1]
|
|
cmp r5, 0x7
|
|
bne _08100150
|
|
b _08100380
|
|
_08100150:
|
|
cmp r5, 0x7
|
|
bgt _0810019E
|
|
cmp r5, 0x3
|
|
bne _0810015A
|
|
b _08100272
|
|
_0810015A:
|
|
cmp r5, 0x3
|
|
bgt _08100174
|
|
cmp r5, 0x1
|
|
beq _08100204
|
|
cmp r5, 0x1
|
|
bgt _08100254
|
|
cmp r5, 0
|
|
beq _081001E6
|
|
b _081004FC
|
|
.pool
|
|
_08100174:
|
|
cmp r5, 0x5
|
|
bne _0810017A
|
|
b _081002E8
|
|
_0810017A:
|
|
cmp r5, 0x5
|
|
ble _08100180
|
|
b _08100362
|
|
_08100180:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08100196
|
|
b _081004FC
|
|
_08100196:
|
|
movs r0, 0x5
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0xFF
|
|
b _081004FA
|
|
_0810019E:
|
|
cmp r5, 0xB
|
|
bne _081001A4
|
|
b _08100464
|
|
_081001A4:
|
|
cmp r5, 0xB
|
|
bgt _081001D2
|
|
cmp r5, 0x9
|
|
bne _081001AE
|
|
b _081003D2
|
|
_081001AE:
|
|
cmp r5, 0x9
|
|
ble _081001B4
|
|
b _08100448
|
|
_081001B4:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _081001CA
|
|
b _081004FC
|
|
_081001CA:
|
|
movs r0, 0x9
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0xFF
|
|
b _081004FA
|
|
_081001D2:
|
|
cmp r5, 0xD
|
|
bne _081001D8
|
|
b _081004D6
|
|
_081001D8:
|
|
cmp r5, 0xD
|
|
bge _081001DE
|
|
b _081004B6
|
|
_081001DE:
|
|
cmp r5, 0xFF
|
|
bne _081001E4
|
|
b _081004E6
|
|
_081001E4:
|
|
b _081004FC
|
|
_081001E6:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _081001FC
|
|
b _081004FC
|
|
_081001FC:
|
|
movs r0, 0x1
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0xFF
|
|
b _081004FA
|
|
_08100204:
|
|
ldrh r2, [r4, 0x24]
|
|
ldrh r3, [r4, 0x20]
|
|
adds r2, r3
|
|
movs r0, 0
|
|
strh r2, [r4, 0x20]
|
|
ldrh r1, [r4, 0x26]
|
|
ldrh r3, [r4, 0x22]
|
|
adds r1, r3
|
|
strh r1, [r4, 0x22]
|
|
strh r0, [r4, 0x24]
|
|
strh r0, [r4, 0x26]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
strh r2, [r4, 0x30]
|
|
ldrh r0, [r6, 0x14]
|
|
strh r0, [r4, 0x32]
|
|
strh r1, [r4, 0x34]
|
|
ldrh r0, [r6, 0x16]
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl sub_8100504
|
|
strh r0, [r4, 0x38]
|
|
ldrh r0, [r6, 0x10]
|
|
adds r0, 0x2
|
|
strh r0, [r6, 0x10]
|
|
strh r5, [r6, 0xE]
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_08100254:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _0810026A
|
|
b _081004FC
|
|
_0810026A:
|
|
movs r0, 0x3
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0xFF
|
|
b _081004FA
|
|
_08100272:
|
|
ldrh r1, [r4, 0x24]
|
|
ldrh r0, [r4, 0x20]
|
|
adds r1, r0
|
|
movs r0, 0
|
|
strh r1, [r4, 0x20]
|
|
ldrh r2, [r4, 0x26]
|
|
ldrh r3, [r4, 0x22]
|
|
adds r2, r3
|
|
strh r2, [r4, 0x22]
|
|
strh r0, [r4, 0x24]
|
|
strh r0, [r4, 0x26]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
strh r1, [r4, 0x30]
|
|
movs r1, 0x1C
|
|
ldrsh r0, [r6, r1]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r3, 0x12
|
|
ldrsh r1, [r6, r3]
|
|
muls r1, r0
|
|
ldrh r0, [r6, 0x14]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x32]
|
|
strh r2, [r4, 0x34]
|
|
movs r1, 0x1E
|
|
ldrsh r0, [r6, r1]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r2, 0x12
|
|
ldrsh r1, [r6, r2]
|
|
muls r1, r0
|
|
ldrh r0, [r6, 0x16]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl sub_8100504
|
|
strh r0, [r4, 0x38]
|
|
movs r0, 0x2
|
|
strh r0, [r6, 0xE]
|
|
ldrh r0, [r6, 0x10]
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_081002E8:
|
|
ldrh r1, [r4, 0x24]
|
|
ldrh r3, [r4, 0x20]
|
|
adds r1, r3
|
|
movs r0, 0
|
|
strh r1, [r4, 0x20]
|
|
ldrh r2, [r4, 0x26]
|
|
ldrh r3, [r4, 0x22]
|
|
adds r2, r3
|
|
strh r2, [r4, 0x22]
|
|
strh r0, [r4, 0x24]
|
|
strh r0, [r4, 0x26]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
strh r1, [r4, 0x30]
|
|
movs r1, 0x1C
|
|
ldrsh r0, [r6, r1]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r3, 0x12
|
|
ldrsh r1, [r6, r3]
|
|
muls r0, r1
|
|
ldrh r1, [r6, 0x14]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x32]
|
|
strh r2, [r4, 0x34]
|
|
movs r2, 0x1E
|
|
ldrsh r0, [r6, r2]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r3, 0x12
|
|
ldrsh r1, [r6, r3]
|
|
muls r0, r1
|
|
ldrh r1, [r6, 0x16]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl sub_8100504
|
|
strh r0, [r4, 0x38]
|
|
ldrh r1, [r6, 0x10]
|
|
subs r1, 0x2
|
|
strh r1, [r6, 0x10]
|
|
movs r0, 0x3
|
|
strh r0, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
adds r0, 0x43
|
|
strb r1, [r0]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_08100362:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08100378
|
|
b _081004FC
|
|
_08100378:
|
|
movs r0, 0x7
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0xFF
|
|
b _081004FA
|
|
_08100380:
|
|
ldrh r2, [r4, 0x24]
|
|
ldrh r3, [r4, 0x20]
|
|
adds r2, r3
|
|
movs r0, 0
|
|
strh r2, [r4, 0x20]
|
|
ldrh r1, [r4, 0x26]
|
|
ldrh r3, [r4, 0x22]
|
|
adds r1, r3
|
|
strh r1, [r4, 0x22]
|
|
strh r0, [r4, 0x24]
|
|
strh r0, [r4, 0x26]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
strh r2, [r4, 0x30]
|
|
ldrh r0, [r6, 0x14]
|
|
strh r0, [r4, 0x32]
|
|
strh r1, [r4, 0x34]
|
|
ldrh r0, [r6, 0x16]
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl sub_8100504
|
|
strh r0, [r4, 0x38]
|
|
ldrh r1, [r6, 0x10]
|
|
adds r1, 0x2
|
|
strh r1, [r6, 0x10]
|
|
movs r0, 0x4
|
|
strh r0, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
adds r0, 0x43
|
|
strb r1, [r0]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_081003D2:
|
|
ldrh r1, [r4, 0x24]
|
|
ldrh r0, [r4, 0x20]
|
|
adds r1, r0
|
|
movs r0, 0
|
|
strh r1, [r4, 0x20]
|
|
ldrh r2, [r4, 0x26]
|
|
ldrh r3, [r4, 0x22]
|
|
adds r2, r3
|
|
strh r2, [r4, 0x22]
|
|
strh r0, [r4, 0x24]
|
|
strh r0, [r4, 0x26]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
strh r1, [r4, 0x30]
|
|
movs r1, 0x1C
|
|
ldrsh r0, [r6, r1]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r3, 0x12
|
|
ldrsh r1, [r6, r3]
|
|
muls r1, r0
|
|
ldrh r0, [r6, 0x14]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x32]
|
|
strh r2, [r4, 0x34]
|
|
movs r1, 0x1E
|
|
ldrsh r0, [r6, r1]
|
|
lsrs r1, r0, 31
|
|
adds r0, r1
|
|
asrs r0, 1
|
|
adds r0, 0xA
|
|
movs r2, 0x12
|
|
ldrsh r1, [r6, r2]
|
|
muls r0, r1
|
|
ldrh r3, [r6, 0x16]
|
|
adds r0, r3
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl sub_8100504
|
|
strh r0, [r4, 0x38]
|
|
movs r0, 0x5
|
|
strh r0, [r6, 0xE]
|
|
ldrh r0, [r6, 0x10]
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_08100448:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081004FC
|
|
movs r0, 0xB
|
|
strh r0, [r6, 0x26]
|
|
movs r0, 0xFF
|
|
b _081004FA
|
|
_08100464:
|
|
ldrh r2, [r4, 0x24]
|
|
ldrh r0, [r4, 0x20]
|
|
adds r2, r0
|
|
movs r0, 0
|
|
strh r2, [r4, 0x20]
|
|
ldrh r1, [r4, 0x26]
|
|
ldrh r3, [r4, 0x22]
|
|
adds r1, r3
|
|
strh r1, [r4, 0x22]
|
|
strh r0, [r4, 0x24]
|
|
strh r0, [r4, 0x26]
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x2E]
|
|
strh r2, [r4, 0x30]
|
|
ldrh r0, [r6, 0x18]
|
|
strh r0, [r4, 0x32]
|
|
strh r1, [r4, 0x34]
|
|
ldrh r0, [r6, 0x1A]
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl sub_8100504
|
|
strh r0, [r4, 0x38]
|
|
ldrh r1, [r6, 0x10]
|
|
subs r1, 0x2
|
|
strh r1, [r6, 0x10]
|
|
movs r0, 0x6
|
|
strh r0, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
adds r0, 0x43
|
|
strb r1, [r0]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
adds r0, r4, 0
|
|
bl sub_80A68D4
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_081004B6:
|
|
adds r0, r6, 0
|
|
adds r1, r2, 0
|
|
bl sub_8100524
|
|
adds r0, r4, 0
|
|
bl TranslateAnimArc
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081004FC
|
|
adds r0, r4, 0
|
|
bl DestroySprite
|
|
ldrh r0, [r6, 0x8]
|
|
adds r0, 0x1
|
|
b _081004FA
|
|
_081004D6:
|
|
movs r1, 0x20
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
bne _081004FC
|
|
adds r0, r2, 0
|
|
bl DestroyAnimVisualTask
|
|
b _081004FC
|
|
_081004E6:
|
|
ldrh r0, [r6, 0xA]
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0xA]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x5
|
|
ble _081004FC
|
|
movs r0, 0
|
|
strh r0, [r6, 0xA]
|
|
ldrh r0, [r6, 0x26]
|
|
_081004FA:
|
|
strh r0, [r6, 0x8]
|
|
_081004FC:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8100128
|
|
|
|
thumb_func_start sub_8100504
|
|
sub_8100504: @ 8100504
|
|
push {lr}
|
|
movs r2, 0x8
|
|
movs r3, 0x36
|
|
ldrsh r1, [r0, r3]
|
|
movs r3, 0x22
|
|
ldrsh r0, [r0, r3]
|
|
cmp r1, r0
|
|
bge _0810051A
|
|
negs r0, r2
|
|
lsls r0, 16
|
|
lsrs r2, r0, 16
|
|
_0810051A:
|
|
lsls r0, r2, 16
|
|
asrs r0, 16
|
|
pop {r1}
|
|
bx r1
|
|
thumb_func_end sub_8100504
|
|
|
|
thumb_func_start sub_8100524
|
|
sub_8100524: @ 8100524
|
|
push {r4-r7,lr}
|
|
mov r7, r8
|
|
push {r7}
|
|
adds r6, r0, 0
|
|
lsls r1, 24
|
|
lsrs r7, r1, 24
|
|
ldrh r0, [r6, 0x24]
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0x24]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
ble _081005BA
|
|
movs r0, 0
|
|
strh r0, [r6, 0x24]
|
|
ldr r0, =gSprites
|
|
mov r8, r0
|
|
movs r2, 0xC
|
|
ldrsh r1, [r6, r2]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
add r0, r8
|
|
ldrh r1, [r0, 0x24]
|
|
ldrh r2, [r0, 0x20]
|
|
adds r1, r2
|
|
ldrh r2, [r0, 0x26]
|
|
ldrh r0, [r0, 0x22]
|
|
adds r2, r0
|
|
ldr r0, =gUnknown_08592778
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
lsls r2, 16
|
|
asrs r2, 16
|
|
ldrb r3, [r6, 0x10]
|
|
bl CreateSprite
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x40
|
|
beq _081005BA
|
|
lsls r5, r0, 4
|
|
adds r5, r0
|
|
lsls r5, 2
|
|
mov r0, r8
|
|
adds r4, r5, r0
|
|
strh r7, [r4, 0x3A]
|
|
movs r0, 0xC
|
|
strh r0, [r4, 0x3C]
|
|
ldr r0, =gTasks
|
|
lsls r1, r7, 2
|
|
adds r1, r7
|
|
lsls r1, 3
|
|
adds r1, r0
|
|
ldrh r0, [r1, 0x20]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x20]
|
|
ldrh r2, [r6, 0x22]
|
|
movs r0, 0x1
|
|
ands r0, r2
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r1, 0x22]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x22]
|
|
ldrb r1, [r6, 0xE]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
ldrh r0, [r6, 0x10]
|
|
adds r4, 0x43
|
|
strb r0, [r4]
|
|
mov r0, r8
|
|
adds r0, 0x1C
|
|
adds r5, r0
|
|
ldr r0, =sub_81005D4
|
|
str r0, [r5]
|
|
_081005BA:
|
|
pop {r3}
|
|
mov r8, r3
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100524
|
|
|
|
thumb_func_start sub_81005D4
|
|
sub_81005D4: @ 81005D4
|
|
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
|
|
ble _08100636
|
|
movs r0, 0
|
|
strh r0, [r4, 0x2E]
|
|
adds r3, r4, 0
|
|
adds r3, 0x3E
|
|
ldrb r2, [r3]
|
|
lsls r0, r2, 29
|
|
lsrs r0, 31
|
|
movs r1, 0x1
|
|
eors r1, r0
|
|
lsls r1, 2
|
|
movs r0, 0x5
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r3]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x8
|
|
ble _08100636
|
|
ldr r3, =gTasks
|
|
movs r0, 0x3C
|
|
ldrsh r1, [r4, r0]
|
|
lsls r1, 1
|
|
movs r0, 0x3A
|
|
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]
|
|
adds r0, r4, 0
|
|
bl DestroySprite
|
|
_08100636:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81005D4
|
|
|
|
thumb_func_start sub_8100640
|
|
sub_8100640: @ 8100640
|
|
push {r4-r7,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0xC
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _0810065C
|
|
ldr r0, =gBattleAnimAttacker
|
|
b _0810065E
|
|
.pool
|
|
_0810065C:
|
|
ldr r0, =gBattleAnimTarget
|
|
_0810065E:
|
|
ldrb r6, [r0]
|
|
adds r0, r6, 0
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100688
|
|
movs r0, 0
|
|
strh r0, [r4, 0x36]
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1, 0x6]
|
|
strh r0, [r4, 0x32]
|
|
ldr r0, =0x0000fff0
|
|
b _08100698
|
|
.pool
|
|
_08100688:
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x36]
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1, 0x6]
|
|
negs r0, r0
|
|
strh r0, [r4, 0x32]
|
|
movs r0, 0x80
|
|
lsls r0, 1
|
|
_08100698:
|
|
strh r0, [r4, 0x20]
|
|
adds r7, r1, 0
|
|
adds r5, r7, 0
|
|
ldrh r0, [r5, 0x2]
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r5, 0x4]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r5, 0x8]
|
|
strh r0, [r4, 0x34]
|
|
movs r1, 0xA
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0x1
|
|
beq _081006CE
|
|
cmp r0, 0x1
|
|
bgt _081006C0
|
|
cmp r0, 0
|
|
beq _081006CA
|
|
b _08100738
|
|
.pool
|
|
_081006C0:
|
|
cmp r0, 0x2
|
|
beq _081006D4
|
|
cmp r0, 0x3
|
|
beq _08100700
|
|
b _08100738
|
|
_081006CA:
|
|
ldrh r0, [r5]
|
|
b _081006E4
|
|
_081006CE:
|
|
ldrh r0, [r5]
|
|
strh r0, [r4, 0x22]
|
|
b _0810071A
|
|
_081006D4:
|
|
adds r0, r6, 0
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r5, [r5]
|
|
adds r0, r5
|
|
_081006E4:
|
|
strh r0, [r4, 0x22]
|
|
adds r0, r6, 0
|
|
bl sub_80A8328
|
|
movs r1, 0x3
|
|
ands r1, r0
|
|
lsls r1, 2
|
|
ldrb r2, [r4, 0x5]
|
|
movs r0, 0xD
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r4, 0x5]
|
|
b _08100738
|
|
_08100700:
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r7, [r7]
|
|
adds r0, r7
|
|
strh r0, [r4, 0x22]
|
|
movs r0, 0x1
|
|
bl GetAnimBattlerSpriteId
|
|
_0810071A:
|
|
adds r0, r6, 0
|
|
bl sub_80A8328
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, 0x1
|
|
movs r1, 0x3
|
|
ands r0, r1
|
|
lsls r0, 2
|
|
ldrb r2, [r4, 0x5]
|
|
movs r1, 0xD
|
|
negs r1, r1
|
|
ands r1, r2
|
|
orrs r1, r0
|
|
strb r1, [r4, 0x5]
|
|
_08100738:
|
|
ldr r0, =sub_810074C
|
|
str r0, [r4, 0x1C]
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100640
|
|
|
|
thumb_func_start sub_810074C
|
|
sub_810074C: @ 810074C
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r0, 0x3C
|
|
ldrsh r3, [r4, r0]
|
|
ldrh r0, [r4, 0x3C]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x3C]
|
|
movs r1, 0x30
|
|
ldrsh r2, [r4, r1]
|
|
ldr r1, =gSineTable
|
|
movs r5, 0x2E
|
|
ldrsh r0, [r4, r5]
|
|
lsls r0, 1
|
|
adds r0, r1
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
muls r0, r2
|
|
asrs r0, 8
|
|
strh r0, [r4, 0x26]
|
|
movs r2, 0x32
|
|
ldrsh r0, [r4, r2]
|
|
muls r0, r3
|
|
strh r0, [r4, 0x24]
|
|
movs r5, 0x34
|
|
ldrsh r0, [r4, r5]
|
|
muls r0, r3
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x2E]
|
|
movs r1, 0x36
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
bne _081007A4
|
|
movs r2, 0x24
|
|
ldrsh r0, [r4, r2]
|
|
movs r5, 0x20
|
|
ldrsh r1, [r4, r5]
|
|
adds r0, r1
|
|
cmp r0, 0xF7
|
|
ble _081007BC
|
|
b _081007B6
|
|
.pool
|
|
_081007A4:
|
|
movs r1, 0x24
|
|
ldrsh r0, [r4, r1]
|
|
movs r2, 0x20
|
|
ldrsh r1, [r4, r2]
|
|
adds r0, r1
|
|
movs r1, 0x10
|
|
negs r1, r1
|
|
cmp r0, r1
|
|
bgt _081007BC
|
|
_081007B6:
|
|
adds r0, r4, 0
|
|
bl move_anim_8074EE0
|
|
_081007BC:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_810074C
|
|
|
|
thumb_func_start sub_81007C4
|
|
sub_81007C4: @ 81007C4
|
|
push {r4-r7,lr}
|
|
lsls r0, 24
|
|
lsrs r6, r0, 24
|
|
lsls r0, r6, 2
|
|
adds r0, r6
|
|
lsls r0, 3
|
|
ldr r1, =gTasks
|
|
adds r5, r0, r1
|
|
movs r1, 0x8
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0
|
|
beq _081007E8
|
|
cmp r0, 0x1
|
|
beq _0810081C
|
|
b _08100876
|
|
.pool
|
|
_081007E8:
|
|
ldr r0, =0x0000274f
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 20
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
adds r4, r2, 0
|
|
adds r0, r4
|
|
strh r0, [r5, 0x18]
|
|
ldr r0, =0x000027b0
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 20
|
|
adds r0, r4
|
|
strh r0, [r5, 0x20]
|
|
ldrh r0, [r5, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x8]
|
|
b _08100876
|
|
.pool
|
|
_0810081C:
|
|
ldrh r0, [r5, 0x1A]
|
|
adds r0, 0x1
|
|
movs r7, 0
|
|
strh r0, [r5, 0x1A]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
blt _08100876
|
|
strh r7, [r5, 0x1A]
|
|
ldrh r0, [r5, 0x18]
|
|
ldrb r2, [r5, 0x1C]
|
|
ldr r4, =gUnknown_08592878
|
|
movs r3, 0x1E
|
|
ldrsh r1, [r5, r3]
|
|
lsls r1, 1
|
|
adds r1, r4
|
|
ldrh r3, [r1]
|
|
movs r1, 0x10
|
|
bl BlendPalette
|
|
ldrh r0, [r5, 0x20]
|
|
ldrb r2, [r5, 0x1C]
|
|
movs r3, 0x1E
|
|
ldrsh r1, [r5, r3]
|
|
lsls r1, 1
|
|
adds r1, r4
|
|
ldrh r3, [r1]
|
|
movs r1, 0x10
|
|
bl BlendPalette
|
|
ldrh r0, [r5, 0x1C]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x1C]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x11
|
|
bne _08100876
|
|
strh r7, [r5, 0x1C]
|
|
ldrh r0, [r5, 0x1E]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x1E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x7
|
|
bne _08100876
|
|
strh r7, [r5, 0x1E]
|
|
_08100876:
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r2, 0xE
|
|
ldrsh r1, [r0, r2]
|
|
movs r0, 0x1
|
|
negs r0, r0
|
|
cmp r1, r0
|
|
bne _0810088A
|
|
adds r0, r6, 0
|
|
bl DestroyAnimVisualTask
|
|
_0810088A:
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81007C4
|
|
|
|
thumb_func_start sub_8100898
|
|
sub_8100898: @ 8100898
|
|
push {r4-r7,lr}
|
|
sub sp, 0x4
|
|
adds r6, r0, 0
|
|
ldr r1, =gBattleAnimArgs
|
|
movs r2, 0x8
|
|
ldrsh r0, [r1, r2]
|
|
cmp r0, 0
|
|
bne _081008B4
|
|
adds r0, r6, 0
|
|
bl DestroyAnimSprite
|
|
b _0810098E
|
|
.pool
|
|
_081008B4:
|
|
movs r3, 0
|
|
ldrsh r0, [r1, r3]
|
|
cmp r0, 0
|
|
bne _081008C4
|
|
ldr r4, =gBattleAnimAttacker
|
|
b _081008C6
|
|
.pool
|
|
_081008C4:
|
|
ldr r4, =gBattleAnimTarget
|
|
_081008C6:
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r5, r0, 24
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0, 0x8]
|
|
strh r1, [r6, 0x2E]
|
|
movs r3, 0x2
|
|
ldrsh r1, [r0, r3]
|
|
adds r7, r0, 0
|
|
cmp r1, 0
|
|
bne _08100908
|
|
ldrh r0, [r7, 0x4]
|
|
adds r0, r5
|
|
strh r0, [r6, 0x20]
|
|
ldrh r0, [r7, 0x6]
|
|
adds r0, r2
|
|
strh r0, [r6, 0x22]
|
|
strh r5, [r6, 0x38]
|
|
strh r2, [r6, 0x3A]
|
|
b _08100918
|
|
.pool
|
|
_08100908:
|
|
strh r5, [r6, 0x20]
|
|
strh r2, [r6, 0x22]
|
|
ldrh r0, [r7, 0x4]
|
|
adds r0, r5
|
|
strh r0, [r6, 0x38]
|
|
ldrh r0, [r7, 0x6]
|
|
adds r0, r2
|
|
strh r0, [r6, 0x3A]
|
|
_08100918:
|
|
ldrh r4, [r6, 0x20]
|
|
lsls r0, r4, 4
|
|
strh r0, [r6, 0x30]
|
|
ldrh r5, [r6, 0x22]
|
|
lsls r0, r5, 4
|
|
strh r0, [r6, 0x32]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r6, r1]
|
|
movs r2, 0x20
|
|
ldrsh r1, [r6, r2]
|
|
subs r0, r1
|
|
lsls r0, 4
|
|
movs r3, 0x8
|
|
ldrsh r1, [r7, r3]
|
|
bl __divsi3
|
|
strh r0, [r6, 0x34]
|
|
movs r1, 0x3A
|
|
ldrsh r0, [r6, r1]
|
|
movs r2, 0x22
|
|
ldrsh r1, [r6, r2]
|
|
subs r0, r1
|
|
lsls r0, 4
|
|
movs r3, 0x8
|
|
ldrsh r1, [r7, r3]
|
|
bl __divsi3
|
|
strh r0, [r6, 0x36]
|
|
ldrh r0, [r6, 0x38]
|
|
subs r0, r4
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
ldrh r1, [r6, 0x3A]
|
|
subs r1, r5
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
bl ArcTan2Neg
|
|
lsls r0, 16
|
|
lsrs r4, r0, 16
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _0810097A
|
|
ldr r1, =0xffff8000
|
|
adds r0, r4, r1
|
|
lsls r0, 16
|
|
lsrs r4, r0, 16
|
|
_0810097A:
|
|
movs r3, 0x80
|
|
lsls r3, 1
|
|
str r4, [sp]
|
|
adds r0, r6, 0
|
|
movs r1, 0
|
|
adds r2, r3, 0
|
|
bl sub_80A73E0
|
|
ldr r0, =sub_81009A0
|
|
str r0, [r6, 0x1C]
|
|
_0810098E:
|
|
add sp, 0x4
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100898
|
|
|
|
thumb_func_start sub_81009A0
|
|
sub_81009A0: @ 81009A0
|
|
push {r4,lr}
|
|
adds r2, r0, 0
|
|
ldrh r3, [r2, 0x2E]
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r2, r1]
|
|
cmp r0, 0
|
|
beq _081009D0
|
|
ldrh r0, [r2, 0x34]
|
|
ldrh r4, [r2, 0x30]
|
|
adds r0, r4
|
|
strh r0, [r2, 0x30]
|
|
ldrh r1, [r2, 0x36]
|
|
ldrh r4, [r2, 0x32]
|
|
adds r1, r4
|
|
strh r1, [r2, 0x32]
|
|
lsls r0, 16
|
|
asrs r0, 20
|
|
strh r0, [r2, 0x20]
|
|
lsls r1, 16
|
|
asrs r1, 20
|
|
strh r1, [r2, 0x22]
|
|
subs r0, r3, 0x1
|
|
strh r0, [r2, 0x2E]
|
|
b _081009D6
|
|
_081009D0:
|
|
adds r0, r2, 0
|
|
bl move_anim_8074EE0
|
|
_081009D6:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81009A0
|
|
|
|
thumb_func_start sub_81009DC
|
|
sub_81009DC: @ 81009DC
|
|
push {lr}
|
|
adds r2, r0, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x10
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _081009F2
|
|
adds r0, r2, 0
|
|
bl DestroyAnimSprite
|
|
_081009F2:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81009DC
|
|
|
|
thumb_func_start sub_81009F8
|
|
sub_81009F8: @ 81009F8
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100A20
|
|
ldr r2, =gBattleAnimArgs
|
|
ldrh r0, [r4, 0x20]
|
|
ldrh r1, [r2]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x20]
|
|
ldrh r0, [r2, 0x2]
|
|
b _08100A2C
|
|
.pool
|
|
_08100A20:
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0]
|
|
ldrh r2, [r4, 0x20]
|
|
adds r1, r2
|
|
strh r1, [r4, 0x20]
|
|
ldrh r0, [r0, 0x2]
|
|
_08100A2C:
|
|
ldrh r1, [r4, 0x22]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x22]
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r4, 0x1C]
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81009F8
|
|
|
|
thumb_func_start sub_8100A50
|
|
sub_8100A50: @ 8100A50
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08100A6A
|
|
adds r0, r5, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAnim
|
|
_08100A6A:
|
|
ldr r0, =sub_81009DC
|
|
str r0, [r5, 0x1C]
|
|
ldr r4, =gBattleAnimArgs
|
|
movs r0, 0
|
|
ldrsh r1, [r4, r0]
|
|
adds r0, r5, 0
|
|
bl sub_80A6864
|
|
ldrh r0, [r4, 0x2]
|
|
ldrh r1, [r5, 0x22]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x22]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100A50
|
|
|
|
thumb_func_start sub_8100A94
|
|
sub_8100A94: @ 8100A94
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
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]
|
|
ldrh r0, [r1, 0x4]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r1, 0x6]
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r1, 0x8]
|
|
strh r0, [r4, 0x34]
|
|
ldrh r0, [r1, 0xA]
|
|
strh r0, [r4, 0x38]
|
|
ldrb r1, [r1, 0xC]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAffineAnim
|
|
ldr r1, =move_anim_8074EE0
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A66DC
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100A94
|
|
|
|
thumb_func_start sub_8100AE0
|
|
sub_8100AE0: @ 8100AE0
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldr r4, =gBattleAnimTarget
|
|
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
|
|
strh r0, [r5, 0x22]
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08100B14
|
|
ldrh r0, [r5, 0x22]
|
|
adds r0, 0x8
|
|
strh r0, [r5, 0x22]
|
|
_08100B14:
|
|
ldr r0, =sub_8100CCC
|
|
str r0, [r5, 0x1C]
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r2, 0x4
|
|
ldrsh r1, [r0, r2]
|
|
adds r3, r0, 0
|
|
cmp r1, 0
|
|
bne _08100B3C
|
|
ldrh r0, [r3]
|
|
ldrh r1, [r5, 0x20]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x20]
|
|
b _08100B50
|
|
.pool
|
|
_08100B3C:
|
|
ldrh r0, [r5, 0x20]
|
|
ldrh r1, [r3]
|
|
subs r0, r1
|
|
strh r0, [r5, 0x20]
|
|
adds r2, r5, 0
|
|
adds r2, 0x3F
|
|
ldrb r0, [r2]
|
|
movs r1, 0x1
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
_08100B50:
|
|
ldrh r0, [r3, 0x2]
|
|
ldrh r2, [r5, 0x22]
|
|
adds r0, r2
|
|
strh r0, [r5, 0x22]
|
|
ldr r1, =0xfffffc00
|
|
adds r0, r1, 0
|
|
ldrh r2, [r5, 0x30]
|
|
adds r1, r0, r2
|
|
strh r1, [r5, 0x30]
|
|
movs r2, 0x80
|
|
lsls r2, 3
|
|
adds r0, r2, 0
|
|
ldrh r2, [r5, 0x32]
|
|
adds r0, r2
|
|
strh r0, [r5, 0x32]
|
|
ldrh r0, [r3, 0x4]
|
|
strh r0, [r5, 0x38]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
bne _08100B7E
|
|
negs r0, r1
|
|
strh r0, [r5, 0x30]
|
|
_08100B7E:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100AE0
|
|
|
|
thumb_func_start sub_8100B88
|
|
sub_8100B88: @ 8100B88
|
|
push {r4-r7,lr}
|
|
mov r7, r8
|
|
push {r7}
|
|
adds r6, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0x6
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0x1
|
|
beq _08100BA8
|
|
cmp r0, 0x1
|
|
ble _08100C24
|
|
cmp r0, 0x2
|
|
beq _08100BC8
|
|
b _08100C24
|
|
.pool
|
|
_08100BA8:
|
|
ldr r5, =gBattleAnimTarget
|
|
ldrb r0, [r5]
|
|
movs r4, 0x2
|
|
eors r0, r4
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r7, r0, 24
|
|
ldrb r0, [r5]
|
|
eors r4, r0
|
|
adds r0, r4, 0
|
|
b _08100C34
|
|
.pool
|
|
_08100BC8:
|
|
ldr r5, =gBattleAnimTarget
|
|
ldrb r0, [r5]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r7, r0, 24
|
|
ldrb r0, [r5]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
ldrb r0, [r5]
|
|
movs r2, 0x2
|
|
mov r8, r2
|
|
mov r1, r8
|
|
eors r0, r1
|
|
bl IsBattlerSpriteVisible
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100C3E
|
|
ldrb r0, [r5]
|
|
mov r2, r8
|
|
eors r0, r2
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, r7
|
|
lsrs r7, r0, 1
|
|
ldrb r0, [r5]
|
|
mov r1, r8
|
|
eors r0, r1
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, r4
|
|
lsrs r4, r0, 1
|
|
b _08100C3E
|
|
.pool
|
|
_08100C24:
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r7, r0, 24
|
|
ldrb r0, [r4]
|
|
_08100C34:
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
_08100C3E:
|
|
strh r7, [r6, 0x20]
|
|
strh r4, [r6, 0x22]
|
|
ldr r0, =gBattleAnimTarget
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08100C56
|
|
ldrh r0, [r6, 0x22]
|
|
adds r0, 0x8
|
|
strh r0, [r6, 0x22]
|
|
_08100C56:
|
|
ldr r0, =sub_8100CCC
|
|
str r0, [r6, 0x1C]
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r2, 0x4
|
|
ldrsh r1, [r0, r2]
|
|
adds r3, r0, 0
|
|
cmp r1, 0
|
|
bne _08100C7C
|
|
ldrh r0, [r3]
|
|
ldrh r1, [r6, 0x20]
|
|
adds r0, r1
|
|
strh r0, [r6, 0x20]
|
|
b _08100C90
|
|
.pool
|
|
_08100C7C:
|
|
ldrh r0, [r6, 0x20]
|
|
ldrh r1, [r3]
|
|
subs r0, r1
|
|
strh r0, [r6, 0x20]
|
|
adds r2, r6, 0
|
|
adds r2, 0x3F
|
|
ldrb r0, [r2]
|
|
movs r1, 0x1
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
_08100C90:
|
|
ldrh r0, [r3, 0x2]
|
|
ldrh r2, [r6, 0x22]
|
|
adds r0, r2
|
|
strh r0, [r6, 0x22]
|
|
ldr r1, =0xfffffc00
|
|
adds r0, r1, 0
|
|
ldrh r2, [r6, 0x30]
|
|
adds r1, r0, r2
|
|
strh r1, [r6, 0x30]
|
|
movs r2, 0x80
|
|
lsls r2, 3
|
|
adds r0, r2, 0
|
|
ldrh r2, [r6, 0x32]
|
|
adds r0, r2
|
|
strh r0, [r6, 0x32]
|
|
ldrh r0, [r3, 0x4]
|
|
strh r0, [r6, 0x38]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
bne _08100CBE
|
|
negs r0, r1
|
|
strh r0, [r6, 0x30]
|
|
_08100CBE:
|
|
pop {r3}
|
|
mov r8, r3
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100B88
|
|
|
|
thumb_func_start sub_8100CCC
|
|
sub_8100CCC: @ 8100CCC
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldrh r1, [r4, 0x30]
|
|
ldrh r2, [r4, 0x34]
|
|
adds r0, r1, r2
|
|
strh r0, [r4, 0x34]
|
|
ldrh r0, [r4, 0x32]
|
|
ldrh r2, [r4, 0x36]
|
|
adds r0, r2
|
|
strh r0, [r4, 0x36]
|
|
movs r2, 0x38
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
bne _08100CEE
|
|
adds r0, r1, 0
|
|
adds r0, 0x18
|
|
b _08100CF2
|
|
_08100CEE:
|
|
adds r0, r1, 0
|
|
subs r0, 0x18
|
|
_08100CF2:
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r4, 0x32]
|
|
subs r0, 0x18
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r4, 0x34]
|
|
lsls r0, 16
|
|
asrs r0, 24
|
|
strh r0, [r4, 0x24]
|
|
ldrh r0, [r4, 0x36]
|
|
lsls r0, 16
|
|
asrs r0, 24
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x14
|
|
bne _08100D28
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
movs r0, 0x3
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r4, 0x1C]
|
|
_08100D28:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100CCC
|
|
|
|
thumb_func_start sub_8100D38
|
|
sub_8100D38: @ 8100D38
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldrh r1, [r5, 0x32]
|
|
movs r2, 0x32
|
|
ldrsh r0, [r5, r2]
|
|
cmp r0, 0x1
|
|
ble _08100DDC
|
|
ldrh r1, [r5, 0x34]
|
|
movs r0, 0x1
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _08100D94
|
|
adds r3, r5, 0
|
|
adds r3, 0x3E
|
|
ldrb r1, [r3]
|
|
movs r2, 0x5
|
|
negs r2, r2
|
|
adds r0, r2, 0
|
|
ands r0, r1
|
|
strb r0, [r3]
|
|
ldr r4, =gSprites
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
adds r0, 0x3E
|
|
ldrb r3, [r0]
|
|
adds r1, r2, 0
|
|
ands r1, r3
|
|
strb r1, [r0]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
adds r0, 0x3E
|
|
ldrb r1, [r0]
|
|
ands r2, r1
|
|
strb r2, [r0]
|
|
b _08100DCA
|
|
.pool
|
|
_08100D94:
|
|
adds r1, r5, 0
|
|
adds r1, 0x3E
|
|
ldrb r0, [r1]
|
|
movs r2, 0x4
|
|
orrs r0, r2
|
|
strb r0, [r1]
|
|
ldr r3, =gSprites
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r3
|
|
adds r0, 0x3E
|
|
ldrb r1, [r0]
|
|
orrs r1, r2
|
|
strb r1, [r0]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r3
|
|
adds r0, 0x3E
|
|
ldrb r1, [r0]
|
|
orrs r1, r2
|
|
strb r1, [r0]
|
|
_08100DCA:
|
|
movs r0, 0
|
|
strh r0, [r5, 0x32]
|
|
ldrh r0, [r5, 0x34]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x34]
|
|
b _08100DE0
|
|
.pool
|
|
_08100DDC:
|
|
adds r0, r1, 0x1
|
|
strh r0, [r5, 0x32]
|
|
_08100DE0:
|
|
movs r1, 0x34
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0xA
|
|
bne _08100E10
|
|
movs r2, 0x2E
|
|
ldrsh r1, [r5, r2]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
ldr r4, =gSprites
|
|
adds r0, r4
|
|
bl DestroySprite
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r4
|
|
bl DestroySprite
|
|
adds r0, r5, 0
|
|
bl DestroyAnimSprite
|
|
_08100E10:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100D38
|
|
|
|
thumb_func_start sub_8100E1C
|
|
sub_8100E1C: @ 8100E1C
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrh r0, [r4, 0x4]
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100E44
|
|
ldrh r0, [r5, 0x20]
|
|
ldrh r1, [r4]
|
|
subs r0, r1
|
|
b _08100E4A
|
|
.pool
|
|
_08100E44:
|
|
ldrh r0, [r4]
|
|
ldrh r1, [r5, 0x20]
|
|
adds r0, r1
|
|
_08100E4A:
|
|
strh r0, [r5, 0x20]
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrb r1, [r4, 0xA]
|
|
adds r0, r5, 0
|
|
bl StartSpriteAnim
|
|
ldrh r0, [r4, 0x6]
|
|
negs r0, r0
|
|
strh r0, [r5, 0x30]
|
|
ldrh r0, [r4, 0x2]
|
|
ldrh r1, [r5, 0x22]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x22]
|
|
ldrh r0, [r4, 0x8]
|
|
strh r0, [r5, 0x34]
|
|
ldr r1, =sub_8100E80
|
|
str r1, [r5, 0x1C]
|
|
adds r0, r5, 0
|
|
bl _call_via_r1
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100E1C
|
|
|
|
thumb_func_start sub_8100E80
|
|
sub_8100E80: @ 8100E80
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x64
|
|
bl Cos
|
|
strh r0, [r4, 0x24]
|
|
movs r2, 0x2E
|
|
ldrsh r0, [r4, r2]
|
|
movs r1, 0x14
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x7F
|
|
bgt _08100EAC
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
movs r0, 0
|
|
b _08100EB2
|
|
_08100EAC:
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
movs r0, 0xE
|
|
_08100EB2:
|
|
strb r0, [r1]
|
|
ldrh r0, [r4, 0x30]
|
|
ldrh r2, [r4, 0x2E]
|
|
adds r0, r2
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0x82
|
|
strh r0, [r4, 0x38]
|
|
lsls r0, 16
|
|
asrs r0, 24
|
|
ldrh r1, [r4, 0x26]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x32]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x32]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r2, 0x34
|
|
ldrsh r1, [r4, r2]
|
|
cmp r0, r1
|
|
bne _08100EE8
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_08100EE8:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8100E80
|
|
|
|
thumb_func_start sub_8100EF0
|
|
sub_8100EF0: @ 8100EF0
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100F06
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1, 0x2]
|
|
adds r0, 0x8
|
|
strh r0, [r1, 0x2]
|
|
_08100F06:
|
|
ldr r6, =gBattleAnimAttacker
|
|
ldrb r0, [r6]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord2
|
|
lsls r0, 24
|
|
ldr r4, =gBattleAnimArgs
|
|
lsrs r0, 24
|
|
ldrh r1, [r4]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x20]
|
|
ldrb r0, [r6]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord2
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r4, [r4, 0x2]
|
|
adds r0, r4
|
|
strh r0, [r5, 0x22]
|
|
ldrb r0, [r6]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100F44
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08100F6C
|
|
_08100F44:
|
|
ldrb r0, [r6]
|
|
bl sub_80A8328
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, 0x1
|
|
movs r1, 0x3
|
|
ands r0, r1
|
|
lsls r0, 2
|
|
ldrb r2, [r5, 0x5]
|
|
movs r1, 0xD
|
|
negs r1, r1
|
|
ands r1, r2
|
|
orrs r1, r0
|
|
strb r1, [r5, 0x5]
|
|
b _08100F84
|
|
.pool
|
|
_08100F6C:
|
|
ldrb r0, [r6]
|
|
bl sub_80A8328
|
|
movs r1, 0x3
|
|
ands r1, r0
|
|
lsls r1, 2
|
|
ldrb r2, [r5, 0x5]
|
|
movs r0, 0xD
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r5, 0x5]
|
|
_08100F84:
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0x4]
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =0x00002828
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 20
|
|
movs r1, 0x80
|
|
lsls r1, 1
|
|
adds r0, r1
|
|
strh r0, [r5, 0x32]
|
|
movs r4, 0x10
|
|
movs r0, 0x10
|
|
strh r0, [r5, 0x3C]
|
|
movs r1, 0xFD
|
|
lsls r1, 6
|
|
movs r0, 0x50
|
|
bl SetGpuReg
|
|
ldrh r0, [r5, 0x3C]
|
|
lsls r1, r0, 8
|
|
subs r4, r0
|
|
orrs r1, r4
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
ldr r0, =sub_8100FD4
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100EF0
|
|
|
|
thumb_func_start sub_8100FD4
|
|
sub_8100FD4: @ 8100FD4
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0x60
|
|
strh r0, [r4, 0x38]
|
|
lsls r0, 16
|
|
asrs r0, 24
|
|
negs r0, r0
|
|
strh r0, [r4, 0x24]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _08101032
|
|
movs r0, 0
|
|
strh r0, [r4, 0x30]
|
|
ldr r1, =gPlttBufferFaded
|
|
movs r2, 0x32
|
|
ldrsh r0, [r4, r2]
|
|
adds r0, 0x1
|
|
lsls r0, 1
|
|
adds r0, r1
|
|
ldrh r5, [r0]
|
|
movs r2, 0
|
|
adds r6, r1, 0
|
|
adds r3, r6, 0
|
|
_0810100C:
|
|
movs r1, 0x32
|
|
ldrsh r0, [r4, r1]
|
|
adds r2, 0x1
|
|
adds r0, r2
|
|
lsls r1, r0, 1
|
|
adds r1, r3
|
|
adds r0, 0x1
|
|
lsls r0, 1
|
|
adds r0, r3
|
|
ldrh r0, [r0]
|
|
strh r0, [r1]
|
|
cmp r2, 0x5
|
|
ble _0810100C
|
|
movs r2, 0x32
|
|
ldrsh r0, [r4, r2]
|
|
adds r0, 0x7
|
|
lsls r0, 1
|
|
adds r0, r6
|
|
strh r5, [r0]
|
|
_08101032:
|
|
ldrh r2, [r4, 0x3C]
|
|
movs r1, 0x3C
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x6
|
|
ble _0810106C
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
ble _08101080
|
|
ldrh r0, [r4, 0x3A]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x3A]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _0810106C
|
|
movs r0, 0
|
|
strh r0, [r4, 0x3A]
|
|
subs r2, 0x1
|
|
strh r2, [r4, 0x3C]
|
|
lsls r1, r2, 8
|
|
movs r0, 0x10
|
|
subs r0, r2
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
_0810106C:
|
|
ldrh r1, [r4, 0x2E]
|
|
movs r2, 0x2E
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
ble _08101080
|
|
subs r0, r1, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
b _081010C2
|
|
.pool
|
|
_08101080:
|
|
ldrh r0, [r4, 0x3A]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x3A]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _081010C2
|
|
movs r0, 0
|
|
strh r0, [r4, 0x3A]
|
|
ldrh r2, [r4, 0x3C]
|
|
adds r2, 0x1
|
|
strh r2, [r4, 0x3C]
|
|
lsls r1, r2, 8
|
|
movs r0, 0x10
|
|
subs r0, r2
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
movs r1, 0x3C
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x10
|
|
bne _081010C2
|
|
adds r2, r4, 0
|
|
adds r2, 0x3E
|
|
ldrb r0, [r2]
|
|
movs r1, 0x4
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
ldr r0, =sub_80A67F4
|
|
str r0, [r4, 0x1C]
|
|
_081010C2:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8100FD4
|
|
|
|
thumb_func_start sub_81010CC
|
|
sub_81010CC: @ 81010CC
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldr r6, =gBattleAnimTarget
|
|
ldrb r0, [r6]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r5, 0
|
|
strh r0, [r4, 0x20]
|
|
ldrb r0, [r6]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldr r1, =0x0000ffe8
|
|
adds r0, r1
|
|
strh r0, [r4, 0x22]
|
|
strh r5, [r4, 0x2E]
|
|
strh r5, [r4, 0x30]
|
|
strh r5, [r4, 0x32]
|
|
strh r5, [r4, 0x34]
|
|
strh r5, [r4, 0x36]
|
|
strh r5, [r4, 0x3A]
|
|
movs r0, 0x10
|
|
strh r0, [r4, 0x3C]
|
|
movs r1, 0xFD
|
|
lsls r1, 6
|
|
movs r0, 0x50
|
|
bl SetGpuReg
|
|
ldrh r1, [r4, 0x3C]
|
|
lsls r1, 8
|
|
ldrh r0, [r4, 0x3A]
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
ldr r0, =sub_8101138
|
|
str r0, [r4, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81010CC
|
|
|
|
thumb_func_start sub_8101138
|
|
sub_8101138: @ 8101138
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x4
|
|
bls _08101146
|
|
b _08101290
|
|
_08101146:
|
|
lsls r0, 2
|
|
ldr r1, =_08101154
|
|
adds r0, r1
|
|
ldr r0, [r0]
|
|
mov pc, r0
|
|
.pool
|
|
.align 2, 0
|
|
_08101154:
|
|
.4byte _08101168
|
|
.4byte _081011CC
|
|
.4byte _081011E8
|
|
.4byte _08101266
|
|
.4byte _0810127A
|
|
_08101168:
|
|
ldrh r0, [r4, 0x32]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x32]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bgt _08101176
|
|
b _08101290
|
|
_08101176:
|
|
movs r0, 0
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
movs r1, 0x1
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _08101198
|
|
ldrh r1, [r4, 0x3A]
|
|
movs r2, 0x3A
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0xF
|
|
bgt _081011A6
|
|
adds r0, r1, 0x1
|
|
strh r0, [r4, 0x3A]
|
|
b _081011A6
|
|
_08101198:
|
|
ldrh r1, [r4, 0x3C]
|
|
movs r2, 0x3C
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
ble _081011A6
|
|
subs r0, r1, 0x1
|
|
strh r0, [r4, 0x3C]
|
|
_081011A6:
|
|
ldrh r1, [r4, 0x3C]
|
|
lsls r1, 8
|
|
ldrh r0, [r4, 0x3A]
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
movs r1, 0x3A
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x10
|
|
bne _08101290
|
|
movs r2, 0x3C
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
bne _08101290
|
|
strh r0, [r4, 0x30]
|
|
b _08101272
|
|
_081011CC:
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x8
|
|
ble _08101290
|
|
movs r0, 0
|
|
strh r0, [r4, 0x30]
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAffineAnim
|
|
b _08101272
|
|
_081011E8:
|
|
adds r0, r4, 0
|
|
movs r1, 0x10
|
|
movs r2, 0x4
|
|
bl sub_8101298
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x2
|
|
ble _0810120A
|
|
movs r0, 0
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r4, 0x22]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x22]
|
|
_0810120A:
|
|
ldrh r0, [r4, 0x32]
|
|
adds r1, r0, 0x1
|
|
strh r1, [r4, 0x32]
|
|
lsls r0, r1, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1D
|
|
ble _08101290
|
|
movs r0, 0x1
|
|
ands r1, r0
|
|
cmp r1, 0
|
|
beq _08101230
|
|
ldrh r1, [r4, 0x3A]
|
|
movs r2, 0x3A
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
ble _0810123E
|
|
subs r0, r1, 0x1
|
|
strh r0, [r4, 0x3A]
|
|
b _0810123E
|
|
_08101230:
|
|
ldrh r1, [r4, 0x3C]
|
|
movs r2, 0x3C
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0xF
|
|
bgt _0810123E
|
|
adds r0, r1, 0x1
|
|
strh r0, [r4, 0x3C]
|
|
_0810123E:
|
|
ldrh r1, [r4, 0x3C]
|
|
lsls r1, 8
|
|
ldrh r0, [r4, 0x3A]
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
movs r0, 0x3A
|
|
ldrsh r1, [r4, r0]
|
|
cmp r1, 0
|
|
bne _08101290
|
|
movs r2, 0x3C
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0x10
|
|
bne _08101290
|
|
strh r1, [r4, 0x30]
|
|
strh r1, [r4, 0x32]
|
|
b _08101272
|
|
_08101266:
|
|
adds r2, r4, 0
|
|
adds r2, 0x3E
|
|
ldrb r0, [r2]
|
|
movs r1, 0x4
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
_08101272:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
b _08101290
|
|
_0810127A:
|
|
movs r0, 0x50
|
|
movs r1, 0
|
|
bl SetGpuReg
|
|
movs r0, 0x52
|
|
movs r1, 0
|
|
bl SetGpuReg
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_08101290:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101138
|
|
|
|
thumb_func_start sub_8101298
|
|
sub_8101298: @ 8101298
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0xB
|
|
bgt _081012AA
|
|
ldrh r0, [r4, 0x36]
|
|
adds r0, 0x2
|
|
strh r0, [r4, 0x36]
|
|
_081012AA:
|
|
ldrh r5, [r4, 0x34]
|
|
adds r0, r5, 0
|
|
subs r0, 0x12
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
adds r1, r5, 0
|
|
cmp r0, 0x17
|
|
bhi _081012C0
|
|
ldrh r0, [r4, 0x36]
|
|
subs r0, 0x2
|
|
strh r0, [r4, 0x36]
|
|
_081012C0:
|
|
lsls r0, r1, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x2F
|
|
ble _081012CE
|
|
ldrh r0, [r4, 0x36]
|
|
adds r0, 0x2
|
|
strh r0, [r4, 0x36]
|
|
_081012CE:
|
|
movs r1, 0x36
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x9
|
|
bl __divsi3
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x36
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0xE
|
|
bl __divsi3
|
|
strh r0, [r4, 0x26]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bge _081012F4
|
|
movs r1, 0x26
|
|
ldrsh r0, [r4, r1]
|
|
negs r0, r0
|
|
strh r0, [r4, 0x26]
|
|
_081012F4:
|
|
adds r0, r5, 0x1
|
|
strh r0, [r4, 0x34]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3B
|
|
ble _08101304
|
|
movs r0, 0
|
|
strh r0, [r4, 0x34]
|
|
_08101304:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101298
|
|
|
|
thumb_func_start sub_810130C
|
|
sub_810130C: @ 810130C
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
ldr r5, =gBattleAnimArgs
|
|
movs r1, 0x4
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0
|
|
bne _08101320
|
|
adds r0, r4, 0
|
|
bl sub_80A6838
|
|
_08101320:
|
|
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, 0xA]
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r0, [r5, 0x6]
|
|
strh r0, [r4, 0x30]
|
|
ldrh r0, [r5, 0x8]
|
|
strh r0, [r4, 0x32]
|
|
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_810130C
|
|
|
|
thumb_func_start sub_810135C
|
|
sub_810135C: @ 810135C
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0x4
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _08101378
|
|
ldr r0, =gBattleAnimAttacker
|
|
b _0810137A
|
|
.pool
|
|
_08101378:
|
|
ldr r0, =gBattleAnimTarget
|
|
_0810137A:
|
|
ldrb r6, [r0]
|
|
bl IsDoubleBattle
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081013C4
|
|
movs r1, 0x2
|
|
adds r0, r6, 0
|
|
eors r0, r1
|
|
bl IsBattlerSpriteVisible
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081013C4
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrb r1, [r4, 0xC]
|
|
adds r2, r5, 0
|
|
adds r2, 0x20
|
|
adds r3, r5, 0
|
|
adds r3, 0x22
|
|
adds r0, r6, 0
|
|
bl SetAverageBattlerPositions
|
|
movs r2, 0
|
|
ldrsh r1, [r4, r2]
|
|
adds r0, r5, 0
|
|
bl sub_80A6864
|
|
ldrh r0, [r4, 0x2]
|
|
ldrh r1, [r5, 0x22]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x22]
|
|
b _08101414
|
|
.pool
|
|
_081013C4:
|
|
ldr r4, =gBattleAnimArgs
|
|
movs r2, 0xC
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
bne _081013E8
|
|
adds r0, r6, 0
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x20]
|
|
adds r0, r6, 0
|
|
movs r1, 0x1
|
|
b _081013FA
|
|
.pool
|
|
_081013E8:
|
|
adds r0, r6, 0
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x20]
|
|
adds r0, r6, 0
|
|
movs r1, 0x3
|
|
_081013FA:
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r4, [r4, 0x2]
|
|
adds r0, r4
|
|
strh r0, [r5, 0x22]
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r2, 0
|
|
ldrsh r1, [r0, r2]
|
|
adds r0, r5, 0
|
|
bl sub_80A6864
|
|
_08101414:
|
|
ldr r1, =gBattleAnimArgs
|
|
ldrh r0, [r1, 0xA]
|
|
strh r0, [r5, 0x2E]
|
|
ldrh r0, [r1, 0x6]
|
|
strh r0, [r5, 0x30]
|
|
ldrh r0, [r1, 0x8]
|
|
strh r0, [r5, 0x32]
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A656C
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_810135C
|
|
|
|
thumb_func_start sub_8101440
|
|
sub_8101440: @ 8101440
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl sub_80A6838
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08101474
|
|
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]
|
|
b _0810148E
|
|
.pool
|
|
_08101474:
|
|
ldr r2, =gBattleAnimArgs
|
|
ldrh r0, [r4, 0x20]
|
|
ldrh r1, [r2]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x20]
|
|
ldrh r0, [r2, 0x2]
|
|
ldrh r2, [r4, 0x22]
|
|
adds r0, r2
|
|
strh r0, [r4, 0x22]
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAnim
|
|
_0810148E:
|
|
ldr r0, =sub_81014A0
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101440
|
|
|
|
thumb_func_start sub_81014A0
|
|
sub_81014A0: @ 81014A0
|
|
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, 0x1E
|
|
ble _081014D8
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r4, r0]
|
|
movs r0, 0x1E
|
|
subs r0, r1
|
|
movs r1, 0x3
|
|
bl __divsi3
|
|
strh r0, [r4, 0x26]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
lsls r0, 18
|
|
asrs r0, 16
|
|
movs r1, 0x3
|
|
bl Sin
|
|
strh r0, [r4, 0x24]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
_081014D8:
|
|
adds r0, r4, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x10
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _081014EC
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_081014EC:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81014A0
|
|
|
|
thumb_func_start sub_81014F4
|
|
sub_81014F4: @ 81014F4
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl sub_80A6838
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _0810152C
|
|
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]
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x34]
|
|
b _0810154A
|
|
.pool
|
|
_0810152C:
|
|
ldr r2, =gBattleAnimArgs
|
|
ldrh r0, [r4, 0x20]
|
|
ldrh r1, [r2]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x20]
|
|
ldrh r0, [r2, 0x2]
|
|
ldrh r2, [r4, 0x22]
|
|
adds r0, r2
|
|
strh r0, [r4, 0x22]
|
|
ldr r0, =0x0000ffff
|
|
strh r0, [r4, 0x34]
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAffineAnim
|
|
_0810154A:
|
|
ldr r0, =sub_8101560
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81014F4
|
|
|
|
thumb_func_start sub_8101560
|
|
sub_8101560: @ 8101560
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x28
|
|
bl __divsi3
|
|
negs r0, r0
|
|
strh r0, [r4, 0x26]
|
|
movs r2, 0x36
|
|
ldrsh r0, [r4, r2]
|
|
movs r1, 0xA
|
|
bl __divsi3
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x34
|
|
ldrsh r0, [r4, r1]
|
|
lsls r0, 1
|
|
ldrh r2, [r4, 0x36]
|
|
adds r0, r2
|
|
strh r0, [r4, 0x36]
|
|
ldrh r0, [r4, 0x30]
|
|
ldrh r2, [r4, 0x2E]
|
|
adds r1, r0, r2
|
|
strh r1, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3C
|
|
ble _081015A4
|
|
adds r0, r4, 0
|
|
bl move_anim_8074EE0
|
|
_081015A4:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101560
|
|
|
|
thumb_func_start sub_81015AC
|
|
sub_81015AC: @ 81015AC
|
|
push {lr}
|
|
ldrh r1, [r0, 0x20]
|
|
subs r1, 0x20
|
|
strh r1, [r0, 0x20]
|
|
ldrh r1, [r0, 0x22]
|
|
subs r1, 0x20
|
|
strh r1, [r0, 0x22]
|
|
movs r1, 0x14
|
|
strh r1, [r0, 0x2E]
|
|
ldr r1, =sub_80A64B0
|
|
str r1, [r0, 0x1C]
|
|
ldr r1, =sub_81015D4
|
|
bl StoreSpriteCallbackInData6
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81015AC
|
|
|
|
thumb_func_start sub_81015D4
|
|
sub_81015D4: @ 81015D4
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldrh r6, [r5, 0x38]
|
|
movs r1, 0x1
|
|
adds r0, r1, 0
|
|
ands r0, r6
|
|
cmp r0, 0
|
|
beq _081015EA
|
|
cmp r0, 0x1
|
|
beq _08101604
|
|
b _0810166A
|
|
_081015EA:
|
|
strh r1, [r5, 0x2E]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =sub_81015D4
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
b _0810166A
|
|
.pool
|
|
_08101604:
|
|
ldrh r3, [r5, 0x24]
|
|
ldrh r0, [r5, 0x20]
|
|
adds r3, r0
|
|
movs r0, 0
|
|
strh r3, [r5, 0x20]
|
|
ldrh r4, [r5, 0x26]
|
|
ldrh r1, [r5, 0x22]
|
|
adds r4, r1
|
|
strh r4, [r5, 0x22]
|
|
strh r0, [r5, 0x26]
|
|
strh r0, [r5, 0x24]
|
|
movs r0, 0x8
|
|
strh r0, [r5, 0x2E]
|
|
ldr r2, =gUnknown_08592CD0
|
|
lsls r0, r6, 16
|
|
asrs r0, 24
|
|
lsls r0, 1
|
|
adds r1, r0, r2
|
|
ldrb r1, [r1]
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
adds r3, r1
|
|
strh r3, [r5, 0x32]
|
|
adds r2, 0x1
|
|
adds r0, r2
|
|
ldrb r0, [r0]
|
|
lsls r0, 24
|
|
asrs r0, 24
|
|
adds r4, r0
|
|
strh r4, [r5, 0x36]
|
|
ldr r0, =sub_80A6EEC
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =sub_8101684
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
movs r1, 0x80
|
|
lsls r1, 1
|
|
adds r0, r1, 0
|
|
ldrh r1, [r5, 0x38]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x38]
|
|
movs r0, 0x3F
|
|
bl BattleAnimAdjustPanning
|
|
adds r1, r0, 0
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
movs r0, 0xD2
|
|
bl PlaySE12WithPanning
|
|
_0810166A:
|
|
ldrh r0, [r5, 0x38]
|
|
movs r1, 0x1
|
|
eors r0, r1
|
|
strh r0, [r5, 0x38]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81015D4
|
|
|
|
thumb_func_start sub_8101684
|
|
sub_8101684: @ 8101684
|
|
push {lr}
|
|
adds r2, r0, 0
|
|
ldrh r0, [r2, 0x38]
|
|
lsls r0, 16
|
|
asrs r0, 24
|
|
cmp r0, 0x4
|
|
bne _081016AC
|
|
movs r0, 0xA
|
|
strh r0, [r2, 0x2E]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r2, 0x1C]
|
|
ldr r1, =sub_81016B8
|
|
adds r0, r2, 0
|
|
bl StoreSpriteCallbackInData6
|
|
b _081016B0
|
|
.pool
|
|
_081016AC:
|
|
ldr r0, =sub_81015D4
|
|
str r0, [r2, 0x1C]
|
|
_081016B0:
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101684
|
|
|
|
thumb_func_start sub_81016B8
|
|
sub_81016B8: @ 81016B8
|
|
push {r4-r7,lr}
|
|
adds r5, r0, 0
|
|
ldrh r1, [r5, 0x6]
|
|
cmp r1, 0
|
|
bne _081016E0
|
|
movs r0, 0x3
|
|
strh r0, [r5, 0x2E]
|
|
strh r1, [r5, 0x30]
|
|
strh r1, [r5, 0x32]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =sub_8101774
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
b _08101760
|
|
.pool
|
|
_081016E0:
|
|
ldrh r0, [r5, 0x6]
|
|
cmp r0, 0x2
|
|
beq _08101700
|
|
cmp r0, 0x2
|
|
bgt _081016F0
|
|
cmp r0, 0x1
|
|
beq _081016F6
|
|
b _08101714
|
|
_081016F0:
|
|
cmp r0, 0x3
|
|
beq _08101708
|
|
b _08101714
|
|
_081016F6:
|
|
ldr r6, =0x0000fff8
|
|
adds r7, r6, 0
|
|
b _08101718
|
|
.pool
|
|
_08101700:
|
|
ldr r7, =0x0000fff8
|
|
b _08101716
|
|
.pool
|
|
_08101708:
|
|
movs r7, 0x8
|
|
ldr r6, =0x0000fff8
|
|
b _08101718
|
|
.pool
|
|
_08101714:
|
|
movs r7, 0x8
|
|
_08101716:
|
|
movs r6, 0x8
|
|
_08101718:
|
|
ldrh r0, [r5, 0x24]
|
|
ldrh r1, [r5, 0x20]
|
|
adds r0, r1
|
|
movs r1, 0
|
|
strh r0, [r5, 0x20]
|
|
ldrh r0, [r5, 0x26]
|
|
ldrh r2, [r5, 0x22]
|
|
adds r0, r2
|
|
strh r0, [r5, 0x22]
|
|
strh r1, [r5, 0x26]
|
|
strh r1, [r5, 0x24]
|
|
movs r0, 0x6
|
|
strh r0, [r5, 0x2E]
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, r7
|
|
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]
|
|
ldr r0, =sub_80A6EEC
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =sub_8101820
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
_08101760:
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81016B8
|
|
|
|
thumb_func_start sub_8101774
|
|
sub_8101774: @ 8101774
|
|
push {r4,lr}
|
|
sub sp, 0xC
|
|
adds r4, r0, 0
|
|
movs r1, 0x32
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
bne _08101794
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x3
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x10
|
|
ble _081017A4
|
|
movs r0, 0x10
|
|
b _081017A2
|
|
_08101794:
|
|
ldrh r0, [r4, 0x30]
|
|
subs r0, 0x3
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bge _081017A4
|
|
movs r0, 0
|
|
_081017A2:
|
|
strh r0, [r4, 0x30]
|
|
_081017A4:
|
|
movs r0, 0x1
|
|
str r0, [sp]
|
|
movs r0, 0
|
|
str r0, [sp, 0x4]
|
|
str r0, [sp, 0x8]
|
|
movs r0, 0x1
|
|
movs r1, 0x1
|
|
movs r2, 0x1
|
|
movs r3, 0x1
|
|
bl sub_80A75AC
|
|
ldrh r1, [r4, 0x30]
|
|
lsls r1, 24
|
|
lsrs r1, 24
|
|
ldr r2, =0x00007fff
|
|
bl BlendPalettes
|
|
movs r3, 0x30
|
|
ldrsh r0, [r4, r3]
|
|
cmp r0, 0x10
|
|
bne _0810180C
|
|
ldrh r0, [r4, 0x32]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x32]
|
|
ldrb r1, [r4, 0x5]
|
|
lsrs r1, 4
|
|
lsls r0, r1, 5
|
|
ldr r2, =gPlttBufferUnfaded + 0x210
|
|
adds r0, r2
|
|
lsls r1, 4
|
|
ldr r3, =0x00000101
|
|
adds r2, r3, 0
|
|
orrs r1, r2
|
|
movs r2, 0x4
|
|
bl LoadPalette
|
|
movs r0, 0x3F
|
|
bl BattleAnimAdjustPanning
|
|
adds r1, r0, 0
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
movs r0, 0xC0
|
|
bl PlaySE12WithPanning
|
|
b _08101814
|
|
.pool
|
|
_0810180C:
|
|
cmp r0, 0
|
|
bne _08101814
|
|
ldr r0, =sub_8101820
|
|
str r0, [r4, 0x1C]
|
|
_08101814:
|
|
add sp, 0xC
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101774
|
|
|
|
thumb_func_start sub_8101820
|
|
sub_8101820: @ 8101820
|
|
push {lr}
|
|
adds r2, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0, 0xE]
|
|
ldr r0, =0x0000ffff
|
|
cmp r1, r0
|
|
bne _08101838
|
|
movs r0, 0
|
|
strh r0, [r2, 0x30]
|
|
strh r0, [r2, 0x2E]
|
|
ldr r0, =sub_8101848
|
|
str r0, [r2, 0x1C]
|
|
_08101838:
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101820
|
|
|
|
thumb_func_start sub_8101848
|
|
sub_8101848: @ 8101848
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x3
|
|
bl __modsi3
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bne _0810187C
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
adds r3, r4, 0
|
|
adds r3, 0x3E
|
|
ldrb r2, [r3]
|
|
lsls r0, r2, 29
|
|
lsrs r0, 31
|
|
movs r1, 0x1
|
|
eors r1, r0
|
|
lsls r1, 2
|
|
movs r0, 0x5
|
|
negs r0, r0
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strb r0, [r3]
|
|
_0810187C:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x8
|
|
bne _08101890
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_08101890:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101848
|
|
|
|
thumb_func_start sub_8101898
|
|
sub_8101898: @ 8101898
|
|
push {r4,lr}
|
|
adds r3, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0]
|
|
strh r0, [r3, 0x6]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
bne _081018BC
|
|
ldrh r0, [r3, 0x20]
|
|
subs r0, 0x18
|
|
strh r0, [r3, 0x20]
|
|
ldrh r0, [r3, 0x22]
|
|
subs r0, 0x18
|
|
strh r0, [r3, 0x22]
|
|
b _0810190E
|
|
.pool
|
|
_081018BC:
|
|
cmp r0, 0x2
|
|
bne _081018D8
|
|
ldrh r0, [r3, 0x20]
|
|
subs r0, 0x18
|
|
strh r0, [r3, 0x20]
|
|
ldrh r0, [r3, 0x22]
|
|
adds r0, 0x18
|
|
strh r0, [r3, 0x22]
|
|
ldrb r1, [r3, 0x3]
|
|
movs r0, 0x3F
|
|
negs r0, r0
|
|
ands r0, r1
|
|
movs r1, 0x20
|
|
b _0810190A
|
|
_081018D8:
|
|
cmp r0, 0x3
|
|
bne _081018F4
|
|
ldrh r0, [r3, 0x20]
|
|
adds r0, 0x18
|
|
strh r0, [r3, 0x20]
|
|
ldrh r0, [r3, 0x22]
|
|
subs r0, 0x18
|
|
strh r0, [r3, 0x22]
|
|
ldrb r1, [r3, 0x3]
|
|
movs r0, 0x3F
|
|
negs r0, r0
|
|
ands r0, r1
|
|
movs r1, 0x10
|
|
b _0810190A
|
|
_081018F4:
|
|
ldrh r0, [r3, 0x20]
|
|
adds r0, 0x18
|
|
strh r0, [r3, 0x20]
|
|
ldrh r0, [r3, 0x22]
|
|
adds r0, 0x18
|
|
strh r0, [r3, 0x22]
|
|
ldrb r1, [r3, 0x3]
|
|
movs r0, 0x3F
|
|
negs r0, r0
|
|
ands r0, r1
|
|
movs r1, 0x30
|
|
_0810190A:
|
|
orrs r0, r1
|
|
strb r0, [r3, 0x3]
|
|
_0810190E:
|
|
ldrh r2, [r3, 0x4]
|
|
lsls r1, r2, 22
|
|
lsrs r1, 22
|
|
adds r1, 0x10
|
|
ldr r4, =0x000003ff
|
|
adds r0, r4, 0
|
|
ands r1, r0
|
|
ldr r0, =0xfffffc00
|
|
ands r0, r2
|
|
orrs r0, r1
|
|
strh r0, [r3, 0x4]
|
|
ldr r1, =sub_81015AC
|
|
str r1, [r3, 0x1C]
|
|
adds r0, r3, 0
|
|
bl _call_via_r1
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101898
|
|
|
|
thumb_func_start sub_8101940
|
|
sub_8101940: @ 8101940
|
|
push {lr}
|
|
adds r3, r0, 0
|
|
adds r2, r3, 0
|
|
adds r2, 0x3E
|
|
ldrb r0, [r2]
|
|
movs r1, 0x4
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
movs r0, 0
|
|
strh r0, [r3, 0x2E]
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0x1
|
|
beq _0810197C
|
|
cmp r0, 0x1
|
|
bgt _0810196C
|
|
cmp r0, 0
|
|
beq _08101972
|
|
b _0810198C
|
|
.pool
|
|
_0810196C:
|
|
cmp r0, 0x2
|
|
beq _08101984
|
|
b _0810198C
|
|
_08101972:
|
|
ldr r0, =sub_8101998
|
|
b _0810198E
|
|
.pool
|
|
_0810197C:
|
|
ldr r0, =sub_8101A74
|
|
b _0810198E
|
|
.pool
|
|
_08101984:
|
|
ldr r0, =sub_8101AC4
|
|
b _0810198E
|
|
.pool
|
|
_0810198C:
|
|
ldr r0, =sub_8101B84
|
|
_0810198E:
|
|
str r0, [r3, 0x1C]
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101940
|
|
|
|
thumb_func_start sub_8101998
|
|
sub_8101998: @ 8101998
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r0, 0x6
|
|
strh r0, [r4, 0x2E]
|
|
ldr r5, =gBattleAnimAttacker
|
|
ldrb r0, [r5]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
movs r2, 0x2
|
|
negs r2, r2
|
|
adds r1, r2, 0
|
|
cmp r0, 0
|
|
beq _081019B6
|
|
movs r1, 0x2
|
|
_081019B6:
|
|
strh r1, [r4, 0x30]
|
|
movs r0, 0
|
|
strh r0, [r4, 0x32]
|
|
ldr r1, =gBattlerSpriteIds
|
|
ldrb r0, [r5]
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
strh r0, [r4, 0x34]
|
|
ldr r1, =sub_81019E8
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A6630
|
|
str r0, [r4, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101998
|
|
|
|
thumb_func_start sub_81019E8
|
|
sub_81019E8: @ 81019E8
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
movs r0, 0x2E
|
|
ldrsh r6, [r5, r0]
|
|
cmp r6, 0
|
|
bne _08101A24
|
|
ldr r1, =gBattlerSpriteIds
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
strh r0, [r5, 0x34]
|
|
movs r1, 0
|
|
bl sub_80A7270
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x3A]
|
|
ldr r2, =0xfffffd00
|
|
adds r1, r2, 0
|
|
cmp r0, 0
|
|
beq _08101A20
|
|
movs r0, 0xC0
|
|
lsls r0, 2
|
|
adds r1, r0, 0
|
|
_08101A20:
|
|
strh r1, [r5, 0x36]
|
|
strh r6, [r5, 0x38]
|
|
_08101A24:
|
|
ldrh r0, [r5, 0x36]
|
|
ldrh r1, [r5, 0x38]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x38]
|
|
ldrh r0, [r5, 0x34]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
ldrh r3, [r5, 0x38]
|
|
adds r1, r2, 0
|
|
bl obj_id_set_rotscale
|
|
ldrh r0, [r5, 0x34]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
bl sub_80A73A0
|
|
ldrh r0, [r5, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3
|
|
ble _08101A5E
|
|
movs r0, 0
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =sub_8101B84
|
|
str r0, [r5, 0x1C]
|
|
_08101A5E:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81019E8
|
|
|
|
thumb_func_start sub_8101A74
|
|
sub_8101A74: @ 8101A74
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r0, 0x4
|
|
strh r0, [r4, 0x2E]
|
|
ldr r5, =gBattleAnimAttacker
|
|
ldrb r0, [r5]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
movs r1, 0x3
|
|
cmp r0, 0
|
|
beq _08101A92
|
|
movs r0, 0x3
|
|
negs r0, r0
|
|
adds r1, r0, 0
|
|
_08101A92:
|
|
strh r1, [r4, 0x30]
|
|
movs r0, 0
|
|
strh r0, [r4, 0x32]
|
|
ldr r1, =gBattlerSpriteIds
|
|
ldrb r0, [r5]
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
strh r0, [r4, 0x34]
|
|
ldr r1, =sub_8101B84
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A6630
|
|
str r0, [r4, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101A74
|
|
|
|
thumb_func_start sub_8101AC4
|
|
sub_8101AC4: @ 8101AC4
|
|
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, 0x8
|
|
ble _08101ADE
|
|
movs r0, 0
|
|
strh r0, [r1, 0x2E]
|
|
ldr r0, =sub_8101AE8
|
|
str r0, [r1, 0x1C]
|
|
_08101ADE:
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101AC4
|
|
|
|
thumb_func_start sub_8101AE8
|
|
sub_8101AE8: @ 8101AE8
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0
|
|
bne _08101B38
|
|
ldr r1, =gBattlerSpriteIds
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
strh r0, [r5, 0x34]
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x3A]
|
|
ldrb r0, [r4]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08101B2C
|
|
movs r0, 0xFC
|
|
lsls r0, 8
|
|
strh r0, [r5, 0x36]
|
|
movs r0, 0xC0
|
|
lsls r0, 4
|
|
b _08101B36
|
|
.pool
|
|
_08101B2C:
|
|
movs r0, 0x80
|
|
lsls r0, 3
|
|
strh r0, [r5, 0x36]
|
|
movs r0, 0xF4
|
|
lsls r0, 8
|
|
_08101B36:
|
|
strh r0, [r5, 0x38]
|
|
_08101B38:
|
|
ldrh r0, [r5, 0x36]
|
|
ldrh r1, [r5, 0x38]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x38]
|
|
ldrh r0, [r5, 0x34]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
ldrh r3, [r5, 0x38]
|
|
adds r1, r2, 0
|
|
bl obj_id_set_rotscale
|
|
ldrh r0, [r5, 0x34]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
bl sub_80A73A0
|
|
ldrh r0, [r5, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x2
|
|
ble _08101B78
|
|
ldrh r0, [r5, 0x34]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
bl sub_80A7344
|
|
ldr r0, =sub_8101B84
|
|
str r0, [r5, 0x1C]
|
|
_08101B78:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101AE8
|
|
|
|
thumb_func_start sub_8101B84
|
|
sub_8101B84: @ 8101B84
|
|
push {lr}
|
|
bl DestroyAnimSprite
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101B84
|
|
|
|
thumb_func_start sub_8101B90
|
|
sub_8101B90: @ 8101B90
|
|
movs r1, 0
|
|
strh r1, [r0, 0x2E]
|
|
ldr r1, =sub_8101BA0
|
|
str r1, [r0, 0x1C]
|
|
bx lr
|
|
.pool
|
|
thumb_func_end sub_8101B90
|
|
|
|
thumb_func_start sub_8101BA0
|
|
sub_8101BA0: @ 8101BA0
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
movs r0, 0x2E
|
|
ldrsh r5, [r4, r0]
|
|
cmp r5, 0x1
|
|
beq _08101BFA
|
|
cmp r5, 0x1
|
|
bgt _08101BB6
|
|
cmp r5, 0
|
|
beq _08101BBC
|
|
b _08101C8E
|
|
_08101BB6:
|
|
cmp r5, 0x2
|
|
beq _08101C4C
|
|
b _08101C8E
|
|
_08101BBC:
|
|
strh r5, [r4, 0x30]
|
|
ldr r1, =gBattlerSpriteIds
|
|
ldr r2, =gBattleAnimAttacker
|
|
ldrb r0, [r2]
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
strh r0, [r4, 0x32]
|
|
ldrb r0, [r2]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r4, 0x34]
|
|
ldr r2, =0xfffffe00
|
|
adds r1, r2, 0
|
|
cmp r0, 0
|
|
beq _08101BE4
|
|
movs r0, 0x80
|
|
lsls r0, 2
|
|
adds r1, r0, 0
|
|
_08101BE4:
|
|
strh r1, [r4, 0x36]
|
|
strh r5, [r4, 0x38]
|
|
ldrh r0, [r4, 0x32]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r1, 0
|
|
bl sub_80A7270
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
_08101BFA:
|
|
ldrh r0, [r4, 0x36]
|
|
ldrh r1, [r4, 0x38]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x38]
|
|
ldrh r0, [r4, 0x32]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
ldrh r3, [r4, 0x38]
|
|
adds r1, r2, 0
|
|
bl obj_id_set_rotscale
|
|
ldrh r0, [r4, 0x32]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
bl sub_80A73A0
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3
|
|
ble _08101C8E
|
|
movs r0, 0
|
|
strh r0, [r4, 0x30]
|
|
movs r2, 0x36
|
|
ldrsh r0, [r4, r2]
|
|
negs r0, r0
|
|
strh r0, [r4, 0x36]
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
b _08101C8E
|
|
.pool
|
|
_08101C4C:
|
|
ldrh r0, [r4, 0x36]
|
|
ldrh r1, [r4, 0x38]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x38]
|
|
ldrh r0, [r4, 0x32]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
ldrh r3, [r4, 0x38]
|
|
adds r1, r2, 0
|
|
bl obj_id_set_rotscale
|
|
ldrh r0, [r4, 0x32]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
bl sub_80A73A0
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3
|
|
ble _08101C8E
|
|
ldrh r0, [r4, 0x32]
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
bl sub_80A7344
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_08101C8E:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101BA0
|
|
|
|
thumb_func_start sub_8101C94
|
|
sub_8101C94: @ 8101C94
|
|
push {r4-r6,lr}
|
|
lsls r0, 24
|
|
lsrs r6, r0, 24
|
|
ldr r1, =gTasks
|
|
lsls r0, r6, 2
|
|
adds r0, r6
|
|
lsls r0, 3
|
|
adds r5, r0, r1
|
|
ldr r1, =gBattlerSpriteIds
|
|
ldr r2, =gBattleAnimAttacker
|
|
ldrb r0, [r2]
|
|
adds r0, r1
|
|
ldrb r0, [r0]
|
|
movs r4, 0
|
|
strh r0, [r5, 0x8]
|
|
ldrb r0, [r2]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
strh r2, [r5, 0xA]
|
|
strh r4, [r5, 0xC]
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r3, 0
|
|
ldrsh r1, [r0, r3]
|
|
cmp r1, 0
|
|
beq _08101CE8
|
|
cmp r1, 0x1
|
|
beq _08101D04
|
|
adds r0, r6, 0
|
|
bl DestroyAnimVisualTask
|
|
b _08101D22
|
|
.pool
|
|
_08101CE8:
|
|
strh r1, [r5, 0xC]
|
|
movs r0, 0x8
|
|
strh r0, [r5, 0xE]
|
|
strh r1, [r5, 0x10]
|
|
movs r0, 0x3
|
|
strh r0, [r5, 0x12]
|
|
cmp r2, 0
|
|
bne _08101CFC
|
|
negs r0, r0
|
|
strh r0, [r5, 0x12]
|
|
_08101CFC:
|
|
ldr r0, =sub_8101D2C
|
|
b _08101D20
|
|
.pool
|
|
_08101D04:
|
|
movs r0, 0x8
|
|
strh r0, [r5, 0xE]
|
|
movs r0, 0xC0
|
|
lsls r0, 3
|
|
strh r0, [r5, 0x10]
|
|
movs r1, 0xC0
|
|
strh r1, [r5, 0x12]
|
|
cmp r2, 0
|
|
bne _08101D1E
|
|
negs r0, r0
|
|
strh r0, [r5, 0x10]
|
|
negs r0, r1
|
|
strh r0, [r5, 0x12]
|
|
_08101D1E:
|
|
ldr r0, =sub_8101EEC
|
|
_08101D20:
|
|
str r0, [r5]
|
|
_08101D22:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101C94
|
|
|
|
thumb_func_start sub_8101D2C
|
|
sub_8101D2C: @ 8101D2C
|
|
push {r4,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
|
|
movs r1, 0xC
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x4
|
|
bls _08101D46
|
|
b _08101EE6
|
|
_08101D46:
|
|
lsls r0, 2
|
|
ldr r1, =_08101D58
|
|
adds r0, r1
|
|
ldr r0, [r0]
|
|
mov pc, r0
|
|
.pool
|
|
.align 2, 0
|
|
_08101D58:
|
|
.4byte _08101D6C
|
|
.4byte _08101D9E
|
|
.4byte _08101DF8
|
|
.4byte _08101E70
|
|
.4byte _08101EB4
|
|
_08101D6C:
|
|
movs r2, 0xE
|
|
ldrsh r1, [r4, r2]
|
|
cmp r1, 0
|
|
beq _08101D7C
|
|
ldrh r2, [r4, 0x12]
|
|
ldrh r3, [r4, 0x10]
|
|
adds r2, r3
|
|
b _08101EC2
|
|
_08101D7C:
|
|
movs r0, 0x8
|
|
strh r0, [r4, 0xE]
|
|
strh r1, [r4, 0x10]
|
|
movs r1, 0xA
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0xC0
|
|
cmp r0, 0
|
|
bne _08101D92
|
|
movs r2, 0xC0
|
|
negs r2, r2
|
|
adds r1, r2, 0
|
|
_08101D92:
|
|
strh r1, [r4, 0x12]
|
|
ldrb r0, [r4, 0x8]
|
|
movs r1, 0
|
|
bl sub_80A7270
|
|
b _08101EA8
|
|
_08101D9E:
|
|
movs r3, 0xE
|
|
ldrsh r0, [r4, r3]
|
|
cmp r0, 0
|
|
beq _08101DC4
|
|
ldrh r0, [r4, 0x12]
|
|
ldrh r1, [r4, 0x10]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x10]
|
|
ldrb r0, [r4, 0x8]
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
ldrh r3, [r4, 0x10]
|
|
adds r1, r2, 0
|
|
bl obj_id_set_rotscale
|
|
ldrb r0, [r4, 0x8]
|
|
bl sub_80A73A0
|
|
b _08101ED4
|
|
_08101DC4:
|
|
movs r0, 0x8
|
|
strh r0, [r4, 0xE]
|
|
ldr r2, =gSprites
|
|
movs r3, 0x8
|
|
ldrsh r1, [r4, r3]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrh r0, [r0, 0x24]
|
|
strh r0, [r4, 0x10]
|
|
movs r1, 0xA
|
|
ldrsh r0, [r4, r1]
|
|
movs r2, 0x2
|
|
negs r2, r2
|
|
adds r1, r2, 0
|
|
cmp r0, 0
|
|
bne _08101DEA
|
|
movs r1, 0x2
|
|
_08101DEA:
|
|
strh r1, [r4, 0x12]
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x14]
|
|
b _08101EA8
|
|
.pool
|
|
_08101DF8:
|
|
ldrh r2, [r4, 0xE]
|
|
movs r3, 0xE
|
|
ldrsh r0, [r4, r3]
|
|
cmp r0, 0
|
|
beq _08101E54
|
|
ldrh r1, [r4, 0x14]
|
|
movs r3, 0x14
|
|
ldrsh r0, [r4, r3]
|
|
cmp r0, 0
|
|
beq _08101E12
|
|
subs r0, r1, 0x1
|
|
strh r0, [r4, 0x14]
|
|
b _08101EE6
|
|
_08101E12:
|
|
movs r0, 0x1
|
|
ands r0, r2
|
|
cmp r0, 0
|
|
beq _08101E34
|
|
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, 0x12]
|
|
ldrh r2, [r4, 0x10]
|
|
adds r1, r2
|
|
b _08101E48
|
|
.pool
|
|
_08101E34:
|
|
ldr r2, =gSprites
|
|
movs r3, 0x8
|
|
ldrsh r1, [r4, r3]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrh r1, [r4, 0x10]
|
|
ldrh r2, [r4, 0x12]
|
|
subs r1, r2
|
|
_08101E48:
|
|
strh r1, [r0, 0x24]
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x14]
|
|
b _08101ED4
|
|
.pool
|
|
_08101E54:
|
|
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]
|
|
strh r1, [r0, 0x24]
|
|
movs r0, 0xC
|
|
strh r0, [r4, 0xE]
|
|
b _08101EA8
|
|
.pool
|
|
_08101E70:
|
|
ldrh r1, [r4, 0xE]
|
|
movs r2, 0xE
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
beq _08101E80
|
|
subs r0, r1, 0x1
|
|
strh r0, [r4, 0xE]
|
|
b _08101EE6
|
|
_08101E80:
|
|
movs r0, 0x3
|
|
strh r0, [r4, 0xE]
|
|
ldr r2, =gSprites
|
|
movs r3, 0x8
|
|
ldrsh r1, [r4, r3]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrh r0, [r0, 0x24]
|
|
strh r0, [r4, 0x10]
|
|
movs r1, 0xA
|
|
ldrsh r0, [r4, r1]
|
|
movs r2, 0x8
|
|
negs r2, r2
|
|
adds r1, r2, 0
|
|
cmp r0, 0
|
|
bne _08101EA6
|
|
movs r1, 0x8
|
|
_08101EA6:
|
|
strh r1, [r4, 0x12]
|
|
_08101EA8:
|
|
ldrh r0, [r4, 0xC]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0xC]
|
|
b _08101EE6
|
|
.pool
|
|
_08101EB4:
|
|
movs r3, 0xE
|
|
ldrsh r0, [r4, r3]
|
|
cmp r0, 0
|
|
beq _08101EE0
|
|
ldrh r2, [r4, 0x12]
|
|
ldrh r0, [r4, 0x10]
|
|
adds r2, r0
|
|
_08101EC2:
|
|
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
|
|
strh r2, [r0, 0x24]
|
|
_08101ED4:
|
|
ldrh r0, [r4, 0xE]
|
|
subs r0, 0x1
|
|
strh r0, [r4, 0xE]
|
|
b _08101EE6
|
|
.pool
|
|
_08101EE0:
|
|
adds r0, r2, 0
|
|
bl DestroyAnimVisualTask
|
|
_08101EE6:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101D2C
|
|
|
|
thumb_func_start sub_8101EEC
|
|
sub_8101EEC: @ 8101EEC
|
|
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, 0xE
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
beq _08101F2C
|
|
ldrh r0, [r4, 0x10]
|
|
ldrh r1, [r4, 0x12]
|
|
subs r0, r1
|
|
strh r0, [r4, 0x10]
|
|
ldrb r0, [r4, 0x8]
|
|
movs r2, 0x80
|
|
lsls r2, 1
|
|
ldrh r3, [r4, 0x10]
|
|
adds r1, r2, 0
|
|
bl obj_id_set_rotscale
|
|
ldrb r0, [r4, 0x8]
|
|
bl sub_80A73A0
|
|
ldrh r0, [r4, 0xE]
|
|
subs r0, 0x1
|
|
strh r0, [r4, 0xE]
|
|
b _08101F38
|
|
.pool
|
|
_08101F2C:
|
|
ldrb r0, [r4, 0x8]
|
|
bl sub_80A7344
|
|
adds r0, r5, 0
|
|
bl DestroyAnimVisualTask
|
|
_08101F38:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8101EEC
|
|
|
|
thumb_func_start sub_8101F40
|
|
sub_8101F40: @ 8101F40
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldr r6, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
bne _08101F5C
|
|
ldr r4, =gBattleAnimAttacker
|
|
b _08101F5E
|
|
.pool
|
|
_08101F5C:
|
|
ldr r4, =gBattleAnimTarget
|
|
_08101F5E:
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r6, 0x2]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x20]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r6, [r6, 0x4]
|
|
adds r0, r6
|
|
strh r0, [r5, 0x22]
|
|
movs r0, 0
|
|
strh r0, [r5, 0x2E]
|
|
strh r0, [r5, 0x30]
|
|
ldr r1, =sub_810208C
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101F40
|
|
|
|
thumb_func_start sub_8101FA8
|
|
sub_8101FA8: @ 8101FA8
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
ldr r5, =gBattleAnimTarget
|
|
ldrb r0, [r5]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldr r1, =0x0000ffd0
|
|
adds r0, r1
|
|
strh r0, [r4, 0x20]
|
|
ldrb r0, [r5]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r4, 0x22]
|
|
ldr r1, =sub_8102044
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r4, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101FA8
|
|
|
|
thumb_func_start sub_8101FF0
|
|
sub_8101FF0: @ 8101FF0
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldr r5, =gBattleAnimTarget
|
|
ldrb r0, [r5]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldr r1, =gBattleAnimArgs
|
|
ldr r2, =0x0000ffd0
|
|
adds r0, r2
|
|
ldrh r1, [r1]
|
|
adds r0, r1
|
|
movs r6, 0
|
|
strh r0, [r4, 0x20]
|
|
ldrb r0, [r5]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r4, 0x22]
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAnim
|
|
strh r6, [r4, 0x2E]
|
|
strh r6, [r4, 0x30]
|
|
ldr r0, =sub_810208C
|
|
str r0, [r4, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8101FF0
|
|
|
|
thumb_func_start sub_8102044
|
|
sub_8102044: @ 8102044
|
|
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, 0x8
|
|
ble _0810206E
|
|
movs r0, 0xC
|
|
strh r0, [r4, 0x2E]
|
|
movs r0, 0x8
|
|
strh r0, [r4, 0x30]
|
|
movs r0, 0
|
|
strh r0, [r4, 0x32]
|
|
ldr r1, =sub_810207C
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A653C
|
|
str r0, [r4, 0x1C]
|
|
_0810206E:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102044
|
|
|
|
thumb_func_start sub_810207C
|
|
sub_810207C: @ 810207C
|
|
movs r1, 0
|
|
strh r1, [r0, 0x2E]
|
|
strh r1, [r0, 0x30]
|
|
ldr r1, =sub_810208C
|
|
str r1, [r0, 0x1C]
|
|
bx lr
|
|
.pool
|
|
thumb_func_end sub_810207C
|
|
|
|
thumb_func_start sub_810208C
|
|
sub_810208C: @ 810208C
|
|
push {lr}
|
|
adds r3, r0, 0
|
|
ldrh r0, [r3, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r3, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _081020D4
|
|
movs r0, 0
|
|
strh r0, [r3, 0x2E]
|
|
movs r0, 0x3E
|
|
adds r0, r3
|
|
mov r12, r0
|
|
ldrb r2, [r0]
|
|
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
|
|
mov r1, r12
|
|
strb r0, [r1]
|
|
ldrh r0, [r3, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r3, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x8
|
|
ble _081020D4
|
|
adds r0, r3, 0
|
|
bl DestroyAnimSprite
|
|
_081020D4:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_810208C
|
|
|
|
thumb_func_start sub_81020D8
|
|
sub_81020D8: @ 81020D8
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldr r6, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
bne _081020F4
|
|
ldr r4, =gBattleAnimAttacker
|
|
b _081020F6
|
|
.pool
|
|
_081020F4:
|
|
ldr r4, =gBattleAnimTarget
|
|
_081020F6:
|
|
ldrb r0, [r4]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r6, 0x2]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x20]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r6, [r6, 0x4]
|
|
adds r0, r6
|
|
strh r0, [r5, 0x22]
|
|
movs r0, 0
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0x6]
|
|
strh r0, [r5, 0x30]
|
|
ldr r0, =sub_810213C
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81020D8
|
|
|
|
thumb_func_start sub_810213C
|
|
sub_810213C: @ 810213C
|
|
push {lr}
|
|
adds r2, r0, 0
|
|
ldrh r0, [r2, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r2, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r3, 0x30
|
|
ldrsh r1, [r2, r3]
|
|
cmp r0, r1
|
|
ble _0810215C
|
|
movs r0, 0
|
|
strh r0, [r2, 0x2E]
|
|
ldrh r0, [r2, 0x22]
|
|
subs r0, 0x1
|
|
strh r0, [r2, 0x22]
|
|
_0810215C:
|
|
ldrh r0, [r2, 0x22]
|
|
ldrh r1, [r2, 0x2E]
|
|
subs r0, r1
|
|
strh r0, [r2, 0x22]
|
|
adds r0, r2, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x10
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _08102178
|
|
adds r0, r2, 0
|
|
bl DestroyAnimSprite
|
|
_08102178:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_810213C
|
|
|
|
thumb_func_start sub_810217C
|
|
sub_810217C: @ 810217C
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldr r6, =gBattleAnimAttacker
|
|
ldrb r0, [r6]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r5, 0
|
|
strh r0, [r4, 0x20]
|
|
ldrb r0, [r6]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
subs r0, 0xC
|
|
strh r0, [r4, 0x22]
|
|
strh r5, [r4, 0x2E]
|
|
movs r0, 0x2
|
|
strh r0, [r4, 0x30]
|
|
strh r5, [r4, 0x32]
|
|
strh r5, [r4, 0x34]
|
|
strh r5, [r4, 0x36]
|
|
subs r0, 0x42
|
|
bl BattleAnimAdjustPanning
|
|
lsls r0, 24
|
|
asrs r0, 24
|
|
strh r0, [r4, 0x38]
|
|
ldr r0, =sub_81021CC
|
|
str r0, [r4, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_810217C
|
|
|
|
thumb_func_start sub_81021CC
|
|
sub_81021CC: @ 81021CC
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
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
|
|
blt _08102238
|
|
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]
|
|
movs r1, 0x4
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
bne _0810221E
|
|
ldrh r0, [r4, 0x36]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x36]
|
|
movs r1, 0x1
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
bne _0810221E
|
|
ldrh r1, [r4, 0x38]
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
movs r0, 0xC2
|
|
bl PlaySE12WithPanning
|
|
_0810221E:
|
|
movs r1, 0
|
|
strh r1, [r4, 0x2E]
|
|
ldrh r0, [r4, 0x32]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x32]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _08102238
|
|
strh r1, [r4, 0x32]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
_08102238:
|
|
adds r0, r4, 0
|
|
adds r0, 0x3F
|
|
ldrb r1, [r0]
|
|
movs r0, 0x10
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _08102262
|
|
movs r1, 0x30
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x10
|
|
ble _08102262
|
|
adds r0, r4, 0
|
|
adds r0, 0x3E
|
|
ldrb r1, [r0]
|
|
movs r0, 0x4
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
beq _08102262
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_08102262:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81021CC
|
|
|
|
thumb_func_start sub_8102268
|
|
sub_8102268: @ 8102268
|
|
push {r4-r6,lr}
|
|
adds r6, r0, 0
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0
|
|
bne _081022B2
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
ldr r5, =gBattleAnimArgs
|
|
lsrs r0, 24
|
|
ldrh r1, [r5]
|
|
adds r0, r1
|
|
strh r0, [r6, 0x20]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x1
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r5, [r5, 0x2]
|
|
adds r0, r5
|
|
strh r0, [r6, 0x22]
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081022AC
|
|
ldrh r0, [r6, 0x22]
|
|
adds r0, 0xA
|
|
strh r0, [r6, 0x22]
|
|
_081022AC:
|
|
ldrh r0, [r6, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0x2E]
|
|
_081022B2:
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0, 0xE]
|
|
ldr r0, =0x0000ffff
|
|
cmp r1, r0
|
|
bne _081022C2
|
|
adds r0, r6, 0
|
|
bl DestroyAnimSprite
|
|
_081022C2:
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102268
|
|
|
|
thumb_func_start sub_81022D4
|
|
sub_81022D4: @ 81022D4
|
|
push {r4,lr}
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
ldr r1, =gTasks
|
|
lsls r0, r2, 2
|
|
adds r0, r2
|
|
lsls r0, 3
|
|
adds r4, r0, r1
|
|
movs r1, 0xC
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x1
|
|
bne _08102300
|
|
ldr r1, =gBattleAnimArgs
|
|
ldr r0, =0x0000ffff
|
|
strh r0, [r1, 0xE]
|
|
b _0810233E
|
|
.pool
|
|
_08102300:
|
|
cmp r0, 0x2
|
|
bne _0810230C
|
|
adds r0, r2, 0
|
|
bl DestroyAnimVisualTask
|
|
b _08102344
|
|
_0810230C:
|
|
ldrh r0, [r4, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x8]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x4
|
|
bne _08102344
|
|
movs r0, 0
|
|
strh r0, [r4, 0x8]
|
|
ldrh r2, [r4, 0xA]
|
|
adds r2, 0x1
|
|
strh r2, [r4, 0xA]
|
|
lsls r1, r2, 8
|
|
movs r0, 0x10
|
|
subs r0, r2
|
|
orrs r1, r0
|
|
lsls r1, 16
|
|
lsrs r1, 16
|
|
movs r0, 0x52
|
|
bl SetGpuReg
|
|
movs r1, 0xA
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x10
|
|
bne _08102344
|
|
_0810233E:
|
|
ldrh r0, [r4, 0xC]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0xC]
|
|
_08102344:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81022D4
|
|
|
|
thumb_func_start sub_810234C
|
|
sub_810234C: @ 810234C
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
movs r1, 0
|
|
bl sub_80A6980
|
|
adds r2, r4, 0
|
|
adds r2, 0x2C
|
|
ldrb r0, [r2]
|
|
movs r1, 0x40
|
|
orrs r0, r1
|
|
strb r0, [r2]
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0x4]
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_810237C
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_810234C
|
|
|
|
thumb_func_start sub_810237C
|
|
sub_810237C: @ 810237C
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldrh r1, [r5, 0x2E]
|
|
movs r2, 0x2E
|
|
ldrsh r0, [r5, r2]
|
|
cmp r0, 0
|
|
beq _08102390
|
|
subs r0, r1, 0x1
|
|
strh r0, [r5, 0x2E]
|
|
b _081023CC
|
|
_08102390:
|
|
adds r2, r5, 0
|
|
adds r2, 0x2C
|
|
ldrb r1, [r2]
|
|
movs r0, 0x41
|
|
negs r0, r0
|
|
ands r0, r1
|
|
strb r0, [r2]
|
|
movs r0, 0x1E
|
|
strh r0, [r5, 0x2E]
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x32]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r5, 0x36]
|
|
ldr r0, =sub_80A6EEC
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
_081023CC:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_810237C
|
|
|
|
thumb_func_start sub_81023E0
|
|
sub_81023E0: @ 81023E0
|
|
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 r4, r0, r1
|
|
ldrh r0, [r4, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x8]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x4
|
|
bne _08102428
|
|
movs r0, 0
|
|
strh r0, [r4, 0x8]
|
|
ldrh r1, [r4, 0xA]
|
|
adds r1, 0x1
|
|
strh r1, [r4, 0xA]
|
|
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, 0xA
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x10
|
|
bne _08102428
|
|
adds r0, r5, 0
|
|
bl DestroyAnimVisualTask
|
|
_08102428:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81023E0
|
|
|
|
thumb_func_start sub_8102434
|
|
sub_8102434: @ 8102434
|
|
push {r4-r7,lr}
|
|
lsls r0, 24
|
|
lsrs r7, r0, 24
|
|
movs r4, 0
|
|
ldr r0, =gBattlersCount
|
|
ldrb r0, [r0]
|
|
cmp r4, r0
|
|
bcs _08102490
|
|
ldr r6, =gBattleAnimArgs
|
|
ldr r5, =gHealthboxSpriteIds
|
|
_08102448:
|
|
movs r1, 0
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0x1
|
|
bne _08102464
|
|
adds r0, r4, 0
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08102464
|
|
adds r0, r4, r5
|
|
ldrb r0, [r0]
|
|
bl SetHealthboxSpriteInvisible
|
|
_08102464:
|
|
movs r1, 0x2
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0x1
|
|
bne _08102482
|
|
adds r0, r4, 0
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x1
|
|
bne _08102482
|
|
adds r0, r4, r5
|
|
ldrb r0, [r0]
|
|
bl SetHealthboxSpriteInvisible
|
|
_08102482:
|
|
adds r0, r4, 0x1
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
ldr r0, =gBattlersCount
|
|
ldrb r0, [r0]
|
|
cmp r4, r0
|
|
bcc _08102448
|
|
_08102490:
|
|
adds r0, r7, 0
|
|
bl DestroyAnimVisualTask
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102434
|
|
|
|
thumb_func_start sub_81024A8
|
|
sub_81024A8: @ 81024A8
|
|
push {r4,r5,lr}
|
|
lsls r0, 24
|
|
lsrs r5, r0, 24
|
|
movs r4, 0
|
|
b _081024C2
|
|
_081024B2:
|
|
ldr r0, =gHealthboxSpriteIds
|
|
adds r0, r4, r0
|
|
ldrb r0, [r0]
|
|
bl SetHealthboxSpriteVisible
|
|
adds r0, r4, 0x1
|
|
lsls r0, 24
|
|
lsrs r4, r0, 24
|
|
_081024C2:
|
|
ldr r0, =gBattlersCount
|
|
ldrb r0, [r0]
|
|
cmp r4, r0
|
|
bcc _081024B2
|
|
adds r0, r5, 0
|
|
bl DestroyAnimVisualTask
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81024A8
|
|
|
|
thumb_func_start sub_81024E0
|
|
sub_81024E0: @ 81024E0
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081024F6
|
|
movs r0, 0x30
|
|
strh r0, [r4, 0x20]
|
|
movs r0, 0x28
|
|
b _081024FE
|
|
_081024F6:
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r1, [r0]
|
|
strh r1, [r4, 0x20]
|
|
ldrh r0, [r0, 0x2]
|
|
_081024FE:
|
|
strh r0, [r4, 0x22]
|
|
ldrb r1, [r4, 0x1]
|
|
movs r0, 0x3F
|
|
ands r0, r1
|
|
strb r0, [r4, 0x1]
|
|
ldrb r0, [r4, 0x3]
|
|
movs r1, 0xC0
|
|
orrs r0, r1
|
|
strb r0, [r4, 0x3]
|
|
movs r0, 0
|
|
strh r0, [r4, 0x2E]
|
|
ldr r0, =sub_8102528
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81024E0
|
|
|
|
thumb_func_start sub_8102528
|
|
sub_8102528: @ 8102528
|
|
push {lr}
|
|
adds r1, r0, 0
|
|
movs r2, 0x2E
|
|
ldrsh r0, [r1, r2]
|
|
cmp r0, 0
|
|
beq _0810253A
|
|
adds r0, r1, 0
|
|
bl DestroyAnimSprite
|
|
_0810253A:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8102528
|
|
|
|
thumb_func_start sub_8102540
|
|
sub_8102540: @ 8102540
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
ldr r2, =gBattleAnimArgs
|
|
lsrs r0, 24
|
|
ldrh r1, [r2]
|
|
adds r0, r1
|
|
movs r1, 0
|
|
strh r0, [r4, 0x20]
|
|
ldrh r0, [r2, 0x2]
|
|
strh r0, [r4, 0x22]
|
|
strh r1, [r4, 0x2E]
|
|
strh r1, [r4, 0x30]
|
|
strh r1, [r4, 0x32]
|
|
strh r1, [r4, 0x34]
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x36]
|
|
ldr r0, =sub_8102584
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102540
|
|
|
|
thumb_func_start sub_8102584
|
|
sub_8102584: @ 8102584
|
|
push {lr}
|
|
adds r1, r0, 0
|
|
ldrh r0, [r1, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _081025AE
|
|
movs r0, 0
|
|
strh r0, [r1, 0x30]
|
|
ldrh r2, [r1, 0x32]
|
|
movs r3, 0x32
|
|
ldrsh r0, [r1, r3]
|
|
cmp r0, 0x77
|
|
bgt _081025AE
|
|
ldrh r0, [r1, 0x22]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x22]
|
|
adds r0, r2, 0x1
|
|
strh r0, [r1, 0x32]
|
|
_081025AE:
|
|
movs r2, 0x2E
|
|
ldrsh r0, [r1, r2]
|
|
cmp r0, 0
|
|
beq _081025BC
|
|
adds r0, r1, 0
|
|
bl DestroyAnimSprite
|
|
_081025BC:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8102584
|
|
|
|
thumb_func_start sub_81025C0
|
|
sub_81025C0: @ 81025C0
|
|
push {r4-r7,lr}
|
|
mov r7, r10
|
|
mov r6, r9
|
|
mov r5, r8
|
|
push {r5-r7}
|
|
sub sp, 0xC
|
|
lsls r0, 24
|
|
lsrs r7, r0, 24
|
|
movs r4, 0
|
|
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
|
|
mov r8, r0
|
|
ldr r0, =0x0000ffff
|
|
mov r1, r8
|
|
ands r1, r0
|
|
mov r8, r1
|
|
ldr r0, =gTasks
|
|
mov r9, r0
|
|
lsls r5, r7, 2
|
|
adds r5, r7
|
|
lsls r5, 3
|
|
adds r6, r5, r0
|
|
strh r4, [r6, 0x8]
|
|
strh r4, [r6, 0xA]
|
|
strh r4, [r6, 0xC]
|
|
strh r1, [r6, 0xE]
|
|
strh r4, [r6, 0x10]
|
|
strh r4, [r6, 0x12]
|
|
strh r4, [r6, 0x14]
|
|
movs r0, 0xD
|
|
strh r0, [r6, 0x16]
|
|
movs r0, 0xE
|
|
strh r0, [r6, 0x18]
|
|
movs r0, 0xF
|
|
strh r0, [r6, 0x1A]
|
|
movs r0, 0x1
|
|
movs r1, 0x1
|
|
movs r2, 0x1
|
|
movs r3, 0x1
|
|
bl sub_80A76C4
|
|
mov r10, r0
|
|
mov r1, r8
|
|
orrs r1, r0
|
|
mov r8, r1
|
|
movs r0, 0x8
|
|
add r9, r0
|
|
add r5, r9
|
|
adds r0, r5, 0
|
|
adds r0, 0x1C
|
|
adds r5, 0x1E
|
|
adds r1, r5, 0
|
|
mov r2, r8
|
|
bl sub_80A8048
|
|
ldr r0, =0x000027d2
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r4, 0x80
|
|
lsls r4, 9
|
|
adds r1, r4, 0
|
|
lsls r1, r0
|
|
mov r0, r10
|
|
orrs r0, r1
|
|
mov r10, r0
|
|
ldr r0, =0x000027d3
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
lsls r4, r0
|
|
mov r1, r10
|
|
orrs r4, r1
|
|
ldr r0, =0x00007fbb
|
|
str r0, [sp]
|
|
adds r0, r4, 0
|
|
movs r1, 0
|
|
movs r2, 0
|
|
movs r3, 0x10
|
|
bl BeginNormalPaletteFade
|
|
ldr r1, =sub_81026A8
|
|
str r1, [r6]
|
|
adds r0, r7, 0
|
|
bl _call_via_r1
|
|
add sp, 0xC
|
|
pop {r3-r5}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
mov r10, r5
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81025C0
|
|
|
|
thumb_func_start sub_81026A8
|
|
sub_81026A8: @ 81026A8
|
|
push {r4-r7,lr}
|
|
mov r7, r8
|
|
push {r7}
|
|
sub sp, 0x4
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
lsls r0, r2, 2
|
|
adds r0, r2
|
|
lsls r0, 3
|
|
ldr r1, =gTasks
|
|
adds r4, r0, r1
|
|
movs r0, 0x8
|
|
ldrsh r1, [r4, r0]
|
|
cmp r1, 0x1
|
|
beq _08102794
|
|
cmp r1, 0x1
|
|
bgt _081026D4
|
|
cmp r1, 0
|
|
beq _081026E2
|
|
b _08102832
|
|
.pool
|
|
_081026D4:
|
|
cmp r1, 0x2
|
|
bne _081026DA
|
|
b _081027EC
|
|
_081026DA:
|
|
cmp r1, 0x3
|
|
bne _081026E0
|
|
b _08102820
|
|
_081026E0:
|
|
b _08102832
|
|
_081026E2:
|
|
ldrh r0, [r4, 0xA]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0xA]
|
|
lsls r0, 16
|
|
cmp r0, 0
|
|
bgt _081026F0
|
|
b _08102832
|
|
_081026F0:
|
|
strh r1, [r4, 0xA]
|
|
ldrh r0, [r4, 0xC]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0xC]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0xF
|
|
bgt _0810273C
|
|
ldrh r0, [r4, 0x16]
|
|
ldrh r1, [r4, 0x10]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x10]
|
|
ldrh r2, [r4, 0x18]
|
|
ldrh r3, [r4, 0x12]
|
|
adds r2, r3
|
|
strh r2, [r4, 0x12]
|
|
ldrh r1, [r4, 0x1A]
|
|
ldrh r5, [r4, 0x14]
|
|
adds r1, r5
|
|
strh r1, [r4, 0x14]
|
|
lsls r0, 16
|
|
asrs r0, 19
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
lsls r2, 16
|
|
asrs r2, 19
|
|
lsls r2, 16
|
|
lsls r1, 16
|
|
asrs r1, 19
|
|
lsls r1, 16
|
|
lsrs r2, 11
|
|
orrs r0, r2
|
|
lsrs r1, 6
|
|
orrs r0, r1
|
|
lsls r0, 16
|
|
lsrs r0, 16
|
|
mov r12, r0
|
|
b _08102746
|
|
_0810273C:
|
|
ldr r7, =0x00007fbb
|
|
mov r12, r7
|
|
ldrh r0, [r4, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x8]
|
|
_08102746:
|
|
movs r2, 0x1
|
|
movs r3, 0
|
|
movs r1, 0
|
|
_0810274C:
|
|
movs r5, 0xE
|
|
ldrsh r0, [r4, r5]
|
|
ands r0, r2
|
|
lsls r5, r2, 17
|
|
adds r6, r3, 0
|
|
adds r6, 0x10
|
|
adds r1, 0x1
|
|
mov r8, r1
|
|
cmp r0, 0
|
|
beq _08102778
|
|
movs r1, 0x1
|
|
ldr r2, =gPlttBufferFaded
|
|
_08102764:
|
|
adds r0, r3, r1
|
|
lsls r0, 1
|
|
adds r0, r2
|
|
mov r7, r12
|
|
strh r7, [r0]
|
|
adds r0, r1, 0x1
|
|
lsls r0, 16
|
|
lsrs r1, r0, 16
|
|
cmp r1, 0xF
|
|
bls _08102764
|
|
_08102778:
|
|
lsrs r2, r5, 16
|
|
lsls r0, r6, 16
|
|
lsrs r3, r0, 16
|
|
mov r1, r8
|
|
lsls r0, r1, 16
|
|
lsrs r1, r0, 16
|
|
cmp r1, 0xF
|
|
bls _0810274C
|
|
b _08102832
|
|
.pool
|
|
_08102794:
|
|
ldr r0, =gPaletteFade
|
|
ldrb r1, [r0, 0x7]
|
|
movs r0, 0x80
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
bne _08102832
|
|
movs r2, 0
|
|
ldr r3, =gSprites
|
|
movs r5, 0x14
|
|
adds r5, r3
|
|
mov r12, r5
|
|
ldr r7, =gUnknown_08592EBC
|
|
mov r8, r7
|
|
ldr r6, =gBattleAnimSpriteTemplate_8592EEC
|
|
movs r5, 0x1
|
|
_081027B2:
|
|
lsls r0, r2, 4
|
|
adds r0, r2
|
|
lsls r1, r0, 2
|
|
mov r7, r12
|
|
adds r0, r1, r7
|
|
ldr r0, [r0]
|
|
cmp r0, r8
|
|
beq _081027C6
|
|
cmp r0, r6
|
|
bne _081027CA
|
|
_081027C6:
|
|
adds r0, r1, r3
|
|
strh r5, [r0, 0x2E]
|
|
_081027CA:
|
|
adds r0, r2, 0x1
|
|
lsls r0, 24
|
|
lsrs r2, r0, 24
|
|
cmp r2, 0x3F
|
|
bls _081027B2
|
|
movs r0, 0
|
|
strh r0, [r4, 0xA]
|
|
b _08102814
|
|
.pool
|
|
_081027EC:
|
|
ldrh r0, [r4, 0xA]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0xA]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1E
|
|
ble _08102832
|
|
movs r1, 0x24
|
|
ldrsh r0, [r4, r1]
|
|
movs r2, 0x26
|
|
ldrsh r1, [r4, r2]
|
|
bl sub_80A8050
|
|
ldr r1, =0x00007fbb
|
|
str r1, [sp]
|
|
movs r1, 0
|
|
movs r2, 0x10
|
|
movs r3, 0
|
|
bl BeginNormalPaletteFade
|
|
_08102814:
|
|
ldrh r0, [r4, 0x8]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x8]
|
|
b _08102832
|
|
.pool
|
|
_08102820:
|
|
ldr r0, =gPaletteFade
|
|
ldrb r1, [r0, 0x7]
|
|
movs r0, 0x80
|
|
ands r0, r1
|
|
cmp r0, 0
|
|
bne _08102832
|
|
adds r0, r2, 0
|
|
bl DestroyAnimVisualTask
|
|
_08102832:
|
|
add sp, 0x4
|
|
pop {r3}
|
|
mov r8, r3
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81026A8
|
|
|
|
thumb_func_start sub_8102844
|
|
sub_8102844: @ 8102844
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldr r6, =gBattleAnimArgs
|
|
movs r1, 0x4
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0x1
|
|
bgt _08102856
|
|
movs r0, 0x2
|
|
strh r0, [r6, 0x4]
|
|
_08102856:
|
|
movs r1, 0x4
|
|
ldrsh r0, [r6, r1]
|
|
cmp r0, 0x7F
|
|
ble _08102862
|
|
movs r0, 0x7F
|
|
strh r0, [r6, 0x4]
|
|
_08102862:
|
|
movs r0, 0
|
|
strh r0, [r5, 0x2E]
|
|
ldrh r0, [r6, 0x4]
|
|
strh r0, [r5, 0x30]
|
|
ldr r4, =gBattleAnimTarget
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r1, [r6]
|
|
adds r0, r1
|
|
strh r0, [r5, 0x20]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r6, [r6, 0x2]
|
|
adds r0, r6
|
|
strh r0, [r5, 0x22]
|
|
ldrh r1, [r5, 0x20]
|
|
strh r1, [r5, 0x3A]
|
|
strh r0, [r5, 0x3C]
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _081028D4
|
|
ldrb r1, [r5, 0x3]
|
|
movs r0, 0x3F
|
|
negs r0, r0
|
|
ands r0, r1
|
|
movs r1, 0x10
|
|
orrs r0, r1
|
|
strb r0, [r5, 0x3]
|
|
ldrh r0, [r5, 0x20]
|
|
adds r0, 0x28
|
|
strh r0, [r5, 0x20]
|
|
ldrh r4, [r5, 0x22]
|
|
adds r4, 0x14
|
|
strh r4, [r5, 0x22]
|
|
lsls r0, 7
|
|
strh r0, [r5, 0x32]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
ldr r0, =0xffffec00
|
|
b _081028FA
|
|
.pool
|
|
_081028D4:
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _0810291C
|
|
ldrh r0, [r5, 0x20]
|
|
subs r0, 0x28
|
|
strh r0, [r5, 0x20]
|
|
ldrh r4, [r5, 0x22]
|
|
adds r4, 0x14
|
|
strh r4, [r5, 0x22]
|
|
lsls r0, 7
|
|
strh r0, [r5, 0x32]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
movs r0, 0xA0
|
|
lsls r0, 5
|
|
_081028FA:
|
|
bl __divsi3
|
|
strh r0, [r5, 0x34]
|
|
lsls r4, 7
|
|
strh r4, [r5, 0x36]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
ldr r0, =0xfffff600
|
|
bl __divsi3
|
|
strh r0, [r5, 0x38]
|
|
b _08102958
|
|
.pool
|
|
_0810291C:
|
|
ldrh r0, [r5, 0x20]
|
|
adds r0, 0x28
|
|
strh r0, [r5, 0x20]
|
|
ldrh r4, [r5, 0x22]
|
|
subs r4, 0x14
|
|
strh r4, [r5, 0x22]
|
|
lsls r0, 7
|
|
strh r0, [r5, 0x32]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
ldr r0, =0xffffec00
|
|
bl __divsi3
|
|
strh r0, [r5, 0x34]
|
|
lsls r4, 7
|
|
strh r4, [r5, 0x36]
|
|
movs r0, 0x30
|
|
ldrsh r1, [r5, r0]
|
|
movs r0, 0xA0
|
|
lsls r0, 4
|
|
bl __divsi3
|
|
strh r0, [r5, 0x38]
|
|
ldrb r1, [r5, 0x3]
|
|
movs r0, 0x3F
|
|
negs r0, r0
|
|
ands r0, r1
|
|
movs r1, 0x30
|
|
orrs r0, r1
|
|
strb r0, [r5, 0x3]
|
|
_08102958:
|
|
ldr r0, =sub_810296C
|
|
str r0, [r5, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102844
|
|
|
|
thumb_func_start sub_810296C
|
|
sub_810296C: @ 810296C
|
|
push {lr}
|
|
adds r2, r0, 0
|
|
ldrh r0, [r2, 0x34]
|
|
ldrh r1, [r2, 0x32]
|
|
adds r0, r1
|
|
strh r0, [r2, 0x32]
|
|
ldrh r1, [r2, 0x38]
|
|
ldrh r3, [r2, 0x36]
|
|
adds r1, r3
|
|
strh r1, [r2, 0x36]
|
|
lsls r0, 16
|
|
asrs r0, 23
|
|
strh r0, [r2, 0x20]
|
|
lsls r1, 16
|
|
asrs r1, 23
|
|
strh r1, [r2, 0x22]
|
|
ldrh r0, [r2, 0x30]
|
|
subs r0, 0x1
|
|
strh r0, [r2, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
bne _081029A2
|
|
ldrh r0, [r2, 0x3A]
|
|
strh r0, [r2, 0x20]
|
|
ldrh r0, [r2, 0x3C]
|
|
strh r0, [r2, 0x22]
|
|
_081029A2:
|
|
movs r1, 0x30
|
|
ldrsh r0, [r2, r1]
|
|
cmp r0, 0
|
|
bne _081029B0
|
|
adds r0, r2, 0
|
|
bl DestroyAnimSprite
|
|
_081029B0:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_810296C
|
|
|
|
thumb_func_start sub_81029B4
|
|
sub_81029B4: @ 81029B4
|
|
push {r4-r7,lr}
|
|
mov r7, r9
|
|
mov r6, r8
|
|
push {r6,r7}
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
mov r8, r0
|
|
lsls r0, 2
|
|
add r0, r8
|
|
lsls r0, 3
|
|
ldr r1, =gTasks
|
|
adds r6, r0, r1
|
|
movs r0, 0
|
|
bl GetAnimBattlerSpriteId
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r6, 0x8]
|
|
ldr r0, =0x00002771
|
|
bl AllocSpritePalette
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
strh r0, [r6, 0xA]
|
|
movs r1, 0xA
|
|
ldrsh r0, [r6, r1]
|
|
lsls r0, 20
|
|
movs r1, 0x80
|
|
lsls r1, 17
|
|
adds r0, r1
|
|
lsrs r3, r0, 16
|
|
ldr r2, =gSprites
|
|
movs r0, 0x8
|
|
ldrsh r1, [r6, r0]
|
|
lsls r0, r1, 4
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrb r0, [r0, 0x5]
|
|
lsrs r0, 4
|
|
adds r0, 0x10
|
|
lsls r4, r0, 4
|
|
movs r5, 0x1
|
|
ldr r2, =gPlttBufferUnfaded
|
|
_08102A0C:
|
|
adds r1, r3, r5
|
|
lsls r1, 1
|
|
adds r1, r2
|
|
adds r0, r4, r5
|
|
lsls r0, 1
|
|
adds r0, r2
|
|
ldrh r0, [r0]
|
|
strh r0, [r1]
|
|
adds r0, r5, 0x1
|
|
lsls r0, 16
|
|
lsrs r5, r0, 16
|
|
cmp r5, 0xF
|
|
bls _08102A0C
|
|
adds r0, r3, 0
|
|
movs r1, 0x10
|
|
movs r2, 0xB
|
|
movs r3, 0
|
|
bl BlendPalette
|
|
movs r0, 0
|
|
strh r0, [r6, 0xE]
|
|
movs r5, 0
|
|
ldr r7, =gSprites
|
|
movs r1, 0x1C
|
|
adds r1, r7
|
|
mov r9, r1
|
|
b _08102A88
|
|
.pool
|
|
_08102A54:
|
|
lsls r2, r0, 4
|
|
adds r2, r0
|
|
lsls r2, 2
|
|
adds r4, r2, r7
|
|
ldrb r1, [r6, 0xA]
|
|
lsls r1, 4
|
|
ldrb r3, [r4, 0x5]
|
|
movs r0, 0xF
|
|
ands r0, r3
|
|
orrs r0, r1
|
|
strb r0, [r4, 0x5]
|
|
movs r0, 0
|
|
strh r0, [r4, 0x2E]
|
|
lsls r0, r5, 7
|
|
strh r0, [r4, 0x30]
|
|
mov r0, r8
|
|
strh r0, [r4, 0x32]
|
|
add r2, r9
|
|
ldr r0, =sub_8102B3C
|
|
str r0, [r2]
|
|
ldrh r0, [r6, 0xE]
|
|
adds r0, 0x1
|
|
strh r0, [r6, 0xE]
|
|
adds r0, r5, 0x1
|
|
lsls r0, 16
|
|
lsrs r5, r0, 16
|
|
_08102A88:
|
|
cmp r5, 0x1
|
|
bhi _08102A9A
|
|
movs r0, 0
|
|
bl duplicate_obj_of_side_rel2move_in_transparent_mode
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0
|
|
bge _08102A54
|
|
_08102A9A:
|
|
ldr r0, =sub_8102AE0
|
|
str r0, [r6]
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl sub_80A8364
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x1
|
|
bne _08102AC8
|
|
movs r1, 0x80
|
|
lsls r1, 2
|
|
movs r0, 0
|
|
bl ClearGpuRegBits
|
|
b _08102AD2
|
|
.pool
|
|
_08102AC8:
|
|
movs r1, 0x80
|
|
lsls r1, 3
|
|
movs r0, 0
|
|
bl ClearGpuRegBits
|
|
_08102AD2:
|
|
pop {r3,r4}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81029B4
|
|
|
|
thumb_func_start sub_8102AE0
|
|
sub_8102AE0: @ 8102AE0
|
|
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
|
|
movs r1, 0xE
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _08102B32
|
|
ldr r0, =gBattleAnimAttacker
|
|
ldrb r0, [r0]
|
|
bl sub_80A8364
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x1
|
|
bne _08102B1C
|
|
movs r1, 0x80
|
|
lsls r1, 2
|
|
movs r0, 0
|
|
bl SetGpuRegBits
|
|
b _08102B26
|
|
.pool
|
|
_08102B1C:
|
|
movs r1, 0x80
|
|
lsls r1, 3
|
|
movs r0, 0
|
|
bl SetGpuRegBits
|
|
_08102B26:
|
|
ldr r0, =0x00002771
|
|
bl FreeSpritePaletteByTag
|
|
adds r0, r4, 0
|
|
bl DestroyAnimVisualTask
|
|
_08102B32:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102AE0
|
|
|
|
thumb_func_start sub_8102B3C
|
|
sub_8102B3C: @ 8102B3C
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldrh r0, [r5, 0x34]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x34]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x1
|
|
ble _08102B58
|
|
movs r0, 0
|
|
strh r0, [r5, 0x34]
|
|
ldrh r0, [r5, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r5, 0x2E]
|
|
_08102B58:
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r5, r1]
|
|
cmp r0, 0x40
|
|
ble _08102B80
|
|
ldr r2, =gTasks
|
|
movs r0, 0x32
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 2
|
|
adds r0, r1
|
|
lsls r0, 3
|
|
adds r0, r2
|
|
ldrh r1, [r0, 0xE]
|
|
subs r1, 0x1
|
|
strh r1, [r0, 0xE]
|
|
adds r0, r5, 0
|
|
bl obj_delete_but_dont_free_vram
|
|
b _08102BC2
|
|
.pool
|
|
_08102B80:
|
|
ldr r4, =gSineTable
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r5, r1]
|
|
lsls r0, 1
|
|
adds r0, r4
|
|
movs r2, 0
|
|
ldrsh r0, [r0, r2]
|
|
movs r1, 0x6
|
|
bl __divsi3
|
|
strh r0, [r5, 0x36]
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r5, r1]
|
|
lsls r0, 1
|
|
adds r0, r4
|
|
movs r2, 0
|
|
ldrsh r0, [r0, r2]
|
|
movs r1, 0xD
|
|
bl __divsi3
|
|
strh r0, [r5, 0x38]
|
|
ldrh r1, [r5, 0x30]
|
|
adds r1, r0
|
|
movs r0, 0xFF
|
|
ands r1, r0
|
|
strh r1, [r5, 0x30]
|
|
movs r1, 0x30
|
|
ldrsh r0, [r5, r1]
|
|
movs r2, 0x36
|
|
ldrsh r1, [r5, r2]
|
|
bl Sin
|
|
strh r0, [r5, 0x24]
|
|
_08102BC2:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102B3C
|
|
|
|
thumb_func_start sub_8102BCC
|
|
sub_8102BCC: @ 8102BCC
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldr r1, =DestroyAnimSprite
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102BCC
|
|
|
|
thumb_func_start sub_8102BE8
|
|
sub_8102BE8: @ 8102BE8
|
|
push {r4-r7,lr}
|
|
mov r7, r9
|
|
mov r6, r8
|
|
push {r6,r7}
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
mov r9, r0
|
|
ldr r4, =gUnknown_08593020
|
|
ldrh r0, [r4]
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r3, r0, 24
|
|
cmp r3, 0xFF
|
|
beq _08102C2C
|
|
lsls r0, r3, 20
|
|
movs r1, 0x80
|
|
lsls r1, 17
|
|
adds r0, r1
|
|
lsrs r3, r0, 16
|
|
movs r2, 0x1
|
|
ldr r5, =gPlttBufferFaded
|
|
_08102C14:
|
|
adds r1, r3, r2
|
|
lsls r1, 1
|
|
adds r1, r5
|
|
lsls r0, r2, 1
|
|
adds r0, r4
|
|
ldrh r0, [r0]
|
|
strh r0, [r1]
|
|
adds r0, r2, 0x1
|
|
lsls r0, 16
|
|
lsrs r2, r0, 16
|
|
cmp r2, 0x5
|
|
bls _08102C14
|
|
_08102C2C:
|
|
movs r4, 0x1
|
|
ldr r0, =gUnknown_08593020
|
|
mov r8, r0
|
|
_08102C32:
|
|
lsls r0, r4, 1
|
|
adds r0, r4
|
|
lsls r5, r0, 2
|
|
mov r1, r8
|
|
adds r0, r5, r1
|
|
ldrh r0, [r0]
|
|
bl AllocSpritePalette
|
|
lsls r0, 24
|
|
lsrs r3, r0, 24
|
|
adds r4, 0x1
|
|
mov r12, r4
|
|
cmp r3, 0xFF
|
|
beq _08102C7A
|
|
lsls r0, r3, 20
|
|
movs r1, 0x80
|
|
lsls r1, 17
|
|
adds r0, r1
|
|
lsrs r3, r0, 16
|
|
movs r2, 0x1
|
|
ldr r7, =gPlttBufferFaded
|
|
ldr r6, =gUnknown_08593020
|
|
adds r4, r5, 0
|
|
_08102C60:
|
|
adds r1, r3, r2
|
|
lsls r1, 1
|
|
adds r1, r7
|
|
lsls r0, r2, 1
|
|
adds r0, r4
|
|
adds r0, r6
|
|
ldrh r0, [r0]
|
|
strh r0, [r1]
|
|
adds r0, r2, 0x1
|
|
lsls r0, 16
|
|
lsrs r2, r0, 16
|
|
cmp r2, 0x5
|
|
bls _08102C60
|
|
_08102C7A:
|
|
mov r1, r12
|
|
lsls r0, r1, 16
|
|
lsrs r4, r0, 16
|
|
cmp r4, 0x3
|
|
bls _08102C32
|
|
mov r0, r9
|
|
bl DestroyAnimVisualTask
|
|
pop {r3,r4}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102BE8
|
|
|
|
thumb_func_start sub_8102CA0
|
|
sub_8102CA0: @ 8102CA0
|
|
push {r4-r6,lr}
|
|
lsls r0, 24
|
|
lsrs r5, r0, 24
|
|
movs r4, 0x1
|
|
ldr r6, =gUnknown_08593020
|
|
_08102CAA:
|
|
lsls r0, r4, 1
|
|
adds r0, r4
|
|
lsls r0, 2
|
|
adds r0, r6
|
|
ldrh r0, [r0]
|
|
bl FreeSpritePaletteByTag
|
|
adds r0, r4, 0x1
|
|
lsls r0, 16
|
|
lsrs r4, r0, 16
|
|
cmp r4, 0x3
|
|
bls _08102CAA
|
|
adds r0, r5, 0
|
|
bl DestroyAnimVisualTask
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102CA0
|
|
|
|
thumb_func_start sub_8102CD4
|
|
sub_8102CD4: @ 8102CD4
|
|
push {r4-r6,lr}
|
|
sub sp, 0x4
|
|
adds r5, r0, 0
|
|
bl sub_80A6838
|
|
ldr r4, =gBattleAnimArgs
|
|
ldrb r1, [r4]
|
|
adds r0, r5, 0
|
|
bl StartSpriteAnim
|
|
ldr r2, =gUnknown_08593020
|
|
movs r0, 0x2
|
|
ldrsh r1, [r4, r0]
|
|
lsls r0, r1, 1
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrh r0, [r0]
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0xFF
|
|
beq _08102D10
|
|
lsls r2, r0, 4
|
|
ldrb r1, [r5, 0x5]
|
|
movs r0, 0xF
|
|
ands r0, r1
|
|
orrs r0, r2
|
|
strb r0, [r5, 0x5]
|
|
_08102D10:
|
|
ldrh r0, [r4, 0x2]
|
|
movs r1, 0
|
|
strh r0, [r5, 0x30]
|
|
strh r1, [r5, 0x32]
|
|
ldrh r0, [r4, 0x4]
|
|
strh r0, [r5, 0x34]
|
|
bl IsContest
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
beq _08102D34
|
|
movs r6, 0x30
|
|
movs r3, 0x28
|
|
b _08102D4E
|
|
.pool
|
|
_08102D34:
|
|
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
|
|
lsrs r3, r0, 24
|
|
_08102D4E:
|
|
ldrh r0, [r5, 0x20]
|
|
lsls r1, r0, 4
|
|
strh r1, [r5, 0x36]
|
|
ldrh r1, [r5, 0x22]
|
|
lsls r2, r1, 4
|
|
strh r2, [r5, 0x38]
|
|
subs r0, r6, r0
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
subs r1, r3, r1
|
|
lsls r1, 16
|
|
asrs r1, 16
|
|
adds r2, r5, 0
|
|
adds r2, 0x3A
|
|
adds r3, r5, 0
|
|
adds r3, 0x3C
|
|
movs r4, 0x28
|
|
str r4, [sp]
|
|
bl sub_8102D8C
|
|
ldr r0, =sub_8102DE4
|
|
str r0, [r5, 0x1C]
|
|
add sp, 0x4
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102CD4
|
|
|
|
thumb_func_start sub_8102D8C
|
|
sub_8102D8C: @ 8102D8C
|
|
push {r4-r7,lr}
|
|
mov r7, r8
|
|
push {r7}
|
|
adds r7, r2, 0
|
|
mov r8, r3
|
|
ldr r2, [sp, 0x18]
|
|
lsls r1, 16
|
|
lsrs r6, r1, 16
|
|
lsls r2, 24
|
|
lsrs r1, r2, 24
|
|
lsls r0, 16
|
|
asrs r2, r0, 16
|
|
cmp r2, 0
|
|
bge _08102DAE
|
|
lsls r0, r1, 24
|
|
negs r0, r0
|
|
lsrs r1, r0, 24
|
|
_08102DAE:
|
|
lsls r5, r2, 8
|
|
lsls r1, 24
|
|
asrs r1, 24
|
|
adds r0, r5, 0
|
|
bl __divsi3
|
|
adds r4, r0, 0
|
|
cmp r4, 0
|
|
bne _08102DC2
|
|
movs r4, 0x1
|
|
_08102DC2:
|
|
adds r0, r5, 0
|
|
adds r1, r4, 0
|
|
bl __divsi3
|
|
strh r0, [r7]
|
|
lsls r0, r6, 16
|
|
asrs r0, 8
|
|
adds r1, r4, 0
|
|
bl __divsi3
|
|
mov r1, r8
|
|
strh r0, [r1]
|
|
pop {r3}
|
|
mov r8, r3
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8102D8C
|
|
|
|
thumb_func_start sub_8102DE4
|
|
sub_8102DE4: @ 8102DE4
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
movs r5, 0
|
|
strh r0, [r4, 0x2E]
|
|
movs r0, 0x2E
|
|
ldrsh r1, [r4, r0]
|
|
lsls r0, r1, 2
|
|
adds r1, r0, r1
|
|
adds r0, r1, 0
|
|
cmp r1, 0
|
|
bge _08102E00
|
|
adds r0, 0xFF
|
|
_08102E00:
|
|
asrs r0, 8
|
|
lsls r0, 8
|
|
subs r0, r1, r0
|
|
ldrh r1, [r4, 0x3A]
|
|
ldrh r2, [r4, 0x36]
|
|
adds r1, r2
|
|
strh r1, [r4, 0x36]
|
|
ldrh r2, [r4, 0x3C]
|
|
ldrh r3, [r4, 0x38]
|
|
adds r2, r3
|
|
strh r2, [r4, 0x38]
|
|
lsls r1, 16
|
|
asrs r1, 20
|
|
strh r1, [r4, 0x20]
|
|
lsls r2, 16
|
|
asrs r2, 20
|
|
strh r2, [r4, 0x22]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
movs r1, 0xF
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
ldrh r2, [r4, 0x22]
|
|
ldrh r0, [r4, 0x20]
|
|
adds r0, 0x10
|
|
lsls r0, 16
|
|
movs r1, 0x88
|
|
lsls r1, 17
|
|
cmp r0, r1
|
|
bhi _08102E4E
|
|
lsls r0, r2, 16
|
|
asrs r1, r0, 16
|
|
movs r0, 0x10
|
|
negs r0, r0
|
|
cmp r1, r0
|
|
blt _08102E4E
|
|
cmp r1, 0x80
|
|
ble _08102E56
|
|
_08102E4E:
|
|
adds r0, r4, 0
|
|
bl move_anim_8074EE0
|
|
b _08102EA6
|
|
_08102E56:
|
|
movs r0, 0x34
|
|
ldrsh r1, [r4, r0]
|
|
cmp r1, 0
|
|
beq _08102EA6
|
|
ldrh r0, [r4, 0x32]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x32]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, r1
|
|
ble _08102EA6
|
|
strh r5, [r4, 0x32]
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x3
|
|
ble _08102E7E
|
|
strh r5, [r4, 0x30]
|
|
_08102E7E:
|
|
ldr r2, =gUnknown_08593020
|
|
movs r3, 0x30
|
|
ldrsh r1, [r4, r3]
|
|
lsls r0, r1, 1
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrh r0, [r0]
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0xFF
|
|
beq _08102EA6
|
|
lsls r2, r0, 4
|
|
ldrb r1, [r4, 0x5]
|
|
movs r0, 0xF
|
|
ands r0, r1
|
|
orrs r0, r2
|
|
strb r0, [r4, 0x5]
|
|
_08102EA6:
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102DE4
|
|
|
|
thumb_func_start sub_8102EB0
|
|
sub_8102EB0: @ 8102EB0
|
|
push {r4-r7,lr}
|
|
adds r6, r0, 0
|
|
ldr r7, =gBattleAnimAttacker
|
|
ldrb r0, [r7]
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0x1
|
|
bne _08102ECE
|
|
ldr r1, =gBattleAnimArgs
|
|
movs r2, 0x2
|
|
ldrsh r0, [r1, r2]
|
|
negs r0, r0
|
|
strh r0, [r1, 0x2]
|
|
_08102ECE:
|
|
ldrb r0, [r7]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
ldr r4, =gBattleAnimArgs
|
|
lsrs r0, 24
|
|
ldrh r1, [r4, 0x2]
|
|
adds r0, r1
|
|
movs r5, 0
|
|
strh r0, [r6, 0x20]
|
|
ldrb r0, [r7]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
ldrh r2, [r4, 0x4]
|
|
adds r0, r2
|
|
strh r0, [r6, 0x22]
|
|
ldrb r1, [r4]
|
|
adds r0, r6, 0
|
|
bl StartSpriteAnim
|
|
strh r5, [r6, 0x32]
|
|
strh r5, [r6, 0x34]
|
|
ldrh r0, [r6, 0x20]
|
|
lsls r0, 4
|
|
strh r0, [r6, 0x36]
|
|
ldrh r0, [r6, 0x22]
|
|
lsls r0, 4
|
|
strh r0, [r6, 0x38]
|
|
movs r1, 0x2
|
|
ldrsh r0, [r4, r1]
|
|
lsls r0, 4
|
|
movs r1, 0x5
|
|
bl __divsi3
|
|
strh r0, [r6, 0x3A]
|
|
movs r2, 0x4
|
|
ldrsh r0, [r4, r2]
|
|
lsls r0, 7
|
|
movs r1, 0x5
|
|
bl __divsi3
|
|
strh r0, [r6, 0x3C]
|
|
ldr r0, =sub_8102F40
|
|
str r0, [r6, 0x1C]
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102EB0
|
|
|
|
thumb_func_start sub_8102F40
|
|
sub_8102F40: @ 8102F40
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldrh r0, [r4, 0x3A]
|
|
ldrh r1, [r4, 0x36]
|
|
adds r0, r1
|
|
strh r0, [r4, 0x36]
|
|
ldrh r1, [r4, 0x3C]
|
|
ldrh r2, [r4, 0x38]
|
|
adds r1, r2
|
|
strh r1, [r4, 0x38]
|
|
lsls r0, 16
|
|
asrs r0, 20
|
|
strh r0, [r4, 0x20]
|
|
lsls r1, 16
|
|
asrs r1, 20
|
|
strh r1, [r4, 0x22]
|
|
movs r1, 0x2E
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0x5
|
|
ble _08102F9E
|
|
movs r2, 0x34
|
|
ldrsh r0, [r4, r2]
|
|
cmp r0, 0
|
|
bne _08102F9E
|
|
ldrh r0, [r4, 0x32]
|
|
adds r0, 0x10
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x32]
|
|
movs r1, 0x32
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x12
|
|
bl Cos
|
|
strh r0, [r4, 0x24]
|
|
movs r2, 0x32
|
|
ldrsh r0, [r4, r2]
|
|
movs r1, 0x12
|
|
bl Sin
|
|
strh r0, [r4, 0x26]
|
|
movs r1, 0x32
|
|
ldrsh r0, [r4, r1]
|
|
cmp r0, 0
|
|
bne _08102F9E
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x34]
|
|
_08102F9E:
|
|
ldrh r0, [r4, 0x2E]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x30
|
|
bne _08102FB2
|
|
adds r0, r4, 0
|
|
bl move_anim_8074EE0
|
|
_08102FB2:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_8102F40
|
|
|
|
thumb_func_start sub_8102FB8
|
|
sub_8102FB8: @ 8102FB8
|
|
push {r4-r6,lr}
|
|
adds r5, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0x1
|
|
bne _08102FDC
|
|
ldrb r0, [r5, 0x3]
|
|
movs r1, 0x3F
|
|
negs r1, r1
|
|
ands r1, r0
|
|
movs r0, 0x10
|
|
orrs r1, r0
|
|
strb r1, [r5, 0x3]
|
|
movs r6, 0x10
|
|
b _08102FDE
|
|
.pool
|
|
_08102FDC:
|
|
ldr r6, =0x0000fff0
|
|
_08102FDE:
|
|
ldr r4, =gBattleAnimAttacker
|
|
ldrb r0, [r4]
|
|
movs r1, 0x2
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, r6
|
|
strh r0, [r5, 0x20]
|
|
ldrb r0, [r4]
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
adds r0, 0x8
|
|
strh r0, [r5, 0x22]
|
|
movs r0, 0x8
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =sub_80A64B0
|
|
str r0, [r5, 0x1C]
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8102FB8
|
|
|
|
thumb_func_start sub_8103028
|
|
sub_8103028: @ 8103028
|
|
push {r4,r5,lr}
|
|
adds r4, r0, 0
|
|
bl sub_80A6838
|
|
ldrh r0, [r4, 0x22]
|
|
adds r0, 0x8
|
|
strh r0, [r4, 0x22]
|
|
ldr r5, =gBattleAnimArgs
|
|
ldrb r1, [r5, 0x2]
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
ldr r2, =gUnknown_08593020
|
|
movs r0, 0x4
|
|
ldrsh r1, [r5, r0]
|
|
lsls r0, r1, 1
|
|
adds r0, r1
|
|
lsls r0, 2
|
|
adds r0, r2
|
|
ldrh r0, [r0]
|
|
bl IndexOfSpritePaletteTag
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
cmp r0, 0xFF
|
|
beq _08103068
|
|
lsls r2, r0, 4
|
|
ldrb r1, [r4, 0x5]
|
|
movs r0, 0xF
|
|
ands r0, r1
|
|
orrs r0, r2
|
|
strb r0, [r4, 0x5]
|
|
_08103068:
|
|
movs r1, 0
|
|
ldrsh r0, [r5, r1]
|
|
movs r2, 0x20
|
|
cmp r0, 0
|
|
bne _08103074
|
|
ldr r2, =0x0000ffe0
|
|
_08103074:
|
|
movs r0, 0x28
|
|
strh r0, [r4, 0x2E]
|
|
ldrh r1, [r4, 0x20]
|
|
strh r1, [r4, 0x30]
|
|
lsls r0, r2, 16
|
|
asrs r0, 16
|
|
adds r0, r1
|
|
strh r0, [r4, 0x32]
|
|
ldrh r0, [r4, 0x22]
|
|
strh r0, [r4, 0x34]
|
|
subs r0, 0x28
|
|
strh r0, [r4, 0x36]
|
|
adds r0, r4, 0
|
|
bl InitAnimLinearTranslation
|
|
ldrh r0, [r5, 0x6]
|
|
strh r0, [r4, 0x38]
|
|
ldr r0, =sub_81030B0
|
|
str r0, [r4, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103028
|
|
|
|
thumb_func_start sub_81030B0
|
|
sub_81030B0: @ 81030B0
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
bl TranslateAnimLinear
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _08103100
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x8
|
|
bl Sin
|
|
lsls r0, 16
|
|
lsrs r1, r0, 16
|
|
ldrh r2, [r4, 0x24]
|
|
movs r3, 0x24
|
|
ldrsh r0, [r4, r3]
|
|
cmp r0, 0
|
|
bge _081030DC
|
|
lsls r0, r1, 16
|
|
negs r0, r0
|
|
lsrs r1, r0, 16
|
|
_081030DC:
|
|
lsls r0, r1, 16
|
|
asrs r0, 16
|
|
adds r0, r2
|
|
strh r0, [r4, 0x24]
|
|
movs r1, 0x38
|
|
ldrsh r0, [r4, r1]
|
|
movs r1, 0x4
|
|
bl Sin
|
|
ldrh r3, [r4, 0x26]
|
|
adds r0, r3
|
|
strh r0, [r4, 0x26]
|
|
ldrh r0, [r4, 0x38]
|
|
adds r0, 0x8
|
|
movs r1, 0xFF
|
|
ands r0, r1
|
|
strh r0, [r4, 0x38]
|
|
b _08103106
|
|
_08103100:
|
|
adds r0, r4, 0
|
|
bl DestroyAnimSprite
|
|
_08103106:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_81030B0
|
|
|
|
thumb_func_start sub_810310C
|
|
sub_810310C: @ 810310C
|
|
push {r4-r6,lr}
|
|
adds r6, r1, 0
|
|
lsls r0, 24
|
|
lsrs r5, r0, 24
|
|
adds r0, r5, 0
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _0810312C
|
|
adds r0, r5, 0
|
|
movs r1, 0x5
|
|
bl sub_80A861C
|
|
adds r0, 0x8
|
|
b _08103136
|
|
_0810312C:
|
|
adds r0, r5, 0
|
|
movs r1, 0x4
|
|
bl sub_80A861C
|
|
subs r0, 0x8
|
|
_08103136:
|
|
strh r0, [r6, 0x20]
|
|
adds r0, r5, 0
|
|
movs r1, 0x3
|
|
bl GetBattlerSpriteCoord
|
|
adds r4, r0, 0
|
|
adds r0, r5, 0
|
|
movs r1, 0
|
|
bl sub_80A861C
|
|
lsls r4, 24
|
|
lsrs r4, 24
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0
|
|
bge _08103158
|
|
adds r0, 0x3
|
|
_08103158:
|
|
asrs r0, 2
|
|
subs r0, r4, r0
|
|
strh r0, [r6, 0x22]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_810310C
|
|
|
|
thumb_func_start sub_8103164
|
|
sub_8103164: @ 8103164
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _08103180
|
|
ldr r0, =gBattleAnimAttacker
|
|
b _08103182
|
|
.pool
|
|
_08103180:
|
|
ldr r0, =gBattleAnimTarget
|
|
_08103182:
|
|
ldrb r4, [r0]
|
|
adds r0, r4, 0
|
|
adds r1, r5, 0
|
|
bl sub_810310C
|
|
adds r0, r4, 0
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
negs r1, r0
|
|
orrs r1, r0
|
|
lsrs r1, 31
|
|
ldr r0, =gBattleAnimArgs
|
|
ldrh r0, [r0, 0x2]
|
|
strh r0, [r5, 0x2E]
|
|
adds r0, r1, 0x2
|
|
strh r0, [r5, 0x30]
|
|
adds r0, r5, 0
|
|
bl StartSpriteAnim
|
|
ldr r1, =sub_81031D0
|
|
adds r0, r5, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r5, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103164
|
|
|
|
thumb_func_start sub_81031D0
|
|
sub_81031D0: @ 81031D0
|
|
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 _081031F8
|
|
ldr r1, =DestroyAnimSprite
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldrh r1, [r4, 0x30]
|
|
lsls r1, 24
|
|
lsrs r1, 24
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r4, 0x1C]
|
|
_081031F8:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81031D0
|
|
|
|
thumb_func_start sub_8103208
|
|
sub_8103208: @ 8103208
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _08103224
|
|
ldr r0, =gBattleAnimAttacker
|
|
b _08103226
|
|
.pool
|
|
_08103224:
|
|
ldr r0, =gBattleAnimTarget
|
|
_08103226:
|
|
ldrb r0, [r0]
|
|
adds r1, r4, 0
|
|
bl sub_810310C
|
|
movs r0, 0
|
|
strh r0, [r4, 0x2E]
|
|
ldr r1, =sub_8103250
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67BC
|
|
str r0, [r4, 0x1C]
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103208
|
|
|
|
thumb_func_start sub_8103250
|
|
sub_8103250: @ 8103250
|
|
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, 0x10
|
|
ble _08103276
|
|
adds r0, r4, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAffineAnim
|
|
ldr r1, =move_anim_8074EE0
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67BC
|
|
str r0, [r4, 0x1C]
|
|
_08103276:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103250
|
|
|
|
thumb_func_start sub_8103284
|
|
sub_8103284: @ 8103284
|
|
push {r4-r6,lr}
|
|
adds r4, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _081032A0
|
|
ldr r0, =gBattleAnimAttacker
|
|
b _081032A2
|
|
.pool
|
|
_081032A0:
|
|
ldr r0, =gBattleAnimTarget
|
|
_081032A2:
|
|
ldrb r5, [r0]
|
|
adds r0, r5, 0
|
|
movs r1, 0
|
|
bl GetBattlerSpriteCoord
|
|
lsls r0, 24
|
|
lsrs r0, 24
|
|
movs r6, 0
|
|
strh r0, [r4, 0x20]
|
|
adds r0, r5, 0
|
|
movs r1, 0x2
|
|
bl sub_80A861C
|
|
strh r0, [r4, 0x22]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x9
|
|
bgt _081032CA
|
|
movs r0, 0xA
|
|
strh r0, [r4, 0x22]
|
|
_081032CA:
|
|
movs r0, 0x1
|
|
strh r0, [r4, 0x2E]
|
|
strh r6, [r4, 0x30]
|
|
adds r1, r4, 0
|
|
adds r1, 0x43
|
|
ldrb r0, [r1]
|
|
strh r0, [r4, 0x32]
|
|
ldrb r0, [r1]
|
|
adds r0, 0x4
|
|
strh r0, [r4, 0x34]
|
|
strh r6, [r4, 0x36]
|
|
ldr r1, =sub_8103300
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67BC
|
|
str r0, [r4, 0x1C]
|
|
pop {r4-r6}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103284
|
|
|
|
thumb_func_start sub_8103300
|
|
sub_8103300: @ 8103300
|
|
push {lr}
|
|
adds r1, r0, 0
|
|
ldrh r0, [r1, 0x36]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x36]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0xC
|
|
ble _08103316
|
|
ldr r0, =sub_8103320
|
|
str r0, [r1, 0x1C]
|
|
_08103316:
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103300
|
|
|
|
thumb_func_start sub_8103320
|
|
sub_8103320: @ 8103320
|
|
push {lr}
|
|
adds r2, r0, 0
|
|
ldrh r0, [r2, 0x30]
|
|
adds r1, r0, 0x4
|
|
strh r1, [r2, 0x30]
|
|
lsls r0, r1, 16
|
|
asrs r0, 16
|
|
cmp r0, 0xFE
|
|
ble _08103352
|
|
ldrh r0, [r2, 0x2E]
|
|
subs r0, 0x1
|
|
strh r0, [r2, 0x2E]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0
|
|
bne _0810334C
|
|
strh r0, [r2, 0x24]
|
|
ldr r0, =sub_8103250
|
|
str r0, [r2, 0x1C]
|
|
b _08103388
|
|
.pool
|
|
_0810334C:
|
|
movs r0, 0xFF
|
|
ands r1, r0
|
|
strh r1, [r2, 0x30]
|
|
_08103352:
|
|
movs r1, 0x30
|
|
ldrsh r0, [r2, r1]
|
|
cmp r0, 0x4F
|
|
ble _08103362
|
|
ldrh r0, [r2, 0x34]
|
|
adds r1, r2, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
_08103362:
|
|
movs r3, 0x30
|
|
ldrsh r0, [r2, r3]
|
|
cmp r0, 0x9F
|
|
ble _08103372
|
|
ldrh r0, [r2, 0x32]
|
|
adds r1, r2, 0
|
|
adds r1, 0x43
|
|
strb r0, [r1]
|
|
_08103372:
|
|
ldr r1, =gSineTable
|
|
movs r3, 0x30
|
|
ldrsh r0, [r2, r3]
|
|
lsls r0, 1
|
|
adds r0, r1
|
|
ldrh r0, [r0]
|
|
lsls r0, 16
|
|
asrs r0, 19
|
|
asrs r1, r0, 1
|
|
adds r0, r1
|
|
strh r0, [r2, 0x24]
|
|
_08103388:
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103320
|
|
|
|
thumb_func_start sub_8103390
|
|
sub_8103390: @ 8103390
|
|
push {r4,r5,lr}
|
|
adds r5, r0, 0
|
|
ldr r0, =gBattleAnimArgs
|
|
movs r1, 0
|
|
ldrsh r0, [r0, r1]
|
|
cmp r0, 0
|
|
bne _081033AC
|
|
ldr r0, =gBattleAnimAttacker
|
|
b _081033AE
|
|
.pool
|
|
_081033AC:
|
|
ldr r0, =gBattleAnimTarget
|
|
_081033AE:
|
|
ldrb r4, [r0]
|
|
adds r0, r4, 0
|
|
adds r1, r5, 0
|
|
bl sub_810310C
|
|
adds r0, r4, 0
|
|
bl GetBattlerSide
|
|
lsls r0, 24
|
|
cmp r0, 0
|
|
bne _081033D4
|
|
adds r0, r5, 0
|
|
movs r1, 0
|
|
bl StartSpriteAnim
|
|
movs r0, 0x2
|
|
b _081033DE
|
|
.pool
|
|
_081033D4:
|
|
adds r0, r5, 0
|
|
movs r1, 0x1
|
|
bl StartSpriteAnim
|
|
movs r0, 0x3
|
|
_081033DE:
|
|
strh r0, [r5, 0x2E]
|
|
ldr r0, =sub_81033F0
|
|
str r0, [r5, 0x1C]
|
|
pop {r4,r5}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_8103390
|
|
|
|
thumb_func_start sub_81033F0
|
|
sub_81033F0: @ 81033F0
|
|
push {r4,lr}
|
|
adds r4, r0, 0
|
|
ldrh r0, [r4, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r4, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0xA
|
|
ble _0810341E
|
|
movs r0, 0
|
|
strh r0, [r4, 0x30]
|
|
ldrh r1, [r4, 0x2E]
|
|
lsls r1, 24
|
|
lsrs r1, 24
|
|
adds r0, r4, 0
|
|
bl StartSpriteAnim
|
|
ldr r1, =sub_810342C
|
|
adds r0, r4, 0
|
|
bl StoreSpriteCallbackInData6
|
|
ldr r0, =sub_80A67D8
|
|
str r0, [r4, 0x1C]
|
|
_0810341E:
|
|
pop {r4}
|
|
pop {r0}
|
|
bx r0
|
|
.pool
|
|
thumb_func_end sub_81033F0
|
|
|
|
thumb_func_start sub_810342C
|
|
sub_810342C: @ 810342C
|
|
push {lr}
|
|
adds r1, r0, 0
|
|
ldrh r0, [r1, 0x30]
|
|
adds r0, 0x1
|
|
strh r0, [r1, 0x30]
|
|
lsls r0, 16
|
|
asrs r0, 16
|
|
cmp r0, 0x5
|
|
ble _08103444
|
|
adds r0, r1, 0
|
|
bl DestroyAnimSprite
|
|
_08103444:
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_810342C
|
|
|
|
.align 2, 0
|