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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 4f85ad628..9b1f4ceb6 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -722,9 +722,9 @@ static bool8 CanStopSurfing(s16 x, s16 y, u8 direction)
}
}
-static bool8 ShouldJumpLedge(s16 x, s16 y, u8 z)
+static bool8 ShouldJumpLedge(s16 x, s16 y, u8 direction)
{
- if (GetLedgeJumpDirection(x, y, z) != 0)
+ if (GetLedgeJumpDirection(x, y, direction) != DIR_NONE)
return TRUE;
else
return FALSE;
@@ -863,7 +863,7 @@ static void PlayerAvatarTransition_Surfing(struct ObjectEvent *objEvent)
gFieldEffectArguments[2] = gPlayerAvatar.objectEventId;
spriteId = FieldEffectStart(FLDEFF_SURF_BLOB);
objEvent->fieldEffectSpriteId = spriteId;
- SetSurfBobState(spriteId, 1);
+ SetSurfBlob_BobState(spriteId, BOB_PLAYER_AND_MON);
}
static void PlayerAvatarTransition_Underwater(struct ObjectEvent *objEvent)
@@ -871,7 +871,7 @@ static void PlayerAvatarTransition_Underwater(struct ObjectEvent *objEvent)
ObjectEventSetGraphicsId(objEvent, GetPlayerAvatarGraphicsIdByStateId(PLAYER_AVATAR_STATE_UNDERWATER));
ObjectEventTurn(objEvent, objEvent->movementDirection);
SetPlayerAvatarStateMask(PLAYER_AVATAR_FLAG_UNDERWATER);
- objEvent->fieldEffectSpriteId = sub_8155800(objEvent->spriteId);
+ objEvent->fieldEffectSpriteId = StartUnderwaterSurfBlobBobbing(objEvent->spriteId);
}
static void PlayerAvatarTransition_ReturnToField(struct ObjectEvent *objEvent)
@@ -1192,7 +1192,7 @@ u8 GetPlayerAvatarFlags(void)
return gPlayerAvatar.flags;
}
-u8 GetPlayerAvatarObjectId(void)
+u8 GetPlayerAvatarSpriteId(void)
{
return gPlayerAvatar.spriteId;
}
@@ -1646,7 +1646,7 @@ static void Task_StopSurfingInit(u8 taskId)
if (!ObjectEventClearHeldMovementIfFinished(playerObjEvent))
return;
}
- SetSurfBobState(playerObjEvent->fieldEffectSpriteId, 2);
+ SetSurfBlob_BobState(playerObjEvent->fieldEffectSpriteId, BOB_JUST_MON);
ObjectEventSetHeldMovement(playerObjEvent, GetJumpSpecialMovementAction((u8)gTasks[taskId].data[0]));
gTasks[taskId].func = Task_WaitStopSurfing;
}
@@ -1932,7 +1932,7 @@ static bool8 Fishing_StartEncounter(struct Task *task)
ObjectEventSetGraphicsId(playerObjEvent, task->tPlayerGfxId);
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
- SetSurfBobWhileFishingState(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 0, 0);
+ SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, FALSE, 0);
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
ClearDialogWindowAndFrame(0, TRUE);
@@ -1989,7 +1989,7 @@ static bool8 Fishing_PutRodAway(struct Task *task)
ObjectEventSetGraphicsId(playerObjEvent, task->tPlayerGfxId);
ObjectEventTurn(playerObjEvent, playerObjEvent->movementDirection);
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
- SetSurfBobWhileFishingState(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 0, 0);
+ SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, FALSE, 0);
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
task->tStep++;
@@ -2048,7 +2048,7 @@ static void AlignFishingAnimationFrames(void)
if (animType == 10 || animType == 11)
playerSprite->pos2.y = 8;
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
- SetSurfBobWhileFishingState(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, 1, playerSprite->pos2.y);
+ SetSurfBlob_PlayerOffset(gObjectEvents[gPlayerAvatar.objectEventId].fieldEffectSpriteId, TRUE, playerSprite->pos2.y);
}
void SetSpinStartFacingDir(u8 direction)