From b49f8c10ad7380cf5778dcf8b379354e906e6541 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 1 Aug 2022 15:37:05 -0400 Subject: [PATCH] Review changes from https://github.com/pret/pokefirered/pull/525 --- src/mon_markings.c | 8 ++------ src/pokemon_storage_system.c | 14 +++++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/mon_markings.c b/src/mon_markings.c index 81f898f9b..d7a61c27e 100644 --- a/src/mon_markings.c +++ b/src/mon_markings.c @@ -396,20 +396,16 @@ bool8 HandleMonMarkingsMenuInput(void) if (JOY_NEW(DPAD_UP)) { - s8 pos; PlaySE(SE_SELECT); - pos = --sMenu->cursorPos; - if (pos < 0) + if (--sMenu->cursorPos < 0) sMenu->cursorPos = SELECTION_CANCEL; return TRUE; } if (JOY_NEW(DPAD_DOWN)) { - s8 pos; PlaySE(SE_SELECT); - pos = ++sMenu->cursorPos; - if (pos > SELECTION_CANCEL) + if (++sMenu->cursorPos > SELECTION_CANCEL) sMenu->cursorPos = 0; return TRUE; } diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index f72f3216f..00338a847 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -9241,16 +9241,16 @@ static bool8 UpdateItemInfoWindowSlideOut(void) return TRUE; } -static void DrawItemInfoWindow(u32 pos) +static void DrawItemInfoWindow(u32 x) { - if (pos != 0) + if (x != 0) { - FillBgTilemapBufferRect(0, 0x13A, 0, 0xC, pos, 1, 0xFu); - FillBgTilemapBufferRect(0, 0x93A, 0, 0x14, pos, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x13A, 0, 0xC, x, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x93A, 0, 0x14, x, 1, 0xFu); } - FillBgTilemapBufferRect(0, 0x13B, pos, 0xD, 1, 7, 0xFu); - FillBgTilemapBufferRect(0, 0x13C, pos, 0xC, 1, 1, 0xFu); - FillBgTilemapBufferRect(0, 0x13D, pos, 0x14, 1, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x13B, x, 0xD, 1, 7, 0xFu); + FillBgTilemapBufferRect(0, 0x13C, x, 0xC, 1, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x13D, x, 0x14, 1, 1, 0xFu); ScheduleBgCopyTilemapToVram(0); }