From 832b0b525f9d142b6280f93ca8d511b54fe12880 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 25 Oct 2015 22:56:06 -0700 Subject: wild pokemon data - Thanks to Sanqui for many Ruby/Sapphire names. https://github.com/Sanqui/romhacking/blob/master/pokemon/location-area-names --- asm/macros/map.s | 15 +++++++++++++++ asm/macros/pokemon_data.s | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 asm/macros/map.s (limited to 'asm/macros') 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 -- cgit v1.2.3