Add MAP_OFFSET
This commit is contained in:
@@ -683,7 +683,7 @@ void UpdateEscapeWarp(s16 x, s16 y)
|
||||
u8 currMapType = GetCurrentMapType();
|
||||
u8 destMapType = GetMapTypeByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum);
|
||||
if (IsMapTypeOutdoors(currMapType) && IsMapTypeOutdoors(destMapType) != TRUE)
|
||||
SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x - 7, y - 6);
|
||||
SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET + 1);
|
||||
}
|
||||
|
||||
void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y)
|
||||
@@ -957,7 +957,7 @@ static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *playerStr
|
||||
|
||||
static u16 GetCenterScreenMetatileBehavior(void)
|
||||
{
|
||||
return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + 7, gSaveBlock1Ptr->pos.y + 7);
|
||||
return MapGridGetMetatileBehaviorAt(gSaveBlock1Ptr->pos.x + MAP_OFFSET, gSaveBlock1Ptr->pos.y + MAP_OFFSET);
|
||||
}
|
||||
|
||||
bool32 Overworld_IsBikingAllowed(void)
|
||||
|
||||
Reference in New Issue
Block a user