Skip to content

Commit 47f51b5

Browse files
OnStarProgramsstarprograms
andauthored
Added a "challenge" admonition box and a challenge on the "toolchain" page (#170)
Co-authored-by: starprograms <thomas.aiden@starprograms.dev>
1 parent 13ce665 commit 47f51b5

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

css/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
background-color: var(--quote-bg);
2626
}
2727

28+
.box.challenge {
29+
border-color: #40a5b7;
30+
background-color: var(--quote-bg);
31+
}
32+
2833
.box.warning {
2934
border-left-color: #e7c000;
3035
background-color: rgba(255, 229, 100, .2);

preproc/src/admonitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct AdmonitionsGenerator<'a, Iter: Iterator<Item = Event<'a>>> {
3838
}
3939

4040
impl<'a, Iter: Iterator<Item = Event<'a>>> AdmonitionsGenerator<'a, Iter> {
41-
const KINDS: [&'static str; 3] = ["tip", "warning", "danger"];
41+
const KINDS: [&'static str; 4] = ["tip", "warning", "danger", "challenge"];
4242

4343
fn new(iter: Iter) -> Self {
4444
Self {

src/part1/hello_world.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,22 @@ You could also take a flash cart (I use the [EverDrive GB X5](https://krikzz.com
6565
![Picture of the Hello World running on a physical DMG](../assets/img/hello_dmg.jpg)
6666

6767
Well, now that we have something working, it's time to peel back the curtains...
68+
69+
:::challenge Challenge!
70+
71+
When you see this box, a small challenge is available for you to try out. It can include questions or a small programming challenge. This is to help you understand the underlying material!
72+
73+
For educators, these can be used in conjunction with learning materials.
74+
75+
1. Your current challenge is to get the hello world shown above!
76+
77+
<details>
78+
<summary>Answer (Click me!)</summary>
79+
80+
This is where answers for the challenges will be placed!
81+
82+
</details>
83+
<br />
84+
85+
86+
:::

src/part1/toolchain.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,23 @@ There are some historical reasons, but RGBLINK can also be used to produce thing
5959
Note that RGBDS does not care at all about the files' extensions.
6060
Some people call their source code `.s`, for example, or their object files `.obj`.
6161
The file names don't matter, either; it's just practical to keep the same name.
62+
63+
:::challenge Challenge!
64+
65+
After I run `rgbfix` on a `.gb` file, then manually edit that same `.gb` file, can I change the value at `0x106` to anything I want? Why?
66+
67+
[This might require some reading!](https://gbdev.io/pandocs/The_Cartridge_Header.html);
68+
69+
70+
<details>
71+
<summary>Answer (Click me!)</summary>
72+
73+
Because the header starts at `0x100` and ends at `0x14F`, anything within that range should not be overwritten after running `rgbfix`.
74+
75+
Although some emulators do allow you to overwrite the header, if you do, then you risk locking a real Game Boy!"
76+
77+
</details>
78+
<br />
79+
80+
81+
:::

0 commit comments

Comments
 (0)