Skip to content

Commit 2db4f6d

Browse files
committed
convert blockquote notes to admonition boxes in part2 and part3 (#161)
1 parent 241c141 commit 2db4f6d

9 files changed

Lines changed: 52 additions & 11 deletions

File tree

src/part2/bcd.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ This should make the tile set look like this on start up:
8181

8282
![Screenshot of tile map with two zeroes added](../assets/part2/img/bcd-tilemap.png)
8383

84-
> **Tip:** You can find the address in VRAM in your emulator's tile map viewer by selecting the tile and looking at the index.
85-
> The screenshot above is from emulucious.
84+
:::tip
85+
86+
You can find the address in VRAM in your emulator's tile map viewer by selecting the tile and looking at the index.
87+
The screenshot above is from emulucious.
88+
89+
:::
8690

8791
Let's remember their positions by defining a constant for VRAM location of the 10s and the 1s at the top of our file, behind the other constants.
8892

src/part3/collision.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ Here's an example of how to call this function:
2020

2121
When checking for collision, we'll use that function twice. Once for the x-axis, and again for the y-axis.
2222

23-
> NOTE: We don't need to test the y-axis if the x-axis fails.
23+
:::tip Note
24+
25+
We don't need to test the y-axis if the x-axis fails.
26+
27+
:::
2428

2529
The source code for that function looks like this:
2630

src/part3/gameplay.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ Each object will use a random shadow OAM sprite. We need a way to keep track of
6464

6565
When we reset our current Shadow OAM sprite address, we just set the "mLastOAMAddress" RAM variable to point to the first shadow OAM sprite.
6666

67-
> **NOTE:** We also keep a counter on how many shadow OAM sprites are used. In our "ResetOAMSpriteAddress" function, we'll reset that counter too.
67+
:::tip Note
68+
69+
We also keep a counter on how many shadow OAM sprites are used. In our "ResetOAMSpriteAddress" function, we'll reset that counter too.
70+
71+
:::
6872

6973
```rgbasm,linenos,start={{#line_no_of "" ../../galactic-armada/src/main/utils/sprites-utils.asm:reset-oam-sprite-address}}
7074
{{#include ../../galactic-armada/src/main/utils/sprites-utils.asm:reset-oam-sprite-address}}

src/part3/heads-up-interface.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ On our HUD, we'll draw both our score and our lives. We'll also use STAT interru
99

1010
The window is not enabled by default. We can enable the window using the `LCDC` register. RGBDS comes with constants that will help us.
1111

12-
> ⚠️ NOTE: The window can essentially be a copy of the background. The `LCDCF_WIN9C00|LCDCF_BG9800` portion makes the background and window use different tilemaps when drawn.
12+
:::warning Note
13+
14+
The window can essentially be a copy of the background. The `LCDCF_WIN9C00|LCDCF_BG9800` portion makes the background and window use different tilemaps when drawn.
15+
16+
:::
17+
1318
There’s only one problem. Since the window is drawn between sprites and the background. Without any extra effort, our scrolling background tilemap will be covered by our window. In addition, our sprites will be drawn over our hud. For this, we’ll need STAT interrupts. Fore more information on STAT interrupts, check out the pandocs: [https://gbdev.io/pandocs/Interrupt_Sources.html](https://gbdev.io/pandocs/Interrupt_Sources.html)
1419

1520

src/part3/object-pools.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ The two object types that we need to loop through are Enemies and Bullets.
3838

3939
![BulletBytesVisualized.png](../assets/part3/img/BulletBytesVisualized.png)
4040

41-
> ⚠️ **NOTE:** Scaled integers are used for only the y positions of bullets and enemies. Scaled Integers are a way to provide smooth “sub-pixel” movement. They only move vertically, so the x position can be 8-bit.
41+
:::warning Note
42+
43+
Scaled integers are used for only the y positions of bullets and enemies. Scaled Integers are a way to provide smooth “sub-pixel” movement. They only move vertically, so the x position can be 8-bit.
44+
45+
:::
4246

4347
When looping through an object pool, we’ll check if an object is active. If it’s active, we’ll run the logic for that object. Otherwise, we’ll skip to the start of the next object’s bytes.
4448

src/part3/scrolling-background.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
Scrolling the background is an easy task. However, for a SMOOTH slow scrolling background: scaled integers[^1] will be used.
55

6-
>⚠️ Scaled Integers[^1] are a way to provide smooth “sub-pixel” movement. They are slightly more difficult to understand & implement than implementing a counter, but they provide smoother motion.
6+
:::warning Note
7+
8+
Scaled Integers[^1] are a way to provide smooth “sub-pixel” movement. They are slightly more difficult to understand & implement than implementing a counter, but they provide smoother motion.
9+
10+
:::
711

812
## Initializing the Background
913

src/part3/sprites-metasprites.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ An example of metasprite is the enemy ship:
2626

2727
The Previous snippet draws two sprites. One that the object’s actual position, which uses tile 4 and 5. The second sprite is 8 pixels to the right, and uses tile 6 and 7
2828

29-
>⚠️ **NOTE**: Sprites are in 8x16 mode for this project.
29+
:::warning Note
30+
31+
Sprites are in 8x16 mode for this project.
32+
33+
:::
3034

3135
I can later draw such metasprite by calling the "DrawMetasprite" function that
3236

src/part3/the-player.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Our player will have 3 variables:
77
- wePlayerPositionY - a 16-bit scaled integer
88
- wPlayerFlash - a 16-bit integer used when the player gets damaged
99

10-
> ⚠️ **NOTE**: The player can move vertically AND horizontally. So, unlike bullets and enemies, it’s x position is a 16-bit scaled integer.
10+
:::warning Note
11+
12+
The player can move vertically AND horizontally. So, unlike bullets and enemies, its x position is a 16-bit scaled integer.
13+
14+
:::
1115

1216
These are declared at the top of the "src/main/states/gameplay/objects/player.asm" file
1317

@@ -72,7 +76,11 @@ After we've potentially moved the player and/or shot a new bullet. We need to dr
7276
- If the result is less than 5, we'll stop flashing and draw our player metasprite.
7377
- Otherwise, if the first bit of the descaled "wPlayerFLash" variable is 1, we'll skip drawing the player.
7478

75-
> ***NOTE:** The following resumes from where the "UpdatePlayer_HandleInput" label ended above.
79+
:::tip Note
80+
81+
The following resumes from where the "UpdatePlayer_HandleInput" label ended above.
82+
83+
:::
7684

7785
```rgbasm,linenos,start={{#line_no_of "" ../../galactic-armada/src/main/states/gameplay/objects/player.asm:player-update-flashing}}
7886
{{#include ../../galactic-armada/src/main/states/gameplay/objects/player.asm:player-update-flashing}}

src/part3/title-screen.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ In order to draw text in our game, we've created a function called "DrawTextTile
3636

3737
The "DrawTitleScreen" function puts the tiles for our title screen graphic in VRAM, and draws its tilemap to the background:
3838

39-
> **NOTE:** Because of the text font, we'll add an offset of 52 to our tilemap tiles. We've created a function that adds the 52 offset, since we'll need to do so more than once.
39+
:::tip Note
40+
41+
Because of the text font, we'll add an offset of 52 to our tilemap tiles. We've created a function that adds the 52 offset, since we'll need to do so more than once.
42+
43+
:::
4044

4145
```rgbasm,linenos,start={{#line_no_of "" ../../galactic-armada/src/main/states/title-screen/title-screen-state.asm:draw-title-screen}}
4246
{{#include ../../galactic-armada/src/main/states/title-screen/title-screen-state.asm:draw-title-screen}}

0 commit comments

Comments
 (0)