mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Start porting ruby battle anim file
This commit is contained in:
parent
b9e38a569e
commit
54fc92bc92
File diff suppressed because it is too large
Load Diff
@ -183,7 +183,7 @@ sub_80FE988: @ 80FE988
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldrh r0, [r6, 0x6]
|
||||
strh r0, [r4, 0x38]
|
||||
ldr r1, =sub_80FE9E4
|
||||
@ -200,7 +200,7 @@ sub_80FE988: @ 80FE988
|
||||
sub_80FE9E4: @ 80FE9E4
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080FE9FA
|
||||
@ -350,7 +350,7 @@ sub_80FEAD8: @ 80FEAD8
|
||||
sub_80FEB28: @ 80FEB28
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080FEB3C
|
||||
@ -541,7 +541,7 @@ _080FEC68:
|
||||
sub_80FECB8: @ 80FECB8
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080FECE2
|
||||
@ -781,7 +781,7 @@ sub_80FEE78: @ 80FEE78
|
||||
adds r0, r5
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
movs r0, 0x40
|
||||
strh r0, [r4, 0x38]
|
||||
ldr r1, =sub_80FEECC
|
||||
@ -798,7 +798,7 @@ sub_80FEE78: @ 80FEE78
|
||||
sub_80FEECC: @ 80FEECC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080FEF38
|
||||
@ -878,7 +878,7 @@ sub_80FEF44: @ 80FEF44
|
||||
adds r0, r5
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
movs r0, 0x40
|
||||
strh r0, [r4, 0x38]
|
||||
ldr r1, =sub_80FEF98
|
||||
@ -895,7 +895,7 @@ sub_80FEF44: @ 80FEF44
|
||||
sub_80FEF98: @ 80FEF98
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080FEFF0
|
||||
@ -1175,7 +1175,7 @@ sub_80FF1C0: @ 80FF1C0
|
||||
movs r0, 0x1
|
||||
strh r0, [r6, 0x2E]
|
||||
adds r0, r6, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
ldrh r0, [r6, 0x3C]
|
||||
strh r5, [r6, 0x2E]
|
||||
lsls r4, 16
|
||||
@ -3161,7 +3161,7 @@ _08100180:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08100196
|
||||
@ -3190,7 +3190,7 @@ _081001B4:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081001CA
|
||||
@ -3219,7 +3219,7 @@ _081001E6:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081001FC
|
||||
@ -3272,7 +3272,7 @@ _08100254:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0810026A
|
||||
@ -3403,7 +3403,7 @@ _08100362:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08100378
|
||||
@ -3514,7 +3514,7 @@ _08100448:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081004FC
|
||||
@ -3566,7 +3566,7 @@ _081004B6:
|
||||
adds r1, r2, 0
|
||||
bl sub_8100524
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081004FC
|
||||
@ -4869,7 +4869,7 @@ _08100F06:
|
||||
ldr r6, =gBattleAnimAttacker
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
ldr r4, =gBattleAnimArgs
|
||||
lsrs r0, 24
|
||||
@ -4878,7 +4878,7 @@ _08100F06:
|
||||
strh r0, [r5, 0x20]
|
||||
ldrb r0, [r6]
|
||||
movs r1, 0x1
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r4, [r4, 0x2]
|
||||
@ -9082,7 +9082,7 @@ _08103074:
|
||||
subs r0, 0x28
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldrh r0, [r5, 0x6]
|
||||
strh r0, [r4, 0x38]
|
||||
ldr r0, =sub_81030B0
|
||||
@ -9097,7 +9097,7 @@ _08103074:
|
||||
sub_81030B0: @ 81030B0
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08103100
|
||||
@ -11528,7 +11528,7 @@ _08104448:
|
||||
adds r0, r6
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldrh r0, [r7]
|
||||
strh r0, [r5, 0x38]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
@ -11548,7 +11548,7 @@ _08104448:
|
||||
sub_81044BC: @ 81044BC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08104520
|
||||
@ -11659,7 +11659,7 @@ _0810458A:
|
||||
sub_8104594: @ 8104594
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081045A8
|
||||
@ -12761,7 +12761,7 @@ sub_8104E74: @ 8104E74
|
||||
adds r5, r1, r0
|
||||
ldr r4, =gBattleAnimTarget
|
||||
ldrb r0, [r4]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x20
|
||||
@ -12969,7 +12969,7 @@ sub_810501C: @ 810501C
|
||||
movs r5, 0
|
||||
strh r0, [r4, 0x20]
|
||||
ldrb r0, [r6]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x10
|
||||
@ -13271,7 +13271,7 @@ _0810526A:
|
||||
sub_8105284: @ 8105284
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810529E
|
||||
@ -13526,7 +13526,7 @@ _0810549E:
|
||||
ldrh r0, [r2]
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r1, =sub_8105284
|
||||
str r1, [r5, 0x1C]
|
||||
adds r0, r5, 0
|
||||
@ -15088,7 +15088,7 @@ sub_8106140: @ 8106140
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =sub_810618C
|
||||
str r0, [r4, 0x1C]
|
||||
pop {r4,r5}
|
||||
@ -15101,7 +15101,7 @@ sub_8106140: @ 8106140
|
||||
sub_810618C: @ 810618C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081061B6
|
||||
@ -17269,7 +17269,7 @@ _081072D8:
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x36]
|
||||
adds r0, r6, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
bl CreateInvisibleSpriteWithCallback
|
||||
adds r4, r0, 0
|
||||
@ -17339,7 +17339,7 @@ sub_8107380: @ 8107380
|
||||
movs r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r5, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
mov r1, r8
|
||||
lsrs r6, r1, 8
|
||||
movs r0, 0x2E
|
||||
@ -17464,7 +17464,7 @@ _08107482:
|
||||
adds r0, r7
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =sub_81074E4
|
||||
str r0, [r5, 0x1C]
|
||||
adds r2, r5, 0
|
||||
@ -17502,7 +17502,7 @@ sub_81074E4: @ 81074E4
|
||||
strb r0, [r2]
|
||||
_08107506:
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08107518
|
||||
@ -17637,7 +17637,7 @@ sub_81075EC: @ 81075EC
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
movs r0, 0x2E
|
||||
ldrsh r1, [r5, r0]
|
||||
movs r0, 0xD2
|
||||
@ -17678,7 +17678,7 @@ _08107660:
|
||||
sub_8107674: @ 8107674
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08107688
|
||||
@ -20234,7 +20234,7 @@ _08108B1A:
|
||||
sub_8108B2C: @ 8108B2C
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08108B86
|
||||
@ -20283,7 +20283,7 @@ _08108B86:
|
||||
sub_8108B94: @ 8108B94
|
||||
push {r4-r6,lr}
|
||||
adds r5, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08108BD0
|
||||
@ -21144,7 +21144,7 @@ sub_8109244: @ 8109244
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =sub_810929C
|
||||
str r0, [r5, 0x1C]
|
||||
_0810928E:
|
||||
@ -21158,7 +21158,7 @@ _0810928E:
|
||||
sub_810929C: @ 810929C
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081092E4
|
||||
@ -22386,7 +22386,7 @@ _08109C3E:
|
||||
sub_8109C4C: @ 8109C4C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08109CA4
|
||||
@ -23433,7 +23433,7 @@ sub_810A46C: @ 810A46C
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldrh r0, [r5, 0x4]
|
||||
strh r0, [r4, 0x38]
|
||||
ldrh r0, [r5, 0xA]
|
||||
@ -23468,7 +23468,7 @@ sub_810A46C: @ 810A46C
|
||||
sub_810A4F4: @ 810A4F4
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0810A55E
|
||||
@ -24336,7 +24336,7 @@ sub_810AB78: @ 810AB78
|
||||
strh r0, [r4, 0x36]
|
||||
strh r6, [r4, 0x38]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r1, =sub_810ACC0
|
||||
adds r0, r4, 0
|
||||
bl StoreSpriteCallbackInData6
|
||||
@ -24394,7 +24394,7 @@ _0810AC86:
|
||||
sub_810AC8C: @ 810AC8C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810ACB4
|
||||
@ -26828,7 +26828,7 @@ _0810BFCC:
|
||||
adds r0, r1
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
movs r0, 0x40
|
||||
strh r0, [r5, 0x38]
|
||||
ldr r1, =sub_810C008
|
||||
@ -26845,7 +26845,7 @@ _0810BFCC:
|
||||
sub_810C008: @ 810C008
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0810C092
|
||||
@ -27608,7 +27608,7 @@ _0810C684:
|
||||
strb r0, [r1]
|
||||
_0810C6B8:
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =sub_810C6D4
|
||||
str r0, [r5, 0x1C]
|
||||
pop {r3}
|
||||
@ -27642,7 +27642,7 @@ _0810C6F4:
|
||||
b _0810C90C
|
||||
_0810C6F6:
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
ldr r1, =gSineTable
|
||||
movs r2, 0x38
|
||||
ldrsh r0, [r4, r2]
|
||||
@ -27731,12 +27731,12 @@ _0810C78E:
|
||||
ands r0, r1
|
||||
strh r0, [r4, 0x38]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
b _0810C90C
|
||||
.pool
|
||||
_0810C7BC:
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
ldr r1, =gSineTable
|
||||
movs r2, 0x38
|
||||
ldrsh r0, [r4, r2]
|
||||
@ -27872,7 +27872,7 @@ _0810C8B6:
|
||||
.pool
|
||||
_0810C8D0:
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810C90C
|
||||
@ -28414,7 +28414,7 @@ _0810CCCE:
|
||||
sub_810CD1C: @ 810CD1C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810CD3E
|
||||
@ -29021,7 +29021,7 @@ _0810D1FE:
|
||||
strh r0, [r6, 0x34]
|
||||
strh r0, [r6, 0x36]
|
||||
adds r0, r6, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldrh r0, [r4, 0xA]
|
||||
strh r0, [r6, 0x38]
|
||||
ldrh r0, [r4, 0x8]
|
||||
@ -29039,7 +29039,7 @@ _0810D1FE:
|
||||
sub_810D240: @ 810D240
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0810D26C
|
||||
@ -29616,7 +29616,7 @@ sub_810D6A8: @ 810D6A8
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r1, =move_anim_8074EE0
|
||||
adds r0, r4, 0
|
||||
bl StoreSpriteCallbackInData6
|
||||
@ -29892,7 +29892,7 @@ _0810D918:
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r1, =DestroyAnimSprite
|
||||
adds r0, r5, 0
|
||||
bl StoreSpriteCallbackInData6
|
||||
@ -30234,7 +30234,7 @@ _0810DBC2:
|
||||
sub_810DC10: @ 810DC10
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810DC24
|
||||
@ -30309,7 +30309,7 @@ _0810DC72:
|
||||
sub_810DCB4: @ 810DCB4
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810DCC8
|
||||
@ -30716,7 +30716,7 @@ _0810DFC8:
|
||||
adds r0, r4
|
||||
strh r0, [r6, 0x36]
|
||||
adds r0, r6, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =sub_80A67BC
|
||||
str r0, [r6, 0x1C]
|
||||
ldr r1, =sub_810E028
|
||||
@ -30732,7 +30732,7 @@ _0810DFC8:
|
||||
sub_810E028: @ 810E028
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810E03C
|
||||
@ -30971,7 +30971,7 @@ _0810E1FE:
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x36]
|
||||
adds r0, r5, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
ldr r0, =sub_810E24C
|
||||
str r0, [r5, 0x1C]
|
||||
pop {r4,r5}
|
||||
@ -30987,7 +30987,7 @@ sub_810E24C: @ 810E24C
|
||||
movs r0, 0x1
|
||||
strh r0, [r4, 0x2E]
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
ldrh r1, [r4, 0x34]
|
||||
lsrs r0, r1, 8
|
||||
cmp r0, 0xC8
|
||||
@ -34508,7 +34508,7 @@ _0810FDE8:
|
||||
sub_810FDF0: @ 810FDF0
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0810FE0E
|
||||
@ -34537,7 +34537,7 @@ sub_810FE14: @ 810FE14
|
||||
adds r4, r1, r0
|
||||
ldr r0, =gBattleAnimTarget
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
adds r0, r1, 0
|
||||
@ -35235,7 +35235,7 @@ _081103C4:
|
||||
ldr r5, =gBattleAnimTarget
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
ldr r4, =gBattleAnimArgs
|
||||
lsrs r0, 24
|
||||
@ -35244,7 +35244,7 @@ _081103C4:
|
||||
strh r0, [r6, 0x20]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r4, 0x2]
|
||||
@ -35314,7 +35314,7 @@ _08110478:
|
||||
ldr r5, =gBattleAnimTarget
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x2
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
ldr r4, =gBattleAnimArgs
|
||||
lsrs r0, 24
|
||||
@ -35323,7 +35323,7 @@ _08110478:
|
||||
strh r0, [r6, 0x20]
|
||||
ldrb r0, [r5]
|
||||
movs r1, 0x3
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r4, 0x2]
|
||||
@ -35426,7 +35426,7 @@ _0811055A:
|
||||
sub_811057C: @ 811057C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08110592
|
||||
@ -35844,7 +35844,7 @@ sub_81108CC: @ 81108CC
|
||||
ands r1, r0
|
||||
strb r1, [r2]
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081108F8
|
||||
@ -35879,7 +35879,7 @@ _0811090E:
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08110988
|
||||
@ -37059,7 +37059,7 @@ _08111304:
|
||||
sub_811131C: @ 811131C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0811134E
|
||||
@ -37483,7 +37483,7 @@ sub_8111674: @ 8111674
|
||||
adds r4, r0, 0
|
||||
bl sub_8111764
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08111694
|
||||
@ -37541,7 +37541,7 @@ sub_81116E8: @ 81116E8
|
||||
movs r0, 0x1
|
||||
strh r0, [r4, 0x2E]
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
movs r1, 0x38
|
||||
ldrsh r0, [r4, r1]
|
||||
movs r1, 0xA
|
||||
@ -40203,7 +40203,7 @@ sub_8112C6C: @ 8112C6C
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x1A]
|
||||
ldrb r0, [r5]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x1C]
|
||||
@ -41135,7 +41135,7 @@ _0811342A:
|
||||
strb r5, [r0, 0x9]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r1, r0, 0
|
||||
@ -42031,7 +42031,7 @@ _08113B60:
|
||||
sub_8113B90: @ 8113B90
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08113BA4
|
||||
@ -43699,7 +43699,7 @@ sub_8114994: @ 8114994
|
||||
sub_81149FC: @ 81149FC
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08114A50
|
||||
@ -43746,7 +43746,7 @@ _08114A50:
|
||||
sub_8114A60: @ 8114A60
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08114A74
|
||||
@ -43817,13 +43817,13 @@ sub_8114AF0: @ 8114AF0
|
||||
ldr r4, =gBattleAnimTarget
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x2
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x3
|
||||
bl sub_80A60AC
|
||||
bl GetBattlerSpriteCoord2
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
bl Random2
|
||||
@ -44120,7 +44120,7 @@ _08114D78:
|
||||
strh r0, [r4, 0x22]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r1, r0, 0
|
||||
@ -44460,7 +44460,7 @@ _08115046:
|
||||
strh r0, [r4, 0x20]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r1, r0, 0
|
||||
@ -44663,7 +44663,7 @@ _081151DA:
|
||||
adds r0, r6
|
||||
strh r0, [r5, 0x20]
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x1E
|
||||
@ -44693,7 +44693,7 @@ _081151DA:
|
||||
sub_8115228: @ 8115228
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0811523C
|
||||
@ -44735,7 +44735,7 @@ _08115262:
|
||||
adds r0, r1
|
||||
strh r0, [r6, 0x20]
|
||||
adds r0, r5, 0
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r0, 0x20
|
||||
|
@ -816,7 +816,7 @@ _0815A6F8:
|
||||
sub_815A73C: @ 815A73C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0815A75E
|
||||
@ -1625,7 +1625,7 @@ _0815ADDC:
|
||||
ldr r4, =gBattleAnimTarget
|
||||
_0815ADDE:
|
||||
ldrb r0, [r4]
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
ldrb r0, [r4]
|
||||
@ -6104,7 +6104,7 @@ _0815D26E:
|
||||
strh r0, [r4, 0x18]
|
||||
_0815D2A0:
|
||||
adds r0, r5, 0
|
||||
bl sub_80A6190
|
||||
bl GetBattlerYCoordWithElevation
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
subs r0, 0x22
|
||||
@ -8524,7 +8524,7 @@ _0815E5FE:
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
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 AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0815E6D2
|
||||
@ -9804,11 +9804,11 @@ _0815F022:
|
||||
strh r0, [r4, 0x34]
|
||||
strh r1, [r4, 0x36]
|
||||
adds r0, r4, 0
|
||||
bl obj_translate_based_on_private_1_2_3_4
|
||||
bl InitAnimLinearTranslation
|
||||
b _0815F0F8
|
||||
_0815F038:
|
||||
adds r0, r4, 0
|
||||
bl sub_80A6F3C
|
||||
bl TranslateAnimLinear
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0815F106
|
||||
|
@ -1487,7 +1487,7 @@ sub_8171134: @ 8171134
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081711D2
|
||||
@ -2671,7 +2671,7 @@ sub_8171AAC: @ 8171AAC
|
||||
orrs r0, r1
|
||||
strb r0, [r3]
|
||||
adds r0, r4, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08171ADC
|
||||
@ -5652,7 +5652,7 @@ _081733C0:
|
||||
sub_81733D4: @ 81733D4
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl AnimateBallThrow
|
||||
bl TranslateAnimArc
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081733F6
|
||||
|
@ -1,34 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_08525F58:: @ 8525F58
|
||||
.byte 0x48, 0x50, 0x00, 0x00, 0xb0, 0x28, 0x00, 0x00
|
||||
.byte 0x30, 0x28, 0x00, 0x00, 0x70, 0x50, 0x00, 0x00
|
||||
.byte 0x20, 0x50, 0x00, 0x00, 0xc8, 0x28, 0x00, 0x00
|
||||
.byte 0x5a, 0x58, 0x00, 0x00, 0x98, 0x20, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gCastformFrontSpriteCoords:: @ 8525F78
|
||||
.byte 0x44, 0x11, 0x00, 0x00, 0x66, 0x09, 0x00, 0x00
|
||||
.byte 0x46, 0x09, 0x00, 0x00, 0x86, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08525F88:: @ 8525F88
|
||||
.byte 0x0d, 0x0e, 0x0d, 0x0d
|
||||
|
||||
.align 2
|
||||
gUnknown_08525F8C:: @ 8525F8C
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08525F90:: @ 8525F90
|
||||
spr_template 0xd755, 0xd755, gUnknown_0852497C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
spr_template 0xd756, 0xd756, gUnknown_0852497C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_08525FC0:: @ 8525FC0
|
||||
obj_tiles gMiscBlank_Gfx, 0x0800, 0xd755
|
||||
obj_tiles gMiscBlank_Gfx, 0x0800, 0xd756
|
@ -72,17 +72,20 @@ 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 TranslateAnimLinear(struct Sprite *sprite);
|
||||
void sub_80A8278(void);
|
||||
void sub_80A6B30(struct UnknownAnimStruct2*);
|
||||
void sub_80A6B90(struct UnknownAnimStruct2*, u32 arg1);
|
||||
u8 sub_80A82E4(u8 battlerId);
|
||||
bool8 AnimateBallThrow(struct Sprite *sprite);
|
||||
bool8 TranslateAnimArc(struct Sprite *sprite);
|
||||
|
||||
enum
|
||||
{
|
||||
BANK_X_POS,
|
||||
BANK_Y_POS,
|
||||
BATTLER_COORD_X,
|
||||
BATTLER_COORD_Y,
|
||||
BATTLER_COORD_X_2,
|
||||
BATTLER_COORD_3,
|
||||
BATTLER_COORD_4,
|
||||
};
|
||||
|
||||
u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId);
|
||||
@ -107,6 +110,6 @@ u8 ItemIdToBallId(u16 itemId);
|
||||
u8 LaunchBallStarsTask(u8 x, u8 y, u8 kindOfStars, u8 arg3, u8 ballId);
|
||||
u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 arg2, u8 ballId);
|
||||
|
||||
u8 sub_80A600C(u8, u16, u8);
|
||||
u8 GetBattlerSpriteFinal_Y(u8, u16, u8);
|
||||
|
||||
#endif // GUARD_BATTLE_ANIM_H
|
||||
|
@ -239,14 +239,13 @@ struct Shared18000
|
||||
|
||||
struct ContestStruct_field_18
|
||||
{
|
||||
// unknown size
|
||||
u16 field_0;
|
||||
u16 field_2;
|
||||
u16 field_4;
|
||||
u16 field_6;
|
||||
u32 field_8;
|
||||
u32 field_C;
|
||||
u32 field_10;
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u8 unk4_0:1;
|
||||
u8 unk5;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
};
|
||||
|
||||
struct Contest
|
||||
@ -411,6 +410,7 @@ extern struct ContestResources *gContestResources;
|
||||
#define eContestAI (gContestResources->field_C)
|
||||
#define shared19328 (*gContestResources->field_10)
|
||||
#define shared19338 (*gContestResources->field_14)
|
||||
#define shared19348 (*gContestResources->field_18)
|
||||
|
||||
#define shared15800 (gHeap + 0x18000)
|
||||
#define shared18000 (*(struct Shared18000 *)(gHeap + 0x1a000))
|
||||
|
@ -111,6 +111,7 @@ SECTIONS {
|
||||
src/palette.o(.text);
|
||||
src/sound.o(.text);
|
||||
src/battle_anim.o(.text);
|
||||
src/battle_anim_80A5C6C.o(.text);
|
||||
asm/battle_anim_80A5C6C.o(.text);
|
||||
src/task.o(.text);
|
||||
src/reshow_battle_screen.o(.text);
|
||||
@ -420,7 +421,7 @@ SECTIONS {
|
||||
data/fanfares.o(.rodata);
|
||||
data/battle_anims.o(.rodata);
|
||||
src/battle_anim.o(.rodata);
|
||||
data/rom_8525F58.o(.rodata);
|
||||
src/battle_anim_80A5C6C.o(.rodata);
|
||||
data/map_events.o(.rodata);
|
||||
data/battle_anim_80A9C70.o(.rodata);
|
||||
src/title_screen.o(.rodata);
|
||||
|
@ -234,7 +234,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
gAnimBattlerSpecies[i] = gContestResources->field_18->field_0;
|
||||
gAnimBattlerSpecies[i] = gContestResources->field_18->unk0;
|
||||
}
|
||||
|
||||
if (!isMoveAnim)
|
||||
@ -691,7 +691,7 @@ void sub_80A438C(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||
battlerSpriteId = gBattlerSpriteIds[battlerId];
|
||||
|
||||
gBattle_BG1_X = -(gSprites[battlerSpriteId].pos1.x + gSprites[battlerSpriteId].pos2.x) + 0x20;
|
||||
if (IsContest() && IsSpeciesNotUnown(gContestResources->field_18->field_0))
|
||||
if (IsContest() && IsSpeciesNotUnown(gContestResources->field_18->unk0))
|
||||
gBattle_BG1_X--;
|
||||
|
||||
gBattle_BG1_Y = -(gSprites[battlerSpriteId].pos1.y + gSprites[battlerSpriteId].pos2.y) + 0x20;
|
||||
@ -749,7 +749,7 @@ static void sub_80A46A0(void)
|
||||
struct UnknownAnimStruct2 unknownStruct;
|
||||
u16 *ptr;
|
||||
|
||||
if (IsSpeciesNotUnown(gContestResources->field_18->field_0))
|
||||
if (IsSpeciesNotUnown(gContestResources->field_18->unk0))
|
||||
{
|
||||
sub_80A6B30(&unknownStruct);
|
||||
ptr = unknownStruct.unk4;
|
||||
|
741
src/battle_anim_80A5C6C.c
Normal file
741
src/battle_anim_80A5C6C.c
Normal file
@ -0,0 +1,741 @@
|
||||
#include "global.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/species.h"
|
||||
#include "battle.h"
|
||||
#include "battle_anim.h"
|
||||
#include "blend_palette.h"
|
||||
#include "contest.h"
|
||||
#include "data2.h"
|
||||
#include "decompress.h"
|
||||
#include "palette.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "util.h"
|
||||
#include "gpu_regs.h"
|
||||
|
||||
#define GET_UNOWN_LETTER(personality) ((\
|
||||
(((personality & 0x03000000) >> 24) << 6) \
|
||||
| (((personality & 0x00030000) >> 16) << 4) \
|
||||
| (((personality & 0x00000300) >> 8) << 2) \
|
||||
| (((personality & 0x00000003) >> 0) << 0) \
|
||||
) % 28)
|
||||
|
||||
#define IS_DOUBLE_BATTLE() ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||
|
||||
extern const struct OamData gUnknown_0852497C;
|
||||
extern const struct MonCoords gMonFrontPicCoords[];
|
||||
extern const struct MonCoords gMonBackPicCoords[];
|
||||
extern const u8 gEnemyMonElevation[];
|
||||
|
||||
// This file's functions.
|
||||
void sub_80A64EC(struct Sprite *sprite);
|
||||
void sub_80A653C(struct Sprite *sprite);
|
||||
void InitAnimLinearTranslation(struct Sprite *sprite);
|
||||
bool8 TranslateAnimLinear(struct Sprite *sprite);
|
||||
|
||||
// Const rom data
|
||||
const struct UCoords8 sBattlerCoords[][4] =
|
||||
{
|
||||
{
|
||||
{ 72, 80 },
|
||||
{ 176, 40 },
|
||||
{ 48, 40 },
|
||||
{ 112, 80 },
|
||||
},
|
||||
{
|
||||
{ 32, 80 },
|
||||
{ 200, 40 },
|
||||
{ 90, 88 },
|
||||
{ 152, 32 },
|
||||
},
|
||||
};
|
||||
|
||||
// One entry for each of the four Castform forms.
|
||||
const struct MonCoords gCastformFrontSpriteCoords[] =
|
||||
{
|
||||
{ 0x44, 17 }, // NORMAL
|
||||
{ 0x66, 9 }, // SUN
|
||||
{ 0x46, 9 }, // RAIN
|
||||
{ 0x86, 8 }, // HAIL
|
||||
};
|
||||
|
||||
const u8 gCastformElevations[] =
|
||||
{
|
||||
13, // NORMAL
|
||||
14, // SUN
|
||||
13, // RAIN
|
||||
13, // HAIL
|
||||
};
|
||||
|
||||
// Y position of the backsprite for each of the four Castform forms.
|
||||
const u8 gCastformBackSpriteYCoords[] =
|
||||
{
|
||||
0, // NORMAL
|
||||
0, // SUN
|
||||
0, // RAIN
|
||||
0, // HAIL
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08525F90[] =
|
||||
{
|
||||
{
|
||||
.tileTag = 55125,
|
||||
.paletteTag = 55125,
|
||||
.oam = &gUnknown_0852497C,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
},
|
||||
{
|
||||
.tileTag = 55126,
|
||||
.paletteTag = 55126,
|
||||
.oam = &gUnknown_0852497C,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
}
|
||||
};
|
||||
|
||||
const struct SpriteSheet gUnknown_08525FC0[] =
|
||||
{
|
||||
{ gMiscBlank_Gfx, 0x800, 55125, },
|
||||
{ gMiscBlank_Gfx, 0x800, 55126, },
|
||||
};
|
||||
|
||||
// code
|
||||
u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId)
|
||||
{
|
||||
u8 retVal;
|
||||
u16 species;
|
||||
struct BattleSpriteInfo *spriteInfo;
|
||||
|
||||
if (IsContest())
|
||||
{
|
||||
if (attributeId == BATTLER_COORD_3 && battlerId == 3)
|
||||
attributeId = BATTLER_COORD_Y;
|
||||
}
|
||||
|
||||
switch (attributeId)
|
||||
{
|
||||
case BATTLER_COORD_X:
|
||||
case BATTLER_COORD_X_2:
|
||||
retVal = sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].x;
|
||||
break;
|
||||
case BATTLER_COORD_Y:
|
||||
retVal = sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].y;
|
||||
break;
|
||||
case BATTLER_COORD_3:
|
||||
case BATTLER_COORD_4:
|
||||
default:
|
||||
if (IsContest())
|
||||
{
|
||||
if (shared19348.unk4_0)
|
||||
species = shared19348.unk2;
|
||||
else
|
||||
species = shared19348.unk0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
else
|
||||
species = spriteInfo[battlerId].transformSpecies;
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
else
|
||||
species = spriteInfo[battlerId].transformSpecies;
|
||||
}
|
||||
}
|
||||
if (attributeId == BATTLER_COORD_3)
|
||||
retVal = GetBattlerSpriteFinal_Y(battlerId, species, TRUE);
|
||||
else
|
||||
retVal = GetBattlerSpriteFinal_Y(battlerId, species, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
u8 GetBattlerYDelta(u8 battlerId, u16 species)
|
||||
{
|
||||
u16 letter;
|
||||
u32 personality;
|
||||
struct BattleSpriteInfo *spriteInfo;
|
||||
u8 ret;
|
||||
u16 coordSpecies;
|
||||
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER || IsContest())
|
||||
{
|
||||
if (species == SPECIES_UNOWN)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
if (shared19348.unk4_0)
|
||||
personality = shared19348.unk10;
|
||||
else
|
||||
personality = shared19348.unk8;
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
personality = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY);
|
||||
else
|
||||
personality = gTransformedPersonalities[battlerId];
|
||||
}
|
||||
letter = GET_UNOWN_LETTER(personality);
|
||||
if (!letter)
|
||||
coordSpecies = species;
|
||||
else
|
||||
coordSpecies = letter + SPECIES_UNOWN_B - 1;
|
||||
ret = gMonBackPicCoords[coordSpecies].y_offset;
|
||||
}
|
||||
else if (species == SPECIES_CASTFORM)
|
||||
{
|
||||
ret = gCastformBackSpriteYCoords[gBattleMonForms[battlerId]];
|
||||
}
|
||||
else if (species > NUM_SPECIES)
|
||||
{
|
||||
ret = gMonBackPicCoords[0].y_offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = gMonBackPicCoords[species].y_offset;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (species == SPECIES_UNOWN)
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_PERSONALITY);
|
||||
else
|
||||
personality = gTransformedPersonalities[battlerId];
|
||||
letter = GET_UNOWN_LETTER(personality);
|
||||
if (!letter)
|
||||
coordSpecies = species;
|
||||
else
|
||||
coordSpecies = letter + SPECIES_UNOWN_B - 1;
|
||||
ret = gMonFrontPicCoords[coordSpecies].y_offset;
|
||||
}
|
||||
else if (species == SPECIES_CASTFORM)
|
||||
{
|
||||
ret = gCastformFrontSpriteCoords[gBattleMonForms[battlerId]].y_offset;
|
||||
}
|
||||
else if (species > NUM_SPECIES)
|
||||
{
|
||||
ret = gMonFrontPicCoords[0].y_offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = gMonFrontPicCoords[species].y_offset;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 GetBattlerElevation(u8 battlerId, u16 species)
|
||||
{
|
||||
u8 ret = 0;
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
{
|
||||
if (!IsContest())
|
||||
{
|
||||
if (species == SPECIES_CASTFORM)
|
||||
ret = gCastformElevations[gBattleMonForms[battlerId]];
|
||||
else if (species > NUM_SPECIES)
|
||||
ret = gEnemyMonElevation[0];
|
||||
else
|
||||
ret = gEnemyMonElevation[species];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 GetBattlerSpriteFinal_Y(u8 battlerId, u16 species, bool8 a3)
|
||||
{
|
||||
u16 offset;
|
||||
u8 y;
|
||||
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER || IsContest())
|
||||
{
|
||||
offset = GetBattlerYDelta(battlerId, species);
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = GetBattlerYDelta(battlerId, species);
|
||||
offset -= GetBattlerElevation(battlerId, species);
|
||||
}
|
||||
y = offset + sBattlerCoords[IS_DOUBLE_BATTLE()][GetBattlerPosition(battlerId)].y;
|
||||
if (a3)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
||||
y += 8;
|
||||
if (y > 104)
|
||||
y = 104;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
u8 GetBattlerSpriteCoord2(u8 battlerId, u8 attributeId)
|
||||
{
|
||||
u16 species;
|
||||
struct BattleSpriteInfo *spriteInfo;
|
||||
|
||||
if (attributeId == BATTLER_COORD_3 || attributeId == BATTLER_COORD_4)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
if (shared19348.unk4_0)
|
||||
species = shared19348.unk2;
|
||||
else
|
||||
species = shared19348.unk0;
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
species = gAnimBattlerSpecies[battlerId];
|
||||
else
|
||||
species = spriteInfo[battlerId].transformSpecies;
|
||||
}
|
||||
if (attributeId == BATTLER_COORD_3)
|
||||
return GetBattlerSpriteFinal_Y(battlerId, species, TRUE);
|
||||
else
|
||||
return GetBattlerSpriteFinal_Y(battlerId, species, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetBattlerSpriteCoord(battlerId, attributeId);
|
||||
}
|
||||
}
|
||||
|
||||
u8 GetBattlerSpriteDefault_Y(u8 battlerId)
|
||||
{
|
||||
return GetBattlerSpriteCoord(battlerId, BATTLER_COORD_4);
|
||||
}
|
||||
|
||||
u8 GetSubstituteSpriteDefault_Y(u8 battlerId)
|
||||
{
|
||||
u16 y;
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
y = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y) + 16;
|
||||
else
|
||||
y = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y) + 17;
|
||||
return y;
|
||||
}
|
||||
|
||||
u8 GetBattlerYCoordWithElevation(u8 battlerId)
|
||||
{
|
||||
u16 species;
|
||||
u8 y;
|
||||
struct BattleSpriteInfo *spriteInfo;
|
||||
|
||||
y = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y);
|
||||
if (!IsContest())
|
||||
{
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
else
|
||||
species = spriteInfo[battlerId].transformSpecies;
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteInfo = gBattleSpritesDataPtr->battlerData;
|
||||
if (!spriteInfo[battlerId].transformSpecies)
|
||||
species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
else
|
||||
species = spriteInfo[battlerId].transformSpecies;
|
||||
}
|
||||
if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
y -= GetBattlerElevation(battlerId, species);
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
u8 GetAnimBattlerSpriteId(u8 which)
|
||||
{
|
||||
u8 *sprites;
|
||||
|
||||
if (which == ANIM_ATTACKER)
|
||||
{
|
||||
if (IsBattlerSpritePresent(gBattleAnimAttacker))
|
||||
{
|
||||
sprites = gBattlerSpriteIds;
|
||||
return sprites[gBattleAnimAttacker];
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
else if (which == ANIM_TARGET)
|
||||
{
|
||||
if (IsBattlerSpritePresent(gBattleAnimTarget))
|
||||
{
|
||||
sprites = gBattlerSpriteIds;
|
||||
return sprites[gBattleAnimTarget];
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
else if (which == ANIM_ATK_PARTNER)
|
||||
{
|
||||
if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
|
||||
return 0xff;
|
||||
else
|
||||
return gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget)))
|
||||
return gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimTarget)];
|
||||
else
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*callback)(struct Sprite*))
|
||||
{
|
||||
sprite->data[6] = (u32)(callback) & 0xffff;
|
||||
sprite->data[7] = (u32)(callback) >> 16;
|
||||
}
|
||||
|
||||
void SetCallbackToStoredInData6(struct Sprite *sprite)
|
||||
{
|
||||
u32 callback = (u16)sprite->data[6] | (sprite->data[7] << 16);
|
||||
sprite->callback = (void (*)(struct Sprite *))callback;
|
||||
}
|
||||
|
||||
void sub_80A62EC(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[3])
|
||||
{
|
||||
sprite->pos2.x = Sin(sprite->data[0], sprite->data[1]);
|
||||
sprite->pos2.y = Cos(sprite->data[0], sprite->data[1]);
|
||||
sprite->data[0] += sprite->data[2];
|
||||
if (sprite->data[0] >= 0x100)
|
||||
sprite->data[0] -= 0x100;
|
||||
else if (sprite->data[0] < 0)
|
||||
sprite->data[0] += 0x100;
|
||||
sprite->data[3]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A634C(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[3])
|
||||
{
|
||||
sprite->pos2.x = Sin(sprite->data[0], (sprite->data[5] >> 8) + sprite->data[1]);
|
||||
sprite->pos2.y = Cos(sprite->data[0], (sprite->data[5] >> 8) + sprite->data[1]);
|
||||
sprite->data[0] += sprite->data[2];
|
||||
sprite->data[5] += sprite->data[4];
|
||||
if (sprite->data[0] >= 0x100)
|
||||
sprite->data[0] -= 0x100;
|
||||
else if (sprite->data[0] < 0)
|
||||
sprite->data[0] += 0x100;
|
||||
sprite->data[3]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A63C8(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[3])
|
||||
{
|
||||
sprite->pos2.x = Sin(sprite->data[0], sprite->data[1]);
|
||||
sprite->pos2.y = Cos(sprite->data[4], sprite->data[1]);
|
||||
sprite->data[0] += sprite->data[2];
|
||||
sprite->data[4] += sprite->data[5];
|
||||
if (sprite->data[0] >= 0x100)
|
||||
sprite->data[0] -= 0x100;
|
||||
else if (sprite->data[0] < 0)
|
||||
sprite->data[0] += 0x100;
|
||||
if (sprite->data[4] >= 0x100)
|
||||
sprite->data[4] -= 0x100;
|
||||
else if (sprite->data[4] < 0)
|
||||
sprite->data[4] += 0x100;
|
||||
sprite->data[3]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A6450(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[3])
|
||||
{
|
||||
sprite->pos2.x = Sin(sprite->data[0], sprite->data[1]);
|
||||
sprite->pos2.y = Cos(sprite->data[0], sprite->data[4]);
|
||||
sprite->data[0] += sprite->data[2];
|
||||
if (sprite->data[0] >= 0x100)
|
||||
sprite->data[0] -= 0x100;
|
||||
else if (sprite->data[0] < 0)
|
||||
sprite->data[0] += 0x100;
|
||||
sprite->data[3]--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
// Simply waits until the sprite's data[0] hits zero.
|
||||
// This is used to let sprite anims or affine anims to run for a designated
|
||||
// duration.
|
||||
void sub_80A64B0(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
sprite->data[0]--;
|
||||
else
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
|
||||
void sub_80A64D0(struct Sprite *sprite)
|
||||
{
|
||||
sub_80A64EC(sprite);
|
||||
sprite->callback = sub_80A653C;
|
||||
sprite->callback(sprite);
|
||||
}
|
||||
|
||||
void sub_80A64EC(struct Sprite *sprite)
|
||||
{
|
||||
s16 old;
|
||||
int v1;
|
||||
|
||||
if (sprite->data[1] > sprite->data[2])
|
||||
sprite->data[0] = -sprite->data[0];
|
||||
v1 = sprite->data[2] - sprite->data[1];
|
||||
old = sprite->data[0];
|
||||
sprite->data[0] = abs(v1 / sprite->data[0]);
|
||||
sprite->data[2] = (sprite->data[4] - sprite->data[3]) / sprite->data[0];
|
||||
sprite->data[1] = old;
|
||||
}
|
||||
|
||||
void sub_80A653C(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
sprite->pos2.x += sprite->data[1];
|
||||
sprite->pos2.y += sprite->data[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A656C(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->data[4] += sprite->data[2];
|
||||
sprite->pos2.x = sprite->data[3] >> 8;
|
||||
sprite->pos2.y = sprite->data[4] >> 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A65A8(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->data[4] += sprite->data[2];
|
||||
sprite->pos2.x = sprite->data[3] >> 8;
|
||||
sprite->pos2.y = sprite->data[4] >> 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
UpdateMonIconFrame(sprite);
|
||||
}
|
||||
|
||||
void sub_80A65EC(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x + sprite->pos2.x;
|
||||
sprite->data[3] = sprite->pos1.y + sprite->pos2.y;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
sprite->callback = sub_80A64D0;
|
||||
}
|
||||
|
||||
void sub_80A6630(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
gSprites[sprite->data[3]].pos2.x += sprite->data[1];
|
||||
gSprites[sprite->data[3]].pos2.y += sprite->data[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
// Same as sub_80A6630, but it operates on sub-pixel values
|
||||
// to handle slower translations.
|
||||
void sub_80A6680(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
sprite->data[3] += sprite->data[1];
|
||||
sprite->data[4] += sprite->data[2];
|
||||
gSprites[sprite->data[5]].pos2.x = sprite->data[3] >> 8;
|
||||
gSprites[sprite->data[5]].pos2.y = sprite->data[4] >> 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A66DC(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] > 0)
|
||||
{
|
||||
sprite->data[0]--;
|
||||
sprite->pos2.x = sprite->data[2] >> 8;
|
||||
sprite->data[2] += sprite->data[1];
|
||||
sprite->pos2.y = sprite->data[4] >> 8;
|
||||
sprite->data[4] += sprite->data[3];
|
||||
if (sprite->data[0] % sprite->data[5] == 0)
|
||||
{
|
||||
if (sprite->data[5])
|
||||
sprite->invisible ^= 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
void move_anim_8074EE0(struct Sprite *sprite)
|
||||
{
|
||||
FreeSpriteOamMatrix(sprite);
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_80A6760(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x + sprite->pos2.x;
|
||||
sprite->data[3] = sprite->pos1.y + sprite->pos2.y;
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
sprite->callback = sub_80A64D0;
|
||||
}
|
||||
|
||||
void sub_80A67A4(struct Sprite *sprite)
|
||||
{
|
||||
ResetPaletteStructByUid(sprite->data[5]);
|
||||
move_anim_8074EE0(sprite);
|
||||
}
|
||||
|
||||
void sub_80A67BC(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
|
||||
void sub_80A67D8(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
SetCallbackToStoredInData6(sprite);
|
||||
}
|
||||
|
||||
void sub_80A67F4(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_80A6814(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_80A6838(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
}
|
||||
|
||||
void sub_80A6864(struct Sprite *sprite, s16 a2)
|
||||
{
|
||||
u16 v1 = GetBattlerSpriteCoord(gBattleAnimAttacker, 0);
|
||||
u16 v2 = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
|
||||
|
||||
if (v1 > v2)
|
||||
{
|
||||
sprite->pos1.x -= a2;
|
||||
}
|
||||
else if (v1 < v2)
|
||||
{
|
||||
sprite->pos1.x += a2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != 0)
|
||||
sprite->pos1.x -= a2;
|
||||
else
|
||||
sprite->pos1.x += a2;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80A68D4(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
InitAnimLinearTranslation(sprite);
|
||||
sprite->data[6] = 0x8000 / sprite->data[0];
|
||||
sprite->data[7] = 0;
|
||||
}
|
||||
|
||||
bool8 TranslateAnimArc(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimLinear(sprite))
|
||||
return TRUE;
|
||||
sprite->data[7] += sprite->data[6];
|
||||
sprite->pos2.y += Sin((u8)(sprite->data[7] >> 8), sprite->data[5]);
|
||||
return FALSE;
|
||||
}
|
@ -131,7 +131,7 @@ void sub_8158D8C(u8 taskId)
|
||||
if (IsContest())
|
||||
{
|
||||
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
|
||||
species = gContestResources->field_18->field_0;
|
||||
species = gContestResources->field_18->unk0;
|
||||
else
|
||||
DestroyAnimVisualTask(taskId); // UB: function should return upon destroying task.
|
||||
}
|
||||
@ -177,7 +177,7 @@ void sub_8158E9C(u8 taskId)
|
||||
if (IsContest())
|
||||
{
|
||||
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
|
||||
species = gContestResources->field_18->field_0;
|
||||
species = gContestResources->field_18->unk0;
|
||||
else
|
||||
DestroyAnimVisualTask(taskId); // UB: function should return upon destroying task.
|
||||
}
|
||||
@ -281,7 +281,7 @@ void sub_81590B8(u8 taskId)
|
||||
pan = BattleAnimAdjustPanning(PAN_SIDE_PLAYER);
|
||||
|
||||
if (IsContest())
|
||||
species = gContestResources->field_18->field_0;
|
||||
species = gContestResources->field_18->unk0;
|
||||
else
|
||||
species = gAnimBattlerSpecies[gBattleAnimAttacker];
|
||||
|
||||
|
@ -899,14 +899,14 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
||||
if (IsContest())
|
||||
{
|
||||
position = 0;
|
||||
targetSpecies = gContestResources->field_18->field_2;
|
||||
personalityValue = gContestResources->field_18->field_8;
|
||||
otId = gContestResources->field_18->field_C;
|
||||
targetSpecies = gContestResources->field_18->unk2;
|
||||
personalityValue = gContestResources->field_18->unk8;
|
||||
otId = gContestResources->field_18->unkC;
|
||||
|
||||
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[targetSpecies],
|
||||
gMonSpritesGfxPtr->sprites[0],
|
||||
targetSpecies,
|
||||
gContestResources->field_18->field_10);
|
||||
gContestResources->field_18->unk10);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2535,7 +2535,7 @@ u8 sub_80DB174(u16 species, u32 otId, u32 personality, u32 index)
|
||||
LoadCompressedPalette(GetFrontSpritePalFromSpeciesAndPersonality(species, otId, personality), 0x120, 0x20);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, 0);
|
||||
|
||||
spriteId = CreateSprite(&gMultiuseSpriteTemplate, 0x70, sub_80A600C(2, species, 0), 30);
|
||||
spriteId = CreateSprite(&gMultiuseSpriteTemplate, 0x70, GetBattlerSpriteFinal_Y(2, species, FALSE), 30);
|
||||
gSprites[spriteId].oam.paletteNum = 2;
|
||||
gSprites[spriteId].oam.priority = 2;
|
||||
gSprites[spriteId].subpriority = sub_80A82E4(2);
|
||||
|
@ -1,4 +1,4 @@
|
||||
const struct MonCoords gUnknown_083021D8[] =
|
||||
const struct MonCoords gMonBackPicCoords[] =
|
||||
{
|
||||
{0x88, 0x00}, // SPECIES_NONE
|
||||
{0x64, 0x10}, // SPECIES_BULBASAUR
|
||||
|
@ -378,8 +378,8 @@ static void Task_DoPokeballSendOutAnim(u8 taskId)
|
||||
gSprites[ballSpriteId].callback = SpriteCB_PlayerMonSendOut_1;
|
||||
break;
|
||||
case POKEBALL_OPPONENT_SENDOUT:
|
||||
gSprites[ballSpriteId].pos1.x = GetBattlerSpriteCoord(battlerId, BANK_X_POS);
|
||||
gSprites[ballSpriteId].pos1.y = GetBattlerSpriteCoord(battlerId, BANK_Y_POS) + 24;
|
||||
gSprites[ballSpriteId].pos1.x = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X);
|
||||
gSprites[ballSpriteId].pos1.y = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_Y) + 24;
|
||||
gBattlerTarget = battlerId;
|
||||
gSprites[ballSpriteId].data[0] = 0;
|
||||
gSprites[ballSpriteId].callback = SpriteCB_OpponentMonSendOut;
|
||||
@ -399,8 +399,8 @@ static void Task_DoPokeballSendOutAnim(u8 taskId)
|
||||
|
||||
// this will perform an unused ball throw animation
|
||||
gSprites[ballSpriteId].data[0] = 0x22;
|
||||
gSprites[ballSpriteId].data[2] = GetBattlerSpriteCoord(gBattlerTarget, BANK_X_POS);
|
||||
gSprites[ballSpriteId].data[4] = GetBattlerSpriteCoord(gBattlerTarget, BANK_Y_POS) - 16;
|
||||
gSprites[ballSpriteId].data[2] = GetBattlerSpriteCoord(gBattlerTarget, BATTLER_COORD_X);
|
||||
gSprites[ballSpriteId].data[4] = GetBattlerSpriteCoord(gBattlerTarget, BATTLER_COORD_Y) - 16;
|
||||
gSprites[ballSpriteId].data[5] = -40;
|
||||
sub_80A68D4(&gSprites[ballSpriteId]);
|
||||
gSprites[ballSpriteId].oam.affineParam = taskId;
|
||||
@ -411,7 +411,7 @@ static void Task_DoPokeballSendOutAnim(u8 taskId)
|
||||
|
||||
static void SpriteCB_TestBallThrow(struct Sprite *sprite)
|
||||
{
|
||||
if (AnimateBallThrow(sprite))
|
||||
if (TranslateAnimArc(sprite))
|
||||
{
|
||||
u16 ballId;
|
||||
u8 taskId = sprite->oam.affineParam;
|
||||
@ -922,7 +922,7 @@ static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite)
|
||||
StartSpriteAffineAnim(sprite, 4);
|
||||
}
|
||||
r4 = sprite->data[0];
|
||||
sub_80A6F3C(sprite);
|
||||
TranslateAnimLinear(sprite);
|
||||
sprite->data[7] += sprite->sBattler / 3;
|
||||
sprite->pos2.y += Sin(HIBYTE(sprite->data[7]), sprite->data[5]);
|
||||
sprite->oam.affineParam += 0x100;
|
||||
@ -940,7 +940,7 @@ static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AnimateBallThrow(sprite))
|
||||
if (TranslateAnimArc(sprite))
|
||||
{
|
||||
sprite->pos1.x += sprite->pos2.x;
|
||||
sprite->pos1.y += sprite->pos2.y;
|
||||
|
Loading…
Reference in New Issue
Block a user