Skip to content

Commit

Permalink
Merge 'In-game debug functions' (OoTRandomizer#1970)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjohnson57 committed Nov 29, 2023
2 parents 36eec6d + fafa755 commit ec47c87
Show file tree
Hide file tree
Showing 17 changed files with 28,298 additions and 25,664 deletions.
17 changes: 17 additions & 0 deletions ASM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,20 @@ To generate symbols for the Project64 debugger, use the `--pj64sym` option:
python build.py --pj64sym 'path_to_pj64/Saves/THE LEGEND OF ZELDA.sym'

You'll need to disable `Unique Game Save Directory` in Project64 for these to work without copying them into each unique save folder. Remember that some changes in code will not be reflected in an existing save, and they need to be deleted and a new save created with this setting disabled.

--------------------------------------------------------------------------

How to use the Debug mode:
- First put the DEBUG_MODE variable at 1 in debug.h.
- You will then have access to a hidden menu with the following options:
- Instant warps to Dungeons, Bosses or Overworld locations
- Item inventory edits
- Instant age switch with the current location kept
- Bunny Hood applied on
The menu will appear if you press either L+R or Dpad-Up according to what you set for the menu_not_on_dup variable in debug.c.
Use Dpad-Left/Dpad-Right and A/B to navigate it.
The L Button will also allow you to levitate.
The warps and items are easily customizable with the code at the top of debug.c.
- Additionally, you can call functions to print numbers on screen, to help you debug new features.
Call either draw_debug_int or draw_debug_float in your code, with the first argument being the number wanted to be displayed, and the
second argument its place on the screen (up to 10 values).
2 changes: 1 addition & 1 deletion ASM/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tools_bin_dir = os.path.join(tools_dir, 'bin')
# Makes it possible to copy the full toolchain prefix into the "tools" directory
n64_bin_dir = os.path.join(tools_dir, "n64", "bin")
os.environ['PATH'] = tools_dir + tools_bin_dir + n64_bin_dir + os.pathsep + os.environ['PATH']
os.environ['PATH'] = os.pathsep.join([tools_dir, tools_bin_dir, n64_bin_dir, os.environ['PATH']])

run_dir = root_dir

Expand Down
Loading

0 comments on commit ec47c87

Please sign in to comment.