Skip to content

Commit f85baa5

Browse files
Merge pull request #2164 from cawtds/shop-menu-palette
Document shop menu palette
2 parents 6f8a1bb + 5da5cb4 commit f85baa5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/shop.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define TAG_ITEM_ICON_BASE 2110
4444

4545
#define MAX_ITEMS_SHOWN 8
46+
#define SHOP_MENU_PALETTE_ID 12
4647

4748
enum {
4849
WIN_BUY_SELL_QUIT,
@@ -740,7 +741,7 @@ static void BuyMenuDecompressBgGraphics(void)
740741
{
741742
DecompressAndCopyTileDataToVram(1, gShopMenu_Gfx, 0x3A0, 0x3E3, 0);
742743
LZDecompressWram(gShopMenu_Tilemap, sShopData->tilemapBuffers[0]);
743-
LoadCompressedPalette(gShopMenu_Pal, BG_PLTT_ID(12), PLTT_SIZE_4BPP);
744+
LoadCompressedPalette(gShopMenu_Pal, BG_PLTT_ID(SHOP_MENU_PALETTE_ID), PLTT_SIZE_4BPP);
744745
}
745746

746747
static void BuyMenuInitWindows(void)
@@ -941,7 +942,7 @@ static void BuyMenuCopyMenuBgToBg1TilemapBuffer(void)
941942
for (i = 0; i < 1024; i++)
942943
{
943944
if (src[i] != 0)
944-
dest[i] = src[i] + 0xC3E3;
945+
dest[i] = src[i] + ((SHOP_MENU_PALETTE_ID << 12) | 0x3E3);
945946
}
946947
}
947948

0 commit comments

Comments
 (0)