Skip to content

Commit ff5b1b1

Browse files
committed
docs (pt2): update input to hardware.inc v5.3.0
1 parent 4366e9f commit ff5b1b1

File tree

5 files changed

+1183
-1094
lines changed

5 files changed

+1183
-1094
lines changed

src/cheatsheet.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -328,20 +328,20 @@ call UpdateKeys
328328

329329
You can check if a button is down using any of the following constants from hardware.inc:
330330

331-
- PADF_DOWN
332-
- PADF_UP
333-
- PADF_LEFT
334-
- PADF_RIGHT
335-
- PADF_START
336-
- PADF_SELECT
337-
- PADF_B
338-
- PADF_A
331+
- PAD_DOWN
332+
- PAD_UP
333+
- PAD_LEFT
334+
- PAD_RIGHT
335+
- PAD_START
336+
- PAD_SELECT
337+
- PAD_B
338+
- PAD_A
339339

340340
You can check if the associataed button is down using the `wCurKeys` variable:
341341

342342
```rgbasm,linenos
343343
ld a, [wCurKeys]
344-
and a, PADF_LEFT
344+
and a, PAD_LEFT
345345
jp nz, LeftIsPressedDown
346346
```
347347

@@ -351,7 +351,7 @@ You can tell if a button was JUST pressed using the `wNewKeys` variable
351351

352352
```rgbasm,linenos
353353
ld a, [wNewKeys]
354-
and a, PADF_A
354+
and a, PAD_A
355355
jp nz, AWasJustPressed
356356
```
357357

@@ -374,7 +374,7 @@ This will halt all other logic (outside of interrupts), be careful if you need a
374374
```rgbasm, linenos
375375
WaitForAButtonToBePressed:
376376
ld a, [wNewKeys]
377-
and a, PADF_A
377+
and a, PAD_A
378378
ret nz
379379
WaitUntilVerticalBlankStart:
380380
ld a, [rLY]

src/part2/input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ We can do that below our initialization of `wFrameCounter`.
3737
```
3838

3939
We're going to use the `and` opcode, which we can use to set the zero flag (`z`) to the value of the bit.
40-
We can use this along with the `PADF` constants in hardware.inc to read a particular key.
40+
We can use this along with the `PAD` constants in hardware.inc to read a particular key.
4141

4242
```rgbasm,linenos,start={{#line_no_of "" ../../unbricked/input/main.asm:main}}
4343
{{#include ../../unbricked/input/main.asm:main}}

0 commit comments

Comments
 (0)