diff options
author | TheXaman <48356183+TheXaman@users.noreply.github.com> | 2021-06-12 15:36:15 +0200 |
---|---|---|
committer | TheXaman <48356183+TheXaman@users.noreply.github.com> | 2021-06-12 15:36:15 +0200 |
commit | 0ab4cab877f45833fd5f17199879ad1ca4cf92df (patch) | |
tree | 880ee8732ea17fbd1096ee6dd4e80b3bf337a418 | |
parent | a0ba1b0f3e8642b1d827f62996ce8cc74558bacf (diff) |
Updated Add a debug menu (markdown)
-rw-r--r-- | Add-a-debug-menu.md | 19 |
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 |