diff options
Diffstat (limited to 'src/item_use.c')
-rw-r--r-- | src/item_use.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/item_use.c b/src/item_use.c index 9c8c2da57..348806e06 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -17,7 +17,7 @@ #include "constants/items.h" #include "mail.h" #include "main.h" -#include "event_obj_lock.h" +#include "event_object_lock.h" #include "menu.h" #include "menu_helpers.h" #include "metatile_behavior.h" @@ -34,7 +34,7 @@ #include "string_util.h" #include "strings.h" #include "task.h" -#include "constants/bg_event_constants.h" +#include "constants/event_bg.h" #include "constants/map_types.h" #include "constants/species.h" #include "constants/vars.h" @@ -213,7 +213,7 @@ void ItemUseOnFieldCB_Bike(u8 taskId) if (ItemId_GetSecondaryId(gSpecialVar_ItemId) == 1) GetOnOffBike(PLAYER_AVATAR_FLAG_ACRO_BIKE); - ScriptUnfreezeEventObjects(); + ScriptUnfreezeObjectEvents(); ScriptContext2_Disable(); DestroyTask(taskId); } @@ -321,7 +321,7 @@ void RunItemfinderResults(u8 taskId) void ExitItemfinder(u8 taskId) { Menu_EraseWindowRect(0, 14, 29, 19); - ScriptUnfreezeEventObjects(); + ScriptUnfreezeObjectEvents(); ScriptContext2_Disable(); DestroyTask(taskId); } @@ -548,15 +548,15 @@ u8 GetPlayerDirectionTowardsHiddenItem(s16 itemX, s16 itemY) void SetPlayerDirectionTowardsItem(u8 direction) { - EventObjectClearHeldMovementIfFinished(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]); - EventObjectClearHeldMovement(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]); - UnfreezeEventObject(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]); + ObjectEventClearHeldMovementIfFinished(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)]); + ObjectEventClearHeldMovement(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)]); + UnfreezeObjectEvent(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)]); PlayerTurnInPlace(direction); } void DisplayItemRespondingMessageAndExitItemfinder(u8 taskId) { - if (EventObjectCheckHeldMovementStatus(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE) + if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE) DisplayItemMessageOnField(taskId, gOtherText_ItemfinderResponding, ExitItemfinder, 0); } @@ -564,7 +564,7 @@ void RotatePlayerAndExitItemfinder(u8 taskId) { s16 *data = gTasks[taskId].data; - if (EventObjectCheckHeldMovementStatus(&gEventObjects[GetEventObjectIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE + if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(0xFF, 0, 0)]) == TRUE || data[2] == FALSE) { SetPlayerDirectionTowardsItem(gItemFinderDirections[data[5]]); |