start working on battle anim

This commit is contained in:
DizzyEggg 2017-10-14 16:55:25 +02:00
parent 0d38d443b5
commit 752ce9b90d
34 changed files with 2538 additions and 3389 deletions

View File

@ -1056,10 +1056,10 @@ _0805D980:
b _0805DA1E
.pool
_0805D9CC:
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
mov r2, r10
strb r2, [r0]
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
mov r1, sp
ldrb r1, [r1]
strb r1, [r0]
@ -1070,7 +1070,7 @@ _0805D9CC:
ldr r0, =gUnknown_082C9320
adds r1, r5, 0
movs r2, 0
bl move_something
bl DoBattleAnim
ldr r0, =task0A_0803415C
movs r1, 0xA
bl CreateTask
@ -1180,14 +1180,14 @@ move_anim_start_t4: @ 805DAC4
lsrs r4, 24
lsls r3, 24
lsrs r3, 24
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
strb r1, [r0]
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
strb r2, [r0]
ldr r0, =gUnknown_082C937C
adds r1, r3, 0
movs r2, 0
bl move_something
bl DoBattleAnim
ldr r0, =task0A_08034248
movs r1, 0xA
bl CreateTask
@ -2353,7 +2353,7 @@ _0805E51C:
beq _0805E558
movs r0, 0
mov r10, r0
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r2, [r0, 0x18]
ldrh r1, [r2, 0x2]
@ -3111,7 +3111,7 @@ sub_805EB9C: @ 805EB9C
_0805EBC8:
lsls r0, r5, 24
lsrs r0, 24
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _0805EC60
@ -3329,7 +3329,7 @@ sub_805ED70: @ 805ED70
cmp r0, 0
beq _0805EDAC
adds r0, r4, 0
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
bne _0805EDC0

File diff suppressed because it is too large Load Diff

View File

@ -331,7 +331,7 @@ sub_80A9EF4: @ 80A9EF4
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
ldr r4, =gAnimationBankTarget
ldr r4, =gAnimBankTarget
ldrb r0, [r4]
movs r1, 0x2
bl sub_80A5C6C
@ -616,7 +616,7 @@ _080AA16C:
movs r1, 0
bl SetGpuReg
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080AA186:
pop {r4}
pop {r0}
@ -829,7 +829,7 @@ _080AA322:
b _080AA330
_080AA328:
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080AA352
_080AA330:
ldr r0, =gBattleAnimArgs
@ -863,13 +863,13 @@ move_anim_start_t2: @ 80AA364
lsrs r4, 24
lsls r1, 24
lsrs r1, 24
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
strb r4, [r0]
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
strb r4, [r0]
ldr r0, =gUnknown_082C92FC
movs r2, 0
bl move_something
bl DoBattleAnim
ldr r0, =task0A_80788BC
movs r1, 0xA
bl CreateTask

View File

@ -18,7 +18,7 @@ sub_80D51AC: @ 80D51AC
cmp r2, 0xFF
bne _080D51D0
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D520C
.pool
_080D51D0:
@ -140,7 +140,7 @@ _080D5288:
adds r0, r6
strh r3, [r0, 0x26]
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D52CA
_080D52C6:
subs r0, 0x1
@ -204,7 +204,7 @@ _080D5326:
lsls r0, 24
lsrs r4, r0, 24
adds r0, r4, 0
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
bne _080D533C
@ -216,7 +216,7 @@ _080D533C:
.pool
_080D5348:
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
adds r0, r1
_080D5350:
@ -226,7 +226,7 @@ _080D5352:
beq _080D5368
_080D5356:
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D53A6
.pool
_080D5368:
@ -359,7 +359,7 @@ _080D5436:
adds r0, r7
strh r2, [r0, 0x26]
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D5478
_080D5474:
subs r0, r2, 0x1
@ -385,7 +385,7 @@ sub_80D5484: @ 80D5484
cmp r3, 0xFF
bne _080D54A8
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D54F6
.pool
_080D54A8:
@ -584,7 +584,7 @@ _080D55F8:
strh r0, [r2, 0x26]
_080D5630:
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D563C
_080D5638:
subs r0, r2, 0x1
@ -705,7 +705,7 @@ _080D56F6:
cmp r0, 0
bne _080D5728
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D5728:
pop {r4-r7}
pop {r0}
@ -829,7 +829,7 @@ _080D5810:
strh r0, [r4, 0x24]
strh r0, [r4, 0x26]
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D5822:
pop {r4-r6}
pop {r0}
@ -842,7 +842,7 @@ sub_80D5830: @ 80D5830
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -871,7 +871,7 @@ sub_80D5860: @ 80D5860
movs r1, 0x4
orrs r0, r1
strb r0, [r2]
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -892,7 +892,7 @@ _080D5894:
strh r2, [r4, 0x2E]
strh r0, [r4, 0x32]
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
adds r0, r1
ldrb r0, [r0]
@ -919,7 +919,7 @@ sub_80D58D4: @ 80D58D4
strh r1, [r0, 0x30]
ldr r1, =sub_80A6630
str r1, [r0, 0x1C]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
bl StoreSpriteCallbackInData6
pop {r0}
bx r0
@ -970,7 +970,7 @@ sub_80D5944: @ 80D5944
strh r1, [r0, 0x32]
ldr r1, =sub_80A6630
str r1, [r0, 0x1C]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
bl StoreSpriteCallbackInData6
pop {r0}
bx r0
@ -988,12 +988,12 @@ sub_80D5968: @ 80D5968
cmp r0, 0
bne _080D598C
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _080D5990
.pool
_080D598C:
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_080D5990:
ldrb r0, [r0]
adds r0, r1
@ -1093,7 +1093,7 @@ _080D5A56:
strh r1, [r3, 0x26]
_080D5A58:
adds r0, r2, 0
bl move_anim_8072740
bl DestroyAnimSprite
b _080D5A8E
.pool
_080D5A64:
@ -1133,11 +1133,11 @@ sub_80D5A94: @ 80D5A94
ldrsh r0, [r0, r1]
cmp r0, 0
bne _080D5AB0
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _080D5AB2
.pool
_080D5AB0:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_080D5AB2:
ldrb r2, [r0]
ldr r0, =gBankSpriteIds
@ -1192,7 +1192,7 @@ _080D5ADC:
movs r1, 0x4
orrs r0, r1
strb r0, [r2]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
ldr r0, =sub_80A6680
@ -1218,11 +1218,11 @@ sub_80D5B48: @ 80D5B48
ldrsh r0, [r0, r1]
cmp r0, 0
bne _080D5B70
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _080D5B72
.pool
_080D5B70:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_080D5B72:
ldrb r1, [r0]
ldr r0, =gBankSpriteIds
@ -1281,7 +1281,7 @@ _080D5B9C:
lsls r0, 16
cmp r0, 0
bne _080D5C04
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
adds r0, r6, 0
bl StoreSpriteCallbackInData6
b _080D5C0C
@ -1318,7 +1318,7 @@ sub_80D5C20: @ 80D5C20
lsls r1, 2
adds r1, r4
strh r3, [r1, 0x26]
bl move_anim_8072740
bl DestroyAnimSprite
pop {r4}
pop {r0}
bx r0
@ -1338,7 +1338,7 @@ sub_80D5C50: @ 80D5C50
bl __divsi3
lsls r0, 16
lsrs r7, r0, 16
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -1485,7 +1485,7 @@ _080D5D70:
cmp r0, 0
bne _080D5DA4
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D5DA4:
pop {r4,r5}
pop {r0}
@ -1518,16 +1518,16 @@ _080D5DD8:
beq _080D5DE8
b _080D5E10
_080D5DDE:
ldr r5, =gAnimationBankAttacker
ldr r5, =gAnimBankAttacker
b _080D5DEA
.pool
_080D5DE8:
ldr r5, =gAnimationBankTarget
ldr r5, =gAnimBankTarget
_080D5DEA:
ldrb r0, [r5]
movs r4, 0x2
eors r0, r4
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080D5E10
@ -1540,7 +1540,7 @@ _080D5DEA:
.pool
_080D5E10:
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D5E58
_080D5E18:
ldr r1, =gTasks
@ -1549,7 +1549,7 @@ _080D5E18:
lsls r0, 3
adds r5, r0, r1
strh r2, [r5, 0x8]
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -1609,7 +1609,7 @@ sub_80D5E6C: @ 80D5E6C
cmp r1, r0
bls _080D5EAA
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D5EAA:
pop {r4}
pop {r0}
@ -1622,7 +1622,7 @@ sub_80D5EB8: @ 80D5EB8
push {r4-r6,lr}
lsls r0, 24
lsrs r5, r0, 24
ldr r6, =gAnimationBankAttacker
ldr r6, =gAnimBankAttacker
ldrb r0, [r6]
bl GetBankSide
lsls r0, 24
@ -1660,7 +1660,7 @@ _080D5ED4:
b _080D5F18
.pool
_080D5F14:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
_080D5F18:
strh r0, [r2, 0x12]
@ -1817,7 +1817,7 @@ _080D601E:
strh r3, [r0, 0x24]
strh r3, [r0, 0x26]
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D6050:
pop {r3,r4}
mov r8, r3
@ -1923,7 +1923,7 @@ _080D6120:
adds r0, r6, 0
bl sub_80A7344
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D612C:
pop {r4-r6}
pop {r0}
@ -1995,11 +1995,11 @@ _080D61B8:
ldrsh r0, [r6, r1]
cmp r0, 0
bne _080D61C8
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _080D61CA
.pool
_080D61C8:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_080D61CA:
ldrb r0, [r0]
bl GetBankSide
@ -2076,11 +2076,11 @@ sub_80D622C: @ 80D622C
ldrsh r0, [r4, r1]
cmp r0, 0
bne _080D6274
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _080D6276
.pool
_080D6274:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_080D6276:
ldrb r0, [r0]
bl GetBankSide
@ -2201,7 +2201,7 @@ _080D6364:
bl sub_80A7344
_080D636A:
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080D6382
_080D6372:
movs r0, 0
@ -2236,7 +2236,7 @@ sub_80D6388: @ 80D6388
adds r0, r5, r7
lsls r0, 3
adds r6, r0, r4
ldr r0, =gMovePowerMoveAnim
ldr r0, =gAnimMovePower
ldrh r0, [r0]
movs r1, 0xC
bl __udivsi3
@ -2248,7 +2248,7 @@ _080D63C0:
adds r0, r5, r7
lsls r0, 3
adds r6, r0, r4
ldr r0, =gMoveDmgMoveAnim
ldr r0, =gAnimMoveDmg
ldr r0, [r0]
movs r1, 0xC
bl __divsi3
@ -2435,7 +2435,7 @@ _080D6518:
adds r0, r2
strh r4, [r0, 0x26]
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080D654A:
pop {r4,r5}
pop {r0}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ sub_8170478: @ 8170478
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x10]
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r4, [r0]
ldr r0, =gBattle_WIN0H
movs r1, 0
@ -43,19 +43,19 @@ sub_8170478: @ 8170478
movs r0, 0x1
movs r1, 0x4
movs r2, 0
bl lcd_bg_operations
bl SetAnimBgAttribute
movs r0, 0x1
movs r1, 0
movs r2, 0
bl lcd_bg_operations
bl SetAnimBgAttribute
movs r0, 0x1
movs r1, 0x1
movs r2, 0x1
bl lcd_bg_operations
bl SetAnimBgAttribute
movs r0, 0x1
movs r1, 0x3
movs r2, 0x1
bl lcd_bg_operations
bl SetAnimBgAttribute
ldr r0, =gHealthBoxesIds
adds r4, r0
ldrb r0, [r4]
@ -212,7 +212,7 @@ sub_8170660: @ 8170660
push {r7}
lsls r0, 24
lsrs r7, r0, 24
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
mov r8, r0
ldr r1, =gTasks
@ -335,7 +335,7 @@ _08170708:
movs r0, 0x1
movs r1, 0x3
movs r2, 0
bl lcd_bg_operations
bl SetAnimBgAttribute
_0817076C:
movs r0, 0
bl GetGpuReg
@ -372,7 +372,7 @@ _0817076C:
movs r0, 0x1
movs r1, 0x1
movs r2, 0
bl lcd_bg_operations
bl SetAnimBgAttribute
ldr r0, =gHealthBoxesIds
add r0, r8
ldrb r0, [r0]
@ -412,7 +412,7 @@ _0817076C:
orrs r2, r5
strb r2, [r0, 0x5]
adds r0, r7, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08170814:
pop {r3}
mov r8, r3
@ -540,12 +540,12 @@ sub_8170920: @ 8170920
lsrs r4, 24
mov r1, sp
adds r1, 0x1
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r2, [r0]
mov r0, sp
bl sub_8170834
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
add sp, 0x4
pop {r4}
pop {r0}
@ -628,11 +628,11 @@ sub_81709EC: @ 81709EC
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl sub_817094C
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4}
pop {r0}
bx r0
@ -752,7 +752,7 @@ _08170AD6:
cmp r0, 0
bne _08170AF8
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08170AF8:
pop {r4-r6}
pop {r0}
@ -766,7 +766,7 @@ sub_8170B04: @ 8170B04
lsls r0, 24
lsrs r6, r0, 24
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
adds r0, r1
ldrb r5, [r0]
@ -834,7 +834,7 @@ _08170B84:
orrs r1, r2
strb r1, [r0]
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08170BA4:
pop {r4-r6}
pop {r0}
@ -852,7 +852,7 @@ sub_8170BB0: @ 8170BB0
lsls r0, 24
lsrs r5, r0, 24
ldr r1, =gBankSpriteIds
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
adds r1, r0, r1
ldrb r1, [r1]
@ -904,7 +904,7 @@ _08170C08:
b _08170CEE
.pool
_08170C44:
ldr r5, =gAnimationBankAttacker
ldr r5, =gAnimBankAttacker
ldrb r0, [r5]
movs r1, 0
bl sub_80A5C6C
@ -979,7 +979,7 @@ _08170CC4:
cmp r0, 0
bne _08170CEE
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08170CEE:
add sp, 0xC
pop {r3,r4}
@ -1003,7 +1003,7 @@ sub_8170CFC: @ 8170CFC
lsrs r0, 24
bl sub_8076A78
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4}
pop {r0}
bx r0
@ -1023,7 +1023,7 @@ sub_8170D24: @ 8170D24
lsrs r0, 24
bl sub_8076AE8
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4}
pop {r0}
bx r0
@ -1051,7 +1051,7 @@ _08170D70:
_08170D74:
strh r0, [r1, 0xE]
adds r0, r2, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
@ -1162,7 +1162,7 @@ sub_8170E04: @ 8170E04
adds r6, r4, r1
movs r0, 0x22
strh r0, [r6, 0x2E]
ldr r2, =gAnimationBankTarget
ldr r2, =gAnimBankTarget
mov r8, r2
ldrb r0, [r2]
movs r1, 0
@ -1246,7 +1246,7 @@ sub_8170EF0: @ 8170EF0
cmp r1, r0
bne _08170F1A
adds r0, r3, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08170F1A:
pop {r0}
bx r0
@ -1313,7 +1313,7 @@ _08170F54:
adds r6, r4, r0
movs r0, 0x22
strh r0, [r6, 0x2E]
ldr r1, =gAnimationBankTarget
ldr r1, =gAnimBankTarget
mov r8, r1
ldrb r0, [r1]
movs r1, 0
@ -1550,7 +1550,7 @@ _08171188:
movs r2, 0x1
movs r3, 0x1C
bl sub_8171D98
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r1, [r0]
movs r0, 0
movs r2, 0xE
@ -1585,7 +1585,7 @@ sub_81711E8: @ 81711E8
str r0, [r4, 0x1C]
ldr r2, =gSprites
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
@ -1607,7 +1607,7 @@ sub_8171240: @ 8171240
push {r4-r7,lr}
adds r7, r0, 0
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
adds r0, r1
ldrb r4, [r0]
@ -2333,7 +2333,7 @@ sub_81717F8: @ 81717F8
push {r7}
sub sp, 0x4
adds r6, r0, 0
ldr r7, =gAnimationBankTarget
ldr r7, =gAnimBankTarget
ldrh r0, [r6, 0x36]
adds r0, 0x1
movs r1, 0
@ -2715,7 +2715,7 @@ sub_8171AE4: @ 8171AE4
movs r2, 0x1
movs r3, 0x1C
bl sub_8171D98
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r1, [r0]
movs r0, 0x1
movs r2, 0xE
@ -2724,7 +2724,7 @@ sub_8171AE4: @ 8171AE4
_08171B36:
ldr r6, =gSprites
ldr r5, =gBankSpriteIds
ldr r4, =gAnimationBankTarget
ldr r4, =gAnimBankTarget
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -2792,7 +2792,7 @@ sub_8171BAC: @ 8171BAC
_08171BCA:
ldr r4, =gSprites
ldr r3, =gBankSpriteIds
ldr r2, =gAnimationBankTarget
ldr r2, =gAnimBankTarget
ldrb r0, [r2]
adds r0, r3
ldrb r1, [r0]
@ -2841,7 +2841,7 @@ _08171C24:
beq _08171C8A
ldr r4, =gSprites
ldr r3, =gBankSpriteIds
ldr r2, =gAnimationBankTarget
ldr r2, =gAnimBankTarget
ldrb r0, [r2]
adds r0, r3
ldrb r1, [r0]
@ -4730,7 +4730,7 @@ sub_8172BF0: @ 8172BF0
movs r0, 0
mov r8, r0
ldr r0, =gBankSpriteIds
ldr r3, =gAnimationBankAttacker
ldr r3, =gAnimBankAttacker
ldrb r2, [r3]
adds r0, r2, r0
ldrb r6, [r0]
@ -4877,7 +4877,7 @@ _08172D28:
adds r0, r1
ldrb r1, [r0, 0x8]
strh r1, [r0, 0x8]
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -4914,7 +4914,7 @@ _08172D7E:
beq _08172D8A
_08172D84:
adds r0, r7, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08172D8A:
pop {r3}
mov r8, r3
@ -4949,7 +4949,7 @@ _08172DC0:
beq _08172E4E
b _08172E84
_08172DC6:
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankIdentity_permutated
lsls r0, 24
@ -5010,7 +5010,7 @@ _08172E14:
b _08172E84
_08172E4E:
ldr r1, =gBankSpriteIds
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
adds r0, r1
ldrb r1, [r0]
@ -5032,7 +5032,7 @@ _08172E4E:
ldrb r0, [r4]
bl sub_805E974
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08172E84:
pop {r4,r5}
pop {r0}
@ -5048,7 +5048,7 @@ sub_8172E9C: @ 8172E9C
ldr r3, =gBattleAnimArgs
ldr r1, =gBattleSpritesDataPtr
ldr r2, [r1]
ldr r1, =gAnimationBankAttacker
ldr r1, =gAnimBankAttacker
ldrb r1, [r1]
ldr r2, [r2]
lsls r1, 2
@ -5057,7 +5057,7 @@ sub_8172E9C: @ 8172E9C
lsls r1, 29
lsrs r1, 31
strh r1, [r3, 0xE]
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
@ -5068,11 +5068,11 @@ sub_8172ED0: @ 8172ED0
push {lr}
lsls r0, 24
lsrs r0, 24
ldr r2, =gAnimationBankTarget
ldr r2, =gAnimBankTarget
ldr r1, =gEffectBank
ldrb r1, [r1]
strb r1, [r2]
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
@ -5108,7 +5108,7 @@ sub_8172EF0: @ 8172EF0
bl GetMonData
adds r4, r0, 0
adds r0, r6, 0
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _08172FC8
@ -5540,7 +5540,7 @@ sub_81732B0: @ 81732B0
ldr r0, =0x0000281d
bl IndexOfSpritePaletteTag
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4}
pop {r0}
bx r0
@ -5559,7 +5559,7 @@ sub_81732E4: @ 81732E4
adds r0, r5, 0
bl FreeSpritePaletteByTag
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4,r5}
pop {r0}
bx r0
@ -5603,7 +5603,7 @@ sub_817330C: @ 817330C
bl sub_80A68D4
ldr r2, =gSprites
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
@ -5628,7 +5628,7 @@ sub_817339C: @ 817339C
adds r3, r0, 0
ldr r2, =gSprites
ldr r1, =gBankSpriteIds
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
adds r0, r1
ldrb r1, [r0]
@ -5679,7 +5679,7 @@ sub_8173400: @ 8173400
adds r4, r0, 0
ldr r5, =gSprites
ldr r3, =gBankSpriteIds
ldr r2, =gAnimationBankAttacker
ldr r2, =gAnimBankAttacker
ldrb r0, [r2]
adds r0, r3
ldrb r1, [r0]
@ -5708,7 +5708,7 @@ sub_8173400: @ 8173400
movs r1, 0
bl StartSpriteAnim
adds r0, r4, 0
bl move_anim_8072740
bl DestroyAnimSprite
_08173448:
pop {r4,r5}
pop {r0}
@ -5733,7 +5733,7 @@ sub_817345C: @ 817345C
_08173478:
movs r0, 0
bl GetBankByIdentity
ldr r1, =gAnimationBankAttacker
ldr r1, =gAnimBankAttacker
strb r0, [r1]
movs r0, 0x1
b _08173498
@ -5741,16 +5741,16 @@ _08173478:
_0817348C:
movs r0, 0x1
bl GetBankByIdentity
ldr r1, =gAnimationBankAttacker
ldr r1, =gAnimBankAttacker
strb r0, [r1]
movs r0, 0
_08173498:
bl GetBankByIdentity
ldr r1, =gAnimationBankTarget
ldr r1, =gAnimBankTarget
strb r0, [r1]
_081734A0:
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4}
pop {r0}
bx r0
@ -5801,7 +5801,7 @@ _08173508:
_0817350C:
strh r0, [r1]
adds r0, r2, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
@ -5812,18 +5812,18 @@ sub_817351C: @ 817351C
push {lr}
lsls r0, 24
lsrs r0, 24
ldr r3, =gAnimationBankAttacker
ldr r3, =gAnimBankAttacker
ldr r1, =gBattleSpritesDataPtr
ldr r2, [r1]
ldr r1, [r2, 0x8]
ldrh r1, [r1]
strb r1, [r3]
ldr r3, =gAnimationBankTarget
ldr r3, =gAnimBankTarget
ldr r1, [r2, 0x8]
ldrh r1, [r1]
lsrs r1, 8
strb r1, [r3]
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool

View File

@ -142,7 +142,7 @@ sub_8158C04: @ 8158C04
cmp r0, 0x2
bne _08158C4C
adds r0, r5, 0
bl move_anim_related_task_del
bl DestroyAnimSoundTask
_08158C4C:
pop {r4,r5}
pop {r0}
@ -264,7 +264,7 @@ sub_8158D08: @ 8158D08
cmp r0, 0
bne _08158D50
adds r0, r5, 0
bl move_anim_related_task_del
bl DestroyAnimSoundTask
b _08158D82
.pool
_08158D50:
@ -319,7 +319,7 @@ sub_8158D8C: @ 8158D8C
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08158DC8
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x18]
ldrh r4, [r0]
@ -327,7 +327,7 @@ sub_8158D8C: @ 8158D8C
.pool
_08158DC8:
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _08158E76
_08158DD0:
ldr r0, =gBattleAnimArgs
@ -336,25 +336,25 @@ _08158DD0:
adds r2, r0, 0
cmp r1, 0
bne _08158DEC
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r4, [r0]
b _08158E12
.pool
_08158DEC:
cmp r1, 0x1
bne _08158DFC
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r4, [r0]
b _08158E12
.pool
_08158DFC:
cmp r1, 0x2
bne _08158E08
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _08158E0A
.pool
_08158E08:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_08158E0A:
ldrb r1, [r0]
movs r0, 0x2
@ -369,12 +369,12 @@ _08158E12:
bne _08158E38
_08158E1E:
adds r0, r4, 0
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
bne _08158E38
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _08158E8C
.pool
_08158E38:
@ -416,7 +416,7 @@ _08158E76:
bl PlayCry3
_08158E86:
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08158E8C:
pop {r4-r6}
pop {r0}
@ -444,7 +444,7 @@ sub_8158E9C: @ 8158E9C
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08158ED8
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x18]
ldrh r4, [r0]
@ -452,7 +452,7 @@ sub_8158E9C: @ 8158E9C
.pool
_08158ED8:
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _08158F86
_08158EE0:
ldr r0, =gBattleAnimArgs
@ -461,25 +461,25 @@ _08158EE0:
adds r2, r0, 0
cmp r1, 0
bne _08158EFC
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r4, [r0]
b _08158F22
.pool
_08158EFC:
cmp r1, 0x1
bne _08158F0C
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r4, [r0]
b _08158F22
.pool
_08158F0C:
cmp r1, 0x2
bne _08158F18
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _08158F1A
.pool
_08158F18:
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_08158F1A:
ldrb r1, [r0]
movs r0, 0x2
@ -494,12 +494,12 @@ _08158F22:
bne _08158F48
_08158F2E:
adds r0, r4, 0
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
bne _08158F48
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _08158FEE
.pool
_08158F48:
@ -571,7 +571,7 @@ _08158FD0:
.pool
_08158FE8:
adds r0, r6, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08158FEE:
pop {r4-r6}
pop {r0}
@ -620,7 +620,7 @@ _08159028:
movs r2, 0xA
bl PlayCry3
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _0815906A
_0815904E:
bl IsCryPlaying
@ -633,7 +633,7 @@ _0815904E:
movs r2, 0x8
bl PlayCry3
mov r0, r9
bl move_anim_task_del
bl DestroyAnimVisualTask
_0815906A:
pop {r3,r4}
mov r8, r3
@ -669,7 +669,7 @@ _081590A0:
cmp r0, 0
bne _081590B0
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_081590B0:
pop {r4}
pop {r0}
@ -698,14 +698,14 @@ sub_81590B8: @ 81590B8
lsls r0, 24
cmp r0, 0
beq _081590F8
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x18]
b _08159102
.pool
_081590F8:
ldr r1, =gUnknown_02038438
ldr r0, =gAnimationBankAttacker
ldr r1, =gAnimSpeciesByBanks
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
lsls r0, 1
adds r0, r1
@ -728,7 +728,7 @@ _08159102:
.pool
_08159130:
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08159136:
pop {r4,r5}
pop {r0}
@ -829,7 +829,7 @@ _081591F2:
bl PlayCry3
_081591FE:
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_08159204:
pop {r3}
mov r8, r3
@ -856,7 +856,7 @@ sub_8159210: @ 8159210
adds r0, r5, 0
bl PlaySE1WithPanning
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4,r5}
pop {r0}
bx r0
@ -881,7 +881,7 @@ sub_8159244: @ 8159244
adds r0, r5, 0
bl PlaySE2WithPanning
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4,r5}
pop {r0}
bx r0
@ -995,7 +995,7 @@ _08159342:
cmp r1, r0
bne _0815935A
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_0815935A:
pop {r4,r5}
pop {r0}

View File

@ -276,7 +276,7 @@ _080645CA:
ldrb r1, [r7]
movs r0, 0x2
eors r0, r1
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
bne _0806469C
@ -4729,7 +4729,7 @@ _08066D32:
ldrb r0, [r1]
mov r1, r8
strb r0, [r1]
ldr r3, =gMovePowerMoveAnim
ldr r3, =gAnimMovePower
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -4743,7 +4743,7 @@ _08066D32:
lsls r0, 8
orrs r2, r0
strh r2, [r3]
ldr r3, =gMoveDmgMoveAnim
ldr r3, =gAnimMoveDmg
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -4769,7 +4769,7 @@ _08066D32:
lsls r0, 24
orrs r2, r0
str r2, [r3]
ldr r2, =gHappinessMoveAnim
ldr r2, =gAnimFriendship
ldrb r0, [r5]
lsls r0, 9
mov r1, r12
@ -4791,7 +4791,7 @@ _08066D32:
lsls r0, 8
orrs r2, r0
strh r2, [r4]
ldr r7, =gDisableStructMoveAnim
ldr r7, =gAnimDisableStructPtr
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -4928,7 +4928,7 @@ _08066F08:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -6080,7 +6080,7 @@ sub_80678D0: @ 80678D0
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _08067916

View File

@ -4038,7 +4038,7 @@ _0814D2CE:
ldrb r0, [r1]
mov r1, r8
strb r0, [r1]
ldr r3, =gMovePowerMoveAnim
ldr r3, =gAnimMovePower
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -4052,7 +4052,7 @@ _0814D2CE:
lsls r0, 8
orrs r2, r0
strh r2, [r3]
ldr r3, =gMoveDmgMoveAnim
ldr r3, =gAnimMoveDmg
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -4078,7 +4078,7 @@ _0814D2CE:
lsls r0, 24
orrs r2, r0
str r2, [r3]
ldr r2, =gHappinessMoveAnim
ldr r2, =gAnimFriendship
ldrb r0, [r5]
lsls r0, 9
mov r1, r12
@ -4100,7 +4100,7 @@ _0814D2CE:
lsls r0, 8
orrs r2, r0
strh r2, [r4]
ldr r7, =gDisableStructMoveAnim
ldr r7, =gAnimDisableStructPtr
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -4237,7 +4237,7 @@ _0814D4A4:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -5474,7 +5474,7 @@ sub_814DF40: @ 814DF40
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _0814DF86

View File

@ -4877,7 +4877,7 @@ _08061C8A:
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
ldr r4, =gMovePowerMoveAnim
ldr r4, =gAnimMovePower
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4891,7 +4891,7 @@ _08061C8A:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r4, =gMoveDmgMoveAnim
ldr r4, =gAnimMoveDmg
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4917,7 +4917,7 @@ _08061C8A:
lsls r1, 24
orrs r3, r1
str r3, [r4]
ldr r3, =gHappinessMoveAnim
ldr r3, =gAnimFriendship
ldrb r1, [r6]
lsls r1, 9
mov r2, r12
@ -4939,7 +4939,7 @@ _08061C8A:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r3, =gDisableStructMoveAnim
ldr r3, =gAnimDisableStructPtr
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -5068,7 +5068,7 @@ _08061E48:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -6535,7 +6535,7 @@ sub_8062AD0: @ 8062AD0
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _08062B16

View File

@ -8142,7 +8142,7 @@ _0805BCBE:
ldrb r0, [r1]
mov r1, r8
strb r0, [r1]
ldr r3, =gMovePowerMoveAnim
ldr r3, =gAnimMovePower
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -8156,7 +8156,7 @@ _0805BCBE:
lsls r0, 8
orrs r2, r0
strh r2, [r3]
ldr r3, =gMoveDmgMoveAnim
ldr r3, =gAnimMoveDmg
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -8182,7 +8182,7 @@ _0805BCBE:
lsls r0, 24
orrs r2, r0
str r2, [r3]
ldr r2, =gHappinessMoveAnim
ldr r2, =gAnimFriendship
ldrb r0, [r5]
lsls r0, 9
mov r1, r12
@ -8204,7 +8204,7 @@ _0805BCBE:
lsls r0, 8
orrs r2, r0
strh r2, [r4]
ldr r7, =gDisableStructMoveAnim
ldr r7, =gAnimDisableStructPtr
ldrb r1, [r5]
lsls r1, 9
mov r0, r12
@ -8341,7 +8341,7 @@ _0805BE94:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -10172,7 +10172,7 @@ dp01t_33_1_enemy_move: @ 805CEF4
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _0805CF3A

View File

@ -4658,7 +4658,7 @@ _081BD7A2:
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
ldr r4, =gMovePowerMoveAnim
ldr r4, =gAnimMovePower
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4672,7 +4672,7 @@ _081BD7A2:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r4, =gMoveDmgMoveAnim
ldr r4, =gAnimMoveDmg
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4698,7 +4698,7 @@ _081BD7A2:
lsls r1, 24
orrs r3, r1
str r3, [r4]
ldr r3, =gHappinessMoveAnim
ldr r3, =gAnimFriendship
ldrb r1, [r6]
lsls r1, 9
mov r2, r12
@ -4720,7 +4720,7 @@ _081BD7A2:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r3, =gDisableStructMoveAnim
ldr r3, =gAnimDisableStructPtr
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4849,7 +4849,7 @@ _081BD960:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -6207,7 +6207,7 @@ sub_81BE53C: @ 81BE53C
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _081BE582

View File

@ -4414,7 +4414,7 @@ _08188BE6:
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
ldr r4, =gMovePowerMoveAnim
ldr r4, =gAnimMovePower
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4428,7 +4428,7 @@ _08188BE6:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r4, =gMoveDmgMoveAnim
ldr r4, =gAnimMoveDmg
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4454,7 +4454,7 @@ _08188BE6:
lsls r1, 24
orrs r3, r1
str r3, [r4]
ldr r3, =gHappinessMoveAnim
ldr r3, =gAnimFriendship
ldrb r1, [r6]
lsls r1, 9
mov r2, r12
@ -4476,7 +4476,7 @@ _08188BE6:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r3, =gDisableStructMoveAnim
ldr r3, =gAnimDisableStructPtr
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4605,7 +4605,7 @@ _08188DA4:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -5819,7 +5819,7 @@ sub_8189800: @ 8189800
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _08189846

View File

@ -4514,7 +4514,7 @@ _0818C192:
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
ldr r4, =gMovePowerMoveAnim
ldr r4, =gAnimMovePower
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4528,7 +4528,7 @@ _0818C192:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r4, =gMoveDmgMoveAnim
ldr r4, =gAnimMoveDmg
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4554,7 +4554,7 @@ _0818C192:
lsls r1, 24
orrs r3, r1
str r3, [r4]
ldr r3, =gHappinessMoveAnim
ldr r3, =gAnimFriendship
ldrb r1, [r6]
lsls r1, 9
mov r2, r12
@ -4576,7 +4576,7 @@ _0818C192:
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r3, =gDisableStructMoveAnim
ldr r3, =gAnimDisableStructPtr
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -4705,7 +4705,7 @@ _0818C350:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]
@ -6003,7 +6003,7 @@ sub_818CE98: @ 818CE98
push {r4,lr}
ldr r4, =gActiveBank
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _0818CEDE

View File

@ -3322,7 +3322,7 @@ sub_816A144: @ 816A144
adds r2, r1
ldrb r1, [r2]
strb r1, [r5]
ldr r4, =gMovePowerMoveAnim
ldr r4, =gAnimMovePower
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -3336,7 +3336,7 @@ sub_816A144: @ 816A144
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r4, =gMoveDmgMoveAnim
ldr r4, =gAnimMoveDmg
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -3362,7 +3362,7 @@ sub_816A144: @ 816A144
lsls r1, 24
orrs r3, r1
str r3, [r4]
ldr r3, =gHappinessMoveAnim
ldr r3, =gAnimFriendship
ldrb r1, [r6]
lsls r1, 9
mov r2, r12
@ -3384,7 +3384,7 @@ sub_816A144: @ 816A144
lsls r1, 8
orrs r3, r1
strh r3, [r4]
ldr r3, =gDisableStructMoveAnim
ldr r3, =gAnimDisableStructPtr
ldrb r2, [r6]
lsls r2, 9
mov r1, r12
@ -3505,7 +3505,7 @@ _0816A2F6:
movs r0, 0
bl sub_805EB9C
adds r0, r4, 0
bl move_anim_start_t1
bl DoMoveAnim
ldr r0, [r7]
ldrb r1, [r6]
ldr r2, [r0, 0x4]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -68,7 +68,7 @@ ContestEffectFunc_080E547C: @ 80E547C
thumb_func_start ContestEffectFunc_080E5480
ContestEffectFunc_080E5480: @ 80E5480
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -94,7 +94,7 @@ ContestEffectFunc_080E5480: @ 80E5480
thumb_func_start ContestEffectFunc_080E54B0
ContestEffectFunc_080E54B0: @ 80E54B0
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -119,7 +119,7 @@ ContestEffectFunc_080E54B0: @ 80E54B0
thumb_func_start ContestEffectFunc_080E54E0
ContestEffectFunc_080E54E0: @ 80E54E0
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -165,7 +165,7 @@ ContestEffectFunc_080E54E0: @ 80E54E0
thumb_func_start ContestEffectFunc_080E5534
ContestEffectFunc_080E5534: @ 80E5534
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -189,7 +189,7 @@ ContestEffectFunc_080E5534: @ 80E5534
thumb_func_start ContestEffectFunc_080E5560
ContestEffectFunc_080E5560: @ 80E5560
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -215,7 +215,7 @@ ContestEffectFunc_080E5560: @ 80E5560
thumb_func_start ContestEffectFunc_080E5590
ContestEffectFunc_080E5590: @ 80E5590
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -239,7 +239,7 @@ ContestEffectFunc_080E5590: @ 80E5590
thumb_func_start ContestEffectFunc_080E55BC
ContestEffectFunc_080E55BC: @ 80E55BC
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -266,7 +266,7 @@ ContestEffectFunc_080E55BC: @ 80E55BC
ContestEffectFunc_080E55EC: @ 80E55EC
push {r4,r5,lr}
movs r2, 0
ldr r5, =gUnknown_02039F34
ldr r5, =gContestResources
ldr r0, [r5]
ldr r1, [r0, 0x8]
ldrb r4, [r1, 0x11]
@ -293,7 +293,7 @@ _080E560A:
cmp r0, r1
bne _080E560A
_080E5622:
ldr r1, =gUnknown_02039F34
ldr r1, =gContestResources
ldr r0, [r1]
ldr r0, [r0, 0x8]
strb r2, [r0, 0x8]
@ -307,14 +307,14 @@ _080E5622:
_080E563A:
cmp r2, 0
bne _080E564C
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
movs r1, 0x36
bl sub_80DD3F0
_080E564C:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -330,7 +330,7 @@ _080E564C:
ContestEffectFunc_080E5664: @ 80E5664
push {r4-r6,lr}
movs r1, 0
ldr r2, =gUnknown_02039F34
ldr r2, =gContestResources
ldr r0, [r2]
ldr r0, [r0, 0x8]
ldrb r5, [r0, 0x11]
@ -359,7 +359,7 @@ _080E5698:
adds r3, 0x1
cmp r3, 0x3
ble _080E567E
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
adds r0, 0x8
@ -372,14 +372,14 @@ _080E5698:
_080E56B4:
cmp r1, 0
bne _080E56C6
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
movs r1, 0x36
bl sub_80DD3F0
_080E56C6:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -409,7 +409,7 @@ ContestEffectFunc_080E56E0: @ 80E56E0
bhi _080E5702
movs r1, 0x28
_080E5702:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
strh r1, [r0, 0x4]
@ -425,7 +425,7 @@ ContestEffectFunc_080E5718: @ 80E5718
mov r7, r8
push {r7}
movs r7, 0
ldr r1, =gUnknown_02039F34
ldr r1, =gContestResources
ldr r0, [r1]
ldr r0, [r0, 0x8]
ldrb r5, [r0, 0x11]
@ -521,7 +521,7 @@ ContestEffectFunc_080E57CC: @ 80E57CC
push {r5-r7}
movs r0, 0
mov r9, r0
ldr r1, =gUnknown_02039F34
ldr r1, =gContestResources
ldr r0, [r1]
ldr r0, [r0, 0x8]
ldrb r2, [r0, 0x11]
@ -619,7 +619,7 @@ ContestEffectFunc_080E588C: @ 80E588C
push {r6,r7}
movs r0, 0
mov r9, r0
ldr r1, =gUnknown_02039F34
ldr r1, =gContestResources
ldr r0, [r1]
ldr r0, [r0, 0x8]
ldrb r7, [r0, 0x11]
@ -674,7 +674,7 @@ _080E58DA:
_080E5900:
adds r6, 0x1C
adds r5, 0x1
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
cmp r5, 0x3
ble _080E58B0
_080E590A:
@ -704,7 +704,7 @@ _080E5928:
thumb_func_start ContestEffectFunc_080E5938
ContestEffectFunc_080E5938: @ 80E5938
push {r4,lr}
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r1, [r4]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -732,7 +732,7 @@ ContestEffectFunc_080E5938: @ 80E5938
thumb_func_start ContestEffectFunc_080E5970
ContestEffectFunc_080E5970: @ 80E5970
push {r4,lr}
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r1, [r4]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -765,7 +765,7 @@ ContestEffectFunc_080E59B0: @ 80E59B0
push {lr}
movs r0, 0
bl sub_80E6934
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -781,7 +781,7 @@ ContestEffectFunc_080E59D0: @ 80E59D0
push {lr}
movs r0, 0x1
bl sub_80E6934
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -797,7 +797,7 @@ ContestEffectFunc_080E59F0: @ 80E59F0
push {lr}
movs r0, 0x2
bl sub_80E6934
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -813,7 +813,7 @@ ContestEffectFunc_080E5A10: @ 80E5A10
push {lr}
movs r0, 0x3
bl sub_80E6934
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -829,7 +829,7 @@ ContestEffectFunc_080E5A30: @ 80E5A30
push {lr}
movs r0, 0x4
bl sub_80E6934
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -844,7 +844,7 @@ ContestEffectFunc_080E5A30: @ 80E5A30
ContestEffectFunc_080E5A50: @ 80E5A50
push {r4-r6,lr}
movs r4, 0
ldr r2, =gUnknown_02039F34
ldr r2, =gContestResources
ldr r0, [r2]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x11]
@ -855,7 +855,7 @@ ContestEffectFunc_080E5A50: @ 80E5A50
beq _080E5AB0
movs r5, 0
_080E5A68:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r1, [r0, 0x8]
ldrb r0, [r1, 0x11]
@ -932,7 +932,7 @@ ContestEffectFunc_080E5AD4: @ 80E5AD4
mov r10, r3
movs r6, 0
_080E5B00:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r2, [r0]
ldr r1, [r2, 0x8]
ldrb r0, [r1, 0x11]
@ -1000,7 +1000,7 @@ _080E5B76:
bge _080E5B76
_080E5B7E:
movs r5, 0
ldr r7, =gUnknown_02039F34
ldr r7, =gContestResources
movs r6, 0
mov r4, r10
_080E5B86:
@ -1125,7 +1125,7 @@ _080E5C70:
lsrs r0, 24
mov r9, r0
_080E5C86:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
adds r0, 0xD
@ -1139,7 +1139,7 @@ _080E5C86:
cmp r0, 0xFF
bne _080E5C16
_080E5CA0:
ldr r6, =gUnknown_02039F34
ldr r6, =gContestResources
ldr r0, [r6]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1173,7 +1173,7 @@ ContestEffectFunc_080E5CD4: @ 80E5CD4
movs r0, 0
mov r8, r0
movs r6, 0
ldr r7, =gUnknown_02039F34
ldr r7, =gContestResources
movs r5, 0
_080E5CE4:
ldr r2, [r7]
@ -1228,7 +1228,7 @@ _080E5D46:
adds r6, 0x1
cmp r6, 0x3
ble _080E5CE4
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r0, [r4]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1256,7 +1256,7 @@ ContestEffectFunc_080E5D7C: @ 80E5D7C
push {r4-r7,lr}
movs r7, 0
movs r4, 0
ldr r5, =gUnknown_02039F34
ldr r5, =gContestResources
movs r6, 0
_080E5D86:
ldr r3, [r5]
@ -1301,7 +1301,7 @@ _080E5DD2:
adds r4, 0x1
cmp r4, 0x3
ble _080E5D86
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r0, [r4]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1325,7 +1325,7 @@ _080E5DF8:
ContestEffectFunc_080E5E04: @ 80E5E04
push {r4,lr}
ldr r1, =gUnknown_02039F26
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r4, [r0]
ldr r0, [r4, 0x8]
ldrb r2, [r0, 0x11]
@ -1366,7 +1366,7 @@ _080E5E46:
ContestEffectFunc_080E5E5C: @ 80E5E5C
push {r4,lr}
ldr r1, =gUnknown_02039F26
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r4, [r0]
ldr r0, [r4, 0x8]
ldrb r2, [r0, 0x11]
@ -1408,7 +1408,7 @@ ContestEffectFunc_080E5EB4: @ 80E5EB4
push {r4-r7,lr}
movs r1, 0
movs r5, 0
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r4, [r0]
ldr r2, [r4, 0x8]
ldrb r0, [r2, 0x11]
@ -1434,7 +1434,7 @@ _080E5EDA:
bge _080E5EE8
movs r5, 0
_080E5EE8:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r3, [r0]
ldr r0, [r3, 0x8]
ldrb r2, [r0, 0x11]
@ -1467,7 +1467,7 @@ _080E5F0C:
movs r1, 0x11
bl sub_80DD3D4
_080E5F2C:
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r1, [r4]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -1498,7 +1498,7 @@ _080E5F2C:
ContestEffectFunc_080E5F64: @ 80E5F64
push {r4-r7,lr}
movs r6, 0
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r4, [r0]
ldr r2, [r4, 0x8]
ldrb r1, [r2, 0x11]
@ -1567,7 +1567,7 @@ _080E5FDE:
thumb_func_start ContestEffectFunc_080E5FE4
ContestEffectFunc_080E5FE4: @ 80E5FE4
push {r4,r5,lr}
ldr r1, =gUnknown_02039F34
ldr r1, =gContestResources
ldr r3, [r1]
ldr r0, [r3, 0x8]
ldrb r2, [r0, 0x11]
@ -1647,7 +1647,7 @@ ContestEffectFunc_080E6068: @ 80E6068
cmp r0, 0x2
bhi _080E6098
movs r4, 0xA
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1659,7 +1659,7 @@ _080E6098:
cmp r0, 0x5
bhi _080E60B4
movs r4, 0x14
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1671,7 +1671,7 @@ _080E60B4:
cmp r0, 0x7
bhi _080E60D0
movs r4, 0x28
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1683,7 +1683,7 @@ _080E60D0:
cmp r1, 0x8
bhi _080E60EC
movs r4, 0x3C
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -1693,14 +1693,14 @@ _080E60D0:
.pool
_080E60EC:
movs r4, 0x50
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
movs r1, 0x1E
bl sub_80DD3D4
_080E60FC:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r1, [r0]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -1721,7 +1721,7 @@ ContestEffectFunc_080E611C: @ 80E611C
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r2, =gUnknown_02039F34
ldr r2, =gContestResources
ldr r0, [r2]
ldr r3, [r0, 0x8]
ldrb r0, [r3, 0x11]
@ -1743,7 +1743,7 @@ _080E6140:
adds r5, r0, 0
cmp r6, r1
beq _080E616A
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
_080E614E:
lsls r0, r2, 24
movs r2, 0x80
@ -1845,7 +1845,7 @@ ContestEffectFunc_080E620C: @ 80E620C
mov r7, r9
mov r6, r8
push {r6,r7}
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r3, [r0]
ldr r1, [r3, 0x8]
ldrb r2, [r1, 0x11]
@ -1928,7 +1928,7 @@ _080E62AC:
thumb_func_start ContestEffectFunc_080E62B8
ContestEffectFunc_080E62B8: @ 80E62B8
push {r4-r7,lr}
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r1, [r0, 0x11]
@ -1939,7 +1939,7 @@ ContestEffectFunc_080E62B8: @ 80E62B8
movs r5, 0
movs r6, 0
_080E62CE:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r4, [r0]
ldr r1, [r4, 0x8]
ldrb r2, [r1, 0x11]
@ -1994,7 +1994,7 @@ _080E632E:
thumb_func_start ContestEffectFunc_080E6334
ContestEffectFunc_080E6334: @ 80E6334
push {r4,lr}
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r1, [r4]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -2046,7 +2046,7 @@ _080E6390:
thumb_func_start ContestEffectFunc_080E6398
ContestEffectFunc_080E6398: @ 80E6398
push {lr}
ldr r3, =gUnknown_02039F34
ldr r3, =gContestResources
ldr r1, [r3]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -2090,7 +2090,7 @@ _080E63E4:
ContestEffectFunc_080E63E8: @ 80E63E8
push {r4-r7,lr}
sub sp, 0x4
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r2, [r0]
ldr r1, [r2]
ldrb r1, [r1, 0x1]
@ -2258,7 +2258,7 @@ ContestEffectFunc_080E6520: @ 80E6520
mov r7, r8
push {r7}
sub sp, 0x4
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r2, [r0]
ldr r1, [r2]
ldrb r1, [r1, 0x1]
@ -2434,7 +2434,7 @@ ContestEffectFunc_080E6664: @ 80E6664
ContestEffectFunc_080E6668: @ 80E6668
push {r4-r7,lr}
sub sp, 0x8
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r1, [r0]
ldr r0, [r1]
ldrb r0, [r0, 0x1]
@ -2517,7 +2517,7 @@ _080E66FC:
cmp r0, 0x3
ble _080E66AA
movs r6, 0
ldr r5, =gUnknown_02039F34
ldr r5, =gContestResources
adds r4, r5, 0
_080E6712:
ldr r0, [r4]
@ -2576,7 +2576,7 @@ _080E676C:
ContestEffectFunc_080E6778: @ 80E6778
push {lr}
ldr r3, =gContestMoves
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r1, [r0]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -2613,7 +2613,7 @@ ContestEffectFunc_080E67BC: @ 80E67BC
movs r0, 0
mov r8, r0
movs r4, 0
ldr r5, =gUnknown_02039F34
ldr r5, =gContestResources
movs r6, 0
_080E67CC:
ldr r3, [r5]
@ -2672,14 +2672,14 @@ _080E682E:
mov r7, r8
cmp r7, 0
bne _080E684A
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
movs r1, 0x36
bl sub_80DD3F0
_080E684A:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -2696,7 +2696,7 @@ _080E684A:
thumb_func_start ContestEffectFunc_080E6868
ContestEffectFunc_080E6868: @ 80E6868
push {r4,lr}
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r1, [r0]
ldr r0, [r1]
ldrb r0, [r0, 0x13]
@ -2745,7 +2745,7 @@ _080E68C2:
movs r1, 0x1E
bl sub_80DD3D4
_080E68CE:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r1, [r0]
ldr r0, [r1, 0x8]
ldrb r2, [r0, 0x11]
@ -2764,7 +2764,7 @@ _080E68CE:
thumb_func_start ContestEffectFunc_080E68EC
ContestEffectFunc_080E68EC: @ 80E68EC
push {r4,lr}
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r0, [r4]
ldr r2, [r0, 0x10]
ldrb r1, [r2, 0x1]
@ -2811,7 +2811,7 @@ sub_80E6934: @ 80E6934
mov r8, r0
movs r7, 0
movs r4, 0
ldr r6, =gUnknown_02039F34
ldr r6, =gContestResources
ldr r0, =gContestMoves
mov r9, r0
movs r5, 0
@ -2861,7 +2861,7 @@ _080E699E:
ble _080E694E
cmp r7, 0
bne _080E69B8
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x11]
@ -2882,7 +2882,7 @@ sub_80E69C8: @ 80E69C8
push {lr}
lsls r0, 24
lsrs r3, r0, 24
ldr r2, =gUnknown_02039F34
ldr r2, =gContestResources
ldr r0, [r2]
ldr r0, [r0, 0x8]
adds r0, 0xD
@ -2945,7 +2945,7 @@ sub_80E6A2C: @ 80E6A2C
movs r2, 0x8
bl memset
movs r7, 0
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r0, [r4]
ldr r0, [r0, 0x8]
ldrb r0, [r0, 0x8]
@ -3040,7 +3040,7 @@ _080E6AD6:
strh r0, [r1]
_080E6AFE:
adds r7, 0x1
ldr r4, =gUnknown_02039F34
ldr r4, =gContestResources
ldr r0, [r4]
ldr r0, [r0, 0x8]
adds r0, 0x8
@ -3081,7 +3081,7 @@ sub_80E6B3C: @ 80E6B3C
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
ldr r2, =gUnknown_02039F34
ldr r2, =gContestResources
ldr r4, [r2]
ldr r3, [r4, 0x4]
lsls r2, r0, 3

View File

@ -657,7 +657,7 @@ _080FCA30:
lsls r0, 24
cmp r0, 0
beq _080FCAB2
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r2, [r0]
ldr r0, =gUnknown_02039F25
ldrb r0, [r0]
@ -688,7 +688,7 @@ _080FCA68:
ldrb r0, [r6]
cmp r2, r0
bge _080FCAA4
ldr r1, =gUnknown_02039F34
ldr r1, =gContestResources
mov r8, r1
ldr r4, =gBlockRecvBuffer
movs r3, 0
@ -955,7 +955,7 @@ _080FCCE8:
bne _080FCCF4
b _080FCE42
_080FCCF4:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x4]
movs r1, 0x70
@ -968,7 +968,7 @@ _080FCD04:
bne _080FCD10
b _080FCE42
_080FCD10:
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x4]
ldr r1, =gUnknown_02039F2B
@ -1004,7 +1004,7 @@ _080FCD54:
lsls r0, 24
cmp r0, 0
beq _080FCE42
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
movs r1, 0x14
@ -1015,7 +1015,7 @@ _080FCD6C:
lsls r0, 24
cmp r0, 0
beq _080FCE42
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x8]
ldr r1, =gUnknown_02039F2B
@ -1031,7 +1031,7 @@ _080FCD98:
lsls r0, 24
cmp r0, 0
beq _080FCE42
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x10]
b _080FCDD4
@ -1041,7 +1041,7 @@ _080FCDB0:
lsls r0, 24
cmp r0, 0
beq _080FCE42
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x10]
b _080FCE04

View File

@ -75,7 +75,7 @@ _080326B8:
ldr r0, =gBattleExecBuffer
movs r5, 0
str r5, [r0]
bl sub_80A3934
bl ClearBattleAnimationVars
bl ClearBattleMonForms
movs r0, 0xF
bl BattleAI_HandleItemUseBeforeAISetup

View File

@ -74,7 +74,7 @@ _080A5D00:
lsls r0, 24
cmp r0, 0
beq _080A5D28
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r2, [r0, 0x18]
ldrb r1, [r2, 0x4]
@ -180,7 +180,7 @@ _080A5DDA:
lsls r0, 24
cmp r0, 0
beq _080A5E04
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r2, [r0, 0x18]
ldrb r1, [r2, 0x4]
@ -531,7 +531,7 @@ sub_80A60AC: @ 80A60AC
lsls r0, 24
cmp r0, 0
beq _080A60E8
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r2, [r0, 0x18]
ldrb r1, [r2, 0x4]
@ -554,7 +554,7 @@ _080A60E8:
ldrh r0, [r1, 0x2]
cmp r0, 0
bne _080A610C
ldr r1, =gUnknown_02038438
ldr r1, =gAnimSpeciesByBanks
lsls r0, r4, 1
adds r0, r1
ldrh r1, [r0]
@ -724,9 +724,9 @@ GetAnimBankSpriteId: @ 80A6240
adds r1, r0, 0
cmp r0, 0
bne _080A6268
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _080A62B6
@ -737,9 +737,9 @@ GetAnimBankSpriteId: @ 80A6240
_080A6268:
cmp r0, 0x1
bne _080A6288
ldr r4, =gAnimationBankTarget
ldr r4, =gAnimBankTarget
ldrb r0, [r4]
bl sub_80A6A90
bl AnimBankSpriteExists
lsls r0, 24
cmp r0, 0
beq _080A62B6
@ -750,22 +750,22 @@ _080A6268:
_080A6288:
cmp r1, 0x2
bne _080A62A4
ldr r5, =gAnimationBankAttacker
ldr r5, =gAnimBankAttacker
ldrb r0, [r5]
movs r4, 0x2
eors r0, r4
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A62B6
b _080A62C0
.pool
_080A62A4:
ldr r5, =gAnimationBankTarget
ldr r5, =gAnimBankTarget
ldrb r0, [r5]
movs r4, 0x2
eors r0, r4
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
bne _080A62C0
@ -1242,7 +1242,7 @@ sub_80A65EC: @ 80A65EC
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x34]
ldr r5, =gAnimationBankTarget
ldr r5, =gAnimBankTarget
ldrb r0, [r5]
movs r1, 0x2
bl sub_80A5C6C
@ -1421,7 +1421,7 @@ move_anim_8074EE0: @ 80A674C
adds r4, r0, 0
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl move_anim_8072740
bl DestroyAnimSprite
pop {r4}
pop {r0}
bx r0
@ -1439,7 +1439,7 @@ sub_80A6760: @ 80A6760
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x34]
ldr r5, =gAnimationBankAttacker
ldr r5, =gAnimBankAttacker
ldrb r0, [r5]
movs r1, 0x2
bl sub_80A5C6C
@ -1518,7 +1518,7 @@ sub_80A67F4: @ 80A67F4
movs r1, 0
bl SetGpuReg
adds r0, r4, 0
bl move_anim_8072740
bl DestroyAnimSprite
pop {r4}
pop {r0}
bx r0
@ -1537,7 +1537,7 @@ sub_80A6814: @ 80A6814
movs r1, 0
bl SetGpuReg
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r4}
pop {r0}
bx r0
@ -1547,7 +1547,7 @@ sub_80A6814: @ 80A6814
sub_80A6838: @ 80A6838
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl sub_80A5C6C
@ -1575,13 +1575,13 @@ sub_80A6864: @ 80A6864
lsls r1, 16
lsrs r5, r1, 16
mov r8, r5
ldr r7, =gAnimationBankAttacker
ldr r7, =gAnimBankAttacker
ldrb r0, [r7]
movs r1, 0
bl sub_80A5C6C
lsls r0, 24
lsrs r6, r0, 24
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
movs r1, 0
bl sub_80A5C6C
@ -1729,7 +1729,7 @@ sub_80A6980: @ 80A6980
lsls r1, 24
cmp r1, 0
bne _080A69A8
ldr r4, =gAnimationBankTarget
ldr r4, =gAnimBankTarget
ldrb r0, [r4]
movs r1, 0
bl sub_80A60AC
@ -1765,7 +1765,7 @@ sub_80A69CC: @ 80A69CC
lsls r1, 24
cmp r1, 0
bne _080A69F0
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0
bl sub_80A60AC
@ -1777,7 +1777,7 @@ sub_80A69CC: @ 80A69CC
b _080A6A04
.pool
_080A69F0:
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl sub_80A60AC
@ -1862,8 +1862,8 @@ _080A6A7E:
.pool
thumb_func_end GetBankByIdentity
thumb_func_start sub_80A6A90
sub_80A6A90: @ 80A6A90
thumb_func_start AnimBankSpriteExists
AnimBankSpriteExists: @ 80A6A90
push {r4,r5,lr}
lsls r0, 24
lsrs r4, r0, 24
@ -1872,11 +1872,11 @@ sub_80A6A90: @ 80A6A90
lsls r0, 24
cmp r0, 0
beq _080A6ABC
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
cmp r0, r4
beq _080A6B0A
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
cmp r0, r4
beq _080A6B0A
@ -1926,7 +1926,7 @@ _080A6B1A:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_80A6A90
thumb_func_end AnimBankSpriteExists
thumb_func_start IsDoubleBattle
IsDoubleBattle: @ 80A6B20
@ -2061,7 +2061,7 @@ sub_80A6BFC: @ 80A6BFC
b _080A6C60
.pool
_080A6C30:
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankIdentity_permutated
lsls r0, 24
@ -2271,21 +2271,21 @@ _080A6DBE:
movs r0, 0x3
movs r1, 0
movs r2, 0
bl lcd_bg_operations
bl SetAnimBgAttribute
movs r0, 0x3
movs r1, 0x1
movs r2, 0x1
bl lcd_bg_operations
bl SetAnimBgAttribute
b _080A6DE8
_080A6DD4:
movs r0, 0x3
movs r1, 0
movs r2, 0x1
bl lcd_bg_operations
bl SetAnimBgAttribute
movs r0, 0x3
movs r1, 0x1
movs r2, 0
bl lcd_bg_operations
bl SetAnimBgAttribute
_080A6DE8:
pop {r0}
bx r0
@ -2934,7 +2934,7 @@ sub_80A7270: @ 80A7270
cmp r0, 0
bne _080A72A6
adds r0, r7, 0
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A72B4
@ -3372,7 +3372,7 @@ _080A75F6:
_080A7602:
cmp r7, 0
beq _080A7614
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
adds r1, r0, 0
adds r1, 0x10
@ -3383,7 +3383,7 @@ _080A7614:
mov r0, r8
cmp r0, 0
beq _080A7628
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
adds r1, r0, 0
adds r1, 0x10
@ -3394,11 +3394,11 @@ _080A7628:
mov r0, r9
cmp r0, 0
beq _080A764E
ldr r6, =gAnimationBankAttacker
ldr r6, =gAnimBankAttacker
ldrb r0, [r6]
movs r5, 0x2
eors r0, r5
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A764E
@ -3413,11 +3413,11 @@ _080A764E:
mov r0, r10
cmp r0, 0
beq _080A7674
ldr r6, =gAnimationBankTarget
ldr r6, =gAnimBankTarget
ldrb r0, [r6]
movs r5, 0x2
eors r0, r5
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A7674
@ -3499,7 +3499,7 @@ _080A76F2:
bl GetBankByIdentity
lsls r0, 24
lsrs r0, 24
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A771A
@ -3517,7 +3517,7 @@ _080A771A:
bl GetBankByIdentity
lsls r0, 24
lsrs r0, 24
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A7746
@ -3537,7 +3537,7 @@ _080A7746:
bl GetBankByIdentity
lsls r0, 24
lsrs r0, 24
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A7772
@ -3558,7 +3558,7 @@ _080A7772:
bl GetBankByIdentity
lsls r0, 24
lsrs r0, 24
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A77A0
@ -3670,7 +3670,7 @@ _080A7838:
_080A7842:
adds r0, r5, 0
bl sub_80A69CC
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -3682,7 +3682,7 @@ _080A7842:
_080A785C:
ldrh r0, [r6, 0x8]
strh r0, [r5, 0x2E]
ldr r4, =gAnimationBankTarget
ldr r4, =gAnimBankTarget
ldrb r0, [r4]
movs r1, 0x2
bl sub_80A5C6C
@ -3701,7 +3701,7 @@ _080A785C:
strh r0, [r5, 0x36]
ldr r0, =sub_80A6EEC
str r0, [r5, 0x1C]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
pop {r4-r7}
@ -3716,7 +3716,7 @@ sub_80A78AC: @ 80A78AC
adds r6, r0, 0
movs r1, 0x1
bl sub_80A69CC
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -3730,7 +3730,7 @@ _080A78CC:
ldr r4, =gBattleAnimArgs
ldrh r0, [r4, 0x8]
strh r0, [r6, 0x2E]
ldr r5, =gAnimationBankTarget
ldr r5, =gAnimBankTarget
ldrb r0, [r5]
movs r1, 0x2
bl sub_80A5C6C
@ -3768,7 +3768,7 @@ sub_80A791C: @ 80A791C
cmp r0, 0
beq _080A7930
adds r0, r4, 0
bl move_anim_8072740
bl DestroyAnimSprite
_080A7930:
pop {r4}
pop {r0}
@ -3799,17 +3799,17 @@ _080A7954:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80A69CC
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
b _080A7976
.pool
_080A796C:
adds r0, r5, 0
adds r1, r4, 0
bl sub_80A6980
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
_080A7976:
ldrb r6, [r0]
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -3844,7 +3844,7 @@ _080A798E:
strh r0, [r5, 0x36]
ldr r0, =sub_80A6EEC
str r0, [r5, 0x1C]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
adds r0, r5, 0
bl StoreSpriteCallbackInData6
pop {r4-r7}
@ -4070,7 +4070,7 @@ _080A7B60:
cmp r1, r0
bne _080A7B90
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080A7B90:
pop {r4,r5}
pop {r0}
@ -4090,7 +4090,7 @@ sub_80A7B98: @ 80A7B98
cmp r3, 0xFF
bne _080A7BBC
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080A7BE2
.pool
_080A7BBC:
@ -4210,7 +4210,7 @@ _080A7C78:
b _080A7CAC
_080A7CA6:
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080A7CAC:
pop {r4,r5}
pop {r0}
@ -4230,7 +4230,7 @@ sub_80A7CB4: @ 80A7CB4
cmp r2, 0xFF
bne _080A7CD8
adds r0, r4, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
b _080A7CEE
.pool
_080A7CD8:
@ -4554,7 +4554,7 @@ _080A7F42:
lsls r0, 24
cmp r0, 0
beq _080A7F78
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r0, [r0, 0x18]
ldrh r2, [r0]
@ -4807,7 +4807,7 @@ sub_80A8140: @ 80A8140
push {lr}
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gHappinessMoveAnim
ldr r0, =gAnimFriendship
ldrb r0, [r0]
movs r1, 0
cmp r0, 0x1E
@ -4823,7 +4823,7 @@ _080A815E:
ldr r0, =gBattleAnimArgs
strh r1, [r0, 0xE]
adds r0, r2, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
pop {r0}
bx r0
.pool
@ -4837,9 +4837,9 @@ sub_80A8174: @ 80A8174
lsls r0, 24
lsrs r4, r0, 24
adds r7, r4, 0
ldr r6, =gAnimationBankTarget
ldr r6, =gAnimBankTarget
ldrb r0, [r6]
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A81B4
@ -4863,10 +4863,10 @@ sub_80A8174: @ 80A8174
orrs r0, r2
strb r0, [r1, 0x5]
_080A81B4:
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
mov r8, r0
ldrb r0, [r0]
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A81EC
@ -4894,7 +4894,7 @@ _080A81EC:
ldrb r0, [r6]
movs r5, 0x2
eors r0, r5
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A8224
@ -4922,7 +4922,7 @@ _080A8224:
mov r1, r8
ldrb r0, [r1]
eors r0, r5
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A825C
@ -4968,7 +4968,7 @@ _080A8286:
lsls r0, r5, 24
lsrs r4, r0, 24
adds r0, r4, 0
bl b_side_obj__get_some_boolean
bl IsAnimBankSpriteVisible
lsls r0, 24
cmp r0, 0
beq _080A82C8
@ -5416,7 +5416,7 @@ sub_80A861C: @ 80A861C
lsls r0, 24
cmp r0, 0
beq _080A86C4
ldr r0, =gUnknown_02039F34
ldr r0, =gContestResources
ldr r0, [r0]
ldr r2, [r0, 0x18]
ldrb r1, [r2, 0x4]
@ -5941,7 +5941,7 @@ sub_80A8A6C: @ 80A8A6C
push {r4,lr}
adds r4, r0, 0
bl sub_80A6838
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -5998,7 +5998,7 @@ _080A8AB6:
sub_80A8AEC: @ 80A8AEC
push {r4,lr}
adds r4, r0, 0
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -6054,7 +6054,7 @@ sub_80A8B64: @ 80A8B64
push {r4,lr}
adds r4, r0, 0
bl sub_80A6838
ldr r0, =gAnimationBankAttacker
ldr r0, =gAnimBankAttacker
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -6081,7 +6081,7 @@ _080A8B9C:
strh r0, [r4, 0x22]
ldr r0, =sub_80A67D8
str r0, [r4, 0x1C]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4}
@ -6106,7 +6106,7 @@ sub_80A8BC4: @ 80A8BC4
lsrs r0, 24
movs r6, 0
strh r0, [r5, 0x8]
ldr r7, =gAnimationBankAttacker
ldr r7, =gAnimBankAttacker
ldrb r0, [r7]
bl GetBankSide
lsls r0, 24
@ -6283,7 +6283,7 @@ _080A8D58:
ldr r0, =0x00002771
bl FreeSpritePaletteByTag
adds r0, r5, 0
bl move_anim_task_del
bl DestroyAnimVisualTask
_080A8D6C:
pop {r4,r5}
pop {r0}
@ -6389,7 +6389,7 @@ _080A8E26:
sub_80A8E30: @ 80A8E30
push {r4,r5,lr}
adds r5, r0, 0
ldr r4, =gAnimationBankAttacker
ldr r4, =gAnimBankAttacker
ldrb r0, [r4]
movs r1, 0x2
bl sub_80A5C6C
@ -6465,7 +6465,7 @@ _080A8EC4:
cmp r0, r1
bge _080A8EDC
adds r0, r4, 0
bl move_anim_8072740
bl DestroyAnimSprite
_080A8EDC:
pop {r4,r5}
pop {r0}
@ -6487,7 +6487,7 @@ sub_80A8EE4: @ 80A8EE4
ldrh r1, [r4, 0x22]
adds r0, r1
strh r0, [r4, 0x36]
ldr r0, =gAnimationBankTarget
ldr r0, =gAnimBankTarget
ldrb r0, [r0]
bl GetBankSide
lsls r0, 24
@ -6514,7 +6514,7 @@ _080A8F32:
strh r0, [r4, 0x22]
ldr r0, =sub_80A6EEC
str r0, [r4, 0x1C]
ldr r1, =move_anim_8072740
ldr r1, =DestroyAnimSprite
adds r0, r4, 0
bl StoreSpriteCallbackInData6
pop {r4,r5}

View File

@ -6,7 +6,7 @@
gUnknown_082C8D64:: @ 82C8D64
.incbin "baserom.gba", 0x2c8d64, 0x8
gUnknown_082C8D6C:: @ 82C8D6C
gBattleAnims_Moves:: @ 82C8D6C
.incbin "baserom.gba", 0x2c8d6c, 0x590
gUnknown_082C92FC:: @ 82C92FC

View File

@ -294,7 +294,7 @@ gUnknown_08524B3C:: @ 8524B3C
.byte 0x00, 0x87, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
.align 2
gUnknown_08524B44:: @ 8524B44
gBattleAnimPicTable:: @ 8524B44
obj_tiles 0x08c02538, 0x0200, 0x2710
obj_tiles 0x08c1c6e0, 0x0300, 0x2711
obj_tiles 0x08c20784, 0x0200, 0x2712
@ -597,6 +597,8 @@ gUnknown_085253AC:: @ 85253AC
obj_tiles 0x08c0a3ec, 0x1000, 0x282f
obj_tiles 0x08c1bee4, 0x0100, 0x2830
.align 2
gBattleAnimPaletteTable:: @ 852544C
obj_pal 0x08c028cc, 0x2710
obj_pal 0x08c1c794, 0x2711
obj_pal 0x08c20868, 0x2712
@ -930,18 +932,18 @@ gUnknown_08525D54:: @ 8525D54
.4byte 0x08c25bec, 0x08d91074, 0x08c27324
.align 2
gUnknown_08525E98:: @ 8525E98
.4byte ma00_load_graphics
.4byte ma01_080728D0
.4byte ma02_instanciate_template
.4byte sub_80A3ECC
.4byte ma04_wait_countdown
.4byte sub_80A3F88
.4byte nullsub_6
.4byte nullsub_7
.4byte sub_80A3FC4
.4byte ma09_play_sound
.4byte sub_80A41D8
sScriptCmdTable:: @ 8525E98
.4byte ScriptCmd_loadspritegfx
.4byte ScriptCmd_unloadspritegfx
.4byte ScriptCmd_createsprite
.4byte ScriptCmd_createvisualtask
.4byte ScriptCmd_delay
.4byte ScriptCmd_waitforvisualfinish
.4byte ScriptCmd_hang1
.4byte ScriptCmd_hang2
.4byte ScriptCmd_end
.4byte ScriptCmd_playse
.4byte ScriptCmd_monbg
.4byte ma0B_0807324C
.4byte ma0C_set_BLDCNT_to_x3F40_and_BLDALPHA_to_argument
.4byte ma0D_reset_BLDCNT_and_BLDALPHA

48
include/battle_anim.h Normal file
View File

@ -0,0 +1,48 @@
#ifndef GUARD_BATTLE_ANIM_H
#define GUARD_BATTLE_ANIM_H
enum
{
ANIM_BANK_ATTACKER,
ANIM_BANK_TARGET,
ANIM_BANK_ATK_PARTNER,
ANIM_BANK_DEF_PARTNER,
};
enum
{
BG_ANIM_SCREEN_SIZE,
BG_ANIM_AREA_OVERFLOW_MODE,
BG_ANIM2,
BG_ANIM3,
BG_ANIM_PRIORITY,
BG_ANIM_5,
BG_ANIM_6
};
struct UnknownAnimStruct2
{
void *unk0;
u16 *unk4;
u8 unk8;
u8 unk9;
u16 unkA;
u16 unkC;
};
void ClearBattleAnimationVars(void);
void DoMoveAnim(u16 move);
void DoBattleAnim(const u8 *const animsTable[], u16 tableId, bool8 isMoveAnim);
void DestroyAnimSprite(struct Sprite *sprite);
void DestroyAnimVisualTask(u8 taskId);
void DestroyAnimSoundTask(u8 taskId);
bool8 IsAnimBankSpriteVisible(u8 bank);
void sub_80A438C(u8 bank, bool8 toBG_2, bool8 setSpriteInvisible);
bool8 IsContest(void);
// battle_anim_80FE840.s
void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value);
void sub_8118FBC(u8 arg0, u8 arg1, u8 arg2, u8 bankIdentity, u8 arg4, void *arg5, u16 *arg6, u16 arg7);
#endif // GUARD_BATTLE_ANIM_H

View File

@ -24,5 +24,6 @@ void SetHealthboxSpriteVisible(u8 healthboxSpriteId);
void SetHealthboxSpriteInvisible(u8 healthboxSpriteId);
void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId);
void nullsub_30(u8 healthboxSpriteId, bool8 isDoubleBattleBankOnly);
void sub_8072A88(u8 arg0);
#endif // GUARD_BATTLE_INTERFACE_H

View File

@ -1,7 +1,8 @@
#ifndef GUARD_CONTEST_H
#define GUARD_CONTEST_H
struct ContestStruct_02039E00 {
struct ContestStruct_02039E00
{
u16 unk_00;
u8 unk_02[11];
u8 unk_0d[8];
@ -11,8 +12,29 @@ struct ContestStruct_02039E00 {
extern struct ContestStruct_02039E00 gUnknown_02039E00[4];
extern u8 gUnknown_02039F24;
extern EWRAM_DATA u16 gScriptContestCategory;
extern EWRAM_DATA u8 gUnknown_02039F2E;
extern EWRAM_DATA u8 gUnknown_02039F30;
extern u16 gScriptContestCategory;
extern u8 gUnknown_02039F2E;
extern u8 gUnknown_02039F30;
struct ContestStruct_field_18
{
// unknown size
u16 field_0;
};
struct ContestResources
{
void *field_0;
void *field_4;
void *field_8;
void *field_C;
void *field_10;
void *field_14;
struct ContestStruct_field_18 *field_18;
};
extern struct ContestResources *gContestResources;
bool8 IsSpeciesNotUnown(u16 species);
#endif //GUARD_CONTEST_H

View File

@ -8,7 +8,7 @@ void LZDecompressVram(const void *src, void *dest);
u16 LoadCompressedObjectPic(const struct CompressedSpriteSheet *src);
void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
bool8 LoadCompressedObjectPicUsingHeap(struct CompressedSpriteSheet* src);
bool8 LoadCompressedObjectPicUsingHeap(const struct CompressedSpriteSheet* src);
void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src);
void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer);

View File

@ -251,7 +251,7 @@ void BuildOamBuffer(void);
u8 CreateSprite(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
u8 CreateSpriteAtEnd(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
u8 CreateInvisibleSprite(void (*callback)(struct Sprite *));
u8 CreateSpriteAndAnimate(struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
u8 CreateSpriteAndAnimate(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
void DestroySprite(struct Sprite *sprite);
void ResetOamRange(u8 a, u8 b);
void LoadOam(void);

View File

@ -113,6 +113,7 @@ SECTIONS {
src/tileset_anims.o(.text);
src/palette.o(.text);
src/sound.o(.text);
src/battle_anim.o(.text);
asm/battle_anim.o(.text);
asm/rom_80A5C6C.o(.text);
src/task.o(.text);

650
src/battle_anim.c Normal file
View File

@ -0,0 +1,650 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "sprite.h"
#include "contest.h"
#include "m4a.h"
#include "pokemon.h"
#include "battle_interface.h"
#include "task.h"
#include "decompress.h"
#include "sound.h"
#include "dma3.h"
#include "bg.h"
#include "gpu_regs.h"
#include "palette.h"
// sprites start at 10000 and thus must be subtracted of 10000 to account for the true index.
#define GET_TRUE_SPRITE_INDEX(i) ((i - 10000))
#define SCRIPT_READ_32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24)
#define SCRIPT_READ_32_(ptr) (((ptr)[0]) + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
#define SCRIPT_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8))
#define SCRIPT_READ_16_(ptr) ((ptr)[0] + ((ptr)[1] << 8))
#define ANIM_SPRITE_INDEX_COUNT 8
#define ANIM_ARGS_COUNT 8
extern u8 gBankAttacker;
extern u8 gBankTarget;
extern u16 gBattle_WIN0H;
extern u16 gBattle_WIN0V;
extern u16 gBattle_WIN1H;
extern u16 gBattle_WIN1V;
extern u16 gBattle_BG1_X;
extern u16 gBattle_BG1_Y;
extern u16 gBattle_BG2_X;
extern u16 gBattle_BG2_Y;
extern u16 gBattlePartyID[BATTLE_BANKS_COUNT];
extern u8 gBankSpriteIds[BATTLE_BANKS_COUNT];
extern struct MusicPlayerInfo gMPlay_BGM;
extern struct MusicPlayerInfo gMPlay_SE1;
extern struct MusicPlayerInfo gMPlay_SE2;
EWRAM_DATA const u8 *gBattleAnimScriptPtr = NULL;
EWRAM_DATA const u8 *gBattleAnimScriptRetAddr = NULL;
EWRAM_DATA void (*gAnimScriptCallback)(void) = NULL;
EWRAM_DATA s8 gAnimFramesToWait = 0;
EWRAM_DATA bool8 gAnimScriptActive = FALSE;
EWRAM_DATA u8 gAnimVisualTaskCount = 0;
EWRAM_DATA u8 gAnimSoundTaskCount = 0;
EWRAM_DATA struct DisableStruct *gAnimDisableStructPtr = NULL;
EWRAM_DATA u32 gAnimMoveDmg = 0;
EWRAM_DATA u16 gAnimMovePower = 0;
EWRAM_DATA u16 gAnimSpriteIndexArray[ANIM_SPRITE_INDEX_COUNT] = {0};
EWRAM_DATA u8 gAnimFriendship = 0;
EWRAM_DATA u16 gWeatherMoveAnim = 0;
EWRAM_DATA s16 gBattleAnimArgs[ANIM_ARGS_COUNT] = {0};
EWRAM_DATA u16 gSoundAnimFramesToWait = 0;
EWRAM_DATA u8 gMonAnimTaskIdArray[2] = {0};
EWRAM_DATA u8 gUnknown_02038432 = 0;
EWRAM_DATA u8 gUnknown_02038433 = 0;
EWRAM_DATA u16 gAnimMoveIndex = 0; // set but unused.
EWRAM_DATA u8 gAnimBankAttacker = 0;
EWRAM_DATA u8 gAnimBankTarget = 0;
EWRAM_DATA u16 gAnimSpeciesByBanks[BATTLE_BANKS_COUNT] = {0};
EWRAM_DATA u8 gUnknown_02038440 = 0;
extern void (* const sScriptCmdTable[])(void);
extern const u16 gUnknown_082C8D64[];
extern const u8 * const gBattleAnims_Moves[];
extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
extern void sub_80A8278(void); // rom_80A5C6C.s
extern void sub_80A6B30(struct UnknownAnimStruct2*); // rom_80A5C6C.s
extern void sub_80A6B90(struct UnknownAnimStruct2*, u32 arg1); // rom_80A5C6C.s
extern u8 sub_80A82E4(u8 bank); // rom_80A5C6C.s
extern u8 sub_80A5C6C(u8 bank, u8 attributeId); // rom_80A5C6C.s
extern bool8 AnimBankSpriteExists(u8 bank); // rom_80A5C6C.s
// this file's functions
void RunAnimScriptCommand(void);
void task_pA_ma0A_obj_to_bg_pal(u8 taskId);
void sub_80A46A0(void);
void ClearBattleAnimationVars(void)
{
s32 i;
gAnimFramesToWait = 0;
gAnimScriptActive = FALSE;
gAnimVisualTaskCount = 0;
gAnimSoundTaskCount = 0;
gAnimDisableStructPtr = NULL;
gAnimMoveDmg = 0;
gAnimMovePower = 0;
gAnimFriendship = 0;
// clear index array.
for (i = 0; i < ANIM_SPRITE_INDEX_COUNT; i++)
gAnimSpriteIndexArray[i] |= 0xFFFF;
// clear anim args.
for (i = 0; i < ANIM_ARGS_COUNT; i++)
gBattleAnimArgs[i] = 0;
gMonAnimTaskIdArray[0] = 0xFF;
gMonAnimTaskIdArray[1] = 0xFF;
gUnknown_02038432 = 0;
gUnknown_02038433 = 0;
gAnimMoveIndex = 0;
gAnimBankAttacker = 0;
gAnimBankTarget = 0;
gUnknown_02038440 = 0;
}
void DoMoveAnim(u16 move)
{
gAnimBankAttacker = gBankAttacker;
gAnimBankTarget = gBankTarget;
DoBattleAnim(gBattleAnims_Moves, move, TRUE);
}
void DoBattleAnim(const u8 *const animsTable[], u16 tableId, bool8 isMoveAnim)
{
s32 i;
if (!IsContest())
{
sub_80A8278();
sub_8072A88(0);
for (i = 0; i < BATTLE_BANKS_COUNT; i++)
{
if (GetBankSide(i) != 0)
gAnimSpeciesByBanks[i] = GetMonData(&gEnemyParty[gBattlePartyID[i]], MON_DATA_SPECIES);
else
gAnimSpeciesByBanks[i] = GetMonData(&gPlayerParty[gBattlePartyID[i]], MON_DATA_SPECIES);
}
}
else
{
for (i = 0; i < 4; i++)
gAnimSpeciesByBanks[i] = gContestResources->field_18->field_0;
}
if (!isMoveAnim)
gAnimMoveIndex = 0;
else
gAnimMoveIndex = tableId;
for (i = 0; i < ANIM_ARGS_COUNT; i++)
gBattleAnimArgs[i] = 0;
gMonAnimTaskIdArray[0] = 0xFF;
gMonAnimTaskIdArray[1] = 0xFF;
gBattleAnimScriptPtr = animsTable[tableId];
gAnimScriptActive = TRUE;
gAnimFramesToWait = 0;
gAnimScriptCallback = RunAnimScriptCommand;
for (i = 0; i < ANIM_SPRITE_INDEX_COUNT; i++)
gAnimSpriteIndexArray[i] |= 0xFFFF;
if (isMoveAnim)
{
for (i = 0; gUnknown_082C8D64[i] != 0xFFFF; i++)
{
if (tableId == gUnknown_082C8D64[i])
{
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 128);
break;
}
}
}
gBattle_WIN0H = 0;
gBattle_WIN0V = 0;
gBattle_WIN1H = 0;
gBattle_WIN1V = 0;
}
void DestroyAnimSprite(struct Sprite *sprite)
{
FreeSpriteOamMatrix(sprite);
DestroySprite(sprite);
gAnimVisualTaskCount--;
}
void DestroyAnimVisualTask(u8 taskId)
{
DestroyTask(taskId);
gAnimVisualTaskCount--;
}
void DestroyAnimSoundTask(u8 taskId)
{
DestroyTask(taskId);
gAnimSoundTaskCount--;
}
/*static*/ void AddSpriteIndex(u16 index)
{
s32 i;
for (i = 0; i < ANIM_SPRITE_INDEX_COUNT; i++)
{
if (gAnimSpriteIndexArray[i] == 0xFFFF)
{
gAnimSpriteIndexArray[i] = index;
return;
}
}
}
/*static*/ void ClearSpriteIndex(u16 index)
{
s32 i;
for (i = 0; i < ANIM_SPRITE_INDEX_COUNT; i++)
{
if (gAnimSpriteIndexArray[i] == index)
{
gAnimSpriteIndexArray[i] |= 0xFFFF;
return;
}
}
}
/*static*/ void WaitAnimFrameCount(void)
{
if (gAnimFramesToWait <= 0)
{
gAnimScriptCallback = RunAnimScriptCommand;
gAnimFramesToWait = 0;
}
else
{
gAnimFramesToWait--;
}
}
/*static*/ void RunAnimScriptCommand(void)
{
do
{
sScriptCmdTable[gBattleAnimScriptPtr[0]]();
} while (gAnimFramesToWait == 0 && gAnimScriptActive);
}
/*static*/ void ScriptCmd_loadspritegfx(void)
{
u16 index;
gBattleAnimScriptPtr++;
index = SCRIPT_READ_16(gBattleAnimScriptPtr);
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(index)]);
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(index)]);
gBattleAnimScriptPtr += 2;
AddSpriteIndex(GET_TRUE_SPRITE_INDEX(index));
gAnimFramesToWait = 1;
gAnimScriptCallback = WaitAnimFrameCount;
}
/*static*/ void ScriptCmd_unloadspritegfx(void)
{
u16 index;
gBattleAnimScriptPtr++;
index = SCRIPT_READ_16(gBattleAnimScriptPtr);
FreeSpriteTilesByTag(gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(index)].tag);
FreeSpritePaletteByTag(gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(index)].tag);
gBattleAnimScriptPtr += 2;
ClearSpriteIndex(GET_TRUE_SPRITE_INDEX(index));
}
/*static*/ void ScriptCmd_createsprite(void)
{
s32 i;
const struct SpriteTemplate *template;
u8 argVar;
u8 argsCount;
s16 subpriority;
gBattleAnimScriptPtr++;
template = (const struct SpriteTemplate *)(SCRIPT_READ_32_(gBattleAnimScriptPtr));
gBattleAnimScriptPtr += 4;
argVar = gBattleAnimScriptPtr[0];
gBattleAnimScriptPtr++;
argsCount = gBattleAnimScriptPtr[0];
gBattleAnimScriptPtr++;
for (i = 0; i < argsCount; i++)
{
gBattleAnimArgs[i] = SCRIPT_READ_16(gBattleAnimScriptPtr);
gBattleAnimScriptPtr += 2;
}
if (argVar & 0x80)
{
argVar ^= 0x80;
if (argVar >= 0x40)
argVar -= 0x40;
else
argVar *= -1;
subpriority = sub_80A82E4(gAnimBankTarget) + (s8)(argVar);
}
else
{
if (argVar >= 0x40)
argVar -= 0x40;
else
argVar *= -1;
subpriority = sub_80A82E4(gAnimBankAttacker) + (s8)(argVar);
}
if (subpriority < 3)
subpriority = 3;
CreateSpriteAndAnimate(template, sub_80A5C6C(gAnimBankTarget, 2), sub_80A5C6C(gAnimBankTarget, 3), subpriority);
gAnimVisualTaskCount++;
}
/*static*/ void ScriptCmd_createvisualtask(void)
{
TaskFunc taskFunc;
u8 taskPriority;
u8 taskId;
u8 numArgs;
s32 i;
gBattleAnimScriptPtr++;
taskFunc = (TaskFunc)SCRIPT_READ_32_(gBattleAnimScriptPtr);
gBattleAnimScriptPtr += 4;
taskPriority = gBattleAnimScriptPtr[0];
gBattleAnimScriptPtr++;
numArgs = gBattleAnimScriptPtr[0];
gBattleAnimScriptPtr++;
for (i = 0; i < numArgs; i++)
{
gBattleAnimArgs[i] = SCRIPT_READ_16(gBattleAnimScriptPtr);
gBattleAnimScriptPtr += 2;
}
taskId = CreateTask(taskFunc, taskPriority);
taskFunc(taskId);
gAnimVisualTaskCount++;
}
/*static*/ void ScriptCmd_delay(void)
{
gBattleAnimScriptPtr++;
gAnimFramesToWait = gBattleAnimScriptPtr[0];
if (gAnimFramesToWait == 0)
gAnimFramesToWait = -1;
gBattleAnimScriptPtr++;
gAnimScriptCallback = WaitAnimFrameCount;
}
// wait for visual tasks to finish.
/*static*/ void ScriptCmd_waitforvisualfinish(void)
{
if (gAnimVisualTaskCount == 0)
{
gBattleAnimScriptPtr++;
gAnimFramesToWait = 0;
}
else
{
gAnimFramesToWait = 1;
}
}
/*static*/ void ScriptCmd_hang1(void)
{
}
/*static*/ void ScriptCmd_hang2(void)
{
}
/*static*/ void ScriptCmd_end(void)
{
s32 i;
bool32 continuousAnim = FALSE;
// keep waiting as long as there is animations to be done.
if (gAnimVisualTaskCount != 0 || gAnimSoundTaskCount != 0
|| gMonAnimTaskIdArray[0] != 0xFF || gMonAnimTaskIdArray[1] != 0xFF)
{
gSoundAnimFramesToWait = 0;
gAnimFramesToWait = 1;
return;
}
// finish the sound effects.
if (IsSEPlaying())
{
if (++gSoundAnimFramesToWait <= 90) // wait 90 frames, then halt the sound effect.
{
gAnimFramesToWait = 1;
return;
}
else
{
m4aMPlayStop(&gMPlay_SE1);
m4aMPlayStop(&gMPlay_SE2);
}
}
// the SE has halted, so set the SE Frame Counter to 0 and continue.
gSoundAnimFramesToWait = 0;
for (i = 0; i < ANIM_SPRITE_INDEX_COUNT; i++)
{
if (gAnimSpriteIndexArray[i] != 0xFFFF)
{
FreeSpriteTilesByTag(gBattleAnimPicTable[gAnimSpriteIndexArray[i]].tag);
FreeSpritePaletteByTag(gBattleAnimPicTable[gAnimSpriteIndexArray[i]].tag);
gAnimSpriteIndexArray[i] |= 0xFFFF; // set terminator.
}
}
if (!continuousAnim) // may have been used for debug?
{
m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 256);
if (!IsContest())
{
sub_80A8278();
sub_8072A88(1);
}
gAnimScriptActive = FALSE;
}
}
/*static*/ void ScriptCmd_playse(void)
{
gBattleAnimScriptPtr++;
PlaySE(SCRIPT_READ_16(gBattleAnimScriptPtr));
gBattleAnimScriptPtr += 2;
}
#define t1_MONBG_BANK 0
#define t1_MON_IN_BG2 1
#define t1_CREATE_ANOTHER_TASK 2
#define t1_IS_SECONDMON_BG 3
#define t2_BANK_SPRITE_ID 0
#define t2_MON_IN_BG2 5
#define t2_MONBG_BANK 6
/*static*/ void sub_80A40F4(u8 taskId)
{
u8 newTaskId;
s16 *selfData = gTasks[taskId].data;
u8 bankSpriteId = gBankSpriteIds[selfData[t1_MONBG_BANK]];
gSprites[bankSpriteId].invisible = 1;
if (!selfData[t1_CREATE_ANOTHER_TASK])
{
DestroyAnimVisualTask(taskId);
return;
}
newTaskId = CreateTask(task_pA_ma0A_obj_to_bg_pal, 10);
gTasks[newTaskId].data[t2_BANK_SPRITE_ID] = bankSpriteId;
gTasks[newTaskId].data[1] = gSprites[bankSpriteId].pos1.x + gSprites[bankSpriteId].pos2.x;
gTasks[newTaskId].data[2] = gSprites[bankSpriteId].pos1.y + gSprites[bankSpriteId].pos2.y;
if (!selfData[t1_MON_IN_BG2])
{
gTasks[newTaskId].data[3] = gBattle_BG1_X;
gTasks[newTaskId].data[4] = gBattle_BG1_Y;
}
else
{
gTasks[newTaskId].data[3] = gBattle_BG2_X;
gTasks[newTaskId].data[4] = gBattle_BG2_Y;
}
gTasks[newTaskId].data[t2_MON_IN_BG2] = selfData[t1_MON_IN_BG2];
gTasks[newTaskId].data[t2_MONBG_BANK] = selfData[t1_MONBG_BANK];
gMonAnimTaskIdArray[selfData[t1_IS_SECONDMON_BG]] = newTaskId;
DestroyAnimVisualTask(taskId);
}
/*static*/ void ScriptCmd_monbg(void)
{
bool8 toBG_2;
u8 taskId;
u8 bank;
u8 animBank;
gBattleAnimScriptPtr++;
animBank = gBattleAnimScriptPtr[0];
if (animBank & ANIM_BANK_TARGET)
bank = gAnimBankTarget;
else
bank = gAnimBankAttacker;
if (IsAnimBankSpriteVisible(bank))
{
u8 identity = GetBankIdentity(bank);
if (identity == IDENTITY_OPPONENT_MON1 || identity == IDENTITY_PLAYER_MON2 || IsContest())
toBG_2 = FALSE;
else
toBG_2 = TRUE;
sub_80A438C(bank, toBG_2, FALSE);
taskId = CreateTask(sub_80A40F4, 10);
gAnimVisualTaskCount++;
gTasks[taskId].data[t1_MONBG_BANK] = bank;
gTasks[taskId].data[t1_MON_IN_BG2] = toBG_2;
gTasks[taskId].data[t1_CREATE_ANOTHER_TASK] = TRUE;
gTasks[taskId].data[t1_IS_SECONDMON_BG] = 0;
}
bank ^= BIT_MON;
if (IsAnimBankSpriteVisible(bank))
{
u8 identity = GetBankIdentity(bank);
if (identity == IDENTITY_OPPONENT_MON1 || identity == IDENTITY_PLAYER_MON2 || IsContest())
toBG_2 = FALSE;
else
toBG_2 = TRUE;
sub_80A438C(bank, toBG_2, FALSE);
taskId = CreateTask(sub_80A40F4, 10);
gAnimVisualTaskCount++;
gTasks[taskId].data[0] = bank;
gTasks[taskId].data[1] = toBG_2;
gTasks[taskId].data[t1_CREATE_ANOTHER_TASK] = TRUE;
gTasks[taskId].data[t1_IS_SECONDMON_BG] = 1;
}
gBattleAnimScriptPtr++;
gAnimFramesToWait = 1;
gAnimScriptCallback = WaitAnimFrameCount;
}
bool8 IsAnimBankSpriteVisible(u8 bank)
{
if (IsContest())
{
if (bank == gAnimBankAttacker)
return TRUE;
else
return FALSE;
}
if (!AnimBankSpriteExists(bank))
return FALSE;
if (IsContest())
return TRUE; // this line wont ever be reached.
if (!gBattleSpritesDataPtr->bankData[bank].invisible || !gSprites[gBankSpriteIds[bank]].invisible)
return TRUE;
return FALSE;
}
void sub_80A438C(u8 bank, bool8 toBG_2, bool8 setSpriteInvisible)
{
struct UnknownAnimStruct2 unknownStruct;
u8 bankSpriteId;
if (!toBG_2)
{
u8 bankIdentity;
if (IsContest() == TRUE)
{
RequestDma3Fill(0, (void*)(VRAM + 0x8000), 0x2000, 1);
RequestDma3Fill(0xFF, (void*)(VRAM + 0xF000), 0x1000, 0);
}
else
{
RequestDma3Fill(0, (void*)(VRAM + 0x4000), 0x2000, 1);
RequestDma3Fill(0xFF, (void*)(VRAM + 0xe000), 0x1000, 0);
}
sub_80A6B30(&unknownStruct);
CpuFill16(0, unknownStruct.unk0, 0x1000);
CpuFill16(0xFF, unknownStruct.unk4, 0x800);
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 2);
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 1);
SetAnimBgAttribute(1, BG_ANIM_AREA_OVERFLOW_MODE, 0);
bankSpriteId = gBankSpriteIds[bank];
gBattle_BG1_X = -(gSprites[bankSpriteId].pos1.x + gSprites[bankSpriteId].pos2.x) + 0x20;
if (IsContest() && IsSpeciesNotUnown(gContestResources->field_18->field_0))
gBattle_BG1_X--;
gBattle_BG1_Y = -(gSprites[bankSpriteId].pos1.y + gSprites[bankSpriteId].pos2.y) + 0x20;
if (setSpriteInvisible)
gSprites[gBankSpriteIds[bank]].invisible = 1;
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
LoadPalette(&gPlttBufferUnfaded[0x100 + bank * 16], unknownStruct.unk8 * 16, 0x20);
CpuCopy32(&gPlttBufferUnfaded[0x100 + bank * 16], (void*)(BG_PLTT + unknownStruct.unk8 * 32), 0x20);
if (IsContest())
bankIdentity = 0;
else
bankIdentity = GetBankIdentity(bank);
sub_8118FBC(1, 0, 0, bankIdentity, unknownStruct.unk8, unknownStruct.unk0, unknownStruct.unk4, unknownStruct.unkA);
if (IsContest())
sub_80A46A0();
}
else
{
RequestDma3Fill(0, (void*)(VRAM + 0x6000), 0x2000, 1);
RequestDma3Fill(0, (void*)(VRAM + 0xF000), 0x1000, 1);
sub_80A6B90(&unknownStruct, 2);
CpuFill16(0, unknownStruct.unk0 + 0x1000, 0x1000);
CpuFill16(0, unknownStruct.unk4 + 0x400, 0x800);
SetAnimBgAttribute(2, BG_ANIM_PRIORITY, 2);
SetAnimBgAttribute(2, BG_ANIM_SCREEN_SIZE, 1);
SetAnimBgAttribute(2, BG_ANIM_AREA_OVERFLOW_MODE, 0);
bankSpriteId = gBankSpriteIds[bank];
gBattle_BG2_X = -(gSprites[bankSpriteId].pos1.x + gSprites[bankSpriteId].pos2.x) + 0x20;
gBattle_BG2_Y = -(gSprites[bankSpriteId].pos1.y + gSprites[bankSpriteId].pos2.y) + 0x20;
if (setSpriteInvisible)
gSprites[gBankSpriteIds[bank]].invisible = 1;
SetGpuReg(REG_OFFSET_BG2HOFS, gBattle_BG2_X);
SetGpuReg(REG_OFFSET_BG2VOFS, gBattle_BG2_Y);
LoadPalette(&gPlttBufferUnfaded[0x100 + bank * 16], 0x90, 0x20);
CpuCopy32(&gPlttBufferUnfaded[0x100 + bank * 16], (void*)(BG_PLTT + 0x120), 0x20);
sub_8118FBC(2, 0, 0, GetBankIdentity(bank), unknownStruct.unk8, unknownStruct.unk0 + 0x1000, unknownStruct.unk4 + 0x400, unknownStruct.unkA);
}
}

View File

@ -465,7 +465,7 @@ u32 sub_8034974(void* ptr)
return (ptr_[3] << 16) | (ptr_[2] << 8) | (ptr_[1]);
}
bool8 LoadCompressedObjectPicUsingHeap(struct CompressedSpriteSheet* src)
bool8 LoadCompressedObjectPicUsingHeap(const struct CompressedSpriteSheet* src)
{
struct SpriteSheet dest;
void* buffer;

View File

@ -594,7 +594,7 @@ u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y,
return index;
}
u8 CreateSpriteAndAnimate(struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority)
u8 CreateSpriteAndAnimate(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority)
{
u8 i;

View File

@ -713,77 +713,9 @@ gUnknown_02037622: @ 2037622
.include "src/tileset_anims.o"
.include "src/palette.o"
.include "src/sound.o"
.align 0x2
.include "src/battle_anim.o"
gBattleAnimScriptPtr: @ 20383F0
.space 0x4
gBattleAnimScriptRetAddr: @ 20383F4
.space 0x4
gAnimScriptCallback: @ 20383F8
.space 0x4
gAnimFramesToWait: @ 20383FC
.space 0x1
gAnimScriptActive: @ 20383FD
.space 0x1
gAnimVisualTaskCount: @ 20383FE
.space 0x1
gAnimSoundTaskCount: @ 20383FF
.space 0x1
gDisableStructMoveAnim: @ 2038400
.space 0x4
gMoveDmgMoveAnim: @ 2038404
.space 0x4
gMovePowerMoveAnim: @ 2038408
.space 0x2
gAnimSpriteIndexArray: @ 203840A
.space 0x10
gHappinessMoveAnim: @ 203841A
.space 0x2
gWeatherMoveAnim: @ 203841C
.space 0x2
gBattleAnimArgs: @ 203841E
.space 0x10
gSoundAnimFramesToWait: @ 203842E
.space 0x2
gUnknown_02038430: @ 2038430
.space 0x2
gUnknown_02038432: @ 2038432
.space 0x1
gUnknown_02038433: @ 2038433
.space 0x1
gAnimMoveIndex: @ 2038434
.space 0x2
gAnimationBankAttacker: @ 2038436
.space 0x1
gAnimationBankTarget: @ 2038437
.space 0x1
gUnknown_02038438: @ 2038438
.space 0x8
gUnknown_02038440: @ 2038440
.space 0x4
.align 2
gUnknown_02038444: @ 2038444
.space 0x10
@ -1058,7 +990,7 @@ gUnknown_02039F30: @ 2039F30
gUnknown_02039F31: @ 2039F31
.space 0x3
gUnknown_02039F34: @ 2039F34
gContestResources: @ 2039F34
.space 0x4
gUnknown_02039F38: @ 2039F38