diff options
Diffstat (limited to 'src/trainer_see.c')
-rw-r--r-- | src/trainer_see.c | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/src/trainer_see.c b/src/trainer_see.c index 64e2f8e5a..3dbfbdf38 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -14,42 +14,42 @@ typedef u8 (*TrainerApproachFunc)(struct ObjectEvent *, s16, s16, s16); typedef bool8 (*TrainerSeeFunc)(u8, struct Task *, struct ObjectEvent *); -static bool8 CheckTrainer(u8 trainerObjId); -static u8 GetTrainerApproachDistance(struct ObjectEvent * trainerObj); -static u8 GetTrainerApproachDistanceSouth(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); -static u8 GetTrainerApproachDistanceNorth(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); -static u8 GetTrainerApproachDistanceWest(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); -static u8 GetTrainerApproachDistanceEast(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); -static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent * trainerObj, u8 approachDistance, u8 facingDirection); -static void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDistance); -static void Task_RunTrainerSeeFuncList(u8 taskId); -static bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static void Task_DestroyTrainerApproachTask(u8 taskId); -static void SpriteCB_TrainerIcons(struct Sprite * sprite); -static void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnimNum); - -static const u16 sGfx_Emoticons[] = INCBIN_U16("graphics/object_events/emoticons.4bpp"); +/*static*/ bool8 CheckTrainer(u8 trainerObjId); +/*static*/ u8 GetTrainerApproachDistance(struct ObjectEvent * trainerObj); +/*static*/ u8 GetTrainerApproachDistanceSouth(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); +/*static*/ u8 GetTrainerApproachDistanceNorth(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); +/*static*/ u8 GetTrainerApproachDistanceWest(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); +/*static*/ u8 GetTrainerApproachDistanceEast(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y); +/*static*/ u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent * trainerObj, u8 approachDistance, u8 facingDirection); +/*static*/ void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDistance); +/*static*/ void Task_RunTrainerSeeFuncList(u8 taskId); +/*static*/ bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +/*static*/ void Task_DestroyTrainerApproachTask(u8 taskId); +/*static*/ void SpriteCB_TrainerIcons(struct Sprite * sprite); +/*static*/ void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnimNum); + +/*static*/ const u16 sGfx_Emoticons[] = INCBIN_U16("graphics/object_events/emoticons.4bpp"); // u8 func(struct ObjectEvent * trainerObj, s16 range, s16 x, s16 y) // range is the maximum distance the trainer can see // x and y are the player's coordinates // Returns distance to walk if trainer has unobstructed view of player // Returns 0 if trainer can't see player -static const TrainerApproachFunc sDirectionalApproachDistanceFuncs[] = { +/*static*/ const TrainerApproachFunc sDirectionalApproachDistanceFuncs[] = { GetTrainerApproachDistanceSouth, GetTrainerApproachDistanceNorth, GetTrainerApproachDistanceWest, @@ -59,7 +59,7 @@ static const TrainerApproachFunc sDirectionalApproachDistanceFuncs[] = { // bool8 func(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) // Returns TRUE to run the next func immediately // Returns FALSE to delay the next func to the next frame -static const TrainerSeeFunc sTrainerSeeFuncList[] = { +/*static*/ const TrainerSeeFunc sTrainerSeeFuncList[] = { TrainerSeeFunc_Dummy, TrainerSeeFunc_StartExclMark, TrainerSeeFunc_WaitExclMark, @@ -77,7 +77,7 @@ static const TrainerSeeFunc sTrainerSeeFuncList[] = { TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown }; -static const TrainerSeeFunc sTrainerSeeFuncList2[] = { +/*static*/ const TrainerSeeFunc sTrainerSeeFuncList2[] = { TrainerSeeFunc_TrainerInAshFacesPlayer, TrainerSeeFunc_BeginJumpOutOfAsh, TrainerSeeFunc_WaitJumpOutOfAsh, @@ -104,7 +104,7 @@ bool8 CheckForTrainersWantingBattle(void) return FALSE; } -static bool8 CheckTrainer(u8 trainerObjId) +/*static*/ bool8 CheckTrainer(u8 trainerObjId) { const u8 *script = GetObjectEventScriptPointerByObjectEventId(trainerObjId); u8 approachDistance; @@ -122,7 +122,7 @@ static bool8 CheckTrainer(u8 trainerObjId) return FALSE; } -static u8 GetTrainerApproachDistance(struct ObjectEvent *trainerObj) +/*static*/ u8 GetTrainerApproachDistance(struct ObjectEvent *trainerObj) { s16 x, y; u8 i; @@ -148,13 +148,13 @@ static u8 GetTrainerApproachDistance(struct ObjectEvent *trainerObj) } // Returns how far south the player is from trainer. 0 if out of trainer's sight. -static u8 GetTrainerApproachDistanceSouth(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) +/*static*/ u8 GetTrainerApproachDistanceSouth(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) { if (trainerObj->currentCoords.x == x && y > trainerObj->currentCoords.y && y <= trainerObj->currentCoords.y + range) { - if (range > 3 && GetIndexOfFirstInactiveObjectEvent() == OBJECT_EVENTS_COUNT) + if (range > 3 && GetFirstInactiveObjectEventId() == OBJECT_EVENTS_COUNT) return 0; return (y - trainerObj->currentCoords.y); } @@ -163,7 +163,7 @@ static u8 GetTrainerApproachDistanceSouth(struct ObjectEvent *trainerObj, s16 ra } // Returns how far north the player is from trainer. 0 if out of trainer's sight. -static u8 GetTrainerApproachDistanceNorth(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) +/*static*/ u8 GetTrainerApproachDistanceNorth(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) { if (trainerObj->currentCoords.x == x && y < trainerObj->currentCoords.y @@ -174,7 +174,7 @@ static u8 GetTrainerApproachDistanceNorth(struct ObjectEvent *trainerObj, s16 ra } // Returns how far west the player is from trainer. 0 if out of trainer's sight. -static u8 GetTrainerApproachDistanceWest(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) +/*static*/ u8 GetTrainerApproachDistanceWest(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) { if (trainerObj->currentCoords.y == y && x < trainerObj->currentCoords.x @@ -185,7 +185,7 @@ static u8 GetTrainerApproachDistanceWest(struct ObjectEvent *trainerObj, s16 ran } // Returns how far east the player is from trainer. 0 if out of trainer's sight. -static u8 GetTrainerApproachDistanceEast(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) +/*static*/ u8 GetTrainerApproachDistanceEast(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) { if (trainerObj->currentCoords.y == y && x > trainerObj->currentCoords.x @@ -197,7 +197,7 @@ static u8 GetTrainerApproachDistanceEast(struct ObjectEvent *trainerObj, s16 ran #define COLLISION_MASK (~1) -static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, u8 direction) +/*static*/ u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 approachDistance, u8 direction) { s16 x, y; u8 unk19_temp; @@ -245,7 +245,7 @@ static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 ap (dest) = (struct ObjectEvent *)(((task)->tTrainerObjHi << 16) | ((u16)(task)->tTrainerObjLo)); \ } while (0) -static void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDistance) +/*static*/ void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDistance) { u8 taskId = CreateTask(Task_RunTrainerSeeFuncList, 80); struct Task * task = &gTasks[taskId]; @@ -254,7 +254,7 @@ static void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDi task->tTrainerRange = approachDistance; } -static void StartTrainerApproachWithFollowupTask(TaskFunc taskFunc) +/*static*/ void StartTrainerApproachWithFollowupTask(TaskFunc taskFunc) { u8 taskId = FindTaskIdByFunc(Task_RunTrainerSeeFuncList); SetTaskFuncWithFollowupFunc(taskId, Task_RunTrainerSeeFuncList, taskFunc); @@ -262,7 +262,7 @@ static void StartTrainerApproachWithFollowupTask(TaskFunc taskFunc) Task_RunTrainerSeeFuncList(taskId); } -static void Task_RunTrainerSeeFuncList(u8 taskId) +/*static*/ void Task_RunTrainerSeeFuncList(u8 taskId) { struct Task * task = &gTasks[taskId]; struct ObjectEvent * trainerObj; @@ -281,12 +281,12 @@ static void Task_RunTrainerSeeFuncList(u8 taskId) // TrainerSeeFuncs -static bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { return FALSE; } -static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { u8 action; // FRLG introduces trainers who can see the player from offscreen above. @@ -306,7 +306,7 @@ static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct return TRUE; } -static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { if (FieldEffectActiveListContains(FLDEFF_EXCLAMATION_MARK_ICON)) { @@ -315,15 +315,15 @@ static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct O else { task->tFuncId++; - if (trainerObj->animPattern == MOVEMENT_TYPE_TREE_DISGUISE || trainerObj->animPattern == MOVEMENT_TYPE_MOUNTAIN_DISGUISE) + if (trainerObj->movementType == MOVEMENT_TYPE_TREE_DISGUISE || trainerObj->movementType == MOVEMENT_TYPE_MOUNTAIN_DISGUISE) task->tFuncId = 6; - if (trainerObj->animPattern == MOVEMENT_TYPE_HIDDEN) + if (trainerObj->movementType == MOVEMENT_TYPE_HIDDEN) task->tFuncId = 8; return TRUE; } } -static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { if (!ObjectEventIsMovementOverridden(trainerObj) || ObjectEventClearHeldMovementIfFinished(trainerObj)) { @@ -341,7 +341,7 @@ static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struc return FALSE; } -static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { struct ObjectEvent *playerObj; @@ -349,7 +349,7 @@ static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struc return FALSE; SetTrainerMovementType(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection)); - TryOverrideTemplateCoordsForObjectEvent(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection)); + OverrideMovementTypeForObjectEvent(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection)); OverrideTemplateCoordsForObjectEvent(trainerObj); playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -363,7 +363,7 @@ static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struc return FALSE; } -static bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { struct ObjectEvent *playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -374,7 +374,7 @@ static bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEven } // Jumps here if disguised. Not used in FRLG. -static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { if (!ObjectEventIsMovementOverridden(trainerObj) || ObjectEventClearHeldMovementIfFinished(trainerObj)) @@ -385,7 +385,7 @@ static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, s return FALSE; } -static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { if (ObjectEventClearHeldMovementIfFinished(trainerObj)) task->tFuncId = 3; @@ -394,7 +394,7 @@ static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, st } // Jump here if hidden in ash. Not used in FRLG. -static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { if (!ObjectEventIsMovementOverridden(trainerObj) || ObjectEventClearHeldMovementIfFinished(trainerObj)) @@ -405,7 +405,7 @@ static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * tas return FALSE; } -static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { if (ObjectEventCheckHeldMovementStatus(trainerObj)) { @@ -419,7 +419,7 @@ static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, str return FALSE; } -static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { struct Sprite *sprite; @@ -438,7 +438,7 @@ static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, stru return FALSE; } -static bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) +/*static*/ bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) { if (!FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH)) task->tFuncId = 3; @@ -447,7 +447,7 @@ static bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task *task, struct } // FRLG exclusive: Scroll the camera up to reveal an offscreen above trainer -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) +/*static*/ bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) { int specialObjectId; task->tData5 = 0; @@ -458,7 +458,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, stru return FALSE; } -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) +/*static*/ bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) { u8 specialObjectId; TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &specialObjectId); @@ -468,7 +468,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, stru if (task->tData5 != task->tTrainerRange - 1) { - ObjectEventSetHeldMovement(&gObjectEvents[specialObjectId], sub_8063FB0(DIR_NORTH)); + ObjectEventSetHeldMovement(&gObjectEvents[specialObjectId], GetWalkFastMovementAction(DIR_NORTH)); task->tData5++; } else @@ -481,7 +481,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, stru return FALSE; } -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +/*static*/ bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) { u8 specialObjectId; TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &specialObjectId); @@ -494,7 +494,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, st if (task->tData5 != task->tTrainerRange - 1) { - ObjectEventSetHeldMovement(&gObjectEvents[specialObjectId], sub_8063FB0(DIR_SOUTH)); + ObjectEventSetHeldMovement(&gObjectEvents[specialObjectId], GetWalkFastMovementAction(DIR_SOUTH)); task->tData5++; } else @@ -514,7 +514,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, st #undef tTrainerObjHi #undef tFuncId -static void Task_RevealTrainer_RunTrainerSeeFuncList(u8 taskId) +/*static*/ void Task_RevealTrainer_RunTrainerSeeFuncList(u8 taskId) { struct Task * task = &gTasks[taskId]; struct ObjectEvent * trainerObj; @@ -523,14 +523,14 @@ static void Task_RevealTrainer_RunTrainerSeeFuncList(u8 taskId) LoadWordFromTwoHalfwords((u16 *)&task->data[1], (uintptr_t *)&trainerObj); if (!task->data[7]) { - ObjectEventClearAnim(trainerObj); + ObjectEventClearHeldMovement(trainerObj); task->data[7]++; } sTrainerSeeFuncList2[task->data[0]](taskId, task, trainerObj); if (task->data[0] == 3 && !FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH)) { SetTrainerMovementType(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection)); - TryOverrideTemplateCoordsForObjectEvent(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection)); + OverrideMovementTypeForObjectEvent(trainerObj, GetTrainerFacingDirectionMovementType(trainerObj->facingDirection)); DestroyTask(taskId); } else @@ -549,7 +549,7 @@ void EndTrainerApproach(void) StartTrainerApproachWithFollowupTask(Task_DestroyTrainerApproachTask); } -static void Task_DestroyTrainerApproachTask(u8 taskId) +/*static*/ void Task_DestroyTrainerApproachTask(u8 taskId) { DestroyTask(taskId); EnableBothScriptContexts(); @@ -564,7 +564,7 @@ static void Task_DestroyTrainerApproachTask(u8 taskId) #define sData4 data[4] #define sFldEffId data[7] -static const struct OamData sOamData_Emoticons = { +/*static*/ const struct OamData sOamData_Emoticons = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, @@ -580,7 +580,7 @@ static const struct OamData sOamData_Emoticons = { .affineParam = 0, }; -static const struct SpriteFrameImage sSpriteImages_Emoticons[] = { +/*static*/ const struct SpriteFrameImage sSpriteImages_Emoticons[] = { {sGfx_Emoticons + 0x000, 0x80}, {sGfx_Emoticons + 0x040, 0x80}, {sGfx_Emoticons + 0x080, 0x80}, @@ -602,42 +602,42 @@ static const struct SpriteFrameImage sSpriteImages_Emoticons[] = { {sGfx_Emoticons + 0x380, 0x80}, }; -static const union AnimCmd sAnimCmd_ExclamationMark1[] = { +/*static*/ const union AnimCmd sAnimCmd_ExclamationMark1[] = { ANIMCMD_FRAME( 0, 4), ANIMCMD_FRAME( 1, 4), ANIMCMD_FRAME( 2, 52), ANIMCMD_END }; -static const union AnimCmd sAnimCmd_DoubleExclMark[] = { +/*static*/ const union AnimCmd sAnimCmd_DoubleExclMark[] = { ANIMCMD_FRAME( 6, 4), ANIMCMD_FRAME( 7, 4), ANIMCMD_FRAME( 8, 52), ANIMCMD_END }; -static const union AnimCmd sAnimCmd_X[] = { +/*static*/ const union AnimCmd sAnimCmd_X[] = { ANIMCMD_FRAME( 3, 4), ANIMCMD_FRAME( 4, 4), ANIMCMD_FRAME( 5, 52), ANIMCMD_END }; -static const union AnimCmd sAnimCmd_SmileyFace[] = { +/*static*/ const union AnimCmd sAnimCmd_SmileyFace[] = { ANIMCMD_FRAME( 9, 4), ANIMCMD_FRAME(10, 4), ANIMCMD_FRAME(11, 52), ANIMCMD_END }; -static const union AnimCmd sAnimCmd_QuestionMark[] = { +/*static*/ const union AnimCmd sAnimCmd_QuestionMark[] = { ANIMCMD_FRAME(12, 4), ANIMCMD_FRAME(13, 4), ANIMCMD_FRAME(14, 52), ANIMCMD_END }; -static const union AnimCmd *const sSpriteAnimTable_Emoticons[] = { +/*static*/ const union AnimCmd *const sSpriteAnimTable_Emoticons[] = { sAnimCmd_ExclamationMark1, sAnimCmd_DoubleExclMark, sAnimCmd_X, @@ -645,7 +645,7 @@ static const union AnimCmd *const sSpriteAnimTable_Emoticons[] = { sAnimCmd_QuestionMark }; -static const struct SpriteTemplate sSpriteTemplate_Emoticons = { +/*static*/ const struct SpriteTemplate sSpriteTemplate_Emoticons = { .tileTag = 0xFFFF, .paletteTag = 0xFFFF, .oam = &sOamData_Emoticons, @@ -705,7 +705,7 @@ u8 FldEff_QuestionMarkIcon(void) return 0; } -static void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnimNum) +/*static*/ void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnimNum) { sprite->oam.priority = 1; sprite->coordOffsetEnabled = 1; @@ -719,7 +719,7 @@ static void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnim StartSpriteAnim(sprite, spriteAnimNum); } -static void SpriteCB_TrainerIcons(struct Sprite *sprite) +/*static*/ void SpriteCB_TrainerIcons(struct Sprite *sprite) { u8 objEventId; |