diff options
author | mid-kid <esteve.varela@gmail.com> | 2018-11-11 00:50:53 +0100 |
---|---|---|
committer | mid-kid <esteve.varela@gmail.com> | 2018-11-11 00:50:53 +0100 |
commit | b92b91df17038be23552ac9562034a95bd3f78c9 (patch) | |
tree | 676def6dcefdcdd122d5adcc4c84a4fad1aeaa5d | |
parent | 056cd5e871c823d45767c520cc169dcac5d986b3 (diff) |
Adapt `tmhm` for consistency
Using an underscore before macro variables avoids cluttering up the
global namespace. While this isn't much of a problem right now, it's
good practice that'll keep us from problems in the future.
-rw-r--r-- | data/pokemon/base_stats.asm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/data/pokemon/base_stats.asm b/data/pokemon/base_stats.asm index 27f9174e5..4d429e860 100644 --- a/data/pokemon/base_stats.asm +++ b/data/pokemon/base_stats.asm @@ -1,16 +1,16 @@ tmhm: MACRO ; used in data/pokemon/base_stats/*.asm -tms1 = 0 ; TM01-TM24 (24) -tms2 = 0 ; TM25-TM48 (24) -tms3 = 0 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/24) +_tms1 = 0 ; TM01-TM24 (24) +_tms2 = 0 ; TM25-TM48 (24) +_tms3 = 0 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/24) rept _NARG if DEF(\1_TMNUM) if \1_TMNUM < 24 + 1 -tms1 = tms1 | (1 << ((\1_TMNUM) - 1)) +_tms1 = _tms1 | (1 << ((\1_TMNUM) - 1)) elif \1_TMNUM < 48 + 1 -tms2 = tms2 | (1 << ((\1_TMNUM) - 1 - 24)) +_tms2 = _tms2 | (1 << ((\1_TMNUM) - 1 - 24)) else -tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48)) +_tms3 = _tms3 | (1 << ((\1_TMNUM) - 1 - 48)) endc else fail "\1 is not a TM, HM, or move tutor move" @@ -18,16 +18,16 @@ tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48)) shift endr rept 3 ; TM01-TM24 (24/24) - db tms1 & $ff -tms1 = tms1 >> 8 + db _tms1 & $ff +_tms1 = _tms1 >> 8 endr rept 3 ; TM25-TM48 (24/24) - db tms2 & $ff -tms2 = tms2 >> 8 + db _tms2 & $ff +_tms2 = _tms2 >> 8 endr rept 2 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/16) - db tms3 & $ff -tms3 = tms3 >> 8 + db _tms3 & $ff +_tms3 = _tms3 >> 8 endr ENDM |