mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
1877 lines
29 KiB
ArmAsm
1877 lines
29 KiB
ArmAsm
|
.include "asm/macros.inc"
|
||
|
.include "constants/constants.inc"
|
||
|
|
||
|
.syntax unified
|
||
|
|
||
|
.text
|
||
|
|
||
|
thumb_func_start sub_811572C
|
||
|
sub_811572C: @ 811572C
|
||
|
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]
|
||
|
ldr r0, =gBattleAnimAttacker
|
||
|
ldrb r0, [r0]
|
||
|
bl GetBattlerSide
|
||
|
lsls r0, 24
|
||
|
lsrs r1, r0, 24
|
||
|
cmp r1, 0
|
||
|
beq _0811576C
|
||
|
ldrh r0, [r5, 0x6]
|
||
|
negs r0, r0
|
||
|
strh r0, [r4, 0x30]
|
||
|
movs r0, 0x1
|
||
|
strh r0, [r4, 0x36]
|
||
|
b _0811577A
|
||
|
.pool
|
||
|
_0811576C:
|
||
|
ldrh r0, [r5, 0x6]
|
||
|
strh r0, [r4, 0x30]
|
||
|
strh r1, [r4, 0x36]
|
||
|
adds r0, r4, 0
|
||
|
movs r1, 0x1
|
||
|
bl StartSpriteAnim
|
||
|
_0811577A:
|
||
|
ldr r0, =gBattleAnimArgs
|
||
|
ldrh r0, [r0, 0x8]
|
||
|
strh r0, [r4, 0x34]
|
||
|
ldr r1, =sub_8115798
|
||
|
str r1, [r4, 0x1C]
|
||
|
adds r0, r4, 0
|
||
|
bl _call_via_r1
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_811572C
|
||
|
|
||
|
thumb_func_start sub_8115798
|
||
|
sub_8115798: @ 8115798
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
movs r1, 0x2E
|
||
|
ldrsh r0, [r4, r1]
|
||
|
movs r1, 0x1E
|
||
|
bl Cos
|
||
|
strh r0, [r4, 0x24]
|
||
|
movs r2, 0x2E
|
||
|
ldrsh r0, [r4, r2]
|
||
|
movs r1, 0xA
|
||
|
bl Sin
|
||
|
strh r0, [r4, 0x26]
|
||
|
ldrh r0, [r4, 0x2E]
|
||
|
cmp r0, 0x7F
|
||
|
bhi _081157CA
|
||
|
ldrb r0, [r4, 0x5]
|
||
|
movs r1, 0xD
|
||
|
negs r1, r1
|
||
|
ands r1, r0
|
||
|
movs r0, 0x4
|
||
|
orrs r1, r0
|
||
|
strb r1, [r4, 0x5]
|
||
|
b _081157D2
|
||
|
_081157CA:
|
||
|
ldrb r0, [r4, 0x5]
|
||
|
movs r1, 0xC
|
||
|
orrs r0, r1
|
||
|
strb r0, [r4, 0x5]
|
||
|
_081157D2:
|
||
|
ldrh r0, [r4, 0x30]
|
||
|
ldrh r1, [r4, 0x2E]
|
||
|
adds r0, r1
|
||
|
movs r1, 0xFF
|
||
|
ands r0, r1
|
||
|
strh r0, [r4, 0x2E]
|
||
|
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 _081157F6
|
||
|
adds r0, r4, 0
|
||
|
bl DestroyAnimSprite
|
||
|
_081157F6:
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_8115798
|
||
|
|
||
|
thumb_func_start sub_81157FC
|
||
|
sub_81157FC: @ 81157FC
|
||
|
push {r4,r5,lr}
|
||
|
sub sp, 0x4
|
||
|
adds r5, r0, 0
|
||
|
ldr r4, =gBattleAnimArgs
|
||
|
movs r1, 0
|
||
|
ldrsh r0, [r4, r1]
|
||
|
bl sub_811583C
|
||
|
movs r1, 0x2
|
||
|
ldrsb r1, [r4, r1]
|
||
|
ldrb r2, [r4, 0x4]
|
||
|
ldrb r3, [r4, 0x6]
|
||
|
ldrh r4, [r4, 0x8]
|
||
|
str r4, [sp]
|
||
|
bl BeginNormalPaletteFade
|
||
|
adds r2, r5, 0
|
||
|
adds r2, 0x3E
|
||
|
ldrb r0, [r2]
|
||
|
movs r1, 0x4
|
||
|
orrs r0, r1
|
||
|
strb r0, [r2]
|
||
|
ldr r0, =sub_8115884
|
||
|
str r0, [r5, 0x1C]
|
||
|
add sp, 0x4
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81157FC
|
||
|
|
||
|
thumb_func_start sub_811583C
|
||
|
sub_811583C: @ 811583C
|
||
|
push {r4-r6,lr}
|
||
|
mov r6, r8
|
||
|
push {r6}
|
||
|
sub sp, 0xC
|
||
|
lsls r0, 16
|
||
|
lsrs r0, 16
|
||
|
movs r4, 0x1
|
||
|
mov r8, r0
|
||
|
mov r1, r8
|
||
|
ands r1, r4
|
||
|
mov r8, r1
|
||
|
lsls r0, 16
|
||
|
asrs r1, r0, 17
|
||
|
ands r1, r4
|
||
|
asrs r2, r0, 18
|
||
|
ands r2, r4
|
||
|
asrs r3, r0, 19
|
||
|
ands r3, r4
|
||
|
asrs r6, r0, 20
|
||
|
ands r6, r4
|
||
|
asrs r5, r0, 21
|
||
|
ands r5, r4
|
||
|
asrs r0, 22
|
||
|
ands r0, r4
|
||
|
str r6, [sp]
|
||
|
str r5, [sp, 0x4]
|
||
|
str r0, [sp, 0x8]
|
||
|
mov r0, r8
|
||
|
bl sub_80A75AC
|
||
|
add sp, 0xC
|
||
|
pop {r3}
|
||
|
mov r8, r3
|
||
|
pop {r4-r6}
|
||
|
pop {r1}
|
||
|
bx r1
|
||
|
thumb_func_end sub_811583C
|
||
|
|
||
|
thumb_func_start sub_8115884
|
||
|
sub_8115884: @ 8115884
|
||
|
push {lr}
|
||
|
adds r2, r0, 0
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _0811589A
|
||
|
adds r0, r2, 0
|
||
|
bl DestroyAnimSprite
|
||
|
_0811589A:
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115884
|
||
|
|
||
|
thumb_func_start sub_81158A4
|
||
|
sub_81158A4: @ 81158A4
|
||
|
push {r4,r5,lr}
|
||
|
adds r5, r0, 0
|
||
|
ldr r4, =gBattleAnimArgs
|
||
|
ldrh r0, [r4, 0x2]
|
||
|
strh r0, [r5, 0x2E]
|
||
|
strh r0, [r5, 0x30]
|
||
|
ldrh r0, [r4, 0x4]
|
||
|
strh r0, [r5, 0x32]
|
||
|
ldrh r0, [r4, 0x6]
|
||
|
strh r0, [r5, 0x34]
|
||
|
ldrh r0, [r4, 0x8]
|
||
|
strh r0, [r5, 0x36]
|
||
|
ldrh r0, [r4, 0xA]
|
||
|
strh r0, [r5, 0x38]
|
||
|
ldrh r0, [r4, 0xC]
|
||
|
strh r0, [r5, 0x3A]
|
||
|
ldrh r0, [r4]
|
||
|
strh r0, [r5, 0x3C]
|
||
|
movs r1, 0x3C
|
||
|
ldrsh r0, [r5, r1]
|
||
|
bl sub_811583C
|
||
|
ldrb r1, [r4, 0x8]
|
||
|
ldrh r2, [r4, 0x6]
|
||
|
bl BlendPalettes
|
||
|
adds r2, r5, 0
|
||
|
adds r2, 0x3E
|
||
|
ldrb r0, [r2]
|
||
|
movs r1, 0x4
|
||
|
orrs r0, r1
|
||
|
strb r0, [r2]
|
||
|
ldr r0, =sub_81158F8
|
||
|
str r0, [r5, 0x1C]
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81158A4
|
||
|
|
||
|
thumb_func_start sub_81158F8
|
||
|
sub_81158F8: @ 81158F8
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldrh r1, [r4, 0x2E]
|
||
|
movs r2, 0x2E
|
||
|
ldrsh r0, [r4, r2]
|
||
|
cmp r0, 0
|
||
|
ble _0811590C
|
||
|
subs r0, r1, 0x1
|
||
|
strh r0, [r4, 0x2E]
|
||
|
b _0811597C
|
||
|
_0811590C:
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _0811597C
|
||
|
movs r1, 0x32
|
||
|
ldrsh r0, [r4, r1]
|
||
|
cmp r0, 0
|
||
|
bne _08115930
|
||
|
ldr r0, =sub_8115984
|
||
|
str r0, [r4, 0x1C]
|
||
|
b _0811597C
|
||
|
.pool
|
||
|
_08115930:
|
||
|
movs r2, 0x3C
|
||
|
ldrsh r0, [r4, r2]
|
||
|
bl sub_811583C
|
||
|
adds r3, r0, 0
|
||
|
ldrh r1, [r4, 0x30]
|
||
|
movs r0, 0x80
|
||
|
lsls r0, 1
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08115956
|
||
|
ldrh r1, [r4, 0x36]
|
||
|
lsls r1, 24
|
||
|
lsrs r1, 24
|
||
|
ldrh r2, [r4, 0x34]
|
||
|
adds r0, r3, 0
|
||
|
bl BlendPalettes
|
||
|
b _08115964
|
||
|
_08115956:
|
||
|
ldrh r1, [r4, 0x3A]
|
||
|
lsls r1, 24
|
||
|
lsrs r1, 24
|
||
|
ldrh r2, [r4, 0x38]
|
||
|
adds r0, r3, 0
|
||
|
bl BlendPalettes
|
||
|
_08115964:
|
||
|
ldrh r0, [r4, 0x30]
|
||
|
movs r2, 0x80
|
||
|
lsls r2, 1
|
||
|
adds r1, r2, 0
|
||
|
eors r0, r1
|
||
|
strh r0, [r4, 0x30]
|
||
|
movs r1, 0xFF
|
||
|
ands r0, r1
|
||
|
strh r0, [r4, 0x2E]
|
||
|
ldrh r0, [r4, 0x32]
|
||
|
subs r0, 0x1
|
||
|
strh r0, [r4, 0x32]
|
||
|
_0811597C:
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_81158F8
|
||
|
|
||
|
thumb_func_start sub_8115984
|
||
|
sub_8115984: @ 8115984
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _081159AA
|
||
|
movs r1, 0x3C
|
||
|
ldrsh r0, [r4, r1]
|
||
|
bl sub_811583C
|
||
|
movs r1, 0
|
||
|
movs r2, 0
|
||
|
bl BlendPalettes
|
||
|
adds r0, r4, 0
|
||
|
bl DestroyAnimSprite
|
||
|
_081159AA:
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115984
|
||
|
|
||
|
thumb_func_start sub_81159B4
|
||
|
sub_81159B4: @ 81159B4
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldr r1, =gBattleAnimArgs
|
||
|
ldrh r0, [r1]
|
||
|
ldrh r2, [r4, 0x20]
|
||
|
adds r0, r2
|
||
|
movs r2, 0
|
||
|
strh r0, [r4, 0x20]
|
||
|
ldrh r0, [r1, 0x2]
|
||
|
ldrh r1, [r4, 0x22]
|
||
|
adds r0, r1
|
||
|
strh r0, [r4, 0x22]
|
||
|
strh r2, [r4, 0x2E]
|
||
|
movs r0, 0xA
|
||
|
strh r0, [r4, 0x30]
|
||
|
movs r0, 0x8
|
||
|
strh r0, [r4, 0x32]
|
||
|
movs r0, 0x28
|
||
|
strh r0, [r4, 0x34]
|
||
|
movs r0, 0x70
|
||
|
strh r0, [r4, 0x36]
|
||
|
strh r2, [r4, 0x38]
|
||
|
ldr r1, =move_anim_8074EE0
|
||
|
adds r0, r4, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
ldr r1, =sub_80A634C
|
||
|
str r1, [r4, 0x1C]
|
||
|
adds r0, r4, 0
|
||
|
bl _call_via_r1
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81159B4
|
||
|
|
||
|
thumb_func_start sub_8115A04
|
||
|
sub_8115A04: @ 8115A04
|
||
|
push {r4,r5,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r4, r0, 2
|
||
|
adds r4, r0
|
||
|
lsls r4, 3
|
||
|
adds r4, r1
|
||
|
ldr r3, =gBattleAnimArgs
|
||
|
ldrh r1, [r3]
|
||
|
movs r5, 0
|
||
|
strh r1, [r4, 0x8]
|
||
|
ldrh r1, [r3, 0x2]
|
||
|
strh r1, [r4, 0xA]
|
||
|
ldrh r1, [r3, 0x4]
|
||
|
strh r1, [r4, 0xC]
|
||
|
ldrh r1, [r3, 0x6]
|
||
|
strh r1, [r4, 0xE]
|
||
|
ldrh r2, [r3, 0x8]
|
||
|
strh r2, [r4, 0x10]
|
||
|
ldrh r1, [r3, 0xA]
|
||
|
strh r1, [r4, 0x12]
|
||
|
strh r5, [r4, 0x18]
|
||
|
lsls r2, 24
|
||
|
lsrs r2, 24
|
||
|
movs r1, 0
|
||
|
bl sub_8115A54
|
||
|
ldr r0, =sub_8115AA4
|
||
|
str r0, [r4]
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115A04
|
||
|
|
||
|
thumb_func_start sub_8115A54
|
||
|
sub_8115A54: @ 8115A54
|
||
|
push {r4-r6,lr}
|
||
|
sub sp, 0x4
|
||
|
adds r5, r1, 0
|
||
|
adds r6, r2, 0
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
lsls r5, 24
|
||
|
lsrs r5, 24
|
||
|
lsls r6, 24
|
||
|
lsrs r6, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r4, r0, 2
|
||
|
adds r4, r0
|
||
|
lsls r4, 3
|
||
|
adds r4, r1
|
||
|
movs r1, 0x8
|
||
|
ldrsh r0, [r4, r1]
|
||
|
bl sub_811583C
|
||
|
movs r1, 0xA
|
||
|
ldrsb r1, [r4, r1]
|
||
|
ldrh r2, [r4, 0x12]
|
||
|
str r2, [sp]
|
||
|
adds r2, r5, 0
|
||
|
adds r3, r6, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
ldrh r0, [r4, 0xC]
|
||
|
subs r0, 0x1
|
||
|
strh r0, [r4, 0xC]
|
||
|
ldrh r0, [r4, 0x18]
|
||
|
movs r1, 0x1
|
||
|
eors r0, r1
|
||
|
strh r0, [r4, 0x18]
|
||
|
add sp, 0x4
|
||
|
pop {r4-r6}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115A54
|
||
|
|
||
|
thumb_func_start sub_8115AA4
|
||
|
sub_8115AA4: @ 8115AA4
|
||
|
push {r4-r6,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r3, r0, 24
|
||
|
adds r4, r3, 0
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _08115B06
|
||
|
ldr r1, =gTasks
|
||
|
lsls r2, r3, 2
|
||
|
adds r0, r2, r3
|
||
|
lsls r0, 3
|
||
|
adds r3, r0, r1
|
||
|
movs r5, 0xC
|
||
|
ldrsh r0, [r3, r5]
|
||
|
adds r6, r1, 0
|
||
|
adds r5, r2, 0
|
||
|
cmp r0, 0
|
||
|
ble _08115B00
|
||
|
movs r1, 0x18
|
||
|
ldrsh r0, [r3, r1]
|
||
|
cmp r0, 0
|
||
|
bne _08115AE4
|
||
|
ldrb r1, [r3, 0xE]
|
||
|
ldrb r2, [r3, 0x10]
|
||
|
b _08115AE8
|
||
|
.pool
|
||
|
_08115AE4:
|
||
|
ldrb r1, [r3, 0x10]
|
||
|
ldrb r2, [r3, 0xE]
|
||
|
_08115AE8:
|
||
|
adds r0, r5, r4
|
||
|
lsls r0, 3
|
||
|
adds r0, r6
|
||
|
movs r3, 0xC
|
||
|
ldrsh r0, [r0, r3]
|
||
|
cmp r0, 0x1
|
||
|
bne _08115AF8
|
||
|
movs r2, 0
|
||
|
_08115AF8:
|
||
|
adds r0, r4, 0
|
||
|
bl sub_8115A54
|
||
|
b _08115B06
|
||
|
_08115B00:
|
||
|
adds r0, r4, 0
|
||
|
bl DestroyAnimVisualTask
|
||
|
_08115B06:
|
||
|
pop {r4-r6}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_8115AA4
|
||
|
|
||
|
thumb_func_start sub_8115B0C
|
||
|
sub_8115B0C: @ 8115B0C
|
||
|
push {r4-r7,lr}
|
||
|
mov r7, r9
|
||
|
mov r6, r8
|
||
|
push {r6,r7}
|
||
|
lsls r0, 24
|
||
|
lsrs r6, r0, 24
|
||
|
movs r5, 0
|
||
|
ldr r3, =gTasks
|
||
|
lsls r0, r6, 2
|
||
|
adds r0, r6
|
||
|
lsls r0, 3
|
||
|
adds r0, r3
|
||
|
ldr r2, =gBattleAnimArgs
|
||
|
ldrh r1, [r2]
|
||
|
strh r1, [r0, 0x8]
|
||
|
ldrh r1, [r2, 0x2]
|
||
|
strh r1, [r0, 0xA]
|
||
|
ldrh r1, [r2, 0x4]
|
||
|
strh r1, [r0, 0xC]
|
||
|
ldrh r1, [r2, 0x6]
|
||
|
strh r1, [r0, 0xE]
|
||
|
ldrh r1, [r2, 0x8]
|
||
|
strh r1, [r0, 0x10]
|
||
|
ldrh r1, [r2, 0xA]
|
||
|
strh r1, [r0, 0x12]
|
||
|
strh r5, [r0, 0x18]
|
||
|
movs r4, 0
|
||
|
ldr r0, =gBattlersCount
|
||
|
ldrb r1, [r0]
|
||
|
mov r9, r3
|
||
|
mov r8, r2
|
||
|
cmp r5, r1
|
||
|
bge _08115B74
|
||
|
ldr r0, =gBattleAnimAttacker
|
||
|
ldrb r3, [r0]
|
||
|
ldr r7, =gBattleAnimTarget
|
||
|
movs r0, 0x1
|
||
|
mov r12, r0
|
||
|
adds r2, r1, 0
|
||
|
_08115B5A:
|
||
|
cmp r4, r3
|
||
|
beq _08115B6E
|
||
|
ldrb r1, [r7]
|
||
|
cmp r4, r1
|
||
|
beq _08115B6E
|
||
|
adds r1, r4, 0
|
||
|
adds r1, 0x10
|
||
|
mov r0, r12
|
||
|
lsls r0, r1
|
||
|
orrs r5, r0
|
||
|
_08115B6E:
|
||
|
adds r4, 0x1
|
||
|
cmp r4, r2
|
||
|
blt _08115B5A
|
||
|
_08115B74:
|
||
|
mov r2, r8
|
||
|
movs r1, 0
|
||
|
ldrsh r0, [r2, r1]
|
||
|
cmp r0, 0x1
|
||
|
bne _08115B82
|
||
|
movs r0, 0xE
|
||
|
orrs r5, r0
|
||
|
_08115B82:
|
||
|
lsls r4, r6, 2
|
||
|
adds r4, r6
|
||
|
lsls r4, 3
|
||
|
add r4, r9
|
||
|
lsrs r0, r5, 16
|
||
|
strh r0, [r4, 0x1A]
|
||
|
movs r0, 0xFF
|
||
|
ands r5, r0
|
||
|
strh r5, [r4, 0x1C]
|
||
|
ldrb r2, [r4, 0x10]
|
||
|
adds r0, r6, 0
|
||
|
movs r1, 0
|
||
|
bl sub_8115BC8
|
||
|
ldr r0, =sub_8115C18
|
||
|
str r0, [r4]
|
||
|
pop {r3,r4}
|
||
|
mov r8, r3
|
||
|
mov r9, r4
|
||
|
pop {r4-r7}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115B0C
|
||
|
|
||
|
thumb_func_start sub_8115BC8
|
||
|
sub_8115BC8: @ 8115BC8
|
||
|
push {r4,r5,lr}
|
||
|
sub sp, 0x4
|
||
|
adds r5, r1, 0
|
||
|
adds r3, r2, 0
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
lsls r5, 24
|
||
|
lsrs r5, 24
|
||
|
lsls r3, 24
|
||
|
lsrs r3, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r4, r0, 2
|
||
|
adds r4, r0
|
||
|
lsls r4, 3
|
||
|
adds r4, r1
|
||
|
ldrh r0, [r4, 0x1A]
|
||
|
lsls r0, 16
|
||
|
ldrh r1, [r4, 0x1C]
|
||
|
orrs r0, r1
|
||
|
movs r1, 0xA
|
||
|
ldrsb r1, [r4, r1]
|
||
|
ldrh r2, [r4, 0x12]
|
||
|
str r2, [sp]
|
||
|
adds r2, r5, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
ldrh r0, [r4, 0xC]
|
||
|
subs r0, 0x1
|
||
|
strh r0, [r4, 0xC]
|
||
|
ldrh r0, [r4, 0x18]
|
||
|
movs r1, 0x1
|
||
|
eors r0, r1
|
||
|
strh r0, [r4, 0x18]
|
||
|
add sp, 0x4
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115BC8
|
||
|
|
||
|
thumb_func_start sub_8115C18
|
||
|
sub_8115C18: @ 8115C18
|
||
|
push {r4-r6,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r3, r0, 24
|
||
|
adds r4, r3, 0
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _08115C7A
|
||
|
ldr r1, =gTasks
|
||
|
lsls r2, r3, 2
|
||
|
adds r0, r2, r3
|
||
|
lsls r0, 3
|
||
|
adds r3, r0, r1
|
||
|
movs r5, 0xC
|
||
|
ldrsh r0, [r3, r5]
|
||
|
adds r6, r1, 0
|
||
|
adds r5, r2, 0
|
||
|
cmp r0, 0
|
||
|
ble _08115C74
|
||
|
movs r1, 0x18
|
||
|
ldrsh r0, [r3, r1]
|
||
|
cmp r0, 0
|
||
|
bne _08115C58
|
||
|
ldrb r1, [r3, 0xE]
|
||
|
ldrb r2, [r3, 0x10]
|
||
|
b _08115C5C
|
||
|
.pool
|
||
|
_08115C58:
|
||
|
ldrb r1, [r3, 0x10]
|
||
|
ldrb r2, [r3, 0xE]
|
||
|
_08115C5C:
|
||
|
adds r0, r5, r4
|
||
|
lsls r0, 3
|
||
|
adds r0, r6
|
||
|
movs r3, 0xC
|
||
|
ldrsh r0, [r0, r3]
|
||
|
cmp r0, 0x1
|
||
|
bne _08115C6C
|
||
|
movs r2, 0
|
||
|
_08115C6C:
|
||
|
adds r0, r4, 0
|
||
|
bl sub_8115BC8
|
||
|
b _08115C7A
|
||
|
_08115C74:
|
||
|
adds r0, r4, 0
|
||
|
bl DestroyAnimVisualTask
|
||
|
_08115C7A:
|
||
|
pop {r4-r6}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_8115C18
|
||
|
|
||
|
thumb_func_start sub_8115C80
|
||
|
sub_8115C80: @ 8115C80
|
||
|
push {r4,r5,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r4, r0, 2
|
||
|
adds r4, r0
|
||
|
lsls r4, 3
|
||
|
adds r4, r1
|
||
|
ldr r3, =gBattleAnimArgs
|
||
|
ldrh r1, [r3]
|
||
|
movs r5, 0
|
||
|
strh r1, [r4, 0x8]
|
||
|
ldrh r1, [r3, 0x2]
|
||
|
strh r1, [r4, 0xA]
|
||
|
ldrh r1, [r3, 0x4]
|
||
|
strh r1, [r4, 0xC]
|
||
|
ldrh r1, [r3, 0x6]
|
||
|
strh r1, [r4, 0xE]
|
||
|
ldrh r2, [r3, 0x8]
|
||
|
strh r2, [r4, 0x10]
|
||
|
ldrh r1, [r3, 0xA]
|
||
|
strh r1, [r4, 0x12]
|
||
|
strh r5, [r4, 0x18]
|
||
|
lsls r2, 24
|
||
|
lsrs r2, 24
|
||
|
movs r1, 0
|
||
|
bl sub_8115CD0
|
||
|
ldr r0, =sub_8115D2C
|
||
|
str r0, [r4]
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115C80
|
||
|
|
||
|
thumb_func_start sub_8115CD0
|
||
|
sub_8115CD0: @ 8115CD0
|
||
|
push {r4-r6,lr}
|
||
|
sub sp, 0x4
|
||
|
adds r5, r1, 0
|
||
|
adds r6, r2, 0
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
lsls r5, 24
|
||
|
lsrs r5, 24
|
||
|
lsls r6, 24
|
||
|
lsrs r6, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r4, r0, 2
|
||
|
adds r4, r0
|
||
|
lsls r4, 3
|
||
|
adds r4, r1
|
||
|
ldrh r0, [r4, 0x8]
|
||
|
bl IndexOfSpritePaletteTag
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
adds r0, 0x10
|
||
|
movs r2, 0x1
|
||
|
lsls r2, r0
|
||
|
movs r1, 0xA
|
||
|
ldrsb r1, [r4, r1]
|
||
|
ldrh r0, [r4, 0x12]
|
||
|
str r0, [sp]
|
||
|
adds r0, r2, 0
|
||
|
adds r2, r5, 0
|
||
|
adds r3, r6, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
ldrh r0, [r4, 0xC]
|
||
|
subs r0, 0x1
|
||
|
strh r0, [r4, 0xC]
|
||
|
ldrh r0, [r4, 0x18]
|
||
|
movs r1, 0x1
|
||
|
eors r0, r1
|
||
|
strh r0, [r4, 0x18]
|
||
|
add sp, 0x4
|
||
|
pop {r4-r6}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115CD0
|
||
|
|
||
|
thumb_func_start sub_8115D2C
|
||
|
sub_8115D2C: @ 8115D2C
|
||
|
push {r4-r6,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r3, r0, 24
|
||
|
adds r4, r3, 0
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _08115D8E
|
||
|
ldr r1, =gTasks
|
||
|
lsls r2, r3, 2
|
||
|
adds r0, r2, r3
|
||
|
lsls r0, 3
|
||
|
adds r3, r0, r1
|
||
|
movs r5, 0xC
|
||
|
ldrsh r0, [r3, r5]
|
||
|
adds r6, r1, 0
|
||
|
adds r5, r2, 0
|
||
|
cmp r0, 0
|
||
|
ble _08115D88
|
||
|
movs r1, 0x18
|
||
|
ldrsh r0, [r3, r1]
|
||
|
cmp r0, 0
|
||
|
bne _08115D6C
|
||
|
ldrb r1, [r3, 0xE]
|
||
|
ldrb r2, [r3, 0x10]
|
||
|
b _08115D70
|
||
|
.pool
|
||
|
_08115D6C:
|
||
|
ldrb r1, [r3, 0x10]
|
||
|
ldrb r2, [r3, 0xE]
|
||
|
_08115D70:
|
||
|
adds r0, r5, r4
|
||
|
lsls r0, 3
|
||
|
adds r0, r6
|
||
|
movs r3, 0xC
|
||
|
ldrsh r0, [r0, r3]
|
||
|
cmp r0, 0x1
|
||
|
bne _08115D80
|
||
|
movs r2, 0
|
||
|
_08115D80:
|
||
|
adds r0, r4, 0
|
||
|
bl sub_8115CD0
|
||
|
b _08115D8E
|
||
|
_08115D88:
|
||
|
adds r0, r4, 0
|
||
|
bl DestroyAnimVisualTask
|
||
|
_08115D8E:
|
||
|
pop {r4-r6}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_8115D2C
|
||
|
|
||
|
thumb_func_start sub_8115D94
|
||
|
sub_8115D94: @ 8115D94
|
||
|
push {r4,r5,lr}
|
||
|
sub sp, 0x4
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r4, r0, 2
|
||
|
adds r4, r0
|
||
|
lsls r4, 3
|
||
|
adds r4, r1
|
||
|
ldr r5, =gBattleAnimArgs
|
||
|
ldrh r0, [r5, 0x2]
|
||
|
strh r0, [r4, 0x8]
|
||
|
ldrh r0, [r5, 0x2]
|
||
|
strh r0, [r4, 0xA]
|
||
|
ldrh r0, [r5, 0x4]
|
||
|
strh r0, [r4, 0xC]
|
||
|
ldrh r0, [r5, 0x6]
|
||
|
strh r0, [r4, 0xE]
|
||
|
ldrh r0, [r5, 0x8]
|
||
|
strh r0, [r4, 0x10]
|
||
|
ldrh r0, [r5, 0xA]
|
||
|
strh r0, [r4, 0x12]
|
||
|
ldrh r0, [r5, 0xC]
|
||
|
strh r0, [r4, 0x14]
|
||
|
ldrh r0, [r5]
|
||
|
strh r0, [r4, 0x16]
|
||
|
ldrh r0, [r5]
|
||
|
bl IndexOfSpritePaletteTag
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
adds r0, 0x10
|
||
|
movs r1, 0x1
|
||
|
lsls r1, r0
|
||
|
ldrb r3, [r5, 0x8]
|
||
|
ldrh r0, [r5, 0x6]
|
||
|
str r0, [sp]
|
||
|
adds r0, r1, 0
|
||
|
movs r1, 0
|
||
|
adds r2, r3, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
ldr r0, =sub_8115E00
|
||
|
str r0, [r4]
|
||
|
add sp, 0x4
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115D94
|
||
|
|
||
|
thumb_func_start sub_8115E00
|
||
|
sub_8115E00: @ 8115E00
|
||
|
push {r4,r5,lr}
|
||
|
sub sp, 0x4
|
||
|
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 r1, [r4, 0x8]
|
||
|
movs r2, 0x8
|
||
|
ldrsh r0, [r4, r2]
|
||
|
cmp r0, 0
|
||
|
ble _08115E28
|
||
|
subs r0, r1, 0x1
|
||
|
strh r0, [r4, 0x8]
|
||
|
b _08115EAC
|
||
|
.pool
|
||
|
_08115E28:
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
bne _08115EAC
|
||
|
movs r3, 0xC
|
||
|
ldrsh r0, [r4, r3]
|
||
|
cmp r0, 0
|
||
|
bne _08115E4C
|
||
|
ldr r0, =sub_8115EB8
|
||
|
str r0, [r4]
|
||
|
b _08115EAC
|
||
|
.pool
|
||
|
_08115E4C:
|
||
|
ldrh r0, [r4, 0x16]
|
||
|
bl IndexOfSpritePaletteTag
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
adds r0, 0x10
|
||
|
movs r2, 0x1
|
||
|
lsls r2, r0
|
||
|
ldrh r1, [r4, 0xA]
|
||
|
movs r0, 0x80
|
||
|
lsls r0, 1
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08115E7A
|
||
|
ldrb r3, [r4, 0x10]
|
||
|
ldrh r0, [r4, 0xE]
|
||
|
str r0, [sp]
|
||
|
adds r0, r2, 0
|
||
|
movs r1, 0
|
||
|
adds r2, r3, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
b _08115E8A
|
||
|
_08115E7A:
|
||
|
ldrb r3, [r4, 0x14]
|
||
|
ldrh r0, [r4, 0x12]
|
||
|
str r0, [sp]
|
||
|
adds r0, r2, 0
|
||
|
movs r1, 0
|
||
|
adds r2, r3, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
_08115E8A:
|
||
|
ldr r0, =gTasks
|
||
|
lsls r1, r5, 2
|
||
|
adds r1, r5
|
||
|
lsls r1, 3
|
||
|
adds r1, r0
|
||
|
ldrh r0, [r1, 0xA]
|
||
|
movs r3, 0x80
|
||
|
lsls r3, 1
|
||
|
adds r2, r3, 0
|
||
|
eors r0, r2
|
||
|
strh r0, [r1, 0xA]
|
||
|
movs r2, 0xFF
|
||
|
ands r0, r2
|
||
|
strh r0, [r1, 0x8]
|
||
|
ldrh r0, [r1, 0xC]
|
||
|
subs r0, 0x1
|
||
|
strh r0, [r1, 0xC]
|
||
|
_08115EAC:
|
||
|
add sp, 0x4
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115E00
|
||
|
|
||
|
thumb_func_start sub_8115EB8
|
||
|
sub_8115EB8: @ 8115EB8
|
||
|
push {r4,r5,lr}
|
||
|
sub sp, 0x4
|
||
|
lsls r0, 24
|
||
|
lsrs r4, r0, 24
|
||
|
ldr r0, =gPaletteFade
|
||
|
ldrb r1, [r0, 0x7]
|
||
|
movs r0, 0x80
|
||
|
ands r0, r1
|
||
|
lsls r0, 24
|
||
|
lsrs r5, r0, 24
|
||
|
cmp r5, 0
|
||
|
bne _08115EFE
|
||
|
ldr r1, =gTasks
|
||
|
lsls r0, r4, 2
|
||
|
adds r0, r4
|
||
|
lsls r0, 3
|
||
|
adds r0, r1
|
||
|
ldrh r0, [r0, 0x16]
|
||
|
bl IndexOfSpritePaletteTag
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
adds r0, 0x10
|
||
|
movs r1, 0x1
|
||
|
lsls r1, r0
|
||
|
str r5, [sp]
|
||
|
adds r0, r1, 0
|
||
|
movs r1, 0
|
||
|
movs r2, 0
|
||
|
movs r3, 0
|
||
|
bl BeginNormalPaletteFade
|
||
|
adds r0, r4, 0
|
||
|
bl DestroyAnimVisualTask
|
||
|
_08115EFE:
|
||
|
add sp, 0x4
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115EB8
|
||
|
|
||
|
thumb_func_start sub_8115F10
|
||
|
sub_8115F10: @ 8115F10
|
||
|
push {r4-r7,lr}
|
||
|
mov r7, r8
|
||
|
push {r7}
|
||
|
sub sp, 0xC
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
mov r8, r0
|
||
|
movs r2, 0
|
||
|
ldr r0, =gBattleAnimAttacker
|
||
|
ldrb r6, [r0]
|
||
|
ldr r0, =gBattleAnimTarget
|
||
|
ldrb r7, [r0]
|
||
|
ldr r4, =gBattleAnimArgs
|
||
|
ldrh r1, [r4]
|
||
|
movs r5, 0x80
|
||
|
lsls r5, 1
|
||
|
adds r0, r5, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08115F4A
|
||
|
str r2, [sp]
|
||
|
str r2, [sp, 0x4]
|
||
|
str r2, [sp, 0x8]
|
||
|
movs r0, 0x1
|
||
|
movs r1, 0
|
||
|
movs r3, 0
|
||
|
bl sub_80A75AC
|
||
|
adds r2, r0, 0
|
||
|
_08115F4A:
|
||
|
ldrh r1, [r4, 0x2]
|
||
|
adds r0, r5, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08115F5C
|
||
|
movs r0, 0x80
|
||
|
lsls r0, 9
|
||
|
lsls r0, r6
|
||
|
orrs r2, r0
|
||
|
_08115F5C:
|
||
|
ldrh r1, [r4, 0x4]
|
||
|
adds r0, r5, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08115F6E
|
||
|
movs r0, 0x80
|
||
|
lsls r0, 9
|
||
|
lsls r0, r7
|
||
|
orrs r2, r0
|
||
|
_08115F6E:
|
||
|
adds r0, r2, 0
|
||
|
bl InvertPlttBuffer
|
||
|
mov r0, r8
|
||
|
bl DestroyAnimVisualTask
|
||
|
add sp, 0xC
|
||
|
pop {r3}
|
||
|
mov r8, r3
|
||
|
pop {r4-r7}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115F10
|
||
|
|
||
|
thumb_func_start sub_8115F94
|
||
|
sub_8115F94: @ 8115F94
|
||
|
push {r4-r7,lr}
|
||
|
mov r7, r10
|
||
|
mov r6, r9
|
||
|
mov r5, r8
|
||
|
push {r5-r7}
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
mov r8, r0
|
||
|
movs r5, 0
|
||
|
ldr r1, =gTasks
|
||
|
lsls r0, 2
|
||
|
add r0, r8
|
||
|
lsls r0, 3
|
||
|
adds r4, r0, r1
|
||
|
movs r1, 0x8
|
||
|
ldrsh r0, [r4, r1]
|
||
|
cmp r0, 0
|
||
|
bne _08115FD6
|
||
|
ldr r1, =gBattleAnimArgs
|
||
|
ldrh r0, [r1]
|
||
|
strh r0, [r4, 0xC]
|
||
|
ldrh r0, [r1, 0x2]
|
||
|
strh r0, [r4, 0xE]
|
||
|
ldrh r0, [r1, 0x4]
|
||
|
strh r0, [r4, 0x10]
|
||
|
ldrh r0, [r1, 0x6]
|
||
|
strh r0, [r4, 0xA]
|
||
|
ldrh r0, [r1, 0x8]
|
||
|
strh r0, [r4, 0x12]
|
||
|
ldrh r0, [r1, 0xA]
|
||
|
strh r0, [r4, 0x14]
|
||
|
ldrh r0, [r1, 0xC]
|
||
|
strh r0, [r4, 0x16]
|
||
|
_08115FD6:
|
||
|
ldrh r0, [r4, 0x8]
|
||
|
adds r0, 0x1
|
||
|
strh r0, [r4, 0x8]
|
||
|
ldr r0, =gBattleAnimAttacker
|
||
|
ldrb r0, [r0]
|
||
|
mov r9, r0
|
||
|
ldr r0, =gBattleAnimTarget
|
||
|
ldrb r0, [r0]
|
||
|
mov r10, r0
|
||
|
ldrh r1, [r4, 0xC]
|
||
|
movs r7, 0x80
|
||
|
lsls r7, 1
|
||
|
adds r0, r7, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08115FF8
|
||
|
ldr r5, =0x0000ffff
|
||
|
_08115FF8:
|
||
|
movs r6, 0x1
|
||
|
adds r0, r6, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08116028
|
||
|
ldr r2, =gSprites
|
||
|
ldr r0, =gHealthboxSpriteIds
|
||
|
add r0, r9
|
||
|
ldrb r1, [r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r2, 0x14
|
||
|
adds r0, r2
|
||
|
ldr r0, [r0]
|
||
|
ldrh r0, [r0, 0x2]
|
||
|
bl IndexOfSpritePaletteTag
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
adds r1, r6, 0
|
||
|
lsls r1, r0
|
||
|
lsls r1, 16
|
||
|
orrs r5, r1
|
||
|
_08116028:
|
||
|
ldrh r1, [r4, 0xE]
|
||
|
adds r0, r7, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _0811603C
|
||
|
adds r0, r6, 0
|
||
|
mov r2, r9
|
||
|
lsls r0, r2
|
||
|
lsls r0, 16
|
||
|
orrs r5, r0
|
||
|
_0811603C:
|
||
|
ldrh r1, [r4, 0x10]
|
||
|
adds r0, r7, 0
|
||
|
ands r0, r1
|
||
|
cmp r0, 0
|
||
|
beq _08116050
|
||
|
adds r0, r6, 0
|
||
|
mov r1, r10
|
||
|
lsls r0, r1
|
||
|
lsls r0, 16
|
||
|
orrs r5, r0
|
||
|
_08116050:
|
||
|
movs r1, 0x12
|
||
|
ldrsb r1, [r4, r1]
|
||
|
movs r2, 0x14
|
||
|
ldrsb r2, [r4, r2]
|
||
|
movs r3, 0x16
|
||
|
ldrsb r3, [r4, r3]
|
||
|
adds r0, r5, 0
|
||
|
bl TintPlttBuffer
|
||
|
movs r2, 0x8
|
||
|
ldrsh r1, [r4, r2]
|
||
|
movs r2, 0xA
|
||
|
ldrsh r0, [r4, r2]
|
||
|
cmp r1, r0
|
||
|
bne _0811607A
|
||
|
adds r0, r5, 0
|
||
|
bl UnfadePlttBuffer
|
||
|
mov r0, r8
|
||
|
bl DestroyAnimVisualTask
|
||
|
_0811607A:
|
||
|
pop {r3-r5}
|
||
|
mov r8, r3
|
||
|
mov r9, r4
|
||
|
mov r10, r5
|
||
|
pop {r4-r7}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8115F94
|
||
|
|
||
|
thumb_func_start sub_81160A4
|
||
|
sub_81160A4: @ 81160A4
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
adds r2, r4, 0
|
||
|
adds r2, 0x3E
|
||
|
ldrb r0, [r2]
|
||
|
movs r1, 0x4
|
||
|
orrs r0, r1
|
||
|
strb r0, [r2]
|
||
|
ldr r1, =gBattleAnimArgs
|
||
|
ldrh r0, [r1]
|
||
|
negs r0, r0
|
||
|
strh r0, [r4, 0x2E]
|
||
|
ldrh r0, [r1, 0x2]
|
||
|
strh r0, [r4, 0x30]
|
||
|
strh r0, [r4, 0x32]
|
||
|
ldrh r0, [r1, 0x4]
|
||
|
strh r0, [r4, 0x34]
|
||
|
movs r2, 0x6
|
||
|
ldrsh r0, [r1, r2]
|
||
|
cmp r0, 0x1
|
||
|
beq _081160EC
|
||
|
cmp r0, 0x1
|
||
|
bgt _081160DC
|
||
|
cmp r0, 0
|
||
|
beq _081160E2
|
||
|
b _08116104
|
||
|
.pool
|
||
|
_081160DC:
|
||
|
cmp r0, 0x2
|
||
|
beq _081160F4
|
||
|
b _08116104
|
||
|
_081160E2:
|
||
|
ldr r1, =gBattle_BG3_X
|
||
|
b _081160F6
|
||
|
.pool
|
||
|
_081160EC:
|
||
|
ldr r1, =gBattle_BG3_Y
|
||
|
b _081160F6
|
||
|
.pool
|
||
|
_081160F4:
|
||
|
ldr r1, =gSpriteCoordOffsetX
|
||
|
_081160F6:
|
||
|
adds r0, r4, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
b _0811610C
|
||
|
.pool
|
||
|
_08116104:
|
||
|
ldr r1, =gSpriteCoordOffsetY
|
||
|
adds r0, r4, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
_0811610C:
|
||
|
movs r0, 0x3A
|
||
|
ldrsh r1, [r4, r0]
|
||
|
movs r2, 0x3C
|
||
|
ldrsh r0, [r4, r2]
|
||
|
lsls r0, 16
|
||
|
orrs r1, r0
|
||
|
ldrh r0, [r1]
|
||
|
strh r0, [r4, 0x36]
|
||
|
ldr r0, =gBattleAnimArgs
|
||
|
ldrh r0, [r0, 0x6]
|
||
|
strh r0, [r4, 0x38]
|
||
|
subs r0, 0x2
|
||
|
lsls r0, 16
|
||
|
lsrs r0, 16
|
||
|
cmp r0, 0x1
|
||
|
bhi _08116130
|
||
|
bl sub_81161F4
|
||
|
_08116130:
|
||
|
ldr r0, =sub_8116148
|
||
|
str r0, [r4, 0x1C]
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81160A4
|
||
|
|
||
|
thumb_func_start sub_8116148
|
||
|
sub_8116148: @ 8116148
|
||
|
push {r4-r7,lr}
|
||
|
adds r3, r0, 0
|
||
|
ldrh r1, [r3, 0x34]
|
||
|
movs r2, 0x34
|
||
|
ldrsh r0, [r3, r2]
|
||
|
cmp r0, 0
|
||
|
ble _0811618A
|
||
|
subs r0, r1, 0x1
|
||
|
strh r0, [r3, 0x34]
|
||
|
ldrh r1, [r3, 0x30]
|
||
|
movs r2, 0x30
|
||
|
ldrsh r0, [r3, r2]
|
||
|
cmp r0, 0
|
||
|
ble _0811616A
|
||
|
subs r0, r1, 0x1
|
||
|
strh r0, [r3, 0x30]
|
||
|
b _081161E2
|
||
|
_0811616A:
|
||
|
ldrh r0, [r3, 0x32]
|
||
|
strh r0, [r3, 0x30]
|
||
|
movs r0, 0x3A
|
||
|
ldrsh r1, [r3, r0]
|
||
|
movs r2, 0x3C
|
||
|
ldrsh r0, [r3, r2]
|
||
|
lsls r0, 16
|
||
|
orrs r1, r0
|
||
|
ldrh r0, [r3, 0x2E]
|
||
|
ldrh r2, [r1]
|
||
|
adds r0, r2
|
||
|
strh r0, [r1]
|
||
|
ldrh r0, [r3, 0x2E]
|
||
|
negs r0, r0
|
||
|
strh r0, [r3, 0x2E]
|
||
|
b _081161E2
|
||
|
_0811618A:
|
||
|
movs r0, 0x3A
|
||
|
ldrsh r1, [r3, r0]
|
||
|
movs r2, 0x3C
|
||
|
ldrsh r0, [r3, r2]
|
||
|
lsls r0, 16
|
||
|
orrs r1, r0
|
||
|
ldrh r0, [r3, 0x36]
|
||
|
strh r0, [r1]
|
||
|
ldrh r0, [r3, 0x38]
|
||
|
subs r0, 0x2
|
||
|
lsls r0, 16
|
||
|
lsrs r0, 16
|
||
|
cmp r0, 0x1
|
||
|
bhi _081161DC
|
||
|
movs r4, 0
|
||
|
ldr r5, =gBattlersCount
|
||
|
ldrb r0, [r5]
|
||
|
cmp r4, r0
|
||
|
bcs _081161DC
|
||
|
ldr r2, =gSprites
|
||
|
mov r12, r2
|
||
|
ldr r6, =gBattlerSpriteIds
|
||
|
movs r7, 0x3
|
||
|
negs r7, r7
|
||
|
_081161BA:
|
||
|
adds r0, r4, r6
|
||
|
ldrb r0, [r0]
|
||
|
lsls r1, r0, 4
|
||
|
adds r1, r0
|
||
|
lsls r1, 2
|
||
|
add r1, r12
|
||
|
adds r1, 0x3E
|
||
|
ldrb r2, [r1]
|
||
|
adds r0, r7, 0
|
||
|
ands r0, r2
|
||
|
strb r0, [r1]
|
||
|
adds r0, r4, 0x1
|
||
|
lsls r0, 24
|
||
|
lsrs r4, r0, 24
|
||
|
ldrb r0, [r5]
|
||
|
cmp r4, r0
|
||
|
bcc _081161BA
|
||
|
_081161DC:
|
||
|
adds r0, r3, 0
|
||
|
bl DestroyAnimSprite
|
||
|
_081161E2:
|
||
|
pop {r4-r7}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8116148
|
||
|
|
||
|
thumb_func_start sub_81161F4
|
||
|
sub_81161F4: @ 81161F4
|
||
|
push {r4-r6,lr}
|
||
|
ldr r6, =gSprites
|
||
|
ldr r4, =gBattlerSpriteIds
|
||
|
ldr r5, =gBattleAnimAttacker
|
||
|
ldrb r0, [r5]
|
||
|
adds r0, r4
|
||
|
ldrb r0, [r0]
|
||
|
lsls r1, r0, 4
|
||
|
adds r1, r0
|
||
|
lsls r1, 2
|
||
|
adds r1, r6
|
||
|
adds r1, 0x3E
|
||
|
ldrb r3, [r1]
|
||
|
movs r2, 0x3
|
||
|
negs r2, r2
|
||
|
adds r0, r2, 0
|
||
|
ands r0, r3
|
||
|
strb r0, [r1]
|
||
|
ldr r3, =gBattleAnimTarget
|
||
|
ldrb r0, [r3]
|
||
|
adds r0, r4
|
||
|
ldrb r1, [r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r0, r6
|
||
|
adds r0, 0x3E
|
||
|
ldrb r1, [r0]
|
||
|
ands r2, r1
|
||
|
strb r2, [r0]
|
||
|
ldr r0, =gBattleAnimArgs
|
||
|
movs r1, 0x8
|
||
|
ldrsh r0, [r0, r1]
|
||
|
cmp r0, 0x2
|
||
|
bne _0811627C
|
||
|
ldrb r0, [r5]
|
||
|
adds r0, r4
|
||
|
ldrb r1, [r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r0, r6
|
||
|
adds r0, 0x3E
|
||
|
ldrb r1, [r0]
|
||
|
movs r2, 0x2
|
||
|
orrs r1, r2
|
||
|
strb r1, [r0]
|
||
|
ldrb r0, [r3]
|
||
|
adds r0, r4
|
||
|
ldrb r1, [r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r0, r6
|
||
|
adds r0, 0x3E
|
||
|
ldrb r1, [r0]
|
||
|
b _08116298
|
||
|
.pool
|
||
|
_0811627C:
|
||
|
cmp r0, 0
|
||
|
bne _08116284
|
||
|
ldrb r0, [r5]
|
||
|
b _08116286
|
||
|
_08116284:
|
||
|
ldrb r0, [r3]
|
||
|
_08116286:
|
||
|
adds r0, r4
|
||
|
ldrb r1, [r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r0, r6
|
||
|
adds r0, 0x3E
|
||
|
ldrb r1, [r0]
|
||
|
movs r2, 0x2
|
||
|
_08116298:
|
||
|
orrs r1, r2
|
||
|
strb r1, [r0]
|
||
|
pop {r4-r6}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_81161F4
|
||
|
|
||
|
thumb_func_start sub_81162A4
|
||
|
sub_81162A4: @ 81162A4
|
||
|
push {r4,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r2, r0, 2
|
||
|
adds r2, r0
|
||
|
lsls r2, 3
|
||
|
adds r2, r1
|
||
|
ldr r3, =gBattleAnimArgs
|
||
|
ldrh r1, [r3]
|
||
|
strh r1, [r2, 0x8]
|
||
|
ldrh r1, [r3, 0x2]
|
||
|
strh r1, [r2, 0xA]
|
||
|
ldrh r1, [r3, 0x4]
|
||
|
strh r1, [r2, 0xC]
|
||
|
ldrh r1, [r3, 0x6]
|
||
|
strh r1, [r2, 0xE]
|
||
|
ldrh r1, [r3, 0x6]
|
||
|
strh r1, [r2, 0x18]
|
||
|
ldr r4, =gBattle_BG3_X
|
||
|
ldrh r1, [r3]
|
||
|
strh r1, [r4]
|
||
|
ldr r4, =gBattle_BG3_Y
|
||
|
ldrh r1, [r3, 0x2]
|
||
|
strh r1, [r4]
|
||
|
ldr r1, =sub_81162F8
|
||
|
str r1, [r2]
|
||
|
bl _call_via_r1
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81162A4
|
||
|
|
||
|
thumb_func_start sub_81162F8
|
||
|
sub_81162F8: @ 81162F8
|
||
|
push {r4-r7,lr}
|
||
|
lsls r0, 24
|
||
|
lsrs r5, r0, 24
|
||
|
ldr r1, =gTasks
|
||
|
lsls r0, r5, 2
|
||
|
adds r0, r5
|
||
|
lsls r0, 3
|
||
|
adds r3, r0, r1
|
||
|
ldrh r2, [r3, 0xE]
|
||
|
movs r4, 0xE
|
||
|
ldrsh r0, [r3, r4]
|
||
|
mov r12, r1
|
||
|
cmp r0, 0
|
||
|
bne _0811637E
|
||
|
ldr r0, =gBattle_BG3_X
|
||
|
ldrh r2, [r0]
|
||
|
movs r7, 0x8
|
||
|
ldrsh r1, [r3, r7]
|
||
|
adds r6, r0, 0
|
||
|
cmp r2, r1
|
||
|
bne _08116330
|
||
|
ldrh r0, [r3, 0x8]
|
||
|
negs r0, r0
|
||
|
b _08116332
|
||
|
.pool
|
||
|
_08116330:
|
||
|
ldrh r0, [r3, 0x8]
|
||
|
_08116332:
|
||
|
strh r0, [r6]
|
||
|
ldr r2, =gBattle_BG3_Y
|
||
|
ldrh r3, [r2]
|
||
|
lsls r1, r5, 2
|
||
|
adds r0, r1, r5
|
||
|
lsls r0, 3
|
||
|
mov r7, r12
|
||
|
adds r4, r0, r7
|
||
|
movs r7, 0xA
|
||
|
ldrsh r0, [r4, r7]
|
||
|
cmn r3, r0
|
||
|
bne _08116354
|
||
|
movs r0, 0
|
||
|
b _08116358
|
||
|
.pool
|
||
|
_08116354:
|
||
|
ldrh r0, [r4, 0xA]
|
||
|
negs r0, r0
|
||
|
_08116358:
|
||
|
strh r0, [r2]
|
||
|
adds r0, r1, r5
|
||
|
lsls r0, 3
|
||
|
add r0, r12
|
||
|
ldrh r1, [r0, 0x18]
|
||
|
strh r1, [r0, 0xE]
|
||
|
ldrh r1, [r0, 0xC]
|
||
|
subs r1, 0x1
|
||
|
strh r1, [r0, 0xC]
|
||
|
lsls r1, 16
|
||
|
asrs r1, 16
|
||
|
cmp r1, 0
|
||
|
bne _08116382
|
||
|
strh r1, [r6]
|
||
|
strh r1, [r2]
|
||
|
adds r0, r5, 0
|
||
|
bl DestroyAnimVisualTask
|
||
|
b _08116382
|
||
|
_0811637E:
|
||
|
subs r0, r2, 0x1
|
||
|
strh r0, [r3, 0xE]
|
||
|
_08116382:
|
||
|
pop {r4-r7}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_81162F8
|
||
|
|
||
|
thumb_func_start sub_8116388
|
||
|
sub_8116388: @ 8116388
|
||
|
push {r4,r5,lr}
|
||
|
adds r5, r0, 0
|
||
|
ldr r4, =gBattleAnimArgs
|
||
|
ldrb r1, [r4, 0x6]
|
||
|
bl StartSpriteAffineAnim
|
||
|
movs r1, 0x4
|
||
|
ldrsh r0, [r4, r1]
|
||
|
cmp r0, 0
|
||
|
bne _081163AC
|
||
|
adds r0, r5, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A69CC
|
||
|
b _081163B4
|
||
|
.pool
|
||
|
_081163AC:
|
||
|
adds r0, r5, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A6980
|
||
|
_081163B4:
|
||
|
ldr r0, =sub_80A67BC
|
||
|
str r0, [r5, 0x1C]
|
||
|
ldr r1, =DestroyAnimSprite
|
||
|
adds r0, r5, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8116388
|
||
|
|
||
|
thumb_func_start sub_81163D0
|
||
|
sub_81163D0: @ 81163D0
|
||
|
push {r4,r5,lr}
|
||
|
adds r5, r0, 0
|
||
|
ldr r4, =gBattleAnimArgs
|
||
|
ldrb r1, [r4, 0x6]
|
||
|
bl StartSpriteAffineAnim
|
||
|
movs r1, 0x4
|
||
|
ldrsh r0, [r4, r1]
|
||
|
cmp r0, 0
|
||
|
bne _081163F4
|
||
|
adds r0, r5, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A69CC
|
||
|
b _081163FC
|
||
|
.pool
|
||
|
_081163F4:
|
||
|
adds r0, r5, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A6980
|
||
|
_081163FC:
|
||
|
ldr r0, =gBattleAnimArgs
|
||
|
ldrh r0, [r0, 0x8]
|
||
|
strh r0, [r5, 0x2E]
|
||
|
ldr r0, =sub_80A67BC
|
||
|
str r0, [r5, 0x1C]
|
||
|
ldr r1, =sub_810E2C8
|
||
|
adds r0, r5, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81163D0
|
||
|
|
||
|
thumb_func_start sub_8116420
|
||
|
sub_8116420: @ 8116420
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldr r0, =gBattleAnimAttacker
|
||
|
ldrb r0, [r0]
|
||
|
bl GetBattlerSide
|
||
|
lsls r0, 24
|
||
|
cmp r0, 0
|
||
|
beq _08116444
|
||
|
bl IsContest
|
||
|
lsls r0, 24
|
||
|
cmp r0, 0
|
||
|
bne _08116444
|
||
|
ldr r1, =gBattleAnimArgs
|
||
|
ldrh r0, [r1, 0x2]
|
||
|
negs r0, r0
|
||
|
strh r0, [r1, 0x2]
|
||
|
_08116444:
|
||
|
adds r0, r4, 0
|
||
|
bl sub_8116388
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8116420
|
||
|
|
||
|
thumb_func_start sub_8116458
|
||
|
sub_8116458: @ 8116458
|
||
|
push {r4,r5,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldr r5, =gBattleAnimArgs
|
||
|
movs r0, 0x2
|
||
|
ldrsh r1, [r5, r0]
|
||
|
movs r0, 0x1
|
||
|
negs r0, r0
|
||
|
cmp r1, r0
|
||
|
bne _08116474
|
||
|
bl Random2
|
||
|
movs r1, 0x3
|
||
|
ands r1, r0
|
||
|
strh r1, [r5, 0x2]
|
||
|
_08116474:
|
||
|
ldrb r1, [r5, 0x2]
|
||
|
adds r0, r4, 0
|
||
|
bl StartSpriteAffineAnim
|
||
|
movs r1, 0
|
||
|
ldrsh r0, [r5, r1]
|
||
|
cmp r0, 0
|
||
|
bne _08116494
|
||
|
adds r0, r4, 0
|
||
|
movs r1, 0
|
||
|
bl sub_80A69CC
|
||
|
b _0811649C
|
||
|
.pool
|
||
|
_08116494:
|
||
|
adds r0, r4, 0
|
||
|
movs r1, 0
|
||
|
bl sub_80A6980
|
||
|
_0811649C:
|
||
|
bl Random2
|
||
|
lsls r0, 16
|
||
|
lsrs r0, 16
|
||
|
movs r1, 0x30
|
||
|
bl __umodsi3
|
||
|
ldr r1, =0x0000ffe8
|
||
|
adds r0, r1
|
||
|
ldrh r1, [r4, 0x24]
|
||
|
adds r0, r1
|
||
|
strh r0, [r4, 0x24]
|
||
|
bl Random2
|
||
|
lsls r0, 16
|
||
|
lsrs r0, 16
|
||
|
movs r1, 0x18
|
||
|
bl __umodsi3
|
||
|
ldr r1, =0x0000fff4
|
||
|
adds r0, r1
|
||
|
ldrh r1, [r4, 0x26]
|
||
|
adds r0, r1
|
||
|
strh r0, [r4, 0x26]
|
||
|
ldr r1, =move_anim_8074EE0
|
||
|
adds r0, r4, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
ldr r0, =sub_80A67BC
|
||
|
str r0, [r4, 0x1C]
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8116458
|
||
|
|
||
|
thumb_func_start sub_81164F0
|
||
|
sub_81164F0: @ 81164F0
|
||
|
push {r4,r5,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldr r5, =gBattleAnimArgs
|
||
|
ldrb r0, [r5]
|
||
|
bl GetAnimBattlerSpriteId
|
||
|
lsls r0, 24
|
||
|
lsrs r0, 24
|
||
|
strh r0, [r4, 0x2E]
|
||
|
ldr r2, =gSprites
|
||
|
movs r0, 0x2E
|
||
|
ldrsh r1, [r4, r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r0, r2
|
||
|
ldrh r1, [r0, 0x24]
|
||
|
ldrh r0, [r0, 0x20]
|
||
|
adds r1, r0
|
||
|
strh r1, [r4, 0x20]
|
||
|
movs r0, 0x2E
|
||
|
ldrsh r1, [r4, r0]
|
||
|
lsls r0, r1, 4
|
||
|
adds r0, r1
|
||
|
lsls r0, 2
|
||
|
adds r0, r2
|
||
|
ldrh r1, [r0, 0x26]
|
||
|
ldrh r0, [r0, 0x22]
|
||
|
adds r1, r0
|
||
|
strh r1, [r4, 0x22]
|
||
|
ldrh r0, [r5, 0x2]
|
||
|
strh r0, [r4, 0x24]
|
||
|
ldrh r0, [r5, 0x4]
|
||
|
strh r0, [r4, 0x26]
|
||
|
ldrb r1, [r5, 0x6]
|
||
|
adds r0, r4, 0
|
||
|
bl StartSpriteAffineAnim
|
||
|
ldr r1, =move_anim_8074EE0
|
||
|
adds r0, r4, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
ldr r0, =sub_80A67BC
|
||
|
str r0, [r4, 0x1C]
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81164F0
|
||
|
|
||
|
thumb_func_start sub_8116560
|
||
|
sub_8116560: @ 8116560
|
||
|
push {r4,lr}
|
||
|
adds r4, r0, 0
|
||
|
ldr r0, =gBattleAnimArgs
|
||
|
movs r1, 0x4
|
||
|
ldrsh r0, [r0, r1]
|
||
|
cmp r0, 0
|
||
|
bne _0811657C
|
||
|
adds r0, r4, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A69CC
|
||
|
b _08116584
|
||
|
.pool
|
||
|
_0811657C:
|
||
|
adds r0, r4, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A6980
|
||
|
_08116584:
|
||
|
ldr r0, =gBattleAnimArgs
|
||
|
ldrh r0, [r0, 0x6]
|
||
|
strh r0, [r4, 0x2E]
|
||
|
ldr r1, =DestroyAnimSprite
|
||
|
adds r0, r4, 0
|
||
|
bl StoreSpriteCallbackInData6
|
||
|
ldr r0, =sub_80A64B0
|
||
|
str r0, [r4, 0x1C]
|
||
|
pop {r4}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_8116560
|
||
|
|
||
|
thumb_func_start sub_81165A8
|
||
|
sub_81165A8: @ 81165A8
|
||
|
push {r4,r5,lr}
|
||
|
adds r5, r0, 0
|
||
|
ldr r4, =gBattleAnimArgs
|
||
|
ldrb r1, [r4, 0x6]
|
||
|
bl StartSpriteAffineAnim
|
||
|
movs r1, 0x4
|
||
|
ldrsh r0, [r4, r1]
|
||
|
cmp r0, 0
|
||
|
bne _081165CC
|
||
|
adds r0, r5, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A69CC
|
||
|
b _081165D4
|
||
|
.pool
|
||
|
_081165CC:
|
||
|
adds r0, r5, 0
|
||
|
movs r1, 0x1
|
||
|
bl sub_80A6980
|
||
|
_081165D4:
|
||
|
ldr r0, =sub_81165E4
|
||
|
str r0, [r5, 0x1C]
|
||
|
pop {r4,r5}
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
.pool
|
||
|
thumb_func_end sub_81165A8
|
||
|
|
||
|
thumb_func_start sub_81165E4
|
||
|
sub_81165E4: @ 81165E4
|
||
|
push {lr}
|
||
|
adds r3, r0, 0
|
||
|
movs r0, 0x3E
|
||
|
adds r0, r3
|
||
|
mov r12, r0
|
||
|
ldrb r2, [r0]
|
||
|
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
|
||
|
mov r1, r12
|
||
|
strb r0, [r1]
|
||
|
ldrh r0, [r3, 0x2E]
|
||
|
adds r1, r0, 0x1
|
||
|
strh r1, [r3, 0x2E]
|
||
|
lsls r0, 16
|
||
|
asrs r0, 16
|
||
|
cmp r0, 0xC
|
||
|
ble _0811661A
|
||
|
adds r0, r3, 0
|
||
|
bl DestroyAnimSprite
|
||
|
_0811661A:
|
||
|
pop {r0}
|
||
|
bx r0
|
||
|
thumb_func_end sub_81165E4
|
||
|
|
||
|
.align 2, 0
|