Skip to content

Commit 34b165c

Browse files
Fix admonitions in the Cheat Sheet (#86)
1 parent 7ea2ab3 commit 34b165c

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/cheatsheet.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ldh [rLCDC], a
7575

7676
**To turn the LCD off:**
7777

78-
::: warning
78+
:::warning: ⚠️
7979

8080
Do not turn the LCD off outside of the Vertical Blank Phase. See "[How to wait for vertical blank phase](#how-to-wait-for-the-vertical-blank-phase)".
8181

@@ -146,7 +146,7 @@ You can use one of the 4 constants to specify which layer uses which region:
146146
- LCDCF_BG9800
147147
- LCDCF_BG9C00
148148

149-
::: tip Note
149+
:::tip Note
150150

151151
You still need to make sure the window and background are turned on when using these constants.
152152

@@ -174,7 +174,7 @@ and a, LCDCF_OBJOFF
174174
ldh [rLCDC], a
175175
```
176176

177-
::: tip
177+
:::tip
178178

179179
Sprites are in 8x8 mode by default.
180180

@@ -184,7 +184,7 @@ Sprites are in 8x8 mode by default.
184184

185185
Once sprites are enabled, you can enable tall sprites using the 3rd bit of the `rLCDC` register: `LCDCF_OBJ16`
186186

187-
::: tip
187+
:::tip
188188

189189
You can not have some 8x8 sprites and some 8x16 sprites. All sprites must be of the same size.
190190

@@ -243,13 +243,13 @@ CopyTilemap:
243243
jp nz, CopyTilemap
244244
```
245245

246-
::: tip
246+
:::tip
247247

248248
Make sure the layer you're targetting has been turned on. See ["Turn on/off the window"](#turn-onoff-the-window) and ["Turn on/off the background"](#turn-onoff-the-background)
249249

250250
:::
251251

252-
::: tip
252+
:::tip
253253

254254
In terms of tiles, The background/window tilemaps are 32x32. The Game Boy's screen is 20x18. When copying tiles, understand that RGBDS or the Game Boy won't automatically jump to the next visible row after you've reached the 20th column.
255255

@@ -279,7 +279,7 @@ Check out the Pan Docs for more info on the [Background viewport Y position, X p
279279

280280
Moving the window is the same as moving the background, except using the `$FF4B` and `$FF4A` registers. Hardware.inc defines two constants for that: `rWX` and `rWY`.
281281

282-
::: tip
282+
:::tip
283283

284284
The window layer has a -7 pixel horizontal offset. This means setting `rWX` to 7 places the window at the left side of the screen, and setting `rWX` to 87 places the window with its left side halfway across the screen.
285285

@@ -363,7 +363,7 @@ To wait **indefinitely** for a button press, create a loop where you:
363363
- call the `UpdateKeys` function again
364364
- Loop background to the beginning
365365

366-
::: tip
366+
:::tip
367367

368368
This will halt all other logic (outside of interrupts), be careful if you need any logic running simultaneously.
369369

@@ -396,7 +396,7 @@ Drawing text on the window is essentially drawing tiles (with letters/numbers/pu
396396

397397
To simplify the process you can define constant strings.
398398

399-
::: tip
399+
:::tip
400400

401401
These constants end with a literal 255, which our code will read as the end of the string.
402402

@@ -412,7 +412,7 @@ wScoreText:: db "score", 255
412412

413413
RGBDS has a character map functionality. You can read more in the [RGBDS Assembly Syntax Documentation](https://rgbds.gbdev.io/docs/rgbasm.5#DEFINING_DATA). This functionality, tells the compiler how to map each letter:
414414

415-
::: tip
415+
:::tip
416416

417417
You need to have your text font tiles in VRAM at the locations specified in the map. See [How to put background/window tile data in VRAM](#how-to-put-backgroundwindow-tile-data-into-vram)
418418

@@ -463,13 +463,13 @@ The above character mapping would convert (by the compiler) our `wScoreText` tex
463463

464464
With that setup, we would loop though the bytes of `wScoreText` and copy each byte to the background/window layer. After we copy each byte, we'll increment where we will copy to, and which byte in `wScoreText` we are reading. When we read 255, our code will end.
465465

466-
::: tip
466+
:::tip
467467

468468
This example implies that your font tiles are located in VRAM at the locations specified in the character mapping.
469469

470470
:::
471471

472-
** Drawing 'score' on the window **
472+
**Drawing 'score' on the window**
473473

474474
```rgbasm, lineno
475475
@@ -503,7 +503,7 @@ DrawTextTilesLoop::
503503
- Move the window downwards, so only 1 or 2 rows show at the bottom of the screen
504504
- Draw your text, score, and icons on the top of the window layer.
505505

506-
::: tip
506+
:::tip
507507

508508
Sprites will still show over the window. To fully prevent that, you can use STAT interrupts to hide sprites where the bottom HUD will be shown.
509509

@@ -580,7 +580,7 @@ ld [_OAMRAM + 20], a
580580

581581
TODO - Explanation on limitations of direct OAM manipulation.
582582

583-
::: tip
583+
:::tip
584584

585585
It's recommended that developers implement a shadow OAM, like @eievui5's [Sprite Object Library](https://github.com/eievui5/gb-sprobj-lib)
586586

src/part2/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Almost done now—next, write another loop, this time for copying [the tilemap](
7070
Note that while this loop's body is exactly the same as `CopyTiles`'s, the 3 values loaded into `de`, `hl`, and `bc` are different.
7171
These determine the source, destination, and size of the copy, respectively.
7272

73-
:::tip "[<abbr title="Don't Repeat Yourself">DRY</abbr>](https://en.wikipedia.org/wiki/Don't_Repeat_Yourself)"
73+
:::tip "Don't Repeat Yourself"
7474

7575
If you think that this is super redundant, you are not wrong, and we will see later how to write actual, reusable *functions*.
7676
But there is more to them than meets the eye, so we will start tackling them much later.

0 commit comments

Comments
 (0)