shithub: pokecrystal

Download patch

ref: e5d4f741ee4135f937ad180b1353d70291a92c13
parent: 1c92cb8b48b96d861ceb2d14dfbf775223006edf
author: Rangi <[email protected]>
date: Sun May 6 11:56:42 EDT 2018

Keep macros near relevant data

--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -207,19 +207,6 @@
 	enum \1_TMNUM
 ENDM
 
-add_hm: MACRO
-if !DEF(HM01)
-HM01 = const_value
-endc
-	define _\@_1, "HM_\1"
-	const _\@_1
-	enum \1_TMNUM
-ENDM
-
-add_mt: MACRO
-	enum \1_TMNUM
-ENDM
-
 ; see data/moves/tmhm_moves.asm for moves
 	add_tm DYNAMICPUNCH ; bf
 	add_tm HEADBUTT     ; c0
@@ -275,6 +262,15 @@
 	add_tm NIGHTMARE    ; f2
 NUM_TMS = const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
 
+add_hm: MACRO
+if !DEF(HM01)
+HM01 = const_value
+endc
+	define _\@_1, "HM_\1"
+	const _\@_1
+	enum \1_TMNUM
+ENDM
+
 	add_hm CUT          ; f3
 	add_hm FLY          ; f4
 	add_hm SURF         ; f5
@@ -283,6 +279,10 @@
 	add_hm WHIRLPOOL    ; f8
 	add_hm WATERFALL    ; f9
 NUM_HMS = const_value - HM01
+
+add_mt: MACRO
+	enum \1_TMNUM
+ENDM
 
 	add_mt FLAMETHROWER
 	add_mt THUNDERBOLT