summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwalkingeyerobot <mitch@thefoley.net>2020-09-04 01:17:36 -0400
committerwalkingeyerobot <mitch@thefoley.net>2020-09-04 01:17:36 -0400
commitd032c429b01e62c7194d70c66a9838bae07be01f (patch)
tree894ce2bef59d009e31c65eb18507e5e98e4449cc
parent5210eb7c63188ae3242741e2b2513e6504b00ee5 (diff)
more minor formatting
-rw-r--r--printf-in-mGBA.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/printf-in-mGBA.md b/printf-in-mGBA.md
index c7a7abb..c24fff2 100644
--- a/printf-in-mGBA.md
+++ b/printf-in-mGBA.md
@@ -157,7 +157,7 @@ Now let's edit the function that's called whenever a wild Pokémon is encountere
```
This will print out the species number for the wild Pokémon about to be encountered. This is already useful, but we can do even better. Let's modify our statement to print the species name as well. We'll add two more includes to the top of the file:
-```
+```c
#include "data.h" // for gSpeciesNames, which maps species number to species name.
#include "../gflib/string_util.h" // for ConvertToAscii()
```
@@ -165,7 +165,9 @@ This will print out the species number for the wild Pokémon about to be encount
Now we'll change our `mgba_printf` call to the following:
-`mgba_printf(MGBA_LOG_DEBUG, "%d %s", species, ConvertToAscii(gSpeciesNames[species]));`
+```c
+mgba_printf(MGBA_LOG_DEBUG, "%d %s", species, ConvertToAscii(gSpeciesNames[species]));
+```
## 6. Viewing the logs
In order to view our logs, we'll need to use the [mGBA](https://mgba.io/) emulator. Open the log viewer by going to the "Tools" menu and selecting "View Logs...". Make sure the "Debug" checkbox is checked and you should see a message like this one when you encounter a wild Pokémon: `[DEBUG] GBA Debug: 286 POOCHYENA`. \ No newline at end of file