fix: added shadows on direct corner map

Fixed #18
This commit is contained in:
Ariel A 2024-05-21 22:12:03 -04:00
parent 9b6843442a
commit ed98b0b8ba
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);
}
}