Write palette IDs in hex
This commit is contained in:
+18
-17
@@ -20,9 +20,10 @@
|
||||
#include "window.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
#define DLG_WINDOW_PALETTE_NUM 15
|
||||
#define DLG_WINDOW_PALETTE_NUM 0xF
|
||||
#define DLG_WINDOW_BASE_TILE_NUM 0x200
|
||||
#define STD_WINDOW_PALETTE_NUM 14
|
||||
#define STD_WINDOW_PALETTE_NUM 0xE
|
||||
#define STD_WINDOW_PALETTE_SIZE PLTT_SIZEOF(10)
|
||||
#define STD_WINDOW_BASE_TILE_NUM 0x214
|
||||
|
||||
struct MenuInfoIcon
|
||||
@@ -88,7 +89,7 @@ static const struct WindowTemplate sStandardTextBox_WindowTemplates[] =
|
||||
.tilemapTop = 15,
|
||||
.width = 27,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x194
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
@@ -101,7 +102,7 @@ static const struct WindowTemplate sYesNo_WindowTemplates =
|
||||
.tilemapTop = 9,
|
||||
.width = 5,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x125
|
||||
};
|
||||
|
||||
@@ -208,8 +209,8 @@ void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonP
|
||||
|
||||
void LoadMessageBoxAndBorderGfx(void)
|
||||
{
|
||||
LoadMessageBoxGfx(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadMessageBoxGfx(0, DLG_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(DLG_WINDOW_PALETTE_NUM));
|
||||
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(STD_WINDOW_PALETTE_NUM));
|
||||
}
|
||||
|
||||
void DrawDialogueFrame(u8 windowId, bool8 copyToVram)
|
||||
@@ -427,18 +428,18 @@ void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram)
|
||||
|
||||
void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram)
|
||||
{
|
||||
LoadMessageBoxGfx(windowId, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadMessageBoxGfx(windowId, DLG_WINDOW_BASE_TILE_NUM, BG_PLTT_ID(DLG_WINDOW_PALETTE_NUM));
|
||||
DrawDialogFrameWithCustomTileAndPalette(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, 0xF);
|
||||
}
|
||||
|
||||
void Menu_LoadStdPal(void)
|
||||
{
|
||||
LoadPalette(gStandardMenuPalette, STD_WINDOW_PALETTE_NUM * 0x10, 0x14);
|
||||
LoadPalette(gStandardMenuPalette, BG_PLTT_ID(STD_WINDOW_PALETTE_NUM), STD_WINDOW_PALETTE_SIZE);
|
||||
}
|
||||
|
||||
void Menu_LoadStdPalAt(u16 offset)
|
||||
{
|
||||
LoadPalette(gStandardMenuPalette, offset, 0x14);
|
||||
LoadPalette(gStandardMenuPalette, offset, STD_WINDOW_PALETTE_SIZE);
|
||||
}
|
||||
|
||||
// Unused
|
||||
@@ -550,7 +551,7 @@ void AddTextPrinterWithCallbackForMessage(bool8 canSpeedUp, void (*callback)(str
|
||||
|
||||
void EraseFieldMessageBox(bool8 copyToVram)
|
||||
{
|
||||
FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 0x11);
|
||||
FillBgTilemapBufferRect(0, 0, 0, 0, 32, 32, 17);
|
||||
if (copyToVram == TRUE)
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
@@ -685,7 +686,7 @@ void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram)
|
||||
|
||||
static void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, 0);
|
||||
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, 0x0);
|
||||
}
|
||||
|
||||
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 baseTileNum, u8 paletteNum)
|
||||
@@ -782,7 +783,7 @@ void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram)
|
||||
|
||||
static void WindowFunc_ClearStdWindowAndFrameToTransparent(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, 0);
|
||||
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, 0x0);
|
||||
}
|
||||
|
||||
// Creates the window used to display the info bar at the top of the HOF PC that shows the controls and team number.
|
||||
@@ -805,10 +806,10 @@ u8 HofPCTopBar_AddWindow(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile)
|
||||
|
||||
sHofPCTopBarWindowId = AddWindow(&window);
|
||||
|
||||
if (palette > 15)
|
||||
palette = 15 * 16;
|
||||
if (palette > 0xF)
|
||||
palette = BG_PLTT_ID(0xF);
|
||||
else
|
||||
palette *= 16;
|
||||
palette = BG_PLTT_ID(palette);
|
||||
|
||||
LoadPalette(sHofPC_TopBar_Pal, palette, sizeof(sHofPC_TopBar_Pal));
|
||||
return sHofPCTopBarWindowId;
|
||||
@@ -2084,7 +2085,7 @@ static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u
|
||||
// Unused
|
||||
static void LoadMonIconPalAtOffset(u8 palOffset, u16 speciesId)
|
||||
{
|
||||
LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, 0x20);
|
||||
LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, PLTT_SIZE_4BPP);
|
||||
}
|
||||
|
||||
// Unused
|
||||
@@ -2111,7 +2112,7 @@ void ListMenuLoadStdPalAt(u8 palOffset, u8 palId)
|
||||
break;
|
||||
}
|
||||
|
||||
LoadPalette(palette, palOffset, 0x20);
|
||||
LoadPalette(palette, palOffset, PLTT_SIZE_4BPP);
|
||||
}
|
||||
|
||||
void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y)
|
||||
|
||||
Reference in New Issue
Block a user