parent
9b6843442a
commit
ed98b0b8ba
@ -312,6 +312,9 @@
|
||||
#define OBJ_KIND_CLONE 255 // Exclusive to FRLG
|
||||
|
||||
// Special object event local ids
|
||||
// Used for link player OWs in CreateLinkPlayerSprite
|
||||
#define OBJ_EVENT_ID_DYNAMIC_BASE 0xF0
|
||||
|
||||
#define OBJ_EVENT_ID_PLAYER 0xFF
|
||||
#define OBJ_EVENT_ID_CAMERA 0x7F
|
||||
#define OBJ_EVENT_ID_FOLLOWER 0xFE
|
||||
|
||||
@ -1345,7 +1345,7 @@ u8 GetFirstInactiveObjectEventId(void)
|
||||
|
||||
u8 GetObjectEventIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroupId)
|
||||
{
|
||||
if (localId < OBJ_EVENT_ID_FOLLOWER)
|
||||
if (localId < OBJ_EVENT_ID_DYNAMIC_BASE)
|
||||
return GetObjectEventIdByLocalIdAndMapInternal(localId, mapNum, mapGroupId);
|
||||
|
||||
return GetObjectEventIdByLocalId(localId);
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include "field_camera.h"
|
||||
#include "field_control_avatar.h"
|
||||
#include "field_effect.h"
|
||||
#include "field_effect_helpers.h"
|
||||
#include "field_message_box.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "field_screen_effect.h"
|
||||
@ -61,6 +62,7 @@
|
||||
#include "wild_encounter.h"
|
||||
#include "frontier_util.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/map_types.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
@ -3345,6 +3347,8 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion)
|
||||
sprite->coordOffsetEnabled = TRUE;
|
||||
sprite->data[0] = linkPlayerId;
|
||||
objEvent->triggerGroundEffectsOnMove = 0;
|
||||
objEvent->localId = OBJ_EVENT_ID_DYNAMIC_BASE + linkPlayerId;
|
||||
SetUpShadow(objEvent, sprite);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user