mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Minor labelling of field effects
This commit is contained in:
parent
3d8874d919
commit
bd766b9049
@ -2200,8 +2200,8 @@ _080FAE2A:
|
|||||||
.pool
|
.pool
|
||||||
thumb_func_end sub_80FADE4
|
thumb_func_end sub_80FADE4
|
||||||
|
|
||||||
thumb_func_start task50_FldeffPoison_Start
|
thumb_func_start task50_overworld_poison_effect
|
||||||
task50_FldeffPoison_Start: @ 80FAE38
|
task50_overworld_poison_effect: @ 80FAE38
|
||||||
push {lr}
|
push {lr}
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r2, r0, 24
|
lsrs r2, r0, 24
|
||||||
@ -2260,14 +2260,14 @@ _080FAE92:
|
|||||||
_080FAEA2:
|
_080FAEA2:
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
thumb_func_end task50_FldeffPoison_Start
|
thumb_func_end task50_overworld_poison_effect
|
||||||
|
|
||||||
thumb_func_start FldeffPoison_Start
|
thumb_func_start FldeffPoison_Start
|
||||||
FldeffPoison_Start: @ 80FAEA8
|
FldeffPoison_Start: @ 80FAEA8
|
||||||
push {lr}
|
push {lr}
|
||||||
movs r0, 0x4F
|
movs r0, 0x4F
|
||||||
bl PlaySE
|
bl PlaySE
|
||||||
ldr r0, =task50_FldeffPoison_Start
|
ldr r0, =task50_overworld_poison_effect
|
||||||
movs r1, 0x50
|
movs r1, 0x50
|
||||||
bl CreateTask
|
bl CreateTask
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -2278,7 +2278,7 @@ FldeffPoison_Start: @ 80FAEA8
|
|||||||
thumb_func_start FieldPoisonEffectIsRunning
|
thumb_func_start FieldPoisonEffectIsRunning
|
||||||
FieldPoisonEffectIsRunning: @ 80FAEC0
|
FieldPoisonEffectIsRunning: @ 80FAEC0
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =task50_FldeffPoison_Start
|
ldr r0, =task50_overworld_poison_effect
|
||||||
bl FuncIsActiveTask
|
bl FuncIsActiveTask
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
|
@ -124,25 +124,25 @@ const struct SpriteFrameImage gFieldEffectObjectPicTable_SurfBlob[] = {
|
|||||||
overworld_frame(gFieldEffectObjectPic_SurfBlob, 4, 4, 2),
|
overworld_frame(gFieldEffectObjectPic_SurfBlob, 4, 4, 2),
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gFieldEffectObjectImageAnim_850CB94[] =
|
const union AnimCmd gSurfBlobAnim_FaceSouth[] =
|
||||||
{
|
{
|
||||||
ANIMCMD_FRAME(0, 1),
|
ANIMCMD_FRAME(0, 1),
|
||||||
ANIMCMD_JUMP(0),
|
ANIMCMD_JUMP(0),
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gFieldEffectObjectImageAnim_850CB9C[] =
|
const union AnimCmd gSurfBlobAnim_FaceNorth[] =
|
||||||
{
|
{
|
||||||
ANIMCMD_FRAME(1, 1),
|
ANIMCMD_FRAME(1, 1),
|
||||||
ANIMCMD_JUMP(0),
|
ANIMCMD_JUMP(0),
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gFieldEffectObjectImageAnim_850CBA4[] =
|
const union AnimCmd gSurfBlobAnim_FaceWest[] =
|
||||||
{
|
{
|
||||||
ANIMCMD_FRAME(2, 1),
|
ANIMCMD_FRAME(2, 1),
|
||||||
ANIMCMD_JUMP(0),
|
ANIMCMD_JUMP(0),
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gFieldEffectObjectImageAnim_850CBAC[] =
|
const union AnimCmd gSurfBlobAnim_FaceEast[] =
|
||||||
{
|
{
|
||||||
ANIMCMD_FRAME(2, 1, .hFlip = TRUE),
|
ANIMCMD_FRAME(2, 1, .hFlip = TRUE),
|
||||||
ANIMCMD_JUMP(0),
|
ANIMCMD_JUMP(0),
|
||||||
@ -150,10 +150,10 @@ const union AnimCmd gFieldEffectObjectImageAnim_850CBAC[] =
|
|||||||
|
|
||||||
const union AnimCmd *const gFieldEffectObjectImageAnimTable_SurfBlob[] =
|
const union AnimCmd *const gFieldEffectObjectImageAnimTable_SurfBlob[] =
|
||||||
{
|
{
|
||||||
gFieldEffectObjectImageAnim_850CB94,
|
gSurfBlobAnim_FaceSouth,
|
||||||
gFieldEffectObjectImageAnim_850CB9C,
|
gSurfBlobAnim_FaceNorth,
|
||||||
gFieldEffectObjectImageAnim_850CBA4,
|
gSurfBlobAnim_FaceWest,
|
||||||
gFieldEffectObjectImageAnim_850CBAC,
|
gSurfBlobAnim_FaceEast,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gFieldEffectObjectTemplate_SurfBlob = {0xFFFF, 0xFFFF, &gEventObjectBaseOam_32x32, gFieldEffectObjectImageAnimTable_SurfBlob, gFieldEffectObjectPicTable_SurfBlob, gDummySpriteAffineAnimTable, UpdateSurfBlobFieldEffect};
|
const struct SpriteTemplate gFieldEffectObjectTemplate_SurfBlob = {0xFFFF, 0xFFFF, &gEventObjectBaseOam_32x32, gFieldEffectObjectImageAnimTable_SurfBlob, gFieldEffectObjectPicTable_SurfBlob, gDummySpriteAffineAnimTable, UpdateSurfBlobFieldEffect};
|
||||||
|
@ -25,9 +25,9 @@ static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite *);
|
|||||||
static void UpdateAshFieldEffect_Step0(struct Sprite *);
|
static void UpdateAshFieldEffect_Step0(struct Sprite *);
|
||||||
static void UpdateAshFieldEffect_Step1(struct Sprite *);
|
static void UpdateAshFieldEffect_Step1(struct Sprite *);
|
||||||
static void UpdateAshFieldEffect_Step2(struct Sprite *);
|
static void UpdateAshFieldEffect_Step2(struct Sprite *);
|
||||||
static void sub_81556B0(struct EventObject *, struct Sprite *);
|
static void SynchroniseSurfAnim(struct EventObject *, struct Sprite *);
|
||||||
static void sub_81556E8(struct EventObject *, struct Sprite *);
|
static void sub_81556E8(struct EventObject *, struct Sprite *);
|
||||||
static void sub_815577C(struct EventObject *, struct Sprite *, struct Sprite *);
|
static void CreateBobbingEffect(struct EventObject *, struct Sprite *, struct Sprite *);
|
||||||
static void sub_8155850(struct Sprite *);
|
static void sub_8155850(struct Sprite *);
|
||||||
static u32 ShowDisguiseFieldEffect(u8, u8, u8);
|
static u32 ShowDisguiseFieldEffect(u8, u8, u8);
|
||||||
|
|
||||||
@ -997,13 +997,13 @@ void UpdateSurfBlobFieldEffect(struct Sprite *sprite)
|
|||||||
|
|
||||||
eventObject = &gEventObjects[sprite->data[2]];
|
eventObject = &gEventObjects[sprite->data[2]];
|
||||||
linkedSprite = &gSprites[eventObject->spriteId];
|
linkedSprite = &gSprites[eventObject->spriteId];
|
||||||
sub_81556B0(eventObject, sprite);
|
SynchroniseSurfAnim(eventObject, sprite);
|
||||||
sub_81556E8(eventObject, sprite);
|
sub_81556E8(eventObject, sprite);
|
||||||
sub_815577C(eventObject, linkedSprite, sprite);
|
CreateBobbingEffect(eventObject, linkedSprite, sprite);
|
||||||
sprite->oam.priority = linkedSprite->oam.priority;
|
sprite->oam.priority = linkedSprite->oam.priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81556B0(struct EventObject *eventObject, struct Sprite *sprite)
|
static void SynchroniseSurfAnim(struct EventObject *eventObject, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 surfBlobDirectionAnims[] = {
|
u8 surfBlobDirectionAnims[] = {
|
||||||
0, // DIR_NONE
|
0, // DIR_NONE
|
||||||
@ -1126,7 +1126,7 @@ _08155770:\n\
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void sub_815577C(struct EventObject *eventObject, struct Sprite *linkedSprite, struct Sprite *sprite)
|
static void CreateBobbingEffect(struct EventObject *eventObject, struct Sprite *linkedSprite, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u16 unk_085CDC6A[] = {3, 7};
|
u16 unk_085CDC6A[] = {3, 7};
|
||||||
u8 v0 = sub_8155638(sprite);
|
u8 v0 = sub_8155638(sprite);
|
||||||
|
@ -1700,7 +1700,7 @@ static bool8 (*const sFishingStateFuncs[])(struct Task *) =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void Task_Fishing(u8 taskId);
|
static void Task_Fishing(u8 taskId);
|
||||||
static void sub_808CF78(void);
|
static void AlignFishingAnimationFrames(void);
|
||||||
|
|
||||||
#define tStep data[0]
|
#define tStep data[0]
|
||||||
#define tFrameCounter data[1]
|
#define tFrameCounter data[1]
|
||||||
@ -1759,7 +1759,7 @@ static bool8 Fishing2(struct Task *task)
|
|||||||
|
|
||||||
static bool8 Fishing3(struct Task *task)
|
static bool8 Fishing3(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
|
|
||||||
// Wait one second
|
// Wait one second
|
||||||
task->tFrameCounter++;
|
task->tFrameCounter++;
|
||||||
@ -1791,7 +1791,7 @@ static bool8 Fishing5(struct Task *task)
|
|||||||
{
|
{
|
||||||
const u8 dot[] = _("·");
|
const u8 dot[] = _("·");
|
||||||
|
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
task->tFrameCounter++;
|
task->tFrameCounter++;
|
||||||
if (gMain.newKeys & A_BUTTON)
|
if (gMain.newKeys & A_BUTTON)
|
||||||
{
|
{
|
||||||
@ -1827,7 +1827,7 @@ static bool8 Fishing6(struct Task *task)
|
|||||||
{
|
{
|
||||||
bool8 bite;
|
bool8 bite;
|
||||||
|
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
bite = FALSE;
|
bite = FALSE;
|
||||||
|
|
||||||
@ -1872,7 +1872,7 @@ static bool8 Fishing6(struct Task *task)
|
|||||||
// Oh! A Bite!
|
// Oh! A Bite!
|
||||||
static bool8 Fishing7(struct Task *task)
|
static bool8 Fishing7(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
AddTextPrinterParameterized(0, 1, gText_OhABite, 0, 17, 0, NULL);
|
AddTextPrinterParameterized(0, 1, gText_OhABite, 0, 17, 0, NULL);
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
task->tFrameCounter = 0;
|
task->tFrameCounter = 0;
|
||||||
@ -1884,7 +1884,7 @@ static bool8 Fishing8(struct Task *task)
|
|||||||
{
|
{
|
||||||
const s16 reelTimeouts[3] = {36, 33, 30};
|
const s16 reelTimeouts[3] = {36, 33, 30};
|
||||||
|
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
task->tFrameCounter++;
|
task->tFrameCounter++;
|
||||||
if (task->tFrameCounter >= reelTimeouts[task->tFishingRod])
|
if (task->tFrameCounter >= reelTimeouts[task->tFishingRod])
|
||||||
task->tStep = FISHING_GOT_AWAY;
|
task->tStep = FISHING_GOT_AWAY;
|
||||||
@ -1903,7 +1903,7 @@ static bool8 Fishing9(struct Task *task)
|
|||||||
{70, 30}
|
{70, 30}
|
||||||
};
|
};
|
||||||
|
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
if (task->tRoundsPlayed < task->tMinRoundsRequired)
|
if (task->tRoundsPlayed < task->tMinRoundsRequired)
|
||||||
{
|
{
|
||||||
@ -1922,7 +1922,7 @@ static bool8 Fishing9(struct Task *task)
|
|||||||
|
|
||||||
static bool8 Fishing10(struct Task *task)
|
static bool8 Fishing10(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, 0x11);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
@ -1933,7 +1933,7 @@ static bool8 Fishing10(struct Task *task)
|
|||||||
static bool8 Fishing11(struct Task *task)
|
static bool8 Fishing11(struct Task *task)
|
||||||
{
|
{
|
||||||
if (task->tFrameCounter == 0)
|
if (task->tFrameCounter == 0)
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
|
|
||||||
RunTextPrinters();
|
RunTextPrinters();
|
||||||
|
|
||||||
@ -1969,7 +1969,7 @@ static bool8 Fishing11(struct Task *task)
|
|||||||
// Not even a nibble
|
// Not even a nibble
|
||||||
static bool8 Fishing12(struct Task *task)
|
static bool8 Fishing12(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, 0x11);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
|
||||||
@ -1980,7 +1980,7 @@ static bool8 Fishing12(struct Task *task)
|
|||||||
// It got away
|
// It got away
|
||||||
static bool8 Fishing13(struct Task *task)
|
static bool8 Fishing13(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
|
||||||
FillWindowPixelBuffer(0, 0x11);
|
FillWindowPixelBuffer(0, 0x11);
|
||||||
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
|
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
|
||||||
@ -1991,14 +1991,14 @@ static bool8 Fishing13(struct Task *task)
|
|||||||
// Wait one second
|
// Wait one second
|
||||||
static bool8 Fishing14(struct Task *task)
|
static bool8 Fishing14(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
task->tStep++;
|
task->tStep++;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 Fishing15(struct Task *task)
|
static bool8 Fishing15(struct Task *task)
|
||||||
{
|
{
|
||||||
sub_808CF78();
|
AlignFishingAnimationFrames();
|
||||||
if (gSprites[gPlayerAvatar.spriteId].animEnded)
|
if (gSprites[gPlayerAvatar.spriteId].animEnded)
|
||||||
{
|
{
|
||||||
struct EventObject *playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
|
struct EventObject *playerEventObj = &gEventObjects[gPlayerAvatar.eventObjectId];
|
||||||
@ -2033,7 +2033,7 @@ static bool8 Fishing16(struct Task *task)
|
|||||||
#undef tFrameCounter
|
#undef tFrameCounter
|
||||||
#undef tFishingRod
|
#undef tFishingRod
|
||||||
|
|
||||||
static void sub_808CF78(void)
|
static void AlignFishingAnimationFrames(void)
|
||||||
{
|
{
|
||||||
struct Sprite *playerSprite = &gSprites[gPlayerAvatar.spriteId];
|
struct Sprite *playerSprite = &gSprites[gPlayerAvatar.spriteId];
|
||||||
u8 animCmdIndex;
|
u8 animCmdIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user