Clean up script_movement documentation

This commit is contained in:
GriffinR 2019-09-16 00:22:50 -04:00 committed by huderlem
parent f9a8f44a29
commit 340c4e1411
6 changed files with 11 additions and 11 deletions

View File

@ -3,6 +3,6 @@
bool8 ScriptMovement_StartObjectMovementScript(u8 localId, u8 mapNum, u8 mapGroup, const u8 *movementScript);
bool8 ScriptMovement_IsObjectMovementFinished(u8 localId, u8 mapNum, u8 mapGroup);
void ScriptMovement_StopAll(void);
void ScriptMovement_UnfreezeEventObjects(void);
#endif // GUARD_SCRIPT_MOVEMENT_H

View File

@ -92,7 +92,7 @@ void ScriptUnfreezeEventObjects(void)
{
u8 playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
ScriptMovement_StopAll();
ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
}
@ -104,7 +104,7 @@ void sub_8098524(void)
EventObjectClearHeldMovementIfFinished(&gEventObjects[gSelectedEventObject]);
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
ScriptMovement_StopAll();
ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
}

View File

@ -1290,7 +1290,7 @@ static bool32 sub_81963F0(u8 taskId)
sub_81973A4();
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
ScriptMovement_StopAll();
ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
ScriptContext2_Disable();
}

View File

@ -55,7 +55,7 @@ void FinishMossdeepGymTiles(void)
id = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[id]);
ScriptMovement_StopAll();
ScriptMovement_UnfreezeEventObjects();
}
u16 MossdeepGym_MoveEvents(u8 arg0)

View File

@ -1247,7 +1247,7 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
HideFieldMessageBox();
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
ScriptMovement_StopAll();
ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
return FALSE;
}
@ -1261,7 +1261,7 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
EventObjectClearHeldMovementIfFinished(&gEventObjects[gSelectedEventObject]);
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
ScriptMovement_StopAll();
ScriptMovement_UnfreezeEventObjects();
UnfreezeEventObjects();
return FALSE;
}

View File

@ -13,7 +13,7 @@ static bool8 ScriptMovement_TryAddNewMovement(u8 taskId, u8 eventObjId, const u8
static u8 GetMovementScriptIdFromEventObjectId(u8 taskId, u8 eventObjId);
static bool8 IsMovementScriptFinished(u8 taskId, u8 moveScrId);
static void ScriptMovement_AddNewMovement(u8 taskId, u8 moveScrId, u8 eventObjId, const u8 *movementScript);
static void ScriptMovement_UnfreezeObjects(u8 taskId);
static void ScriptMovement_UnfreezeActiveObjects(u8 taskId);
static void ScriptMovement_MoveObjects(u8 taskId);
static void ScriptMovement_TakeStep(u8 taskId, u8 moveScrId, u8 eventObjId, const u8 *movementScript);
@ -47,14 +47,14 @@ bool8 ScriptMovement_IsObjectMovementFinished(u8 localId, u8 mapNum, u8 mapGroup
return IsMovementScriptFinished(taskId, moveScrId);
}
void ScriptMovement_StopAll(void)
void ScriptMovement_UnfreezeEventObjects(void)
{
u8 taskId;
taskId = GetMoveObjectsTaskId();
if (taskId != 0xFF)
{
ScriptMovement_UnfreezeObjects(taskId);
ScriptMovement_UnfreezeActiveObjects(taskId);
DestroyTask(taskId);
}
}
@ -182,7 +182,7 @@ static void ScriptMovement_AddNewMovement(u8 taskId, u8 moveScrId, u8 eventObjId
SetEventObjectIdAtMovementScript(taskId, moveScrId, eventObjId);
}
static void ScriptMovement_UnfreezeObjects(u8 taskId)
static void ScriptMovement_UnfreezeActiveObjects(u8 taskId)
{
u8 *pEventObjId;
u8 i;