From 6aee7d38f3f3dcbfea7ce6d6d5ddecce740f9ee9 Mon Sep 17 00:00:00 2001 From: PokeCodec Date: Sun, 23 Aug 2020 18:50:57 -0400 Subject: sizeOf data type, not pointer value --- src/menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/menu.c') diff --git a/src/menu.c b/src/menu.c index ac2f7d85b..e9d4207c9 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1075,17 +1075,17 @@ s8 Menu_ProcessInputNoWrapAround_other(void) PlaySE(SE_SELECT); return sMenu.cursorPos; } - else if (gMain.newKeys & B_BUTTON) + if (gMain.newKeys & B_BUTTON) { return MENU_B_PRESSED; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) + if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_UP) { if (oldPos != Menu_MoveCursorNoWrapAround(-1)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) + if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_DOWN) { if (oldPos != Menu_MoveCursorNoWrapAround(1)) PlaySE(SE_SELECT); -- cgit v1.2.3 From 86a1e8987953cea0b7bba7e5753611f926734f1b Mon Sep 17 00:00:00 2001 From: PokeCodec Date: Sun, 23 Aug 2020 18:57:00 -0400 Subject: Documentation of unk field --- src/menu.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/menu.c') diff --git a/src/menu.c b/src/menu.c index e9d4207c9..eb980ed2e 100644 --- a/src/menu.c +++ b/src/menu.c @@ -180,7 +180,7 @@ u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed printer.currentY = 1; printer.letterSpacing = 0; printer.lineSpacing = 0; - printer.unk = 0; + printer.style = 0; printer.fgColor = fgColor; printer.bgColor = bgColor; printer.shadowColor = shadowColor; @@ -1130,7 +1130,7 @@ void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 l printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND); printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND); printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(fontId, FONTATTR_UNKNOWN); + printer.style = GetFontAttribute(fontId, FONTATTR_STYLE); printer.letterSpacing = letterSpacing; printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); printer.x = left; @@ -1194,7 +1194,7 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND); printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND); printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(fontId, FONTATTR_UNKNOWN); + printer.style = GetFontAttribute(fontId, FONTATTR_STYLE); printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING); printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); @@ -1252,7 +1252,7 @@ void sub_8198DBC(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND); printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND); printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(fontId, FONTATTR_UNKNOWN); + printer.style = GetFontAttribute(fontId, FONTATTR_STYLE); printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING); printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); @@ -1625,7 +1625,7 @@ void sub_81995E4(u8 windowId, u8 itemCount, const struct MenuAction *strs, const printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND); printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN); + printer.style = GetFontAttribute(1, FONTATTR_STYLE); printer.letterSpacing = 0; printer.lineSpacing = 0; printer.x = 8; @@ -1659,7 +1659,7 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND); printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN); + printer.style = GetFontAttribute(1, FONTATTR_STYLE); printer.letterSpacing = 0; printer.lineSpacing = 0; @@ -1690,7 +1690,7 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M printer.fgColor = GetFontAttribute(1, FONTATTR_COLOR_FOREGROUND); printer.bgColor = GetFontAttribute(1, FONTATTR_COLOR_BACKGROUND); printer.shadowColor = GetFontAttribute(1, FONTATTR_COLOR_SHADOW); - printer.unk = GetFontAttribute(1, FONTATTR_UNKNOWN); + printer.style = GetFontAttribute(1, FONTATTR_STYLE); printer.letterSpacing = 0; printer.lineSpacing = 0; @@ -1957,7 +1957,7 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const printer.currentY = printer.y; printer.letterSpacing = GetFontAttribute(fontId, 2); printer.lineSpacing = GetFontAttribute(fontId, 3); - printer.unk = 0; + printer.style = 0; printer.fgColor = color[1]; printer.bgColor = color[0]; printer.shadowColor = color[2]; @@ -1978,7 +1978,7 @@ void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 left, u8 top, u8 le printer.currentY = printer.y; printer.letterSpacing = letterSpacing; printer.lineSpacing = lineSpacing; - printer.unk = 0; + printer.style = 0; printer.fgColor = color[1]; printer.bgColor = color[0]; printer.shadowColor = color[2]; @@ -1999,7 +1999,7 @@ void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 left printer.currentY = top; printer.letterSpacing = letterSpacing; printer.lineSpacing = lineSpacing; - printer.unk = 0; + printer.style = 0; printer.fgColor = GetFontAttribute(fontId, 5); printer.bgColor = GetFontAttribute(fontId, 6); -- cgit v1.2.3