aboutsummaryrefslogtreecommitdiff
path: root/buttons.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-09-19 18:56:32 +0900
committerAstatin <astatin@redacted>2024-09-19 18:56:32 +0900
commitec1f79b44203735f581c7f85b6c23216aaf587a6 (patch)
tree0ae669440b2dce7f2e23cfadebb3dc0ab42efcba /buttons.gbasm
parentfa37dcacf1ff0de66f5c4eed7b89be6006d6d77b (diff)
Read action buttons and set it in the entity direction highest nibble
Diffstat (limited to 'buttons.gbasm')
-rw-r--r--buttons.gbasm24
1 files changed, 23 insertions, 1 deletions
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