OBJ_EVENT_ID_PLAYER/CAMERA -> LOCALID_PLAYER/CAMERA
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
#include "constants/trainer_types.h"
|
||||
#include "constants/union_room.h"
|
||||
|
||||
#define SPECIAL_LOCALIDS_START (min(OBJ_EVENT_ID_CAMERA, \
|
||||
min(OBJ_EVENT_ID_PLAYER, \
|
||||
#define SPECIAL_LOCALIDS_START (min(LOCALID_CAMERA, \
|
||||
min(LOCALID_PLAYER, \
|
||||
LOCALID_BERRY_BLENDER_PLAYER_END - MAX_RFU_PLAYERS + 1)))
|
||||
|
||||
// The object event templates on a map cannot use the special IDs listed above or they can behave unexpectedly.
|
||||
@@ -1182,7 +1182,7 @@ static const u8 sPlayerDirectionToCopyDirection[][4] = {
|
||||
static void ClearObjectEvent(struct ObjectEvent *objectEvent)
|
||||
{
|
||||
*objectEvent = (struct ObjectEvent){};
|
||||
objectEvent->localId = OBJ_EVENT_ID_PLAYER;
|
||||
objectEvent->localId = LOCALID_PLAYER;
|
||||
objectEvent->mapNum = MAP_NUM(MAP_UNDEFINED);
|
||||
objectEvent->mapGroup = MAP_GROUP(MAP_UNDEFINED);
|
||||
objectEvent->movementActionId = MOVEMENT_ACTION_NONE;
|
||||
@@ -1233,7 +1233,7 @@ u8 GetFirstInactiveObjectEventId(void)
|
||||
|
||||
u8 GetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId)
|
||||
{
|
||||
if (localId < OBJ_EVENT_ID_PLAYER)
|
||||
if (localId < LOCALID_PLAYER)
|
||||
return GetObjectEventIdByLocalIdAndMapInternal(localId, mapNum, mapGroupId);
|
||||
|
||||
return GetObjectEventIdByLocalId(localId);
|
||||
@@ -6182,7 +6182,7 @@ bool8 MovementAction_FacePlayer_Step0(struct ObjectEvent *objectEvent, struct Sp
|
||||
{
|
||||
u8 playerObjectId;
|
||||
|
||||
if (!TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0, &playerObjectId))
|
||||
if (!TryGetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0, &playerObjectId))
|
||||
FaceDirection(objectEvent, sprite, GetDirectionToFace(objectEvent->currentCoords.x,
|
||||
objectEvent->currentCoords.y,
|
||||
gObjectEvents[playerObjectId].currentCoords.x,
|
||||
@@ -6195,7 +6195,7 @@ bool8 MovementAction_FaceAwayPlayer_Step0(struct ObjectEvent *objectEvent, struc
|
||||
{
|
||||
u8 playerObjectId;
|
||||
|
||||
if (!TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0, &playerObjectId))
|
||||
if (!TryGetObjectEventIdByLocalIdAndMap(LOCALID_PLAYER, 0, 0, &playerObjectId))
|
||||
FaceDirection(objectEvent, sprite, GetOppositeDirection(GetDirectionToFace(objectEvent->currentCoords.x,
|
||||
objectEvent->currentCoords.y,
|
||||
gObjectEvents[playerObjectId].currentCoords.x,
|
||||
|
||||
Reference in New Issue
Block a user