mirror of https://github.com/pret/pokeemerald.git
Merge pull request #468 from KDSKardabox/resolve_ice_electric_split
Move 2 incorrectly split functions of electric from ice
This commit is contained in:
commit
f1ee374e93
|
@ -6,7 +6,6 @@
|
|||
#include "sound.h"
|
||||
|
||||
extern void sub_810E2C8(struct Sprite *);
|
||||
extern bool8 sub_810B614(struct Task *task, u8 taskId);
|
||||
extern void TranslateAnimSpriteToTargetMonLocation(struct Sprite *);
|
||||
|
||||
static void sub_810A1A8(struct Sprite *);
|
||||
|
@ -38,6 +37,8 @@ static void sub_810B1F0(struct Sprite *);
|
|||
static void sub_810B23C(struct Sprite *);
|
||||
static bool8 sub_810B430(struct Task *task, u8 taskId);
|
||||
static void sub_810B51C(struct Sprite *);
|
||||
static bool8 sub_810B614(struct Task *task, u8 taskId);
|
||||
static void sub_810B684(struct Sprite *sprite);
|
||||
|
||||
const union AnimCmd gUnknown_085956A4[] =
|
||||
{
|
||||
|
@ -1292,3 +1293,29 @@ void sub_810B55C(u8 taskId)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_810B614(struct Task *task, u8 taskId)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_085956C0, task->data[13], task->data[14], task->data[12]);
|
||||
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteId].callback = sub_810B684;
|
||||
gSprites[spriteId].data[6] = taskId;
|
||||
gSprites[spriteId].data[7] = 10;
|
||||
task->data[10]++;
|
||||
}
|
||||
if (task->data[14] >= task->data[15])
|
||||
return TRUE;
|
||||
task->data[14] += 32;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_810B684(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
gTasks[sprite->data[6]].data[sprite->data[7]]--;
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
}
|
||||
|
|
34
src/ice.c
34
src/ice.c
|
@ -20,8 +20,7 @@ struct HailStruct {
|
|||
s32 unk3:4;
|
||||
};
|
||||
|
||||
extern void sub_810B684(struct Sprite *);
|
||||
extern void sub_810B6C4(struct Sprite *);
|
||||
static void sub_810B6C4(struct Sprite *);
|
||||
extern void sub_810B848(struct Sprite *);
|
||||
extern void AnimIcePunchSwirlingParticle(struct Sprite *);
|
||||
extern void AnimIceBeamParticle(struct Sprite *);
|
||||
|
@ -524,37 +523,10 @@ const struct SpriteTemplate gUnknown_08595DFC =
|
|||
.callback = InitIceBallParticle,
|
||||
};
|
||||
|
||||
extern const struct SpriteTemplate gUnknown_085956C0;
|
||||
|
||||
bool8 sub_810B614(struct Task *task, u8 taskId)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_085956C0, task->data[13], task->data[14], task->data[12]);
|
||||
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteId].callback = sub_810B684;
|
||||
gSprites[spriteId].data[6] = taskId;
|
||||
gSprites[spriteId].data[7] = 10;
|
||||
task->data[10]++;
|
||||
}
|
||||
if (task->data[14] >= task->data[15])
|
||||
return TRUE;
|
||||
task->data[14] += 32;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_810B684(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
gTasks[sprite->data[6]].data[sprite->data[7]]--;
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
}
|
||||
|
||||
// probably unused
|
||||
#ifdef NONMATCHING
|
||||
void sub_810B6C4(struct Sprite *sprite)
|
||||
static void sub_810B6C4(struct Sprite *sprite)
|
||||
{
|
||||
s16 targetX, targetY, attackerX, attackerY;
|
||||
s16 i;
|
||||
|
@ -596,7 +568,7 @@ void sub_810B6C4(struct Sprite *sprite)
|
|||
}
|
||||
#else
|
||||
NAKED
|
||||
void sub_810B6C4(struct Sprite *sprite)
|
||||
static void sub_810B6C4(struct Sprite *sprite)
|
||||
{
|
||||
asm_unified("push {r4-r7,lr}\n\
|
||||
mov r7, r10\n\
|
||||
|
|
Loading…
Reference in New Issue