summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Code-cleanup.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/Code-cleanup.md b/Code-cleanup.md
index 1e294ac..c9ec832 100644
--- a/Code-cleanup.md
+++ b/Code-cleanup.md
@@ -29,7 +29,9 @@ Most of the time, raw numbers should not exist because there are more meaningful
- `SomeLabelEnd - SomeLabel`: Some structs and sub-structs still have hard-coded sizes like this.
- `(SomeGFXLabel.End - SomeGFXLabel) / LEN_2BPP_TILE`: pokered and pokegold-spaceworld already do this.
- Bit flags: Use `SOME_BIT_F` constants instead of hard-coding bits 0-7 for the `bit`/`res`/`set` instructions. Find opportunities with:
- grep -rE --include='*.asm' --exclude-dir=mobile '^\s(bit|res|set) [0-7],'
+```bash
+grep -rE --include='*.asm' --exclude-dir=mobile '^\s(bit|res|set) [0-7],'
+```
- Bit masks: Use `1 << SOME_BIT_F` masks and the `maskbits` macro.
- Jumptable indexes: Look for raw values being loaded into `[wJumptableIndex]`.