shithub: pokered

Download patch

ref: afc4ce2dc55ac8d303ea05188bf00cb55e3fb693
parent: 0da16c162580dd9677dc9407775f4d37d9403b94
author: dannye <33dannye@gmail.com>
date: Sat Nov 7 16:07:07 EST 2020

Use more joypad constants

--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2602,13 +2602,13 @@
 	call HandleMenuInput
 	ld hl, hFlagsFFF6
 	res 1, [hl]
-	bit 6, a
-	jp nz, SelectMenuItem_CursorUp ; up
-	bit 7, a
-	jp nz, SelectMenuItem_CursorDown ; down
-	bit 2, a
-	jp nz, SwapMovesInMenu ; select
-	bit 1, a ; B, but was it reset above?
+	bit BIT_D_UP, a
+	jp nz, SelectMenuItem_CursorUp
+	bit BIT_D_DOWN, a
+	jp nz, SelectMenuItem_CursorDown
+	bit BIT_SELECT, a
+	jp nz, SwapMovesInMenu
+	bit BIT_B_BUTTON, a
 	push af
 	xor a
 	ld [wMenuItemToSwap], a