summaryrefslogtreecommitdiff
path: root/Add-a-debug-menu.md
diff options
context:
space:
mode:
Diffstat (limited to 'Add-a-debug-menu.md')
-rw-r--r--Add-a-debug-menu.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/Add-a-debug-menu.md b/Add-a-debug-menu.md
index ed50f81..fc403bc 100644
--- a/Add-a-debug-menu.md
+++ b/Add-a-debug-menu.md
@@ -121,7 +121,24 @@ If you search you'll find that there is no `debug.h` in the `pokeemerald` codeba
## Step 2: Add the menu itself
-You're done editing Game Freak code; now you get to write some of your own. Create a header file `include/debug.h` and populate it as follows.
+You're done editing Game Freak code; now you get to write some of your own. Before we create the new files, we have to add them to the `ld_script.txt`, first one around line 102:
+```diff
+src/util.o(.text);
+src/daycare.o(.text);
++src/debug.o(.text);
+src/egg_hatch.o(.text);
+src/battle_interface.o(.text);
+```
+Second one in `ld_script.txt` around line 486:
+```diff
+src/util.o(.rodata);
+src/daycare.o(.rodata);
++src/debug.o(.rodata);
+src/egg_hatch.o(.rodata);
+src/battle_gfx_sfx_util.o(.rodata);
+```
+
+Now create a header file `include/debug.h` and populate it as follows.
```c
#ifndef GUARD_DEBUG_H