Skip to content

Commit 2965fc4

Browse files
authored
Fix input function name + typo (#53)
1 parent 7ee0d47 commit 2965fc4

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/part2/objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Explaining why requires a more thorough explanation of the Game Boy's rendering,
124124
:::
125125

126126
Now you should see the paddle moving... very quickly.
127-
Because it moves by a pixel ever frame, it's going at a speed of 60 pixels per second!
127+
Because it moves by a pixel every frame, it's going at a speed of 60 pixels per second!
128128
To slow this down, we'll use a *variable*.
129129

130130
So far, we have only worked with the CPU registers, but you can create global variables too!

unbricked/collision/main.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ PaddleBounceDone:
205205
; ANCHOR_END: paddle-bounce
206206

207207
; Check the current keys every frame and move left or right.
208-
call Input
208+
call UpdateKeys
209209

210210
; First, check if the left button is pressed.
211211
CheckLeft:
@@ -291,7 +291,7 @@ IsWallTile:
291291
ret
292292
; ANCHOR_END: is-wall-tile
293293

294-
Input:
294+
UpdateKeys:
295295
; Poll half the controller
296296
ld a, P1F_GET_BTN
297297
call .onenibble

unbricked/input/input.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ SECTION "Input Variables", WRAM0
66
wCurKeys: db
77
wNewKeys: db
88

9-
SECTION "Input", ROM0
9+
SECTION "UpdateKeys", ROM0
1010

11-
Input:
11+
UpdateKeys:
1212
; Poll half the controller
1313
ld a, P1F_GET_BTN
1414
call .onenibble

unbricked/input/main.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ WaitVBlank2:
8282
jp c, WaitVBlank2
8383

8484
; Check the current keys every frame and move left or right.
85-
call Input
85+
call UpdateKeys
8686

8787
; First, check if the left button is pressed.
8888
CheckLeft:
@@ -116,7 +116,7 @@ Right:
116116
; ANCHOR_END: main
117117

118118
; ANCHOR: input-routine
119-
Input:
119+
UpdateKeys:
120120
; Poll half the controller
121121
ld a, P1F_GET_BTN
122122
call .onenibble

0 commit comments

Comments
 (0)