From ec1f79b44203735f581c7f85b6c23216aaf587a6 Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 19 Sep 2024 18:56:32 +0900 Subject: Read action buttons and set it in the entity direction highest nibble --- buttons.gbasm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'buttons.gbasm') diff --git a/buttons.gbasm b/buttons.gbasm index b5e94ff..fd17f71 100644 --- a/buttons.gbasm +++ b/buttons.gbasm @@ -5,6 +5,14 @@ Pad_Button_Check: LD A, $20 LD $reg_joypad, A LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad LD C, A LD A, $00 @@ -29,8 +37,22 @@ Pad_Button_Check: LD A, $enum_direction_down Pad_Button_Check.End: + LD $mem_button_direction, A - LD $mem_button_direction, A + LD A, $10 + LD $reg_joypad, A + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + LD A, $reg_joypad + XOR $0f + AND $0f + LD $mem_button_action, A POP BC POP AF -- cgit v1.2.3-70-g09d2