Add Part 2 Chapter 3#33
Conversation
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com> Co-authored-by: Antonio Vivace <avivace4@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
|
This chapter was split into functions.md and input.md as ISSO suggested |
avivace
left a comment
There was a problem hiding this comment.
Looks already very good to me! Just left a minor observation.
Co-authored-by: Antonio Vivace <avivace4@gmail.com>
|
I don't know why CI didn't go red, but this doesn't build: https://github.com/ISSOtm/gb-asm-tutorial/actions/runs/3379884599/jobs/5612019079#step:6:93 |
I think they are easier to read that way
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
|
Alright, so there are only two minor changes that need to be done, and we'll be able to merge this! |
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
ISSOtm
left a comment
There was a problem hiding this comment.
I re-read the entire thing, and I only have a single minor concern left. Great job @eievui5!
| `UpdateKeys` writes the held buttons to a location in memory that we called `wCurKeys`, which we can read from after the function returns. | ||
| Because of this, we only need to call `UpdateKeys` once per frame. | ||
|
|
||
| This is good, because not only is it faster to just read the inputs last read, it also means that we will always act on the same inputs, even if the player presses or releases a button mid-frame. |
There was a problem hiding this comment.
I feel like the "read the inputs just read" formulation may be confusing, but I don't see a better alternative?
I considered "re-read the inputs seen at the beginning of the frame", maybe?
There was a problem hiding this comment.
Fixed :)
This is important, because not only is it faster to reload the inputs that we've already processed, but it also means that we will always act on the same inputs, even if the player presses or releases a button mid-frame.
There was a problem hiding this comment.
This is important, because not only is it faster to reload the inputs previously read instead of re-polling them, but it also means that we will keep acting on the same inputs for the entire frame, even if the player presses or releases a button in the middle of it.
I think??
There was a problem hiding this comment.
Based on external feedback, the current text should be good enough, so let's merge it.
|
And a big thank you to @eievui5!! |
Closes #14