Merge branch 'master' into sync-numtiles
This commit is contained in:
+6
-6
@@ -751,9 +751,9 @@ static void BuyMenuDrawMapBg(void)
|
||||
metatileLayerType = MapGridGetMetatileLayerTypeAt(x + i, y + j);
|
||||
|
||||
if (metatile < NUM_METATILES_IN_PRIMARY)
|
||||
BuyMenuDrawMapMetatile(i, j, (u16 *)mapLayout->primaryTileset->metatiles + metatile * 8, metatileLayerType);
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->primaryTileset->metatiles + metatile * 8, metatileLayerType);
|
||||
else
|
||||
BuyMenuDrawMapMetatile(i, j, (u16 *)mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * 8), metatileLayerType);
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * 8), metatileLayerType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -791,11 +791,11 @@ static void BuyMenuDrawMapMetatileLayer(u16 *dest, s16 offset1, s16 offset2, con
|
||||
static void BuyMenuCollectObjectEventData(void)
|
||||
{
|
||||
s16 facingX, facingY;
|
||||
u8 x, y, z;
|
||||
u8 x, y, elevation;
|
||||
u8 num = 0;
|
||||
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&facingX, &facingY);
|
||||
z = PlayerGetZCoord();
|
||||
elevation = PlayerGetElevation();
|
||||
|
||||
for (y = 0; y < OBJECT_EVENTS_COUNT; y++)
|
||||
sViewportObjectEvents[y][OBJECT_EVENT_ID] = OBJECT_EVENTS_COUNT;
|
||||
@@ -804,7 +804,7 @@ static void BuyMenuCollectObjectEventData(void)
|
||||
{
|
||||
for (x = 0; x < 7; x++)
|
||||
{
|
||||
u8 eventObjId = GetObjectEventIdByXYZ(facingX - 3 + x, facingY - 2 + y, z);
|
||||
u8 eventObjId = GetObjectEventIdByPosition(facingX - 3 + x, facingY - 2 + y, elevation);
|
||||
if (eventObjId != OBJECT_EVENTS_COUNT)
|
||||
{
|
||||
sViewportObjectEvents[num][OBJECT_EVENT_ID] = eventObjId;
|
||||
@@ -844,7 +844,7 @@ static void BuyMenuDrawObjectEvents(void)
|
||||
continue;
|
||||
|
||||
graphicsInfo = GetObjectEventGraphicsInfo(gObjectEvents[sViewportObjectEvents[i][OBJECT_EVENT_ID]].graphicsId);
|
||||
spriteId = AddPseudoObjectEvent(
|
||||
spriteId = CreateObjectGraphicsSprite(
|
||||
gObjectEvents[sViewportObjectEvents[i][OBJECT_EVENT_ID]].graphicsId,
|
||||
SpriteCallbackDummy,
|
||||
(u16)sViewportObjectEvents[i][X_COORD] * 16 - 8,
|
||||
|
||||
Reference in New Issue
Block a user