Solved a bunch of -Wall errors on modern
This commit is contained in:
64
src/menu.c
64
src/menu.c
@@ -442,14 +442,12 @@ void Menu_LoadStdPalAt(u16 offset)
|
||||
LoadPalette(gStandardMenuPalette, offset, STD_WINDOW_PALETTE_SIZE);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static const u16 *Menu_GetStdPal(void)
|
||||
static UNUSED const u16* Menu_GetStdPal(void)
|
||||
{
|
||||
return gStandardMenuPalette;
|
||||
}
|
||||
|
||||
// Unused
|
||||
static u16 Menu_GetStdPalColor(u8 colorNum)
|
||||
static u16 UNUSED Menu_GetStdPalColor(u8 colorNum)
|
||||
{
|
||||
if (colorNum > 15)
|
||||
colorNum = 0;
|
||||
@@ -510,14 +508,12 @@ void RemoveStartMenuWindow(void)
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
static u16 GetDialogFrameBaseTileNum(void)
|
||||
static u16 UNUSED GetDialogFrameBaseTileNum(void)
|
||||
{
|
||||
return DLG_WINDOW_BASE_TILE_NUM;
|
||||
}
|
||||
|
||||
// Unused
|
||||
static u16 GetStandardFrameBaseTileNum(void)
|
||||
static u16 UNUSED GetStandardFrameBaseTileNum(void)
|
||||
{
|
||||
return STD_WINDOW_BASE_TILE_NUM;
|
||||
}
|
||||
@@ -567,8 +563,7 @@ void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16
|
||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
// Never used.
|
||||
static void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum)
|
||||
static void UNUSED DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum)
|
||||
{
|
||||
sTileNum = tileNum;
|
||||
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
|
||||
@@ -877,15 +872,13 @@ void HofPCTopBar_PrintPair(const u8 *string, const u8 *string2, bool8 noBg, u8 l
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void HofPCTopBar_CopyToVram(void)
|
||||
static void UNUSED HofPCTopBar_CopyToVram(void)
|
||||
{
|
||||
if (sHofPCTopBarWindowId != WINDOW_NONE)
|
||||
CopyWindowToVram(sHofPCTopBarWindowId, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void HofPCTopBar_Clear(void)
|
||||
static void UNUSED HofPCTopBar_Clear(void)
|
||||
{
|
||||
if (sHofPCTopBarWindowId != WINDOW_NONE)
|
||||
{
|
||||
@@ -936,8 +929,7 @@ u8 InitMenuNormal(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 n
|
||||
return InitMenu(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos, FALSE);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static u8 InitMenuDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos)
|
||||
static u8 UNUSED InitMenuDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 numChoices, u8 initialCursorPos)
|
||||
{
|
||||
u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1);
|
||||
return InitMenuNormal(windowId, fontId, left, top, cursorHeight, numChoices, initialCursorPos);
|
||||
@@ -1114,8 +1106,7 @@ void PrintMenuActionTextsAtPos(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineH
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 letterSpacing, u8 lineSpacing)
|
||||
static void UNUSED PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, u8 letterSpacing, u8 lineSpacing)
|
||||
{
|
||||
u8 i;
|
||||
for (i = 0; i < itemCount; i++)
|
||||
@@ -1123,8 +1114,7 @@ static void PrintMenuActionTextsWithSpacing(u8 windowId, u8 fontId, u8 left, u8
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void PrintMenuActionTextsAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions)
|
||||
static void UNUSED PrintMenuActionTextsAtTop(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions)
|
||||
{
|
||||
PrintMenuActionTextsAtPos(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, lineHeight, itemCount, menuActions);
|
||||
}
|
||||
@@ -1156,8 +1146,7 @@ void PrintMenuActionTexts(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpac
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void PrintMenuActionTextsAtTopById(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds)
|
||||
static void UNUSED PrintMenuActionTextsAtTopById(u8 windowId, u8 fontId, u8 lineHeight, u8 itemCount, const struct MenuAction *menuActions, const u8 *actionIds)
|
||||
{
|
||||
PrintMenuActionTexts(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 1, GetFontAttribute(fontId, FONTATTR_LETTER_SPACING), lineHeight, itemCount, menuActions, actionIds);
|
||||
}
|
||||
@@ -1214,7 +1203,7 @@ static void CreateYesNoMenuAtPos(const struct WindowTemplate *window, u8 fontId,
|
||||
InitMenuNormal(sYesNoWindowId, fontId, left, top, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 2, initialCursorPos);
|
||||
}
|
||||
|
||||
static void CreateYesNoMenuInTopLeft(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum)
|
||||
static void UNUSED CreateYesNoMenuInTopLeft(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 paletteNum)
|
||||
{
|
||||
CreateYesNoMenuAtPos(window, fontId, 0, 1, baseTileNum, paletteNum, 0);
|
||||
}
|
||||
@@ -1245,8 +1234,7 @@ static void PrintMenuActionGridText(u8 windowId, u8 fontId, u8 left, u8 top, u8
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void PrintMenuActionGridTextAtTop(u8 windowId, u8 fontId, u8 width, u8 height, u8 columns, u8 rows, const struct MenuAction *menuActions)
|
||||
static void UNUSED PrintMenuActionGridTextAtTop(u8 windowId, u8 fontId, u8 width, u8 height, u8 columns, u8 rows, const struct MenuAction *menuActions)
|
||||
{
|
||||
PrintMenuActionGridText(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, width, height, columns, rows, menuActions);
|
||||
}
|
||||
@@ -1282,8 +1270,7 @@ void PrintMenuActionGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void PrintMenuActionGrid_TopLeft(u8 windowId, u8 fontId, u8 optionWidth, u8 unused, u8 horizontalCount, u8 verticalCount, const struct MenuAction *menuActions, const u8 *actionIds)
|
||||
static void UNUSED PrintMenuActionGrid_TopLeft(u8 windowId, u8 fontId, u8 optionWidth, u8 unused, u8 horizontalCount, u8 verticalCount, const struct MenuAction *menuActions, const u8 *actionIds)
|
||||
{
|
||||
PrintMenuActionGrid(windowId, fontId, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH), 0, optionWidth, horizontalCount, verticalCount, menuActions, actionIds);
|
||||
}
|
||||
@@ -1315,8 +1302,7 @@ static u8 InitMenuGrid(u8 windowId, u8 fontId, u8 left, u8 top, u8 optionWidth,
|
||||
return sMenu.cursorPos;
|
||||
}
|
||||
|
||||
// Unused
|
||||
static u8 InitMenuGridDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos)
|
||||
static u8 UNUSED InitMenuGridDefaultCursorHeight(u8 windowId, u8 fontId, u8 left, u8 top, u8 width, u8 columns, u8 rows, u8 cursorPos)
|
||||
{
|
||||
u8 cursorHeight = GetMenuCursorDimensionByFont(fontId, 1);
|
||||
u8 numChoices = columns * rows;
|
||||
@@ -1408,8 +1394,7 @@ u8 ChangeGridMenuCursorPosition(s8 deltaX, s8 deltaY)
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
static s8 Menu_ProcessGridInput_NoSoundLimit(void)
|
||||
static s8 UNUSED Menu_ProcessGridInput_NoSoundLimit(void)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
@@ -1489,8 +1474,7 @@ s8 Menu_ProcessGridInput(void)
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
// Unused
|
||||
static s8 Menu_ProcessGridInputRepeat_NoSoundLimit(void)
|
||||
static s8 UNUSED Menu_ProcessGridInputRepeat_NoSoundLimit(void)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
@@ -1529,8 +1513,7 @@ static s8 Menu_ProcessGridInputRepeat_NoSoundLimit(void)
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
// Unused
|
||||
static s8 Menu_ProcessGridInputRepeat(void)
|
||||
static s8 UNUSED Menu_ProcessGridInputRepeat(void)
|
||||
{
|
||||
u8 oldPos = sMenu.cursorPos;
|
||||
|
||||
@@ -1674,8 +1657,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void PrintMenuActionGridTextNoSpacing(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *menuActions, const u8 *actionIds)
|
||||
static void UNUSED PrintMenuActionGridTextNoSpacing(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *menuActions, const u8 *actionIds)
|
||||
{
|
||||
u8 i;
|
||||
u8 j;
|
||||
@@ -2007,7 +1989,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y)
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SKIP_DRAW, 0);
|
||||
}
|
||||
|
||||
static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
static void UNUSED UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
{
|
||||
int loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY;
|
||||
const u8 *pixelsSrc;
|
||||
@@ -2082,14 +2064,12 @@ static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void LoadMonIconPalAtOffset(u8 palOffset, u16 speciesId)
|
||||
static void UNUSED LoadMonIconPalAtOffset(u8 palOffset, u16 speciesId)
|
||||
{
|
||||
LoadPalette(GetValidMonIconPalettePtr(speciesId), palOffset, PLTT_SIZE_4BPP);
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void DrawMonIconAtPos(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y)
|
||||
static void UNUSED DrawMonIconAtPos(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y)
|
||||
{
|
||||
BlitBitmapToWindow(windowId, GetMonIconPtr(speciesId, personality, 1), x, y, 32, 32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user