summaryrefslogtreecommitdiff
path: root/asm/macros
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-10-25 22:56:06 -0700
committerYamaArashi <shadow962@live.com>2015-10-25 22:56:06 -0700
commit832b0b525f9d142b6280f93ca8d511b54fe12880 (patch)
tree0cb492985dbfc73628de338cc9aab9dee4a575c2 /asm/macros
parent269cda7ac933e5418313a0c2b4c8b149d7f816ee (diff)
wild pokemon data
- Thanks to Sanqui for many Ruby/Sapphire names. https://github.com/Sanqui/romhacking/blob/master/pokemon/location-area-names
Diffstat (limited to 'asm/macros')
-rw-r--r--asm/macros/map.s15
-rw-r--r--asm/macros/pokemon_data.s17
2 files changed, 30 insertions, 2 deletions
diff --git a/asm/macros/map.s b/asm/macros/map.s
new file mode 100644
index 000000000..452f9b714
--- /dev/null
+++ b/asm/macros/map.s
@@ -0,0 +1,15 @@
+ .macro new_map_group
+ .set cur_map_group, cur_map_group + 1
+ .set cur_map_num, 0
+ .endm
+
+ .macro map_group map_name
+ .set GROUP_\map_name, cur_map_group
+ .set MAP_\map_name, cur_map_num
+ .set cur_map_num, cur_map_num + 1
+ .endm
+
+ .macro map map_name
+ .byte GROUP_\map_name
+ .byte MAP_\map_name
+ .endm
diff --git a/asm/macros/pokemon_data.s b/asm/macros/pokemon_data.s
index 712044f61..bbdd07043 100644
--- a/asm/macros/pokemon_data.s
+++ b/asm/macros/pokemon_data.s
@@ -28,10 +28,10 @@
.2byte (\level << 9) | \move
.endm
- .macro evo_entry method, parameter, target_pokemon
+ .macro evo_entry method, parameter, target_species
.2byte \method
.2byte \parameter
- .2byte \target_pokemon
+ .2byte \target_species
.2byte 0 ; padding
.endm
@@ -42,3 +42,16 @@
.macro egg_moves_begin species
.2byte 20000 + \species
.endm
+
+; If the min level equals the max level, only one level argument is needed.
+ .macro wild_mon species, min_level, max_level
+ .byte \min_level
+
+ .ifb \max_level
+ .byte \min_level
+ .else
+ .byte \max_level
+ .endif
+
+ .2byte SPECIES_\species
+ .endm