From 5bcb86c222e57d5ae8ec5a952630209c7200a817 Mon Sep 17 00:00:00 2001 From: GBA bot Date: Sat, 1 Jan 2022 23:15:07 +0000 Subject: [PATCH] Start writing about the gba struct --- book/src/SUMMARY.md | 1 + book/src/pong/01_introduction.md | 21 ++++++++++++++++++++- book/src/pong/02_the_gba_struct.md | 3 +++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 book/src/pong/02_the_gba_struct.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 7e96fb0..d6dbc84 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -9,3 +9,4 @@ - [Mac OS setup]() - [Building the game](./setup/building.md) - [Learn agb part I - pong](./pong/01_introduction.md) + - [The Gba struct](./pong/02_the_gba_struct.md) \ No newline at end of file diff --git a/book/src/pong/01_introduction.md b/book/src/pong/01_introduction.md index 85187fa..08ce3fc 100644 --- a/book/src/pong/01_introduction.md +++ b/book/src/pong/01_introduction.md @@ -12,4 +12,23 @@ You will learn: * How to add music to your game. * How to add sound effects to your game. -With this knowledge, you'll be well equipped to start making your own games! \ No newline at end of file +With this knowledge, you'll be well equipped to start making your own games! + +## Getting started + +To start, create a new repository based on the [agb template](https://github.com/agbrs/template). +We'll call this `pong`. + +Then replace the `name` field in `Cargo.toml` with `pong`, to end up with something similar to: + +```toml +[package] +name = "pong" +version = "0.1.0" +authors = ["Your name here"] +edition = "2018" + +# ... +``` + +You are now ready to get started learning about how `agb` works. \ No newline at end of file diff --git a/book/src/pong/02_the_gba_struct.md b/book/src/pong/02_the_gba_struct.md new file mode 100644 index 0000000..763868c --- /dev/null +++ b/book/src/pong/02_the_gba_struct.md @@ -0,0 +1,3 @@ +# The Gba struct + +Almost all interaction with the Game Boy Advance's hardware goes through the [Gba singleton struct](https://docs.rs/agb/latest/agb/struct.Gba.html).