You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/part3/entry-point.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,25 @@
2
2
3
3
We'll start this tutorial out like the previous, with our "header" section (at address: $100). We're also going to declare some global variables that will be used throughout the game.
4
4
5
-
- wLastKeys and wCurKeys are used for joypad input
6
-
- wGameState will keep track what our current game state is
5
+
-`wLastKeys` and `wCurKeys` are used for joypad input
6
+
-`wGameState` will keep track what our current game state is
This character-set is called “Area51”. It, and more 8x8 pixel fonts can ne found here: [https://damieng.com/typography/zx-origins/](https://damieng.com/typography/zx-origins/) . These 52 tiles will be placed at the beginning of our background/window VRAM region.
23
+
This character-set is called “Area51”. It, and more 8x8 pixel fonts can ne found here: [https://damieng.com/typography/zx-origins/](https://damieng.com/typography/zx-origins/) . These 52 tiles will be placed at the beginning of our background/window VRAM region.
Getting back to our entry point. Were going to wait until a vertical blank begins to do all of this. We'll also turn the LCD off before loading our tile data into VRAM..
> *NOTE*: Even though we haven't specifically defined a color palette. The [emulicious](https://emulicious.net/) emulator may automatically apply a cdefault color palette if in "Automatic" or "Gameboy Color" Mode
41
+
::: tip
42
+
43
+
Even though we haven't specifically defined a color palette. The [emulicious](https://emulicious.net/) emulator may automatically apply a default color palette if in "Automatic" or "Gameboy Color" Mode
43
44
44
-
In the above snippet you saw use of a function called "WaitFOrOneVBLank". We've setup some vblank utility functions in the "src/main/utils/vblank-utils.asm" file:
45
+
:::
45
46
47
+
In the above snippet you saw use of a function called `WaitFOrOneVBLank`. We've setup some vblank utility functions in the "src/main/utils/vblank-utils.asm" file:
We'll call the "DrawText_WithTypewriterEffect" function exactly how we called the "DrawTextTilesLoop" function. We'll pass this function which tile to start on in de, and the address of our text in hl.
41
+
We'll call the `DrawText_WithTypewriterEffect` function exactly how we called the `DrawTextTilesLoop` function. We'll pass this function which tile to start on in de, and the address of our text in hl.
42
42
43
43
We'll do that four times for the first page, and then wait for the A button to be pressed:
Once the user presses the A button, we want to show the second page. To avoid any lingering "leftover" letters, we'll clear the background. All this function does is turn off the LCD, fill our background tilemap with the first tile, then turn back on the lcd. We've defined this function in the "src/main/utils/background.utils.asm" file:
With our story full shown, we're ready to move onto the next game state: Gameplay. We'll end our "UpdateStoryState" function by updating our game state variable and jump back to the "NextGameState" label like previously discussed.
61
+
With our story full shown, we're ready to move onto the next game state: Gameplay. We'll end our `UpdateStoryState` function by updating our game state variable and jump back to the `NextGameState` label like previously discussed.
0 commit comments