From 74e1ca879a78a056b12f89e52fbbd67757e29137 Mon Sep 17 00:00:00 2001
From: tolik518 <function@returnnull.de>
Date: Tue, 14 May 2024 19:47:24 +0200
Subject: [PATCH 1/4] added windows instructions for setup

---
 book/src/SUMMARY.md       |  2 +-
 book/src/setup/windows.md | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 book/src/setup/windows.md

diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md
index ffc5412a..327a073c 100644
--- a/book/src/SUMMARY.md
+++ b/book/src/SUMMARY.md
@@ -5,7 +5,7 @@
 - [Running an example](./setup/getting_started.md)
   - [Environment setup](./setup/setup.md)
     - [Linux setup](./setup/linux.md)
-    - [Windows setup]()
+    - [Windows setup](./setup/windows.md)
     - [Mac OS setup](./setup/mac.md)
   - [Building the template](./setup/building.md)
 - [Learn agb part I - pong](./pong/01_introduction.md)
diff --git a/book/src/setup/windows.md b/book/src/setup/windows.md
new file mode 100644
index 00000000..0e2e9975
--- /dev/null
+++ b/book/src/setup/windows.md
@@ -0,0 +1,37 @@
+# Windows setup
+
+This guide has been tested on Windows 11 using PowerShell with elevated rights _(dont use cmd)_.
+
+# 1. Install a recent version of rust
+
+To use agb, you'll need to use nightly rust since it requires a few nightly features.
+Firstly, ensure that you have **rustup** installed which you can do by following the instructions on the [rust website](https://www.rust-lang.org/tools/install)
+
+If you have installed rustup, you can update it with `rustup update`.  
+If the `rustup`-command fails, you'll most probably add the cargo/bin folder to the Path-environment variable.
+
+
+# 2. git
+
+The source code for the game is hosted on github, so you will need to install git.
+
+You'd need to follow this official github git [guide](https://github.com/git-guides/install-git).
+
+# 3. mGBA
+
+We recommend using the mGBA emulator which you can download for Mac [here](https://mgba.io/downloads.html).
+
+After installing, you can add the binary to your Path-environment variable and create an alias for the agb run command to use.
+
+Creating link for mgba-qt:
+```PS
+New-Item -itemtype hardlink -path "C:\Program Files\mGBA\mgba-qt.exe" -value "C:\Program Files\mGBA\mGBA.exe"
+```
+
+# 4. gbafix
+
+In order to be able to play games made with agb on real hardware or on some emulators, you will need to install 'agb-gbafix'.
+Agb's implementation can be installed very easily using `cargo install agb-gbafix`.
+
+That is all you need to get started!
+You can now move on to 'building the game'.
\ No newline at end of file

From e4b6c6244565eea01ef8d7da696d0c5572289741 Mon Sep 17 00:00:00 2001
From: tolik518 <function@returnnull.de>
Date: Tue, 14 May 2024 19:47:50 +0200
Subject: [PATCH 2/4] fixed wrong executable name in path

---
 book/src/setup/building.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/book/src/setup/building.md b/book/src/setup/building.md
index d88b9e53..bec082a7 100644
--- a/book/src/setup/building.md
+++ b/book/src/setup/building.md
@@ -35,13 +35,13 @@ To do this, we'll use the tool `agb-gbafix`.
 Run the following command to convert the binary file to a GBA ROM:
 
 ```sh
-agb-gbafix target/thumbv4t-none-eabi/release/template -o template.gba
+agb-gbafix target/thumbv4t-none-eabi/release/agb_template -o agb_template.gba
 ```
 
 or
 
 ```sh
-agb-gbafix target/thumbv4t-none-eabi/release/template.elf -o template.gba
+agb-gbafix target/thumbv4t-none-eabi/release/agb_template.elf -o agb_template.gba
 ```
 
 This command will add the correct GBA header to the template.gba file and it will be playable on real hardware or an emulator.

From 3e962f2e35c8303d48760af6b65bbf498b965db3 Mon Sep 17 00:00:00 2001
From: tolik518 <function@returnnull.de>
Date: Tue, 14 May 2024 20:36:10 +0200
Subject: [PATCH 3/4] fixed the sprite example to be compilable

---
 book/src/pong/03_sprites.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/book/src/pong/03_sprites.md b/book/src/pong/03_sprites.md
index 8431bf96..323aab6c 100644
--- a/book/src/pong/03_sprites.md
+++ b/book/src/pong/03_sprites.md
@@ -63,9 +63,9 @@ Using the `Gba` struct we get the [`ObjectController` struct](https://docs.rs/ag
 
 ```rust
 #[agb::entry]
-fn main(gba: mut agb::Gba) -> ! {
+fn main(mut gba: agb::Gba) -> ! {
     // Get the object manager
-    let object = gba.display.object.get();
+    let object = gba.display.object.get_managed();
 
     // Create an object with the ball sprite
     let mut ball = object.object_sprite(BALL.sprite(0));

From 5d44c4a6582e2c49177eadf444e595ed6832f665 Mon Sep 17 00:00:00 2001
From: Gwilym Inzani <email@gwilym.dev>
Date: Tue, 14 May 2024 20:39:02 +0100
Subject: [PATCH 4/4] Remove references to mac on the windows getting started
 instructions

---
 book/src/setup/windows.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/book/src/setup/windows.md b/book/src/setup/windows.md
index 0e2e9975..da059db0 100644
--- a/book/src/setup/windows.md
+++ b/book/src/setup/windows.md
@@ -19,7 +19,7 @@ You'd need to follow this official github git [guide](https://github.com/git-gui
 
 # 3. mGBA
 
-We recommend using the mGBA emulator which you can download for Mac [here](https://mgba.io/downloads.html).
+We recommend using the mGBA emulator which you can download from [here](https://mgba.io/downloads.html).
 
 After installing, you can add the binary to your Path-environment variable and create an alias for the agb run command to use.
 
@@ -34,4 +34,4 @@ In order to be able to play games made with agb on real hardware or on some emul
 Agb's implementation can be installed very easily using `cargo install agb-gbafix`.
 
 That is all you need to get started!
-You can now move on to 'building the game'.
\ No newline at end of file
+You can now move on to 'building the game'.