Merge pull request #130 from DizzyEggg/decompile_pokeball
Decompile pokeball
@ -5,8 +5,8 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80A5C6C
|
||||
sub_80A5C6C: @ 80A5C6C
|
||||
thumb_func_start GetBankPosition
|
||||
GetBankPosition: @ 80A5C6C
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
@ -154,7 +154,7 @@ _080A5DB0:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80A5C6C
|
||||
thumb_func_end GetBankPosition
|
||||
|
||||
thumb_func_start sub_80A5DB8
|
||||
sub_80A5DB8: @ 80A5DB8
|
||||
@ -577,7 +577,7 @@ _080A611C:
|
||||
_080A6126:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
_080A612E:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
@ -592,7 +592,7 @@ GetBankSpriteDefault_Y: @ 80A6138
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x4
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
@ -611,7 +611,7 @@ GetSubstituteSpriteDefault_Y: @ 80A614C
|
||||
beq _080A6170
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 8
|
||||
movs r1, 0x80
|
||||
@ -620,7 +620,7 @@ GetSubstituteSpriteDefault_Y: @ 80A614C
|
||||
_080A6170:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 8
|
||||
movs r1, 0x88
|
||||
@ -642,7 +642,7 @@ sub_80A6190: @ 80A6190
|
||||
lsrs r5, r0, 24
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
bl IsContest
|
||||
@ -1245,13 +1245,13 @@ sub_80A65EC: @ 80A65EC
|
||||
ldr r5, =gAnimBankTarget
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x32]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x36]
|
||||
@ -1442,13 +1442,13 @@ sub_80A6760: @ 80A6760
|
||||
ldr r5, =gAnimBankAttacker
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x32]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x36]
|
||||
@ -1550,13 +1550,13 @@ sub_80A6838: @ 80A6838
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
@ -1578,13 +1578,13 @@ sub_80A6864: @ 80A6864
|
||||
ldr r7, =gAnimBankAttacker
|
||||
ldrb r0, [r7]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r6, r0
|
||||
@ -1646,8 +1646,8 @@ sub_80A68D4: @ 80A68D4
|
||||
bx r0
|
||||
thumb_func_end sub_80A68D4
|
||||
|
||||
thumb_func_start sub_80A6900
|
||||
sub_80A6900: @ 80A6900
|
||||
thumb_func_start AnimateBallThrow
|
||||
AnimateBallThrow: @ 80A6900
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
@ -1674,7 +1674,7 @@ _080A692E:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80A6900
|
||||
thumb_func_end AnimateBallThrow
|
||||
|
||||
thumb_func_start sub_80A6934
|
||||
sub_80A6934: @ 80A6934
|
||||
@ -3685,7 +3685,7 @@ _080A785C:
|
||||
ldr r4, =gAnimBankTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r6, 0x4]
|
||||
@ -3693,7 +3693,7 @@ _080A785C:
|
||||
strh r0, [r5, 0x32]
|
||||
ldrb r0, [r4]
|
||||
adds r1, r7, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r6, [r6, 0x6]
|
||||
@ -3733,7 +3733,7 @@ _080A78CC:
|
||||
ldr r5, =gAnimBankTarget
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r4, 0x4]
|
||||
@ -3741,7 +3741,7 @@ _080A78CC:
|
||||
strh r0, [r6, 0x32]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r4, 0x6]
|
||||
@ -3763,7 +3763,7 @@ _080A78CC:
|
||||
sub_80A791C: @ 80A791C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080A7930
|
||||
@ -3828,7 +3828,7 @@ _080A798E:
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r2, [r4, 0x4]
|
||||
@ -3836,7 +3836,7 @@ _080A798E:
|
||||
strh r0, [r5, 0x32]
|
||||
adds r0, r6, 0
|
||||
adds r1, r7, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r4, [r4, 0x6]
|
||||
@ -5713,7 +5713,7 @@ _080A88A6:
|
||||
_080A88AE:
|
||||
mov r0, r8
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrb r1, [r4]
|
||||
@ -5722,7 +5722,7 @@ _080A88AE:
|
||||
_080A88C0:
|
||||
mov r0, r8
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrb r1, [r4]
|
||||
@ -5731,7 +5731,7 @@ _080A88C0:
|
||||
_080A88D2:
|
||||
mov r0, r8
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrb r2, [r4]
|
||||
@ -5744,7 +5744,7 @@ _080A88E4:
|
||||
_080A88EA:
|
||||
mov r0, r8
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrb r2, [r4]
|
||||
@ -5757,7 +5757,7 @@ _080A88FC:
|
||||
_080A8902:
|
||||
mov r0, r8
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x1F
|
||||
@ -5798,13 +5798,13 @@ _080A8942:
|
||||
_080A8946:
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
bl IsDoubleBattle
|
||||
@ -5819,12 +5819,12 @@ _080A8946:
|
||||
eors r4, r0
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
mov r0, r8
|
||||
@ -6392,13 +6392,13 @@ sub_80A8E30: @ 80A8E30
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
|
@ -334,7 +334,7 @@ sub_80A9EF4: @ 80A9EF4
|
||||
ldr r4, =gAnimBankTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 8
|
||||
ldr r1, =0xffe00000
|
||||
@ -342,7 +342,7 @@ sub_80A9EF4: @ 80A9EF4
|
||||
lsrs r5, r0, 16
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 8
|
||||
ldr r1, =0xffdc0000
|
||||
|
@ -90,7 +90,7 @@ sub_815A160: @ 815A160
|
||||
ldr r6, =gAnimBankTarget
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 8
|
||||
@ -100,7 +100,7 @@ sub_815A160: @ 815A160
|
||||
asrs r4, 16
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 8
|
||||
@ -210,13 +210,13 @@ sub_815A254: @ 815A254
|
||||
ldr r4, =gAnimBankTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r7, r0, 0
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r6, r0, 0
|
||||
@ -816,7 +816,7 @@ _0815A6F8:
|
||||
sub_815A73C: @ 815A73C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0815A75E
|
||||
@ -1254,13 +1254,13 @@ sub_815AAA4: @ 815AAA4
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
@ -1510,7 +1510,7 @@ _0815ACEC:
|
||||
_0815ACEE:
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r6, [r6, 0x2]
|
||||
@ -1518,7 +1518,7 @@ _0815ACEE:
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
@ -1906,13 +1906,13 @@ sub_815AFF0: @ 815AFF0
|
||||
ldr r6, =gAnimBankAttacker
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0xC]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0xE]
|
||||
@ -2281,13 +2281,13 @@ _0815B2D8:
|
||||
ldr r4, =gAnimBankTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x32]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x36]
|
||||
@ -2373,13 +2373,13 @@ _0815B3BE:
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
@ -2817,7 +2817,7 @@ _0815B71E:
|
||||
ldr r0, =gAnimBankAttacker
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x32]
|
||||
@ -3624,14 +3624,14 @@ _0815BE2E:
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, r5
|
||||
strh r0, [r7, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x20
|
||||
@ -4994,13 +4994,13 @@ sub_815C95C: @ 815C95C
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
@ -5531,13 +5531,13 @@ sub_815CDB4: @ 815CDB4
|
||||
ldr r5, =gAnimBankAttacker
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x20]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x22]
|
||||
@ -5842,13 +5842,13 @@ _0815D05A:
|
||||
ldr r5, =gAnimBankAttacker
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
mov r2, r10
|
||||
lsls r1, r2, 16
|
||||
@ -6840,7 +6840,7 @@ _0815D896:
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r6, 0x2]
|
||||
@ -6848,7 +6848,7 @@ _0815D896:
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r6, [r6, 0x4]
|
||||
@ -7382,13 +7382,13 @@ _0815DCEA:
|
||||
ldrb r4, [r0]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x10]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x12]
|
||||
@ -7789,7 +7789,7 @@ sub_815E01C: @ 815E01C
|
||||
_0815E038:
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
ldr r4, =gBattleAnimArgs
|
||||
lsrs r0, 24
|
||||
@ -7798,7 +7798,7 @@ _0815E038:
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r4, 0x2]
|
||||
@ -7931,7 +7931,7 @@ _0815E14E:
|
||||
bne _0815E188
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
@ -7951,7 +7951,7 @@ _0815E17C:
|
||||
_0815E188:
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
@ -7971,7 +7971,7 @@ _0815E1AC:
|
||||
ldr r5, =gAnimBankAttacker
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
@ -7990,13 +7990,13 @@ _0815E1D0:
|
||||
ldr r4, =gAnimBankTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x22]
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x24]
|
||||
@ -8349,14 +8349,14 @@ sub_815E47C: @ 815E47C
|
||||
mov r10, r0
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r7, 0x1E]
|
||||
mov r1, r10
|
||||
ldrb r0, [r1]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r7, 0x20]
|
||||
@ -8364,14 +8364,14 @@ sub_815E47C: @ 815E47C
|
||||
mov r8, r0
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r7, 0x22]
|
||||
mov r1, r8
|
||||
ldrb r0, [r1]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
mov r1, r8
|
||||
ldrb r0, [r1]
|
||||
@ -8524,7 +8524,7 @@ _0815E5FE:
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
ldrh r0, [r4, 0xC]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xC]
|
||||
@ -8542,7 +8542,7 @@ _0815E634:
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0815E6D2
|
||||
@ -8659,7 +8659,7 @@ _0815E724:
|
||||
strh r1, [r4, 0x3C]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x22]
|
||||
@ -8950,7 +8950,7 @@ _0815E970:
|
||||
_0815E972:
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
@ -9342,7 +9342,7 @@ sub_815EC48: @ 815EC48
|
||||
ldr r5, =gAnimBankAttacker
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
@ -9350,7 +9350,7 @@ sub_815EC48: @ 815EC48
|
||||
movs r0, 0x2
|
||||
eors r0, r1
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r4, r0
|
||||
@ -9771,14 +9771,14 @@ _0815EFEC:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
ldrh r0, [r4, 0x3C]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
_0815F00C:
|
||||
@ -9994,10 +9994,10 @@ sub_815F18C: @ 815F18C
|
||||
ldr r4, =gAnimBankTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
ldrb r0, [r4]
|
||||
bl GetBankSide
|
||||
lsls r0, 24
|
||||
@ -10387,7 +10387,7 @@ _0815F4C8:
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x3
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x22]
|
||||
@ -11180,7 +11180,7 @@ _0815FB50:
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r3, r5, 16
|
||||
@ -11318,7 +11318,7 @@ _0815FC56:
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r4, r0
|
||||
@ -11331,7 +11331,7 @@ _0815FCB4:
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r4, r0
|
||||
@ -11469,7 +11469,7 @@ _0815FD8C:
|
||||
mov r1, r10
|
||||
ldrb r0, [r1]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r3, r5, 0
|
||||
@ -11499,7 +11499,7 @@ _0815FE0C:
|
||||
mov r2, r10
|
||||
ldrb r0, [r2]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r3, r5, 0
|
||||
@ -11566,7 +11566,7 @@ _0815FE92:
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x10
|
||||
@ -11724,14 +11724,14 @@ _08160008:
|
||||
ldr r0, =gAnimBankAttacker
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r5, r0, 0
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r2, r0, 0
|
||||
@ -12169,7 +12169,7 @@ sub_81603A8: @ 81603A8
|
||||
ldr r4, =gAnimBankAttacker
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x20]
|
||||
|
@ -886,7 +886,7 @@ _08170C08:
|
||||
bl GetMonData
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
@ -907,13 +907,13 @@ _08170C44:
|
||||
ldr r5, =gAnimBankAttacker
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
ldr r2, =gSprites
|
||||
@ -934,7 +934,7 @@ _08170C44:
|
||||
mov r0, r8
|
||||
str r0, [sp]
|
||||
adds r0, r4, 0
|
||||
bl sub_8171D98
|
||||
bl LaunchBallStarsTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x1C]
|
||||
@ -950,7 +950,7 @@ _08170C44:
|
||||
ldrb r1, [r5]
|
||||
movs r0, 0
|
||||
mov r3, r8
|
||||
bl sub_81729E8
|
||||
bl LaunchBallFadeMonTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x1E]
|
||||
@ -998,10 +998,10 @@ sub_8170CFC: @ 8170CFC
|
||||
lsrs r4, 24
|
||||
ldr r0, =gLastUsedItem
|
||||
ldrh r0, [r0]
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl sub_8076A78
|
||||
bl LoadBallGfx
|
||||
adds r0, r4, 0
|
||||
bl DestroyAnimVisualTask
|
||||
pop {r4}
|
||||
@ -1018,10 +1018,10 @@ sub_8170D24: @ 8170D24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gLastUsedItem
|
||||
ldrh r0, [r0]
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl sub_8076AE8
|
||||
bl FreeBallGfx
|
||||
adds r0, r4, 0
|
||||
bl DestroyAnimVisualTask
|
||||
pop {r4}
|
||||
@ -1057,8 +1057,8 @@ _08170D74:
|
||||
.pool
|
||||
thumb_func_end sub_8170D4C
|
||||
|
||||
thumb_func_start ball_number_to_ball_processing_index
|
||||
ball_number_to_ball_processing_index: @ 8170D84
|
||||
thumb_func_start ItemIdToBallId
|
||||
ItemIdToBallId: @ 8170D84
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
@ -1123,7 +1123,7 @@ _08170DFC:
|
||||
_08170DFE:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end ball_number_to_ball_processing_index
|
||||
thumb_func_end ItemIdToBallId
|
||||
|
||||
thumb_func_start sub_8170E04
|
||||
sub_8170E04: @ 8170E04
|
||||
@ -1138,14 +1138,14 @@ sub_8170E04: @ 8170E04
|
||||
mov r10, r0
|
||||
ldr r0, =gLastUsedItem
|
||||
ldrh r0, [r0]
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
ldr r1, =gUnknown_0832C588
|
||||
ldr r1, =gBallSpriteTemplates
|
||||
adds r0, r1
|
||||
movs r1, 0x20
|
||||
movs r2, 0x50
|
||||
@ -1166,14 +1166,14 @@ sub_8170E04: @ 8170E04
|
||||
mov r8, r2
|
||||
ldrb r0, [r2]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x30]
|
||||
mov r1, r8
|
||||
ldrb r0, [r1]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
subs r0, 0x10
|
||||
@ -1278,7 +1278,7 @@ _08170F50:
|
||||
_08170F54:
|
||||
ldr r0, =gLastUsedItem
|
||||
ldrh r0, [r0]
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
@ -1294,7 +1294,7 @@ _08170F54:
|
||||
lsls r0, r4, 1
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
ldr r1, =gUnknown_0832C588
|
||||
ldr r1, =gBallSpriteTemplates
|
||||
adds r0, r1
|
||||
adds r1, r6, 0
|
||||
adds r1, 0x20
|
||||
@ -1317,14 +1317,14 @@ _08170F54:
|
||||
mov r8, r1
|
||||
ldrb r0, [r1]
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x30]
|
||||
mov r1, r8
|
||||
ldrb r0, [r1]
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
subs r0, 0x10
|
||||
@ -1487,7 +1487,7 @@ sub_8171134: @ 8171134
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081711D2
|
||||
@ -1532,7 +1532,7 @@ _08171188:
|
||||
str r0, [r4, 0x1C]
|
||||
ldr r0, =gLastUsedItem
|
||||
ldrh r0, [r0]
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0xB
|
||||
@ -1549,13 +1549,13 @@ _08171188:
|
||||
str r5, [sp]
|
||||
movs r2, 0x1
|
||||
movs r3, 0x1C
|
||||
bl sub_8171D98
|
||||
bl LaunchBallStarsTask
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0
|
||||
movs r2, 0xE
|
||||
adds r3, r5, 0
|
||||
bl sub_81729E8
|
||||
bl LaunchBallFadeMonTask
|
||||
_081711D2:
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
@ -2671,7 +2671,7 @@ sub_8171AAC: @ 8171AAC
|
||||
orrs r0, r1
|
||||
strb r0, [r3]
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08171ADC
|
||||
@ -2697,7 +2697,7 @@ sub_8171AE4: @ 8171AE4
|
||||
str r0, [r4, 0x1C]
|
||||
ldr r0, =gLastUsedItem
|
||||
ldrh r0, [r0]
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0xB
|
||||
@ -2714,13 +2714,13 @@ sub_8171AE4: @ 8171AE4
|
||||
str r5, [sp]
|
||||
movs r2, 0x1
|
||||
movs r3, 0x1C
|
||||
bl sub_8171D98
|
||||
bl LaunchBallStarsTask
|
||||
ldr r0, =gAnimBankTarget
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x1
|
||||
movs r2, 0xE
|
||||
adds r3, r5, 0
|
||||
bl sub_81729E8
|
||||
bl LaunchBallFadeMonTask
|
||||
_08171B36:
|
||||
ldr r6, =gSprites
|
||||
ldr r5, =gBankSpriteIds
|
||||
@ -3007,8 +3007,8 @@ _08171D86:
|
||||
.pool
|
||||
thumb_func_end sub_8171D60
|
||||
|
||||
thumb_func_start sub_8171D98
|
||||
sub_8171D98: @ 8171D98
|
||||
thumb_func_start LaunchBallStarsTask
|
||||
LaunchBallStarsTask: @ 8171D98
|
||||
push {r4-r6,lr}
|
||||
mov r6, r10
|
||||
mov r5, r9
|
||||
@ -3070,7 +3070,7 @@ sub_8171D98: @ 8171D98
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_8171D98
|
||||
thumb_func_end LaunchBallStarsTask
|
||||
|
||||
thumb_func_start sub_8171E20
|
||||
sub_8171E20: @ 8171E20
|
||||
@ -4476,8 +4476,8 @@ _081729E2:
|
||||
bx r0
|
||||
thumb_func_end sub_8172944
|
||||
|
||||
thumb_func_start sub_81729E8
|
||||
sub_81729E8: @ 81729E8
|
||||
thumb_func_start LaunchBallFadeMonTask
|
||||
LaunchBallFadeMonTask: @ 81729E8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
@ -4563,7 +4563,7 @@ _08172A7E:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81729E8
|
||||
thumb_func_end LaunchBallFadeMonTask
|
||||
|
||||
thumb_func_start sub_8172AB0
|
||||
sub_8172AB0: @ 8172AB0
|
||||
@ -5234,12 +5234,12 @@ _0817303A:
|
||||
ldrb r0, [r4, 0x8]
|
||||
mov r8, r0
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
mov r0, r8
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
movs r1, 0x1E
|
||||
@ -5579,7 +5579,7 @@ sub_817330C: @ 817330C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
ldr r5, =gBattleAnimArgs
|
||||
lsrs r0, 24
|
||||
@ -5591,7 +5591,7 @@ sub_817330C: @ 817330C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r5, [r5, 0x6]
|
||||
@ -5652,7 +5652,7 @@ _081733C0:
|
||||
sub_81733D4: @ 81733D4
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6900
|
||||
bl AnimateBallThrow
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081733F6
|
||||
|
@ -13829,13 +13829,13 @@ sub_80DEA5C: @ 80DEA5C
|
||||
strh r0, [r4, 0x26]
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x20]
|
||||
movs r0, 0x3
|
||||
movs r1, 0x1
|
||||
bl sub_80A5C6C
|
||||
bl GetBankPosition
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x22]
|
||||
|
@ -68,8 +68,8 @@ GPIOPortReadEnable: @ 80000C8
|
||||
.4byte gAbilityDescriptionPointers
|
||||
.4byte gItems
|
||||
.4byte gBattleMoves
|
||||
.4byte gUnknown_0832C400
|
||||
.4byte gUnknown_0832C460
|
||||
.4byte gBallSpriteSheets
|
||||
.4byte gBallSpritePalettes
|
||||
|
||||
.4byte 0x000000a8, 0x00000864, 0x0000089b
|
||||
|
||||
|
@ -2215,7 +2215,7 @@ sub_8030A70: @ 8030A70
|
||||
str r2, [sp, 0x10]
|
||||
movs r2, 0x70
|
||||
movs r3, 0x3A
|
||||
bl sub_8076438
|
||||
bl CreatePokeballSpriteToReleaseMon
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
|
2861
asm/pokeball.s
@ -1424,16 +1424,16 @@ sub_81C4A08: @ 81C4A08
|
||||
bl GetMonData
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl ball_number_to_ball_processing_index
|
||||
bl ItemIdToBallId
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
bl sub_8076A78
|
||||
bl LoadBallGfx
|
||||
lsls r0, r4, 1
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
ldr r1, =gUnknown_0832C588
|
||||
ldr r1, =gBallSpriteTemplates
|
||||
adds r0, r1
|
||||
movs r1, 0x10
|
||||
movs r2, 0x88
|
||||
|
@ -10445,7 +10445,7 @@ _0807CD1C:
|
||||
str r2, [sp, 0x10]
|
||||
movs r2, 0x78
|
||||
movs r3, 0x54
|
||||
bl sub_8076438
|
||||
bl CreatePokeballSpriteToReleaseMon
|
||||
ldr r0, [r7]
|
||||
adds r0, 0xD3
|
||||
ldrb r1, [r0]
|
||||
@ -12550,7 +12550,7 @@ _0807E168:
|
||||
str r2, [sp, 0x10]
|
||||
movs r2, 0x78
|
||||
movs r3, 0x54
|
||||
bl sub_8076438
|
||||
bl CreatePokeballSpriteToReleaseMon
|
||||
ldr r0, [r7]
|
||||
adds r0, 0xD3
|
||||
ldrb r1, [r0]
|
||||
|
102
data/graphics.s
@ -16,12 +16,108 @@ gUnknown_08C00524:: @ 8C00524
|
||||
.incbin "baserom.gba", 0xc00c10, 0xa34
|
||||
|
||||
gUnknown_08C01644:: @ 8C01644
|
||||
.incbin "baserom.gba", 0xc01644, 0xE0
|
||||
.incbin "baserom.gba", 0xc01644, 0xe0
|
||||
|
||||
gUnknown_08C01724:: @ 8C01724
|
||||
.incbin "baserom.gba", 0xc01724, 0xBDC
|
||||
.incbin "baserom.gba", 0xc01724, 0x18
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_PokeBall::
|
||||
.incbin "graphics/interface/ball/poke.4bpp.lz" @ 0xBC
|
||||
|
||||
gUnknown_08C02300:: @ 8C02300
|
||||
.align 2
|
||||
gInterfacePal_PokeBall::
|
||||
.incbin "graphics/interface/ball/poke.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_GreatBall::
|
||||
.incbin "graphics/interface/ball/great.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_GreatBall::
|
||||
.incbin "graphics/interface/ball/great.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_SafariBall::
|
||||
.incbin "graphics/interface/ball/safari.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_SafariBall::
|
||||
.incbin "graphics/interface/ball/safari.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_UltraBall::
|
||||
.incbin "baserom.gba", 0xC019E0, 0xB4
|
||||
|
||||
.align 2
|
||||
gInterfacePal_UltraBall::
|
||||
.incbin "baserom.gba", 0xC01A94, 0x20
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_MasterBall::
|
||||
.incbin "graphics/interface/ball/master.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_MasterBall::
|
||||
.incbin "graphics/interface/ball/master.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_NetBall::
|
||||
.incbin "graphics/interface/ball/net.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_NetBall::
|
||||
.incbin "graphics/interface/ball/net.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_DiveBall::
|
||||
.incbin "graphics/interface/ball/dive.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_DiveBall::
|
||||
.incbin "graphics/interface/ball/dive.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_NestBall::
|
||||
.incbin "graphics/interface/ball/nest.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_NestBall::
|
||||
.incbin "graphics/interface/ball/nest.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_RepeatBall::
|
||||
.incbin "graphics/interface/ball/repeat.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_RepeatBall::
|
||||
.incbin "graphics/interface/ball/repeat.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_TimerBall::
|
||||
.incbin "graphics/interface/ball/timer.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_TimerBall::
|
||||
.incbin "graphics/interface/ball/timer.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_LuxuryBall::
|
||||
.incbin "graphics/interface/ball/luxury.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_LuxuryBall::
|
||||
.incbin "graphics/interface/ball/luxury.gbapal.lz"
|
||||
|
||||
.align 2
|
||||
gInterfaceGfx_PremierBall::
|
||||
.incbin "graphics/interface/ball/premier.4bpp.lz" @ 0xBC
|
||||
|
||||
.align 2
|
||||
gInterfacePal_PremierBall::
|
||||
.incbin "graphics/interface/ball/premier.gbapal.lz"
|
||||
|
||||
gOpenPokeballGfx:: @ 8C02300
|
||||
.incbin "baserom.gba", 0xc02300, 0x7c
|
||||
|
||||
gUnknown_08C0237C:: @ 8C0237C
|
||||
|
@ -1,14 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_0832C400:: @ 832C400
|
||||
.incbin "baserom.gba", 0x32c400, 0x60
|
||||
|
||||
gUnknown_0832C460:: @ 832C460
|
||||
.incbin "baserom.gba", 0x32c460, 0x128
|
||||
|
||||
gUnknown_0832C588:: @ 832C588
|
||||
.incbin "baserom.gba", 0x32c588, 0x138
|
@ -3,6 +3,9 @@
|
||||
|
||||
.section .rodata
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_0832C6A8:: @ 832C6A8
|
||||
.incbin "baserom.gba", 0x32C6A8, 0x18
|
||||
|
||||
gUnknown_0832C6C0:: @ 832C6C0
|
||||
.incbin "baserom.gba", 0x32c6c0, 0x1fe
|
||||
|
BIN
graphics/interface/ball/dive.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
graphics/interface/ball/great.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
graphics/interface/ball/luxury.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
graphics/interface/ball/master.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
graphics/interface/ball/nest.png
Normal file
After Width: | Height: | Size: 266 B |
BIN
graphics/interface/ball/net.png
Normal file
After Width: | Height: | Size: 246 B |
BIN
graphics/interface/ball/poke.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
graphics/interface/ball/premier.png
Normal file
After Width: | Height: | Size: 289 B |
BIN
graphics/interface/ball/repeat.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
graphics/interface/ball/safari.png
Normal file
After Width: | Height: | Size: 259 B |
BIN
graphics/interface/ball/timer.png
Normal file
After Width: | Height: | Size: 296 B |
@ -933,7 +933,7 @@ struct BattleHealthboxInfo
|
||||
u8 flag_x1 : 1;
|
||||
u8 flag_x2 : 1;
|
||||
u8 flag_x4 : 1;
|
||||
u8 flag_x8 : 1;
|
||||
u8 ballAnimActive : 1; // 0x8
|
||||
u8 statusAnimActive : 1; // x10
|
||||
u8 animFromTableActive : 1; // x20
|
||||
u8 specialAnimActive : 1; //x40
|
||||
|
@ -79,11 +79,22 @@ void HandleIntroSlide(u8 terrainId);
|
||||
|
||||
// battle_anim_80A5C6C.s
|
||||
void sub_80A6EEC(struct Sprite *sprite);
|
||||
void sub_80A68D4(struct Sprite *sprite);
|
||||
void sub_80A6F3C(struct Sprite *sprite);
|
||||
void sub_80A8278(void);
|
||||
void sub_80A6B30(struct UnknownAnimStruct2*);
|
||||
void sub_80A6B90(struct UnknownAnimStruct2*, u32 arg1);
|
||||
u8 sub_80A82E4(u8 bank);
|
||||
u8 sub_80A5C6C(u8 bank, u8 attributeId);
|
||||
bool8 AnimateBallThrow(struct Sprite *sprite);
|
||||
|
||||
enum
|
||||
{
|
||||
BANK_X_POS,
|
||||
BANK_Y_POS,
|
||||
};
|
||||
|
||||
u8 GetBankPosition(u8 bank, u8 attributeId);
|
||||
|
||||
bool8 IsBankSpritePresent(u8 bank);
|
||||
void sub_80A6C68(u8 arg0);
|
||||
u8 GetAnimBankSpriteId(u8 wantedBank);
|
||||
@ -99,4 +110,9 @@ u8 GetSubstituteSpriteDefault_Y(u8 bank);
|
||||
// battle_anim_80A9C70.s
|
||||
void LaunchStatusAnimation(u8 bank, u8 statusAnimId);
|
||||
|
||||
// battle_anim_8170478.s
|
||||
u8 ItemIdToBallId(u16 itemId);
|
||||
u8 LaunchBallStarsTask(u8 x, u8 y, u8 kindOfStars, u8 arg3, u8 ballId);
|
||||
u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 bank, u32 arg2, u8 ballId);
|
||||
|
||||
#endif // GUARD_BATTLE_ANIM_H
|
||||
|
@ -5,6 +5,32 @@
|
||||
#ifndef GUARD_GRAPHICS_H
|
||||
#define GUARD_GRAPHICS_H
|
||||
|
||||
extern const u8 gInterfaceGfx_PokeBall[];
|
||||
extern const u8 gInterfacePal_PokeBall[];
|
||||
extern const u8 gInterfaceGfx_GreatBall[];
|
||||
extern const u8 gInterfacePal_GreatBall[];
|
||||
extern const u8 gInterfaceGfx_SafariBall[];
|
||||
extern const u8 gInterfacePal_SafariBall[];
|
||||
extern const u8 gInterfaceGfx_UltraBall[];
|
||||
extern const u8 gInterfacePal_UltraBall[];
|
||||
extern const u8 gInterfaceGfx_MasterBall[];
|
||||
extern const u8 gInterfacePal_MasterBall[];
|
||||
extern const u8 gInterfaceGfx_NetBall[];
|
||||
extern const u8 gInterfacePal_NetBall[];
|
||||
extern const u8 gInterfaceGfx_DiveBall[];
|
||||
extern const u8 gInterfacePal_DiveBall[];
|
||||
extern const u8 gInterfaceGfx_NestBall[];
|
||||
extern const u8 gInterfacePal_NestBall[];
|
||||
extern const u8 gInterfaceGfx_RepeatBall[];
|
||||
extern const u8 gInterfacePal_RepeatBall[];
|
||||
extern const u8 gInterfaceGfx_TimerBall[];
|
||||
extern const u8 gInterfacePal_TimerBall[];
|
||||
extern const u8 gInterfaceGfx_LuxuryBall[];
|
||||
extern const u8 gInterfacePal_LuxuryBall[];
|
||||
extern const u8 gInterfaceGfx_PremierBall[];
|
||||
extern const u8 gInterfacePal_PremierBall[];
|
||||
extern const u8 gOpenPokeballGfx[];
|
||||
|
||||
extern const u8 gItemIcon_QuestionMark[];
|
||||
extern const u8 gItemIconPalette_QuestionMark[];
|
||||
extern const u8 gUnknown_08DB7AA0[];
|
||||
|
@ -1,8 +1,32 @@
|
||||
#ifndef GUARD_POKEBALL_H
|
||||
#define GUARD_POKEBALL_H
|
||||
|
||||
u8 sub_80753E8(u16, u8);
|
||||
enum
|
||||
{
|
||||
BALL_POKE,
|
||||
BALL_GREAT,
|
||||
BALL_SAFARI,
|
||||
BALL_ULTRA,
|
||||
BALL_MASTER,
|
||||
BALL_NET,
|
||||
BALL_DIVE,
|
||||
BALL_NEST,
|
||||
BALL_REPEAT,
|
||||
BALL_TIMER,
|
||||
BALL_LUXURY,
|
||||
BALL_PREMIER,
|
||||
POKEBALL_COUNT
|
||||
};
|
||||
|
||||
#define POKEBALL_PLAYER_SENDOUT 0xFF
|
||||
#define POKEBALL_OPPONENT_SENDOUT 0xFE
|
||||
|
||||
u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow);
|
||||
void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 bank, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h, u16 species);
|
||||
u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h);
|
||||
void sub_8076918(u8 bank);
|
||||
void DoHitAnimHealthboxEffect(u8 bank);
|
||||
void LoadBallGfx(u8 ballId);
|
||||
void FreeBallGfx(u8 ballId);
|
||||
|
||||
#endif // GUARD_POKEBALL_H
|
||||
|
@ -195,14 +195,7 @@ struct Sprite
|
||||
/*0x2D*/ u8 animLoopCounter;
|
||||
|
||||
// general purpose data fields
|
||||
/*0x2E*/ s16 data0;
|
||||
/*0x30*/ s16 data1;
|
||||
/*0x32*/ s16 data2;
|
||||
/*0x34*/ s16 data3;
|
||||
/*0x36*/ s16 data4;
|
||||
/*0x38*/ s16 data5;
|
||||
/*0x3A*/ s16 data6;
|
||||
/*0x3C*/ s16 data7;
|
||||
/*0x2E*/ s16 data[8];
|
||||
|
||||
/*0x3E*/ u16 inUse:1; //1
|
||||
u16 coordOffsetEnabled:1; //2
|
||||
|
@ -81,7 +81,7 @@ SECTIONS {
|
||||
src/egg_hatch.o(.text);
|
||||
src/battle_interface.o(.text);
|
||||
asm/smokescreen.o(.text);
|
||||
asm/pokeball.o(.text);
|
||||
src/pokeball.o(.text);
|
||||
src/load_save.o(.text);
|
||||
asm/trade.o(.text);
|
||||
src/berry_blender.o(.text);
|
||||
@ -345,7 +345,7 @@ SECTIONS {
|
||||
src/egg_hatch.o(.rodata);
|
||||
src/battle_gfx_sfx_util.o(.rodata);
|
||||
src/battle_interface.o(.rodata);
|
||||
data/pokeball.o(.rodata);
|
||||
src/pokeball.o(.rodata);
|
||||
data/trade.o(.rodata);
|
||||
src/berry_blender.o(.rodata);
|
||||
src/new_game.o(.rodata);
|
||||
|
126
src/battle_2.c
@ -1620,7 +1620,7 @@ void CB2_QuitRecordedBattle(void)
|
||||
|
||||
void sub_8038528(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data0 = 0;
|
||||
sprite->data[0] = 0;
|
||||
sprite->callback = sub_8038538;
|
||||
}
|
||||
|
||||
@ -1628,42 +1628,42 @@ static void sub_8038538(struct Sprite *sprite)
|
||||
{
|
||||
u16 *arr = (u16*)(gDecompressionBuffer);
|
||||
|
||||
switch (sprite->data0)
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data0++;
|
||||
sprite->data1 = 0;
|
||||
sprite->data2 = 0x281;
|
||||
sprite->data3 = 0;
|
||||
sprite->data4 = 1;
|
||||
sprite->data[0]++;
|
||||
sprite->data[1] = 0;
|
||||
sprite->data[2] = 0x281;
|
||||
sprite->data[3] = 0;
|
||||
sprite->data[4] = 1;
|
||||
// fall through
|
||||
case 1:
|
||||
sprite->data4--;
|
||||
if (sprite->data4 == 0)
|
||||
sprite->data[4]--;
|
||||
if (sprite->data[4] == 0)
|
||||
{
|
||||
s32 i;
|
||||
s32 r2;
|
||||
s32 r0;
|
||||
|
||||
sprite->data4 = 2;
|
||||
r2 = sprite->data1 + sprite->data3 * 32;
|
||||
r0 = sprite->data2 - sprite->data3 * 32;
|
||||
sprite->data[4] = 2;
|
||||
r2 = sprite->data[1] + sprite->data[3] * 32;
|
||||
r0 = sprite->data[2] - sprite->data[3] * 32;
|
||||
for (i = 0; i < 29; i += 2)
|
||||
{
|
||||
arr[r2 + i] = 0x3D;
|
||||
arr[r0 + i] = 0x3D;
|
||||
}
|
||||
sprite->data3++;
|
||||
if (sprite->data3 == 21)
|
||||
sprite->data[3]++;
|
||||
if (sprite->data[3] == 21)
|
||||
{
|
||||
sprite->data0++;
|
||||
sprite->data1 = 32;
|
||||
sprite->data[0]++;
|
||||
sprite->data[1] = 32;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
sprite->data1--;
|
||||
if (sprite->data1 == 20)
|
||||
sprite->data[1]--;
|
||||
if (sprite->data[1] == 20)
|
||||
SetMainCallback2(CB2_InitBattle);
|
||||
break;
|
||||
}
|
||||
@ -1824,12 +1824,12 @@ void nullsub_17(void)
|
||||
|
||||
static void sub_8038B04(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data0 != 0)
|
||||
sprite->pos1.x = sprite->data1 + ((sprite->data2 & 0xFF00) >> 8);
|
||||
if (sprite->data[0] != 0)
|
||||
sprite->pos1.x = sprite->data[1] + ((sprite->data[2] & 0xFF00) >> 8);
|
||||
else
|
||||
sprite->pos1.x = sprite->data1 - ((sprite->data2 & 0xFF00) >> 8);
|
||||
sprite->pos1.x = sprite->data[1] - ((sprite->data[2] & 0xFF00) >> 8);
|
||||
|
||||
sprite->data2 += 0x180;
|
||||
sprite->data[2] += 0x180;
|
||||
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
@ -2382,8 +2382,8 @@ u32 sub_80397C4(u32 setId, u32 tableId)
|
||||
return gUnknown_0831ABA0[setId][tableId].width * 8;
|
||||
}
|
||||
|
||||
#define tBank data0
|
||||
#define tSpeciesId data2
|
||||
#define tBank data[0]
|
||||
#define tSpeciesId data[2]
|
||||
|
||||
void oac_poke_opponent(struct Sprite *sprite)
|
||||
{
|
||||
@ -2431,20 +2431,20 @@ void SpriteCallbackDummy_2(struct Sprite *sprite)
|
||||
|
||||
static void sub_80398BC(struct Sprite *sprite) // unused?
|
||||
{
|
||||
sprite->data3 = 6;
|
||||
sprite->data4 = 1;
|
||||
sprite->data[3] = 6;
|
||||
sprite->data[4] = 1;
|
||||
sprite->callback = sub_80398D0;
|
||||
}
|
||||
|
||||
static void sub_80398D0(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data4--;
|
||||
if (sprite->data4 == 0)
|
||||
sprite->data[4]--;
|
||||
if (sprite->data[4] == 0)
|
||||
{
|
||||
sprite->data4 = 8;
|
||||
sprite->data[4] = 8;
|
||||
sprite->invisible ^= 1;
|
||||
sprite->data3--;
|
||||
if (sprite->data3 == 0)
|
||||
sprite->data[3]--;
|
||||
if (sprite->data[3] == 0)
|
||||
{
|
||||
sprite->invisible = FALSE;
|
||||
sprite->callback = SpriteCallbackDummy_2;
|
||||
@ -2495,8 +2495,8 @@ void sub_8039934(struct Sprite *sprite)
|
||||
yOffset = gMonFrontPicCoords[species].y_offset;
|
||||
}
|
||||
|
||||
sprite->data3 = 8 - yOffset / 8;
|
||||
sprite->data4 = 1;
|
||||
sprite->data[3] = 8 - yOffset / 8;
|
||||
sprite->data[4] = 1;
|
||||
sprite->callback = sub_8039A48;
|
||||
}
|
||||
|
||||
@ -2504,20 +2504,20 @@ static void sub_8039A48(struct Sprite *sprite)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
sprite->data4--;
|
||||
if (sprite->data4 == 0)
|
||||
sprite->data[4]--;
|
||||
if (sprite->data[4] == 0)
|
||||
{
|
||||
sprite->data4 = 2;
|
||||
sprite->data[4] = 2;
|
||||
sprite->pos2.y += 8;
|
||||
sprite->data3--;
|
||||
if (sprite->data3 < 0)
|
||||
sprite->data[3]--;
|
||||
if (sprite->data[3] < 0)
|
||||
{
|
||||
FreeSpriteOamMatrix(sprite);
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 *dst = (u8 *)gMonSpritesGfxPtr->sprites[GetBankIdentity(sprite->tBank)] + (gBattleMonForms[sprite->tBank] << 11) + (sprite->data3 << 8);
|
||||
u8 *dst = (u8 *)gMonSpritesGfxPtr->sprites[GetBankIdentity(sprite->tBank)] + (gBattleMonForms[sprite->tBank] << 11) + (sprite->data[3] << 8);
|
||||
|
||||
for (i = 0; i < 0x100; i++)
|
||||
*(dst++) = 0;
|
||||
@ -2529,25 +2529,25 @@ static void sub_8039A48(struct Sprite *sprite)
|
||||
|
||||
void sub_8039AD8(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data3 = 8;
|
||||
sprite->data4 = sprite->invisible;
|
||||
sprite->data[3] = 8;
|
||||
sprite->data[4] = sprite->invisible;
|
||||
sprite->callback = sub_8039AF4;
|
||||
}
|
||||
|
||||
static void sub_8039AF4(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data3--;
|
||||
if (sprite->data3 == 0)
|
||||
sprite->data[3]--;
|
||||
if (sprite->data[3] == 0)
|
||||
{
|
||||
sprite->invisible ^= 1;
|
||||
sprite->data3 = 8;
|
||||
sprite->data[3] = 8;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8039B2C(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = sprite->data4;
|
||||
sprite->data4 = FALSE;
|
||||
sprite->invisible = sprite->data[4];
|
||||
sprite->data[4] = FALSE;
|
||||
sprite->callback = SpriteCallbackDummy_2;
|
||||
}
|
||||
|
||||
@ -2577,7 +2577,7 @@ static void oac_poke_ally_(struct Sprite *sprite)
|
||||
if (sprite->pos2.x == 0)
|
||||
{
|
||||
sprite->callback = SpriteCallbackDummy_3;
|
||||
sprite->data1 = 0;
|
||||
sprite->data[1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2595,8 +2595,8 @@ void sub_8039C00(struct Sprite *sprite)
|
||||
{
|
||||
if (!(gUnknown_020243FC & 1))
|
||||
{
|
||||
sprite->pos2.x += sprite->data1;
|
||||
sprite->pos2.y += sprite->data2;
|
||||
sprite->pos2.x += sprite->data[1];
|
||||
sprite->pos2.y += sprite->data[2];
|
||||
}
|
||||
}
|
||||
|
||||
@ -2622,19 +2622,19 @@ void dp11b_obj_instanciate(u8 bank, u8 b, s8 c, s8 d)
|
||||
spriteId2 = gHealthBoxesIds[bank];
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].field_2 = bounceHealthBoxSpriteId;
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2 = 1;
|
||||
gSprites[bounceHealthBoxSpriteId].data0 = 0x80;
|
||||
gSprites[bounceHealthBoxSpriteId].data[0] = 0x80;
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteId2 = gBankSpriteIds[bank];
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].field_3 = bounceHealthBoxSpriteId;
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4 = 1;
|
||||
gSprites[bounceHealthBoxSpriteId].data0 = 0xC0;
|
||||
gSprites[bounceHealthBoxSpriteId].data[0] = 0xC0;
|
||||
}
|
||||
gSprites[bounceHealthBoxSpriteId].data1 = c;
|
||||
gSprites[bounceHealthBoxSpriteId].data2 = d;
|
||||
gSprites[bounceHealthBoxSpriteId].data3 = spriteId2;
|
||||
gSprites[bounceHealthBoxSpriteId].data4 = b;
|
||||
gSprites[bounceHealthBoxSpriteId].data[1] = c;
|
||||
gSprites[bounceHealthBoxSpriteId].data[2] = d;
|
||||
gSprites[bounceHealthBoxSpriteId].data[3] = spriteId2;
|
||||
gSprites[bounceHealthBoxSpriteId].data[4] = b;
|
||||
gSprites[spriteId2].pos2.x = 0;
|
||||
gSprites[spriteId2].pos2.y = 0;
|
||||
}
|
||||
@ -2648,7 +2648,7 @@ void dp11b_obj_free(u8 bank, bool8 b)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2)
|
||||
return;
|
||||
|
||||
r4 = gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_2].data3;
|
||||
r4 = gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_2].data[3];
|
||||
DestroySprite(&gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_2]);
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2 = 0;
|
||||
}
|
||||
@ -2657,7 +2657,7 @@ void dp11b_obj_free(u8 bank, bool8 b)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4)
|
||||
return;
|
||||
|
||||
r4 = gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_3].data3;
|
||||
r4 = gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_3].data[3];
|
||||
DestroySprite(&gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_3]);
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4 = 0;
|
||||
}
|
||||
@ -2667,16 +2667,16 @@ void dp11b_obj_free(u8 bank, bool8 b)
|
||||
|
||||
static void SpriteCB_HealthBoxBounce(struct Sprite *sprite)
|
||||
{
|
||||
u8 spriteId = sprite->data3;
|
||||
u8 spriteId = sprite->data[3];
|
||||
s32 var;
|
||||
|
||||
if (sprite->data4 == 1)
|
||||
var = sprite->data0;
|
||||
if (sprite->data[4] == 1)
|
||||
var = sprite->data[0];
|
||||
else
|
||||
var = sprite->data0;
|
||||
var = sprite->data[0];
|
||||
|
||||
gSprites[spriteId].pos2.y = Sin(var, sprite->data2) + sprite->data2;
|
||||
sprite->data0 = (sprite->data0 + sprite->data1) & 0xFF;
|
||||
gSprites[spriteId].pos2.y = Sin(var, sprite->data[2]) + sprite->data[2];
|
||||
sprite->data[0] = (sprite->data[0] + sprite->data[1]) & 0xFF;
|
||||
}
|
||||
|
||||
void sub_8039E44(struct Sprite *sprite)
|
||||
|
@ -423,7 +423,7 @@ static void ScriptCmd_createsprite(void)
|
||||
if (subpriority < 3)
|
||||
subpriority = 3;
|
||||
|
||||
CreateSpriteAndAnimate(template, sub_80A5C6C(gAnimBankTarget, 2), sub_80A5C6C(gAnimBankTarget, 3), subpriority);
|
||||
CreateSpriteAndAnimate(template, GetBankPosition(gAnimBankTarget, 2), GetBankPosition(gAnimBankTarget, 3), subpriority);
|
||||
gAnimVisualTaskCount++;
|
||||
}
|
||||
|
||||
|
@ -310,14 +310,14 @@ static void sub_8064734(void)
|
||||
{
|
||||
bool32 r10 = FALSE;
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x1)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].field_1_x1)
|
||||
{
|
||||
@ -325,7 +325,7 @@ static void sub_8064734(void)
|
||||
}
|
||||
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x80)
|
||||
{
|
||||
@ -465,18 +465,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -527,14 +527,14 @@ static void sub_8064E50(void)
|
||||
|
||||
static void sub_8064F40(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
SetBankEnemyShadowSpriteCallback(gActiveBank, GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES));
|
||||
@ -1163,12 +1163,12 @@ static void LinkOpponentHandleLoadMonSprite(void)
|
||||
sub_806A068(species, GetBankIdentity(gActiveBank));
|
||||
|
||||
gBankSpriteIds[gActiveBank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(gActiveBank, 2),
|
||||
GetBankPosition(gActiveBank, 2),
|
||||
GetBankSpriteDefault_Y(gActiveBank),
|
||||
sub_80A82E4(gActiveBank));
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], gBattleMonForms[gActiveBank]);
|
||||
|
||||
@ -1197,15 +1197,15 @@ static void sub_8066494(u8 bank, bool8 dontClearSubstituteBit)
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(
|
||||
&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
@ -1213,7 +1213,7 @@ static void sub_8066494(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFE);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_OPPONENT_SENDOUT);
|
||||
}
|
||||
|
||||
static void LinkOpponentHandleReturnMonToBall(void)
|
||||
@ -1334,7 +1334,7 @@ static void LinkOpponentHandleDrawTrainerPic(void)
|
||||
sub_80A82E4(gActiveBank));
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineParam = trainerPicId;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
@ -1357,7 +1357,7 @@ static void LinkOpponentHandleTrainerSlide(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 96;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos1.x += 32;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineParam = trainerPicId;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
@ -1369,9 +1369,9 @@ static void LinkOpponentHandleTrainerSlide(void)
|
||||
static void LinkOpponentHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
gBattleBankFunc[gActiveBank] = sub_8064470;
|
||||
@ -1670,7 +1670,7 @@ static void LinkOpponentHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1731,9 +1731,9 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_80676FC);
|
||||
|
@ -267,8 +267,8 @@ static void sub_814B004(void)
|
||||
|
||||
static void sub_814B0E8(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive
|
||||
&& gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& gSprites[gBankSpriteIds[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& ++gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_9 != 1)
|
||||
@ -352,18 +352,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,13 +412,13 @@ static void sub_814B5A8(void)
|
||||
static void sub_814B69C(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
gBattleBankFunc[gActiveBank] = sub_814B5A8;
|
||||
@ -1049,11 +1049,11 @@ static void LinkPartnerHandleLoadMonSprite(void)
|
||||
sub_806A068(species, GetBankIdentity(gActiveBank));
|
||||
|
||||
gBankSpriteIds[gActiveBank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(gActiveBank, 2),
|
||||
GetBankPosition(gActiveBank, 2),
|
||||
GetBankSpriteDefault_Y(gActiveBank),
|
||||
sub_80A82E4(gActiveBank));
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], gBattleMonForms[gActiveBank]);
|
||||
gBattleBankFunc[gActiveBank] = sub_814B290;
|
||||
@ -1080,15 +1080,15 @@ static void sub_814CC98(u8 bank, bool8 dontClearSubstituteBit)
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(
|
||||
&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
@ -1096,7 +1096,7 @@ static void sub_814CC98(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFF);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_PLAYER_SENDOUT);
|
||||
}
|
||||
|
||||
static void LinkPartnerHandleReturnMonToBall(void)
|
||||
@ -1174,7 +1174,7 @@ static void LinkPartnerHandleDrawTrainerPic(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
|
||||
gBattleBankFunc[gActiveBank] = CompleteOnBankSpriteCallbackDummy;
|
||||
@ -1188,9 +1188,9 @@ static void LinkPartnerHandleTrainerSlide(void)
|
||||
static void LinkPartnerHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
gBattleBankFunc[gActiveBank] = sub_814AF54;
|
||||
@ -1211,8 +1211,8 @@ static void LinkPartnerHandleFaintAnimation(void)
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBank].animationState = 0;
|
||||
HandleLowHpMusicChange(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
|
||||
PlaySE12WithPanning(SE_POKE_DEAD, PAN_SIDE_PLAYER);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_8039C00;
|
||||
gBattleBankFunc[gActiveBank] = sub_814B340;
|
||||
}
|
||||
@ -1492,7 +1492,7 @@ static void LinkPartnerHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1554,11 +1554,11 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data5 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[5] = gActiveBank;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_805CC00);
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], 1);
|
||||
|
@ -318,11 +318,11 @@ static void sub_805F560(void)
|
||||
bool32 sp = FALSE;
|
||||
bool32 r10 = FALSE;
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x1)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x1)
|
||||
sub_8172EF0(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) && !(gBattleTypeFlags & BATTLE_TYPE_MULTI) && IsDoubleBattle() && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].field_1_x1)
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) && !(gBattleTypeFlags & BATTLE_TYPE_MULTI) && IsDoubleBattle() && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].field_1_x1)
|
||||
sub_8172EF0(gActiveBank ^ BIT_MON, &gEnemyParty[gBattlePartyID[gActiveBank ^ BIT_MON]]);
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x80)
|
||||
{
|
||||
@ -453,18 +453,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -509,11 +509,11 @@ static void sub_805FD00(void)
|
||||
|
||||
static void sub_805FDF0(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
SetBankEnemyShadowSpriteCallback(gActiveBank, GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES));
|
||||
@ -1151,13 +1151,13 @@ static void OpponentHandleLoadMonSprite(void)
|
||||
sub_806A068(species, GetBankIdentity(gActiveBank));
|
||||
|
||||
gBankSpriteIds[gActiveBank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(gActiveBank, 2),
|
||||
GetBankPosition(gActiveBank, 2),
|
||||
GetBankSpriteDefault_Y(gActiveBank),
|
||||
sub_80A82E4(gActiveBank));
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], gBattleMonForms[gActiveBank]);
|
||||
|
||||
@ -1186,15 +1186,15 @@ static void sub_80613DC(u8 bank, bool8 dontClearSubstituteBit)
|
||||
sub_806A068(species, GetBankIdentity(bank));
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
@ -1203,7 +1203,7 @@ static void sub_80613DC(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFE);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_OPPONENT_SENDOUT);
|
||||
}
|
||||
|
||||
static void OpponentHandleReturnMonToBall(void)
|
||||
@ -1321,7 +1321,7 @@ static void OpponentHandleDrawTrainerPic(void)
|
||||
sub_80A82E4(gActiveBank));
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineParam = trainerPicId;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
@ -1391,7 +1391,7 @@ static void OpponentHandleTrainerSlide(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 96;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos1.x += 32;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineParam = trainerPicId;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
@ -1402,9 +1402,9 @@ static void OpponentHandleTrainerSlide(void)
|
||||
static void OpponentHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
gBattleBankFunc[gActiveBank] = sub_805F240;
|
||||
@ -1815,7 +1815,7 @@ static void OpponentHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1876,9 +1876,9 @@ static void OpponentHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_806280C);
|
||||
|
@ -1023,12 +1023,12 @@ static void sub_8058B40(void)
|
||||
bool32 r9 = FALSE;
|
||||
bool32 r8 = FALSE;
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank ^ BIT_MON, &gPlayerParty[gBattlePartyID[gActiveBank ^ BIT_MON]]);
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x80)
|
||||
{
|
||||
@ -1127,13 +1127,13 @@ static void sub_8058FC0(void)
|
||||
static void sub_805902C(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
UpdateHealthboxAttribute(gHealthBoxesIds[gActiveBank], &gPlayerParty[gBattlePartyID[gActiveBank]], HEALTHBOX_ALL);
|
||||
@ -1431,18 +1431,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2237,15 +2237,15 @@ static void sub_805B258(u8 bank, bool8 dontClearSubstituteBit)
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(
|
||||
&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
@ -2253,7 +2253,7 @@ static void sub_805B258(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFF);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_PLAYER_SENDOUT);
|
||||
}
|
||||
|
||||
static void PlayerHandleReturnMonToBall(void)
|
||||
@ -2358,7 +2358,7 @@ static void PlayerHandleDrawTrainerPic(void)
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.y = 48;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineMode = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].hFlip = 1;
|
||||
@ -2372,7 +2372,7 @@ static void PlayerHandleDrawTrainerPic(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
}
|
||||
|
||||
@ -2411,7 +2411,7 @@ static void PlayerHandleTrainerSlide(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -96;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
|
||||
gBattleBankFunc[gActiveBank] = CompleteOnBankSpriteCallbackDummy2;
|
||||
@ -2420,9 +2420,9 @@ static void PlayerHandleTrainerSlide(void)
|
||||
static void PlayerHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], 1);
|
||||
@ -2444,8 +2444,8 @@ static void PlayerHandleFaintAnimation(void)
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBank].animationState = 0;
|
||||
HandleLowHpMusicChange(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
|
||||
PlaySE12WithPanning(SE_POKE_DEAD, PAN_SIDE_PLAYER);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_8039C00;
|
||||
gBattleBankFunc[gActiveBank] = sub_80596A8;
|
||||
}
|
||||
@ -2902,7 +2902,7 @@ static void PlayerHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -2963,11 +2963,11 @@ static void PlayerHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data5 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[5] = gActiveBank;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_805CC00);
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], 1);
|
||||
@ -2988,7 +2988,7 @@ static void PlayerHandleIntroTrainerBallThrow(void)
|
||||
|
||||
void sub_805CC00(struct Sprite *sprite)
|
||||
{
|
||||
u8 bank = sprite->data5;
|
||||
u8 bank = sprite->data[5];
|
||||
|
||||
FreeSpriteOamMatrix(sprite);
|
||||
FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(sprite->oam.paletteNum));
|
||||
|
@ -282,8 +282,8 @@ static void sub_81BAF48(void)
|
||||
|
||||
static void sub_81BB02C(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive
|
||||
&& gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& gSprites[gBankSpriteIds[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& ++gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_9 != 1)
|
||||
@ -539,18 +539,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -599,13 +599,13 @@ static void sub_81BB9F4(void)
|
||||
static void sub_81BBAE8(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
gBattleBankFunc[gActiveBank] = sub_81BB9F4;
|
||||
@ -1236,11 +1236,11 @@ static void PlayerPartnerHandleLoadMonSprite(void)
|
||||
sub_806A068(species, GetBankIdentity(gActiveBank));
|
||||
|
||||
gBankSpriteIds[gActiveBank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(gActiveBank, 2),
|
||||
GetBankPosition(gActiveBank, 2),
|
||||
GetBankSpriteDefault_Y(gActiveBank),
|
||||
sub_80A82E4(gActiveBank));
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], gBattleMonForms[gActiveBank]);
|
||||
gBattleBankFunc[gActiveBank] = sub_81BB1D4;
|
||||
@ -1267,15 +1267,15 @@ static void sub_81BD0E4(u8 bank, bool8 dontClearSubstituteBit)
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(
|
||||
&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
@ -1283,7 +1283,7 @@ static void sub_81BD0E4(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFF);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_PLAYER_SENDOUT);
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleReturnMonToBall(void)
|
||||
@ -1353,7 +1353,7 @@ static void PlayerPartnerHandleDrawTrainerPic(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
}
|
||||
else // otherwise use front sprite
|
||||
@ -1365,7 +1365,7 @@ static void PlayerPartnerHandleDrawTrainerPic(void)
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.y = 48;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineMode = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].hFlip = 1;
|
||||
@ -1382,9 +1382,9 @@ static void PlayerPartnerHandleTrainerSlide(void)
|
||||
static void PlayerPartnerHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
gBattleBankFunc[gActiveBank] = sub_81BAE98;
|
||||
@ -1405,8 +1405,8 @@ static void PlayerPartnerHandleFaintAnimation(void)
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBank].animationState = 0;
|
||||
HandleLowHpMusicChange(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
|
||||
PlaySE12WithPanning(SE_POKE_DEAD, PAN_SIDE_PLAYER);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_8039C00;
|
||||
gBattleBankFunc[gActiveBank] = sub_81BB78C;
|
||||
}
|
||||
@ -1745,7 +1745,7 @@ static void PlayerPartnerHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1806,11 +1806,11 @@ static void PlayerPartnerHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data5 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[5] = gActiveBank;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_805CC00);
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], 1);
|
||||
|
@ -298,12 +298,12 @@ static void sub_818686C(void)
|
||||
bool32 r9 = FALSE;
|
||||
bool32 r8 = FALSE;
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank ^ BIT_MON, &gEnemyParty[gBattlePartyID[gActiveBank ^ BIT_MON]]);
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x80)
|
||||
{
|
||||
@ -449,18 +449,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,14 +512,14 @@ static void sub_8186F94(void)
|
||||
|
||||
static void sub_8187084(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gEnemyParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
SetBankEnemyShadowSpriteCallback(gActiveBank, GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES));
|
||||
@ -1148,14 +1148,14 @@ static void RecordedOpponentHandleLoadMonSprite(void)
|
||||
sub_806A068(species, GetBankIdentity(gActiveBank));
|
||||
|
||||
gBankSpriteIds[gActiveBank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(gActiveBank, 2),
|
||||
GetBankPosition(gActiveBank, 2),
|
||||
GetBankSpriteDefault_Y(gActiveBank),
|
||||
sub_80A82E4(gActiveBank));
|
||||
|
||||
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], gBattleMonForms[gActiveBank]);
|
||||
|
||||
@ -1183,15 +1183,15 @@ static void sub_81885D8(u8 bank, bool8 dontClearSubstituteBit)
|
||||
sub_806A068(species, GetBankIdentity(bank));
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
@ -1199,7 +1199,7 @@ static void sub_81885D8(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFE);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_OPPONENT_SENDOUT);
|
||||
}
|
||||
|
||||
static void RecordedOpponentHandleReturnMonToBall(void)
|
||||
@ -1285,7 +1285,7 @@ static void RecordedOpponentHandleDrawTrainerPic(void)
|
||||
sub_80A82E4(gActiveBank));
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineParam = trainerPicId;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
@ -1301,9 +1301,9 @@ static void RecordedOpponentHandleTrainerSlide(void)
|
||||
static void RecordedOpponentHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
gBattleBankFunc[gActiveBank] = sub_81865C8;
|
||||
@ -1614,7 +1614,7 @@ static void RecordedOpponentHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1675,9 +1675,9 @@ static void RecordedOpponentHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 280;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_818962C);
|
||||
|
@ -314,19 +314,19 @@ static void sub_8189D40(void)
|
||||
if (GetBankIdentity(gActiveBank) == IDENTITY_PLAYER_MON1)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
{
|
||||
sub_8172EF0(gActiveBank ^ BIT_MON, &gPlayerParty[gBattlePartyID[gActiveBank ^ BIT_MON]]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].field_1_x80)
|
||||
{
|
||||
@ -437,18 +437,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -497,13 +497,13 @@ static void sub_818A37C(void)
|
||||
static void sub_818A470(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
}
|
||||
|
||||
if (gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
{
|
||||
DestroySprite(&gSprites[gUnknown_03005D7C[gActiveBank]]);
|
||||
gBattleBankFunc[gActiveBank] = sub_818A37C;
|
||||
@ -1134,11 +1134,11 @@ static void RecordedPlayerHandleLoadMonSprite(void)
|
||||
sub_806A068(species, GetBankIdentity(gActiveBank));
|
||||
|
||||
gBankSpriteIds[gActiveBank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(gActiveBank, 2),
|
||||
GetBankPosition(gActiveBank, 2),
|
||||
GetBankSpriteDefault_Y(gActiveBank),
|
||||
sub_80A82E4(gActiveBank));
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], gBattleMonForms[gActiveBank]);
|
||||
gBattleBankFunc[gActiveBank] = sub_818A064;
|
||||
@ -1165,15 +1165,15 @@ static void sub_818BA6C(u8 bank, bool8 dontClearSubstituteBit)
|
||||
|
||||
gBankSpriteIds[bank] = CreateSprite(
|
||||
&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
@ -1181,7 +1181,7 @@ static void sub_818BA6C(u8 bank, bool8 dontClearSubstituteBit)
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFF);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_PLAYER_SENDOUT);
|
||||
}
|
||||
|
||||
static void RecordedPlayerHandleReturnMonToBall(void)
|
||||
@ -1272,7 +1272,7 @@ static void RecordedPlayerHandleDrawTrainerPic(void)
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.y = 48;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.affineMode = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].hFlip = 1;
|
||||
@ -1285,7 +1285,7 @@ static void RecordedPlayerHandleDrawTrainerPic(void)
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
}
|
||||
|
||||
@ -1300,9 +1300,9 @@ static void RecordedPlayerHandleTrainerSlide(void)
|
||||
static void RecordedPlayerHandleTrainerSlideBack(void)
|
||||
{
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 35;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], SpriteCallbackDummy);
|
||||
gBattleBankFunc[gActiveBank] = sub_81899F0;
|
||||
@ -1323,8 +1323,8 @@ static void RecordedPlayerHandleFaintAnimation(void)
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBank].animationState = 0;
|
||||
HandleLowHpMusicChange(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank);
|
||||
PlaySE12WithPanning(SE_POKE_DEAD, -64);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = 5;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_8039C00;
|
||||
gBattleBankFunc[gActiveBank] = sub_818A114;
|
||||
}
|
||||
@ -1633,7 +1633,7 @@ static void RecordedPlayerHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1695,11 +1695,11 @@ static void RecordedPlayerHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data5 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[5] = gActiveBank;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_805CC00);
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], 1);
|
||||
|
@ -384,7 +384,7 @@ static void SafariHandleDrawTrainerPic(void)
|
||||
30);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
gBattleBankFunc[gActiveBank] = CompleteOnBankSpriteCallbackDummy;
|
||||
}
|
||||
|
@ -321,13 +321,13 @@ static void CompleteOnChosenItem(void)
|
||||
|
||||
static void sub_816864C(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank, &gPlayerParty[gBattlePartyID[gActiveBank]]);
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8)
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive)
|
||||
sub_8172EF0(gActiveBank ^ BIT_MON, &gPlayerParty[gBattlePartyID[gActiveBank ^ BIT_MON]]);
|
||||
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].flag_x8
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].flag_x8
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBank].ballAnimActive
|
||||
&& !gBattleSpritesDataPtr->healthBoxesData[gActiveBank ^ BIT_MON].ballAnimActive
|
||||
&& gSprites[gUnknown_03005D7C[gActiveBank]].callback == SpriteCallbackDummy
|
||||
&& gSprites[gBankSpriteIds[gActiveBank]].callback == SpriteCallbackDummy)
|
||||
{
|
||||
@ -396,18 +396,18 @@ static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBankSpriteIds[gActiveBank];
|
||||
|
||||
if (gSprites[spriteId].data1 == 32)
|
||||
if (gSprites[spriteId].data[1] == 32)
|
||||
{
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
gSprites[spriteId].invisible = 0;
|
||||
gDoingBattleAnim = FALSE;
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gSprites[spriteId].data1 % 4) == 0)
|
||||
if ((gSprites[spriteId].data[1] % 4) == 0)
|
||||
gSprites[spriteId].invisible ^= 1;
|
||||
gSprites[spriteId].data1++;
|
||||
gSprites[spriteId].data[1]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1073,7 +1073,7 @@ static void WallyHandleDrawTrainerPic(void)
|
||||
30);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = 240;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = -2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
gBattleBankFunc[gActiveBank] = CompleteOnBankSpriteCallbackDummy;
|
||||
}
|
||||
@ -1088,7 +1088,7 @@ static void WallyHandleTrainerSlide(void)
|
||||
30);
|
||||
gSprites[gBankSpriteIds[gActiveBank]].oam.paletteNum = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].pos2.x = -96;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 2;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_805D7AC;
|
||||
gBattleBankFunc[gActiveBank] = CompleteOnBankSpriteCallbackDummy2;
|
||||
}
|
||||
@ -1408,7 +1408,7 @@ static void WallyHandleHitAnimation(void)
|
||||
else
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data1 = 0;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[1] = 0;
|
||||
DoHitAnimHealthboxEffect(gActiveBank);
|
||||
gBattleBankFunc[gActiveBank] = DoHitAnimBlinkSpriteEffect;
|
||||
}
|
||||
@ -1462,11 +1462,11 @@ static void WallyHandleIntroTrainerBallThrow(void)
|
||||
|
||||
oamt_add_pos2_onto_pos1(&gSprites[gBankSpriteIds[gActiveBank]]);
|
||||
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data0 = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data2 = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data4 = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[0] = 50;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[2] = -40;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[4] = gSprites[gBankSpriteIds[gActiveBank]].pos1.y;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].callback = sub_80A6EEC;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data5 = gActiveBank;
|
||||
gSprites[gBankSpriteIds[gActiveBank]].data[5] = gActiveBank;
|
||||
|
||||
StoreSpriteCallbackInData6(&gSprites[gBankSpriteIds[gActiveBank]], sub_805CC00);
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[gActiveBank]], 1);
|
||||
@ -1495,21 +1495,21 @@ static void sub_816AA80(u8 bank)
|
||||
gUnknown_03005D7C[bank] = CreateInvisibleSpriteWithCallback(sub_805D714);
|
||||
sub_806A068(species, GetBankIdentity(bank));
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C,
|
||||
sub_80A5C6C(bank, 2),
|
||||
GetBankPosition(bank, 2),
|
||||
GetBankSpriteDefault_Y(bank),
|
||||
sub_80A82E4(bank));
|
||||
|
||||
gSprites[gUnknown_03005D7C[bank]].data1 = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data2 = bank;
|
||||
gSprites[gUnknown_03005D7C[bank]].data[1] = gBankSpriteIds[bank];
|
||||
gSprites[gUnknown_03005D7C[bank]].data[2] = bank;
|
||||
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = species;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = species;
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
gSprites[gBankSpriteIds[bank]].invisible = TRUE;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
gSprites[gUnknown_03005D7C[bank]].data0 = sub_80753E8(0, 0xFF);
|
||||
gSprites[gUnknown_03005D7C[bank]].data[0] = DoPokeballSendOutAnimation(0, POKEBALL_PLAYER_SENDOUT);
|
||||
}
|
||||
|
||||
static void sub_816AC04(u8 taskId)
|
||||
|
@ -332,7 +332,7 @@ static u16 BattlePalaceGetTargetRetValue(void)
|
||||
|
||||
void sub_805D714(struct Sprite *sprite)
|
||||
{
|
||||
u8 spriteId = sprite->data1;
|
||||
u8 spriteId = sprite->data[1];
|
||||
|
||||
if (!gSprites[spriteId].affineAnimEnded)
|
||||
return;
|
||||
@ -367,7 +367,7 @@ void sub_805D7AC(struct Sprite *sprite)
|
||||
{
|
||||
if (!(gUnknown_020243FC & 1))
|
||||
{
|
||||
sprite->pos2.x += sprite->data0;
|
||||
sprite->pos2.x += sprite->data[0];
|
||||
if (sprite->pos2.x == 0)
|
||||
{
|
||||
if (sprite->pos2.y != 0)
|
||||
@ -1134,7 +1134,7 @@ void sub_805EB9C(u8 affineMode)
|
||||
}
|
||||
}
|
||||
|
||||
#define tBank data0
|
||||
#define tBank data[0]
|
||||
|
||||
void LoadAndCreateEnemyShadowSprites(void)
|
||||
{
|
||||
@ -1143,14 +1143,14 @@ void LoadAndCreateEnemyShadowSprites(void)
|
||||
LoadCompressedObjectPic(&gSpriteSheet_EnemyShadow);
|
||||
|
||||
bank = GetBankByIdentity(IDENTITY_OPPONENT_MON1);
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, sub_80A5C6C(bank, 0), sub_80A5C6C(bank, 1) + 29, 0xC8);
|
||||
gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data0 = bank;
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBankPosition(bank, 0), GetBankPosition(bank, 1) + 29, 0xC8);
|
||||
gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data[0] = bank;
|
||||
|
||||
if (IsDoubleBattle())
|
||||
{
|
||||
bank = GetBankByIdentity(IDENTITY_OPPONENT_MON2);
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, sub_80A5C6C(bank, 0), sub_80A5C6C(bank, 1) + 29, 0xC8);
|
||||
gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data0 = bank;
|
||||
gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, GetBankPosition(bank, 0), GetBankPosition(bank, 1) + 29, 0xC8);
|
||||
gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].shadowSpriteId].data[0] = bank;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -927,7 +927,7 @@ u8 CreateBankHealthboxSprites(u8 bank)
|
||||
data6 = 2;
|
||||
}
|
||||
gSprites[healthboxSpriteId_1].oam.affineParam = healthboxSpriteId_2;
|
||||
gSprites[healthboxSpriteId_2].data5 = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].data[5] = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].callback = sub_8072924;
|
||||
}
|
||||
else
|
||||
@ -939,7 +939,7 @@ u8 CreateBankHealthboxSprites(u8 bank)
|
||||
|
||||
gSprites[healthboxSpriteId_1].oam.affineParam = healthboxSpriteId_2;
|
||||
|
||||
gSprites[healthboxSpriteId_2].data5 = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].data[5] = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].oam.tileNum += 32;
|
||||
gSprites[healthboxSpriteId_2].callback = sub_8072924;
|
||||
|
||||
@ -952,7 +952,7 @@ u8 CreateBankHealthboxSprites(u8 bank)
|
||||
|
||||
gSprites[healthboxSpriteId_1].oam.affineParam = healthboxSpriteId_2;
|
||||
|
||||
gSprites[healthboxSpriteId_2].data5 = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].data[5] = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].oam.tileNum += 32;
|
||||
gSprites[healthboxSpriteId_2].callback = sub_8072924;
|
||||
|
||||
@ -968,14 +968,14 @@ u8 CreateBankHealthboxSprites(u8 bank)
|
||||
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + unkSpritePtr->oam.tileNum * 32), 64);
|
||||
|
||||
gSprites[healthboxSpriteId_1].data5 = unkSpriteId;
|
||||
gSprites[healthboxSpriteId_1].data6 = bank;
|
||||
gSprites[healthboxSpriteId_1].data[5] = unkSpriteId;
|
||||
gSprites[healthboxSpriteId_1].data[6] = bank;
|
||||
gSprites[healthboxSpriteId_1].invisible = 1;
|
||||
|
||||
gSprites[healthboxSpriteId_2].invisible = 1;
|
||||
|
||||
unkSpritePtr->data5 = healthboxSpriteId_1;
|
||||
unkSpritePtr->data6 = data6;
|
||||
unkSpritePtr->data[5] = healthboxSpriteId_1;
|
||||
unkSpritePtr->data[6] = data6;
|
||||
unkSpritePtr->invisible = 1;
|
||||
|
||||
return healthboxSpriteId_1;
|
||||
@ -994,7 +994,7 @@ u8 CreateSafariPlayerHealthboxSprites(void)
|
||||
gSprites[healthboxSpriteId_2].oam.tileNum += 64;
|
||||
|
||||
gSprites[healthboxSpriteId_1].oam.affineParam = healthboxSpriteId_2;
|
||||
gSprites[healthboxSpriteId_2].data5 = healthboxSpriteId_1;
|
||||
gSprites[healthboxSpriteId_2].data[5] = healthboxSpriteId_1;
|
||||
|
||||
gSprites[healthboxSpriteId_2].callback = sub_8072924;
|
||||
|
||||
@ -1008,9 +1008,9 @@ static const u8 *GetHealthboxElementGfxPtr(u8 elementId)
|
||||
|
||||
static void sub_80728B4(struct Sprite *sprite)
|
||||
{
|
||||
u8 var = sprite->data5;
|
||||
u8 var = sprite->data[5];
|
||||
|
||||
switch (sprite->data6)
|
||||
switch (sprite->data[6])
|
||||
{
|
||||
case 0:
|
||||
sprite->pos1.x = gSprites[var].pos1.x + 16;
|
||||
@ -1033,7 +1033,7 @@ static void sub_80728B4(struct Sprite *sprite)
|
||||
|
||||
static void sub_8072924(struct Sprite *sprite)
|
||||
{
|
||||
u8 otherSpriteId = sprite->data5;
|
||||
u8 otherSpriteId = sprite->data[5];
|
||||
|
||||
sprite->pos1.x = gSprites[otherSpriteId].pos1.x + 64;
|
||||
sprite->pos1.y = gSprites[otherSpriteId].pos1.y;
|
||||
@ -1054,14 +1054,14 @@ void SetBattleBarStruct(u8 bank, u8 healthboxSpriteId, s32 maxVal, s32 currVal,
|
||||
void SetHealthboxSpriteInvisible(u8 healthboxSpriteId)
|
||||
{
|
||||
gSprites[healthboxSpriteId].invisible = 1;
|
||||
gSprites[gSprites[healthboxSpriteId].data5].invisible = 1;
|
||||
gSprites[gSprites[healthboxSpriteId].data[5]].invisible = 1;
|
||||
gSprites[gSprites[healthboxSpriteId].oam.affineParam].invisible = 1;
|
||||
}
|
||||
|
||||
void SetHealthboxSpriteVisible(u8 healthboxSpriteId)
|
||||
{
|
||||
gSprites[healthboxSpriteId].invisible = 0;
|
||||
gSprites[gSprites[healthboxSpriteId].data5].invisible = 0;
|
||||
gSprites[gSprites[healthboxSpriteId].data[5]].invisible = 0;
|
||||
gSprites[gSprites[healthboxSpriteId].oam.affineParam].invisible = 0;
|
||||
}
|
||||
|
||||
@ -1074,7 +1074,7 @@ static void UpdateSpritePos(u8 spriteId, s16 x, s16 y)
|
||||
void DestoryHealthboxSprite(u8 healthboxSpriteId)
|
||||
{
|
||||
DestroySprite(&gSprites[gSprites[healthboxSpriteId].oam.affineParam]);
|
||||
DestroySprite(&gSprites[gSprites[healthboxSpriteId].data5]);
|
||||
DestroySprite(&gSprites[gSprites[healthboxSpriteId].data[5]]);
|
||||
DestroySprite(&gSprites[healthboxSpriteId]);
|
||||
}
|
||||
|
||||
@ -1091,7 +1091,7 @@ void UpdateOamPriorityInAllHealthboxes(u8 priority)
|
||||
{
|
||||
u8 healthboxSpriteId_1 = gHealthBoxesIds[i];
|
||||
u8 healthboxSpriteId_2 = gSprites[gHealthBoxesIds[i]].oam.affineParam;
|
||||
u8 healthboxSpriteId_3 = gSprites[gHealthBoxesIds[i]].data5;
|
||||
u8 healthboxSpriteId_3 = gSprites[gHealthBoxesIds[i]].data[5];
|
||||
|
||||
gSprites[healthboxSpriteId_1].oam.priority = priority;
|
||||
gSprites[healthboxSpriteId_2].oam.priority = priority;
|
||||
@ -1156,7 +1156,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, xPos, 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data6) == SIDE_PLAYER)
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data[6]) == SIDE_PLAYER)
|
||||
{
|
||||
objVram = (void*)(OBJ_VRAM0);
|
||||
if (!IsDoubleBattle())
|
||||
@ -1180,7 +1180,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
u8 text[32];
|
||||
void *objVram;
|
||||
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data6) == SIDE_PLAYER && !IsDoubleBattle())
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data[6]) == SIDE_PLAYER && !IsDoubleBattle())
|
||||
{
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
if (maxOrCurrent != HP_CURRENT) // singles, max
|
||||
@ -1213,7 +1213,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
u8 bank;
|
||||
|
||||
memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4));
|
||||
bank = gSprites[healthboxSpriteId].data6;
|
||||
bank = gSprites[healthboxSpriteId].data[6];
|
||||
if (IsDoubleBattle() == TRUE || GetBankSide(bank) == SIDE_OPPONENT)
|
||||
{
|
||||
UpdateHpTextInHealthboxInDoubles(healthboxSpriteId, value, maxOrCurrent);
|
||||
@ -1223,7 +1223,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
u32 var;
|
||||
u8 i;
|
||||
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data6) == SIDE_PLAYER)
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data[6]) == SIDE_PLAYER)
|
||||
{
|
||||
if (maxOrCurrent == HP_CURRENT)
|
||||
var = 29;
|
||||
@ -1258,11 +1258,11 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
u8 text[32];
|
||||
void *objVram;
|
||||
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data6) == SIDE_PLAYER)
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data[6]) == SIDE_PLAYER)
|
||||
{
|
||||
if (gBattleSpritesDataPtr->bankData[gSprites[healthboxSpriteId].data6].hpNumbersNoBars) // don't print text if only bars are visible
|
||||
if (gBattleSpritesDataPtr->bankData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible
|
||||
{
|
||||
spriteTileNum = gSprites[gSprites[healthboxSpriteId].data5].oam.tileNum * 32;
|
||||
spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * 32;
|
||||
objVram = (void*)(OBJ_VRAM0) + spriteTileNum;
|
||||
|
||||
if (maxOrCurrent != HP_CURRENT) // doubles, max hp
|
||||
@ -1292,7 +1292,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
u8 bank;
|
||||
|
||||
memcpy(text, sUnknown_0832C3D8, sizeof(sUnknown_0832C3D8));
|
||||
bank = gSprites[healthboxSpriteId].data6;
|
||||
bank = gSprites[healthboxSpriteId].data[6];
|
||||
|
||||
if (gBattleSpritesDataPtr->bankData[bank].hpNumbersNoBars) // don't print text if only bars are visible
|
||||
{
|
||||
@ -1304,7 +1304,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
if (maxOrCurrent == HP_CURRENT)
|
||||
var = 0;
|
||||
|
||||
r7 = gSprites[healthboxSpriteId].data5;
|
||||
r7 = gSprites[healthboxSpriteId].data[5];
|
||||
txtPtr = ConvertIntToDecimalStringN(text + 6, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
if (!maxOrCurrent)
|
||||
StringCopy(txtPtr, gText_Slash);
|
||||
@ -1354,7 +1354,7 @@ static void sub_80730D4(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
u8 i, var, nature, healthboxSpriteId_2;
|
||||
|
||||
memcpy(text, sUnknown_0832C3C4, sizeof(sUnknown_0832C3C4));
|
||||
barFontGfx = &gMonSpritesGfxPtr->barFontGfx[0x520 + (GetBankIdentity(gSprites[healthboxSpriteId].data6) * 384)];
|
||||
barFontGfx = &gMonSpritesGfxPtr->barFontGfx[0x520 + (GetBankIdentity(gSprites[healthboxSpriteId].data[6]) * 384)];
|
||||
var = 5;
|
||||
nature = GetNature(mon);
|
||||
StringCopy(text + 6, gNatureNamePointers[nature]);
|
||||
@ -1385,7 +1385,7 @@ static void sub_80730D4(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
barFontGfx += 0x20;
|
||||
}
|
||||
|
||||
healthboxSpriteId_2 = gSprites[healthboxSpriteId].data5;
|
||||
healthboxSpriteId_2 = gSprites[healthboxSpriteId].data[5];
|
||||
ConvertIntToDecimalStringN(text + 6, gBattleStruct->field_7C, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
ConvertIntToDecimalStringN(text + 9, gBattleStruct->field_7B, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
text[5] = CHAR_SPACE;
|
||||
@ -1434,7 +1434,7 @@ void SwapHpBarsWithHpText(void)
|
||||
|
||||
if (noBars == TRUE) // bars to text
|
||||
{
|
||||
spriteId = gSprites[gHealthBoxesIds[i]].data5;
|
||||
spriteId = gSprites[gHealthBoxesIds[i]].data[5];
|
||||
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[spriteId].oam.tileNum * 32), 0x100);
|
||||
UpdateHpTextInHealthboxInDoubles(gHealthBoxesIds[i], GetMonData(&gPlayerParty[gBattlePartyID[i]], MON_DATA_HP), HP_CURRENT);
|
||||
@ -1457,7 +1457,7 @@ void SwapHpBarsWithHpText(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteId = gSprites[gHealthBoxesIds[i]].data5;
|
||||
spriteId = gSprites[gHealthBoxesIds[i]].data[5];
|
||||
|
||||
CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[spriteId].oam.tileNum * 32), 0x100);
|
||||
UpdateHpTextInHealthboxInDoubles(gHealthBoxesIds[i], GetMonData(&gEnemyParty[gBattlePartyID[i]], MON_DATA_HP), HP_CURRENT);
|
||||
@ -1472,7 +1472,7 @@ void SwapHpBarsWithHpText(void)
|
||||
UpdateHealthboxAttribute(gHealthBoxesIds[i], &gEnemyParty[gBattlePartyID[i]], HEALTHBOX_NICK);
|
||||
}
|
||||
}
|
||||
gSprites[gHealthBoxesIds[i]].data7 ^= 1;
|
||||
gSprites[gHealthBoxesIds[i]].data[7] ^= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1524,7 +1524,7 @@ u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 ar
|
||||
barSpriteId = CreateSprite(&sStatusSummaryBarSpriteTemplates[isOpponent], bar_X, bar_Y, 10);
|
||||
SetSubspriteTables(&gSprites[barSpriteId], sStatusSummaryBar_SubspriteTable);
|
||||
gSprites[barSpriteId].pos2.x = bar_pos2_X;
|
||||
gSprites[barSpriteId].data0 = bar_data0;
|
||||
gSprites[barSpriteId].data[0] = bar_data0;
|
||||
|
||||
if (isOpponent)
|
||||
{
|
||||
@ -1549,22 +1549,22 @@ u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 ar
|
||||
gSprites[ballIconSpritesIds[i]].pos2.y = 0;
|
||||
}
|
||||
|
||||
gSprites[ballIconSpritesIds[i]].data0 = barSpriteId;
|
||||
gSprites[ballIconSpritesIds[i]].data[0] = barSpriteId;
|
||||
|
||||
if (!isOpponent)
|
||||
{
|
||||
gSprites[ballIconSpritesIds[i]].pos1.x += 10 * i + 24;
|
||||
gSprites[ballIconSpritesIds[i]].data1 = i * 7 + 10;
|
||||
gSprites[ballIconSpritesIds[i]].data[1] = i * 7 + 10;
|
||||
gSprites[ballIconSpritesIds[i]].pos2.x = 120;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSprites[ballIconSpritesIds[i]].pos1.x -= 10 * (5 - i) + 24;
|
||||
gSprites[ballIconSpritesIds[i]].data1 = (6 - i) * 7 + 10;
|
||||
gSprites[ballIconSpritesIds[i]].data[1] = (6 - i) * 7 + 10;
|
||||
gSprites[ballIconSpritesIds[i]].pos2.x = -120;
|
||||
}
|
||||
|
||||
gSprites[ballIconSpritesIds[i]].data2 = isOpponent;
|
||||
gSprites[ballIconSpritesIds[i]].data[2] = isOpponent;
|
||||
}
|
||||
|
||||
if (GetBankSide(bank) == SIDE_PLAYER)
|
||||
@ -1576,7 +1576,7 @@ u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 ar
|
||||
if (partyInfo[i].hp == 0xFFFF) // empty slot or an egg
|
||||
{
|
||||
gSprites[ballIconSpritesIds[i]].oam.tileNum += 1;
|
||||
gSprites[ballIconSpritesIds[i]].data7 = 1;
|
||||
gSprites[ballIconSpritesIds[i]].data[7] = 1;
|
||||
}
|
||||
else if (partyInfo[i].hp == 0) // fainted mon
|
||||
{
|
||||
@ -1595,7 +1595,7 @@ u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 ar
|
||||
if (partyInfo[j].hp == 0xFFFF) // empty slot or an egg
|
||||
{
|
||||
gSprites[ballIconSpritesIds[var]].oam.tileNum += 1;
|
||||
gSprites[ballIconSpritesIds[var]].data7 = 1;
|
||||
gSprites[ballIconSpritesIds[var]].data[7] = 1;
|
||||
var--;
|
||||
continue;
|
||||
}
|
||||
@ -1624,7 +1624,7 @@ u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 ar
|
||||
if (partyInfo[i].hp == 0xFFFF) // empty slot or an egg
|
||||
{
|
||||
gSprites[ballIconSpritesIds[var]].oam.tileNum += 1;
|
||||
gSprites[ballIconSpritesIds[var]].data7 = 1;
|
||||
gSprites[ballIconSpritesIds[var]].data[7] = 1;
|
||||
}
|
||||
else if (partyInfo[i].hp == 0) // fainted mon
|
||||
{
|
||||
@ -1644,7 +1644,7 @@ u8 CreatePartyStatusSummarySprites(u8 bank, struct HpAndStatus *partyInfo, u8 ar
|
||||
if (partyInfo[j].hp == 0xFFFF) // empty slot or an egg
|
||||
{
|
||||
gSprites[ballIconSpritesIds[i]].oam.tileNum += 1;
|
||||
gSprites[ballIconSpritesIds[i]].data7 = 1;
|
||||
gSprites[ballIconSpritesIds[i]].data[7] = 1;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
@ -1714,21 +1714,21 @@ void sub_8073C30(u8 taskId)
|
||||
{
|
||||
if (GetBankSide(bank) != SIDE_PLAYER)
|
||||
{
|
||||
gSprites[sp[5 - i]].data1 = 7 * i;
|
||||
gSprites[sp[5 - i]].data3 = 0;
|
||||
gSprites[sp[5 - i]].data4 = 0;
|
||||
gSprites[sp[5 - i]].data[1] = 7 * i;
|
||||
gSprites[sp[5 - i]].data[3] = 0;
|
||||
gSprites[sp[5 - i]].data[4] = 0;
|
||||
gSprites[sp[5 - i]].callback = sub_8074158;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSprites[sp[i]].data1 = 7 * i;
|
||||
gSprites[sp[i]].data3 = 0;
|
||||
gSprites[sp[i]].data4 = 0;
|
||||
gSprites[sp[i]].data[1] = 7 * i;
|
||||
gSprites[sp[i]].data[3] = 0;
|
||||
gSprites[sp[i]].data[4] = 0;
|
||||
gSprites[sp[i]].callback = sub_8074158;
|
||||
}
|
||||
}
|
||||
gSprites[r10].data0 /= 2;
|
||||
gSprites[r10].data1 = 0;
|
||||
gSprites[r10].data[0] /= 2;
|
||||
gSprites[r10].data[1] = 0;
|
||||
gSprites[r10].callback = sub_8074090;
|
||||
SetSubspriteTables(&gSprites[r10], sUnknown_0832C2CC);
|
||||
gTasks[taskId].func = sub_8073E08;
|
||||
@ -1831,17 +1831,17 @@ static void sub_8073F98(u8 taskId)
|
||||
static void SpriteCB_StatusSummaryBar(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->pos2.x != 0)
|
||||
sprite->pos2.x += sprite->data0;
|
||||
sprite->pos2.x += sprite->data[0];
|
||||
}
|
||||
|
||||
static void sub_8074090(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data1 += 32;
|
||||
if (sprite->data0 > 0)
|
||||
sprite->pos2.x += sprite->data1 >> 4;
|
||||
sprite->data[1] += 32;
|
||||
if (sprite->data[0] > 0)
|
||||
sprite->pos2.x += sprite->data[1] >> 4;
|
||||
else
|
||||
sprite->pos2.x -= sprite->data1 >> 4;
|
||||
sprite->data1 &= 0xF;
|
||||
sprite->pos2.x -= sprite->data[1] >> 4;
|
||||
sprite->data[1] &= 0xF;
|
||||
}
|
||||
|
||||
static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite)
|
||||
@ -1850,16 +1850,16 @@ static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite)
|
||||
u16 var2;
|
||||
s8 pan;
|
||||
|
||||
if (sprite->data1 > 0)
|
||||
if (sprite->data[1] > 0)
|
||||
{
|
||||
sprite->data1--;
|
||||
sprite->data[1]--;
|
||||
return;
|
||||
}
|
||||
|
||||
var1 = sprite->data2;
|
||||
var2 = sprite->data3;
|
||||
var1 = sprite->data[2];
|
||||
var2 = sprite->data[3];
|
||||
var2 += 56;
|
||||
sprite->data3 = var2 & 0xFFF0;
|
||||
sprite->data[3] = var2 & 0xFFF0;
|
||||
|
||||
if (var1 != 0)
|
||||
{
|
||||
@ -1880,7 +1880,7 @@ static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite)
|
||||
if (var1 != 0)
|
||||
pan = PAN_SIDE_PLAYER;
|
||||
|
||||
if (sprite->data7 != 0)
|
||||
if (sprite->data[7] != 0)
|
||||
PlaySE2WithPanning(SE_TB_KARA, pan);
|
||||
else
|
||||
PlaySE1WithPanning(SE_TB_KON, pan);
|
||||
@ -1894,15 +1894,15 @@ static void sub_8074158(struct Sprite *sprite)
|
||||
u8 var1;
|
||||
u16 var2;
|
||||
|
||||
if (sprite->data1 > 0)
|
||||
if (sprite->data[1] > 0)
|
||||
{
|
||||
sprite->data1--;
|
||||
sprite->data[1]--;
|
||||
return;
|
||||
}
|
||||
var1 = sprite->data2;
|
||||
var2 = sprite->data3;
|
||||
var1 = sprite->data[2];
|
||||
var2 = sprite->data[3];
|
||||
var2 += 56;
|
||||
sprite->data3 = var2 & 0xFFF0;
|
||||
sprite->data[3] = var2 & 0xFFF0;
|
||||
if (var1 != 0)
|
||||
sprite->pos2.x += var2 >> 4;
|
||||
else
|
||||
@ -1917,7 +1917,7 @@ static void sub_8074158(struct Sprite *sprite)
|
||||
|
||||
static void SpriteCB_StatusSummaryBallsOnSwitchout(struct Sprite *sprite)
|
||||
{
|
||||
u8 barSpriteId = sprite->data0;
|
||||
u8 barSpriteId = sprite->data[0];
|
||||
|
||||
sprite->pos2.x = gSprites[barSpriteId].pos2.x;
|
||||
sprite->pos2.y = gSprites[barSpriteId].pos2.y;
|
||||
@ -1964,7 +1964,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * 32;
|
||||
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data6) == SIDE_PLAYER)
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data[6]) == SIDE_PLAYER)
|
||||
{
|
||||
sub_8075198((void*)(0x6010040 + spriteTileNum), windowTileData, 6);
|
||||
ptr = (void*)(OBJ_VRAM0);
|
||||
@ -1991,13 +1991,13 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
return;
|
||||
|
||||
bank = gSprites[healthboxSpriteId].data6;
|
||||
bank = gSprites[healthboxSpriteId].data[6];
|
||||
if (GetBankSide(bank) == SIDE_PLAYER)
|
||||
return;
|
||||
if (!GetSetPokedexFlag(SpeciesToNationalPokedexNum(GetMonData(&gEnemyParty[gBattlePartyID[bank]], MON_DATA_SPECIES)), FLAG_GET_CAUGHT))
|
||||
return;
|
||||
|
||||
healthboxSpriteId_2 = gSprites[healthboxSpriteId].data5;
|
||||
healthboxSpriteId_2 = gSprites[healthboxSpriteId].data[5];
|
||||
|
||||
if (noStatus)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_70), (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId_2].oam.tileNum + 8) * 32), 32);
|
||||
@ -2014,8 +2014,8 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
s16 tileNumAdder;
|
||||
u8 statusPalId;
|
||||
|
||||
bank = gSprites[healthboxSpriteId].data6;
|
||||
healthboxSpriteId_2 = gSprites[healthboxSpriteId].data5;
|
||||
bank = gSprites[healthboxSpriteId].data[6];
|
||||
healthboxSpriteId_2 = gSprites[healthboxSpriteId].data[5];
|
||||
if (GetBankSide(bank) == SIDE_PLAYER)
|
||||
{
|
||||
status = GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_STATUS);
|
||||
@ -2178,12 +2178,12 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
|
||||
void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId)
|
||||
{
|
||||
s32 maxHp, currHp;
|
||||
u8 bank = gSprites[healthboxSpriteId].data6;
|
||||
u8 bank = gSprites[healthboxSpriteId].data[6];
|
||||
|
||||
if (elementId == HEALTHBOX_ALL && !IsDoubleBattle())
|
||||
GetBankSide(bank); // pointless function call
|
||||
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data6) == SIDE_PLAYER)
|
||||
if (GetBankSide(gSprites[healthboxSpriteId].data[6]) == SIDE_PLAYER)
|
||||
{
|
||||
u8 isDoubles;
|
||||
|
||||
@ -2308,7 +2308,7 @@ static void sub_8074B9C(u8 bank, u8 whichBar)
|
||||
}
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
u8 healthboxSpriteId_2 = gSprites[gBattleSpritesDataPtr->battleBars[bank].healthboxSpriteId].data5;
|
||||
u8 healthboxSpriteId_2 = gSprites[gBattleSpritesDataPtr->battleBars[bank].healthboxSpriteId].data[5];
|
||||
if (i < 2)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId_2].oam.tileNum + 2 + i) * 32), 32);
|
||||
|
@ -6782,8 +6782,8 @@ static bool8 sub_804F344(void)
|
||||
return (gBattle_BG2_X != 0x1A0);
|
||||
}
|
||||
|
||||
#define sDestroy data0
|
||||
#define sSavedLvlUpBoxXPosition data1
|
||||
#define sDestroy data[0]
|
||||
#define sSavedLvlUpBoxXPosition data[1]
|
||||
|
||||
static void PutMonIconOnLvlUpBox(void)
|
||||
{
|
||||
|
@ -1002,35 +1002,35 @@ static void sub_807FAC8(void)
|
||||
|
||||
static void sub_807FD08(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data1 += sprite->data6;
|
||||
sprite->data2 -= sprite->data4;
|
||||
sprite->data2 += sprite->data7;
|
||||
sprite->data0 += sprite->data7;
|
||||
sprite->data4--;
|
||||
sprite->data[1] += sprite->data[6];
|
||||
sprite->data[2] -= sprite->data[4];
|
||||
sprite->data[2] += sprite->data[7];
|
||||
sprite->data[0] += sprite->data[7];
|
||||
sprite->data[4]--;
|
||||
|
||||
if (sprite->data0 < sprite->data2)
|
||||
if (sprite->data[0] < sprite->data[2])
|
||||
{
|
||||
sprite->data3 = sprite->data4 = sprite->data3 - 1;
|
||||
sprite->data[3] = sprite->data[4] = sprite->data[3] - 1;
|
||||
|
||||
if (++sprite->data5 > 3)
|
||||
if (++sprite->data[5] > 3)
|
||||
DestroySprite(sprite);
|
||||
else
|
||||
PlaySE(SE_TB_KARA);
|
||||
}
|
||||
sprite->pos1.x = sprite->data1;
|
||||
sprite->pos1.y = sprite->data2;
|
||||
sprite->pos1.x = sprite->data[1];
|
||||
sprite->pos1.y = sprite->data[2];
|
||||
}
|
||||
|
||||
static void sub_807FD64(struct Sprite* sprite, s16 a2, s16 a3, s16 a4, s16 a5, s16 a6)
|
||||
{
|
||||
sprite->data0 = a3;
|
||||
sprite->data1 = a2;
|
||||
sprite->data2 = a3;
|
||||
sprite->data3 = a4;
|
||||
sprite->data4 = 10;
|
||||
sprite->data5 = 0;
|
||||
sprite->data6 = a5;
|
||||
sprite->data7 = a6;
|
||||
sprite->data[0] = a3;
|
||||
sprite->data[1] = a2;
|
||||
sprite->data[2] = a3;
|
||||
sprite->data[3] = a4;
|
||||
sprite->data[4] = 10;
|
||||
sprite->data[5] = 0;
|
||||
sprite->data[6] = a5;
|
||||
sprite->data[7] = a6;
|
||||
sprite->callback = sub_807FD08;
|
||||
}
|
||||
|
||||
@ -2909,10 +2909,10 @@ static void BerryBlender_SetBackgroundsPos(void)
|
||||
|
||||
static void sub_8082E3C(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data2 += sprite->data0;
|
||||
sprite->data3 += sprite->data1;
|
||||
sprite->pos2.x = sprite->data2 / 8;
|
||||
sprite->pos2.y = sprite->data3 / 8;
|
||||
sprite->data[2] += sprite->data[0];
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->pos2.x = sprite->data[2] / 8;
|
||||
sprite->pos2.y = sprite->data[3] / 8;
|
||||
|
||||
if (sprite->animEnded)
|
||||
DestroySprite(sprite);
|
||||
@ -2935,8 +2935,8 @@ static void sub_8082E84(void)
|
||||
y = gSineTable[(rand & 0xFF)] / 4;
|
||||
|
||||
spriteId = CreateSprite(&sUnknown_08339BE0, x + 120, y + 80, 1);
|
||||
gSprites[spriteId].data0 = 16 - (Random() % 32);
|
||||
gSprites[spriteId].data1 = 16 - (Random() % 32);
|
||||
gSprites[spriteId].data[0] = 16 - (Random() % 32);
|
||||
gSprites[spriteId].data[1] = 16 - (Random() % 32);
|
||||
|
||||
gSprites[spriteId].callback = sub_8082E3C;
|
||||
}
|
||||
@ -2944,8 +2944,8 @@ static void sub_8082E84(void)
|
||||
|
||||
static void sub_8082F68(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data0++;
|
||||
sprite->pos2.y = -(sprite->data0 / 3);
|
||||
sprite->data[0]++;
|
||||
sprite->pos2.y = -(sprite->data[0] / 3);
|
||||
|
||||
if (sprite->animEnded)
|
||||
DestroySprite(sprite);
|
||||
@ -2953,8 +2953,8 @@ static void sub_8082F68(struct Sprite* sprite)
|
||||
|
||||
static void sub_8082F9C(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data0++;
|
||||
sprite->pos2.y = -(sprite->data0 * 2);
|
||||
sprite->data[0]++;
|
||||
sprite->pos2.y = -(sprite->data[0] * 2);
|
||||
|
||||
if (sprite->pos2.y < -12)
|
||||
sprite->pos2.y = -12;
|
||||
@ -2970,68 +2970,68 @@ static void Blender_SetBankBerryData(u8 bank, u16 itemId)
|
||||
|
||||
static void sub_8083010(struct Sprite* sprite)
|
||||
{
|
||||
switch (sprite->data0)
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data1 += 8;
|
||||
if (sprite->data1 > 88)
|
||||
sprite->data[1] += 8;
|
||||
if (sprite->data[1] > 88)
|
||||
{
|
||||
sprite->data1 = 88;
|
||||
sprite->data0++;
|
||||
sprite->data[1] = 88;
|
||||
sprite->data[0]++;
|
||||
PlaySE(SE_KON);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
sprite->data2 += 1;
|
||||
if (sprite->data2 > 20)
|
||||
sprite->data[2] += 1;
|
||||
if (sprite->data[2] > 20)
|
||||
{
|
||||
sprite->data0++;
|
||||
sprite->data2 = 0;
|
||||
sprite->data[0]++;
|
||||
sprite->data[2] = 0;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
sprite->data1 += 4;
|
||||
if (sprite->data1 > 176)
|
||||
sprite->data[1] += 4;
|
||||
if (sprite->data[1] > 176)
|
||||
{
|
||||
if (++sprite->data3 == 3)
|
||||
if (++sprite->data[3] == 3)
|
||||
{
|
||||
DestroySprite(sprite);
|
||||
CreateSprite(&sUnknown_08339C60, 120, -20, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data0 = 0;
|
||||
sprite->data1 = -16;
|
||||
StartSpriteAnim(sprite, sprite->data3);
|
||||
sprite->data[0] = 0;
|
||||
sprite->data[1] = -16;
|
||||
StartSpriteAnim(sprite, sprite->data[3]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
sprite->pos2.y = sprite->data1;
|
||||
sprite->pos2.y = sprite->data[1];
|
||||
}
|
||||
|
||||
static void sub_80830C0(struct Sprite* sprite)
|
||||
{
|
||||
switch (sprite->data0)
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data1 += 8;
|
||||
if (sprite->data1 > 92)
|
||||
sprite->data[1] += 8;
|
||||
if (sprite->data[1] > 92)
|
||||
{
|
||||
sprite->data1 = 92;
|
||||
sprite->data0++;
|
||||
sprite->data[1] = 92;
|
||||
sprite->data[0]++;
|
||||
PlaySE(SE_PIN);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
sprite->data2 += 1;
|
||||
if (sprite->data2 > 20)
|
||||
sprite->data0++;
|
||||
sprite->data[2] += 1;
|
||||
if (sprite->data[2] > 20)
|
||||
sprite->data[0]++;
|
||||
break;
|
||||
case 2:
|
||||
sprite->data1 += 4;
|
||||
if (sprite->data1 > 176)
|
||||
sprite->data[1] += 4;
|
||||
if (sprite->data[1] > 176)
|
||||
{
|
||||
sBerryBlenderData->mainState++;
|
||||
DestroySprite(sprite);
|
||||
@ -3039,7 +3039,7 @@ static void sub_80830C0(struct Sprite* sprite)
|
||||
break;
|
||||
}
|
||||
|
||||
sprite->pos2.y = sprite->data1;
|
||||
sprite->pos2.y = sprite->data[1];
|
||||
}
|
||||
|
||||
static void sub_8083140(u16 a0, u16 a1)
|
||||
|
@ -1302,7 +1302,7 @@ void sub_8128060(u8 taskId)
|
||||
|
||||
void ConfigureCameraObjectForPlacingDecoration(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor)
|
||||
{
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.unk4].data0;
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.unk4].data[0];
|
||||
gUnknown_03005DD0.unk4 = gpu_pal_decompress_alloc_tag_and_upload(data, decor);
|
||||
gSprites[gUnknown_03005DD0.unk4].oam.priority = 1;
|
||||
gSprites[gUnknown_03005DD0.unk4].callback = sub_81292D0;
|
||||
@ -1383,8 +1383,8 @@ void sub_812826C(u8 taskId)
|
||||
void sub_81283BC(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[10] = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data7 = 1;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].data7 = 1;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 1;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].data[7] = 1;
|
||||
sub_8128DE0();
|
||||
sub_8128950(taskId);
|
||||
}
|
||||
@ -1392,8 +1392,8 @@ void sub_81283BC(u8 taskId)
|
||||
void sub_8128414(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[10] = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data7 = 1;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].data7 = 1;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 1;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].data[7] = 1;
|
||||
sub_8128DE0();
|
||||
StringExpandPlaceholders(gStringVar4, gText_CancelDecorating);
|
||||
DisplayItemMessageOnField(taskId, gStringVar4, sub_8128B80);
|
||||
@ -1769,8 +1769,8 @@ bool8 sub_8128DB4(void)
|
||||
void sub_8128DE0(void)
|
||||
{
|
||||
sDecorationLastDirectionMoved = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data2 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data3 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 0;
|
||||
}
|
||||
|
||||
void sub_8128E18(u8 taskId)
|
||||
@ -1778,7 +1778,7 @@ void sub_8128E18(u8 taskId)
|
||||
s16 *data;
|
||||
|
||||
data = gTasks[taskId].data;
|
||||
if (!gSprites[sDecor_CameraSpriteObjectIdx1].data4)
|
||||
if (!gSprites[sDecor_CameraSpriteObjectIdx1].data[4])
|
||||
{
|
||||
if (data[10] == 1)
|
||||
{
|
||||
@ -1792,29 +1792,29 @@ void sub_8128E18(u8 taskId)
|
||||
if ((gMain.heldKeys & 0x0F0) == DPAD_UP)
|
||||
{
|
||||
sDecorationLastDirectionMoved = DIR_SOUTH;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data2 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data3 = -2;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = -2;
|
||||
data[1]--;
|
||||
}
|
||||
if ((gMain.heldKeys & 0x0F0) == DPAD_DOWN)
|
||||
{
|
||||
sDecorationLastDirectionMoved = DIR_NORTH;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data2 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data3 = 2;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 2;
|
||||
data[1]++;
|
||||
}
|
||||
if ((gMain.heldKeys & 0x0F0) == DPAD_LEFT)
|
||||
{
|
||||
sDecorationLastDirectionMoved = DIR_WEST;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data2 = -2;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data3 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = -2;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 0;
|
||||
data[0]--;
|
||||
}
|
||||
if ((gMain.heldKeys & 0x0F0) == DPAD_RIGHT)
|
||||
{
|
||||
sDecorationLastDirectionMoved = DIR_EAST;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data2 = 2;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data3 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[2] = 2;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[3] = 0;
|
||||
data[0]++;
|
||||
}
|
||||
if (!sub_8128DB4() || !sub_8128D10(taskId))
|
||||
@ -1824,8 +1824,8 @@ void sub_8128E18(u8 taskId)
|
||||
}
|
||||
if (sDecorationLastDirectionMoved)
|
||||
{
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data4++;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data4 &= 7;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[4]++;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[4] &= 7;
|
||||
}
|
||||
if (!data[10])
|
||||
{
|
||||
@ -1843,7 +1843,7 @@ void sub_8128E18(u8 taskId)
|
||||
void sub_8128FD8(u8 taskId)
|
||||
{
|
||||
sub_8197434(0, 1);
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data7 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
|
||||
gTasks[taskId].data[10] = 0;
|
||||
gTasks[taskId].func = sub_8128E18;
|
||||
}
|
||||
@ -1954,20 +1954,20 @@ void SetDecorSelectionBoxOamAttributes(u8 decorShape)
|
||||
|
||||
void sub_81292D0(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data2 = 0;
|
||||
sprite->data3 = 0;
|
||||
sprite->data4 = 0;
|
||||
sprite->data5 = 0;
|
||||
sprite->data6 = 0;
|
||||
sprite->data7 = 0;
|
||||
sprite->data[2] = 0;
|
||||
sprite->data[3] = 0;
|
||||
sprite->data[4] = 0;
|
||||
sprite->data[5] = 0;
|
||||
sprite->data[6] = 0;
|
||||
sprite->data[7] = 0;
|
||||
sprite->callback = sub_81292E8;
|
||||
}
|
||||
|
||||
void sub_81292E8(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data7 == 0)
|
||||
if (sprite->data[7] == 0)
|
||||
{
|
||||
if (sprite->data6 < 15)
|
||||
if (sprite->data[6] < 15)
|
||||
{
|
||||
sprite->invisible = FALSE;
|
||||
}
|
||||
@ -1975,8 +1975,8 @@ void sub_81292E8(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = TRUE;
|
||||
}
|
||||
sprite->data6 ++;
|
||||
sprite->data6 &= 0x1F;
|
||||
sprite->data[6] ++;
|
||||
sprite->data[6] &= 0x1F;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2248,7 +2248,7 @@ bool8 sub_81299AC(u8 taskId)
|
||||
void SetUpPuttingAwayDecorationPlayerAvatar(void)
|
||||
{
|
||||
player_get_direction_lower_nybble();
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.unk4].data0;
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.unk4].data[0];
|
||||
sub_812A39C();
|
||||
gUnknown_03005DD0.unk4 = CreateSprite(&gUnknown_085A7404, 0x78, 0x50, 0);
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
@ -2299,7 +2299,7 @@ void sub_8129ABC(u8 taskId)
|
||||
void sub_8129B34(u8 taskId)
|
||||
{
|
||||
sub_8197434(0, 1);
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data7 = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].callback = sub_812A36C;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].pos1.x = 0x88;
|
||||
@ -2719,9 +2719,9 @@ void sub_812A334(void)
|
||||
|
||||
void sub_812A36C(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data0 ++;
|
||||
sprite->data0 &= 0x1F;
|
||||
if (sprite->data0 > 15)
|
||||
sprite->data[0] ++;
|
||||
sprite->data[0] &= 0x1F;
|
||||
if (sprite->data[0] > 15)
|
||||
{
|
||||
sprite->invisible = TRUE;
|
||||
}
|
||||
|
@ -709,16 +709,16 @@ static void CB2_EggHatch_1(void)
|
||||
|
||||
static void SpriteCB_Egg_0(struct Sprite* sprite)
|
||||
{
|
||||
if (++sprite->data0 > 20)
|
||||
if (++sprite->data[0] > 20)
|
||||
{
|
||||
sprite->callback = SpriteCB_Egg_1;
|
||||
sprite->data0 = 0;
|
||||
sprite->data[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data1 = (sprite->data1 + 20) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data1, 1);
|
||||
if (sprite->data0 == 15)
|
||||
sprite->data[1] = (sprite->data[1] + 20) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data[1], 1);
|
||||
if (sprite->data[0] == 15)
|
||||
{
|
||||
PlaySE(SE_BOWA);
|
||||
StartSpriteAnim(sprite, 1);
|
||||
@ -729,19 +729,19 @@ static void SpriteCB_Egg_0(struct Sprite* sprite)
|
||||
|
||||
static void SpriteCB_Egg_1(struct Sprite* sprite)
|
||||
{
|
||||
if (++sprite->data2 > 30)
|
||||
if (++sprite->data[2] > 30)
|
||||
{
|
||||
if (++sprite->data0 > 20)
|
||||
if (++sprite->data[0] > 20)
|
||||
{
|
||||
sprite->callback = SpriteCB_Egg_2;
|
||||
sprite->data0 = 0;
|
||||
sprite->data2 = 0;
|
||||
sprite->data[0] = 0;
|
||||
sprite->data[2] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data1 = (sprite->data1 + 20) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data1, 2);
|
||||
if (sprite->data0 == 15)
|
||||
sprite->data[1] = (sprite->data[1] + 20) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data[1], 2);
|
||||
if (sprite->data[0] == 15)
|
||||
{
|
||||
PlaySE(SE_BOWA);
|
||||
StartSpriteAnim(sprite, 2);
|
||||
@ -752,30 +752,30 @@ static void SpriteCB_Egg_1(struct Sprite* sprite)
|
||||
|
||||
static void SpriteCB_Egg_2(struct Sprite* sprite)
|
||||
{
|
||||
if (++sprite->data2 > 30)
|
||||
if (++sprite->data[2] > 30)
|
||||
{
|
||||
if (++sprite->data0 > 38)
|
||||
if (++sprite->data[0] > 38)
|
||||
{
|
||||
u16 species;
|
||||
|
||||
sprite->callback = SpriteCB_Egg_3;
|
||||
sprite->data0 = 0;
|
||||
sprite->data[0] = 0;
|
||||
species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES);
|
||||
gSprites[sEggHatchData->pokeSpriteID].pos2.x = 0;
|
||||
gSprites[sEggHatchData->pokeSpriteID].pos2.y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data1 = (sprite->data1 + 20) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data1, 2);
|
||||
if (sprite->data0 == 15)
|
||||
sprite->data[1] = (sprite->data[1] + 20) & 0xFF;
|
||||
sprite->pos2.x = Sin(sprite->data[1], 2);
|
||||
if (sprite->data[0] == 15)
|
||||
{
|
||||
PlaySE(SE_BOWA);
|
||||
StartSpriteAnim(sprite, 2);
|
||||
CreateRandomEggShardSprite();
|
||||
CreateRandomEggShardSprite();
|
||||
}
|
||||
if (sprite->data0 == 30)
|
||||
if (sprite->data[0] == 30)
|
||||
PlaySE(SE_BOWA);
|
||||
}
|
||||
}
|
||||
@ -783,60 +783,60 @@ static void SpriteCB_Egg_2(struct Sprite* sprite)
|
||||
|
||||
static void SpriteCB_Egg_3(struct Sprite* sprite)
|
||||
{
|
||||
if (++sprite->data0 > 50)
|
||||
if (++sprite->data[0] > 50)
|
||||
{
|
||||
sprite->callback = SpriteCB_Egg_4;
|
||||
sprite->data0 = 0;
|
||||
sprite->data[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_4(struct Sprite* sprite)
|
||||
{
|
||||
s16 i;
|
||||
if (sprite->data0 == 0)
|
||||
if (sprite->data[0] == 0)
|
||||
BeginNormalPaletteFade(-1, -1, 0, 0x10, 0xFFFF);
|
||||
if (sprite->data0 < 4u)
|
||||
if (sprite->data[0] < 4u)
|
||||
{
|
||||
for (i = 0; i <= 3; i++)
|
||||
CreateRandomEggShardSprite();
|
||||
}
|
||||
sprite->data0++;
|
||||
sprite->data[0]++;
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
PlaySE(SE_TAMAGO);
|
||||
sprite->invisible = 1;
|
||||
sprite->callback = SpriteCB_Egg_5;
|
||||
sprite->data0 = 0;
|
||||
sprite->data[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_5(struct Sprite* sprite)
|
||||
{
|
||||
if (sprite->data0 == 0)
|
||||
if (sprite->data[0] == 0)
|
||||
{
|
||||
gSprites[sEggHatchData->pokeSpriteID].invisible = 0;
|
||||
StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1);
|
||||
}
|
||||
if (sprite->data0 == 8)
|
||||
if (sprite->data[0] == 8)
|
||||
BeginNormalPaletteFade(-1, -1, 0x10, 0, 0xFFFF);
|
||||
if (sprite->data0 <= 9)
|
||||
if (sprite->data[0] <= 9)
|
||||
gSprites[sEggHatchData->pokeSpriteID].pos1.y -= 1;
|
||||
if (sprite->data0 > 40)
|
||||
if (sprite->data[0] > 40)
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
sprite->data0++;
|
||||
sprite->data[0]++;
|
||||
}
|
||||
|
||||
static void SpriteCB_EggShard(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data4 += sprite->data1;
|
||||
sprite->data5 += sprite->data2;
|
||||
sprite->data[4] += sprite->data[1];
|
||||
sprite->data[5] += sprite->data[2];
|
||||
|
||||
sprite->pos2.x = sprite->data4 / 256;
|
||||
sprite->pos2.y = sprite->data5 / 256;
|
||||
sprite->pos2.x = sprite->data[4] / 256;
|
||||
sprite->pos2.y = sprite->data[5] / 256;
|
||||
|
||||
sprite->data2 += sprite->data3;
|
||||
sprite->data[2] += sprite->data[3];
|
||||
|
||||
if (sprite->pos1.y + sprite->pos2.y > sprite->pos1.y + 20 && sprite->data2 > 0)
|
||||
if (sprite->pos1.y + sprite->pos2.y > sprite->pos1.y + 20 && sprite->data[2] > 0)
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
|
||||
@ -854,9 +854,9 @@ static void CreateRandomEggShardSprite(void)
|
||||
static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex)
|
||||
{
|
||||
u8 spriteID = CreateSprite(&sSpriteTemplate_EggShard, x, y, 4);
|
||||
gSprites[spriteID].data1 = data1;
|
||||
gSprites[spriteID].data2 = data2;
|
||||
gSprites[spriteID].data3 = data3;
|
||||
gSprites[spriteID].data[1] = data1;
|
||||
gSprites[spriteID].data[2] = data2;
|
||||
gSprites[spriteID].data[3] = data3;
|
||||
StartSpriteAnim(&gSprites[spriteID], spriteAnimIndex);
|
||||
}
|
||||
|
||||
|
@ -112,18 +112,18 @@ static void SpriteCB_PreEvoSparkleSet1(struct Sprite* sprite)
|
||||
{
|
||||
u8 matrixNum;
|
||||
|
||||
sprite->pos1.y = 88 - (sprite->data7 * sprite->data7) / 80;
|
||||
sprite->pos2.y = Sin((u8)(sprite->data6), sprite->data5) / 4;
|
||||
sprite->pos2.x = Cos((u8)(sprite->data6), sprite->data5);
|
||||
sprite->data6 += 4;
|
||||
if (sprite->data7 & 1)
|
||||
sprite->data5--;
|
||||
sprite->data7++;
|
||||
sprite->pos1.y = 88 - (sprite->data[7] * sprite->data[7]) / 80;
|
||||
sprite->pos2.y = Sin((u8)(sprite->data[6]), sprite->data[5]) / 4;
|
||||
sprite->pos2.x = Cos((u8)(sprite->data[6]), sprite->data[5]);
|
||||
sprite->data[6] += 4;
|
||||
if (sprite->data[7] & 1)
|
||||
sprite->data[5]--;
|
||||
sprite->data[7]++;
|
||||
if (sprite->pos2.y > 0)
|
||||
sprite->subpriority = 1;
|
||||
else
|
||||
sprite->subpriority = 20;
|
||||
matrixNum = sprite->data5 / 4 + 20;
|
||||
matrixNum = sprite->data[5] / 4 + 20;
|
||||
if (matrixNum > 31)
|
||||
matrixNum = 31;
|
||||
sprite->oam.matrixNum = matrixNum;
|
||||
@ -137,9 +137,9 @@ static void CreatePreEvoSparkleSet1(u8 arg0)
|
||||
u8 spriteID = CreateSprite(&sEvoSparkleSpriteTemplate, 120, 88, 0);
|
||||
if (spriteID != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteID].data5 = 48;
|
||||
gSprites[spriteID].data6 = arg0;
|
||||
gSprites[spriteID].data7 = 0;
|
||||
gSprites[spriteID].data[5] = 48;
|
||||
gSprites[spriteID].data[6] = arg0;
|
||||
gSprites[spriteID].data[7] = 0;
|
||||
gSprites[spriteID].oam.affineMode = 1;
|
||||
gSprites[spriteID].oam.matrixNum = 31;
|
||||
gSprites[spriteID].callback = SpriteCB_PreEvoSparkleSet1;
|
||||
@ -150,11 +150,11 @@ static void SpriteCB_PreEvoSparkleSet2(struct Sprite* sprite)
|
||||
{
|
||||
if (sprite->pos1.y < 88)
|
||||
{
|
||||
sprite->pos1.y = 8 + (sprite->data7 * sprite->data7) / 5;
|
||||
sprite->pos2.y = Sin((u8)(sprite->data6), sprite->data5) / 4;
|
||||
sprite->pos2.x = Cos((u8)(sprite->data6), sprite->data5);
|
||||
sprite->data5 = 8 + Sin((u8)(sprite->data7 * 4), 40);
|
||||
sprite->data7++;
|
||||
sprite->pos1.y = 8 + (sprite->data[7] * sprite->data[7]) / 5;
|
||||
sprite->pos2.y = Sin((u8)(sprite->data[6]), sprite->data[5]) / 4;
|
||||
sprite->pos2.x = Cos((u8)(sprite->data[6]), sprite->data[5]);
|
||||
sprite->data[5] = 8 + Sin((u8)(sprite->data[7] * 4), 40);
|
||||
sprite->data[7]++;
|
||||
}
|
||||
else
|
||||
DestroySprite(sprite);
|
||||
@ -165,9 +165,9 @@ static void CreatePreEvoSparkleSet2(u8 arg0)
|
||||
u8 spriteID = CreateSprite(&sEvoSparkleSpriteTemplate, 120, 8, 0);
|
||||
if (spriteID != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteID].data5 = 8;
|
||||
gSprites[spriteID].data6 = arg0;
|
||||
gSprites[spriteID].data7 = 0;
|
||||
gSprites[spriteID].data[5] = 8;
|
||||
gSprites[spriteID].data[6] = arg0;
|
||||
gSprites[spriteID].data[7] = 0;
|
||||
gSprites[spriteID].oam.affineMode = 1;
|
||||
gSprites[spriteID].oam.matrixNum = 25;
|
||||
gSprites[spriteID].subpriority = 1;
|
||||
@ -177,12 +177,12 @@ static void CreatePreEvoSparkleSet2(u8 arg0)
|
||||
|
||||
static void SpriteCB_PostEvoSparkleSet1(struct Sprite* sprite)
|
||||
{
|
||||
if (sprite->data5 > 8)
|
||||
if (sprite->data[5] > 8)
|
||||
{
|
||||
sprite->pos2.y = Sin((u8)(sprite->data6), sprite->data5);
|
||||
sprite->pos2.x = Cos((u8)(sprite->data6), sprite->data5);
|
||||
sprite->data5 -= sprite->data3;
|
||||
sprite->data6 += 4;
|
||||
sprite->pos2.y = Sin((u8)(sprite->data[6]), sprite->data[5]);
|
||||
sprite->pos2.x = Cos((u8)(sprite->data[6]), sprite->data[5]);
|
||||
sprite->data[5] -= sprite->data[3];
|
||||
sprite->data[6] += 4;
|
||||
}
|
||||
else
|
||||
DestroySprite(sprite);
|
||||
@ -193,10 +193,10 @@ static void CreatePostEvoSparkleSet1(u8 arg0, u8 arg1)
|
||||
u8 spriteID = CreateSprite(&sEvoSparkleSpriteTemplate, 120, 56, 0);
|
||||
if (spriteID != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteID].data3 = arg1;
|
||||
gSprites[spriteID].data5 = 120;
|
||||
gSprites[spriteID].data6 = arg0;
|
||||
gSprites[spriteID].data7 = 0;
|
||||
gSprites[spriteID].data[3] = arg1;
|
||||
gSprites[spriteID].data[5] = 120;
|
||||
gSprites[spriteID].data[6] = arg0;
|
||||
gSprites[spriteID].data[7] = 0;
|
||||
gSprites[spriteID].oam.affineMode = 1;
|
||||
gSprites[spriteID].oam.matrixNum = 31;
|
||||
gSprites[spriteID].subpriority = 1;
|
||||
@ -206,29 +206,29 @@ static void CreatePostEvoSparkleSet1(u8 arg0, u8 arg1)
|
||||
|
||||
static void SpriteCB_PostEvoSparkleSet2(struct Sprite* sprite)
|
||||
{
|
||||
if (!(sprite->data7 & 3))
|
||||
if (!(sprite->data[7] & 3))
|
||||
sprite->pos1.y++;
|
||||
if (sprite->data6 < 128)
|
||||
if (sprite->data[6] < 128)
|
||||
{
|
||||
u8 matrixNum;
|
||||
|
||||
sprite->pos2.y = -Sin((u8)(sprite->data6), sprite->data5);
|
||||
sprite->pos1.x = 120 + (sprite->data3 * sprite->data7) / 3;
|
||||
sprite->data6++;
|
||||
matrixNum = 31 - (sprite->data6 * 12 / 128);
|
||||
if (sprite->data6 > 64)
|
||||
sprite->pos2.y = -Sin((u8)(sprite->data[6]), sprite->data[5]);
|
||||
sprite->pos1.x = 120 + (sprite->data[3] * sprite->data[7]) / 3;
|
||||
sprite->data[6]++;
|
||||
matrixNum = 31 - (sprite->data[6] * 12 / 128);
|
||||
if (sprite->data[6] > 64)
|
||||
sprite->subpriority = 1;
|
||||
else
|
||||
{
|
||||
sprite->invisible = 0;
|
||||
sprite->subpriority = 20;
|
||||
if (sprite->data6 > 112 && sprite->data6 & 1)
|
||||
if (sprite->data[6] > 112 && sprite->data[6] & 1)
|
||||
sprite->invisible = 1;
|
||||
}
|
||||
if (matrixNum < 20)
|
||||
matrixNum = 20;
|
||||
sprite->oam.matrixNum = matrixNum;
|
||||
sprite->data7++;
|
||||
sprite->data[7]++;
|
||||
}
|
||||
else
|
||||
DestroySprite(sprite);
|
||||
@ -239,9 +239,9 @@ static void CreatePostEvoSparkleSet2(u8 arg0)
|
||||
u8 spriteID = CreateSprite(&sEvoSparkleSpriteTemplate, 120, 56, 0);
|
||||
if (spriteID != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteID].data3 = 3 - (Random() % 7);
|
||||
gSprites[spriteID].data5 = 48 + (Random() & 0x3F);
|
||||
gSprites[spriteID].data7 = 0;
|
||||
gSprites[spriteID].data[3] = 3 - (Random() % 7);
|
||||
gSprites[spriteID].data[5] = 48 + (Random() & 0x3F);
|
||||
gSprites[spriteID].data[7] = 0;
|
||||
gSprites[spriteID].oam.affineMode = 1;
|
||||
gSprites[spriteID].oam.matrixNum = 31;
|
||||
gSprites[spriteID].subpriority = 20;
|
||||
|
@ -580,9 +580,9 @@ static void Task_Hof_SetMonDisplayTask(u8 taskId)
|
||||
gTasks[taskId].func = Task_Hof_DisplayMon;
|
||||
}
|
||||
|
||||
#define tDestinationX data1
|
||||
#define tDestinationY data2
|
||||
#define tSpecies data7
|
||||
#define tDestinationX data[1]
|
||||
#define tDestinationY data[2]
|
||||
#define tSpecies data[7]
|
||||
|
||||
static void Task_Hof_DisplayMon(u8 taskId)
|
||||
{
|
||||
@ -613,7 +613,7 @@ static void Task_Hof_DisplayMon(u8 taskId)
|
||||
spriteId = sub_818D3E4(currMon->species, currMon->tid, currMon->personality, 1, xPos, yPos, currMonId, 0xFFFF);
|
||||
gSprites[spriteId].tDestinationX = field4;
|
||||
gSprites[spriteId].tDestinationY = field6;
|
||||
gSprites[spriteId].data0 = 0;
|
||||
gSprites[spriteId].data[0] = 0;
|
||||
gSprites[spriteId].tSpecies = currMon->species;
|
||||
gSprites[spriteId].callback = SpriteCB_GetOnScreenAndAnimate;
|
||||
gTasks[taskId].tMonSpriteId(currMonId) = spriteId;
|
||||
@ -1404,13 +1404,13 @@ static void sub_81751A4(struct Sprite* sprite)
|
||||
u8 tableID;
|
||||
|
||||
sprite->pos2.y++;
|
||||
sprite->pos2.y += sprite->data1;
|
||||
sprite->pos2.y += sprite->data[1];
|
||||
|
||||
tableID = sprite->data0;
|
||||
tableID = sprite->data[0];
|
||||
rand = (Random() % 4) + 8;
|
||||
sprite->pos2.x = rand * gSineTable[tableID] / 256;
|
||||
|
||||
sprite->data0 += 4;
|
||||
sprite->data[0] += 4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1428,9 +1428,9 @@ static bool8 sub_81751FC(void)
|
||||
StartSpriteAnim(sprite, Random() % 17);
|
||||
|
||||
if (Random() & 3)
|
||||
sprite->data1 = 0;
|
||||
sprite->data[1] = 0;
|
||||
else
|
||||
sprite->data1 = 1;
|
||||
sprite->data[1] = 1;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
1282
src/pokeball.c
Normal file
@ -937,7 +937,7 @@ void sub_81C0704(u8 taskId)
|
||||
gUnknown_0203CF1C->unk40D3 = sub_81C45F4(&gUnknown_0203CF1C->currentMon, &data[1]);
|
||||
if (gUnknown_0203CF1C->unk40D3 == 0xFF)
|
||||
return;
|
||||
gSprites[gUnknown_0203CF1C->unk40D3].data2 = 1;
|
||||
gSprites[gUnknown_0203CF1C->unk40D3].data[2] = 1;
|
||||
sub_81C0E24();
|
||||
data[1] = 0;
|
||||
break;
|
||||
@ -952,7 +952,7 @@ void sub_81C0704(u8 taskId)
|
||||
sub_81C2524();
|
||||
break;
|
||||
case 12:
|
||||
gSprites[gUnknown_0203CF1C->unk40D3].data2 = 0;
|
||||
gSprites[gUnknown_0203CF1C->unk40D3].data[2] = 0;
|
||||
break;
|
||||
default:
|
||||
if (sub_81221EC() == 0 && FuncIsActiveTask(sub_81C20F0) == 0)
|
||||
|
@ -1332,9 +1332,9 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag)
|
||||
gRegionMap->cursorSprite->pos1.x = 8 * gRegionMap->cursorPosX + 4;
|
||||
gRegionMap->cursorSprite->pos1.y = 8 * gRegionMap->cursorPosY + 4;
|
||||
}
|
||||
gRegionMap->cursorSprite->data1 = 2;
|
||||
gRegionMap->cursorSprite->data2 = (IndexOfSpritePaletteTag(paletteTag) << 4) + 0x101;
|
||||
gRegionMap->cursorSprite->data3 = TRUE;
|
||||
gRegionMap->cursorSprite->data[1] = 2;
|
||||
gRegionMap->cursorSprite->data[2] = (IndexOfSpritePaletteTag(paletteTag) << 4) + 0x101;
|
||||
gRegionMap->cursorSprite->data[3] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1350,12 +1350,12 @@ static void FreeRegionMapCursorSprite(void)
|
||||
|
||||
void sub_8124268(void)
|
||||
{
|
||||
gRegionMap->cursorSprite->data3 = TRUE;
|
||||
gRegionMap->cursorSprite->data[3] = TRUE;
|
||||
}
|
||||
|
||||
void sub_8124278(void)
|
||||
{
|
||||
gRegionMap->cursorSprite->data3 = FALSE;
|
||||
gRegionMap->cursorSprite->data[3] = FALSE;
|
||||
}
|
||||
|
||||
void CreateRegionMapPlayerIcon(u16 tileTag, u16 paletteTag)
|
||||
@ -1429,17 +1429,17 @@ static void RegionMapPlayerIconSpriteCallback_Zoomed(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos2.x = -2 * gRegionMap->scrollX;
|
||||
sprite->pos2.y = -2 * gRegionMap->scrollY;
|
||||
sprite->data0 = sprite->pos1.y + sprite->pos2.y + sprite->centerToCornerVecY;
|
||||
sprite->data1 = sprite->pos1.x + sprite->pos2.x + sprite->centerToCornerVecX;
|
||||
if (sprite->data0 < -8 || sprite->data0 > 0xa8 || sprite->data1 < -8 || sprite->data1 > 0xf8)
|
||||
sprite->data[0] = sprite->pos1.y + sprite->pos2.y + sprite->centerToCornerVecY;
|
||||
sprite->data[1] = sprite->pos1.x + sprite->pos2.x + sprite->centerToCornerVecX;
|
||||
if (sprite->data[0] < -8 || sprite->data[0] > 0xa8 || sprite->data[1] < -8 || sprite->data[1] > 0xf8)
|
||||
{
|
||||
sprite->data2 = FALSE;
|
||||
sprite->data[2] = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data2 = TRUE;
|
||||
sprite->data[2] = TRUE;
|
||||
}
|
||||
if (sprite->data2 == TRUE)
|
||||
if (sprite->data[2] == TRUE)
|
||||
{
|
||||
RegionMapPlayerIconSpriteCallback(sprite);
|
||||
}
|
||||
@ -1458,9 +1458,9 @@ static void RegionMapPlayerIconSpriteCallback(struct Sprite *sprite)
|
||||
{
|
||||
if (gRegionMap->blinkPlayerIcon)
|
||||
{
|
||||
if (++sprite->data7 > 16)
|
||||
if (++sprite->data[7] > 16)
|
||||
{
|
||||
sprite->data7 = 0;
|
||||
sprite->data[7] = 0;
|
||||
sprite->invisible = sprite->invisible ? FALSE : TRUE;
|
||||
}
|
||||
}
|
||||
@ -1790,7 +1790,7 @@ static void sub_8124AD4(void)
|
||||
shape += 3;
|
||||
}
|
||||
StartSpriteAnim(&gSprites[spriteId], shape);
|
||||
gSprites[spriteId].data0 = i;
|
||||
gSprites[spriteId].data[0] = i;
|
||||
}
|
||||
canFlyFlag++;
|
||||
}
|
||||
@ -1820,7 +1820,7 @@ static void sub_8124BE4(void)
|
||||
gSprites[spriteId].oam.size = 1;
|
||||
gSprites[spriteId].callback = sub_8124CBC;
|
||||
StartSpriteAnim(&gSprites[spriteId], 6);
|
||||
gSprites[spriteId].data0 = mapSecId;
|
||||
gSprites[spriteId].data[0] = mapSecId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1828,17 +1828,17 @@ static void sub_8124BE4(void)
|
||||
|
||||
static void sub_8124CBC(struct Sprite *sprite)
|
||||
{
|
||||
if (gUnknown_0203A148->regionMap.mapSecId == sprite->data0)
|
||||
if (gUnknown_0203A148->regionMap.mapSecId == sprite->data[0])
|
||||
{
|
||||
if (++sprite->data1 > 16)
|
||||
if (++sprite->data[1] > 16)
|
||||
{
|
||||
sprite->data1 = 0;
|
||||
sprite->data[1] = 0;
|
||||
sprite->invisible = sprite->invisible ? FALSE : TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data1 = 16;
|
||||
sprite->data[1] = 16;
|
||||
sprite->invisible = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ extern u8 GetBankSpriteDefault_Y(u8 bank);
|
||||
extern u8 sub_80A82E4(u8 bank);
|
||||
extern void sub_806A068(u16 species, u8 bankIdentity);
|
||||
extern void sub_806A12C(u16 backPicId, u8 bankIdentity);
|
||||
extern u8 sub_80A5C6C(u8 bank, u8 caseId);
|
||||
extern u8 GetBankPosition(u8 bank, u8 caseId);
|
||||
|
||||
// this file's functions
|
||||
static void CB2_ReshowBattleScreenAfterMenu(void);
|
||||
@ -260,11 +260,11 @@ static void CreateBankSprite(u8 bank)
|
||||
return;
|
||||
|
||||
sub_806A068(GetMonData(&gEnemyParty[gBattlePartyID[bank]], MON_DATA_SPECIES), GetBankIdentity(bank));
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C, sub_80A5C6C(bank, 2), posY, sub_80A82E4(bank));
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C, GetBankPosition(bank, 2), posY, sub_80A82E4(bank));
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = GetMonData(&gEnemyParty[gBattlePartyID[bank]], MON_DATA_SPECIES);
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = GetMonData(&gEnemyParty[gBattlePartyID[bank]], MON_DATA_SPECIES);
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
if (gBattleSpritesDataPtr->bankData[bank].transformSpecies == SPECIES_CASTFORM)
|
||||
@ -278,7 +278,7 @@ static void CreateBankSprite(u8 bank)
|
||||
sub_80A82E4(0));
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_WALLY_TUTORIAL && bank == 0)
|
||||
{
|
||||
@ -288,7 +288,7 @@ static void CreateBankSprite(u8 bank)
|
||||
sub_80A82E4(0));
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -296,11 +296,11 @@ static void CreateBankSprite(u8 bank)
|
||||
return;
|
||||
|
||||
sub_806A068(GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES), GetBankIdentity(bank));
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C, sub_80A5C6C(bank, 2), posY, sub_80A82E4(bank));
|
||||
gBankSpriteIds[bank] = CreateSprite(&gUnknown_0202499C, GetBankPosition(bank, 2), posY, sub_80A82E4(bank));
|
||||
gSprites[gBankSpriteIds[bank]].oam.paletteNum = bank;
|
||||
gSprites[gBankSpriteIds[bank]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBankSpriteIds[bank]].data0 = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data2 = GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES);
|
||||
gSprites[gBankSpriteIds[bank]].data[0] = bank;
|
||||
gSprites[gBankSpriteIds[bank]].data[2] = GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES);
|
||||
|
||||
StartSpriteAnim(&gSprites[gBankSpriteIds[bank]], gBattleMonForms[bank]);
|
||||
if (gBattleSpritesDataPtr->bankData[bank].transformSpecies == SPECIES_CASTFORM)
|
||||
|
17
src/sprite.c
@ -168,14 +168,7 @@ static const struct Sprite sDummySprite =
|
||||
.animPaused = 0,
|
||||
.affineAnimPaused = 0,
|
||||
.animLoopCounter = 0,
|
||||
.data0 = 0,
|
||||
.data1 = 0,
|
||||
.data2 = 0,
|
||||
.data3 = 0,
|
||||
.data4 = 0,
|
||||
.data5 = 0,
|
||||
.data6 = 0,
|
||||
.data7 = 0,
|
||||
.data = {0, 0, 0, 0, 0, 0, 0},
|
||||
.inUse = 0,
|
||||
.coordOffsetEnabled = 0,
|
||||
.invisible = 0,
|
||||
@ -1075,7 +1068,7 @@ void BeginAffineAnim(struct Sprite *sprite)
|
||||
ApplyAffineAnimFrame(matrixNum, &frameCmd);
|
||||
sAffineAnimStates[matrixNum].delayCounter = frameCmd.duration;
|
||||
if (sprite->flags_f)
|
||||
obj_update_pos2(sprite, sprite->data6, sprite->data7);
|
||||
obj_update_pos2(sprite, sprite->data[6], sprite->data[7]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1101,7 +1094,7 @@ void ContinueAffineAnim(struct Sprite *sprite)
|
||||
sAffineAnimCmdFuncs[funcIndex](matrixNum, sprite);
|
||||
}
|
||||
if (sprite->flags_f)
|
||||
obj_update_pos2(sprite, sprite->data6, sprite->data7);
|
||||
obj_update_pos2(sprite, sprite->data[6], sprite->data[7]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1197,8 +1190,8 @@ u8 GetSpriteMatrixNum(struct Sprite *sprite)
|
||||
|
||||
void sub_8007E18(struct Sprite* sprite, s16 a2, s16 a3)
|
||||
{
|
||||
sprite->data6 = a2;
|
||||
sprite->data7 = a3;
|
||||
sprite->data[6] = a2;
|
||||
sprite->data[7] = a3;
|
||||
sprite->flags_f = 1;
|
||||
}
|
||||
|
||||
|
@ -170,20 +170,20 @@ void CB2_ChooseStarter(void)
|
||||
|
||||
// Create hand sprite
|
||||
spriteId = CreateSprite(&sSpriteTemplate_Hand, 120, 56, 2);
|
||||
gSprites[spriteId].data0 = taskId;
|
||||
gSprites[spriteId].data[0] = taskId;
|
||||
|
||||
// Create three Pokeball sprites
|
||||
spriteId = CreateSprite(&sSpriteTemplate_PokeBall, sPokeballCoords[0][0], sPokeballCoords[0][1], 2);
|
||||
gSprites[spriteId].data0 = taskId;
|
||||
gSprites[spriteId].data1 = 0;
|
||||
gSprites[spriteId].data[0] = taskId;
|
||||
gSprites[spriteId].data[1] = 0;
|
||||
|
||||
spriteId = CreateSprite(&sSpriteTemplate_PokeBall, sPokeballCoords[1][0], sPokeballCoords[1][1], 2);
|
||||
gSprites[spriteId].data0 = taskId;
|
||||
gSprites[spriteId].data1 = 1;
|
||||
gSprites[spriteId].data[0] = taskId;
|
||||
gSprites[spriteId].data[1] = 1;
|
||||
|
||||
spriteId = CreateSprite(&sSpriteTemplate_PokeBall, sPokeballCoords[2][0], sPokeballCoords[2][1], 2);
|
||||
gSprites[spriteId].data0 = taskId;
|
||||
gSprites[spriteId].data1 = 2;
|
||||
gSprites[spriteId].data[0] = taskId;
|
||||
gSprites[spriteId].data[1] = 2;
|
||||
|
||||
sStarterChooseWindowId = 0xFF;
|
||||
}
|
||||
@ -363,15 +363,15 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y)
|
||||
|
||||
static void sub_81346DC(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = gUnknown_085B1E28[gTasks[sprite->data0].tStarterSelection][0];
|
||||
sprite->pos1.y = gUnknown_085B1E28[gTasks[sprite->data0].tStarterSelection][1];
|
||||
sprite->pos2.y = Sin(sprite->data1, 8);
|
||||
sprite->data1 = (u8)(sprite->data1) + 4;
|
||||
sprite->pos1.x = gUnknown_085B1E28[gTasks[sprite->data[0]].tStarterSelection][0];
|
||||
sprite->pos1.y = gUnknown_085B1E28[gTasks[sprite->data[0]].tStarterSelection][1];
|
||||
sprite->pos2.y = Sin(sprite->data[1], 8);
|
||||
sprite->data[1] = (u8)(sprite->data[1]) + 4;
|
||||
}
|
||||
|
||||
static void sub_813473C(struct Sprite *sprite)
|
||||
{
|
||||
if (gTasks[sprite->data0].tStarterSelection == sprite->data1)
|
||||
if (gTasks[sprite->data[0]].tStarterSelection == sprite->data[1])
|
||||
StartSpriteAnimIfDifferent(sprite, 1);
|
||||
else
|
||||
StartSpriteAnimIfDifferent(sprite, 0);
|
||||
|