diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2022-01-19 10:59:37 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2022-01-19 10:59:37 -0500 |
commit | e3b49604d4d8981c9fa599cbc23874ac61036c9e (patch) | |
tree | d6e0d035a9d7fa0c74d729fec41c64000b07efb7 /src | |
parent | 8200fda14e5cddabcd2a4aaddf4f558cfbf898fb (diff) |
Use metatile layer constants in shop
Diffstat (limited to 'src')
-rwxr-xr-x | src/shop.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shop.c b/src/shop.c index f41ae315f..e011c4f62 100755 --- a/src/shop.c +++ b/src/shop.c @@ -743,7 +743,7 @@ static void BuyMenuDrawMapBg(void) if (BuyMenuCheckForOverlapWithMenuBg(i, j) == TRUE) metatileLayerType = MapGridGetMetatileLayerTypeAt(x + i, y + j); else - metatileLayerType = 1; + metatileLayerType = METATILE_LAYER_TYPE_COVERED; if (metatile < NUM_METATILES_IN_PRIMARY) { @@ -764,15 +764,15 @@ static void BuyMenuDrawMapMetatile(s16 x, s16 y, const u16 *src, u8 metatileLaye switch (metatileLayerType) { - case 0: + case METATILE_LAYER_TYPE_NORMAL: BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[3], offset1, offset2, src); BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[1], offset1, offset2, src + 4); break; - case 1: + case METATILE_LAYER_TYPE_COVERED: BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[2], offset1, offset2, src); BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[3], offset1, offset2, src + 4); break; - case 2: + case METATILE_LAYER_TYPE_SPLIT: BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[2], offset1, offset2, src); BuyMenuDrawMapMetatileLayer(sShopData->tilemapBuffers[1], offset1, offset2, src + 4); break; @@ -866,7 +866,7 @@ static void BuyMenuDrawObjectEvents(void) static bool8 BuyMenuCheckIfObjectEventOverlapsMenuBg(s16 *object) { - if (!BuyMenuCheckForOverlapWithMenuBg(object[X_COORD], object[Y_COORD] + 2) && object[LAYER_TYPE] != MB_SECRET_BASE_WALL) + if (!BuyMenuCheckForOverlapWithMenuBg(object[X_COORD], object[Y_COORD] + 2) && object[LAYER_TYPE] != METATILE_LAYER_TYPE_COVERED) { return TRUE; } |