summaryrefslogtreecommitdiff
path: root/src/field_player_avatar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/field_player_avatar.c')
-rw-r--r--src/field_player_avatar.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 970899369..c4d069cb5 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -1687,7 +1687,7 @@ static bool8 (*const sFishingStateFuncs[])(struct Task *) =
{
Fishing_Init,
Fishing_GetRodOut,
- Fishing_WaitBeforeDots,
+ Fishing_WaitBeforeDots,
Fishing_InitDots, // FISHING_START_ROUND
Fishing_ShowDots,
Fishing_CheckForBite,
@@ -1729,13 +1729,13 @@ static bool8 Fishing_GetRodOut(struct Task *task)
{
struct ObjectEvent *playerObjEvent;
const s16 minRounds1[] = {
- [OLD_ROD] = 1,
- [GOOD_ROD] = 1,
+ [OLD_ROD] = 1,
+ [GOOD_ROD] = 1,
[SUPER_ROD] = 1
};
const s16 minRounds2[] = {
- [OLD_ROD] = 1,
- [GOOD_ROD] = 3,
+ [OLD_ROD] = 1,
+ [GOOD_ROD] = 3,
[SUPER_ROD] = 6
};
@@ -1865,8 +1865,8 @@ static bool8 Fishing_GotBite(struct Task *task)
static bool8 Fishing_WaitForA(struct Task *task)
{
const s16 reelTimeouts[3] = {
- [OLD_ROD] = 36,
- [GOOD_ROD] = 33,
+ [OLD_ROD] = 36,
+ [GOOD_ROD] = 33,
[SUPER_ROD] = 30
};
@@ -1933,8 +1933,8 @@ static bool8 Fishing_StartEncounter(struct Task *task)
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, FALSE, 0);
- gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
- gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
+ gSprites[gPlayerAvatar.spriteId].x2 = 0;
+ gSprites[gPlayerAvatar.spriteId].y2 = 0;
ClearDialogWindowAndFrame(0, TRUE);
task->tFrameCounter++;
return FALSE;
@@ -1990,8 +1990,8 @@ static bool8 Fishing_PutRodAway(struct Task *task)
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, FALSE, 0);
- gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
- gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
+ gSprites[gPlayerAvatar.spriteId].x2 = 0;
+ gSprites[gPlayerAvatar.spriteId].y2 = 0;
task->tStep++;
}
return FALSE;
@@ -2023,8 +2023,8 @@ static void AlignFishingAnimationFrames(void)
u8 animType;
AnimateSprite(playerSprite);
- playerSprite->pos2.x = 0;
- playerSprite->pos2.y = 0;
+ playerSprite->x2 = 0;
+ playerSprite->y2 = 0;
animCmdIndex = playerSprite->animCmdIndex;
if (playerSprite->anims[playerSprite->animNum][animCmdIndex].type == -1)
{
@@ -2039,16 +2039,16 @@ static void AlignFishingAnimationFrames(void)
animType = playerSprite->anims[playerSprite->animNum][animCmdIndex].type;
if (animType == 1 || animType == 2 || animType == 3)
{
- playerSprite->pos2.x = 8;
+ playerSprite->x2 = 8;
if (GetPlayerFacingDirection() == 3)
- playerSprite->pos2.x = -8;
+ playerSprite->x2 = -8;
}
if (animType == 5)
- playerSprite->pos2.y = -8;
+ playerSprite->y2 = -8;
if (animType == 10 || animType == 11)
- playerSprite->pos2.y = 8;
+ playerSprite->y2 = 8;
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
- SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, TRUE, playerSprite->pos2.y);
+ SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, TRUE, playerSprite->y2);
}
void SetSpinStartFacingDir(u8 direction)
@@ -2090,8 +2090,8 @@ static void Task_DoPlayerSpinExit(u8 taskId)
SetSpinStartFacingDir(object->facingDirection);
tSpinDelayTimer = 0;
tSpeed = 1;
- tCurY = (u16)(sprite->pos1.y + sprite->pos2.y) << 4;
- sprite->pos2.y = 0;
+ tCurY = (u16)(sprite->y + sprite->y2) << 4;
+ sprite->y2 = 0;
CameraObjectReset2();
object->fixedPriority = TRUE;
sprite->oam.priority = 0;
@@ -2100,14 +2100,14 @@ static void Task_DoPlayerSpinExit(u8 taskId)
tState++;
case 1: // Spin while rising
TrySpinPlayerForWarp(object, &tSpinDelayTimer);
-
+
// Rise and accelerate
tCurY -= tSpeed;
tSpeed += 3;
- sprite->pos1.y = tCurY >> 4;
+ sprite->y = tCurY >> 4;
// Check if offscreen
- if (sprite->pos1.y + (s16)gTotalCameraPixelOffsetY < -32)
+ if (sprite->y + (s16)gTotalCameraPixelOffsetY < -32)
tState++;
break;
case 2:
@@ -2156,11 +2156,11 @@ static void Task_DoPlayerSpinEntrance(u8 taskId)
ObjectEventForceSetHeldMovement(object, GetFaceDirectionMovementAction(sSpinDirections[tStartDir]));
tSpinDelayTimer = 0;
tSpeed = 116;
- tDestY = sprite->pos1.y;
+ tDestY = sprite->y;
tPriority = sprite->oam.priority;
tSubpriority = sprite->subpriority;
- tCurY = -((u16)sprite->pos2.y + 32) * 16;
- sprite->pos2.y = 0;
+ tCurY = -((u16)sprite->y2 + 32) * 16;
+ sprite->y2 = 0;
CameraObjectReset2();
object->fixedPriority = TRUE;
sprite->oam.priority = 1;
@@ -2175,12 +2175,12 @@ static void Task_DoPlayerSpinEntrance(u8 taskId)
tSpeed -= 3;
if (tSpeed < 4)
tSpeed = 4;
- sprite->pos1.y = tCurY >> 4;
+ sprite->y = tCurY >> 4;
// Check if reached dest
- if (sprite->pos1.y >= tDestY)
+ if (sprite->y >= tDestY)
{
- sprite->pos1.y = tDestY;
+ sprite->y = tDestY;
tGroundTimer = 0;
tState++;
}