mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 11:14:15 +01:00
decompile electric.s
This commit is contained in:
parent
d1e6e705cc
commit
60484153a5
@ -5588,14 +5588,14 @@ sub_815CDFC: @ 815CDFC
|
||||
_0815CE36:
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
subs r0, 0x1
|
||||
b _0815CE52
|
||||
.pool
|
||||
_0815CE48:
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
adds r0, 0x1
|
||||
_0815CE52:
|
||||
adds r1, r4, 0
|
||||
@ -7393,7 +7393,7 @@ _0815DCEA:
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x12]
|
||||
adds r0, r4, 0
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x14]
|
||||
@ -8395,7 +8395,7 @@ _0815E4EE:
|
||||
ldrsh r6, [r7, r1]
|
||||
mov r1, r8
|
||||
ldrb r0, [r1]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
adds r3, r0, 0
|
||||
subs r3, 0x5
|
||||
lsls r3, 24
|
||||
@ -10367,7 +10367,7 @@ sub_815F48C: @ 815F48C
|
||||
cmp r0, 0
|
||||
bne _0815F4B8
|
||||
ldrb r0, [r4]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
subs r0, 0x2
|
||||
adds r1, r5, 0
|
||||
adds r1, 0x43
|
||||
@ -10377,7 +10377,7 @@ sub_815F48C: @ 815F48C
|
||||
.pool
|
||||
_0815F4B8:
|
||||
ldrb r0, [r4]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
adds r0, 0x2
|
||||
adds r1, r5, 0
|
||||
adds r1, 0x43
|
||||
@ -11038,7 +11038,7 @@ _0815F9F4:
|
||||
ldrh r6, [r0]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
movs r7, 0
|
||||
|
@ -1357,7 +1357,7 @@ _08103F28:
|
||||
ble _08103FA0
|
||||
ldr r0, =gBattleAnimTarget
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, =0x0000ffc0
|
||||
@ -1374,7 +1374,7 @@ _08103F78:
|
||||
ble _08103FA0
|
||||
ldr r0, =gBattleAnimTarget
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r3, =0x0000ffc0
|
||||
@ -1387,7 +1387,7 @@ _08103F78:
|
||||
_08103FA0:
|
||||
ldr r0, =gBattleAnimTarget
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldrh r1, [r4, 0x8]
|
||||
@ -2246,7 +2246,7 @@ sub_8104674: @ 8104674
|
||||
strh r5, [r4, 0x14]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x16]
|
||||
@ -6256,7 +6256,7 @@ sub_810673C: @ 810673C
|
||||
ldrh r0, [r1, 0x2]
|
||||
strh r0, [r4, 0x30]
|
||||
ldrb r0, [r5]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x3C]
|
||||
@ -6774,7 +6774,7 @@ sub_8106B54: @ 8106B54
|
||||
bl StartSpriteAnim
|
||||
ldr r0, =gBattleAnimTarget
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
subs r0, 0x1
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x43
|
||||
|
2547
asm/electric.s
2547
asm/electric.s
File diff suppressed because it is too large
Load Diff
@ -711,7 +711,7 @@ sub_8107730: @ 8107730
|
||||
ldr r6, =0x0000fff6
|
||||
strh r6, [r4, 0x26]
|
||||
ldrb r0, [r7]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
bl IsContest
|
||||
@ -2286,7 +2286,7 @@ sub_8108408: @ 8108408
|
||||
lsrs r6, r0, 24
|
||||
movs r5, 0xAC
|
||||
ldrb r0, [r4]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
subs r0, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
@ -3517,7 +3517,7 @@ _08108DE2:
|
||||
strh r0, [r4, 0x30]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
subs r0, 0x1
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x43
|
||||
@ -3572,7 +3572,7 @@ _08108E58:
|
||||
strh r0, [r4, 0x30]
|
||||
ldr r0, =gBattleAnimAttacker
|
||||
ldrb r0, [r0]
|
||||
bl sub_80A82E4
|
||||
bl GetBattlerSubpriority
|
||||
subs r0, 0x1
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x43
|
||||
|
@ -106,7 +106,7 @@ void sub_80A8048(s16 *bottom, s16 *top, const void *ptr);
|
||||
void sub_80A8278(void);
|
||||
void sub_80A6B30(struct UnknownAnimStruct2*);
|
||||
void sub_80A6B90(struct UnknownAnimStruct2*, u32 arg1);
|
||||
u8 sub_80A82E4(u8 battlerId);
|
||||
u8 GetBattlerSubpriority(u8 battlerId);
|
||||
bool8 TranslateAnimArc(struct Sprite *sprite);
|
||||
void sub_80A6630(struct Sprite *sprite);
|
||||
void sub_80A6680(struct Sprite *sprite);
|
||||
@ -159,7 +159,6 @@ u8 sub_80A8364(u8 battlerId);
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
||||
void oamt_add_pos2_onto_pos1(struct Sprite *sprite);
|
||||
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
|
||||
u8 sub_80A82E4(u8 battlerId);
|
||||
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
|
||||
|
||||
// battle_anim_80A9C70.s
|
||||
|
@ -161,7 +161,7 @@ SECTIONS {
|
||||
asm/battle_anim_effects_2.o(.text);
|
||||
asm/water.o(.text);
|
||||
src/fire.o(.text);
|
||||
asm/electric.o(.text);
|
||||
src/electric.o(.text);
|
||||
asm/ice.o(.text);
|
||||
src/fight.o(.text);
|
||||
src/poison.o(.text);
|
||||
|
@ -1656,7 +1656,7 @@ static void ScriptCmd_createsprite(void)
|
||||
else
|
||||
argVar *= -1;
|
||||
|
||||
subpriority = sub_80A82E4(gBattleAnimTarget) + (s8)(argVar);
|
||||
subpriority = GetBattlerSubpriority(gBattleAnimTarget) + (s8)(argVar);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1665,7 +1665,7 @@ static void ScriptCmd_createsprite(void)
|
||||
else
|
||||
argVar *= -1;
|
||||
|
||||
subpriority = sub_80A82E4(gBattleAnimAttacker) + (s8)(argVar);
|
||||
subpriority = GetBattlerSubpriority(gBattleAnimAttacker) + (s8)(argVar);
|
||||
}
|
||||
|
||||
if (subpriority < 3)
|
||||
|
@ -47,7 +47,7 @@ void sub_80A7AFC(u8 taskId);
|
||||
void sub_80A8CAC(u8 taskId);
|
||||
void AnimTask_BlendMonInAndOutStep(u8 taskId);
|
||||
bool8 sub_80A7238(void);
|
||||
u8 sub_80A82E4(u8 battlerId);
|
||||
u8 GetBattlerSubpriority(u8 battlerId);
|
||||
void sub_80A8D78(struct Task *task, u8 taskId);
|
||||
|
||||
// EWRAM vars
|
||||
@ -1968,13 +1968,13 @@ void sub_80A8278(void)
|
||||
{
|
||||
if (IsBattlerSpriteVisible(i))
|
||||
{
|
||||
gSprites[gBattlerSpriteIds[i]].subpriority = sub_80A82E4(i);
|
||||
gSprites[gBattlerSpriteIds[i]].subpriority = GetBattlerSubpriority(i);
|
||||
gSprites[gBattlerSpriteIds[i]].oam.priority = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_80A82E4(u8 battlerId)
|
||||
u8 GetBattlerSubpriority(u8 battlerId)
|
||||
{
|
||||
u8 position;
|
||||
u8 ret;
|
||||
@ -2339,7 +2339,7 @@ void sub_80A8BC4(u8 taskId)
|
||||
|
||||
dest = (task->data[4] + 0x10) * 0x10;
|
||||
src = (gSprites[task->data[0]].oam.paletteNum + 0x10) * 0x10;
|
||||
task->data[6] = sub_80A82E4(gBattleAnimAttacker);
|
||||
task->data[6] = GetBattlerSubpriority(gBattleAnimAttacker);
|
||||
if (task->data[6] == 20 || task->data[6] == 40)
|
||||
task->data[6] = 2;
|
||||
else
|
||||
|
@ -756,7 +756,7 @@ void sub_8170F2C(u8 taskId)
|
||||
}
|
||||
|
||||
ballId = ItemIdToBallId(gLastUsedItem);
|
||||
subpriority = sub_80A82E4(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)) + 1;
|
||||
subpriority = GetBattlerSubpriority(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)) + 1;
|
||||
spriteId = CreateSprite(&gBallSpriteTemplates[ballId], x + 32, y | 80, subpriority);
|
||||
gSprites[spriteId].data[0] = 34;
|
||||
gSprites[spriteId].data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, 0);
|
||||
|
@ -2257,9 +2257,9 @@ static void sub_80FE9E4(struct Sprite* sprite)
|
||||
else
|
||||
{
|
||||
if (sprite->data[5] > 0x7F)
|
||||
sprite->subpriority = sub_80A82E4(gBattleAnimTarget) + 1;
|
||||
sprite->subpriority = GetBattlerSubpriority(gBattleAnimTarget) + 1;
|
||||
else
|
||||
sprite->subpriority = sub_80A82E4(gBattleAnimTarget) + 6;
|
||||
sprite->subpriority = GetBattlerSubpriority(gBattleAnimTarget) + 6;
|
||||
|
||||
sprite->pos2.x += Sin(sprite->data[5], 5);
|
||||
sprite->pos2.y += Cos(sprite->data[5], 14);
|
||||
@ -2278,7 +2278,7 @@ void sub_80FEA58(u8 taskId)
|
||||
gBattleAnimArgs[1] = 0;
|
||||
gBattleAnimArgs[2] = 80;
|
||||
gBattleAnimArgs[3] = 0;
|
||||
CreateSpriteAndAnimate(&gUnknown_08592210, 0, 0, sub_80A82E4(gBattleAnimTarget) + 1);
|
||||
CreateSpriteAndAnimate(&gUnknown_08592210, 0, 0, GetBattlerSubpriority(gBattleAnimTarget) + 1);
|
||||
}
|
||||
|
||||
if (gTasks[taskId].data[1] == 15)
|
||||
@ -2465,9 +2465,9 @@ static void sub_80FEECC(struct Sprite* sprite)
|
||||
sprite->pos2.x += Sin(sprite->data[5], 32);
|
||||
sprite->pos2.y += Cos(sprite->data[5], -5);
|
||||
if ((u16)(sprite->data[5] - 0x40) < 0x80)
|
||||
sprite->subpriority = sub_80A82E4(gBattleAnimAttacker) - 1;
|
||||
sprite->subpriority = GetBattlerSubpriority(gBattleAnimAttacker) - 1;
|
||||
else
|
||||
sprite->subpriority = sub_80A82E4(gBattleAnimAttacker) + 1;
|
||||
sprite->subpriority = GetBattlerSubpriority(gBattleAnimAttacker) + 1;
|
||||
|
||||
sprite->data[5] = (sprite->data[5] + 5) & 0xFF;
|
||||
}
|
||||
@ -3205,7 +3205,7 @@ void sub_80FFFC0(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
task->data[4] = sub_80A82E4(gBattleAnimTarget) - 1;
|
||||
task->data[4] = GetBattlerSubpriority(gBattleAnimTarget) - 1;
|
||||
task->data[6] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||
task->data[7] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||
task->data[10] = sub_80A861C(gBattleAnimTarget, 1);
|
||||
|
@ -1136,7 +1136,7 @@ static void LinkOpponentHandleLoadMonSprite(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(gActiveBattler, 2),
|
||||
GetBattlerSpriteDefault_Y(gActiveBattler),
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = gActiveBattler;
|
||||
@ -1170,7 +1170,7 @@ static void sub_8066494(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
@ -1302,7 +1302,7 @@ static void LinkOpponentHandleDrawTrainerPic(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
xPos,
|
||||
(8 - gTrainerFrontPicCoords[trainerPicId].coords) * 4 + 40,
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 2;
|
||||
|
@ -1024,7 +1024,7 @@ static void LinkPartnerHandleLoadMonSprite(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(gActiveBattler, 2),
|
||||
GetBattlerSpriteDefault_Y(gActiveBattler),
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
@ -1055,7 +1055,7 @@ static void sub_814CC98(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
@ -1143,7 +1143,7 @@ static void LinkPartnerHandleDrawTrainerPic(void)
|
||||
|
||||
DecompressTrainerBackPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerBack(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, (8 - gTrainerBackPicCoords[trainerPicId].coords) * 4 + 80, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, (8 - gTrainerBackPicCoords[trainerPicId].coords) * 4 + 80, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
|
@ -1128,7 +1128,7 @@ static void OpponentHandleLoadMonSprite(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(gActiveBattler, 2),
|
||||
GetBattlerSpriteDefault_Y(gActiveBattler),
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = gActiveBattler;
|
||||
@ -1163,7 +1163,7 @@ static void sub_80613DC(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gBattlerSpriteIds[battlerId]].data[0] = battlerId;
|
||||
gSprites[gBattlerSpriteIds[battlerId]].data[2] = species;
|
||||
@ -1293,7 +1293,7 @@ static void OpponentHandleDrawTrainerPic(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
xPos,
|
||||
(8 - gTrainerFrontPicCoords[trainerPicId].coords) * 4 + 40,
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 2;
|
||||
|
@ -2200,7 +2200,7 @@ static void sub_805B258(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
@ -2314,7 +2314,7 @@ static void PlayerHandleDrawTrainerPic(void)
|
||||
trainerPicId = PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender);
|
||||
DecompressTrainerFrontPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerFront(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
@ -2329,7 +2329,7 @@ static void PlayerHandleDrawTrainerPic(void)
|
||||
{
|
||||
DecompressTrainerBackPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerBack(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
|
@ -1211,7 +1211,7 @@ static void PlayerPartnerHandleLoadMonSprite(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(gActiveBattler, 2),
|
||||
GetBattlerSpriteDefault_Y(gActiveBattler),
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
@ -1242,7 +1242,7 @@ static void sub_81BD0E4(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
@ -1322,7 +1322,7 @@ static void PlayerPartnerHandleDrawTrainerPic(void)
|
||||
{
|
||||
DecompressTrainerBackPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerBack(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
@ -1333,7 +1333,7 @@ static void PlayerPartnerHandleDrawTrainerPic(void)
|
||||
{
|
||||
DecompressTrainerFrontPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerFront(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
|
@ -1119,7 +1119,7 @@ static void RecordedOpponentHandleLoadMonSprite(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(gActiveBattler, 2),
|
||||
GetBattlerSpriteDefault_Y(gActiveBattler),
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
|
||||
|
||||
@ -1154,7 +1154,7 @@ static void sub_81885D8(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
@ -1251,7 +1251,7 @@ static void RecordedOpponentHandleDrawTrainerPic(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
xPos,
|
||||
(8 - gTrainerFrontPicCoords[trainerPicId].coords) * 4 + 40,
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 2;
|
||||
|
@ -1105,7 +1105,7 @@ static void RecordedPlayerHandleLoadMonSprite(void)
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(gActiveBattler, 2),
|
||||
GetBattlerSpriteDefault_Y(gActiveBattler),
|
||||
sub_80A82E4(gActiveBattler));
|
||||
GetBattlerSubpriority(gActiveBattler));
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = -240;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
@ -1136,7 +1136,7 @@ static void sub_818BA6C(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
@ -1236,7 +1236,7 @@ static void RecordedPlayerHandleDrawTrainerPic(void)
|
||||
trainerPicId = PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender);
|
||||
DecompressTrainerFrontPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerFront(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
@ -1250,7 +1250,7 @@ static void RecordedPlayerHandleDrawTrainerPic(void)
|
||||
{
|
||||
DecompressTrainerBackPic(trainerPicId, gActiveBattler);
|
||||
SetMultiuseSpriteTemplateToTrainerBack(trainerPicId, GetBattlerPosition(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, sub_80A82E4(gActiveBattler));
|
||||
gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSubpriority(gActiveBattler));
|
||||
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = gActiveBattler;
|
||||
gSprites[gBattlerSpriteIds[gActiveBattler]].pos2.x = 240;
|
||||
|
@ -1464,7 +1464,7 @@ static void sub_816AA80(u8 battlerId)
|
||||
gBattlerSpriteIds[battlerId] = CreateSprite(&gMultiuseSpriteTemplate,
|
||||
GetBattlerSpriteCoord(battlerId, 2),
|
||||
GetBattlerSpriteDefault_Y(battlerId),
|
||||
sub_80A82E4(battlerId));
|
||||
GetBattlerSubpriority(battlerId));
|
||||
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[1] = gBattlerSpriteIds[battlerId];
|
||||
gSprites[gUnknown_03005D7C[battlerId]].data[2] = battlerId;
|
||||
|
@ -2520,7 +2520,7 @@ u8 sub_80DB174(u16 species, u32 otId, u32 personality, u32 index)
|
||||
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);
|
||||
gSprites[spriteId].subpriority = GetBattlerSubpriority(2);
|
||||
gSprites[spriteId].callback = SpriteCallbackDummy;
|
||||
gSprites[spriteId].data[0] = gSprites[spriteId].oam.paletteNum;
|
||||
gSprites[spriteId].data[2] = species;
|
||||
|
1100
src/electric.c
1100
src/electric.c
File diff suppressed because it is too large
Load Diff
@ -1171,7 +1171,7 @@ void sub_8112C6C(u8 taskId)
|
||||
task->data[11] = (sub_80A861C(gBattleAnimAttacker, 1) / 2) + 8;
|
||||
task->data[7] = 0;
|
||||
task->data[5] = sub_80A8328(gBattleAnimAttacker);
|
||||
task->data[6] = sub_80A82E4(gBattleAnimAttacker) - 2;
|
||||
task->data[6] = GetBattlerSubpriority(gBattleAnimAttacker) - 2;
|
||||
task->data[3] = 0;
|
||||
task->data[4] = 16;
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL));
|
||||
|
@ -226,7 +226,7 @@ static void CreateBattlerSprite(u8 battler)
|
||||
return;
|
||||
|
||||
SetMultiuseSpriteTemplateToPokemon(GetMonData(&gEnemyParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES), GetBattlerPosition(battler));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, 2), posY, sub_80A82E4(battler));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, 2), posY, GetBattlerSubpriority(battler));
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.paletteNum = battler;
|
||||
gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBattlerSpriteIds[battler]].data[0] = battler;
|
||||
@ -241,7 +241,7 @@ static void CreateBattlerSprite(u8 battler)
|
||||
SetMultiuseSpriteTemplateToTrainerBack(gSaveBlock2Ptr->playerGender, GetBattlerPosition(B_POSITION_PLAYER_LEFT));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, 0x50,
|
||||
(8 - gTrainerBackPicCoords[gSaveBlock2Ptr->playerGender].coords) * 4 + 80,
|
||||
sub_80A82E4(0));
|
||||
GetBattlerSubpriority(0));
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.paletteNum = battler;
|
||||
gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBattlerSpriteIds[battler]].data[0] = battler;
|
||||
@ -251,7 +251,7 @@ static void CreateBattlerSprite(u8 battler)
|
||||
SetMultiuseSpriteTemplateToTrainerBack(TRAINER_BACK_PIC_WALLY, GetBattlerPosition(0));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, 0x50,
|
||||
(8 - gTrainerBackPicCoords[TRAINER_BACK_PIC_WALLY].coords) * 4 + 80,
|
||||
sub_80A82E4(0));
|
||||
GetBattlerSubpriority(0));
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.paletteNum = battler;
|
||||
gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBattlerSpriteIds[battler]].data[0] = battler;
|
||||
@ -262,7 +262,7 @@ static void CreateBattlerSprite(u8 battler)
|
||||
return;
|
||||
|
||||
SetMultiuseSpriteTemplateToPokemon(GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES), GetBattlerPosition(battler));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, 2), posY, sub_80A82E4(battler));
|
||||
gBattlerSpriteIds[battler] = CreateSprite(&gMultiuseSpriteTemplate, GetBattlerSpriteCoord(battler, 2), posY, GetBattlerSubpriority(battler));
|
||||
gSprites[gBattlerSpriteIds[battler]].oam.paletteNum = battler;
|
||||
gSprites[gBattlerSpriteIds[battler]].callback = SpriteCallbackDummy;
|
||||
gSprites[gBattlerSpriteIds[battler]].data[0] = battler;
|
||||
|
Loading…
Reference in New Issue
Block a user