summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FAQ.md2
-rw-r--r--Makefile38
-rw-r--r--STYLE.md2
-rw-r--r--audio.asm2
-rw-r--r--audio/engine.asm32
-rw-r--r--charmap.asm (renamed from macros/charmap.asm)14
-rw-r--r--constants.asm2
-rw-r--r--constants/battle_anim_constants.asm186
-rw-r--r--constants/battle_constants.asm15
-rwxr-xr-xconstants/battle_tower_constants.asm32
-rw-r--r--constants/collision_constants.asm36
-rw-r--r--constants/gfx_constants.asm22
-rw-r--r--constants/hardware_constants.asm2
-rw-r--r--constants/item_constants.asm530
-rw-r--r--constants/item_data_constants.asm38
-rw-r--r--constants/landmark_constants.asm11
-rw-r--r--constants/map_constants.asm13
-rw-r--r--constants/map_data_constants.asm121
-rw-r--r--constants/misc_constants.asm10
-rw-r--r--constants/music_constants.asm4
-rw-r--r--constants/npctrade_constants.asm22
-rw-r--r--constants/phone_constants.asm4
-rw-r--r--constants/pokemon_constants.asm5
-rw-r--r--constants/pokemon_data_constants.asm98
-rw-r--r--constants/radio_constants.asm210
-rw-r--r--constants/script_constants.asm219
-rw-r--r--constants/sprite_anim_constants.asm570
-rw-r--r--constants/sprite_constants.asm4
-rw-r--r--constants/sprite_data_constants.asm7
-rw-r--r--constants/tileset_constants.asm5
-rw-r--r--constants/trainer_constants.asm22
-rw-r--r--constants/type_constants.asm10
-rw-r--r--constants/wram_constants.asm6
-rw-r--r--data/battle/accuracy_multipliers.asm17
-rw-r--r--data/battle/battle_text.asm (renamed from text/battle.asm)0
-rw-r--r--data/battle/critical_hits.asm18
-rw-r--r--data/battle/effect_command_pointers.asm (renamed from data/battle_command_pointers.asm)2
-rw-r--r--data/battle/stat_multipliers.asm17
-rw-r--r--data/battle/stat_names.asm10
-rw-r--r--data/battle/type_boost_items.asm20
-rw-r--r--data/battle/type_matchups.asm (renamed from data/type_matchups.asm)10
-rwxr-xr-xdata/battle_anims/objects.asm186
-rw-r--r--data/battle_tower/classes.asm76
-rw-r--r--data/battle_tower/parties.asm (renamed from data/battle_tower.asm)80
-rw-r--r--data/battle_tower/trainer_text.asm (renamed from text/battle_tower.asm)0
-rwxr-xr-xdata/battle_tower/unknown.asm (renamed from data/battle_tower_2.asm)0
-rw-r--r--data/battle_tower/unknown_levels.asm35
-rw-r--r--data/bug_contest_flags.asm13
-rw-r--r--data/bug_contest_winners.asm9
-rw-r--r--data/common_text/common_text.asm16
-rw-r--r--data/common_text/common_text_1.asm (renamed from text/common_1.asm)0
-rw-r--r--data/common_text/common_text_2.asm (renamed from text/common_3.asm)310
-rw-r--r--data/common_text/common_text_3.asm (renamed from text/common_5.asm)684
-rw-r--r--data/decorations/mystery_gift_decos.asm (renamed from data/mystery_gift_decos.asm)0
-rw-r--r--data/elevator_floors.asm35
-rw-r--r--data/items/apricorn_balls.asm11
-rw-r--r--data/items/attributes.asm310
-rw-r--r--data/items/catch_rate_items.asm (renamed from data/time_capsule/catch_rate_items.asm)0
-rw-r--r--data/items/descriptions.asm33
-rw-r--r--data/items/heal_hp.asm18
-rw-r--r--data/items/heal_status.asm18
-rw-r--r--data/items/marts.asm71
-rw-r--r--data/items/mystery_gift_items.asm (renamed from data/mystery_gift_items.asm)0
-rw-r--r--data/items/x_stats.asm7
-rw-r--r--data/maps/outdoor_sprites.asm1
-rw-r--r--data/maps/roofs.asm3
-rw-r--r--data/maps/scenes.asm4
-rw-r--r--data/moves/animations.asm742
-rw-r--r--data/moves/effects_priorities.asm9
-rw-r--r--data/moves/grammar.asm102
-rw-r--r--data/npc_trades.asm18
-rw-r--r--data/palettes/overworld/roofs.pal161
-rw-r--r--data/palettes/unknown/4985a.asm15
-rw-r--r--data/party_menu_qualities.asm41
-rw-r--r--data/phone/permanent_numbers.asm5
-rw-r--r--data/phone/phone_contacts.asm (renamed from data/phone_contacts.asm)0
-rw-r--r--data/phone/special_calls.asm (renamed from data/phone_special.asm)0
-rw-r--r--data/phone/text/alan_overworld.asm (renamed from text/phone/alan_overworld.asm)0
-rw-r--r--data/phone/text/anthony_overworld.asm (renamed from text/phone/anthony_overworld.asm)0
-rw-r--r--data/phone/text/arnie_overworld.asm (renamed from text/phone/arnie_overworld.asm)0
-rw-r--r--data/phone/text/beth_overworld.asm (renamed from text/phone/beth_overworld.asm)0
-rw-r--r--data/phone/text/beverly_overworld.asm (renamed from text/phone/beverly_overworld.asm)0
-rw-r--r--data/phone/text/bill.asm (renamed from text/phone/bill.asm)0
-rw-r--r--data/phone/text/brent_overworld.asm (renamed from text/phone/brent_overworld.asm)0
-rw-r--r--data/phone/text/buena.asm (renamed from text/phone/buena.asm)0
-rw-r--r--data/phone/text/chad_overworld.asm (renamed from text/phone/chad_overworld.asm)0
-rw-r--r--data/phone/text/dana_overworld.asm (renamed from text/phone/dana_overworld.asm)0
-rw-r--r--data/phone/text/derek_overworld.asm (renamed from text/phone/derek_overworld.asm)0
-rw-r--r--data/phone/text/elm.asm (renamed from text/phone/elm.asm)0
-rw-r--r--data/phone/text/erin_overworld.asm (renamed from text/phone/erin_overworld.asm)0
-rw-r--r--data/phone/text/extra.asm (renamed from text/phone/extra.asm)0
-rw-r--r--data/phone/text/extra2.asm (renamed from text/phone/extra2.asm)0
-rw-r--r--data/phone/text/gaven_overworld.asm (renamed from text/phone/gaven_overworld.asm)0
-rw-r--r--data/phone/text/gina_overworld.asm (renamed from text/phone/gina_overworld.asm)0
-rw-r--r--data/phone/text/huey_overworld.asm (renamed from text/phone/huey_overworld.asm)0
-rw-r--r--data/phone/text/irwin_overworld.asm (renamed from text/phone/irwin_overworld.asm)0
-rw-r--r--data/phone/text/jack_overworld.asm (renamed from text/phone/jack_overworld.asm)0
-rw-r--r--data/phone/text/joey_overworld.asm (renamed from text/phone/joey_overworld.asm)0
-rw-r--r--data/phone/text/jose_overworld.asm (renamed from text/phone/jose_overworld.asm)0
-rw-r--r--data/phone/text/kenji_overworld.asm (renamed from text/phone/kenji_overworld.asm)0
-rw-r--r--data/phone/text/liz_overworld.asm (renamed from text/phone/liz_overworld.asm)0
-rw-r--r--data/phone/text/mom.asm (renamed from text/phone/mom.asm)0
-rw-r--r--data/phone/text/parry_overworld.asm (renamed from text/phone/parry_overworld.asm)0
-rw-r--r--data/phone/text/ralph_overworld.asm (renamed from text/phone/ralph_overworld.asm)0
-rw-r--r--data/phone/text/reena_overworld.asm (renamed from text/phone/reena_overworld.asm)0
-rw-r--r--data/phone/text/tiffany_overworld.asm (renamed from text/phone/tiffany_overworld.asm)0
-rw-r--r--data/phone/text/todd_overworld.asm (renamed from text/phone/todd_overworld.asm)0
-rw-r--r--data/phone/text/trainers1.asm (renamed from text/phone/trainers1.asm)0
-rw-r--r--data/phone/text/tully_overworld.asm (renamed from text/phone/tully_overworld.asm)0
-rw-r--r--data/phone/text/vance_overworld.asm (renamed from text/phone/vance_overworld.asm)0
-rw-r--r--data/phone/text/wade_overworld.asm (renamed from text/phone/wade_overworld.asm)0
-rw-r--r--data/phone/text/wilton_overworld.asm (renamed from text/phone/wilton_overworld.asm)0
-rw-r--r--data/player_names.asm (renamed from data/default_names.asm)6
-rw-r--r--data/pokemon/base_stats.asm33
-rw-r--r--data/pokemon/dex_entries.asm2
-rw-r--r--data/pokemon/egg_moves.asm216
-rw-r--r--data/pokemon/evos_attacks.asm2
-rw-r--r--data/pokemon/ezchat_order.asm96
-rw-r--r--data/pokemon/palettes.asm8
-rw-r--r--data/pokemon/pic_pointers.asm2
-rw-r--r--data/pokemon/rby_base_special.asm (renamed from data/time_capsule/special_stats.asm)0
-rw-r--r--data/pokemon/rby_order.asm (renamed from data/time_capsule/mon_order.asm)0
-rw-r--r--data/radio/buenas_passwords.asm26
-rw-r--r--data/radio/channel_music.asm13
-rw-r--r--data/radio/oaks_pkmn_talk_routes.asm19
-rw-r--r--data/radio/pnp_hidden_people.asm26
-rw-r--r--data/radio/pnp_hidden_places.asm13
-rw-r--r--data/sgb_border_map.asm29
-rwxr-xr-xdata/sprite_anims/framesets.asm178
-rw-r--r--data/sprite_anims/oam.asm1104
-rw-r--r--data/sprite_anims/sequences.asm90
-rw-r--r--data/sprites/emotes.asm (renamed from data/emotes.asm)0
-rw-r--r--data/sprites/facings.asm (renamed from data/facings.asm)0
-rwxr-xr-xdata/sprites/map_objects.asm (renamed from data/map_objects.asm)0
-rw-r--r--data/sprites/sprite_mons.asm (renamed from data/sprite_mons.asm)0
-rw-r--r--data/sprites/sprites.asm (renamed from data/sprites.asm)0
-rw-r--r--data/std_text.asm (renamed from text/stdtext.asm)0
-rw-r--r--data/tilesets.asm (renamed from tilesets/tilesets.asm)5
-rw-r--r--data/tilesets/aerodactyl_word_room_collision.asm (renamed from tilesets/aerodactyl_word_room_collision.asm)0
-rw-r--r--data/tilesets/aerodactyl_word_room_metatiles.bin (renamed from tilesets/aerodactyl_word_room_metatiles.bin)0
-rw-r--r--data/tilesets/battle_tower_collision.asm (renamed from tilesets/battle_tower_collision.asm)0
-rw-r--r--data/tilesets/battle_tower_metatiles.bin (renamed from tilesets/battle_tower_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/battle_tower_outside_collision.asm (renamed from tilesets/battle_tower_outside_collision.asm)0
-rw-r--r--data/tilesets/battle_tower_outside_metatiles.bin (renamed from tilesets/battle_tower_outside_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--data/tilesets/beta_word_room_collision.asm (renamed from tilesets/beta_word_room_collision.asm)0
-rw-r--r--data/tilesets/beta_word_room_metatiles.bin (renamed from tilesets/beta_word_room_metatiles.bin)0
-rw-r--r--data/tilesets/cave_collision.asm (renamed from tilesets/cave_collision.asm)0
-rw-r--r--data/tilesets/cave_metatiles.bin (renamed from tilesets/cave_metatiles.bin)0
-rw-r--r--data/tilesets/celadon_mansion_collision.asm (renamed from tilesets/celadon_mansion_collision.asm)0
-rw-r--r--data/tilesets/celadon_mansion_metatiles.bin (renamed from tilesets/celadon_mansion_metatiles.bin)0
-rw-r--r--data/tilesets/game_corner_collision.asm (renamed from tilesets/game_corner_collision.asm)0
-rw-r--r--data/tilesets/game_corner_metatiles.bin (renamed from tilesets/game_corner_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/gate_collision.asm (renamed from tilesets/gate_collision.asm)0
-rw-r--r--data/tilesets/gate_metatiles.bin (renamed from tilesets/gate_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/gym_1_collision.asm (renamed from tilesets/gym_1_collision.asm)0
-rw-r--r--data/tilesets/gym_1_metatiles.bin (renamed from tilesets/gym_1_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/ho_oh_word_room_collision.asm (renamed from tilesets/ho_oh_word_room_collision.asm)0
-rw-r--r--data/tilesets/ho_oh_word_room_metatiles.bin (renamed from tilesets/ho_oh_word_room_metatiles.bin)0
-rw-r--r--data/tilesets/house_1_collision.asm (renamed from tilesets/house_1_collision.asm)0
-rw-r--r--data/tilesets/house_1_metatiles.bin (renamed from tilesets/house_1_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/ice_path_collision.asm (renamed from tilesets/ice_path_collision.asm)0
-rw-r--r--data/tilesets/ice_path_metatiles.bin (renamed from tilesets/ice_path_metatiles.bin)0
-rw-r--r--data/tilesets/ilex_forest_collision.asm (renamed from tilesets/ilex_forest_collision.asm)0
-rw-r--r--data/tilesets/ilex_forest_metatiles.bin (renamed from tilesets/ilex_forest_metatiles.bin)0
-rw-r--r--data/tilesets/johto_1_collision.asm (renamed from tilesets/johto_1_collision.asm)0
-rw-r--r--data/tilesets/johto_1_metatiles.bin (renamed from tilesets/johto_1_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--data/tilesets/johto_2_collision.asm (renamed from tilesets/johto_2_collision.asm)0
-rw-r--r--data/tilesets/johto_2_metatiles.bin (renamed from tilesets/johto_2_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--data/tilesets/kabuto_word_room_collision.asm (renamed from tilesets/kabuto_word_room_collision.asm)0
-rw-r--r--data/tilesets/kabuto_word_room_metatiles.bin (renamed from tilesets/kabuto_word_room_metatiles.bin)0
-rw-r--r--data/tilesets/kanto_collision.asm (renamed from tilesets/kanto_collision.asm)0
-rw-r--r--data/tilesets/kanto_metatiles.bin (renamed from tilesets/kanto_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--data/tilesets/kurts_house_collision.asm (renamed from tilesets/kurts_house_collision.asm)0
-rw-r--r--data/tilesets/kurts_house_metatiles.bin (renamed from tilesets/kurts_house_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/lab_collision.asm (renamed from tilesets/lab_collision.asm)0
-rw-r--r--data/tilesets/lab_metatiles.bin (renamed from tilesets/lab_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/lighthouse_collision.asm (renamed from tilesets/lighthouse_collision.asm)0
-rw-r--r--data/tilesets/lighthouse_metatiles.bin (renamed from tilesets/lighthouse_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/mart_collision.asm (renamed from tilesets/mart_collision.asm)0
-rw-r--r--data/tilesets/mart_metatiles.bin (renamed from tilesets/mart_metatiles.bin)0
-rw-r--r--data/tilesets/olivine_gym_collision.asm (renamed from tilesets/olivine_gym_collision.asm)0
-rw-r--r--data/tilesets/olivine_gym_metatiles.bin (renamed from tilesets/olivine_gym_metatiles.bin)0
-rw-r--r--data/tilesets/omanyte_word_room_collision.asm (renamed from tilesets/omanyte_word_room_collision.asm)0
-rw-r--r--data/tilesets/omanyte_word_room_metatiles.bin (renamed from tilesets/omanyte_word_room_metatiles.bin)0
-rw-r--r--data/tilesets/park_collision.asm (renamed from tilesets/park_collision.asm)0
-rw-r--r--data/tilesets/park_metatiles.bin (renamed from tilesets/park_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/players_house_2f_collision.asm (renamed from tilesets/players_house_2f_collision.asm)0
-rw-r--r--data/tilesets/players_house_2f_metatiles.bin (renamed from tilesets/players_house_2f_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/players_house_collision.asm (renamed from tilesets/players_house_collision.asm)0
-rw-r--r--data/tilesets/players_house_metatiles.bin (renamed from tilesets/players_house_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/pokecenter_collision.asm (renamed from tilesets/pokecenter_collision.asm)0
-rw-r--r--data/tilesets/pokecenter_metatiles.bin (renamed from tilesets/pokecenter_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/pokecom_center_collision.asm (renamed from tilesets/pokecom_center_collision.asm)0
-rw-r--r--data/tilesets/pokecom_center_metatiles.bin (renamed from tilesets/pokecom_center_metatiles.bin)0
-rw-r--r--data/tilesets/port_collision.asm (renamed from tilesets/port_collision.asm)0
-rw-r--r--data/tilesets/port_metatiles.bin (renamed from tilesets/port_metatiles.bin)0
-rw-r--r--data/tilesets/power_plant_collision.asm (renamed from tilesets/power_plant_collision.asm)0
-rw-r--r--data/tilesets/power_plant_metatiles.bin (renamed from tilesets/power_plant_metatiles.bin)0
-rw-r--r--data/tilesets/radio_tower_collision.asm (renamed from tilesets/radio_tower_collision.asm)0
-rw-r--r--data/tilesets/radio_tower_metatiles.bin (renamed from tilesets/radio_tower_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/ruins_of_alph_collision.asm (renamed from tilesets/ruins_of_alph_collision.asm)0
-rw-r--r--data/tilesets/ruins_of_alph_metatiles.bin (renamed from tilesets/ruins_of_alph_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/sprout_tower_collision.asm (renamed from tilesets/sprout_tower_collision.asm)0
-rw-r--r--data/tilesets/sprout_tower_metatiles.bin (renamed from tilesets/sprout_tower_metatiles.bin)0
-rw-r--r--data/tilesets/train_station_collision.asm (renamed from tilesets/train_station_collision.asm)0
-rw-r--r--data/tilesets/train_station_metatiles.bin (renamed from tilesets/train_station_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--data/tilesets/underground_collision.asm (renamed from tilesets/underground_collision.asm)0
-rw-r--r--data/tilesets/underground_metatiles.bin (renamed from tilesets/underground_metatiles.bin)0
-rw-r--r--data/tilesets/unused_whirl_islands_collision.asm (renamed from tilesets/unused_whirl_islands_collision.asm)0
-rw-r--r--data/tilesets/unused_whirl_islands_metatiles.bin (renamed from tilesets/unused_whirl_islands_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--data/tilesets/whirl_islands_collision.asm (renamed from tilesets/whirl_islands_collision.asm)0
-rw-r--r--data/tilesets/whirl_islands_metatiles.bin (renamed from tilesets/whirl_islands_metatiles.bin)0
-rw-r--r--data/trainers/encounter_music.asm142
-rw-r--r--data/trainers/gendered_trainers.asm2
-rw-r--r--data/trainers/genders.asm71
-rw-r--r--data/trainers/leaders.asm32
-rw-r--r--data/trainers/palettes.asm6
-rw-r--r--data/trainers/parties.asm1082
-rw-r--r--data/trainers/party_pointers.asm3
-rw-r--r--data/trainers/pic_pointers.asm2
-rw-r--r--data/trainers/sprites.asm68
-rw-r--r--data/types/names.asm (renamed from data/type_names.asm)2
-rw-r--r--data/types/search_strings.asm21
-rw-r--r--data/types/search_types.asm20
-rwxr-xr-xdata/unknown_table.asm13
-rw-r--r--data/unown_walls.asm54
-rw-r--r--data/unused_text/dakutens.asm15
-rw-r--r--data/unused_text/gen_1_trainers.asm (renamed from text/unused_gen_1_trainers.asm)3
-rw-r--r--data/unused_text/sweet_honey.asm (renamed from text/unused_sweet_honey.asm)0
-rw-r--r--data/wild/fish.asm50
-rw-r--r--data/wild/treemon_maps.asm76
-rw-r--r--data/wild/treemons.asm34
-rw-r--r--data/wild/treemons_asleep.asm31
-rw-r--r--docs/battle_anim_commands.md3
-rw-r--r--docs/design_flaws.md2
-rw-r--r--docs/event_commands.md4
-rw-r--r--docs/images/hp_exp_bar_border.pngbin125 -> 116 bytes
-rw-r--r--docs/images/hp_exp_bar_border_fix.pngbin124 -> 187 bytes
-rw-r--r--docs/images/port.pngbin1055 -> 1048 bytes
-rw-r--r--docs/images/port_fix.pngbin1056 -> 1547 bytes
-rw-r--r--docs/map_scripts.md28
-rw-r--r--docs/move_effect_commands.md2
-rw-r--r--engine/battle/ai/items.asm6
-rwxr-xr-xengine/battle/ai/move.asm6
-rw-r--r--engine/battle/ai/scoring.asm26
-rwxr-xr-xengine/battle/ai/switch.asm16
-rwxr-xr-xengine/battle/anim_hp_bar.asm10
-rw-r--r--engine/battle/battle_transition.asm53
-rw-r--r--engine/battle/core.asm386
-rw-r--r--engine/battle/effect_commands.asm221
-rwxr-xr-xengine/battle/effect_commands/attract.asm4
-rwxr-xr-xengine/battle/effect_commands/present.asm4
-rw-r--r--engine/battle/hidden_power.asm14
-rwxr-xr-xengine/battle/menu.asm9
-rw-r--r--engine/battle/misc.asm56
-rwxr-xr-xengine/battle/read_trainer_party.asm8
-rw-r--r--engine/battle/returntobattle_useball.asm4
-rwxr-xr-xengine/battle/sliding_intro.asm4
-rw-r--r--engine/battle/start_battle.asm8
-rwxr-xr-xengine/battle/trainer_huds.asm18
-rwxr-xr-xengine/battle/used_move_text.asm105
-rw-r--r--engine/battle_anims/anim_commands.asm39
-rw-r--r--engine/battle_anims/bg_effects.asm4
-rwxr-xr-xengine/battle_anims/core.asm (renamed from engine/battle_anims/engine.asm)0
-rwxr-xr-xengine/battle_anims/functions.asm13
-rwxr-xr-xengine/billspc.asm122
-rwxr-xr-xengine/billspctop.asm9
-rwxr-xr-xengine/breeding.asm63
-rwxr-xr-xengine/buy_sell_toss.asm9
-rwxr-xr-xengine/card_flip.asm312
-rw-r--r--engine/caught_data.asm26
-rw-r--r--engine/cgb_layouts.asm60
-rwxr-xr-xengine/clock_reset.asm1
-rw-r--r--engine/color.asm85
-rw-r--r--engine/credits.asm18
-rwxr-xr-xengine/crystal_colors.asm16
-rwxr-xr-xengine/crystal_intro.asm82
-rwxr-xr-xengine/debug.asm32
-rwxr-xr-xengine/decorations.asm21
-rwxr-xr-xengine/delete_save_change_clock.asm6
-rwxr-xr-xengine/dma_transfer.asm4
-rw-r--r--engine/events.asm7
-rwxr-xr-xengine/events/battle_tower/battle_tower.asm (renamed from mobile/battle_tower_5c.asm)159
-rw-r--r--engine/events/battle_tower/get_trainer_class.asm (renamed from mobile/get_trainer_class.asm)0
-rw-r--r--engine/events/battle_tower/load_trainer.asm (renamed from engine/events/battle_tower.asm)20
-rw-r--r--engine/events/battle_tower/rules.asm (renamed from engine/events/battle_tower_rules.asm)6
-rwxr-xr-xengine/events/battle_tower/trainer_text.asm (renamed from mobile/battle_tower_47.asm)72
-rw-r--r--engine/events/buena.asm20
-rw-r--r--engine/events/buena_menu.asm2
-rwxr-xr-xengine/events/bug_contest/contest_2.asm29
-rw-r--r--engine/events/bug_contest/display_stats.asm6
-rwxr-xr-xengine/events/bug_contest/judging.asm39
-rw-r--r--engine/events/catch_tutorial.asm2
-rwxr-xr-xengine/events/celebi.asm59
-rw-r--r--engine/events/checkforhiddenitems.asm85
-rwxr-xr-xengine/events/daycare.asm14
-rw-r--r--engine/events/dratini.asm2
-rwxr-xr-xengine/events/elevator.asm61
-rwxr-xr-xengine/events/field_moves.asm44
-rw-r--r--engine/events/fish.asm2
-rw-r--r--engine/events/fruit_trees.asm4
-rwxr-xr-xengine/events/halloffame.asm34
-rwxr-xr-xengine/events/happiness_egg.asm6
-rwxr-xr-xengine/events/heal_machine_anim.asm24
-rw-r--r--engine/events/kurt.asm15
-rw-r--r--engine/events/lucky_number.asm2
-rw-r--r--engine/events/magikarp.asm10
-rwxr-xr-xengine/events/magnet_train.asm63
-rw-r--r--engine/events/map_name_sign.asm274
-rwxr-xr-xengine/events/misc_scripts.asm2
-rw-r--r--engine/events/misc_scripts_2.asm2
-rw-r--r--engine/events/mom.asm7
-rwxr-xr-xengine/events/mom_phone.asm8
-rw-r--r--engine/events/move_deleter.asm2
-rw-r--r--engine/events/move_tutor.asm14
-rwxr-xr-xengine/events/overworld.asm14
-rwxr-xr-xengine/events/poisonstep.asm4
-rw-r--r--engine/events/poisonstep_pals.asm7
-rw-r--r--engine/events/poke_seer.asm30
-rwxr-xr-xengine/events/pokecenter_pc.asm14
-rwxr-xr-xengine/events/pokepic.asm7
-rwxr-xr-xengine/events/print_photo.asm2
-rw-r--r--engine/events/print_unown.asm6
-rwxr-xr-xengine/events/prof_oaks_pc.asm4
-rwxr-xr-xengine/events/sacred_ash.asm12
-rwxr-xr-xengine/events/special.asm32
-rw-r--r--engine/events/std_scripts.asm93
-rwxr-xr-xengine/events/treemons.asm285
-rw-r--r--engine/events/unown_walls.asm (renamed from engine/events/crystal_unown.asm)79
-rwxr-xr-xengine/events/whiteout.asm8
-rw-r--r--engine/events_2.asm4
-rwxr-xr-xengine/events_3.asm689
-rwxr-xr-xengine/evolution_animation.asm14
-rwxr-xr-xengine/evolve.asm22
-rwxr-xr-xengine/health.asm4
-rwxr-xr-xengine/init_gender.asm8
-rwxr-xr-xengine/intro_menu.asm43
-rw-r--r--engine/item_effects.asm117
-rw-r--r--engine/landmarks.asm4
-rwxr-xr-xengine/learn.asm4
-rwxr-xr-xengine/link.asm41
-rw-r--r--engine/link_2.asm2
-rwxr-xr-xengine/mail.asm16
-rwxr-xr-xengine/mail_2.asm3
-rwxr-xr-xengine/main_menu.asm5
-rw-r--r--engine/map_objects.asm35
-rw-r--r--engine/map_setup.asm8
-rw-r--r--engine/mapgroup_roofs.asm (renamed from tilesets/roofs.asm)6
-rwxr-xr-xengine/mart.asm18
-rwxr-xr-xengine/menu.asm6
-rw-r--r--engine/menu_2.asm24
-rwxr-xr-xengine/mon_icons.asm7
-rwxr-xr-xengine/mon_menu.asm6
-rw-r--r--engine/mon_stats.asm29
-rwxr-xr-xengine/move_mon.asm62
-rwxr-xr-xengine/mystery_gift.asm74
-rwxr-xr-xengine/mystery_gift_2.asm16
-rwxr-xr-xengine/namingscreen.asm96
-rwxr-xr-xengine/npc_movement.asm48
-rwxr-xr-xengine/npctrade.asm51
-rwxr-xr-xengine/overworld.asm22
-rw-r--r--engine/pack.asm247
-rw-r--r--engine/party_menu.asm59
-rw-r--r--engine/phone/buenas_password.asm2
-rw-r--r--engine/phone/generic_calls.asm2
-rw-r--r--engine/phone/phone.asm24
-rw-r--r--engine/phone/phone_callers.asm10
-rw-r--r--engine/phone/phone_scripts.asm532
-rw-r--r--engine/pic_animation.asm35
-rw-r--r--engine/player_gfx.asm11
-rwxr-xr-xengine/player_movement.asm10
-rwxr-xr-xengine/player_object.asm2
-rwxr-xr-xengine/player_step.asm6
-rw-r--r--engine/pokedex.asm330
-rw-r--r--engine/pokedex_2.asm40
-rw-r--r--engine/pokedex_3.asm2
-rwxr-xr-xengine/pokegear.asm297
-rw-r--r--engine/predef.asm144
-rwxr-xr-xengine/print_party.asm22
-rwxr-xr-xengine/printer.asm5
-rwxr-xr-xengine/printnum.asm2
-rw-r--r--engine/radio.asm174
-rw-r--r--engine/routines/correcterrorsinplayerparty.asm4
-rw-r--r--engine/routines/drawkrispackgfx.asm8
-rw-r--r--engine/routines/flagpredef.asm4
-rw-r--r--engine/routines/loadpushoam.asm2
-rw-r--r--engine/routines/newpokedexentry.asm2
-rw-r--r--engine/routines/placegraphic.asm2
-rw-r--r--engine/routines/playslowcry.asm2
-rw-r--r--engine/routines/printhoursmins.asm3
-rw-r--r--engine/routines/printitemdescription.asm31
-rwxr-xr-xengine/routines/sine.asm4
-rw-r--r--engine/routines/switchpartymons.asm10
-rw-r--r--engine/routines/trademonfrontpic.asm6
-rwxr-xr-xengine/rtc.asm4
-rw-r--r--engine/save.asm12
-rw-r--r--engine/scripting.asm507
-rwxr-xr-xengine/scrolling_menu.asm2
-rwxr-xr-xengine/search.asm4
-rw-r--r--engine/sgb_layouts.asm51
-rwxr-xr-xengine/slot_machine.asm113
-rw-r--r--engine/specials.asm236
-rwxr-xr-xengine/sprite_anims.asm24
-rwxr-xr-xengine/sprites.asm55
-rwxr-xr-xengine/start_menu.asm40
-rwxr-xr-xengine/stats_screen.asm117
-rw-r--r--engine/tempmon.asm4
-rw-r--r--engine/tileset_anims.asm (renamed from tilesets/animations.asm)82
-rw-r--r--engine/tileset_palettes.asm (renamed from tilesets/special_palettes.asm)67
-rwxr-xr-xengine/time.asm12
-rwxr-xr-xengine/time_capsule.asm2
-rw-r--r--engine/time_capsule_2.asm4
-rw-r--r--engine/timeofdaypals.asm8
-rwxr-xr-xengine/timeset.asm11
-rw-r--r--engine/title.asm32
-rwxr-xr-xengine/tmhm.asm6
-rwxr-xr-xengine/tmhm2.asm24
-rwxr-xr-xengine/trade_animation.asm90
-rwxr-xr-xengine/trainer_card.asm164
-rw-r--r--engine/types.asm14
-rwxr-xr-xengine/unown_puzzle.asm55
-rw-r--r--engine/unused_title.asm117
-rwxr-xr-xengine/variables.asm9
-rwxr-xr-xengine/warp_connection.asm13
-rwxr-xr-xengine/wildmons.asm24
-rw-r--r--gfx/battle/exp_bar.pal (renamed from data/palettes/exp_bar.pal)0
-rw-r--r--gfx/battle/hp_bar.pal (renamed from data/palettes/hp_bar.pal)0
-rw-r--r--gfx/battle_anims/battle_anims.pal (renamed from data/palettes/battle_objects.pal)0
-rw-r--r--gfx/card_flip/card_flip.pal (renamed from data/palettes/card_flip.pal)0
-rw-r--r--gfx/credits/credits.pal (renamed from data/palettes/credits.pal)0
-rw-r--r--gfx/credits/pichu.pngbin388 -> 690 bytes
-rw-r--r--gfx/credits/theend.pngbin195 -> 282 bytes
-rw-r--r--gfx/debug/bg.pal (renamed from data/palettes/debug/bg.pal)0
-rw-r--r--gfx/debug/ob.pal (renamed from data/palettes/debug/ob.pal)0
-rw-r--r--gfx/diploma/diploma.pal (renamed from data/palettes/diploma.pal)0
-rw-r--r--gfx/fishing.asm46
-rwxr-xr-xgfx/font.asm81
-rw-r--r--gfx/font/bg_text.pal (renamed from data/palettes/overworld/bg_text.pal)0
-rw-r--r--gfx/font/black.pngbin0 -> 68 bytes
-rw-r--r--gfx/font/font_battle_extra.pngbin280 -> 264 bytes
-rw-r--r--gfx/font/font_extra.pngbin293 -> 281 bytes
-rw-r--r--gfx/font/overworld_space.png (renamed from gfx/font/space.png)bin71 -> 71 bytes
-rw-r--r--gfx/font/phone_icon.png (renamed from gfx/font/overworld_phone_icon.png)bin82 -> 82 bytes
-rw-r--r--gfx/font/unused_arrow.pngbin0 -> 86 bytes
-rw-r--r--gfx/icons.asm76
-rw-r--r--gfx/icons/bat.png (renamed from gfx/icon/bat.png)bin169 -> 169 bytes
-rw-r--r--gfx/icons/bigmon.png (renamed from gfx/icon/bigmon.png)bin185 -> 185 bytes
-rw-r--r--gfx/icons/bird.png (renamed from gfx/icon/bird.png)bin176 -> 176 bytes
-rw-r--r--gfx/icons/blob.png (renamed from gfx/icon/blob.png)bin174 -> 174 bytes
-rw-r--r--gfx/icons/bug.png (renamed from gfx/icon/bug.png)bin185 -> 185 bytes
-rw-r--r--gfx/icons/bulbasaur.png (renamed from gfx/icon/bulbasaur.png)bin166 -> 166 bytes
-rw-r--r--gfx/icons/caterpillar.png (renamed from gfx/icon/caterpillar.png)bin159 -> 159 bytes
-rw-r--r--gfx/icons/charmander.png (renamed from gfx/icon/charmander.png)bin166 -> 166 bytes
-rw-r--r--gfx/icons/clefairy.png (renamed from gfx/icon/clefairy.png)bin165 -> 165 bytes
-rw-r--r--gfx/icons/diglett.png (renamed from gfx/icon/diglett.png)bin129 -> 129 bytes
-rw-r--r--gfx/icons/egg.png (renamed from gfx/icon/egg.png)bin155 -> 155 bytes
-rw-r--r--gfx/icons/equine.png (renamed from gfx/icon/equine.png)bin159 -> 159 bytes
-rw-r--r--gfx/icons/fighter.png (renamed from gfx/icon/fighter.png)bin179 -> 179 bytes
-rw-r--r--gfx/icons/fish.png (renamed from gfx/icon/fish.png)bin173 -> 173 bytes
-rw-r--r--gfx/icons/fox.png (renamed from gfx/icon/fox.png)bin188 -> 188 bytes
-rw-r--r--gfx/icons/geodude.png (renamed from gfx/icon/geodude.png)bin173 -> 173 bytes
-rw-r--r--gfx/icons/ghost.png (renamed from gfx/icon/ghost.png)bin143 -> 143 bytes
-rw-r--r--gfx/icons/gyarados.png (renamed from gfx/icon/gyarados.png)bin208 -> 208 bytes
-rw-r--r--gfx/icons/ho_oh.png (renamed from gfx/icon/ho_oh.png)bin204 -> 204 bytes
-rw-r--r--gfx/icons/humanshape.png (renamed from gfx/icon/humanshape.png)bin161 -> 161 bytes
-rw-r--r--gfx/icons/item.png (renamed from gfx/icon/item.png)bin82 -> 82 bytes
-rw-r--r--gfx/icons/jellyfish.png (renamed from gfx/icon/jellyfish.png)bin172 -> 172 bytes
-rw-r--r--gfx/icons/jigglypuff.png (renamed from gfx/icon/jigglypuff.png)bin165 -> 165 bytes
-rw-r--r--gfx/icons/lapras.png (renamed from gfx/icon/lapras.png)bin165 -> 165 bytes
-rw-r--r--gfx/icons/lugia.png (renamed from gfx/icon/lugia.png)bin185 -> 185 bytes
-rw-r--r--gfx/icons/mail.png (renamed from gfx/icon/mail.png)bin85 -> 85 bytes
-rw-r--r--gfx/icons/mail2.png (renamed from gfx/icon/mail2.png)bin135 -> 135 bytes
-rw-r--r--gfx/icons/monster.png (renamed from gfx/icon/monster.png)bin179 -> 179 bytes
-rw-r--r--gfx/icons/moth.png (renamed from gfx/icon/moth.png)bin185 -> 185 bytes
-rw-r--r--gfx/icons/oddish.png (renamed from gfx/icon/oddish.png)bin157 -> 157 bytes
-rw-r--r--gfx/icons/party_menu.pal (renamed from data/palettes/party_menu.pal)0
-rw-r--r--gfx/icons/pikachu.png (renamed from gfx/icon/pikachu.png)bin172 -> 172 bytes
-rw-r--r--gfx/icons/poliwag.png (renamed from gfx/icon/poliwag.png)bin158 -> 158 bytes
-rw-r--r--gfx/icons/serpent.png (renamed from gfx/icon/serpent.png)bin145 -> 145 bytes
-rw-r--r--gfx/icons/shell.png (renamed from gfx/icon/shell.png)bin170 -> 170 bytes
-rw-r--r--gfx/icons/slowpoke.png (renamed from gfx/icon/slowpoke.png)bin183 -> 183 bytes
-rw-r--r--gfx/icons/snorlax.png (renamed from gfx/icon/snorlax.png)bin165 -> 165 bytes
-rw-r--r--gfx/icons/squirtle.png (renamed from gfx/icon/squirtle.png)bin170 -> 170 bytes
-rw-r--r--gfx/icons/staryu.png (renamed from gfx/icon/staryu.png)bin166 -> 166 bytes
-rw-r--r--gfx/icons/sudowoodo.png (renamed from gfx/icon/sudowoodo.png)bin195 -> 195 bytes
-rw-r--r--gfx/icons/unown.png (renamed from gfx/icon/unown.png)bin112 -> 112 bytes
-rw-r--r--gfx/icons/voltorb.png (renamed from gfx/icon/voltorb.png)bin127 -> 127 bytes
-rw-r--r--gfx/intro/fade.pal (renamed from data/palettes/crystal_intro/fade.pal)0
-rw-r--r--gfx/intro/gamefreak_logo.pal (renamed from data/palettes/crystal_intro/gamefreak_logo.pal)0
-rw-r--r--gfx/intro/gender_screen.pal4
-rw-r--r--gfx/intro/intro_1.pal (renamed from data/palettes/crystal_intro/intro_1.pal)0
-rw-r--r--gfx/intro/intro_2.pal (renamed from data/palettes/crystal_intro/intro_2.pal)0
-rw-r--r--gfx/intro/intro_3.pal (renamed from data/palettes/crystal_intro/intro_3.pal)0
-rw-r--r--gfx/intro/intro_4.pal (renamed from data/palettes/crystal_intro/intro_4.pal)0
-rw-r--r--gfx/intro/intro_5.pal (renamed from data/palettes/crystal_intro/intro_5.pal)0
-rwxr-xr-xgfx/load_pics.asm14
-rw-r--r--gfx/mail/mail.pal (renamed from data/palettes/mail.pal)0
-rw-r--r--gfx/mobile/phone_tiles.pngbin264 -> 245 bytes
-rw-r--r--gfx/mystery_gift/mg_mobile.pal (renamed from data/palettes/mg_mobile.pal)0
-rw-r--r--gfx/mystery_gift/mystery_gift.pal9
-rw-r--r--gfx/mystery_gift/mystery_gift.pngbin747 -> 698 bytes
-rw-r--r--gfx/overworld/chris_fish.pngbin190 -> 318 bytes
-rw-r--r--gfx/overworld/heal_machine.pal4
-rw-r--r--gfx/overworld/kris_fish.pngbin193 -> 446 bytes
-rw-r--r--gfx/overworld/npc_sprites.pal (renamed from data/palettes/overworld/map_objects.pal)0
-rw-r--r--gfx/overworld/trainer_battle_day.pal4
-rw-r--r--gfx/overworld/trainer_battle_nite.pal4
-rw-r--r--gfx/overworld_font.asm16
-rw-r--r--gfx/pack/pack.pal (renamed from data/palettes/pack.pal)0
-rw-r--r--gfx/pack/pack_f.pal (renamed from data/palettes/pack_f.pal)0
-rw-r--r--gfx/pc/orange.pal4
-rw-r--r--gfx/pics.asm2
-rw-r--r--gfx/pokedex/cursor.pal4
-rw-r--r--gfx/pokedex/question_mark.pal4
-rw-r--r--gfx/pokegear/pokegear.pal (renamed from data/palettes/pokegear.pal)11
-rw-r--r--gfx/pokegear/pokegear_f.pal (renamed from data/palettes/pokegear_f.pal)11
-rw-r--r--gfx/pokegear/town_map.pngbin464 -> 681 bytes
-rw-r--r--gfx/pokegear/town_map_palette_map.asm (renamed from data/palettes/town_map.asm)28
-rw-r--r--gfx/pokemon/egg/front.pngbin435 -> 444 bytes
-rw-r--r--gfx/pokemon/egg/shiny.pal4
-rw-r--r--gfx/sgb/blk_packets.asm (renamed from data/palettes/blk_packets.asm)0
-rw-r--r--gfx/sgb/pal_packets.asm (renamed from data/palettes/pal_packets.asm)2
-rw-r--r--gfx/sgb/predef.pal (renamed from data/palettes/predef.pal)0
-rw-r--r--gfx/sgb/roof_pal_inds.asm32
-rw-r--r--gfx/sgb/sgb_border.pal (renamed from data/palettes/sgb_border.pal)0
-rw-r--r--gfx/sgb/sgb_border.pngbin632 -> 608 bytes
-rw-r--r--gfx/sgb/sgb_border.tilemap2
-rw-r--r--gfx/slots/slots.pal (renamed from data/palettes/slot_machine.pal)0
-rw-r--r--gfx/splash/logo.pal4
-rw-r--r--gfx/stats/exp_bar_ends.pngbin76 -> 0 bytes
-rw-r--r--gfx/stats/pages.pal15
-rw-r--r--gfx/stats/shiny.pngbin89 -> 0 bytes
-rw-r--r--gfx/stats/stats.pal6
-rw-r--r--gfx/stats/stats_tiles.pngbin195 -> 201 bytes
-rw-r--r--gfx/tilesets.asm (renamed from tilesets/data.asm)142
-rw-r--r--gfx/tilesets/aerodactyl_word_room.pngbin1909 -> 1884 bytes
-rw-r--r--gfx/tilesets/aerodactyl_word_room_palette_map.asm (renamed from tilesets/aerodactyl_word_room_palette_map.asm)0
-rw-r--r--gfx/tilesets/battle_tower.pal (renamed from data/palettes/tilesets/battle_tower.pal)0
-rw-r--r--gfx/tilesets/battle_tower.pngbin993 -> 1004 bytes
-rw-r--r--gfx/tilesets/battle_tower_outside.pngbin2341 -> 2324 bytes
-rw-r--r--gfx/tilesets/battle_tower_outside_palette_map.asm (renamed from tilesets/battle_tower_outside_palette_map.asm)0
-rw-r--r--gfx/tilesets/battle_tower_palette_map.asm (renamed from tilesets/battle_tower_palette_map.asm)0
-rw-r--r--gfx/tilesets/beta_word_room.pngbin1909 -> 1884 bytes
-rw-r--r--gfx/tilesets/beta_word_room_palette_map.asm (renamed from tilesets/beta_word_room_palette_map.asm)0
-rw-r--r--gfx/tilesets/bg_tiles.pal (renamed from data/palettes/overworld/tileset_bg.pal)2
-rw-r--r--gfx/tilesets/cave.pngbin1044 -> 1031 bytes
-rw-r--r--gfx/tilesets/cave_palette_map.asm (renamed from tilesets/cave_palette_map.asm)0
-rw-r--r--gfx/tilesets/celadon_mansion.pngbin2047 -> 2047 bytes
-rw-r--r--gfx/tilesets/celadon_mansion_1.pal44
-rw-r--r--gfx/tilesets/celadon_mansion_2.pal4
-rw-r--r--gfx/tilesets/celadon_mansion_palette_map.asm (renamed from tilesets/celadon_mansion_palette_map.asm)0
-rw-r--r--gfx/tilesets/game_corner.pngbin1583 -> 1562 bytes
-rw-r--r--gfx/tilesets/game_corner_palette_map.asm (renamed from tilesets/game_corner_palette_map.asm)0
-rw-r--r--gfx/tilesets/gate.pngbin1146 -> 1141 bytes
-rw-r--r--gfx/tilesets/gate_palette_map.asm (renamed from tilesets/gate_palette_map.asm)0
-rw-r--r--gfx/tilesets/gym_1.pngbin1282 -> 1272 bytes
-rw-r--r--gfx/tilesets/gym_1_palette_map.asm (renamed from tilesets/gym_1_palette_map.asm)0
-rw-r--r--gfx/tilesets/ho_oh_word_room.pngbin1909 -> 1884 bytes
-rw-r--r--gfx/tilesets/ho_oh_word_room_palette_map.asm (renamed from tilesets/ho_oh_word_room_palette_map.asm)0
-rw-r--r--gfx/tilesets/house_1.pal (renamed from data/palettes/tilesets/house_1.pal)0
-rw-r--r--gfx/tilesets/house_1.pngbin1264 -> 1254 bytes
-rw-r--r--gfx/tilesets/house_1_palette_map.asm (renamed from tilesets/house_1_palette_map.asm)0
-rw-r--r--gfx/tilesets/ice_path.pal (renamed from data/palettes/tilesets/ice_path.pal)0
-rw-r--r--gfx/tilesets/ice_path.pngbin2592 -> 2566 bytes
-rw-r--r--gfx/tilesets/ice_path_palette_map.asm (renamed from tilesets/ice_path_palette_map.asm)0
-rw-r--r--gfx/tilesets/ilex_forest.pngbin1264 -> 1214 bytes
-rw-r--r--gfx/tilesets/ilex_forest_palette_map.asm (renamed from tilesets/ilex_forest_palette_map.asm)0
-rw-r--r--gfx/tilesets/johto_1.pngbin2084 -> 2044 bytes
-rw-r--r--gfx/tilesets/johto_1_palette_map.asm (renamed from tilesets/johto_1_palette_map.asm)0
-rw-r--r--gfx/tilesets/johto_2.pngbin2341 -> 2324 bytes
-rw-r--r--gfx/tilesets/johto_2_palette_map.asm (renamed from tilesets/johto_2_palette_map.asm)0
-rw-r--r--gfx/tilesets/kabuto_word_room.pngbin1909 -> 1884 bytes
-rw-r--r--gfx/tilesets/kabuto_word_room_palette_map.asm (renamed from tilesets/kabuto_word_room_palette_map.asm)0
-rw-r--r--gfx/tilesets/kanto.pngbin1316 -> 1301 bytes
-rw-r--r--gfx/tilesets/kanto_palette_map.asm (renamed from tilesets/kanto_palette_map.asm)0
-rw-r--r--gfx/tilesets/kurts_house.pngbin1203 -> 1181 bytes
-rw-r--r--gfx/tilesets/kurts_house_palette_map.asm (renamed from tilesets/kurts_house_palette_map.asm)0
-rw-r--r--gfx/tilesets/lab.pngbin2041 -> 2022 bytes
-rw-r--r--gfx/tilesets/lab_palette_map.asm (renamed from tilesets/lab_palette_map.asm)0
-rw-r--r--gfx/tilesets/lava/1.png (renamed from gfx/tilesets/safari/1.png)bin89 -> 89 bytes
-rw-r--r--gfx/tilesets/lava/2.png (renamed from gfx/tilesets/safari/2.png)bin89 -> 89 bytes
-rw-r--r--gfx/tilesets/lava/3.png (renamed from gfx/tilesets/safari/3.png)bin87 -> 87 bytes
-rw-r--r--gfx/tilesets/lava/4.png (renamed from gfx/tilesets/safari/4.png)bin79 -> 79 bytes
-rw-r--r--gfx/tilesets/lighthouse.pngbin1226 -> 1226 bytes
-rw-r--r--gfx/tilesets/lighthouse_palette_map.asm (renamed from tilesets/lighthouse_palette_map.asm)0
-rw-r--r--gfx/tilesets/mart.pngbin1773 -> 1751 bytes
-rw-r--r--gfx/tilesets/mart_palette_map.asm (renamed from tilesets/mart_palette_map.asm)0
-rw-r--r--gfx/tilesets/olivine_gym.pngbin2284 -> 2267 bytes
-rw-r--r--gfx/tilesets/olivine_gym_palette_map.asm (renamed from tilesets/olivine_gym_palette_map.asm)0
-rw-r--r--gfx/tilesets/omanyte_word_room.pngbin1909 -> 1884 bytes
-rw-r--r--gfx/tilesets/omanyte_word_room_palette_map.asm (renamed from tilesets/omanyte_word_room_palette_map.asm)0
-rw-r--r--gfx/tilesets/palette_maps.asm149
-rw-r--r--gfx/tilesets/park.pngbin1334 -> 1310 bytes
-rw-r--r--gfx/tilesets/park_palette_map.asm (renamed from tilesets/park_palette_map.asm)0
-rw-r--r--gfx/tilesets/players_house.pngbin1005 -> 999 bytes
-rw-r--r--gfx/tilesets/players_house_2f.pngbin1250 -> 1221 bytes
-rw-r--r--gfx/tilesets/players_house_2f_palette_map.asm (renamed from tilesets/players_house_2f_palette_map.asm)0
-rw-r--r--gfx/tilesets/players_house_palette_map.asm (renamed from tilesets/players_house_palette_map.asm)0
-rw-r--r--gfx/tilesets/pokecenter.pngbin1195 -> 1189 bytes
-rw-r--r--gfx/tilesets/pokecenter_palette_map.asm (renamed from tilesets/pokecenter_palette_map.asm)0
-rw-r--r--gfx/tilesets/pokecom_center.pal (renamed from data/palettes/tilesets/pokecom_center.pal)0
-rw-r--r--gfx/tilesets/pokecom_center.pngbin2498 -> 2485 bytes
-rw-r--r--gfx/tilesets/pokecom_center_palette_map.asm (renamed from tilesets/pokecom_center_palette_map.asm)0
-rw-r--r--gfx/tilesets/port.pngbin1062 -> 1048 bytes
-rw-r--r--gfx/tilesets/port_palette_map.asm (renamed from tilesets/port_palette_map.asm)0
-rw-r--r--gfx/tilesets/power_plant.pngbin1131 -> 1123 bytes
-rw-r--r--gfx/tilesets/power_plant_palette_map.asm (renamed from tilesets/power_plant_palette_map.asm)0
-rw-r--r--gfx/tilesets/radio_tower.pal (renamed from data/palettes/tilesets/radio_tower.pal)0
-rw-r--r--gfx/tilesets/radio_tower.pngbin1419 -> 1381 bytes
-rw-r--r--gfx/tilesets/radio_tower_palette_map.asm (renamed from tilesets/radio_tower_palette_map.asm)0
-rw-r--r--gfx/tilesets/roofs.pal107
-rw-r--r--gfx/tilesets/ruins_of_alph.pngbin1909 -> 1884 bytes
-rw-r--r--gfx/tilesets/ruins_of_alph_palette_map.asm (renamed from tilesets/ruins_of_alph_palette_map.asm)0
-rw-r--r--gfx/tilesets/sprout_tower.pngbin1505 -> 1489 bytes
-rw-r--r--gfx/tilesets/sprout_tower_palette_map.asm (renamed from tilesets/sprout_tower_palette_map.asm)0
-rw-r--r--gfx/tilesets/train_station.pngbin1156 -> 1162 bytes
-rw-r--r--gfx/tilesets/train_station_palette_map.asm (renamed from tilesets/train_station_palette_map.asm)0
-rw-r--r--gfx/tilesets/underground.pngbin1143 -> 1111 bytes
-rw-r--r--gfx/tilesets/underground_palette_map.asm (renamed from tilesets/underground_palette_map.asm)0
-rw-r--r--gfx/tilesets/unused_museum_palette_map.asm (renamed from tilesets/unused_museum_palette_map.asm)0
-rw-r--r--gfx/tilesets/whirl_islands.pngbin851 -> 840 bytes
-rw-r--r--gfx/tilesets/whirl_islands_palette_map.asm (renamed from tilesets/whirl_islands_palette_map.asm)0
-rw-r--r--gfx/title/old_bg.pal (renamed from data/palettes/unused_title/bg.pal)17
-rw-r--r--gfx/title/old_bg.tilemapbin0 -> 2048 bytes
-rw-r--r--gfx/title/old_fg.pal (renamed from data/palettes/unused_title/ob.pal)0
-rw-r--r--gfx/title/title.pal (renamed from data/palettes/title.pal)0
-rw-r--r--gfx/trade/border.pal (renamed from data/palettes/trade_room.pal)0
-rw-r--r--gfx/unknown/49757.pal (renamed from data/palettes/unknown/49757.pal)0
-rw-r--r--gfx/unknown/4985a.asm8
-rw-r--r--gfx/unknown/b6f1.pal (renamed from data/palettes/unknown/b6f1.pal)0
-rw-r--r--gfx/unknown/b719.pal (renamed from data/palettes/unknown/b719.pal)0
-rw-r--r--gfx/unknown/b789.pal (renamed from data/palettes/unknown/b789.pal)0
-rw-r--r--home.asm33
-rw-r--r--home/audio.asm31
-rw-r--r--home/battle.asm4
-rw-r--r--home/fade.asm3
-rw-r--r--home/init.asm2
-rw-r--r--home/lcd.asm3
-rw-r--r--home/map.asm20
-rw-r--r--home/map_objects.asm4
-rw-r--r--home/menu.asm17
-rw-r--r--home/mobile.asm6
-rw-r--r--home/palettes.asm2
-rw-r--r--home/pokedex_flags.asm2
-rw-r--r--home/serial.asm3
-rw-r--r--home/sine.asm2
-rw-r--r--home/text.asm9
-rw-r--r--home/time.asm6
-rw-r--r--home/trainers.asm2
-rw-r--r--home/vblank.asm4
-rw-r--r--home/video.asm2
-rw-r--r--home/window.asm2
-rw-r--r--hram.asm8
-rw-r--r--includes.asm2
-rw-r--r--lib/mobile/main.asm7
-rw-r--r--macros.asm3
-rw-r--r--macros/base_stats.asm67
-rw-r--r--macros/code.asm9
-rw-r--r--macros/color.asm10
-rw-r--r--macros/data.asm16
-rw-r--r--macros/enum.asm9
-rw-r--r--macros/scripts/battle_commands.asm2
-rw-r--r--macros/scripts/events.asm10
-rw-r--r--macros/scripts/maps.asm33
-rwxr-xr-xmacros/tilesets.asm15
-rwxr-xr-xmacros/wram.asm13
-rw-r--r--main.asm146
-rw-r--r--maps.asm14
-rw-r--r--maps/AzaleaGym.asm4
-rw-r--r--maps/AzaleaTown.asm10
-rw-r--r--maps/BattleTower1F.asm84
-rw-r--r--maps/BattleTowerBattleRoom.asm46
-rw-r--r--maps/BattleTowerElevator.asm4
-rw-r--r--maps/BattleTowerHallway.asm4
-rw-r--r--maps/BattleTowerOutside.asm4
-rw-r--r--maps/BetaCinnabarPokemonLabHallway.blk (renamed from maps/BetaCinnabarIslandPokemonLabHallway.blk)0
-rw-r--r--maps/BetaCinnabarPokemonLabRoom1.blk (renamed from maps/BetaCinnabarIslandPokemonLabRoom1.blk)0
-rw-r--r--maps/BetaCinnabarPokemonLabRoom2.blk (renamed from maps/BetaCinnabarIslandPokemonLabRoom2.blk)0
-rw-r--r--maps/BetaCinnabarPokemonLabRoom3.blk (renamed from maps/BetaCinnabarIslandPokemonLabRoom3.blk)0
-rw-r--r--maps/BetaEcruteakCity.blk (renamed from maps/BetaTeakCity.blk)0
-rw-r--r--maps/BetaFastShipInsideCutOut.blk (renamed from maps/BetaSSAquaInsideCutOut.blk)0
-rw-r--r--maps/BlackthornCity.asm4
-rw-r--r--maps/BlackthornGym1F.asm14
-rw-r--r--maps/BlackthornGym2F.asm26
-rw-r--r--maps/BluesHouse.asm10
-rw-r--r--maps/BrunosRoom.asm14
-rw-r--r--maps/BurnedTower1F.asm20
-rw-r--r--maps/BurnedTowerB1F.asm20
-rw-r--r--maps/CeladonCafe.asm4
-rw-r--r--maps/CeladonCity.asm4
-rw-r--r--maps/CeladonDeptStore6F.asm40
-rw-r--r--maps/CeladonDeptStoreElevator.asm2
-rw-r--r--maps/CeladonGameCorner.asm20
-rw-r--r--maps/CeladonGameCornerPrizeRoom.asm60
-rw-r--r--maps/CeladonGym.asm4
-rw-r--r--maps/CeladonMansion3F.asm6
-rw-r--r--maps/CeladonPokecenter1F.asm8
-rw-r--r--maps/CeruleanCity.asm4
-rw-r--r--maps/CeruleanGym.asm17
-rw-r--r--maps/CeruleanPokecenter1F.asm2
-rw-r--r--maps/CherrygroveCity.asm8
-rw-r--r--maps/CianwoodCity.asm20
-rw-r--r--maps/CianwoodGym.asm4
-rw-r--r--maps/CianwoodPhotoStudio.asm (renamed from maps/CianwoodCityPhotoStudio.asm)8
-rw-r--r--maps/CinnabarIsland.asm4
-rw-r--r--maps/Colosseum.asm10
-rw-r--r--maps/CopycatsHouse2F.asm12
-rw-r--r--maps/DarkCaveVioletEntrance.asm3
-rw-r--r--maps/DayCare.asm2
-rw-r--r--maps/DiglettsCave.asm3
-rw-r--r--maps/DragonShrine.asm235
-rw-r--r--maps/DragonsDenB1F.asm16
-rw-r--r--maps/EarlsPokemonAcademy.asm13
-rw-r--r--maps/EcruteakCity.asm4
-rw-r--r--maps/EcruteakGym.asm10
-rw-r--r--maps/EcruteakHouse.asm12
-rw-r--r--maps/EcruteakPokecenter1F.asm4
-rw-r--r--maps/ElmsLab.asm44
-rw-r--r--maps/FastShip1F.asm20
-rw-r--r--maps/FastShipB1F.asm4
-rw-r--r--maps/FastShipCabins_NNW_NNE_NE.asm4
-rw-r--r--maps/FastShipCabins_SE_SSE_CaptainsCabin.asm10
-rw-r--r--maps/FastShipCabins_SW_SSW_NW.asm6
-rw-r--r--maps/FuchsiaCity.asm2
-rw-r--r--maps/FuchsiaGym.asm14
-rw-r--r--maps/FuchsiaPokecenter1F.asm4
-rw-r--r--maps/GoldenrodBillsHouse.asm6
-rw-r--r--maps/GoldenrodCity.asm29
-rw-r--r--maps/GoldenrodDeptStore2F.asm8
-rw-r--r--maps/GoldenrodDeptStore5F.asm12
-rw-r--r--maps/GoldenrodDeptStore6F.asm40
-rw-r--r--maps/GoldenrodDeptStoreB1F.asm12
-rw-r--r--maps/GoldenrodDeptStoreElevator.asm2
-rw-r--r--maps/GoldenrodDeptStoreRoof.asm8
-rw-r--r--maps/GoldenrodGameCorner.asm60
-rw-r--r--maps/GoldenrodGym.asm8
-rw-r--r--maps/GoldenrodHappinessRater.asm12
-rw-r--r--maps/GoldenrodMagnetTrainStation.asm8
-rw-r--r--maps/GoldenrodNameRater.asm4
-rw-r--r--maps/GoldenrodPokeComCenter2FMobile.asm18
-rw-r--r--maps/GoldenrodPokecenter1F.asm8
-rw-r--r--maps/GoldenrodUnderground.asm52
-rw-r--r--maps/GoldenrodUndergroundSwitchRoomEntrances.asm6
-rw-r--r--maps/GoldenrodUndergroundWarehouse.asm4
-rw-r--r--maps/HallOfFame.asm8
-rw-r--r--maps/IcePathB1F.asm12
-rw-r--r--maps/IcePathB2FBlackthornSide.asm3
-rw-r--r--maps/IcePathB2FMahoganySide.asm17
-rw-r--r--maps/IlexForest.asm76
-rw-r--r--maps/IndigoPlateauPokecenter1F.asm22
-rw-r--r--maps/KarensRoom.asm14
-rw-r--r--maps/KogasRoom.asm14
-rw-r--r--maps/KrissHouse1F.asm4
-rw-r--r--maps/KrissHouse2F.asm29
-rw-r--r--maps/KrissNeighborsHouse.asm2
-rw-r--r--maps/KurtsHouse.asm6
-rw-r--r--maps/LakeOfRage.asm17
-rw-r--r--maps/LakeOfRageMagikarpHouse.asm7
-rw-r--r--maps/LancesRoom.asm18
-rw-r--r--maps/LavRadioTower1F.asm2
-rw-r--r--maps/LavenderNameRater.asm2
-rw-r--r--maps/LavenderSpeechHouse.asm (renamed from maps/LavenderTownSpeechHouse.asm)20
-rw-r--r--maps/LavenderTown.asm4
-rw-r--r--maps/MahoganyGym.asm4
-rw-r--r--maps/MahoganyMart1F.asm8
-rw-r--r--maps/MahoganyTown.asm12
-rw-r--r--maps/ManiasHouse.asm13
-rw-r--r--maps/MobileBattleRoom.asm26
-rw-r--r--maps/MobileTradeRoomMobile.asm10
-rw-r--r--maps/MountMoon.asm2
-rw-r--r--maps/MountMoonSquare.asm7
-rw-r--r--maps/MountMortar1FInside.asm3
-rw-r--r--maps/MountMortar1FOutside.asm3
-rw-r--r--maps/MountMortar2FInside.asm3
-rw-r--r--maps/MountMortarB1F.asm5
-rw-r--r--maps/MoveDeletersHouse.asm2
-rw-r--r--maps/MrPokemonsHouse.asm12
-rw-r--r--maps/NationalPark.asm15
-rw-r--r--maps/NationalParkBugContest.asm3
-rw-r--r--maps/NewBarkTown.asm2
-rw-r--r--maps/OaksLab.asm6
-rw-r--r--maps/OlivineCity.asm14
-rw-r--r--maps/OlivineGym.asm4
-rw-r--r--maps/OlivineLighthouse2F.asm10
-rw-r--r--maps/OlivineLighthouse5F.asm3
-rw-r--r--maps/OlivineLighthouse6F.asm14
-rw-r--r--maps/OlivinePort.asm11
-rw-r--r--maps/PalletTown.asm2
-rw-r--r--maps/PewterCity.asm2
-rw-r--r--maps/PewterGym.asm4
-rw-r--r--maps/PokeSeersHouse.asm2
-rw-r--r--maps/Pokecenter2F.asm72
-rw-r--r--maps/PowerPlant.asm6
-rw-r--r--maps/RadioTower1F.asm6
-rw-r--r--maps/RadioTower2F.asm16
-rw-r--r--maps/RadioTower3F.asm10
-rw-r--r--maps/RadioTower5F.asm10
-rw-r--r--maps/RockTunnel1F.asm6
-rw-r--r--maps/RockTunnelB1F.asm3
-rw-r--r--maps/Route11.asm3
-rw-r--r--maps/Route12.asm3
-rw-r--r--maps/Route13.asm3
-rw-r--r--maps/Route16.asm6
-rw-r--r--maps/Route17.asm12
-rw-r--r--maps/Route17Route18Gate.asm (renamed from maps/Route1718Gate.asm)16
-rw-r--r--maps/Route18.asm4
-rw-r--r--maps/Route19.asm14
-rw-r--r--maps/Route2.asm8
-rw-r--r--maps/Route20.asm2
-rw-r--r--maps/Route23.asm2
-rw-r--r--maps/Route24.asm2
-rw-r--r--maps/Route25.asm7
-rw-r--r--maps/Route26.asm12
-rw-r--r--maps/Route26HealSpeechHouse.asm4
-rw-r--r--maps/Route27.asm14
-rw-r--r--maps/Route27SandstormHouse.asm4
-rw-r--r--maps/Route28.asm3
-rw-r--r--maps/Route29.asm16
-rw-r--r--maps/Route29Route46Gate.asm (renamed from maps/Route2946Gate.asm)24
-rw-r--r--maps/Route30.asm9
-rw-r--r--maps/Route31.asm17
-rw-r--r--maps/Route32.asm26
-rw-r--r--maps/Route33.asm6
-rw-r--r--maps/Route34.asm22
-rw-r--r--maps/Route34IlexForestGate.asm2
-rw-r--r--maps/Route35.asm12
-rw-r--r--maps/Route35NationalParkGate.asm32
-rw-r--r--maps/Route36.asm16
-rw-r--r--maps/Route36NationalParkGate.asm37
-rw-r--r--maps/Route37.asm5
-rw-r--r--maps/Route38.asm12
-rw-r--r--maps/Route39.asm9
-rw-r--r--maps/Route39Barn.asm2
-rw-r--r--maps/Route39Farmhouse.asm10
-rw-r--r--maps/Route4.asm3
-rw-r--r--maps/Route40.asm6
-rw-r--r--maps/Route40BattleTowerGate.asm2
-rw-r--r--maps/Route41.asm2
-rw-r--r--maps/Route42.asm17
-rw-r--r--maps/Route43.asm18
-rw-r--r--maps/Route43Gate.asm28
-rw-r--r--maps/Route44.asm15
-rw-r--r--maps/Route45.asm17
-rw-r--r--maps/Route46.asm10
-rw-r--r--maps/Route5.asm4
-rw-r--r--maps/Route5SaffronGate.asm (renamed from maps/Route5SaffronCityGate.asm)14
-rw-r--r--maps/Route9.asm3
-rw-r--r--maps/RuinsOfAlphAerodactylChamber.asm32
-rw-r--r--maps/RuinsOfAlphHoOhChamber.asm34
-rw-r--r--maps/RuinsOfAlphInnerChamber.asm2
-rw-r--r--maps/RuinsOfAlphKabutoChamber.asm38
-rw-r--r--maps/RuinsOfAlphOmanyteChamber.asm34
-rw-r--r--maps/RuinsOfAlphOutside.asm12
-rw-r--r--maps/RuinsOfAlphResearchCenter.asm34
-rw-r--r--maps/SaffronCity.asm6
-rw-r--r--maps/SaffronGym.asm4
-rw-r--r--maps/SaffronMagnetTrainStation.asm (renamed from maps/SaffronTrainStation.asm)38
-rw-r--r--maps/SaffronMagnetTrainStation.blk (renamed from maps/SaffronTrainStation.blk)0
-rw-r--r--maps/SaffronPokecenter1F.asm2
-rw-r--r--maps/SeafoamGym.asm2
-rw-r--r--maps/SilverCaveOutside.asm4
-rw-r--r--maps/SilverCaveRoom1.asm6
-rw-r--r--maps/SilverCaveRoom2.asm3
-rw-r--r--maps/SilverCaveRoom3.asm14
-rw-r--r--maps/SlowpokeWellB1F.asm10
-rw-r--r--maps/SproutTower3F.asm4
-rw-r--r--maps/TeamRocketBaseB1F.asm81
-rw-r--r--maps/TeamRocketBaseB2F.asm41
-rw-r--r--maps/TeamRocketBaseB3F.asm14
-rw-r--r--maps/TimeCapsule.asm6
-rw-r--r--maps/TinTower1F.asm42
-rw-r--r--maps/TinTower4F.asm3
-rw-r--r--maps/TinTower5F.asm6
-rw-r--r--maps/TinTowerRoof.asm2
-rw-r--r--maps/TradeCenter.asm6
-rw-r--r--maps/TrainerHouseB1F.asm8
-rw-r--r--maps/UndergroundPath.asm6
-rw-r--r--maps/UnionCaveB2F.asm2
-rw-r--r--maps/VermilionCity.asm8
-rw-r--r--maps/VermilionGym.asm4
-rw-r--r--maps/VermilionPort.asm13
-rw-r--r--maps/VictoryRoad.asm12
-rw-r--r--maps/VictoryRoadGate.asm4
-rw-r--r--maps/VioletCity.asm4
-rw-r--r--maps/VioletGym.asm6
-rw-r--r--maps/VioletPokecenter1F.asm4
-rw-r--r--maps/ViridianCity.asm2
-rw-r--r--maps/ViridianGym.asm4
-rw-r--r--maps/WhirlIslandB1F.asm9
-rw-r--r--maps/WhirlIslandLugiaChamber.asm2
-rw-r--r--maps/WillsRoom.asm14
-rw-r--r--maps/WiseTriosRoom.asm4
-rw-r--r--maps/blockdata.asm38
-rw-r--r--maps/map_headers.asm12
-rw-r--r--maps/second_map_headers.asm12
-rwxr-xr-xmobile/fixed_words.asm237
-rwxr-xr-xmobile/mobile_12.asm23
-rwxr-xr-xmobile/mobile_12_2.asm5
-rw-r--r--mobile/mobile_22.asm104
-rw-r--r--mobile/mobile_22_2.asm20
-rw-r--r--mobile/mobile_40.asm72
-rwxr-xr-xmobile/mobile_41.asm239
-rw-r--r--mobile/mobile_42.asm54
-rw-r--r--mobile/mobile_45.asm37
-rwxr-xr-xmobile/mobile_45_sprite_engine.asm49
-rwxr-xr-xmobile/mobile_46.asm90
-rwxr-xr-xmobile/mobile_5b.asm7
-rwxr-xr-xmobile/mobile_5c.asm17
-rw-r--r--mobile/mobile_5f.asm36
-rwxr-xr-xmobile/mobile_menu.asm8
-rw-r--r--mobile/news/news.asm8
-rw-r--r--sram.asm9
-rw-r--r--text/common_2.asm309
-rw-r--r--text/common_4.asm683
-rw-r--r--text/common_text.asm18
-rw-r--r--tilesets/palette_maps.asm130
-rw-r--r--version.asm2
-rw-r--r--wram.asm118
918 files changed, 12383 insertions, 12281 deletions
diff --git a/FAQ.md b/FAQ.md
index c4dd9bdbe..26957631e 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -14,7 +14,7 @@
## What is pokecrystal11.gbc?
-Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `CRYSTAL11` so the assembly builds the changed version.
+Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `_CRYSTAL11` so the assembly builds the changed version.
## Can't build ROM; "ERROR: `UNION` already defined"
diff --git a/Makefile b/Makefile
index 2a746f2ca..169f2e6b8 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ home.o \
main.o \
maps.o \
wram.o \
+data/common_text/common_text.o \
data/pokemon/dex_entries.o \
data/pokemon/egg_moves.o \
data/pokemon/evos_attacks.o \
@@ -29,8 +30,7 @@ engine/credits.o \
engine/events.o \
gfx/pics.o \
gfx/sprites.o \
-lib/mobile/main.o \
-text/common_text.o
+lib/mobile/main.o
crystal11_obj := $(crystal_obj:.o=11.o)
@@ -52,7 +52,8 @@ tools:
$(MAKE) -C tools/
-$(crystal11_obj): RGBASMFLAGS = -D CRYSTAL11
+$(crystal_obj): RGBASMFLAGS = -D _CRYSTAL
+$(crystal11_obj): RGBASMFLAGS = -D _CRYSTAL -D _CRYSTAL11
# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
@@ -119,10 +120,12 @@ gfx/pokemon/girafarig/front.animated.tilemap: gfx/pokemon/girafarig/front.2bpp g
### Pokemon pic graphics rules
-gfx/pokemon/%/normal.gbcpal: gfx/pokemon/%/front.png
- $(RGBGFX) -p $@ $<
+gfx/pokemon/%/front.dimensions: gfx/pokemon/%/front.png
+ tools/png_dimensions $< $@
gfx/pokemon/%/normal.pal: gfx/pokemon/%/normal.gbcpal
tools/palette -p $< > $@
+gfx/pokemon/%/normal.gbcpal: gfx/pokemon/%/front.png
+ $(RGBGFX) -p $@ $<
gfx/pokemon/%/back.2bpp: gfx/pokemon/%/back.png
$(RGBGFX) -h -o $@ $<
gfx/pokemon/%/bitmask.asm: gfx/pokemon/%/front.animated.tilemap gfx/pokemon/%/front.dimensions
@@ -133,9 +136,6 @@ gfx/pokemon/%/front.animated.2bpp: gfx/pokemon/%/front.2bpp gfx/pokemon/%/front.
tools/pokemon_animation_graphics -o $@ $^
gfx/pokemon/%/front.animated.tilemap: gfx/pokemon/%/front.2bpp gfx/pokemon/%/front.dimensions
tools/pokemon_animation_graphics -t $@ $^
-# Don't use -h, pokemon_animation_graphics takes care of it
-#gfx/pokemon/%/front.2bpp: gfx/pokemon/%/front.png
-# $(RGBGFX) -o $@ $<
### Misc file-specific graphics rules
@@ -146,6 +146,8 @@ gfx/shrink/shrink2.2bpp: rgbgfx += -h
gfx/trainers/%.2bpp: rgbgfx += -h
gfx/trainers/%.pal: gfx/trainers/%.gbcpal
tools/palette -p $< > $@
+gfx/trainers/%.gbcpal: gfx/trainers/%.png
+ $(RGBGFX) -p $@ $<
gfx/mail/dragonite.1bpp: tools/gfx += --remove-whitespace
gfx/mail/large_note.1bpp: tools/gfx += --remove-whitespace
@@ -157,6 +159,11 @@ gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/sgb.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace
+gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
+gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
+
+gfx/mystery_gift/mystery_gift.2bpp: tools/gfx += --trim-whitespace
+
gfx/title/crystal.2bpp: tools/gfx += --interleave --png=$<
gfx/title/old_fg.2bpp: tools/gfx += --interleave --png=$<
gfx/title/logo.2bpp: rgbgfx += -x 4
@@ -195,12 +202,14 @@ gfx/player/kris_back.2bpp: rgbgfx += -h
gfx/trainer_card/chris_card.2bpp: rgbgfx += -h
gfx/trainer_card/kris_card.2bpp: rgbgfx += -h
+gfx/overworld/chris_fish.2bpp: tools/gfx += --trim-whitespace
+gfx/overworld/kris_fish.2bpp: tools/gfx += --trim-whitespace
+
gfx/battle/dude.2bpp: rgbgfx += -h
gfx/font/unused_bold_font.1bpp: tools/gfx += --trim-whitespace
-gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
-gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
+gfx/sgb/sgb_border.2bpp: tools/gfx += --trim-whitespace
gfx/mobile/ascii_font.2bpp: tools/gfx += --trim-whitespace
gfx/mobile/electro_ball.2bpp: tools/gfx += --trim-whitespace
@@ -223,12 +232,3 @@ gfx/unknown/unknown_egg.2bpp: rgbgfx += -h
$(RGBGFX) $(rgbgfx) -d1 -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -d1 -o $@ $@)
-
-%.tilemap: %.png
- $(RGBGFX) -t $@ $<
-%.gbcpal: %.png
- $(RGBGFX) -p $@ $<
-%.pal: %.gbcpal
- tools/palette $< > $@
-%.dimensions: %.png
- tools/png_dimensions $< $@
diff --git a/STYLE.md b/STYLE.md
index 676171e57..7fdfc77d4 100644
--- a/STYLE.md
+++ b/STYLE.md
@@ -1,3 +1,5 @@
+# Style Guide
+
Some of the code will disagree with this guide. Older code is less likely to be correct. Use your best judgement.
When you come across an edge case that isn't referenced in this guide, please add it.
diff --git a/audio.asm b/audio.asm
index 196b5a4c8..cecbdae5b 100644
--- a/audio.asm
+++ b/audio.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "Audio", ROMX
diff --git a/audio/engine.asm b/audio/engine.asm
index feef2fffd..215ab2a3f 100644
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -408,7 +408,7 @@ UpdateChannels: ; e8125
ret
.asm_e824d
- ld a, $3f
+ ld a, $3f ; sound length
ld [rNR31], a
xor a
ld [rNR30], a
@@ -1304,8 +1304,8 @@ ParseSFXOrRest: ; e8698
ld [hl], a
; are we on the last channel? (noise sampling)
ld a, [CurChannel]
- and $3
- cp $3
+ maskbits NUM_MUSIC_CHANS +- 1
+ cp CHAN4
ret z
; update hi frequency from next param
call GetMusicByte
@@ -1320,8 +1320,8 @@ GetNoiseSample: ; e86c5
; load ptr to sample header in NoiseSampleAddress
; are we on the last channel?
ld a, [CurChannel]
- and $3
- cp $3
+ and NUM_MUSIC_CHANS +- 1
+ cp CHAN4
; ret if not
ret nz
; update note duration
@@ -1668,7 +1668,7 @@ MusicEE; e883e
; if ????, jump
; get channel
ld a, [CurChannel]
- and $3 ; ch0-3
+ maskbits NUM_MUSIC_CHANS +- 1
ld e, a
ld d, 0
; hl = Channel1JumpCondition + channel id
@@ -1966,8 +1966,8 @@ Music_NoteType: ; e8963
add hl, bc
ld [hl], a
ld a, [CurChannel]
- and $3
- cp CHAN8 & $3
+ maskbits NUM_MUSIC_CHANS +- 1
+ cp CHAN4
ret z
; intensity
call Music_Intensity
@@ -2414,7 +2414,7 @@ SetLRTracks: ; e8b1b
push de
; store current channel in de
ld a, [CurChannel]
- and $3
+ maskbits NUM_MUSIC_CHANS +- 1
ld e, a
ld d, 0
; get this channel's lr tracks
@@ -2449,7 +2449,7 @@ _PlayMusic:: ; e8b30
call LoadMusicByte ; store first byte of music header in a
rlca
rlca
- and $3 ; get number of channels
+ maskbits NUM_MUSIC_CHANS +- 1
inc a
.loop
; start playing channels
@@ -2505,7 +2505,7 @@ _PlayCryHeader:: ; e8b79
; Top 2 bits contain the number of channels
rlca
rlca
- and 3
+ maskbits NUM_MUSIC_CHANS +- 1
; For each channel:
inc a
@@ -2530,8 +2530,8 @@ _PlayCryHeader:: ; e8b79
; No tempo for channel 4
ld a, [CurChannel]
- and 3
- cp 3
+ maskbits NUM_MUSIC_CHANS +- 1
+ cp CHAN4
jr nc, .start
; Tempo is effectively length
@@ -2669,7 +2669,7 @@ _PlaySFX:: ; e8c04
call LoadMusicByte
rlca ; top 2
rlca ; bits
- and $3
+ maskbits NUM_MUSIC_CHANS +- 1
inc a ; # channels -> # loops
.startchannels
push af
@@ -2722,7 +2722,7 @@ PlayStereoSFX:: ; e8ca6
call LoadMusicByte
rlca
rlca
- and 3 ; ch1-4
+ maskbits NUM_MUSIC_CHANS +- 1
inc a
.loop
@@ -2736,7 +2736,7 @@ PlayStereoSFX:: ; e8ca6
push de
; get tracks for this channel
ld a, [CurChannel]
- and 3 ; ch1-4
+ maskbits NUM_MUSIC_CHANS +- 1
ld e, a
ld d, 0
call GetLRTracks
diff --git a/macros/charmap.asm b/charmap.asm
index fd2d371fd..3b15daf46 100644
--- a/macros/charmap.asm
+++ b/charmap.asm
@@ -80,18 +80,18 @@
; Actual characters (from other graphics files)
- charmap "|", $31 ; from gfx/stats/stats_tiles
-
- charmap "<SHINY>", $3f ; gfx/stats/shiny
-
- charmap "<BLACK>", $60 ; from gfx/mobile/phone_tiles.2bpp
+ ; needed for _LoadFontsExtra1 (see gfx/font.asm)
+ charmap "<BLACK>", $60 ; gfx/font/black_arrow.2bpp
charmap "▲", $61 ; gfx/font/up_arrow.png
- charmap "<PHONE>", $62 ; gfx/font/overworld_phone_icon.2bpp
- charmap "_", $62 ; from gfx/battle/hp_exp_bar_border.1bpp
+ charmap "<PHONE>", $62 ; gfx/font/phone_icon.2bpp
+ ; needed for Special_MagikarpHouseSign (see engine/events/magikarp.asm)
charmap "′", $6e ; gfx/font/feet_inches.png
charmap "″", $6f ; gfx/font/feet_inches.png
+ ; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1
+ charmap "<SHINY>", $3f ; gfx/stats/stats_tiles.png, tile 14
+
; Actual characters (from gfx/font/font.png)
charmap "A", $80
diff --git a/constants.asm b/constants.asm
index 7de20dfe2..4e52c9e42 100644
--- a/constants.asm
+++ b/constants.asm
@@ -1,3 +1,5 @@
+INCLUDE "charmap.asm"
+
INCLUDE "macros.asm"
INCLUDE "hram.asm"
diff --git a/constants/battle_anim_constants.asm b/constants/battle_anim_constants.asm
index d49aafec4..c55d4e9d6 100644
--- a/constants/battle_anim_constants.asm
+++ b/constants/battle_anim_constants.asm
@@ -37,13 +37,13 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_06
const ANIM_OBJ_07
const ANIM_OBJ_08
- const ANIM_OBJ_09
+ const ANIM_OBJ_FANG
const ANIM_OBJ_0A
- const ANIM_OBJ_0B
- const ANIM_OBJ_0C
- const ANIM_OBJ_0D
- const ANIM_OBJ_0E
- const ANIM_OBJ_0F
+ const ANIM_OBJ_EMBER
+ const ANIM_OBJ_DRAGON_RAGE
+ const ANIM_OBJ_FLAMETHROWER
+ const ANIM_OBJ_FIRE_SPIN
+ const ANIM_OBJ_FIRE_BLAST
const ANIM_OBJ_BURNED
const ANIM_OBJ_BLIZZARD
const ANIM_OBJ_12
@@ -57,32 +57,32 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_1A
const ANIM_OBJ_1B
const ANIM_OBJ_BALL_POOF
- const ANIM_OBJ_1D
- const ANIM_OBJ_1E
- const ANIM_OBJ_1F
- const ANIM_OBJ_20
+ const ANIM_OBJ_BIG_ROCK
+ const ANIM_OBJ_SMALL_ROCK
+ const ANIM_OBJ_STRENGTH
+ const ANIM_OBJ_SEISMIC_TOSS
const ANIM_OBJ_BUBBLE
- const ANIM_OBJ_22
- const ANIM_OBJ_23
- const ANIM_OBJ_24
- const ANIM_OBJ_25
- const ANIM_OBJ_26
+ const ANIM_OBJ_SURF
+ const ANIM_OBJ_SING
+ const ANIM_OBJ_WATER_GUN
+ const ANIM_OBJ_HYDRO_PUMP
+ const ANIM_OBJ_POWDER
const ANIM_OBJ_27
const ANIM_OBJ_28
const ANIM_OBJ_ICE_BUILDUP
const ANIM_OBJ_FROZEN
const ANIM_OBJ_MASTER_BALL_SPARKLE
- const ANIM_OBJ_2C
+ const ANIM_OBJ_RECOVER
const ANIM_OBJ_2D
const ANIM_OBJ_2E
const ANIM_OBJ_2F
- const ANIM_OBJ_30
+ const ANIM_OBJ_THUNDER_WAVE
const ANIM_OBJ_31
const ANIM_OBJ_LIGHTNING_BOLT
const ANIM_OBJ_33
const ANIM_OBJ_34
- const ANIM_OBJ_35
- const ANIM_OBJ_36
+ const ANIM_OBJ_CLAMP
+ const ANIM_OBJ_BITE
const ANIM_OBJ_37
const ANIM_OBJ_38
const ANIM_OBJ_39
@@ -95,127 +95,127 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_40
const ANIM_OBJ_41
const ANIM_OBJ_42
- const ANIM_OBJ_43
+ const ANIM_OBJ_SONICBOOM_JP
const ANIM_OBJ_44
const ANIM_OBJ_ABSORB
- const ANIM_OBJ_46
+ const ANIM_OBJ_EGG
const ANIM_OBJ_47
const ANIM_OBJ_48
const ANIM_OBJ_49
const ANIM_OBJ_LEECH_SEED
const ANIM_OBJ_4B
- const ANIM_OBJ_4C
- const ANIM_OBJ_4D
+ const ANIM_OBJ_WAVE
+ const ANIM_OBJ_CONFUSE_RAY
const ANIM_OBJ_4E
const ANIM_OBJ_4F
- const ANIM_OBJ_50
- const ANIM_OBJ_51
+ const ANIM_OBJ_SCREEN
+ const ANIM_OBJ_HARDEN
const ANIM_OBJ_CHICK
- const ANIM_OBJ_53
- const ANIM_OBJ_54
+ const ANIM_OBJ_AMNESIA
+ const ANIM_OBJ_ASLEEP
const ANIM_OBJ_SKULL
const ANIM_OBJ_56
const ANIM_OBJ_57
const ANIM_OBJ_58
const ANIM_OBJ_PARALYZED
- const ANIM_OBJ_5A
+ const ANIM_OBJ_STRING_SHOT
const ANIM_OBJ_HAZE
const ANIM_OBJ_MIST
const ANIM_OBJ_SMOG
const ANIM_OBJ_POISON_GAS
const ANIM_OBJ_HORN
const ANIM_OBJ_60
- const ANIM_OBJ_61
- const ANIM_OBJ_62
- const ANIM_OBJ_63
+ const ANIM_OBJ_PETAL_DANCE
+ const ANIM_OBJ_SLUDGE_BOMB
+ const ANIM_OBJ_PAY_DAY
const ANIM_OBJ_64
- const ANIM_OBJ_65
- const ANIM_OBJ_66
- const ANIM_OBJ_67
- const ANIM_OBJ_68
- const ANIM_OBJ_69
- const ANIM_OBJ_6A
- const ANIM_OBJ_6B
- const ANIM_OBJ_6C
- const ANIM_OBJ_6D
- const ANIM_OBJ_SKY_ATTACK_FEAROW
+ const ANIM_OBJ_MIMIC
+ const ANIM_OBJ_ATTRACT
+ const ANIM_OBJ_BONEMERANG
+ const ANIM_OBJ_BONE_CLUB
+ const ANIM_OBJ_BONE_RUSH
+ const ANIM_OBJ_SWIFT
+ const ANIM_OBJ_KINESIS
+ const ANIM_OBJ_FLASH
+ const ANIM_OBJ_SHINY
+ const ANIM_OBJ_SKY_ATTACK
const ANIM_OBJ_LICK
const ANIM_OBJ_WITHDRAW
const ANIM_OBJ_71
- const ANIM_OBJ_72
- const ANIM_OBJ_73
- const ANIM_OBJ_74
- const ANIM_OBJ_75
- const ANIM_OBJ_76
- const ANIM_OBJ_77
- const ANIM_OBJ_78
- const ANIM_OBJ_79
+ const ANIM_OBJ_GROWTH
+ const ANIM_OBJ_CONVERSION2
+ const ANIM_OBJ_SMOKE
+ const ANIM_OBJ_SMOKESCREEN
+ const ANIM_OBJ_SWORDS_DANCE
+ const ANIM_OBJ_SPEED_LINE
+ const ANIM_OBJ_SHARPEN
+ const ANIM_OBJ_DEFENSE_CURL
const ANIM_OBJ_7A
const ANIM_OBJ_7B
- const ANIM_OBJ_7C
- const ANIM_OBJ_7D
+ const ANIM_OBJ_DISABLE
+ const ANIM_OBJ_AGILITY
const ANIM_OBJ_HEART
- const ANIM_OBJ_7F
- const ANIM_OBJ_80
+ const ANIM_OBJ_FLAME_WHEEL
+ const ANIM_OBJ_SACRED_FIRE
const ANIM_OBJ_COTTON_SPORE
- const ANIM_OBJ_82
- const ANIM_OBJ_83
+ const ANIM_OBJ_MILK_DRINK
+ const ANIM_OBJ_ANGER
const ANIM_OBJ_84
const ANIM_OBJ_85
- const ANIM_OBJ_86
- const ANIM_OBJ_87
- const ANIM_OBJ_88
- const ANIM_OBJ_89
- const ANIM_OBJ_8A
- const ANIM_OBJ_8B
- const ANIM_OBJ_8C
- const ANIM_OBJ_8D
+ const ANIM_OBJ_BATON_PASS
+ const ANIM_OBJ_LOCK_ON
+ const ANIM_OBJ_MIND_READER
+ const ANIM_OBJ_SAFEGUARD
+ const ANIM_OBJ_PROTECT
+ const ANIM_OBJ_THIEF
+ const ANIM_OBJ_OCTAZOOKA
+ const ANIM_OBJ_PRESENT
const ANIM_OBJ_SPIKES
- const ANIM_OBJ_8F
- const ANIM_OBJ_90
- const ANIM_OBJ_91
- const ANIM_OBJ_92
+ const ANIM_OBJ_POWDER_SNOW
+ const ANIM_OBJ_DRAGONBREATH
+ const ANIM_OBJ_CONVERSION
+ const ANIM_OBJ_SPIDER_WEB
const ANIM_OBJ_93
- const ANIM_OBJ_94
- const ANIM_OBJ_95
- const ANIM_OBJ_96
- const ANIM_OBJ_97
- const ANIM_OBJ_98
+ const ANIM_OBJ_NIGHTMARE
+ const ANIM_OBJ_IN_NIGHTMARE
+ const ANIM_OBJ_LOVELY_KISS
+ const ANIM_OBJ_SWEET_KISS
+ const ANIM_OBJ_SKETCH
const ANIM_OBJ_99
const ANIM_OBJ_9A
- const ANIM_OBJ_9B
- const ANIM_OBJ_9C
- const ANIM_OBJ_9D
- const ANIM_OBJ_9E
- const ANIM_OBJ_9F
+ const ANIM_OBJ_DESTINY_BOND
+ const ANIM_OBJ_MORNING_SUN
+ const ANIM_OBJ_GLIMMER
+ const ANIM_OBJ_MOONLIGHT
+ const ANIM_OBJ_HIDDEN_POWER
const ANIM_OBJ_A0
const ANIM_OBJ_A1
- const ANIM_OBJ_A2
- const ANIM_OBJ_A3
- const ANIM_OBJ_A4
- const ANIM_OBJ_A5
+ const ANIM_OBJ_SANDSTORM
+ const ANIM_OBJ_ZAP_CANNON
+ const ANIM_OBJ_SPITE
+ const ANIM_OBJ_CURSE
const ANIM_OBJ_PERISH_SONG
- const ANIM_OBJ_A7
- const ANIM_OBJ_A8
- const ANIM_OBJ_A9
+ const ANIM_OBJ_FORESIGHT
+ const ANIM_OBJ_RAPID_SPIN
+ const ANIM_OBJ_SWAGGER
const ANIM_OBJ_AA
const ANIM_OBJ_AB
- const ANIM_OBJ_AC
+ const ANIM_OBJ_MEAN_LOOK
const ANIM_OBJ_AD
const ANIM_OBJ_AE
- const ANIM_OBJ_AF
+ const ANIM_OBJ_RAIN
const ANIM_OBJ_B0
- const ANIM_OBJ_B1
- const ANIM_OBJ_B2
- const ANIM_OBJ_B3
- const ANIM_OBJ_B4
- const ANIM_OBJ_B5
+ const ANIM_OBJ_PSYCH_UP
+ const ANIM_OBJ_ANCIENTPOWER
+ const ANIM_OBJ_AEROBLAST
+ const ANIM_OBJ_SHADOW_BALL
+ const ANIM_OBJ_ROCK_SMASH
const ANIM_OBJ_FLOWER
const ANIM_OBJ_COTTON
const ANIM_OBJ_PLAYERFEETFOLLOW
const ANIM_OBJ_ENEMYFEETFOLLOW
- const ANIM_OBJ_BA
- const ANIM_OBJ_BB
+ const ANIM_OBJ_PLAYERHEADFOLLOW
+ const ANIM_OBJ_ENEMYHEADFOLLOW
; DoBattleAnimFrame arguments (see engine/battle_anims/functions.asm)
const_def
diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm
index 9a3323509..816625e60 100644
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -17,8 +17,18 @@ MIN_NEUTRAL_DAMAGE EQU 2
REST_SLEEP_TURNS EQU 2
TREEMON_SLEEP_TURNS EQU 7
-; PlayerStatLevels and EnemyStatLevels indexes
-; used for GetStatName
+; default move priority
+BASE_PRIORITY EQU 1
+
+; type effectiveness factors, scaled by 10
+SUPER_EFFECTIVE EQU 20
+MORE_EFFECTIVE EQU 15
+EFFECTIVE EQU 10
+NOT_VERY_EFFECTIVE EQU 05
+NO_EFFECT EQU 00
+
+; PlayerStatLevels and EnemyStatLevels indexes (see wram.asm)
+; GetStatName arguments (see data/battle/stat_names.asm)
const_def
const ATTACK
const DEFENSE
@@ -53,6 +63,7 @@ const_value set 1
const STAT_SATK
const STAT_SDEF
NUM_STATS EQU const_value
+STAT_SPC EQU STAT_SATK
; stat formula constants
STAT_MIN_NORMAL EQU 5
diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm
index 74df3a36a..58853da3a 100755
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -1,4 +1,13 @@
-; BattleTowerAction arguments (see mobile/battle_tower_5c.asm)
+BATTLETOWER_NROFPKMNS EQU 3
+BATTLETOWER_NROFTRAINERS EQU 7
+
+BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
+BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
+
+BATTLETOWER_TRAINERDATALENGTH EQU $24
+BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
+
+; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
const_def
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
const BATTLETOWERACTION_SET_EXPLANATION_READ
@@ -33,19 +42,20 @@
const BATTLETOWERACTION_CHOOSEREWARD ; save options
const BATTLETOWERACTION_SAVEOPTIONS
-; sBattleTowerChallengeState
+; BattleTowerAction return values
+; - from BATTLETOWERACTION_CHECKMOBILEEVENT
+MOBILE_EVENT_OBJECT_GS_BALL EQU $b
+
+; BattleTowerText arguments (see engine/events/battle_tower/trainer_text.asm)
+const_value set 1
+ const BATTLETOWERTEXT_INTRO
+ const BATTLETOWERTEXT_WIN_TEXT
+ const BATTLETOWERTEXT_LOSS_TEXT
+
+; sBattleTowerChallengeState values
const_def
const BATTLETOWER_NO_CHALLENGE
const BATTLETOWER_SAVED_AND_LEFT
const BATTLETOWER_CHALLENGE_IN_PROGESS
const BATTLETOWER_WON_CHALLENGE
const BATTLETOWER_RECEIVED_REWARD
-
-BATTLETOWER_NROFPKMNS EQU 3
-BATTLETOWER_TRAINERDATALENGTH EQU $24
-BATTLETOWER_NROFTRAINERS EQU 7
-BATTLETOWER_NRMONSPERLEVELBRACKET EQU BATTLETOWER_NROFPKMNS * BATTLETOWER_NROFTRAINERS
-BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + 3 * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
-
-; return value from BattleTowerAction(BATTLETOWERACTION_CHECKMOBILEEVENT)
-MOBILE_EVENT_OBJECT_GS_BALL EQU $b
diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm
index 88fe9ca6e..86fdf9384 100644
--- a/constants/collision_constants.asm
+++ b/constants/collision_constants.asm
@@ -1,10 +1,10 @@
-; collision permissions (see tilesets/collision_permissions.asm)
+; collision permissions (see data/collision_permissions.asm)
LANDTILE EQU $00
WATERTILE EQU $01
WALLTILE EQU $0f
TALK EQU $10
-; collision data types (see tilesets/*_collision.asm)
+; collision data types (see data/tilesets/*_collision.asm)
; TileCollisionTable indexes (see data/collision_permissions.asm)
COLL_FLOOR EQU $00
COLL_01 EQU $01 ; garbage
@@ -28,19 +28,19 @@ COLL_CUT_28 EQU $28 ; garbage
COLL_WATER EQU $29
COLL_ICE_2B EQU $2b ; unused
COLL_WHIRLPOOL_2C EQU $2c ; unused
-COLL_WATERFALL_RIGHT EQU $30 ; unused !!!
-COLL_WATERFALL_LEFT EQU $31 ; unused !!!
-COLL_WATERFALL_UP EQU $32 ; unused !!!
+COLL_WATERFALL_RIGHT EQU $30 ; unused
+COLL_WATERFALL_LEFT EQU $31 ; unused
+COLL_WATERFALL_UP EQU $32 ; unused
COLL_WATERFALL EQU $33
-COLL_CURRENT_RIGHT EQU $38 ; unused !!!
-COLL_CURRENT_LEFT EQU $39 ; unused !!!
-COLL_CURRENT_UP EQU $3a ; unused !!!
-COLL_CURRENT_DOWN EQU $3b ; unused !!!
-COLL_BRAKE EQU $40 ; unused !!!
-COLL_WALK_RIGHT EQU $41 ; unused !!!
-COLL_WALK_LEFT EQU $42 ; unused !!!
-COLL_WALK_UP EQU $43 ; unused !!!
-COLL_WALK_DOWN EQU $44 ; unused !!!
+COLL_CURRENT_RIGHT EQU $38 ; unused
+COLL_CURRENT_LEFT EQU $39 ; unused
+COLL_CURRENT_UP EQU $3a ; unused
+COLL_CURRENT_DOWN EQU $3b ; unused
+COLL_BRAKE EQU $40 ; unused
+COLL_WALK_RIGHT EQU $41 ; unused
+COLL_WALK_LEFT EQU $42 ; unused
+COLL_WALK_UP EQU $43 ; unused
+COLL_WALK_DOWN EQU $44 ; unused
COLL_BRAKE_45 EQU $45 ; garbage
COLL_BRAKE_46 EQU $46 ; unused
COLL_BRAKE_47 EQU $47 ; unused
@@ -92,16 +92,16 @@ COLL_WINDOW EQU $9d
COLL_INCENSE_BURNER EQU $9f
COLL_HOP_RIGHT EQU $a0
COLL_HOP_LEFT EQU $a1
-COLL_HOP_UP EQU $a2 ; unused !!!
+COLL_HOP_UP EQU $a2 ; unused
COLL_HOP_DOWN EQU $a3
COLL_HOP_DOWN_RIGHT EQU $a4
COLL_HOP_DOWN_LEFT EQU $a5
-COLL_HOP_UP_RIGHT EQU $a6 ; unused !!!
-COLL_HOP_UP_LEFT EQU $a7 ; unused !!!
+COLL_HOP_UP_RIGHT EQU $a6 ; unused
+COLL_HOP_UP_LEFT EQU $a7 ; unused
COLL_RIGHT_WALL EQU $b0
COLL_LEFT_WALL EQU $b1
COLL_UP_WALL EQU $b2
-COLL_DOWN_WALL EQU $b3 ; unused !!!
+COLL_DOWN_WALL EQU $b3 ; unused
COLL_FF EQU $ff ; garbage
; collision data type nybbles
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
index ca468f477..21b379a3d 100644
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -1,13 +1,12 @@
-LEN_1BPP_TILE EQU 8 ; bytes
-LEN_2BPP_TILE EQU 16 ; bytes
-
TILE_WIDTH EQU 8 ; pixels
+LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes
+LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes
NUM_PAL_COLORS EQU 4
-SCREEN_WIDTH EQU 20 ; tiles
+SCREEN_WIDTH EQU 20 ; tiles
SCREEN_HEIGHT EQU 18 ; tiles
-SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
+SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels
BG_MAP_WIDTH EQU 32 ; tiles
@@ -15,9 +14,18 @@ BG_MAP_HEIGHT EQU 32 ; tiles
WMISC_WIDTH EQU 6 * 4
WMISC_HEIGHT EQU 5 * 4
-HP_BAR_LENGTH EQU 6 ; tiles
-HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
+HP_BAR_LENGTH EQU 6 ; tiles
EXP_BAR_LENGTH EQU 8 ; tiles
+HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
PALPACKET_LENGTH EQU $10
+
+; sprite_oam_struct members (see macros/wram.asm)
+ const_def
+ const SPRITEOAMSTRUCT_YCOORD ; 0
+ const SPRITEOAMSTRUCT_XCOORD ; 1
+ const SPRITEOAMSTRUCT_TILE_ID ; 2
+ const SPRITEOAMSTRUCT_ATTRIBUTES ; 3
+SPRITEOAMSTRUCT_LENGTH EQU const_value
+NUM_SPRITE_OAM_STRUCTS EQU 40 ; see Sprites
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
index c315d3cf5..d96672c3a 100644
--- a/constants/hardware_constants.asm
+++ b/constants/hardware_constants.asm
@@ -56,7 +56,7 @@ VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08
OBP_NUM EQU 1 << OAM_OBP_NUM ; $10
X_FLIP EQU 1 << OAM_X_FLIP ; $20
Y_FLIP EQU 1 << OAM_Y_FLIP ; $40
-BEHIND_BG EQU 1 << OAM_PRIORITY ; $80
+PRIORITY EQU 1 << OAM_PRIORITY ; $80
; Other useful constants
LCDC_DEFAULT EQU %11100011
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index c1079e82d..0914e7ab6 100644
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -5,271 +5,295 @@
; - ItemAttributes (see data/items/attributes.asm)
; - ItemEffects (see engine/item_effects.asm)
const_def
- const NO_ITEM ; $00
- const MASTER_BALL ; $01
- const ULTRA_BALL ; $02
- const BRIGHTPOWDER ; $03
- const GREAT_BALL ; $04
- const POKE_BALL ; $05
- const TOWN_MAP ; $06
- const BICYCLE ; $07
- const MOON_STONE ; $08
- const ANTIDOTE ; $09
- const BURN_HEAL ; $0A
- const ICE_HEAL ; $0B
- const AWAKENING ; $0C
- const PARLYZ_HEAL ; $0D
- const FULL_RESTORE ; $0E
- const MAX_POTION ; $0F
- const HYPER_POTION ; $10
- const SUPER_POTION ; $11
- const POTION ; $12
- const ESCAPE_ROPE ; $13
- const REPEL ; $14
- const MAX_ELIXER ; $15
- const FIRE_STONE ; $16
- const THUNDERSTONE ; $17
- const WATER_STONE ; $18
- const ITEM_19 ; $19
- const HP_UP ; $1A
- const PROTEIN ; $1B
- const IRON ; $1C
- const CARBOS ; $1D
- const LUCKY_PUNCH ; $1E
- const CALCIUM ; $1F
- const RARE_CANDY ; $20
- const X_ACCURACY ; $21
- const LEAF_STONE ; $22
- const METAL_POWDER ; $23
- const NUGGET ; $24
- const POKE_DOLL ; $25
- const FULL_HEAL ; $26
- const REVIVE ; $27
- const MAX_REVIVE ; $28
- const GUARD_SPEC ; $29
- const SUPER_REPEL ; $2A
- const MAX_REPEL ; $2B
- const DIRE_HIT ; $2C
- const ITEM_2D ; $2D
- const FRESH_WATER ; $2E
- const SODA_POP ; $2F
- const LEMONADE ; $30
- const X_ATTACK ; $31
- const ITEM_32 ; $32
- const X_DEFEND ; $33
- const X_SPEED ; $34
- const X_SPECIAL ; $35
- const COIN_CASE ; $36
- const ITEMFINDER ; $37
- const POKE_FLUTE ; $38
- const EXP_SHARE ; $39
- const OLD_ROD ; $3A
- const GOOD_ROD ; $3B
- const SILVER_LEAF ; $3C
- const SUPER_ROD ; $3D
- const PP_UP ; $3E
- const ETHER ; $3F
- const MAX_ETHER ; $40
- const ELIXER ; $41
- const RED_SCALE ; $42
- const SECRETPOTION ; $43
- const S_S_TICKET ; $44
- const MYSTERY_EGG ; $45
- const CLEAR_BELL ; $46
- const SILVER_WING ; $47
- const MOOMOO_MILK ; $48
- const QUICK_CLAW ; $49
- const PSNCUREBERRY ; $4A
- const GOLD_LEAF ; $4B
- const SOFT_SAND ; $4C
- const SHARP_BEAK ; $4D
- const PRZCUREBERRY ; $4E
- const BURNT_BERRY ; $4F
- const ICE_BERRY ; $50
- const POISON_BARB ; $51
- const KINGS_ROCK ; $52
- const BITTER_BERRY ; $53
- const MINT_BERRY ; $54
- const RED_APRICORN ; $55
- const TINYMUSHROOM ; $56
- const BIG_MUSHROOM ; $57
- const SILVERPOWDER ; $58
- const BLU_APRICORN ; $59
- const ITEM_5A ; $5A
- const AMULET_COIN ; $5B
- const YLW_APRICORN ; $5C
- const GRN_APRICORN ; $5D
- const CLEANSE_TAG ; $5E
- const MYSTIC_WATER ; $5F
- const TWISTEDSPOON ; $60
- const WHT_APRICORN ; $61
- const BLACKBELT ; $62
- const BLK_APRICORN ; $63
- const ITEM_64 ; $64
- const PNK_APRICORN ; $65
- const BLACKGLASSES ; $66
- const SLOWPOKETAIL ; $67
- const PINK_BOW ; $68
- const STICK ; $69
- const SMOKE_BALL ; $6A
- const NEVERMELTICE ; $6B
- const MAGNET ; $6C
- const MIRACLEBERRY ; $6D
- const PEARL ; $6E
- const BIG_PEARL ; $6F
- const EVERSTONE ; $70
- const SPELL_TAG ; $71
- const RAGECANDYBAR ; $72
- const GS_BALL ; $73
- const BLUE_CARD ; $74
- const MIRACLE_SEED ; $75
- const THICK_CLUB ; $76
- const FOCUS_BAND ; $77
- const ITEM_78 ; $78
- const ENERGYPOWDER ; $79
- const ENERGY_ROOT ; $7A
- const HEAL_POWDER ; $7B
- const REVIVAL_HERB ; $7C
- const HARD_STONE ; $7D
- const LUCKY_EGG ; $7E
- const CARD_KEY ; $7F
- const MACHINE_PART ; $80
- const EGG_TICKET ; $81
- const LOST_ITEM ; $82
- const STARDUST ; $83
- const STAR_PIECE ; $84
- const BASEMENT_KEY ; $85
- const PASS ; $86
- const ITEM_87 ; $87
- const ITEM_88 ; $88
- const ITEM_89 ; $89
- const CHARCOAL ; $8A
- const BERRY_JUICE ; $8B
- const SCOPE_LENS ; $8C
- const ITEM_8D ; $8D
- const ITEM_8E ; $8E
- const METAL_COAT ; $8F
- const DRAGON_FANG ; $90
- const ITEM_91 ; $91
- const LEFTOVERS ; $92
- const ITEM_93 ; $93
- const ITEM_94 ; $94
- const ITEM_95 ; $95
- const MYSTERYBERRY ; $96
- const DRAGON_SCALE ; $97
- const BERSERK_GENE ; $98
- const ITEM_99 ; $99
- const ITEM_9A ; $9A
- const ITEM_9B ; $9B
- const SACRED_ASH ; $9C
- const HEAVY_BALL ; $9D
- const FLOWER_MAIL ; $9E
- const LEVEL_BALL ; $9F
- const LURE_BALL ; $A0
- const FAST_BALL ; $A1
- const ITEM_A2 ; $A2
- const LIGHT_BALL ; $A3
- const FRIEND_BALL ; $A4
- const MOON_BALL ; $A5
- const LOVE_BALL ; $A6
- const NORMAL_BOX ; $A7
- const GORGEOUS_BOX ; $A8
- const SUN_STONE ; $A9
- const POLKADOT_BOW ; $AA
- const ITEM_AB ; $AB
- const UP_GRADE ; $AC
- const BERRY ; $AD
- const GOLD_BERRY ; $AE
- const SQUIRTBOTTLE ; $AF
- const ITEM_B0 ; $B0
- const PARK_BALL ; $B1
- const RAINBOW_WING ; $B2
- const ITEM_B3 ; $B3
- const BRICK_PIECE ; $B4
- const SURF_MAIL ; $B5
- const LITEBLUEMAIL ; $B6
- const PORTRAITMAIL ; $B7
- const LOVELY_MAIL ; $B8
- const EON_MAIL ; $B9
- const MORPH_MAIL ; $BA
- const BLUESKY_MAIL ; $BB
- const MUSIC_MAIL ; $BC
- const MIRAGE_MAIL ; $BD
- const ITEM_BE ; $BE
+ const NO_ITEM ; 00
+ const MASTER_BALL ; 01
+ const ULTRA_BALL ; 02
+ const BRIGHTPOWDER ; 03
+ const GREAT_BALL ; 04
+ const POKE_BALL ; 05
+ const TOWN_MAP ; 06
+ const BICYCLE ; 07
+ const MOON_STONE ; 08
+ const ANTIDOTE ; 09
+ const BURN_HEAL ; 0a
+ const ICE_HEAL ; 0b
+ const AWAKENING ; 0c
+ const PARLYZ_HEAL ; 0d
+ const FULL_RESTORE ; 0e
+ const MAX_POTION ; 0f
+ const HYPER_POTION ; 10
+ const SUPER_POTION ; 11
+ const POTION ; 12
+ const ESCAPE_ROPE ; 13
+ const REPEL ; 14
+ const MAX_ELIXER ; 15
+ const FIRE_STONE ; 16
+ const THUNDERSTONE ; 17
+ const WATER_STONE ; 18
+ const ITEM_19 ; 19
+ const HP_UP ; 1a
+ const PROTEIN ; 1b
+ const IRON ; 1c
+ const CARBOS ; 1d
+ const LUCKY_PUNCH ; 1e
+ const CALCIUM ; 1f
+ const RARE_CANDY ; 20
+ const X_ACCURACY ; 21
+ const LEAF_STONE ; 22
+ const METAL_POWDER ; 23
+ const NUGGET ; 24
+ const POKE_DOLL ; 25
+ const FULL_HEAL ; 26
+ const REVIVE ; 27
+ const MAX_REVIVE ; 28
+ const GUARD_SPEC ; 29
+ const SUPER_REPEL ; 2a
+ const MAX_REPEL ; 2b
+ const DIRE_HIT ; 2c
+ const ITEM_2D ; 2d
+ const FRESH_WATER ; 2e
+ const SODA_POP ; 2f
+ const LEMONADE ; 30
+ const X_ATTACK ; 31
+ const ITEM_32 ; 32
+ const X_DEFEND ; 33
+ const X_SPEED ; 34
+ const X_SPECIAL ; 35
+ const COIN_CASE ; 36
+ const ITEMFINDER ; 37
+ const POKE_FLUTE ; 38
+ const EXP_SHARE ; 39
+ const OLD_ROD ; 3a
+ const GOOD_ROD ; 3b
+ const SILVER_LEAF ; 3c
+ const SUPER_ROD ; 3d
+ const PP_UP ; 3e
+ const ETHER ; 3f
+ const MAX_ETHER ; 40
+ const ELIXER ; 41
+ const RED_SCALE ; 42
+ const SECRETPOTION ; 43
+ const S_S_TICKET ; 44
+ const MYSTERY_EGG ; 45
+ const CLEAR_BELL ; 46
+ const SILVER_WING ; 47
+ const MOOMOO_MILK ; 48
+ const QUICK_CLAW ; 49
+ const PSNCUREBERRY ; 4a
+ const GOLD_LEAF ; 4b
+ const SOFT_SAND ; 4c
+ const SHARP_BEAK ; 4d
+ const PRZCUREBERRY ; 4e
+ const BURNT_BERRY ; 4f
+ const ICE_BERRY ; 50
+ const POISON_BARB ; 51
+ const KINGS_ROCK ; 52
+ const BITTER_BERRY ; 53
+ const MINT_BERRY ; 54
+ const RED_APRICORN ; 55
+ const TINYMUSHROOM ; 56
+ const BIG_MUSHROOM ; 57
+ const SILVERPOWDER ; 58
+ const BLU_APRICORN ; 59
+ const ITEM_5A ; 5a
+ const AMULET_COIN ; 5b
+ const YLW_APRICORN ; 5c
+ const GRN_APRICORN ; 5d
+ const CLEANSE_TAG ; 5e
+ const MYSTIC_WATER ; 5f
+ const TWISTEDSPOON ; 60
+ const WHT_APRICORN ; 61
+ const BLACKBELT ; 62
+ const BLK_APRICORN ; 63
+ const ITEM_64 ; 64
+ const PNK_APRICORN ; 65
+ const BLACKGLASSES ; 66
+ const SLOWPOKETAIL ; 67
+ const PINK_BOW ; 68
+ const STICK ; 69
+ const SMOKE_BALL ; 6a
+ const NEVERMELTICE ; 6b
+ const MAGNET ; 6c
+ const MIRACLEBERRY ; 6d
+ const PEARL ; 6e
+ const BIG_PEARL ; 6f
+ const EVERSTONE ; 70
+ const SPELL_TAG ; 71
+ const RAGECANDYBAR ; 72
+ const GS_BALL ; 73
+ const BLUE_CARD ; 74
+ const MIRACLE_SEED ; 75
+ const THICK_CLUB ; 76
+ const FOCUS_BAND ; 77
+ const ITEM_78 ; 78
+ const ENERGYPOWDER ; 79
+ const ENERGY_ROOT ; 7a
+ const HEAL_POWDER ; 7b
+ const REVIVAL_HERB ; 7c
+ const HARD_STONE ; 7d
+ const LUCKY_EGG ; 7e
+ const CARD_KEY ; 7f
+ const MACHINE_PART ; 80
+ const EGG_TICKET ; 81
+ const LOST_ITEM ; 82
+ const STARDUST ; 83
+ const STAR_PIECE ; 84
+ const BASEMENT_KEY ; 85
+ const PASS ; 86
+ const ITEM_87 ; 87
+ const ITEM_88 ; 88
+ const ITEM_89 ; 89
+ const CHARCOAL ; 8a
+ const BERRY_JUICE ; 8b
+ const SCOPE_LENS ; 8c
+ const ITEM_8D ; 8d
+ const ITEM_8E ; 8e
+ const METAL_COAT ; 8f
+ const DRAGON_FANG ; 90
+ const ITEM_91 ; 91
+ const LEFTOVERS ; 92
+ const ITEM_93 ; 93
+ const ITEM_94 ; 94
+ const ITEM_95 ; 95
+ const MYSTERYBERRY ; 96
+ const DRAGON_SCALE ; 97
+ const BERSERK_GENE ; 98
+ const ITEM_99 ; 99
+ const ITEM_9A ; 9a
+ const ITEM_9B ; 9b
+ const SACRED_ASH ; 9c
+ const HEAVY_BALL ; 9d
+ const FLOWER_MAIL ; 9e
+ const LEVEL_BALL ; 9f
+ const LURE_BALL ; a0
+ const FAST_BALL ; a1
+ const ITEM_A2 ; a2
+ const LIGHT_BALL ; a3
+ const FRIEND_BALL ; a4
+ const MOON_BALL ; a5
+ const LOVE_BALL ; a6
+ const NORMAL_BOX ; a7
+ const GORGEOUS_BOX ; a8
+ const SUN_STONE ; a9
+ const POLKADOT_BOW ; aa
+ const ITEM_AB ; ab
+ const UP_GRADE ; ac
+ const BERRY ; ad
+ const GOLD_BERRY ; ae
+ const SQUIRTBOTTLE ; af
+ const ITEM_B0 ; b0
+ const PARK_BALL ; b1
+ const RAINBOW_WING ; b2
+ const ITEM_B3 ; b3
+ const BRICK_PIECE ; b4
+ const SURF_MAIL ; b5
+ const LITEBLUEMAIL ; b6
+ const PORTRAITMAIL ; b7
+ const LOVELY_MAIL ; b8
+ const EON_MAIL ; b9
+ const MORPH_MAIL ; ba
+ const BLUESKY_MAIL ; bb
+ const MUSIC_MAIL ; bc
+ const MIRAGE_MAIL ; bd
+ const ITEM_BE ; be
+
+add_tm: MACRO
+if !DEF(TM01)
+TM01 = const_value
+ enum_start 1
+endc
+ define _\@_1, "TM_\1"
+ const _\@_1
+ 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
- add_tm CURSE ; $C1
- add_tm ROLLOUT ; $C2
- const ITEM_C3 ; $C3
- add_tm ROAR ; $C4
- add_tm TOXIC ; $C5
- add_tm ZAP_CANNON ; $C6
- add_tm ROCK_SMASH ; $C7
- add_tm PSYCH_UP ; $C8
- add_tm HIDDEN_POWER ; $C9
- add_tm SUNNY_DAY ; $CA
- add_tm SWEET_SCENT ; $CB
- add_tm SNORE ; $CC
- add_tm BLIZZARD ; $CD
- add_tm HYPER_BEAM ; $CE
- add_tm ICY_WIND ; $CF
- add_tm PROTECT ; $D0
- add_tm RAIN_DANCE ; $D1
- add_tm GIGA_DRAIN ; $D2
- add_tm ENDURE ; $D3
- add_tm FRUSTRATION ; $D4
- add_tm SOLARBEAM ; $D5
- add_tm IRON_TAIL ; $D6
- add_tm DRAGONBREATH ; $D7
- add_tm THUNDER ; $D8
- add_tm EARTHQUAKE ; $D9
- add_tm RETURN ; $DA
- add_tm DIG ; $DB
- const ITEM_DC ; $DC
- add_tm PSYCHIC_M ; $DD
- add_tm SHADOW_BALL ; $DE
- add_tm MUD_SLAP ; $DF
- add_tm DOUBLE_TEAM ; $E0
- add_tm ICE_PUNCH ; $E1
- add_tm SWAGGER ; $E2
- add_tm SLEEP_TALK ; $E3
- add_tm SLUDGE_BOMB ; $E4
- add_tm SANDSTORM ; $E5
- add_tm FIRE_BLAST ; $E6
- add_tm SWIFT ; $E7
- add_tm DEFENSE_CURL ; $E8
- add_tm THUNDERPUNCH ; $E9
- add_tm DREAM_EATER ; $EA
- add_tm DETECT ; $EB
- add_tm REST ; $EC
- add_tm ATTRACT ; $ED
- add_tm THIEF ; $EE
- add_tm STEEL_WING ; $EF
- add_tm FIRE_PUNCH ; $F0
- add_tm FURY_CUTTER ; $F1
- add_tm NIGHTMARE ; $F2
+ add_tm DYNAMICPUNCH ; bf
+ add_tm HEADBUTT ; c0
+ add_tm CURSE ; c1
+ add_tm ROLLOUT ; c2
+ const ITEM_C3 ; c3
+ add_tm ROAR ; c4
+ add_tm TOXIC ; c5
+ add_tm ZAP_CANNON ; c6
+ add_tm ROCK_SMASH ; c7
+ add_tm PSYCH_UP ; c8
+ add_tm HIDDEN_POWER ; c9
+ add_tm SUNNY_DAY ; ca
+ add_tm SWEET_SCENT ; cb
+ add_tm SNORE ; cc
+ add_tm BLIZZARD ; cd
+ add_tm HYPER_BEAM ; ce
+ add_tm ICY_WIND ; cf
+ add_tm PROTECT ; d0
+ add_tm RAIN_DANCE ; d1
+ add_tm GIGA_DRAIN ; d2
+ add_tm ENDURE ; d3
+ add_tm FRUSTRATION ; d4
+ add_tm SOLARBEAM ; d5
+ add_tm IRON_TAIL ; d6
+ add_tm DRAGONBREATH ; d7
+ add_tm THUNDER ; d8
+ add_tm EARTHQUAKE ; d9
+ add_tm RETURN ; da
+ add_tm DIG ; db
+ const ITEM_DC ; dc
+ add_tm PSYCHIC_M ; dd
+ add_tm SHADOW_BALL ; de
+ add_tm MUD_SLAP ; df
+ add_tm DOUBLE_TEAM ; e0
+ add_tm ICE_PUNCH ; e1
+ add_tm SWAGGER ; e2
+ add_tm SLEEP_TALK ; e3
+ add_tm SLUDGE_BOMB ; e4
+ add_tm SANDSTORM ; e5
+ add_tm FIRE_BLAST ; e6
+ add_tm SWIFT ; e7
+ add_tm DEFENSE_CURL ; e8
+ add_tm THUNDERPUNCH ; e9
+ add_tm DREAM_EATER ; ea
+ add_tm DETECT ; eb
+ add_tm REST ; ec
+ add_tm ATTRACT ; ed
+ add_tm THIEF ; ee
+ add_tm STEEL_WING ; ef
+ add_tm FIRE_PUNCH ; f0
+ add_tm FURY_CUTTER ; f1
+ add_tm NIGHTMARE ; f2
NUM_TMS = const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
- add_hm CUT ; $F3
- add_hm FLY ; $F4
- add_hm SURF ; $F5
- add_hm STRENGTH ; $F6
- add_hm FLASH ; $F7
- add_hm WHIRLPOOL ; $F8
- add_hm WATERFALL ; $F9
+ add_hm CUT ; f3
+ add_hm FLY ; f4
+ add_hm SURF ; f5
+ add_hm STRENGTH ; f6
+ add_hm FLASH ; f7
+ add_hm WHIRLPOOL ; f8
+ add_hm WATERFALL ; f9
NUM_HMS = const_value - HM01
- const ITEM_FA ; $FA
+ const ITEM_FA ; fa
add_mt FLAMETHROWER
add_mt THUNDERBOLT
add_mt ICE_BEAM
NUM_TM_HM_TUTOR = __enum__ +- 1
-ITEM_FROM_MEM EQU $FF
+USE_SCRIPT_VAR EQU $00
+ITEM_FROM_MEM EQU $ff
; leftovers from red
SAFARI_BALL EQU $08 ; MOON_STONE
-MOON_STONE_RED EQU $0A ; BURN_HEAL
+MOON_STONE_RED EQU $0a ; BURN_HEAL
FULL_HEAL_RED EQU $34 ; X_SPEED
diff --git a/constants/item_data_constants.asm b/constants/item_data_constants.asm
index dfcff9eb0..b3a35d72b 100644
--- a/constants/item_data_constants.asm
+++ b/constants/item_data_constants.asm
@@ -9,21 +9,15 @@
const ITEMATTR_HELP
ITEMATTR_STRUCT_LENGTH EQU const_value
-
-; pack pockets
-ITEM EQU 1
-KEY_ITEM EQU 2
-BALL EQU 3
-TM_HM EQU 4
-
-; pack pocket sizes
-MAX_ITEMS EQU 20
-MAX_KEY_ITEMS EQU 25
-MAX_BALLS EQU 12
-MAX_PC_ITEMS EQU 50
-
+; item types
+const_value set 1
+ const ITEM ; 1
+ const KEY_ITEM ; 2
+ const BALL ; 3
+ const TM_HM ; 4
; item menu types
+; UseItem.dw indexes (see engine/pack.asm)
ITEMMENU_NOUSE EQU 0
ITEMMENU_CURRENT EQU 4
ITEMMENU_PARTY EQU 5
@@ -34,7 +28,22 @@ CANT_SELECT EQU 1 << 6
CANT_TOSS EQU 1 << 7
+; pack pockets
+ const_def
+ const ITEM_POCKET ; 0
+ const BALL_POCKET ; 1
+ const KEY_ITEM_POCKET ; 2
+ const TM_HM_POCKET ; 3
+NUM_POCKETS EQU const_value +- 1
+
+MAX_ITEMS EQU 20
+MAX_BALLS EQU 12
+MAX_KEY_ITEMS EQU 25
+MAX_PC_ITEMS EQU 50
+
+
; mail
+MAIL_LINE_LENGTH EQU $10
MAIL_MSG_LENGTH EQU $20
MAILBOX_CAPACITY EQU 10
MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
@@ -163,8 +172,7 @@ const_value set 70
const MART_UNDERGROUND
-; PartyMenuActionText values
-; GetPartyMenuTilemapPointers arguments (see engine/party_menu.asm)
+; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
const PARTYMENUACTION_HEALING_ITEM
diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm
index 4a15928f0..5f74b3386 100644
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -100,3 +100,14 @@ KANTO_LANDMARK EQU const_value
const TOHJO_FALLS ; 5d
const ROUTE_28 ; 5e
const FAST_SHIP ; 5f
+
+; used in CaughtData
+GIFT_LOCATION EQU $7e
+EVENT_LOCATION EQU $7f
+
+
+; Regions
+ const_def
+ const JOHTO_REGION ; 0
+ const KANTO_REGION ; 1
+NUM_REGIONS EQU const_value
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
index e7580dfb9..d2319dcec 100644
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -18,6 +18,7 @@ ENDM
; - MapGroupPointers (see maps/map_headers.asm)
; - MapGroupRoofs (see data/maps/roofs.asm)
; - OutdoorSprites (see data/maps/outdoor_sprites.asm)
+; - RoofPals (see gfx/tilesets/roofs.pal)
; `mapgroup` indexes are for the sub-tables of MapGroupPointers (see maps/map_headers.asm)
const_def
@@ -351,7 +352,7 @@ ENDM
mapgroup LAVENDER_POKECENTER_1F, 4, 5 ; 5
mapgroup LAVENDER_POKECENTER_2F_BETA, 4, 8 ; 6
mapgroup MR_FUJIS_HOUSE, 4, 5 ; 7
- mapgroup LAVENDER_TOWN_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup LAVENDER_SPEECH_HOUSE, 4, 4 ; 8
mapgroup LAVENDER_NAME_RATER, 4, 4 ; 9
mapgroup LAVENDER_MART, 4, 6 ; 10
mapgroup SOUL_HOUSE, 4, 5 ; 11
@@ -402,7 +403,7 @@ ENDM
mapgroup ROUTE_16_FUCHSIA_SPEECH_HOUSE, 4, 4 ; 23
mapgroup ROUTE_16_GATE, 4, 5 ; 24
mapgroup ROUTE_7_SAFFRON_GATE, 4, 5 ; 25
- mapgroup ROUTE_17_18_GATE, 4, 5 ; 26
+ mapgroup ROUTE_17_ROUTE_18_GATE, 4, 5 ; 26
newgroup ; 22
@@ -413,7 +414,7 @@ ENDM
mapgroup CIANWOOD_GYM, 9, 5 ; 5
mapgroup CIANWOOD_POKECENTER_1F, 4, 5 ; 6
mapgroup CIANWOOD_PHARMACY, 4, 4 ; 7
- mapgroup CIANWOOD_CITY_PHOTO_STUDIO, 4, 4 ; 8
+ mapgroup CIANWOOD_PHOTO_STUDIO, 4, 4 ; 8
mapgroup CIANWOOD_LUGIA_SPEECH_HOUSE, 4, 4 ; 9
mapgroup POKE_SEERS_HOUSE, 4, 4 ; 10
mapgroup BATTLE_TOWER_1F, 5, 8 ; 11
@@ -453,7 +454,7 @@ ENDM
mapgroup ROUTE_26_HEAL_SPEECH_HOUSE, 4, 4 ; 10
mapgroup ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE, 4, 4 ; 11
mapgroup ROUTE_27_SANDSTORM_HOUSE, 4, 4 ; 12
- mapgroup ROUTE_29_46_GATE, 4, 5 ; 13
+ mapgroup ROUTE_29_ROUTE_46_GATE, 4, 5 ; 13
newgroup ; 25
@@ -465,12 +466,12 @@ ENDM
mapgroup SAFFRON_POKECENTER_1F, 4, 5 ; 6
mapgroup SAFFRON_POKECENTER_2F_BETA, 4, 8 ; 7
mapgroup MR_PSYCHICS_HOUSE, 4, 4 ; 8
- mapgroup SAFFRON_TRAIN_STATION, 9, 10 ; 9
+ mapgroup SAFFRON_MAGNET_TRAIN_STATION, 9, 10 ; 9
mapgroup SILPH_CO_1F, 4, 8 ; 10
mapgroup COPYCATS_HOUSE_1F, 4, 4 ; 11
mapgroup COPYCATS_HOUSE_2F, 3, 5 ; 12
mapgroup ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
- mapgroup ROUTE_5_SAFFRON_CITY_GATE, 4, 5 ; 14
+ mapgroup ROUTE_5_SAFFRON_GATE, 4, 5 ; 14
mapgroup ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, 4, 4 ; 15
newgroup ; 26
diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm
index 5a1ec6ede..223220db9 100644
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -102,7 +102,9 @@ const_value set 1
const OBJECT_1E ; 1e
const OBJECT_1F ; 1f
const OBJECT_RANGE ; 20
-; 33-39 are not used
+ ; 21-27 are not used
+OBJECT_STRUCT_LENGTH EQU 40
+NUM_OBJECT_STRUCTS EQU 13 ; see ObjectStructs
; map_object struct members (see macros/wram.asm)
const_def
@@ -140,6 +142,11 @@ SLIDING EQU 3
EMOTE_OBJECT EQU 7
+; see engine/overworld.asm
+MAX_OUTDOOR_SPRITES EQU 23
+SPRITE_GFX_LIST_CAPACITY EQU $20
+
+
; SpawnPoints indexes (see data/maps/spawn_points.asm)
const_value = -1
const SPAWN_N_A
@@ -174,115 +181,3 @@ const_value = -1
const SPAWN_MT_SILVER
const SPAWN_FAST_SHIP
NUM_SPAWNS EQU const_value
-
-
-; TryBGEvent arguments (see engine/events.asm)
- const_def
- const BGEVENT_READ
- const BGEVENT_UP
- const BGEVENT_DOWN
- const BGEVENT_RIGHT
- const BGEVENT_LEFT
- const BGEVENT_IFSET
- const BGEVENT_IFNOTSET
- const BGEVENT_ITEM
- const BGEVENT_COPY
-
-; object_event types
-; TryObjectEvent arguments (see engine/events.asm)
- const_def
- const OBJECTTYPE_SCRIPT
- const OBJECTTYPE_ITEMBALL
- const OBJECTTYPE_TRAINER
- const OBJECTTYPE_3
- const OBJECTTYPE_4
- const OBJECTTYPE_5
- const OBJECTTYPE_6
-
-
-; Emotes indexes (see data/emotes.asm)
- const_def
- const EMOTE_SHOCK ; 0
- const EMOTE_QUESTION ; 1
- const EMOTE_HAPPY ; 2
- const EMOTE_SAD ; 3
- const EMOTE_HEART ; 4
- const EMOTE_BOLT ; 5
- const EMOTE_SLEEP ; 6
- const EMOTE_FISH ; 7
- const EMOTE_SHADOW ; 8
- const EMOTE_ROD ; 9
- const EMOTE_BOULDER_DUST ; 10
- const EMOTE_GRASS_RUSTLE ; 11
-EMOTE_MEM EQU -1
-
-; FruitTreeItems indexes (see data/items/fruit_trees.asm)
-const_value set 1
- const FRUITTREE_ROUTE_29 ; 01
- const FRUITTREE_ROUTE_30_1 ; 02
- const FRUITTREE_ROUTE_38 ; 03
- const FRUITTREE_ROUTE_46_1 ; 04
- const FRUITTREE_ROUTE_30_2 ; 05
- const FRUITTREE_ROUTE_33 ; 06
- const FRUITTREE_ROUTE_31 ; 07
- const FRUITTREE_ROUTE_43 ; 08
- const FRUITTREE_VIOLET_CITY ; 09
- const FRUITTREE_ROUTE_46_2 ; 0a
- const FRUITTREE_ROUTE_35 ; 0b
- const FRUITTREE_ROUTE_45 ; 0c
- const FRUITTREE_ROUTE_36 ; 0d
- const FRUITTREE_ROUTE_26 ; 0e
- const FRUITTREE_ROUTE_39 ; 0f
- const FRUITTREE_ROUTE_44 ; 10
- const FRUITTREE_ROUTE_37_1 ; 11
- const FRUITTREE_ROUTE_37_2 ; 12
- const FRUITTREE_ROUTE_37_3 ; 13
- const FRUITTREE_AZALEA_TOWN ; 14
- const FRUITTREE_ROUTE_42_1 ; 15
- const FRUITTREE_ROUTE_42_2 ; 16
- const FRUITTREE_ROUTE_42_3 ; 17
- const FRUITTREE_ROUTE_11 ; 18
- const FRUITTREE_ROUTE_2 ; 19
- const FRUITTREE_ROUTE_1 ; 1a
- const FRUITTREE_ROUTE_8 ; 1b
- const FRUITTREE_PEWTER_CITY_1 ; 1c
- const FRUITTREE_PEWTER_CITY_2 ; 1d
- const FRUITTREE_FUCHSIA_CITY ; 1e
-NUM_FRUIT_TREES EQU const_value +- 1
-
-
-; elevator floors
-; used by `elevfloor`
- const_def
- const FLOOR_B4F
- const FLOOR_B3F
- const FLOOR_B2F
- const FLOOR_B1F
- const FLOOR_1F
- const FLOOR_2F
- const FLOOR_3F
- const FLOOR_4F
- const FLOOR_5F
- const FLOOR_6F
- const FLOOR_7F
- const FLOOR_8F
- const FLOOR_9F
- const FLOOR_10F
- const FLOOR_11F
- const FLOOR_ROOF
-
-; command queue members
-CMDQUEUE_TYPE EQU 0
-CMDQUEUE_ADDR EQU 1
-CMDQUEUE_03 EQU 3
-CMDQUEUE_04 EQU 4
-CMDQUEUE_05 EQU 5
-CMDQUEUE_ENTRY_SIZE EQU 6
-CMDQUEUE_CAPACITY EQU 4
-
-; command queue types
-CMDQUEUE_STONETABLE EQU 2
-
-; see engine/overworld.asm
-MAX_OUTDOOR_SPRITES EQU 23
-SPRITE_GFX_LIST_CAPACITY EQU $20
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index 6289b610c..14c6b313f 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -16,6 +16,9 @@ HP_GREEN EQU 0
HP_YELLOW EQU 1
HP_RED EQU 2
+; G/S version ID: 0 = Gold, 1 = Silver (used by checkver)
+GS_VERSION EQU 0
+
; save file corruption check values
SAVE_CHECK_VALUE_1 EQU 99
SAVE_CHECK_VALUE_2 EQU 127
@@ -83,3 +86,10 @@ const_value = 1
; day-care
MAX_DAY_CARE_EXP EQU $500000
+
+; bug-catching contest
+BUG_CONTEST_MINUTES EQU 20
+BUG_CONTEST_SECONDS EQU 0
+BUG_CONTEST_PLAYER EQU 1
+NUM_BUG_CONTESTANTS EQU 10 ; not counting the player
+BUG_CONTESTANT_SIZE EQU 4
diff --git a/constants/music_constants.asm b/constants/music_constants.asm
index 453bf9098..e0d3dcaa3 100644
--- a/constants/music_constants.asm
+++ b/constants/music_constants.asm
@@ -111,6 +111,10 @@
; GetMapHeaderMusic picks music for this value (see home/map.asm)
MUSIC_MAHOGANY_MART EQU $64
+; ExitPokegearRadio_HandleMusic uses these values
+RESTART_MAP_MUSIC EQU $fe
+ENTER_MAP_MUSIC EQU $ff
+
; GetMapHeaderMusic picks music for this bit flag
RADIO_TOWER_MUSIC_F EQU 7
RADIO_TOWER_MUSIC EQU 1 << RADIO_TOWER_MUSIC_F
diff --git a/constants/npctrade_constants.asm b/constants/npctrade_constants.asm
index 2da4abd64..5464e4dbb 100644
--- a/constants/npctrade_constants.asm
+++ b/constants/npctrade_constants.asm
@@ -19,3 +19,25 @@ TRADE_PADDING EQU 31
const NPCTRADE_CHRIS ; 4
const NPCTRADE_KIM ; 5
const NPCTRADE_FOREST ; 6
+
+; trade gender limits
+TRADE_EITHER_GENDER EQU 0
+TRADE_MALE_ONLY EQU 1
+TRADE_FEMALE_ONLY EQU 2
+
+; TradeTexts indexes (see engine/npctrade.asm)
+
+; trade dialogs
+ const_def
+ const TRADE_INTRO
+ const TRADE_CANCEL
+ const TRADE_WRONG
+ const TRADE_COMPLETE
+ const TRADE_AFTER
+
+; trade dialog sets
+ const_def
+ const TRADE_DIALOG_COLLECTOR
+ const TRADE_DIALOG_HAPPY
+ const TRADE_DIALOG_NEWBIE
+ const TRADE_DIALOG_GIRL
diff --git a/constants/phone_constants.asm b/constants/phone_constants.asm
index b2312ab4b..058772f2d 100644
--- a/constants/phone_constants.asm
+++ b/constants/phone_constants.asm
@@ -1,4 +1,4 @@
-; PhoneContacts indexes (see data/phone_contacts.asm)
+; PhoneContacts indexes (see data/phone/phone_contacts.asm)
const_def
const PHONE_00
const PHONE_MOM
@@ -39,7 +39,7 @@
const PHONE_PICNICKER_ERIN
const PHONE_BUENA
-; SpecialPhoneCallList indexes (see data/phone_special.asm)
+; SpecialPhoneCallList indexes (see data/phone/special_calls.asm)
const_def
const SPECIALCALL_NONE
const SPECIALCALL_POKERUS
diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm
index d52086b08..d4c49c5f5 100644
--- a/constants/pokemon_constants.asm
+++ b/constants/pokemon_constants.asm
@@ -10,14 +10,14 @@
; - PokemonPalettes (see data/pokemon/palettes.asm)
; - PokedexDataPointerTable (see data/pokemon/dex_entry_pointers.asm)
; - AlphabeticalPokedexOrder (see data/pokemon/dex_order_alpha.asm)
+; - EZChat_SortedPokemon (see data/pokemon/ezchat_order.asm)
; - NewPokedexOrder (see data/pokemon/dex_order_new.asm)
-; - Pokered_MonIndices (see data/time_capsule/mon_order.asm)
+; - Pokered_MonIndices (see data/pokemon/rby_order.asm)
; - AnimationPointers (see gfx/pokemon/anim_pointers.asm)
; - AnimationIdlePointers (see gfx/pokemon/idle_pointers.asm)
; - BitmasksPointers (see gfx/pokemon/bitmask_pointers.asm)
; - FramesPointers (see gfx/pokemon/frame_pointers.asm)
; - Footprints (see gfx/footprints.asm)
-; - SortedPokemon (see mobile/fixed_words.asm)
const_value set 1
const BULBASAUR ; 01
const IVYSAUR ; 02
@@ -170,6 +170,7 @@ const_value set 1
const DRAGONITE ; 95
const MEWTWO ; 96
const MEW ; 97
+JOHTO_POKEMON EQU const_value
const CHIKORITA ; 98
const BAYLEEF ; 99
const MEGANIUM ; 9a
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index 6e8c2d322..65dd35fd0 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -63,6 +63,10 @@ const_value set 1
const NO_EGGS ; f
+; pokedex entries (see data/pokemon/dex_entries.asm)
+NUM_DEX_ENTRY_BANKS EQU 4
+
+
; party_struct members (see macros/wram.asm)
MON_SPECIES EQUS "(PartyMon1Species - PartyMon1)"
MON_ITEM EQUS "(PartyMon1Item - PartyMon1)"
@@ -98,6 +102,21 @@ PARTYMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1)"
REDMON_STRUCT_LENGTH EQU 44
+; caught data
+
+CAUGHT_TIME_MASK EQU %11000000
+CAUGHT_LEVEL_MASK EQU %00111111
+
+CAUGHT_GENDER_MASK EQU %10000000
+CAUGHT_LOCATION_MASK EQU %01111111
+
+CAUGHT_BY_UNKNOWN EQU 0
+CAUGHT_BY_GIRL EQU 1
+CAUGHT_BY_BOY EQU 2
+
+CAUGHT_EGG_LEVEL EQU 1
+
+
; maximum number of party pokemon
PARTY_LENGTH EQU 6
@@ -123,32 +142,6 @@ const_value set 1
const ATK_EQ_DEF
-; significant happiness values
-BASE_HAPPINESS EQU 70
-FRIEND_BALL_HAPPINESS EQU 200
-HAPPINESS_TO_EVOLVE EQU 220
-HAPPINESS_THRESHOLD_1 EQU 100
-HAPPINESS_THRESHOLD_2 EQU 200
-
-
-; wild data
-
-NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size
-NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size
-
-GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2
-WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2
-
-
-; swarms
-
-SWARM_DUNSPARCE EQU 0
-SWARM_YANMA EQU 1
-
-FISHSWARM_QWILFISH EQU 1
-FISHSWARM_REMORAID EQU 2
-
-
; PokeAnims indexes (see engine/pic_animation.asm)
const_def
const ANIM_MON_SLOW
@@ -161,6 +154,7 @@ FISHSWARM_REMORAID EQU 2
const ANIM_MON_EGG1
const ANIM_MON_EGG2
+
; MonMenuOptions indexes (see engine/mon_menu.asm)
const_value set 1
; moves
@@ -192,3 +186,55 @@ MONMENU_FIELD_MOVE EQU 0
MONMENU_MENUOPTION EQU 1
NUM_MONMENU_ITEMS EQU 8
+
+
+; treemon sets
+; TreeMons indexes (see data/wild/treemons.asm)
+ const_def
+ const TREEMON_SET_CITY
+ const TREEMON_SET_CANYON
+ const TREEMON_SET_AZALEA
+ const TREEMON_SET_ROUTE
+ const TREEMON_SET_KANTO
+ const TREEMON_SET_LAKE
+ const TREEMON_SET_FOREST
+ const TREEMON_SET_ROCK
+NUM_TREEMON_SETS EQU const_value
+
+; treemon scores
+ const_def
+ const TREEMON_SCORE_BAD ; 0
+ const TREEMON_SCORE_GOOD ; 1
+ const TREEMON_SCORE_RARE ; 2
+
+
+; wild data
+
+NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size
+NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size
+
+GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2
+WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2
+
+
+; swarms
+
+SWARM_DUNSPARCE EQU 0
+SWARM_YANMA EQU 1
+
+FISHSWARM_QWILFISH EQU 1
+FISHSWARM_REMORAID EQU 2
+
+
+; significant happiness values
+BASE_HAPPINESS EQU 70
+FRIEND_BALL_HAPPINESS EQU 200
+HAPPINESS_TO_EVOLVE EQU 220
+HAPPINESS_THRESHOLD_1 EQU 100
+HAPPINESS_THRESHOLD_2 EQU 200
+
+
+; PP
+PP_UP_MASK EQU %11000000
+PP_UP_ONE EQU %01000000
+PP_MASK EQU %00111111
diff --git a/constants/radio_constants.asm b/constants/radio_constants.asm
index 86817081e..03d4ede5a 100644
--- a/constants/radio_constants.asm
+++ b/constants/radio_constants.asm
@@ -1,93 +1,98 @@
-; PlayRadioShow arguments, RadioJumptable indexes (see engine/radio.asm)
+; radio channel ids
+; indexes for:
+; - RadioChannelSongs (see data/radio/channel_music.asm)
+; - PlayRadioShow/RadioJumptable (see engine/radio.asm)
+; - RadioChannels (see engine/radio.asm)
const_def
- const OAKS_POKEMON_TALK ; $00
- const POKEDEX_SHOW ; $01
- const POKEMON_MUSIC ; $02
- const LUCKY_CHANNEL ; $03
- const BUENAS_PASSWORD ; $04
- const PLACES_AND_PEOPLE ; $05
- const LETS_ALL_SING ; $06
- const ROCKET_RADIO ; $07
- const POKE_FLUTE_RADIO ; $08
- const UNOWN_RADIO ; $09
- const EVOLUTION_RADIO ; $0a
- const OAKS_POKEMON_TALK_2 ; $0b
- const OAKS_POKEMON_TALK_3 ; $0c
- const OAKS_POKEMON_TALK_4 ; $0d
- const OAKS_POKEMON_TALK_5 ; $0e
- const OAKS_POKEMON_TALK_6 ; $0f
- const OAKS_POKEMON_TALK_7 ; $10
- const OAKS_POKEMON_TALK_8 ; $11
- const OAKS_POKEMON_TALK_9 ; $12
- const POKEDEX_SHOW_2 ; $13
- const POKEDEX_SHOW_3 ; $14
- const POKEDEX_SHOW_4 ; $15
- const POKEDEX_SHOW_5 ; $16
- const POKEMON_MUSIC_2 ; $17
- const POKEMON_MUSIC_3 ; $18
- const POKEMON_MUSIC_4 ; $19
- const POKEMON_MUSIC_5 ; $1a
- const POKEMON_MUSIC_6 ; $1b
- const POKEMON_MUSIC_7 ; $1c
- const LETS_ALL_SING_2 ; $1d
- const LUCKY_NUMBER_SHOW_2 ; $1e
- const LUCKY_NUMBER_SHOW_3 ; $1f
- const LUCKY_NUMBER_SHOW_4 ; $20
- const LUCKY_NUMBER_SHOW_5 ; $21
- const LUCKY_NUMBER_SHOW_6 ; $22
- const LUCKY_NUMBER_SHOW_7 ; $23
- const LUCKY_NUMBER_SHOW_8 ; $24
- const LUCKY_NUMBER_SHOW_9 ; $25
- const LUCKY_NUMBER_SHOW_10 ; $26
- const LUCKY_NUMBER_SHOW_11 ; $27
- const LUCKY_NUMBER_SHOW_12 ; $28
- const LUCKY_NUMBER_SHOW_13 ; $29
- const LUCKY_NUMBER_SHOW_14 ; $2a
- const LUCKY_NUMBER_SHOW_15 ; $2b
- const PLACES_AND_PEOPLE_2 ; $2c
- const PLACES_AND_PEOPLE_3 ; $2d
- const PLACES_AND_PEOPLE_4 ; $2e
- const PLACES_AND_PEOPLE_5 ; $2f
- const PLACES_AND_PEOPLE_6 ; $30
- const PLACES_AND_PEOPLE_7 ; $31
- const ROCKET_RADIO_2 ; $32
- const ROCKET_RADIO_3 ; $33
- const ROCKET_RADIO_4 ; $34
- const ROCKET_RADIO_5 ; $35
- const ROCKET_RADIO_6 ; $36
- const ROCKET_RADIO_7 ; $37
- const ROCKET_RADIO_8 ; $38
- const ROCKET_RADIO_9 ; $39
- const ROCKET_RADIO_10 ; $3a
- const OAKS_POKEMON_TALK_10 ; $3b
- const OAKS_POKEMON_TALK_11 ; $3c
- const OAKS_POKEMON_TALK_12 ; $3d
- const OAKS_POKEMON_TALK_13 ; $3e
- const OAKS_POKEMON_TALK_14 ; $3f
- const BUENAS_PASSWORD_2 ; $40
- const BUENAS_PASSWORD_3 ; $41
- const BUENAS_PASSWORD_4 ; $42
- const BUENAS_PASSWORD_5 ; $43
- const BUENAS_PASSWORD_6 ; $44
- const BUENAS_PASSWORD_7 ; $45
- const BUENAS_PASSWORD_8 ; $46
- const BUENAS_PASSWORD_9 ; $47
- const BUENAS_PASSWORD_10 ; $48
- const BUENAS_PASSWORD_11 ; $49
- const BUENAS_PASSWORD_12 ; $4a
- const BUENAS_PASSWORD_13 ; $4b
- const BUENAS_PASSWORD_14 ; $4c
- const BUENAS_PASSWORD_15 ; $4d
- const BUENAS_PASSWORD_16 ; $4e
- const BUENAS_PASSWORD_17 ; $4f
- const BUENAS_PASSWORD_18 ; $50
- const BUENAS_PASSWORD_19 ; $51
- const BUENAS_PASSWORD_20 ; $52
- const BUENAS_PASSWORD_21 ; $53
- const RADIO_SCROLL ; $54
- const POKEDEX_SHOW_6 ; $55
- const POKEDEX_SHOW_7 ; $56
- const POKEDEX_SHOW_8 ; $57
+ const OAKS_POKEMON_TALK ; 00
+ const POKEDEX_SHOW ; 01
+ const POKEMON_MUSIC ; 02
+ const LUCKY_CHANNEL ; 03
+ const BUENAS_PASSWORD ; 04
+ const PLACES_AND_PEOPLE ; 05
+ const LETS_ALL_SING ; 06
+ const ROCKET_RADIO ; 07
+ const POKE_FLUTE_RADIO ; 08
+ const UNOWN_RADIO ; 09
+ const EVOLUTION_RADIO ; 0a
+; internal indexes for channel segments
+ const OAKS_POKEMON_TALK_2 ; 0b
+ const OAKS_POKEMON_TALK_3 ; 0c
+ const OAKS_POKEMON_TALK_4 ; 0d
+ const OAKS_POKEMON_TALK_5 ; 0e
+ const OAKS_POKEMON_TALK_6 ; 0f
+ const OAKS_POKEMON_TALK_7 ; 10
+ const OAKS_POKEMON_TALK_8 ; 11
+ const OAKS_POKEMON_TALK_9 ; 12
+ const POKEDEX_SHOW_2 ; 13
+ const POKEDEX_SHOW_3 ; 14
+ const POKEDEX_SHOW_4 ; 15
+ const POKEDEX_SHOW_5 ; 16
+ const POKEMON_MUSIC_2 ; 17
+ const POKEMON_MUSIC_3 ; 18
+ const POKEMON_MUSIC_4 ; 19
+ const POKEMON_MUSIC_5 ; 1a
+ const POKEMON_MUSIC_6 ; 1b
+ const POKEMON_MUSIC_7 ; 1c
+ const LETS_ALL_SING_2 ; 1d
+ const LUCKY_NUMBER_SHOW_2 ; 1e
+ const LUCKY_NUMBER_SHOW_3 ; 1f
+ const LUCKY_NUMBER_SHOW_4 ; 20
+ const LUCKY_NUMBER_SHOW_5 ; 21
+ const LUCKY_NUMBER_SHOW_6 ; 22
+ const LUCKY_NUMBER_SHOW_7 ; 23
+ const LUCKY_NUMBER_SHOW_8 ; 24
+ const LUCKY_NUMBER_SHOW_9 ; 25
+ const LUCKY_NUMBER_SHOW_10 ; 26
+ const LUCKY_NUMBER_SHOW_11 ; 27
+ const LUCKY_NUMBER_SHOW_12 ; 28
+ const LUCKY_NUMBER_SHOW_13 ; 29
+ const LUCKY_NUMBER_SHOW_14 ; 2a
+ const LUCKY_NUMBER_SHOW_15 ; 2b
+ const PLACES_AND_PEOPLE_2 ; 2c
+ const PLACES_AND_PEOPLE_3 ; 2d
+ const PLACES_AND_PEOPLE_4 ; 2e
+ const PLACES_AND_PEOPLE_5 ; 2f
+ const PLACES_AND_PEOPLE_6 ; 30
+ const PLACES_AND_PEOPLE_7 ; 31
+ const ROCKET_RADIO_2 ; 32
+ const ROCKET_RADIO_3 ; 33
+ const ROCKET_RADIO_4 ; 34
+ const ROCKET_RADIO_5 ; 35
+ const ROCKET_RADIO_6 ; 36
+ const ROCKET_RADIO_7 ; 37
+ const ROCKET_RADIO_8 ; 38
+ const ROCKET_RADIO_9 ; 39
+ const ROCKET_RADIO_10 ; 3a
+ const OAKS_POKEMON_TALK_10 ; 3b
+ const OAKS_POKEMON_TALK_11 ; 3c
+ const OAKS_POKEMON_TALK_12 ; 3d
+ const OAKS_POKEMON_TALK_13 ; 3e
+ const OAKS_POKEMON_TALK_14 ; 3f
+ const BUENAS_PASSWORD_2 ; 40
+ const BUENAS_PASSWORD_3 ; 41
+ const BUENAS_PASSWORD_4 ; 42
+ const BUENAS_PASSWORD_5 ; 43
+ const BUENAS_PASSWORD_6 ; 44
+ const BUENAS_PASSWORD_7 ; 45
+ const BUENAS_PASSWORD_8 ; 46
+ const BUENAS_PASSWORD_9 ; 47
+ const BUENAS_PASSWORD_10 ; 48
+ const BUENAS_PASSWORD_11 ; 49
+ const BUENAS_PASSWORD_12 ; 4a
+ const BUENAS_PASSWORD_13 ; 4b
+ const BUENAS_PASSWORD_14 ; 4c
+ const BUENAS_PASSWORD_15 ; 4d
+ const BUENAS_PASSWORD_16 ; 4e
+ const BUENAS_PASSWORD_17 ; 4f
+ const BUENAS_PASSWORD_18 ; 50
+ const BUENAS_PASSWORD_19 ; 51
+ const BUENAS_PASSWORD_20 ; 52
+ const BUENAS_PASSWORD_21 ; 53
+ const RADIO_SCROLL ; 54
+ const POKEDEX_SHOW_6 ; 55
+ const POKEDEX_SHOW_7 ; 56
+ const POKEDEX_SHOW_8 ; 57
; PlayRadio arguments (see engine/pokegear.asm)
const_def
@@ -101,23 +106,18 @@
const MAPRADIO_LETS_ALL_SING
const MAPRADIO_ROCKET
-; PasswordTable indexes (see engine/radio.asm)
- const_def
- const BUENA_STARTERS
- const BUENA_DRINKS
- const BUENA_ITEMS
- const BUENA_BALLS
- const BUENA_MON1
- const BUENA_MON2
- const BUENA_TOWNS
- const BUENA_TYPES
- const BUENA_MOVES
- const BUENA_XITEMS
- const BUENA_STATIONS
-NUM_PASSWORD_CATEGORIES EQU const_value
-NUM_PASSWORDS_PER_CATEGORY EQU 3
+; These tables in engine/radio.asm are all sized to a power of 2
+; so there's no need for a rejection sampling loop
+NUM_OAKS_MON_TALK_ADVERBS EQU 16 ; OaksPkmnTalk8.Adverbs
+NUM_OAKS_MON_TALK_ADJECTIVES EQU 16 ; OaksPkmnTalk9.Adjectives
+NUM_PNP_PEOPLE_ADJECTIVES EQU 16 ; PeoplePlaces5.Adjectives
+NUM_PNP_PLACES_ADJECTIVES EQU 16 ; PeoplePlaces7.Adjectives
+
+; BuenasPasswordTable sizes (see data/radio/buenas_passwords.asm)
+NUM_PASSWORD_CATEGORIES EQU 11
+NUM_PASSWORDS_PER_CATEGORY EQU 3
-; PasswordTable string types (see engine/radio.asm)
+; GetBuenasPassword.StringFunctionJumpTable indexes (see engine/radio.asm)
const_def
const BUENA_MON
const BUENA_ITEM
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
index 9f7dae6d2..fd5affce6 100644
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -2,7 +2,43 @@
PLAYER EQU 0
LAST_TALKED EQU -2
-; GetVarAction arguments (see engine/variables.asm)
+
+; memory constants
+ const_def
+ const MEM_BUFFER_0 ; use StringBuffer3
+ const MEM_BUFFER_1 ; use StringBuffer4
+ const MEM_BUFFER_2 ; use StringBuffer5
+NUM_MEM_BUFFERS EQU const_value
+
+
+; checkmoney/takemoney accounts
+ const_def
+ const YOUR_MONEY ; 0
+ const MOMS_MONEY ; 1
+
+; checkmoney/checkcoins return values
+ const_def
+ const HAVE_MORE ; 0
+ const HAVE_AMOUNT ; 1
+ const HAVE_LESS ; 2
+
+; checkpokeitem return values
+ const_def
+ const POKEMAIL_WRONG_MAIL ; 0
+ const POKEMAIL_CORRECT ; 1
+ const POKEMAIL_REFUSED ; 2
+ const POKEMAIL_NO_MAIL ; 3
+ const POKEMAIL_LAST_MON ; 4
+
+; askforphonenumber return values
+ const_def
+ const PHONE_CONTACT_GOT ; 0
+ const PHONE_CONTACTS_FULL ; 1
+ const PHONE_CONTACT_REFUSED ; 2
+
+
+; writecode/checkcode arguments
+; _GetVarAction.VarActionTable indexes (see engine/variables.asm)
const_def
const VAR_STRINGBUFFER2 ; 00
const VAR_PARTYCOUNT ; 01
@@ -38,6 +74,7 @@ RETVAR_STRBUF2 EQU (0 << 6)
RETVAR_ADDR_DE EQU (1 << 6)
RETVAR_EXECUTE EQU (2 << 6)
+
; PlayerEventScriptPointers indexes (see engine/events.asm)
const_value set -1
const PLAYEREVENT_MAPSCRIPT
@@ -52,3 +89,183 @@ const_value set -1
const PLAYEREVENT_HATCH
const PLAYEREVENT_JOYCHANGEFACING
NUM_PLAYER_EVENTS EQU const_value
+
+
+; TryBGEvent arguments (see engine/events.asm)
+ const_def
+ const BGEVENT_READ
+ const BGEVENT_UP
+ const BGEVENT_DOWN
+ const BGEVENT_RIGHT
+ const BGEVENT_LEFT
+ const BGEVENT_IFSET
+ const BGEVENT_IFNOTSET
+ const BGEVENT_ITEM
+ const BGEVENT_COPY
+
+; object_event types
+; TryObjectEvent arguments (see engine/events.asm)
+ const_def
+ const OBJECTTYPE_SCRIPT
+ const OBJECTTYPE_ITEMBALL
+ const OBJECTTYPE_TRAINER
+ const OBJECTTYPE_3
+ const OBJECTTYPE_4
+ const OBJECTTYPE_5
+ const OBJECTTYPE_6
+
+
+; showemote arguments
+; Emotes indexes (see data/sprites/emotes.asm)
+ const_def
+ const EMOTE_SHOCK ; 0
+ const EMOTE_QUESTION ; 1
+ const EMOTE_HAPPY ; 2
+ const EMOTE_SAD ; 3
+ const EMOTE_HEART ; 4
+ const EMOTE_BOLT ; 5
+ const EMOTE_SLEEP ; 6
+ const EMOTE_FISH ; 7
+ const EMOTE_SHADOW ; 8
+ const EMOTE_ROD ; 9
+ const EMOTE_BOULDER_DUST ; 10
+ const EMOTE_GRASS_RUSTLE ; 11
+EMOTE_MEM EQU -1
+
+
+; fruittree arguments
+; FruitTreeItems indexes (see data/items/fruit_trees.asm)
+const_value set 1
+ const FRUITTREE_ROUTE_29 ; 01
+ const FRUITTREE_ROUTE_30_1 ; 02
+ const FRUITTREE_ROUTE_38 ; 03
+ const FRUITTREE_ROUTE_46_1 ; 04
+ const FRUITTREE_ROUTE_30_2 ; 05
+ const FRUITTREE_ROUTE_33 ; 06
+ const FRUITTREE_ROUTE_31 ; 07
+ const FRUITTREE_ROUTE_43 ; 08
+ const FRUITTREE_VIOLET_CITY ; 09
+ const FRUITTREE_ROUTE_46_2 ; 0a
+ const FRUITTREE_ROUTE_35 ; 0b
+ const FRUITTREE_ROUTE_45 ; 0c
+ const FRUITTREE_ROUTE_36 ; 0d
+ const FRUITTREE_ROUTE_26 ; 0e
+ const FRUITTREE_ROUTE_39 ; 0f
+ const FRUITTREE_ROUTE_44 ; 10
+ const FRUITTREE_ROUTE_37_1 ; 11
+ const FRUITTREE_ROUTE_37_2 ; 12
+ const FRUITTREE_ROUTE_37_3 ; 13
+ const FRUITTREE_AZALEA_TOWN ; 14
+ const FRUITTREE_ROUTE_42_1 ; 15
+ const FRUITTREE_ROUTE_42_2 ; 16
+ const FRUITTREE_ROUTE_42_3 ; 17
+ const FRUITTREE_ROUTE_11 ; 18
+ const FRUITTREE_ROUTE_2 ; 19
+ const FRUITTREE_ROUTE_1 ; 1a
+ const FRUITTREE_ROUTE_8 ; 1b
+ const FRUITTREE_PEWTER_CITY_1 ; 1c
+ const FRUITTREE_PEWTER_CITY_2 ; 1d
+ const FRUITTREE_FUCHSIA_CITY ; 1e
+NUM_FRUIT_TREES EQU const_value +- 1
+
+
+; describedecoration arguments
+; DescribeDecoration.JumpTable indexes (see engine/decorations.asm)
+ const_def
+ const DECODESC_POSTER ; 0
+ const DECODESC_LEFT_DOLL ; 1
+ const DECODESC_RIGHT_DOLL ; 2
+ const DECODESC_BIG_DOLL ; 3
+ const DECODESC_CONSOLE ; 4
+
+
+; elevfloor macro values
+; ElevatorFloorNames indexes (see data/elevator_floors.asm)
+ const_def
+ const FLOOR_B4F
+ const FLOOR_B3F
+ const FLOOR_B2F
+ const FLOOR_B1F
+ const FLOOR_1F
+ const FLOOR_2F
+ const FLOOR_3F
+ const FLOOR_4F
+ const FLOOR_5F
+ const FLOOR_6F
+ const FLOOR_7F
+ const FLOOR_8F
+ const FLOOR_9F
+ const FLOOR_10F
+ const FLOOR_11F
+ const FLOOR_ROOF
+
+
+; command queue members
+CMDQUEUE_TYPE EQU 0
+CMDQUEUE_ADDR EQU 1
+CMDQUEUE_03 EQU 3
+CMDQUEUE_04 EQU 4
+CMDQUEUE_05 EQU 5
+CMDQUEUE_ENTRY_SIZE EQU 6
+CMDQUEUE_CAPACITY EQU 4
+
+; command queue types
+CMDQUEUE_STONETABLE EQU 2
+
+
+; SpecialGameboyCheck return values
+ const_def
+ const GBCHECK_GB ; 0
+ const GBCHECK_SGB ; 1
+ const GBCHECK_CGB ; 2
+
+; Special_CheckMagikarpLength return values
+ const_def
+ const MAGIKARPLENGTH_NOT_MAGIKARP ; 0
+ const MAGIKARPLENGTH_REFUSED ; 1
+ const MAGIKARPLENGTH_TOO_SHORT ; 2
+ const MAGIKARPLENGTH_BEAT_RECORD ; 3
+
+; SpecialReturnShuckle return values
+ const_def
+ const SHUCKIE_WRONG_MON ; 0
+ const SHUCKIE_REFUSED ; 1
+ const SHUCKIE_RETURNED ; 2
+ const SHUCKIE_HAPPY ; 3
+ const SHUCKIE_FAINTED ; 4
+
+; CheckPartyFullAfterContest return values
+ const_def
+ const BUGCONTEST_CAUGHT_MON ; 0
+ const BUGCONTEST_BOXED_MON ; 1
+ const BUGCONTEST_NO_CATCH ; 2
+
+; HealMachineAnim writebyte arguments
+; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm)
+ const_def
+ const HEALMACHINE_POKECENTER ; 0
+ const HEALMACHINE_ELMS_LAB ; 1
+ const HEALMACHINE_HALL_OF_FAME ; 2
+
+; Special_UnownPuzzle writebyte arguments
+; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/unown_puzzle.asm)
+ const_def
+ const UNOWNPUZZLE_KABUTO ; 0
+ const UNOWNPUZZLE_OMANYTE ; 1
+ const UNOWNPUZZLE_AERODACTYL ; 2
+ const UNOWNPUZZLE_HO_OH ; 3
+NUM_UNOWN_PUZZLES EQU const_value
+
+; Special_DisplayUnownWords writebyte arguments
+; UnownWalls and MenuDataHeaders_UnownWalls indexes (see data/unown_walls.asm)
+ const_def
+ const UNOWNWORDS_ESCAPE ; 0
+ const UNOWNWORDS_LIGHT ; 1
+ const UNOWNWORDS_WATER ; 2
+ const UNOWNWORDS_HO_OH ; 3
+
+; Special_MoveTutor writebyte arguments
+const_value set 1
+ const MOVETUTOR_FLAMETHROWER ; 1
+ const MOVETUTOR_THUNDERBOLT ; 2
+ const MOVETUTOR_ICE_BEAM ; 3
diff --git a/constants/sprite_anim_constants.asm b/constants/sprite_anim_constants.asm
index 8bb2aed35..5692c6efc 100644
--- a/constants/sprite_anim_constants.asm
+++ b/constants/sprite_anim_constants.asm
@@ -16,301 +16,303 @@
const SPRITEANIMSTRUCT_0D ; d
const SPRITEANIMSTRUCT_0E ; e
const SPRITEANIMSTRUCT_0F ; f
+SPRITEANIMSTRUCT_LENGTH EQU const_value
+NUM_SPRITE_ANIM_STRUCTS EQU 10 ; see wSpriteAnimationStructs
; SpriteAnimSeqData indexes (see data/sprite_anims/sequences.asm)
const_def
- const SPRITE_ANIM_INDEX_PARTY_MON ; 00
- const SPRITE_ANIM_INDEX_GS_TITLE_TRAIL ; 01
- const SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR ; 02
- const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO ; 03
- const SPRITE_ANIM_INDEX_GS_INTRO_STAR ; 04
- const SPRITE_ANIM_INDEX_GS_INTRO_SPARKLE ; 05
- const SPRITE_ANIM_INDEX_SLOTS_GOLEM ; 06
- const SPRITE_ANIM_INDEX_SLOTS_CHANSEY ; 07
- const SPRITE_ANIM_INDEX_SLOTS_EGG ; 08
- const SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR ; 09
- const SPRITE_ANIM_INDEX_RED_WALK ; 0a
- const SPRITE_ANIM_INDEX_UNUSED_CURSOR ; 0b
- const SPRITE_ANIM_INDEX_DUMMY_GAME ; 0c
- const SPRITE_ANIM_INDEX_POKEGEAR_ARROW ; 0d
- const SPRITE_ANIM_INDEX_TRADE_POKE_BALL ; 0e
- const SPRITE_ANIM_INDEX_TRADE_POOF ; 0f
- const SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE ; 10
- const SPRITE_ANIM_INDEX_TRADEMON_ICON ; 11
- const SPRITE_ANIM_INDEX_TRADEMON_BUBBLE ; 12
- const SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT ; 13
- const SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB ; 14
- const SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED ; 15
- const SPRITE_ANIM_INDEX_LEAF ; 16
- const SPRITE_ANIM_INDEX_CUT_TREE ; 17
- const SPRITE_ANIM_INDEX_FLY_LEAF ; 18
- const SPRITE_ANIM_INDEX_EGG_CRACK ; 19
- const SPRITE_ANIM_INDEX_1A ; 1a
- const SPRITE_ANIM_INDEX_HEADBUTT ; 1b
- const SPRITE_ANIM_INDEX_EGG_HATCH ; 1c
- const SPRITE_ANIM_INDEX_1D ; 1d
- const SPRITE_ANIM_INDEX_BLUE_WALK ; 1e
- const SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE ; 1f
- const SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL ; 20
- const SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL ; 21
- const SPRITE_ANIM_INDEX_MOBILE_22 ; 22
- const SPRITE_ANIM_INDEX_MOBILE_23 ; 23
- const SPRITE_ANIM_INDEX_MOBILE_24 ; 24
- const SPRITE_ANIM_INDEX_MOBILE_25 ; 25
- const SPRITE_ANIM_INDEX_INTRO_SUICUNE ; 26
- const SPRITE_ANIM_INDEX_INTRO_PICHU ; 27
- const SPRITE_ANIM_INDEX_INTRO_WOOPER ; 28
- const SPRITE_ANIM_INDEX_INTRO_UNOWN ; 29
- const SPRITE_ANIM_INDEX_INTRO_UNOWN_F ; 2a
- const SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY ; 2b
- const SPRITE_ANIM_INDEX_CELEBI ; 2c
+ const SPRITE_ANIM_INDEX_PARTY_MON ; 00
+ const SPRITE_ANIM_INDEX_GS_TITLE_TRAIL ; 01
+ const SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR ; 02
+ const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO ; 03
+ const SPRITE_ANIM_INDEX_GS_INTRO_STAR ; 04
+ const SPRITE_ANIM_INDEX_GS_INTRO_SPARKLE ; 05
+ const SPRITE_ANIM_INDEX_SLOTS_GOLEM ; 06
+ const SPRITE_ANIM_INDEX_SLOTS_CHANSEY ; 07
+ const SPRITE_ANIM_INDEX_SLOTS_EGG ; 08
+ const SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR ; 09
+ const SPRITE_ANIM_INDEX_RED_WALK ; 0a
+ const SPRITE_ANIM_INDEX_UNUSED_CURSOR ; 0b
+ const SPRITE_ANIM_INDEX_DUMMY_GAME ; 0c
+ const SPRITE_ANIM_INDEX_POKEGEAR_ARROW ; 0d
+ const SPRITE_ANIM_INDEX_TRADE_POKE_BALL ; 0e
+ const SPRITE_ANIM_INDEX_TRADE_POOF ; 0f
+ const SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE ; 10
+ const SPRITE_ANIM_INDEX_TRADEMON_ICON ; 11
+ const SPRITE_ANIM_INDEX_TRADEMON_BUBBLE ; 12
+ const SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT ; 13
+ const SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB ; 14
+ const SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED ; 15
+ const SPRITE_ANIM_INDEX_LEAF ; 16
+ const SPRITE_ANIM_INDEX_CUT_TREE ; 17
+ const SPRITE_ANIM_INDEX_FLY_LEAF ; 18
+ const SPRITE_ANIM_INDEX_EGG_CRACK ; 19
+ const SPRITE_ANIM_INDEX_GS_INTRO_HO_OH ; 1a
+ const SPRITE_ANIM_INDEX_HEADBUTT ; 1b
+ const SPRITE_ANIM_INDEX_EGG_HATCH ; 1c
+ const SPRITE_ANIM_INDEX_EZCHAT_CURSOR ; 1d
+ const SPRITE_ANIM_INDEX_BLUE_WALK ; 1e
+ const SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE ; 1f
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL ; 20
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL ; 21
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE ; 22
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE ; 23
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE ; 24
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_PING ; 25
+ const SPRITE_ANIM_INDEX_INTRO_SUICUNE ; 26
+ const SPRITE_ANIM_INDEX_INTRO_PICHU ; 27
+ const SPRITE_ANIM_INDEX_INTRO_WOOPER ; 28
+ const SPRITE_ANIM_INDEX_INTRO_UNOWN ; 29
+ const SPRITE_ANIM_INDEX_INTRO_UNOWN_F ; 2a
+ const SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY ; 2b
+ const SPRITE_ANIM_INDEX_CELEBI ; 2c
; DoAnimFrame.Jumptable indexes (see engine/sprite_anims.asm)
const_def
- const SPRITE_ANIM_SEQ_NULL ; 00
- const SPRITE_ANIM_SEQ_PARTY_MON ; 01
- const SPRITE_ANIM_SEQ_PARTY_MON_SWITCH ; 02
- const SPRITE_ANIM_SEQ_PARTY_MON_SELECTED ; 03
- const SPRITE_ANIM_SEQ_GS_TITLE_TRAIL ; 04
- const SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR ; 05
- const SPRITE_ANIM_SEQ_GAMEFREAK_LOGO ; 06
- const SPRITE_ANIM_SEQ_GS_INTRO_STAR ; 07
- const SPRITE_ANIM_SEQ_GS_INTRO_SPARKLE ; 08
- const SPRITE_ANIM_SEQ_SLOTS_GOLEM ; 09
- const SPRITE_ANIM_SEQ_SLOTS_CHANSEY ; 0a
- const SPRITE_ANIM_SEQ_SLOTS_EGG ; 0b
- const SPRITE_ANIM_SEQ_MAIL_CURSOR ; 0c
- const SPRITE_ANIM_SEQ_FOR_UNUSED_CURSOR ; 0d
- const SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR ; 0e
- const SPRITE_ANIM_SEQ_POKEGEAR_ARROW ; 0f
- const SPRITE_ANIM_SEQ_TRADE_POKE_BALL ; 10
- const SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE ; 11
- const SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE ; 12
- const SPRITE_ANIM_SEQ_REVEAL_NEW_MON ; 13
- const SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB ; 14
- const SPRITE_ANIM_SEQ_CUT_LEAVES ; 15
- const SPRITE_ANIM_SEQ_FLY_FROM ; 16
- const SPRITE_ANIM_SEQ_FLY_LEAF ; 17
- const SPRITE_ANIM_SEQ_FLY_TO ; 18
- const SPRITE_ANIM_SEQ_19 ; 19
- const SPRITE_ANIM_SEQ_1A ; 1a
- const SPRITE_ANIM_SEQ_FOR_MOBILE_23 ; 1b
- const SPRITE_ANIM_SEQ_FOR_MOBILE_24 ; 1c
- const SPRITE_ANIM_SEQ_INTRO_SUICUNE ; 1d
- const SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER ; 1e
- const SPRITE_ANIM_SEQ_CELEBI ; 1f
- const SPRITE_ANIM_SEQ_INTRO_UNOWN ; 20
- const SPRITE_ANIM_SEQ_INTRO_UNOWN_F ; 21
- const SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY ; 22
+ const SPRITE_ANIM_SEQ_NULL ; 00
+ const SPRITE_ANIM_SEQ_PARTY_MON ; 01
+ const SPRITE_ANIM_SEQ_PARTY_MON_SWITCH ; 02
+ const SPRITE_ANIM_SEQ_PARTY_MON_SELECTED ; 03
+ const SPRITE_ANIM_SEQ_GS_TITLE_TRAIL ; 04
+ const SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR ; 05
+ const SPRITE_ANIM_SEQ_GAMEFREAK_LOGO ; 06
+ const SPRITE_ANIM_SEQ_GS_INTRO_STAR ; 07
+ const SPRITE_ANIM_SEQ_GS_INTRO_SPARKLE ; 08
+ const SPRITE_ANIM_SEQ_SLOTS_GOLEM ; 09
+ const SPRITE_ANIM_SEQ_SLOTS_CHANSEY ; 0a
+ const SPRITE_ANIM_SEQ_SLOTS_EGG ; 0b
+ const SPRITE_ANIM_SEQ_MAIL_CURSOR ; 0c
+ const SPRITE_ANIM_SEQ_UNUSED_CURSOR ; 0d
+ const SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR ; 0e
+ const SPRITE_ANIM_SEQ_POKEGEAR_ARROW ; 0f
+ const SPRITE_ANIM_SEQ_TRADE_POKE_BALL ; 10
+ const SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE ; 11
+ const SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE ; 12
+ const SPRITE_ANIM_SEQ_REVEAL_NEW_MON ; 13
+ const SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB ; 14
+ const SPRITE_ANIM_SEQ_CUT_LEAVES ; 15
+ const SPRITE_ANIM_SEQ_FLY_FROM ; 16
+ const SPRITE_ANIM_SEQ_FLY_LEAF ; 17
+ const SPRITE_ANIM_SEQ_FLY_TO ; 18
+ const SPRITE_ANIM_SEQ_GS_INTRO_HO_OH ; 19
+ const SPRITE_ANIM_SEQ_EZCHAT_CURSOR ; 1a
+ const SPRITE_ANIM_SEQ_MOBILE_TRADE_SENT_PULSE ; 1b
+ const SPRITE_ANIM_SEQ_MOBILE_TRADE_OT_PULSE ; 1c
+ const SPRITE_ANIM_SEQ_INTRO_SUICUNE ; 1d
+ const SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER ; 1e
+ const SPRITE_ANIM_SEQ_CELEBI ; 1f
+ const SPRITE_ANIM_SEQ_INTRO_UNOWN ; 20
+ const SPRITE_ANIM_SEQ_INTRO_UNOWN_F ; 21
+ const SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY ; 22
; SpriteAnimFrameData indexes (see data/sprite_anims/framesets.asm)
const_def
- const SPRITE_ANIM_FRAMESET_00
- const SPRITE_ANIM_FRAMESET_PARTY_MON ; 01
- const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL ; 02
- const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM ; 03
- const SPRITE_ANIM_FRAMESET_PARTY_MON_FAST ; 04
+ const SPRITE_ANIM_FRAMESET_00 ; 00
+ const SPRITE_ANIM_FRAMESET_PARTY_MON ; 01
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL ; 02
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM ; 03
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_FAST ; 04
const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL_FAST ; 05
const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM_FAST ; 06
- const SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL ; 07
- const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 08
- const SPRITE_ANIM_FRAMESET_09
- const SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO ; 0a
- const SPRITE_ANIM_FRAMESET_GS_INTRO_STAR ; 0b
- const SPRITE_ANIM_FRAMESET_GS_INTRO_SPARKLE ; 0c
- const SPRITE_ANIM_FRAMESET_SLOTS_GOLEM ; 0d
- const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY ; 0e
- const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2 ; 0f
- const SPRITE_ANIM_FRAMESET_SLOTS_EGG ; 10
- const SPRITE_ANIM_FRAMESET_RED_WALK ; 11
- const SPRITE_ANIM_FRAMESET_STILL_CURSOR ; 12
- const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL ; 13
- const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_0 ; 14
- const SPRITE_ANIM_FRAMESET_TRADE_POOF ; 15
- const SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE ; 16
- const SPRITE_ANIM_FRAMESET_TRADEMON_ICON ; 17
- const SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE ; 18
- const SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT ; 19
- const SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB ; 1a
- const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED ; 1b
- const SPRITE_ANIM_FRAMESET_1C
- const SPRITE_ANIM_FRAMESET_LEAF ; 1d
- const SPRITE_ANIM_FRAMESET_CUT_TREE ; 1e
- const SPRITE_ANIM_FRAMESET_EGG_CRACK ; 1f
- const SPRITE_ANIM_FRAMESET_EGG_HATCH ; 20
- const SPRITE_ANIM_FRAMESET_21
- const SPRITE_ANIM_FRAMESET_22
- const SPRITE_ANIM_FRAMESET_23
- const SPRITE_ANIM_FRAMESET_24
- const SPRITE_ANIM_FRAMESET_HEADBUTT ; 25
- const SPRITE_ANIM_FRAMESET_26
- const SPRITE_ANIM_FRAMESET_27
- const SPRITE_ANIM_FRAMESET_28
- const SPRITE_ANIM_FRAMESET_29
- const SPRITE_ANIM_FRAMESET_2A
- const SPRITE_ANIM_FRAMESET_2B
- const SPRITE_ANIM_FRAMESET_2C
- const SPRITE_ANIM_FRAMESET_BLUE_WALK ; 2d
- const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE ; 2e
- const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL ; 2f
- const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL ; 30
- const SPRITE_ANIM_FRAMESET_FOR_MOBILE_22 ; 31
- const SPRITE_ANIM_FRAMESET_FOR_MOBILE_23 ; 32
- const SPRITE_ANIM_FRAMESET_FOR_MOBILE_24 ; 33
- const SPRITE_ANIM_FRAMESET_FOR_MOBILE_25 ; 34
- const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE ; 35
- const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2 ; 36
- const SPRITE_ANIM_FRAMESET_INTRO_PICHU ; 37
- const SPRITE_ANIM_FRAMESET_INTRO_WOOPER ; 38
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1 ; 39
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2 ; 3a
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3 ; 3b
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4 ; 3c
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2 ; 3d
- const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY ; 3e
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F ; 3f
- const SPRITE_ANIM_FRAMESET_CELEBI_LEFT ; 40
- const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT ; 41
+ const SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL ; 07
+ const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 08
+ const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR_BIG ; 09
+ const SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO ; 0a
+ const SPRITE_ANIM_FRAMESET_GS_INTRO_STAR ; 0b
+ const SPRITE_ANIM_FRAMESET_GS_INTRO_SPARKLE ; 0c
+ const SPRITE_ANIM_FRAMESET_SLOTS_GOLEM ; 0d
+ const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY ; 0e
+ const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2 ; 0f
+ const SPRITE_ANIM_FRAMESET_SLOTS_EGG ; 10
+ const SPRITE_ANIM_FRAMESET_RED_WALK ; 11
+ const SPRITE_ANIM_FRAMESET_STILL_CURSOR ; 12
+ const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL ; 13
+ const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WIGGLE ; 14
+ const SPRITE_ANIM_FRAMESET_TRADE_POOF ; 15
+ const SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE ; 16
+ const SPRITE_ANIM_FRAMESET_TRADEMON_ICON ; 17
+ const SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE ; 18
+ const SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT ; 19
+ const SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB ; 1a
+ const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED ; 1b
+ const SPRITE_ANIM_FRAMESET_UNUSED_1C ; 1c
+ const SPRITE_ANIM_FRAMESET_LEAF ; 1d
+ const SPRITE_ANIM_FRAMESET_CUT_TREE ; 1e
+ const SPRITE_ANIM_FRAMESET_EGG_CRACK ; 1f
+ const SPRITE_ANIM_FRAMESET_EGG_HATCH_1 ; 20
+ const SPRITE_ANIM_FRAMESET_EGG_HATCH_2 ; 21
+ const SPRITE_ANIM_FRAMESET_EGG_HATCH_3 ; 22
+ const SPRITE_ANIM_FRAMESET_EGG_HATCH_4 ; 23
+ const SPRITE_ANIM_FRAMESET_GS_INTRO_HO_OH ; 24
+ const SPRITE_ANIM_FRAMESET_HEADBUTT ; 25
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 26
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 ; 27
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 28
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_4 ; 29
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_5 ; 2a
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_6 ; 2b
+ const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_7 ; 2c
+ const SPRITE_ANIM_FRAMESET_BLUE_WALK ; 2d
+ const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE ; 2e
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL ; 2f
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL ; 30
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_CABLE_BULGE ; 31
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_PULSE ; 32
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_PULSE ; 33
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_PING ; 34
+ const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE ; 35
+ const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2 ; 36
+ const SPRITE_ANIM_FRAMESET_INTRO_PICHU ; 37
+ const SPRITE_ANIM_FRAMESET_INTRO_WOOPER ; 38
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1 ; 39
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2 ; 3a
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3 ; 3b
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4 ; 3c
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2 ; 3d
+ const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY ; 3e
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F ; 3f
+ const SPRITE_ANIM_FRAMESET_CELEBI_LEFT ; 40
+ const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT ; 41
; SpriteAnimOAMData indexes (see data/sprite_anims/oam.asm)
const_def
- const SPRITE_ANIM_OAMSET_RED_WALK_1 ; 00
- const SPRITE_ANIM_OAMSET_RED_WALK_2 ; 01
- const SPRITE_ANIM_OAMSET_02
- const SPRITE_ANIM_OAMSET_03
- const SPRITE_ANIM_OAMSET_04
- const SPRITE_ANIM_OAMSET_05
- const SPRITE_ANIM_OAMSET_06
- const SPRITE_ANIM_OAMSET_07
- const SPRITE_ANIM_OAMSET_08
- const SPRITE_ANIM_OAMSET_09
- const SPRITE_ANIM_OAMSET_0A
- const SPRITE_ANIM_OAMSET_0B
- const SPRITE_ANIM_OAMSET_0C
- const SPRITE_ANIM_OAMSET_0D
- const SPRITE_ANIM_OAMSET_0E
- const SPRITE_ANIM_OAMSET_0F
- const SPRITE_ANIM_OAMSET_10
- const SPRITE_ANIM_OAMSET_11
- const SPRITE_ANIM_OAMSET_12
- const SPRITE_ANIM_OAMSET_13
- const SPRITE_ANIM_OAMSET_14
- const SPRITE_ANIM_OAMSET_15
- const SPRITE_ANIM_OAMSET_16
- const SPRITE_ANIM_OAMSET_17
- const SPRITE_ANIM_OAMSET_18
- const SPRITE_ANIM_OAMSET_19
- const SPRITE_ANIM_OAMSET_1A
- const SPRITE_ANIM_OAMSET_1B
- const SPRITE_ANIM_OAMSET_1C
- const SPRITE_ANIM_OAMSET_1D
- const SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1 ; 1e
- const SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2 ; 1f
- const SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR ; 20
- const SPRITE_ANIM_OAMSET_FOR_FRAMESET_09 ; 21
- const SPRITE_ANIM_OAMSET_22
- const SPRITE_ANIM_OAMSET_GS_INTRO_STAR ; 23
- const SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_1 ; 24
- const SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_2 ; 25
- const SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_3 ; 26
- const SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1 ; 27
- const SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2 ; 28
- const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1 ; 29
- const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2 ; 2a
- const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3 ; 2b
- const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4 ; 2c
- const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5 ; 2d
- const SPRITE_ANIM_OAMSET_SLOTS_EGG ; 2e
- const SPRITE_ANIM_OAMSET_STILL_CURSOR ; 2f
- const SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1 ; 30
- const SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2 ; 31
- const SPRITE_ANIM_OAMSET_TRADE_POOF_1 ; 32
- const SPRITE_ANIM_OAMSET_TRADE_POOF_2 ; 33
- const SPRITE_ANIM_OAMSET_TRADE_POOF_3 ; 34
- const SPRITE_ANIM_OAMSET_35
- const SPRITE_ANIM_OAMSET_36
- const SPRITE_ANIM_OAMSET_TRADEMON_ICON_1 ; 37
- const SPRITE_ANIM_OAMSET_TRADEMON_ICON_2 ; 38
- const SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE ; 39
- const SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1 ; 3a
- const SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2 ; 3b
- const SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB ; 3c
- const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1 ; 3d
- const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2 ; 3e
- const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1 ; 3f
- const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2 ; 40
- const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1 ; 41
- const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2 ; 42
- const SPRITE_ANIM_OAMSET_43
- const SPRITE_ANIM_OAMSET_44
- const SPRITE_ANIM_OAMSET_45
- const SPRITE_ANIM_OAMSET_46
- const SPRITE_ANIM_OAMSET_47
- const SPRITE_ANIM_OAMSET_48
- const SPRITE_ANIM_OAMSET_49
- const SPRITE_ANIM_OAMSET_4A
- const SPRITE_ANIM_OAMSET_4B
- const SPRITE_ANIM_OAMSET_4C
- const SPRITE_ANIM_OAMSET_4D
- const SPRITE_ANIM_OAMSET_4E
- const SPRITE_ANIM_OAMSET_LEAF ; 4f
- const SPRITE_ANIM_OAMSET_TREE_1 ; 50
- const SPRITE_ANIM_OAMSET_CUT_TREE_2 ; 51
- const SPRITE_ANIM_OAMSET_CUT_TREE_3 ; 52
- const SPRITE_ANIM_OAMSET_CUT_TREE_4 ; 53
- const SPRITE_ANIM_OAMSET_EGG_CRACK ; 54
- const SPRITE_ANIM_OAMSET_55
- const SPRITE_ANIM_OAMSET_56
- const SPRITE_ANIM_OAMSET_57
- const SPRITE_ANIM_OAMSET_58
- const SPRITE_ANIM_OAMSET_59
- const SPRITE_ANIM_OAMSET_5A
- const SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2 ; 5b
- const SPRITE_ANIM_OAMSET_5C
- const SPRITE_ANIM_OAMSET_5D
- const SPRITE_ANIM_OAMSET_5E
- const SPRITE_ANIM_OAMSET_5F
- const SPRITE_ANIM_OAMSET_60
- const SPRITE_ANIM_OAMSET_61
- const SPRITE_ANIM_OAMSET_62
- const SPRITE_ANIM_OAMSET_BLUE_WALK_1 ; 63
- const SPRITE_ANIM_OAMSET_BLUE_WALK_2 ; 64
- const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1 ; 65
- const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2 ; 66
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_22_1 ; 67
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_22_2 ; 68
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_25_1 ; 69
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_25_2 ; 6a
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_25_3 ; 6b
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_23 ; 6c
- const SPRITE_ANIM_OAMSET_FOR_MOBILE_24 ; 6d
- const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1 ; 6e
- const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2 ; 6f
- const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3 ; 70
- const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4 ; 71
- const SPRITE_ANIM_OAMSET_INTRO_PICHU_1 ; 72
- const SPRITE_ANIM_OAMSET_INTRO_PICHU_2 ; 73
- const SPRITE_ANIM_OAMSET_INTRO_PICHU_3 ; 74
- const SPRITE_ANIM_OAMSET_INTRO_WOOPER ; 75
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_1 ; 76
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_2 ; 77
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_3 ; 78
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1 ; 79
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2 ; 7a
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3 ; 7b
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4 ; 7c
- const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5 ; 7d
- const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY ; 7e
- const SPRITE_ANIM_OAMSET_CELEBI_1 ; 7f
- const SPRITE_ANIM_OAMSET_CELEBI_2 ; 80
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1 ; 81
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2 ; 82
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3 ; 83
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4 ; 84
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5 ; 85
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6 ; 86
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7 ; 87
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8 ; 88
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9 ; 89
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10 ; 8A
- const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11 ; 8B
+ const SPRITE_ANIM_OAMSET_RED_WALK_1 ; 00
+ const SPRITE_ANIM_OAMSET_RED_WALK_2 ; 01
+ const SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_1 ; 02
+ const SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_2 ; 03
+ const SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_1 ; 04
+ const SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_2 ; 05
+ const SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_1 ; 06
+ const SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_2 ; 07
+ const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_1 ; 08
+ const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_2 ; 09
+ const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_3 ; 0a
+ const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_4 ; 0b
+ const SPRITE_ANIM_OAMSET_GS_INTRO_NOTE ; 0c
+ const SPRITE_ANIM_OAMSET_UNUSED_0D ; 0d
+ const SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_1 ; 0e
+ const SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_2 ; 0f
+ const SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_3 ; 10
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_1 ; 11
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_2 ; 12
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_3 ; 13
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_4 ; 14
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_1 ; 15
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_2 ; 16
+ const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_3 ; 17
+ const SPRITE_ANIM_OAMSET_GS_INTRO_SMALL_FIREBALL ; 18
+ const SPRITE_ANIM_OAMSET_GS_INTRO_MED_FIREBALL ; 19
+ const SPRITE_ANIM_OAMSET_GS_INTRO_BIG_FIREBALL ; 1a
+ const SPRITE_ANIM_OAMSET_GS_INTRO_CHIKORITA ; 1b
+ const SPRITE_ANIM_OAMSET_GS_INTRO_CYNDAQUIL ; 1c
+ const SPRITE_ANIM_OAMSET_GS_INTRO_TOTODILE ; 1d
+ const SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1 ; 1e
+ const SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2 ; 1f
+ const SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR ; 20
+ const SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG ; 21
+ const SPRITE_ANIM_OAMSET_GS_INTRO_GAMEFREAK_LOGO ; 22
+ const SPRITE_ANIM_OAMSET_GS_INTRO_STAR ; 23
+ const SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_1 ; 24
+ const SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_2 ; 25
+ const SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_3 ; 26
+ const SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1 ; 27
+ const SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2 ; 28
+ const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1 ; 29
+ const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2 ; 2a
+ const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3 ; 2b
+ const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4 ; 2c
+ const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5 ; 2d
+ const SPRITE_ANIM_OAMSET_SLOTS_EGG ; 2e
+ const SPRITE_ANIM_OAMSET_STILL_CURSOR ; 2f
+ const SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1 ; 30
+ const SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2 ; 31
+ const SPRITE_ANIM_OAMSET_TRADE_POOF_1 ; 32
+ const SPRITE_ANIM_OAMSET_TRADE_POOF_2 ; 33
+ const SPRITE_ANIM_OAMSET_TRADE_POOF_3 ; 34
+ const SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_1 ; 35
+ const SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_2 ; 36
+ const SPRITE_ANIM_OAMSET_TRADEMON_ICON_1 ; 37
+ const SPRITE_ANIM_OAMSET_TRADEMON_ICON_2 ; 38
+ const SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE ; 39
+ const SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1 ; 3a
+ const SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2 ; 3b
+ const SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB ; 3c
+ const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1 ; 3d
+ const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2 ; 3e
+ const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1 ; 3f
+ const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2 ; 40
+ const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1 ; 41
+ const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2 ; 42
+ const SPRITE_ANIM_OAMSET_UNUSED_43 ; 43
+ const SPRITE_ANIM_OAMSET_UNUSED_44 ; 44
+ const SPRITE_ANIM_OAMSET_UNUSED_45 ; 45
+ const SPRITE_ANIM_OAMSET_UNUSED_46 ; 46
+ const SPRITE_ANIM_OAMSET_UNUSED_47 ; 47
+ const SPRITE_ANIM_OAMSET_UNUSED_48 ; 48
+ const SPRITE_ANIM_OAMSET_UNUSED_49 ; 49
+ const SPRITE_ANIM_OAMSET_UNUSED_4A ; 4a
+ const SPRITE_ANIM_OAMSET_UNUSED_4B ; 4b
+ const SPRITE_ANIM_OAMSET_UNUSED_4C ; 4c
+ const SPRITE_ANIM_OAMSET_UNUSED_4D ; 4d
+ const SPRITE_ANIM_OAMSET_UNUSED_4E ; 4e
+ const SPRITE_ANIM_OAMSET_LEAF ; 4f
+ const SPRITE_ANIM_OAMSET_TREE_1 ; 50
+ const SPRITE_ANIM_OAMSET_CUT_TREE_2 ; 51
+ const SPRITE_ANIM_OAMSET_CUT_TREE_3 ; 52
+ const SPRITE_ANIM_OAMSET_CUT_TREE_4 ; 53
+ const SPRITE_ANIM_OAMSET_EGG_CRACK ; 54
+ const SPRITE_ANIM_OAMSET_EGG_HATCH ; 55
+ const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_1 ; 56
+ const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_2 ; 57
+ const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_3 ; 58
+ const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_4 ; 59
+ const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_5 ; 5a
+ const SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2 ; 5b
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_1 ; 5c
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_2 ; 5d
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_3 ; 5e
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_4 ; 5f
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_5 ; 60
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_6 ; 61
+ const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_7 ; 62
+ const SPRITE_ANIM_OAMSET_BLUE_WALK_1 ; 63
+ const SPRITE_ANIM_OAMSET_BLUE_WALK_2 ; 64
+ const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1 ; 65
+ const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2 ; 66
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_1 ; 67
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_2 ; 68
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_1 ; 69
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_2 ; 6a
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_3 ; 6b
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_SENT_PULSE ; 6c
+ const SPRITE_ANIM_OAMSET_MOBILE_TRADE_OT_PULSE ; 6d
+ const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1 ; 6e
+ const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2 ; 6f
+ const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3 ; 70
+ const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4 ; 71
+ const SPRITE_ANIM_OAMSET_INTRO_PICHU_1 ; 72
+ const SPRITE_ANIM_OAMSET_INTRO_PICHU_2 ; 73
+ const SPRITE_ANIM_OAMSET_INTRO_PICHU_3 ; 74
+ const SPRITE_ANIM_OAMSET_INTRO_WOOPER ; 75
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_1 ; 76
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_2 ; 77
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_3 ; 78
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1 ; 79
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2 ; 7a
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3 ; 7b
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4 ; 7c
+ const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5 ; 7d
+ const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY ; 7e
+ const SPRITE_ANIM_OAMSET_CELEBI_1 ; 7f
+ const SPRITE_ANIM_OAMSET_CELEBI_2 ; 80
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1 ; 81
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2 ; 82
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3 ; 83
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4 ; 84
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5 ; 85
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6 ; 86
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7 ; 87
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8 ; 88
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9 ; 89
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10 ; 8a
+ const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11 ; 8b
diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm
index e657c4027..767d7a3c6 100644
--- a/constants/sprite_constants.asm
+++ b/constants/sprite_constants.asm
@@ -1,5 +1,5 @@
; sprite ids
-; OverworldSprites indexes (see gfx/sprite_data.asm)
+; OverworldSprites indexes (see data/sprites.asm)
const_def
const SPRITE_NONE ; 00
const SPRITE_CHRIS ; 01
@@ -105,7 +105,7 @@
const SPRITE_RAIKOU ; 65
const SPRITE_STANDING_YOUNGSTER ; 66
-; SpriteMons indexes (see data/sprite_mons.asm)
+; SpriteMons indexes (see data/sprites/sprite_mons.asm)
const_value set $80
SPRITE_POKEMON EQU const_value
const SPRITE_UNOWN ; 80
diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm
index 9ec78d1fb..db53c3ca1 100644
--- a/constants/sprite_data_constants.asm
+++ b/constants/sprite_data_constants.asm
@@ -1,4 +1,4 @@
-; overworld_sprite struct members (see gfx/sprite_data.asm)
+; overworld_sprite struct members (see data/sprites.asm)
const_def
const SPRITEDATA_ADDR ; 0
const SPRITEDATA_ADDR_HI ; 1
@@ -26,6 +26,7 @@ const_value set 1
const PAL_OW_ROCK ; 7
; object_events set bit 3 so as not to use the sprite's default palette
+; MapObjectPals indexes (see gfx/overworld/npc_sprites.pal)
const_value set (1 << 3)
const PAL_NPC_RED ; 8
const PAL_NPC_BLUE ; 9
@@ -36,7 +37,7 @@ const_value set (1 << 3)
const PAL_NPC_TREE ; e
const PAL_NPC_ROCK ; f
-; SpriteMovementData indexes (see data/map_objects.asm)
+; SpriteMovementData indexes (see data/sprites/map_objects.asm)
const_def
const SPRITEMOVEDATA_00 ; 00
const SPRITEMOVEDATA_ITEM_TREE ; 01
@@ -158,7 +159,7 @@ SPRITEMOVEDATA_FIELDS EQU 6
const OBJECT_ACTION_GRASS_SHAKE ; 0f
const OBJECT_ACTION_SKYFALL ; 10
-; Facings indexes (see data/facings.asm)
+; Facings indexes (see data/sprites/facings.asm)
const_def
const FACING_STEP_DOWN_0 ; 00
const FACING_STEP_DOWN_1 ; 01
diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm
index 90dd0f8d2..bb5381657 100644
--- a/constants/tileset_constants.asm
+++ b/constants/tileset_constants.asm
@@ -1,4 +1,4 @@
-; Tilesets indexes (see tilesets/tilesets.asm)
+; Tilesets indexes (see data/tilesets.asm)
const_value set 1
const TILESET_JOHTO_1 ; 01
const TILESET_JOHTO_2 ; 02
@@ -37,7 +37,8 @@ const_value set 1
const TILESET_OMANYTE_WORD_ROOM ; 23
const TILESET_AERODACTYL_WORD_ROOM ; 24
-; bg palette values (see tilesets/*_palette_map.asm)
+; bg palette values (see gfx/tilesets/*_palette_map.asm)
+; TilesetBGPalette indexes (see gfx/tilesets/bg_tiles.pal)
const_def
const PAL_BG_GRAY ; 0
const PAL_BG_RED ; 1
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index 2590ed34e..7976fdffa 100644
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -12,6 +12,7 @@ ENDM
; - TrainerEncounterMusic (see data/trainers/encounter_music.asm)
; - TrainerPicPointers (see data/trainers/pic_pointers.asm)
; - TrainerPalettes (see data/trainers/palettes.asm)
+; - BTTrainerClassSprites (see data/trainers/sprites.asm)
; - BTTrainerClassGenders (see data/trainers/genders.asm)
; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm)
enum_start
@@ -25,20 +26,28 @@ CHRIS EQU __enum__
KRIS EQU __enum__
trainerclass FALKNER ; 1
+ const FALKNER1
trainerclass WHITNEY ; 2
+ const WHITNEY1
trainerclass BUGSY ; 3
+ const BUGSY1
trainerclass MORTY ; 4
+ const MORTY1
trainerclass PRYCE ; 5
+ const PRYCE1
trainerclass JASMINE ; 6
+ const JASMINE1
trainerclass CHUCK ; 7
+ const CHUCK1
trainerclass CLAIR ; 8
+ const CLAIR1
trainerclass RIVAL1 ; 9
const RIVAL1_1_CHIKORITA
@@ -60,6 +69,7 @@ KRIS EQU __enum__
trainerclass POKEMON_PROF ; a
trainerclass WILL ; b
+ const WILL1
trainerclass CAL ; c
const CAL1
@@ -67,19 +77,25 @@ KRIS EQU __enum__
const CAL3
trainerclass BRUNO ; d
+ const BRUNO1
trainerclass KAREN ; e
+ const KAREN1
trainerclass KOGA ; f
+ const KOGA1
trainerclass CHAMPION ; 10
const LANCE
trainerclass BROCK ; 11
+ const BROCK1
trainerclass MISTY ; 12
+ const MISTY1
trainerclass LT_SURGE ; 13
+ const LT_SURGE1
trainerclass SCIENTIST ; 14
const ROSS
@@ -89,6 +105,7 @@ KRIS EQU __enum__
const RICH
trainerclass ERIKA ; 15
+ const ERIKA1
trainerclass YOUNGSTER ; 16
const JOEY1
@@ -173,6 +190,7 @@ KRIS EQU __enum__
const DANA5
trainerclass JANINE ; 1a
+ const JANINE1
trainerclass COOLTRAINERM ; 1b
const NICK
@@ -305,6 +323,7 @@ KRIS EQU __enum__
const SHIRLEY
trainerclass SABRINA ; 23
+ const SABRINA1
trainerclass BUG_CATCHER ; 24
const DON
@@ -477,6 +496,7 @@ KRIS EQU __enum__
const GLENN
trainerclass BLAINE ; 2e
+ const BLAINE1
trainerclass BURGLAR ; 2f
const DUNCAN
@@ -661,8 +681,10 @@ KRIS EQU __enum__
const JAIME
trainerclass RED ; 3f
+ const RED1
trainerclass BLUE ; 40
+ const BLUE1
trainerclass OFFICER ; 41
const KEITH
diff --git a/constants/type_constants.asm b/constants/type_constants.asm
index c2cf2d709..6587c3a70 100644
--- a/constants/type_constants.asm
+++ b/constants/type_constants.asm
@@ -1,7 +1,8 @@
-; TypeNames indexes (see data/type_names.asm)
+; TypeNames indexes (see data/types/names.asm)
; also used in:
-; - TypeMatchups (see data/type_matchups.asm)
-; - Pokedex_SearchForMons.TypeConversionTable and Pokedex_PlaceSearchScreenTypeStrings.TypeStrings (see engine/pokedex.asm)
+; - PokedexTypeSearchConversionTable (see data/types/search_types.asm)
+; - PokedexTypeSearchStrings (see data/types/search_strings.asm)
+; - TypeMatchups (see data/battle/type_matchups.asm)
const_def
PHYSICAL EQU const_value
@@ -38,5 +39,6 @@ SPECIAL EQU const_value
const ICE
const DRAGON
const DARK
-
TYPES_END EQU const_value
+
+NUM_TYPES EQU TYPES_END + UNUSED_TYPES - UNUSED_TYPES_END
diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm
index 8cf06db06..617cb906c 100644
--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -28,6 +28,7 @@ TEXT_DELAY_SLOW EQU 5
const FRAME_6 ; 5
const FRAME_7 ; 6
const FRAME_8 ; 7
+NUM_FRAMES EQU const_value
; TextBoxFlags:
const_def
@@ -52,6 +53,7 @@ const_value set -1
const UP ; 1
const LEFT ; 2
const RIGHT ; 3
+NUM_DIRECTIONS EQU const_value
DOWN_MASK EQU 1 << DOWN
UP_MASK EQU 1 << UP
@@ -71,6 +73,7 @@ FACE_RIGHT EQU 1
const DAY_F ; 1
const NITE_F ; 2
const DARKNESS_F ; 3
+NUM_DAYTIMES EQU const_value
MORN EQU 1 << MORN_F
DAY EQU 1 << DAY_F
@@ -116,9 +119,6 @@ PLAYER_SKATE EQU 2
PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8
-OBJECT_STRUCT_LENGTH EQU 40
-NUM_OBJECT_STRUCTS EQU 13
-
; After-Champion Spawn
SPAWN_LANCE EQU 1
SPAWN_RED EQU 2
diff --git a/data/battle/accuracy_multipliers.asm b/data/battle/accuracy_multipliers.asm
new file mode 100644
index 000000000..a5a309bbd
--- /dev/null
+++ b/data/battle/accuracy_multipliers.asm
@@ -0,0 +1,17 @@
+; Multiplier ratios for accuracy from modifier -6 to +6
+; (for other stats, see data/battle/stat_multipliers.asm)
+
+AccuracyLevelMultipliers:
+ db 33, 100 ; -6 = 33%
+ db 36, 100 ; -5 = 36%
+ db 43, 100 ; -4 = 43%
+ db 50, 100 ; -3 = 50%
+ db 60, 100 ; -2 = 60%
+ db 75, 100 ; -1 = 75%
+ db 1, 1 ; 0 = 100%
+ db 133, 100 ; +1 = 133%
+ db 166, 100 ; +2 = 166%
+ db 2, 1 ; +3 = 200%
+ db 233, 100 ; +4 = 233%
+ db 133, 50 ; +5 = 266%
+ db 3, 1 ; +6 = 300%
diff --git a/text/battle.asm b/data/battle/battle_text.asm
index 7e1b06069..7e1b06069 100644
--- a/text/battle.asm
+++ b/data/battle/battle_text.asm
diff --git a/data/battle/critical_hits.asm b/data/battle/critical_hits.asm
new file mode 100644
index 000000000..5800d57f4
--- /dev/null
+++ b/data/battle/critical_hits.asm
@@ -0,0 +1,18 @@
+CriticalHitMoves:
+ db KARATE_CHOP
+ db RAZOR_WIND
+ db RAZOR_LEAF
+ db CRABHAMMER
+ db SLASH
+ db AEROBLAST
+ db CROSS_CHOP
+ db -1
+
+CriticalHitChances:
+ db 7 percent ; 0
+ db 12 percent + 2 ; +1
+ db 25 percent + 1 ; +2
+ db 33 percent + 1 ; +3
+ db 50 percent + 1 ; +4
+ db 50 percent + 1 ; +5
+ db 50 percent + 1 ; +6
diff --git a/data/battle_command_pointers.asm b/data/battle/effect_command_pointers.asm
index 38a3c1eb8..b3eeea273 100644
--- a/data/battle_command_pointers.asm
+++ b/data/battle/effect_command_pointers.asm
@@ -1,3 +1,5 @@
+; battle commands are defined in engine/battle/effect_commands.asm
+
dw 0 ; padding
BattleCommandPointers: ; 3fd28
diff --git a/data/battle/stat_multipliers.asm b/data/battle/stat_multipliers.asm
new file mode 100644
index 000000000..e7cf8e472
--- /dev/null
+++ b/data/battle/stat_multipliers.asm
@@ -0,0 +1,17 @@
+; Multiplier ratios for all stats from modifier -6 to +6
+; (except accuracy, see data/battle/accuracy_multipliers.asm)
+
+StatLevelMultipliers:
+ db 25, 100 ; -6 = 25%
+ db 28, 100 ; -5 = 28%
+ db 33, 100 ; -4 = 33%
+ db 40, 100 ; -3 = 40%
+ db 50, 100 ; -2 = 50%
+ db 66, 100 ; -1 = 66%
+ db 1, 1 ; 0 = 100%
+ db 15, 10 ; +1 = 150%
+ db 2, 1 ; +2 = 200%
+ db 25, 10 ; +3 = 250%
+ db 3, 1 ; +4 = 300%
+ db 35, 10 ; +5 = 350%
+ db 4, 1 ; +6 = 400%
diff --git a/data/battle/stat_names.asm b/data/battle/stat_names.asm
new file mode 100644
index 000000000..a144a225f
--- /dev/null
+++ b/data/battle/stat_names.asm
@@ -0,0 +1,10 @@
+StatNames:
+; entries correspond to stat ids
+ db "ATTACK@"
+ db "DEFENSE@"
+ db "SPEED@"
+ db "SPCL.ATK@"
+ db "SPCL.DEF@"
+ db "ACCURACY@"
+ db "EVASION@"
+ db "ABILITY@" ; used for BattleCommand_Curse
diff --git a/data/battle/type_boost_items.asm b/data/battle/type_boost_items.asm
new file mode 100644
index 000000000..3b7231a59
--- /dev/null
+++ b/data/battle/type_boost_items.asm
@@ -0,0 +1,20 @@
+TypeBoostItems: ; 35703
+ db HELD_NORMAL_BOOST, NORMAL ; PINK_BOW/POLKADOT_BOW
+ db HELD_FIGHTING_BOOST, FIGHTING ; BLACKBELT
+ db HELD_FLYING_BOOST, FLYING ; SHARP_BEAK
+ db HELD_POISON_BOOST, POISON ; POISON BARB
+ db HELD_GROUND_BOOST, GROUND ; SOFT_SAND
+ db HELD_ROCK_BOOST, ROCK ; HARD_STONE
+ db HELD_BUG_BOOST, BUG ; SILVERPOWDER
+ db HELD_GHOST_BOOST, GHOST ; SPELL_TAG
+ db HELD_FIRE_BOOST, FIRE ; CHARCOAL
+ db HELD_WATER_BOOST, WATER ; MYSTIC WATER
+ db HELD_GRASS_BOOST, GRASS ; MIRACLE_SEED
+ db HELD_ELECTRIC_BOOST, ELECTRIC ; MAGNET
+ db HELD_PSYCHIC_BOOST, PSYCHIC ; TWISTEDSPOON
+ db HELD_ICE_BOOST, ICE ; NEVERMELTICE
+ db HELD_DRAGON_BOOST, DRAGON ; DRAGON_SCALE
+ db HELD_DARK_BOOST, DARK ; BLACKGLASSES
+ db HELD_STEEL_BOOST, STEEL ; METAL_COAT
+ db -1
+; 35726
diff --git a/data/type_matchups.asm b/data/battle/type_matchups.asm
index 61fd19078..90e38ae2c 100644
--- a/data/type_matchups.asm
+++ b/data/battle/type_matchups.asm
@@ -1,9 +1,3 @@
-; The multiplier is divided by 10, so we can use values like 0.5.
-; All other cases are neutral (1x).
-SUPER_EFFECTIVE EQU 20
-NOT_VERY_EFFECTIVE EQU 05
-NO_EFFECT EQU 00
-
TypeMatchups: ; 34bb1
; attacker, defender, *=
db NORMAL, ROCK, NOT_VERY_EFFECTIVE
@@ -115,11 +109,11 @@ TypeMatchups: ; 34bb1
db STEEL, ROCK, SUPER_EFFECTIVE
db STEEL, STEEL, NOT_VERY_EFFECTIVE
- db $fe ; end
+ db -2 ; end
; Foresight removes Ghost's immunities.
db NORMAL, GHOST, NO_EFFECT
db FIGHTING, GHOST, NO_EFFECT
- db $ff ; end (with Foresight)
+ db -1 ; end (with Foresight)
; 34cfd
diff --git a/data/battle_anims/objects.asm b/data/battle_anims/objects.asm
index 62ec0140e..3d46ae2d7 100755
--- a/data/battle_anims/objects.asm
+++ b/data/battle_anims/objects.asm
@@ -27,13 +27,13 @@ BattleAnimObjects: ; ccb56
battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_03, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_06
battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_04, BATTLEANIMFUNC_1B, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_07
battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_08
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_06, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_09
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_06, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_FANG
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_07, BATTLEANIMFUNC_09, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_0A
- battleanimobj RELATIVE_X, $aa, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_10, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0B
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0E, BATTLEANIMFUNC_04, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0C
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_03, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0D
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_08, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0E
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_0A, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0F
+ battleanimobj RELATIVE_X, $aa, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_10, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_EMBER
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0E, BATTLEANIMFUNC_04, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_DRAGON_RAGE
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_03, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_FLAMETHROWER
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_08, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_FIRE_SPIN
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_0A, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_FIRE_BLAST
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_03, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_BURNED
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_12, BATTLEANIMFUNC_08, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_BLIZZARD
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_13, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_12
@@ -47,32 +47,32 @@ BattleAnimObjects: ; ccb56
battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_1F, BATTLEANIMFUNC_38, PAL_BATTLE_OB_GRAY, $0c ; ANIM_OBJ_1A
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $07 ; ANIM_OBJ_1B
battleanimobj RELATIVE_X, $a0, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $07 ; ANIM_OBJ_BALL_POOF
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_07, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_1D
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_1A, BATTLEANIMFUNC_07, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_1E
- battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_1B, BATTLEANIMFUNC_36, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_1F
- battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_36, PAL_BATTLE_OB_BLUE, $21 ; ANIM_OBJ_20
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_07, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_BIG_ROCK
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_1A, BATTLEANIMFUNC_07, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_SMALL_ROCK
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_1B, BATTLEANIMFUNC_36, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_STRENGTH
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_36, PAL_BATTLE_OB_BLUE, $21 ; ANIM_OBJ_SEISMIC_TOSS
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_0C, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_BUBBLE
- battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_23, BATTLEANIMFUNC_0D, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_22
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_0E, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_23
- battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_0F, PAL_BATTLE_OB_BLUE, $04 ; ANIM_OBJ_24
- battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_2A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $04 ; ANIM_OBJ_25
- battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_2B, BATTLEANIMFUNC_11, PAL_BATTLE_OB_GREEN, $0f ; ANIM_OBJ_26
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_23, BATTLEANIMFUNC_0D, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_SURF
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_0E, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_SING
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_0F, PAL_BATTLE_OB_BLUE, $04 ; ANIM_OBJ_WATER_GUN
+ battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_2A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $04 ; ANIM_OBJ_HYDRO_PUMP
+ battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_2B, BATTLEANIMFUNC_11, PAL_BATTLE_OB_GREEN, $0f ; ANIM_OBJ_POWDER
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_27
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_28
battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_ICE_BUILDUP
battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2F, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_FROZEN
battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_14, PAL_BATTLE_OB_BROWN, $11 ; ANIM_OBJ_MASTER_BALL_SPARKLE
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_14, PAL_BATTLE_OB_YELLOW, $0d ; ANIM_OBJ_2C
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_14, PAL_BATTLE_OB_YELLOW, $0d ; ANIM_OBJ_RECOVER
battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_31, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_2D
battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_32, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_2E
battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_33, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_2F
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_15, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_30
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_15, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_THUNDER_WAVE
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_31
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_LIGHTNING_BOLT
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_38, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_33
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_39, BATTLEANIMFUNC_03, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_34
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_16, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_35
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_3C, BATTLEANIMFUNC_17, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_36
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_16, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_CLAMP
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_3C, BATTLEANIMFUNC_17, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_BITE
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_37
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3F, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_38
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_40, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_39
@@ -85,125 +85,125 @@ BattleAnimObjects: ; ccb56
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_47, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_40
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_48, BATTLEANIMFUNC_1A, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_41
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_49, BATTLEANIMFUNC_1A, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_42
- battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_43
+ battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_SONICBOOM_JP
battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_44
battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_1C, PAL_BATTLE_OB_GREEN, $12 ; ANIM_OBJ_ABSORB
- battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_1D, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_46
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_1D, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_EGG
battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_51, BATTLEANIMFUNC_1E, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_47
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_52, BATTLEANIMFUNC_1F, PAL_BATTLE_OB_GREEN, $16 ; ANIM_OBJ_48
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_1F, PAL_BATTLE_OB_GREEN, $16 ; ANIM_OBJ_49
battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, PAL_BATTLE_OB_GREEN, $06 ; ANIM_OBJ_LEECH_SEED
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_21, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_4B
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $17 ; ANIM_OBJ_4C
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_5D, BATTLEANIMFUNC_22, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_4D
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $17 ; ANIM_OBJ_WAVE
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_5D, BATTLEANIMFUNC_22, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_CONFUSE_RAY
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_5F, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_4E
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_4F
- battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $18 ; ANIM_OBJ_50
- battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $18 ; ANIM_OBJ_51
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $18 ; ANIM_OBJ_SCREEN
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $18 ; ANIM_OBJ_HARDEN
battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_61, BATTLEANIMFUNC_23, PAL_BATTLE_OB_YELLOW, $19 ; ANIM_OBJ_CHICK
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_63, BATTLEANIMFUNC_24, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_53
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_66, BATTLEANIMFUNC_25, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_54
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_63, BATTLEANIMFUNC_24, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_AMNESIA
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_66, BATTLEANIMFUNC_25, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_ASLEEP
battleanimobj RELATIVE_X, $50, BATTLEANIMFRAMESET_1C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $0c ; ANIM_OBJ_SKULL
battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_67, BATTLEANIMFUNC_26, PAL_BATTLE_OB_BROWN, $1a ; ANIM_OBJ_56
battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_68, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BROWN, $1a ; ANIM_OBJ_57
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_69, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $1a ; ANIM_OBJ_58
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6D, BATTLEANIMFUNC_28, PAL_BATTLE_OB_YELLOW, $19 ; ANIM_OBJ_PARALYZED
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_27, PAL_BATTLE_OB_GRAY, $1b ; ANIM_OBJ_5A
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_27, PAL_BATTLE_OB_GRAY, $1b ; ANIM_OBJ_STRING_SHOT
battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_HAZE
battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_MIST
battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_SMOG
battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_POISON_GAS
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, PAL_BATTLE_OB_GRAY, $1d ; ANIM_OBJ_HORN
battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_2C, PAL_BATTLE_OB_GRAY, $1d ; ANIM_OBJ_60
- battleanimobj RELATIVE_X, $48, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_2D, PAL_BATTLE_OB_RED, $1e ; ANIM_OBJ_61
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_06, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_62
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_75, BATTLEANIMFUNC_2E, PAL_BATTLE_OB_BROWN, $19 ; ANIM_OBJ_63
+ battleanimobj RELATIVE_X, $48, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_2D, PAL_BATTLE_OB_RED, $1e ; ANIM_OBJ_PETAL_DANCE
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_06, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_SLUDGE_BOMB
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_75, BATTLEANIMFUNC_2E, PAL_BATTLE_OB_BROWN, $19 ; ANIM_OBJ_PAY_DAY
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_64
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_GRAY, $11 ; ANIM_OBJ_65
- battleanimobj RELATIVE_X, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_66
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_30, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_67
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_68
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_69
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_08, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_6A
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_6B
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_6C
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_6D
- battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, PAL_BATTLE_OB_GRAY, $20 ; ANIM_OBJ_SKY_ATTACK_FEAROW
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_GRAY, $11 ; ANIM_OBJ_MIMIC
+ battleanimobj RELATIVE_X, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_ATTRACT
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_30, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_BONEMERANG
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_BONE_CLUB
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_BONE_RUSH
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_08, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_SWIFT
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_KINESIS
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_FLASH
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_SHINY
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, PAL_BATTLE_OB_GRAY, $20 ; ANIM_OBJ_SKY_ATTACK
battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $04 ; ANIM_OBJ_LICK
battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $18 ; ANIM_OBJ_WITHDRAW
battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_71
- battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_7E, BATTLEANIMFUNC_33, PAL_BATTLE_OB_YELLOW, $12 ; ANIM_OBJ_72
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_73
- battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_34, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_74
- battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_35, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_75
- battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_33, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_76
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_81, BATTLEANIMFUNC_37, PAL_BATTLE_OB_GRAY, $11 ; ANIM_OBJ_77
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_85, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $22 ; ANIM_OBJ_78
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_86, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $22 ; ANIM_OBJ_79
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_7E, BATTLEANIMFUNC_33, PAL_BATTLE_OB_YELLOW, $12 ; ANIM_OBJ_GROWTH
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_CONVERSION2
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_34, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_SMOKE
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_35, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_SMOKESCREEN
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_33, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_SWORDS_DANCE
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_81, BATTLEANIMFUNC_37, PAL_BATTLE_OB_GRAY, $11 ; ANIM_OBJ_SPEED_LINE
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_85, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $22 ; ANIM_OBJ_SHARPEN
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_86, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $22 ; ANIM_OBJ_DEFENSE_CURL
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_87, BATTLEANIMFUNC_39, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_7A
battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_3A, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_7B
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_7C
- battleanimobj RELATIVE_X | X_FLIP | BEHIND_BG, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_3B, PAL_BATTLE_OB_BLUE, $13 ; ANIM_OBJ_7D
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_DISABLE
+ battleanimobj RELATIVE_X | X_FLIP | PRIORITY, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_3B, PAL_BATTLE_OB_BLUE, $13 ; ANIM_OBJ_AGILITY
battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_25, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_HEART
- battleanimobj RELATIVE_X, $98, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_34, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_7F
- battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_3C, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_80
+ battleanimobj RELATIVE_X, $98, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_34, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_FLAME_WHEEL
+ battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_3C, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_SACRED_FIRE
battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_COTTON_SPORE
- battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_82
- battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_83
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_MILK_DRINK
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_ANGER
battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_8D, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $1f ; ANIM_OBJ_84
battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_40, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_85
- battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_41, PAL_BATTLE_OB_RED, $1f ; ANIM_OBJ_86
- battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_3E, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_87
- battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_3E, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_88
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_3D, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_89
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_3D, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_8A
- battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_2E, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_8B
- battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_8C
- battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, PAL_BATTLE_OB_RED, $19 ; ANIM_OBJ_8D
+ battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_41, PAL_BATTLE_OB_RED, $1f ; ANIM_OBJ_BATON_PASS
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_3E, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_LOCK_ON
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_3E, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_MIND_READER
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_3D, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_SAFEGUARD
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_3D, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_PROTECT
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_2E, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_THIEF
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_OCTAZOOKA
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, PAL_BATTLE_OB_RED, $19 ; ANIM_OBJ_PRESENT
battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_SPIKES
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_15, BATTLEANIMFUNC_08, PAL_BATTLE_OB_GRAY, $0a ; ANIM_OBJ_8F
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_02, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_90
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_42, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_91
- battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_9A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1b ; ANIM_OBJ_92
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_15, BATTLEANIMFUNC_08, PAL_BATTLE_OB_GRAY, $0a ; ANIM_OBJ_POWDER_SNOW
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_02, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_DRAGONBREATH
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_42, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_CONVERSION
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_9A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1b ; ANIM_OBJ_SPIDER_WEB
battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_9B, BATTLEANIMFUNC_35, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_93
- battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_23, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_94
- battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_25, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_95
- battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_96
- battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $25 ; ANIM_OBJ_97
- battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_3A, PAL_BATTLE_OB_GREEN, $23 ; ANIM_OBJ_98
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_23, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_NIGHTMARE
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_25, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_IN_NIGHTMARE
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_LOVELY_KISS
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $25 ; ANIM_OBJ_SWEET_KISS
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_3A, PAL_BATTLE_OB_GREEN, $23 ; ANIM_OBJ_SKETCH
battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_A0, BATTLEANIMFUNC_16, PAL_BATTLE_OB_GRAY, $23 ; ANIM_OBJ_99
battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_43, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_9A
- battleanimobj RELATIVE_X | X_FLIP, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_9B
- battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_44, PAL_BATTLE_OB_YELLOW, $24 ; ANIM_OBJ_9C
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A4, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $24 ; ANIM_OBJ_9D
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A5, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $24 ; ANIM_OBJ_9E
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_45, PAL_BATTLE_OB_RED, $12 ; ANIM_OBJ_9F
+ battleanimobj RELATIVE_X | X_FLIP, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_DESTINY_BOND
+ battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_44, PAL_BATTLE_OB_YELLOW, $24 ; ANIM_OBJ_MORNING_SUN
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A4, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $24 ; ANIM_OBJ_GLIMMER
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A5, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $24 ; ANIM_OBJ_MOONLIGHT
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_45, PAL_BATTLE_OB_RED, $12 ; ANIM_OBJ_HIDDEN_POWER
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A6, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_A0
battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A7, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_A1
- battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_4A, PAL_BATTLE_OB_BROWN, $0f ; ANIM_OBJ_A2
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_02, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_A3
- battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_11, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_A4
- battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, PAL_BATTLE_OB_GRAY, $23 ; ANIM_OBJ_A5
+ battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_4A, PAL_BATTLE_OB_BROWN, $0f ; ANIM_OBJ_SANDSTORM
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_02, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_ZAP_CANNON
+ battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_11, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_SPITE
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, PAL_BATTLE_OB_GRAY, $23 ; ANIM_OBJ_CURSE
battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_PERISH_SONG
- battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_AA, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $24 ; ANIM_OBJ_A7
- battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_48, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_A8
- battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_44, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_A9
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_AA, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $24 ; ANIM_OBJ_FORESIGHT
+ battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_48, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_RAPID_SPIN
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_44, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_SWAGGER
battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_AA
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_43, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_AB
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_AD, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $17 ; ANIM_OBJ_AC
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_AD, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $17 ; ANIM_OBJ_MEAN_LOOK
battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_AE, BATTLEANIMFUNC_49, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_AD
battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AF, BATTLEANIMFUNC_01, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_AE
- battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_4A, PAL_BATTLE_OB_GRAY, $04 ; ANIM_OBJ_AF
+ battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_4A, PAL_BATTLE_OB_GRAY, $04 ; ANIM_OBJ_RAIN
battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_4B, PAL_BATTLE_OB_RED, $1c ; ANIM_OBJ_B0
- battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_B1, BATTLEANIMFUNC_4C, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_B1
- battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4D, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_B2
- battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $27 ; ANIM_OBJ_B3
- battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_04, PAL_BATTLE_OB_BLUE, $15 ; ANIM_OBJ_B4
- battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4E, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_B5
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_B1, BATTLEANIMFUNC_4C, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_PSYCH_UP
+ battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4D, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_ANCIENTPOWER
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $27 ; ANIM_OBJ_AEROBLAST
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_04, PAL_BATTLE_OB_BLUE, $15 ; ANIM_OBJ_SHADOW_BALL
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4E, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_ROCK_SMASH
battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_08, PAL_BATTLE_OB_RED, $1e ; ANIM_OBJ_FLOWER
battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_4F, PAL_BATTLE_OB_RED, $1f ; ANIM_OBJ_COTTON
battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_00, PAL_BATTLE_OB_ENEMY, $28 ; ANIM_OBJ_PLAYERFEETFOLLOW
battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_ENEMYFEETFOLLOW
- battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B7, BATTLEANIMFUNC_00, PAL_BATTLE_OB_ENEMY, $28 ; ANIM_OBJ_BA
- battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B8, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_BB
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B7, BATTLEANIMFUNC_00, PAL_BATTLE_OB_ENEMY, $28 ; ANIM_OBJ_PLAYERHEADFOLLOW
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B8, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_ENEMYHEADFOLLOW
; ccfbe
diff --git a/data/battle_tower/classes.asm b/data/battle_tower/classes.asm
new file mode 100644
index 000000000..5a148e6ec
--- /dev/null
+++ b/data/battle_tower/classes.asm
@@ -0,0 +1,76 @@
+BattleTowerTrainers: ; 1f814e
+; The trainer class is not used in Crystal 1.0 due to a bug.
+; Instead, the sixth character in the trainer's name is used.
+; See BattleTowerText in engine/events/battle_tower/trainer_text.asm.
+ db "HANSON@@@@", FISHER
+ db "SAWYER@@@@", POKEMANIAC
+ db "MASUDA@@@@", GUITARIST
+ db "NICKEL@@@@", SCIENTIST
+ db "OLSON@@@@@", POKEFANM
+ db "ZABOROWSKI", LASS
+ db "WRIGHT@@@@", YOUNGSTER
+ db "ALEXANDER@", HIKER
+ db "KAWAKAMI@@", TEACHER
+ db "BICKETT@@@", POKEFANM
+ db "SAITO@@@@@", KIMONO_GIRL
+ db "CRAWFORD@@", BOARDER
+ db "DIAZ@@@@@@", PICNICKER
+ db "ERICKSON@@", BIKER
+ db "FAIRFIELD@", JUGGLER
+ db "HUNTER@@@@", POKEFANF
+ db "HILL@@@@@@", FIREBREATHER
+ db "JAVIER@@@@", SWIMMERF
+ db "KAUFMAN@@@", SWIMMERM
+ db "LANCASTER@", SKIER
+ db "McMAHILL@@", CAMPER
+; The following can only be sampled in Crystal 1.1.
+ db "OBRIEN@@@@", GENTLEMAN
+ db "FROST@@@@@", BEAUTY
+ db "MORSE@@@@@", SUPER_NERD
+ db "YUFUNE@@@@", BLACKBELT_T
+ db "RAJAN@@@@@", COOLTRAINERF
+ db "RODRIGUEZ@", OFFICER
+ db "SANTIAGO@@", PSYCHIC_T
+ db "STOCK@@@@@", POKEFANM
+ db "THURMAN@@@", SCIENTIST
+ db "VALENTINO@", BEAUTY
+ db "WAGNER@@@@", CAMPER
+ db "YATES@@@@@", BIRD_KEEPER
+ db "ANDREWS@@@", PICNICKER
+ db "BAHN@@@@@@", POKEMANIAC
+ db "MORI@@@@@@", SCIENTIST
+ db "BUCKMAN@@@", SAGE
+ db "COBB@@@@@@", SCHOOLBOY
+ db "HUGHES@@@@", FISHER
+ db "ARITA@@@@@", KIMONO_GIRL
+ db "EASTON@@@@", PSYCHIC_T
+ db "FREEMAN@@@", CAMPER
+ db "GIESE@@@@@", LASS
+ db "HATCHER@@@", GENTLEMAN
+ db "JACKSON@@@", POKEFANF
+ db "KAHN@@@@@@", POKEMANIAC
+ db "LEONG@@@@@", YOUNGSTER
+ db "MARINO@@@@", TEACHER
+ db "NEWMAN@@@@", SAILOR
+ db "NGUYEN@@@@", BLACKBELT_T
+ db "OGDEN@@@@@", SUPER_NERD
+ db "PARK@@@@@@", COOLTRAINERF
+ db "RAINE@@@@@", SWIMMERM
+ db "SELLS@@@@@", BIRD_KEEPER
+ db "ROCKWELL@@", BOARDER
+ db "THORNTON@@", LASS
+ db "TURNER@@@@", OFFICER
+ db "VAN DYKE@@", SKIER
+ db "WALKER@@@@", SCHOOLBOY
+ db "MEYER@@@@@", SWIMMERF
+ db "JOHNSON@@@", YOUNGSTER
+ db "ADAMS@@@@@", GUITARIST
+ db "SMITH@@@@@", BUG_CATCHER
+ db "TAJIRI@@@@", BUG_CATCHER
+ db "BAKER@@@@@", POKEMANIAC
+ db "COLLINS@@@", SCIENTIST
+ db "SMART@@@@@", SUPER_NERD
+ db "DYKSTRA@@@", SWIMMERF
+ db "EATON@@@@@", BIKER
+ db "WONG@@@@@@", FIREBREATHER
+; 1f8450
diff --git a/data/battle_tower.asm b/data/battle_tower/parties.asm
index d2e07fac3..c7008a247 100644
--- a/data/battle_tower.asm
+++ b/data/battle_tower/parties.asm
@@ -1,83 +1,7 @@
-BattleTowerTrainers: ; 1f814e
-; The trainer class is not used in Crystal 1.0 due to a bug.
-; Instead, the sixth character in the trainer's name is used.
-; See mobile/battle_tower_47.asm
- db "HANSON@@@@", FISHER
- db "SAWYER@@@@", POKEMANIAC
- db "MASUDA@@@@", GUITARIST
- db "NICKEL@@@@", SCIENTIST
- db "OLSON@@@@@", POKEFANM
- db "ZABOROWSKI", LASS
- db "WRIGHT@@@@", YOUNGSTER
- db "ALEXANDER@", HIKER
- db "KAWAKAMI@@", TEACHER
- db "BICKETT@@@", POKEFANM
- db "SAITO@@@@@", KIMONO_GIRL
- db "CRAWFORD@@", BOARDER
- db "DIAZ@@@@@@", PICNICKER
- db "ERICKSON@@", BIKER
- db "FAIRFIELD@", JUGGLER
- db "HUNTER@@@@", POKEFANF
- db "HILL@@@@@@", FIREBREATHER
- db "JAVIER@@@@", SWIMMERF
- db "KAUFMAN@@@", SWIMMERM
- db "LANCASTER@", SKIER
- db "McMAHILL@@", CAMPER
-; The following can only be sampled in Crystal 1.1.
- db "OBRIEN@@@@", GENTLEMAN
- db "FROST@@@@@", BEAUTY
- db "MORSE@@@@@", SUPER_NERD
- db "YUFUNE@@@@", BLACKBELT_T
- db "RAJAN@@@@@", COOLTRAINERF
- db "RODRIGUEZ@", OFFICER
- db "SANTIAGO@@", PSYCHIC_T
- db "STOCK@@@@@", POKEFANM
- db "THURMAN@@@", SCIENTIST
- db "VALENTINO@", BEAUTY
- db "WAGNER@@@@", CAMPER
- db "YATES@@@@@", BIRD_KEEPER
- db "ANDREWS@@@", PICNICKER
- db "BAHN@@@@@@", POKEMANIAC
- db "MORI@@@@@@", SCIENTIST
- db "BUCKMAN@@@", SAGE
- db "COBB@@@@@@", SCHOOLBOY
- db "HUGHES@@@@", FISHER
- db "ARITA@@@@@", KIMONO_GIRL
- db "EASTON@@@@", PSYCHIC_T
- db "FREEMAN@@@", CAMPER
- db "GIESE@@@@@", LASS
- db "HATCHER@@@", GENTLEMAN
- db "JACKSON@@@", POKEFANF
- db "KAHN@@@@@@", POKEMANIAC
- db "LEONG@@@@@", YOUNGSTER
- db "MARINO@@@@", TEACHER
- db "NEWMAN@@@@", SAILOR
- db "NGUYEN@@@@", BLACKBELT_T
- db "OGDEN@@@@@", SUPER_NERD
- db "PARK@@@@@@", COOLTRAINERF
- db "RAINE@@@@@", SWIMMERM
- db "SELLS@@@@@", BIRD_KEEPER
- db "ROCKWELL@@", BOARDER
- db "THORNTON@@", LASS
- db "TURNER@@@@", OFFICER
- db "VAN DYKE@@", SKIER
- db "WALKER@@@@", SCHOOLBOY
- db "MEYER@@@@@", SWIMMERF
- db "JOHNSON@@@", YOUNGSTER
- db "ADAMS@@@@@", GUITARIST
- db "SMITH@@@@@", BUG_CATCHER
- db "TAJIRI@@@@", BUG_CATCHER
- db "BAKER@@@@@", POKEMANIAC
- db "COLLINS@@@", SCIENTIST
- db "SMART@@@@@", SUPER_NERD
- db "DYKSTRA@@@", SWIMMERF
- db "EATON@@@@@", BIKER
- db "WONG@@@@@@", FIREBREATHER
-; 1f8450
-
-
BattleTowerMons: ; 1f8450
; 10 groups of 21 mons.
+
+
BattleTowerMons1:
db JOLTEON
diff --git a/text/battle_tower.asm b/data/battle_tower/trainer_text.asm
index 53af5a9e6..53af5a9e6 100644
--- a/text/battle_tower.asm
+++ b/data/battle_tower/trainer_text.asm
diff --git a/data/battle_tower_2.asm b/data/battle_tower/unknown.asm
index 81c9515fb..81c9515fb 100755
--- a/data/battle_tower_2.asm
+++ b/data/battle_tower/unknown.asm
diff --git a/data/battle_tower/unknown_levels.asm b/data/battle_tower/unknown_levels.asm
new file mode 100644
index 000000000..ca2b20cef
--- /dev/null
+++ b/data/battle_tower/unknown_levels.asm
@@ -0,0 +1,35 @@
+Unknown_170470:
+ db $12
+ db $24
+ db $45
+ db $45
+ db $42
+ db $42
+ db $45
+ db $42
+ db $27
+ db $27
+ db $45
+ db $27
+ db $42
+ db $24
+
+Unknown_17047e:
+ db $03, 4
+ db $05, 8
+ db $03, 5
+ db $0e, 6
+ db $03, 2
+ db $00, 0
+ db $39, 7
+ db $07, 4
+ db $00, 5
+ db $04, 7
+ db $01, 5
+ db $00, 0
+ db $0f, 5
+ db $14, 7
+ db $05, 5
+ db $11, 12
+ db $0c, 6
+ db $06, 4
diff --git a/data/bug_contest_flags.asm b/data/bug_contest_flags.asm
new file mode 100644
index 000000000..04d748270
--- /dev/null
+++ b/data/bug_contest_flags.asm
@@ -0,0 +1,13 @@
+BugCatchingContestantEventFlagTable: ; 139fe
+; there are NUM_BUG_CONTESTANTS entries
+ dw EVENT_BUG_CATCHING_CONTESTANT_1A
+ dw EVENT_BUG_CATCHING_CONTESTANT_2A
+ dw EVENT_BUG_CATCHING_CONTESTANT_3A
+ dw EVENT_BUG_CATCHING_CONTESTANT_4A
+ dw EVENT_BUG_CATCHING_CONTESTANT_5A
+ dw EVENT_BUG_CATCHING_CONTESTANT_6A
+ dw EVENT_BUG_CATCHING_CONTESTANT_7A
+ dw EVENT_BUG_CATCHING_CONTESTANT_8A
+ dw EVENT_BUG_CATCHING_CONTESTANT_9A
+ dw EVENT_BUG_CATCHING_CONTESTANT_10A
+; 13a12
diff --git a/data/bug_contest_winners.asm b/data/bug_contest_winners.asm
index 8529ed0f0..7a465edf5 100644
--- a/data/bug_contest_winners.asm
+++ b/data/bug_contest_winners.asm
@@ -1,5 +1,6 @@
BugContestantPointers: ; 13783
- dw BugContestant_BugCatcherDon ; This reverts back to the player
+; there are NUM_BUG_CONTESTANTS + 1 entries
+ dw BugContestant_BugCatcherDon ; this reverts back to the player
dw BugContestant_BugCatcherDon
dw BugContestant_BugCatcherEd
dw BugContestant_CooltrainerMNick
@@ -12,6 +13,12 @@ BugContestantPointers: ; 13783
dw BugContestant_SchoolboyKipp
; 13799
+; contestant format:
+; db class, id
+; dbw 1st-place mon, score
+; dbw 2nd-place mon, score
+; dbw 3rd-place mon, score
+
BugContestant_BugCatcherDon:
db BUG_CATCHER, DON
dbw KAKUNA, 300
diff --git a/data/common_text/common_text.asm b/data/common_text/common_text.asm
new file mode 100644
index 000000000..2f88b4e9d
--- /dev/null
+++ b/data/common_text/common_text.asm
@@ -0,0 +1,16 @@
+INCLUDE "constants.asm"
+
+
+SECTION "Text 1", ROMX
+
+INCLUDE "data/common_text/common_text_1.asm"
+
+
+SECTION "Text 2", ROMX
+
+INCLUDE "data/common_text/common_text_2.asm"
+
+
+SECTION "Text 3", ROMX
+
+INCLUDE "data/common_text/common_text_3.asm"
diff --git a/text/common_1.asm b/data/common_text/common_text_1.asm
index 34694b31e..34694b31e 100644
--- a/text/common_1.asm
+++ b/data/common_text/common_text_1.asm
diff --git a/text/common_3.asm b/data/common_text/common_text_2.asm
index 6f42c0bc3..268d10ca3 100644
--- a/text/common_3.asm
+++ b/data/common_text/common_text_2.asm
@@ -1,3 +1,313 @@
+UnknownText_0x1c0000::
+ text "Oh, no picture?"
+ line "Come again, OK?"
+ done
+
+UnknownText_0x1c0021::
+ text "An EGG? My talent"
+ line "is worth more…"
+ done
+
+UnknownText_0x1c0043::
+ text "Hello, hello! I'm"
+ line "the NAME RATER."
+
+ para "I rate the names"
+ line "of #MON."
+
+ para "Would you like me"
+ line "to rate names?"
+ done
+
+UnknownText_0x1c00a0::
+ text "Which #MON's"
+ line "nickname should I"
+ cont "rate for you?"
+ prompt
+
+UnknownText_0x1c00cd::
+ text "Hm… @"
+ text_from_ram StringBuffer1
+ text "…"
+ line "That's a fairly"
+ cont "decent name."
+
+ para "But, how about a"
+ line "slightly better"
+ cont "nickname?"
+
+ para "Want me to give it"
+ line "a better name?"
+ done
+
+UnknownText_0x1c0142::
+ text "All right. What"
+ line "name should we"
+ cont "give it, then?"
+ prompt
+
+UnknownText_0x1c0171::
+ text "That's a better"
+ line "name than before!"
+
+ para "Well done!"
+ done
+
+UnknownText_0x1c019e::
+ text "OK, then. Come"
+ line "again sometime."
+ done
+
+UnknownText_0x1c01be::
+ text "Hm… @"
+ text_from_ram StringBuffer1
+ text "?"
+ line "What a great name!"
+ cont "It's perfect."
+
+ para "Treat @"
+ text_from_ram StringBuffer1
+ text ""
+ line "with loving care."
+ done
+
+UnknownText_0x1c0208::
+ text "Whoa… That's just"
+ line "an EGG."
+ done
+
+UnknownText_0x1c0222::
+ text "It might look the"
+ line "same as before,"
+
+ para "but this new name"
+ line "is much better!"
+
+ para "Well done!"
+ done
+
+UnknownText_0x1c0272::
+ text "All right. This"
+ line "#MON is now"
+ cont "named @"
+ text_from_ram StringBuffer1
+ text "."
+ prompt
+
+Text_Gained::
+ text_from_ram StringBuffer1
+ text " gained@@"
+
+Text_ABoostedStringBuffer2ExpPoints::
+ text ""
+ line "a boosted"
+ cont "@"
+ deciram StringBuffer2, 2, 4
+ text " EXP. Points!"
+ prompt
+
+Text_StringBuffer2ExpPoints::
+ text ""
+ line "@"
+ deciram StringBuffer2, 2, 4
+ text " EXP. Points!"
+ prompt
+
+Text_GoPkmn::
+ text "Go! @@"
+
+Text_DoItPkmn::
+ text "Do it! @@"
+
+Text_GoForItPkmn::
+ text "Go for it,"
+ line "@@"
+
+Text_YourFoesWeakGetmPkmn::
+ text "Your foe's weak!"
+ line "Get'm, @@"
+
+Text_BattleMonNick01::
+ text_from_ram BattleMonNick
+ text "!"
+ done
+
+Text_BattleMonNickComma::
+ text_from_ram BattleMonNick
+ text ",@@"
+
+Text_ThatsEnoughComeBack::
+ text " that's"
+ line "enough! Come back!@@"
+
+Text_OKComeBack::
+ text " OK!"
+ line "Come back!@@"
+
+Text_GoodComeBack::
+ text " good!"
+ line "Come back!@@"
+
+Text_ComeBack::
+ text " come"
+ line "back!"
+ done
+
+UnknownText_0x1c0373::
+ text "Booted up a TM."
+ prompt
+
+UnknownText_0x1c0384::
+ text "Booted up an HM."
+ prompt
+
+UnknownText_0x1c0396::
+ text "It contained"
+ line "@"
+ text_from_ram StringBuffer2
+ text "."
+
+ para "Teach @"
+ text_from_ram StringBuffer2
+ text ""
+ line "to a #MON?"
+ done
+
+UnknownText_0x1c03c2::
+ text_from_ram StringBuffer2
+ text " is"
+ line "not compatible"
+ cont "with @"
+ text_from_ram StringBuffer1
+ text "."
+
+ para "It can't learn"
+ line "@"
+ text_from_ram StringBuffer2
+ text "."
+ prompt
+
+UnknownText_0x1c03fa::
+ text "You have no room"
+ line "for any more"
+ cont "@"
+ text_from_ram StringBuffer1
+ text "S."
+ prompt
+
+UnknownText_0x1c0421::
+ text "You received"
+ line "@"
+ text_from_ram StringBuffer1
+ text "!"
+ prompt
+
+UnknownText_0x1c0436::
+ text "The link has been"
+ line "cancelled."
+ prompt
+
+UnknownText_0x1c0454::
+ text "Communication"
+ line "error."
+ prompt
+
+UnknownText_0x1c046a::
+ text "Must retrieve GIFT"
+ line "at #MON CENTER."
+ prompt
+
+UnknownText_0x1c048e::
+ text "Your friend isn't"
+ line "ready."
+ prompt
+
+UnknownText_0x1c04a7::
+ text "Sorry--only five"
+ line "GIFTS a day."
+ prompt
+
+UnknownText_0x1c04c6::
+ text "Sorry. One GIFT"
+ line "a day per person."
+ prompt
+
+UnknownText_0x1c04e9::
+ text_from_ram wMysteryGiftPartnerName
+ text " sent"
+ line "@"
+ text_from_ram StringBuffer1
+ text "."
+ prompt
+
+UnknownText_0x1c04fa::
+ text_from_ram wMysteryGiftPartnerName
+ text " sent"
+ line "@"
+ text_from_ram StringBuffer1
+ text ""
+ cont "to @"
+ text_from_ram wMysteryGiftPlayerName
+ text "'s home."
+ prompt
+
+UnknownText_0x1c051a::
+ text "Received"
+ line "@"
+ text_from_ram wc850
+ text "'s CARD."
+ prompt
+
+UnknownText_0x1c0531::
+ text_from_ram wc850
+ text "'s CARD was"
+ line "listed as no.@"
+ deciram wd265, 1, 2
+ text "."
+ prompt
+
+UnknownText_0x1c0555::
+ text "The CARD was not"
+ line "registered."
+ prompt
+
+UnknownText_0x1c0573::
+ text "The link has been"
+ line "cancelled."
+ prompt
+
+UnknownText_0x1c0591::
+ text "Communication"
+ line "error."
+ prompt
+
+_BadgeRequiredText::
+ text "Sorry! A new BADGE"
+ line "is required."
+ prompt
+
+UnknownText_0x1c05c8::
+ text "Can't use that"
+ line "here."
+ prompt
+
+UnknownText_0x1c05dd::
+ text_from_ram StringBuffer2
+ text " used"
+ line "CUT!"
+ prompt
+
+UnknownText_0x1c05ec::
+ text "There's nothing to"
+ line "CUT here."
+ prompt
+
+UnknownText_0x1c0609::
+ text "A blinding FLASH"
+ line "lights the area!@"
+ text_waitbutton
+ db "@@"
+
_UsedSurfText::
text_from_ram StringBuffer2
text " used"
diff --git a/text/common_5.asm b/data/common_text/common_text_3.asm
index ee9d32a8b..f1611bddb 100644
--- a/text/common_5.asm
+++ b/data/common_text/common_text_3.asm
@@ -1,3 +1,687 @@
+_OakText6::
+ text "Now, what did you"
+ line "say your name was?"
+ prompt
+
+_OakText7::
+ text "<PLAYER>, are you"
+ line "ready?"
+
+ para "Your very own"
+ line "#MON story is"
+ cont "about to unfold."
+
+ para "You'll face fun"
+ line "times and tough"
+ cont "challenges."
+
+ para "A world of dreams"
+ line "and adventures"
+
+ para "with #MON"
+ line "awaits! Let's go!"
+
+ para "I'll be seeing you"
+ line "later!"
+ done
+
+UnknownText_0x1c40e6::
+ text "The clock's time"
+ line "may be wrong."
+
+ para "Please reset the"
+ line "time."
+ prompt
+
+UnknownText_0x1c411c::
+ text "Set with the"
+ line "Control Pad."
+
+ para "Confirm: A Button"
+ line "Cancel: B Button"
+ done
+
+UnknownText_0x1c415b::
+ text "Is this OK?"
+ done
+
+UnknownText_0x1c4168::
+ text "The clock has been"
+ line "reset."
+ done
+
+UnknownText_0x1c4183::
+ text "Too much time has"
+ line "elapsed. Please"
+ cont "try again."
+ prompt
+
+UnknownText_0x1c41b1::
+ text "If you trade that"
+ line "#MON, you won't"
+ cont "be able to battle."
+ prompt
+
+UnknownText_0x1c41e6::
+ text "Your friend's"
+ line "@"
+ text_from_ram StringBuffer1
+ text " appears"
+ cont "to be abnormal!"
+ prompt
+
+UnknownText_0x1c4212::
+ text "Trade @"
+ text_from_ram wd004
+ text ""
+ line "for @"
+ text_from_ram StringBuffer1
+ text "?"
+ done
+
+UnknownText_0x1c422a::
+ text "To enter a mobile"
+ line "battle, you must"
+
+ para "pick a team of"
+ line "three #MON."
+
+ para "Is that OK?"
+ done
+
+UnknownText_0x1c4275::
+ text "Need more info on"
+ line "mobile battles?"
+ done
+
+UnknownText_0x1c4298::
+ text "For a mobile"
+ line "battle, choose"
+ cont "three #MON."
+
+ para "The maximum daily"
+ line "play time is ten"
+
+ para "minutes for each"
+ line "linked player."
+
+ para "If a battle isn't"
+ line "finished within"
+
+ para "the time limit,"
+ line "the player with"
+
+ para "the fewest fainted"
+ line "#MON wins."
+
+ para "If tied, the team"
+ line "that lost the"
+
+ para "least amount of HP"
+ line "wins."
+ done
+
+UnknownText_0x1c439c::
+ text "Today's remaining"
+ line "time is @"
+ deciram StringBuffer2, 1, 2
+ text " min."
+
+ para "Would you like to"
+ line "battle?"
+ done
+
+UnknownText_0x1c43dc::
+ text "There are only @"
+ deciram StringBuffer2, 1, 2
+ text ""
+ line "min. left today."
+
+ para "Want a quick"
+ line "battle?"
+ done
+
+UnknownText_0x1c4419::
+ text "There is only"
+ line "1 min. left today!"
+
+ para "Want to rush"
+ line "through a battle?"
+ done
+
+UnknownText_0x1c445a::
+ text "There is less than"
+ line "1 min. left today!"
+
+ para "Please try again"
+ line "tomorrow."
+ done
+
+UnknownText_0x1c449c::
+ text "Try again using"
+ line "the same settings?"
+ done
+
+UnknownText_0x1c44c0::
+ text "There is less than"
+ line "1 min. left today!"
+ done
+
+UnknownText_0x1c44e7::
+ text "No time left for"
+ line "linking today."
+ done
+
+UnknownText_0x1c4508::
+ text "Pick three #MON"
+ line "for battle."
+ done
+
+UnknownText_0x1c4525::
+ text "Today's remaining"
+ line "time is @"
+ deciram StringBuffer2, 1, 2
+ text " min."
+ done
+
+UnknownText_0x1c454b::
+ text "Would you like to"
+ line "save the game?"
+ done
+
+UnknownText_0x1c456d::
+ text "SAVING… DON'T TURN"
+ line "OFF THE POWER."
+ done
+
+UnknownText_0x1c4590::
+ text "<PLAYER> saved"
+ line "the game."
+ done
+
+UnknownText_0x1c45a3::
+ text "There is already a"
+ line "save file. Is it"
+ cont "OK to overwrite?"
+ done
+
+UnknownText_0x1c45d9::
+ text "There is another"
+ line "save file. Is it"
+ cont "OK to overwrite?"
+ done
+
+UnknownText_0x1c460d::
+ text "The save file is"
+ line "corrupted!"
+ prompt
+
+UnknownText_0x1c462a::
+ text "When you change a"
+ line "#MON BOX, data"
+ cont "will be saved. OK?"
+ done
+
+UnknownText_0x1c465f::
+ text "Each time you move"
+ line "a #MON, data"
+ cont "will be saved. OK?"
+ done
+
+UnknownText_0x1c4693::
+ text "The window save"
+ line "area was exceeded."
+ done
+
+UnknownText_0x1c46b7::
+ text "No windows avail-"
+ line "able for popping."
+ done
+
+UnknownText_0x1c46dc::
+ text "Corrupted event!"
+ prompt
+
+_ObjectEventText::
+ text "Object event"
+ done
+
+UnknownText_0x1c46fc::
+ text "BG event"
+ done
+
+UnknownText_0x1c4706::
+ text "Coordinates event"
+ done
+
+UnknownText_0x1c4719::
+ text "<PLAYER> received"
+ line "@"
+ text_from_ram StringBuffer4
+ text "."
+ done
+
+UnknownText_0x1c472c::
+ text "<PLAYER> put the"
+ line "@"
+ text_from_ram StringBuffer1
+ text " in"
+ cont "the @"
+ text_from_ram StringBuffer3
+ text "."
+ prompt
+
+UnknownText_0x1c474b::
+ text "The @"
+ text_from_ram StringBuffer3
+ text ""
+ line "is full…"
+ prompt
+
+UnknownText_0x1c475f::
+ text "I see all."
+ line "I know all…"
+
+ para "Certainly, I know"
+ line "of your #MON!"
+ done
+
+UnknownText_0x1c4797::
+ text "Whaaaat? I can't"
+ line "tell a thing!"
+
+ para "How could I not"
+ line "know of this?"
+ done
+
+UnknownText_0x1c47d4::
+ text "Hm… I see you met"
+ line "@"
+ text_from_ram wSeerNickname
+ text " here:"
+ cont "@"
+ text_from_ram wSeerCaughtLocation
+ text "!"
+ prompt
+
+UnknownText_0x1c47fa::
+ text "The time was"
+ line "@"
+ text_from_ram wSeerTimeOfDay
+ text "!"
+
+ para "Its level was @"
+ text_from_ram wSeerCaughtLevelString
+ text "!"
+
+ para "Am I good or what?"
+ prompt
+
+UnknownText_0x1c4837::
+ text "Hm… @"
+ text_from_ram wSeerNickname
+ text ""
+ line "came from @"
+ text_from_ram wSeerOTName
+ text ""
+ cont "in a trade?"
+
+ para "@"
+ text_from_ram wSeerCaughtLocation
+ text ""
+ line "was where @"
+ text_from_ram wSeerOTName
+ text ""
+ cont "met @"
+ text_from_ram wSeerNickname
+ text "!"
+ prompt
+
+UnknownText_0x1c487f::
+ text "What!? Incredible!"
+
+ para "I don't understand"
+ line "how, but it is"
+
+ para "incredible!"
+ line "You are special."
+
+ para "I can't tell where"
+ line "you met it, but it"
+ cont "was at level @"
+ text_from_ram wSeerCaughtLevelString
+ text "."
+
+ para "Am I good or what?"
+ prompt
+
+UnknownText_0x1c491d::
+ text "Hey!"
+
+ para "That's an EGG!"
+
+ para "You can't say that"
+ line "you've met it yet…"
+ done
+
+UnknownText_0x1c4955::
+ text "Fufufu! I saw that"
+ line "you'd do nothing!"
+ done
+
+UnknownText_0x1c497a::
+ text "Incidentally…"
+
+ para "It would be wise"
+ line "to raise your"
+
+ para "#MON with a"
+ line "little more care."
+ done
+
+UnknownText_0x1c49c6::
+ text "Incidentally…"
+
+ para "It seems to have"
+ line "grown a little."
+
+ para "@"
+ text_from_ram wSeerNickname
+ text " seems"
+ line "to be becoming"
+ cont "more confident."
+ done
+
+UnknownText_0x1c4a21::
+ text "Incidentally…"
+
+ para "@"
+ text_from_ram wSeerNickname
+ text " has"
+ line "grown. It's gained"
+ cont "much strength."
+ done
+
+UnknownText_0x1c4a5b::
+ text "Incidentally…"
+
+ para "It certainly has"
+ line "grown mighty!"
+
+ para "This @"
+ text_from_ram wSeerNickname
+ text ""
+ line "must have come"
+
+ para "through numerous"
+ line "#MON battles."
+
+ para "It looks brimming"
+ line "with confidence."
+ done
+
+UnknownText_0x1c4ae5::
+ text "Incidentally…"
+
+ para "I'm impressed by"
+ line "your dedication."
+
+ para "It's been a long"
+ line "time since I've"
+
+ para "seen a #MON as"
+ line "mighty as this"
+ cont "@"
+ text_from_ram wSeerNickname
+ text "."
+
+ para "I'm sure that"
+ line "seeing @"
+ text_from_ram wSeerNickname
+ text ""
+ para "in battle would"
+ line "excite anyone."
+ done
+
+UnknownText_0x1c4b92::
+ text "Congratulations!"
+ line "Your @"
+ text_from_ram StringBuffer2
+ db "@@"
+
+UnknownText_0x1c4baf::
+ text ""
+ para "evolved into"
+ line "@"
+ text_from_ram StringBuffer1
+ text "!"
+ done
+
+UnknownText_0x1c4bc5::
+ text "Huh? @"
+ text_from_ram StringBuffer2
+ text ""
+ line "stopped evolving!"
+ prompt
+
+UnknownText_0x1c4be3::
+ text "What? @"
+ text_from_ram StringBuffer2
+ text ""
+ line "is evolving!"
+ done
+
+UnknownText_0x1c4bfd::
+ text "How many?"
+ done
+
+UnknownText_0x1c4c08::
+ deciram wItemQuantityChangeBuffer, 1, 2
+ text " @"
+ text_from_ram StringBuffer2
+ text "(S)"
+ line "will be ¥@"
+ deciram hMoneyTemp, 3, 6
+ text "."
+ done
+
+UnknownText_0x1c4c28::
+ text "Hello, dear."
+
+ para "I sell inexpensive"
+ line "herbal medicine."
+
+ para "They're good, but"
+ line "a trifle bitter."
+
+ para "Your #MON may"
+ line "not like them."
+
+ para "Hehehehe…"
+ done
+
+UnknownText_0x1c4ca3::
+ text "How many?"
+ done
+
+UnknownText_0x1c4cae::
+ deciram wItemQuantityChangeBuffer, 1, 2
+ text " @"
+ text_from_ram StringBuffer2
+ text "(S)"
+ line "will be ¥@"
+ deciram hMoneyTemp, 3, 6
+ text "."
+ done
+
+UnknownText_0x1c4cce::
+ text "Thank you, dear."
+ line "Hehehehe…"
+ done
+
+UnknownText_0x1c4cea::
+ text "Oh? Your PACK is"
+ line "full, dear."
+ done
+
+UnknownText_0x1c4d08::
+ text "Hehehe… You don't"
+ line "have the money."
+ done
+
+UnknownText_0x1c4d2a::
+ text "Come again, dear."
+ line "Hehehehe…"
+ done
+
+UnknownText_0x1c4d47::
+ text "Hiya! Care to see"
+ line "some bargains?"
+
+ para "I sell rare items"
+ line "that nobody else"
+
+ para "carries--but only"
+ line "one of each item."
+ done
+
+UnknownText_0x1c4db0::
+ text_from_ram StringBuffer2
+ text " costs"
+ line "¥@"
+ deciram hMoneyTemp, 3, 6
+ text ". Want it?"
+ done
+
+UnknownText_0x1c4dcd::
+ text "Thanks."
+ done
+
+UnknownText_0x1c4dd6::
+ text "Uh-oh, your PACK"
+ line "is chock-full."
+ done
+
+UnknownText_0x1c4df7::
+ text "You bought that"
+ line "already. I'm all"
+ cont "sold out of it."
+ done
+
+UnknownText_0x1c4e28::
+ text "Uh-oh, you're"
+ line "short on funds."
+ done
+
+UnknownText_0x1c4e46::
+ text "Come by again"
+ line "sometime."
+ done
+
+UnknownText_0x1c4e5f::
+ text "What's up? Need"
+ line "some medicine?"
+ done
+
+UnknownText_0x1c4e7e::
+ text "How many?"
+ done
+
+UnknownText_0x1c4e89::
+ deciram wItemQuantityChangeBuffer, 1, 2
+ text " @"
+ text_from_ram StringBuffer2
+ text "(S)"
+ line "will cost ¥@"
+ deciram hMoneyTemp, 3, 6
+ text "."
+ done
+
+UnknownText_0x1c4eab::
+ text "Thanks much!"
+ done
+
+UnknownText_0x1c4eb9::
+ text "You don't have any"
+ line "more space."
+ done
+
+UnknownText_0x1c4ed8::
+ text "Huh? That's not"
+ line "enough money."
+ done
+
+UnknownText_0x1c4ef6::
+ text "All right."
+ line "See you around."
+ done
+
+UnknownText_0x1c4f12::
+ text "You don't have"
+ line "anything to sell."
+ prompt
+
+UnknownText_0x1c4f33::
+ text "How many?"
+ done
+
+UnknownText_0x1c4f3e::
+ text "I can pay you"
+ line "¥@"
+ deciram hMoneyTemp, 3, 6
+ text "."
+
+ para "Is that OK?"
+ done
+
+UnknownText_0x1c4f62::
+ text "Welcome! How may I"
+ line "help you?"
+ done
+
+UnknownText_0x1c4f80::
+ text "Here you are."
+ line "Thank you!"
+ done
+
+UnknownText_0x1c4f9a::
+ text "You don't have"
+ line "enough money."
+ done
+
+UnknownText_0x1c4fb7::
+ text "You can't carry"
+ line "any more items."
+ done
+
+UnknownText_0x1c4fd7::
+ text "Sorry, I can't buy"
+ line "that from you."
+ prompt
+
+UnknownText_0x1c4ff9::
+ text "Please come again!"
+ done
+
+UnknownText_0x1c500d::
+ text "Can I do anything"
+ line "else for you?"
+ done
+
+UnknownText_0x1c502e::
+ text "Got ¥@"
+ deciram hMoneyTemp, 3, 6
+ text " for"
+ line "@"
+ text_from_ram StringBuffer2
+ text "(S)."
+ done
+
+UnknownText_0x1c5049::
+ text "Bet how many"
+ line "coins?"
+ done
+
UnknownText_0x1c505e::
text "Start!"
done
diff --git a/data/mystery_gift_decos.asm b/data/decorations/mystery_gift_decos.asm
index bdd4694c6..bdd4694c6 100644
--- a/data/mystery_gift_decos.asm
+++ b/data/decorations/mystery_gift_decos.asm
diff --git a/data/elevator_floors.asm b/data/elevator_floors.asm
new file mode 100644
index 000000000..abc793cf2
--- /dev/null
+++ b/data/elevator_floors.asm
@@ -0,0 +1,35 @@
+ElevatorFloorNames:
+; entries correspond to FLOOR_* constants
+ dw .B4F
+ dw .B3F
+ dw .B2F
+ dw .B1F
+ dw ._1F
+ dw ._2F
+ dw ._3F
+ dw ._4F
+ dw ._5F
+ dw ._6F
+ dw ._7F
+ dw ._8F
+ dw ._9F
+ dw ._10F
+ dw ._11F
+ dw .ROOF
+
+.B4F: db "B4F@"
+.B3F: db "B3F@"
+.B2F: db "B2F@"
+.B1F: db "B1F@"
+._1F: db "1F@"
+._2F: db "2F@"
+._3F: db "3F@"
+._4F: db "4F@"
+._5F: db "5F@"
+._6F: db "6F@"
+._7F: db "7F@"
+._8F: db "8F@"
+._9F: db "9F@"
+._10F: db "10F@"
+._11F: db "11F@"
+.ROOF: db "ROOF@"
diff --git a/data/items/apricorn_balls.asm b/data/items/apricorn_balls.asm
new file mode 100644
index 000000000..57e7d04bb
--- /dev/null
+++ b/data/items/apricorn_balls.asm
@@ -0,0 +1,11 @@
+ApricornBalls: ; 24ca0
+ ; apricorn, ball
+ db RED_APRICORN, LEVEL_BALL
+ db BLU_APRICORN, LURE_BALL
+ db YLW_APRICORN, MOON_BALL
+ db GRN_APRICORN, FRIEND_BALL
+ db WHT_APRICORN, FAST_BALL
+ db BLK_APRICORN, HEAVY_BALL
+ db PNK_APRICORN, LOVE_BALL
+ db -1
+; 24caf
diff --git a/data/items/attributes.asm b/data/items/attributes.asm
index dc2842760..5212be6d2 100644
--- a/data/items/attributes.asm
+++ b/data/items/attributes.asm
@@ -7,57 +7,57 @@ ENDM
ItemAttributes: ; 67c1
; entries correspond to constants/item_constants.asm
-; MASTER BALL
+; MASTER_BALL
item_attribute 0, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; ULTRA BALL
+; ULTRA_BALL
item_attribute 1200, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
; BRIGHTPOWDER
item_attribute 10, HELD_BRIGHTPOWDER, 20, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; GREAT BALL
+; GREAT_BALL
item_attribute 600, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; # BALL
+; POKE_BALL
item_attribute 200, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; TERU-SAMA
+; TOWN_MAP
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; BICYCLE
item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; MOON STONE
+; MOON_STONE
item_attribute 0, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; ANTIDOTE
item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; BURN HEAL
+; BURN_HEAL
item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; ICE HEAL
+; ICE_HEAL
item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; AWAKENING
item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; PARLYZ HEAL
+; PARLYZ_HEAL
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; FULL RESTORE
+; FULL_RESTORE
item_attribute 3000, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; MAX POTION
+; MAX_POTION
item_attribute 2500, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; HYPER POTION
+; HYPER_POTION
item_attribute 1200, 0, 200, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; SUPER POTION
+; SUPER_POTION
item_attribute 700, 0, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; POTION
item_attribute 300, 0, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; ESCAPE ROPE
+; ESCAPE_ROPE
item_attribute 550, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
; REPEL
item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-; MAX ELIXER
+; MAX_ELIXER
item_attribute 4500, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; FIRE STONE
+; FIRE_STONE
item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; THUNDERSTONE
item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; WATER STONE
+; WATER_STONE
item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_19
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; HP UP
+; HP_UP
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; PROTEIN
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
@@ -65,159 +65,159 @@ ItemAttributes: ; 67c1
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; CARBOS
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; LUCKY PUNCH
+; LUCKY_PUNCH
item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; CALCIUM
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; RARE CANDY
+; RARE_CANDY
item_attribute 4800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; X ACCURACY
+; X_ACCURACY
item_attribute 950, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; LEAF STONE
+; LEAF_STONE
item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; METAL POWDER
+; METAL_POWDER
item_attribute 10, HELD_METAL_POWDER, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; NUGGET
item_attribute 10000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; # DOLL
+; POKE_DOLL
item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; FULL HEAL
+; FULL_HEAL
item_attribute 600, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; REVIVE
item_attribute 1500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; MAX REVIVE
+; MAX_REVIVE
item_attribute 4000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; GUARD SPEC.
+; GUARD_SPEC
item_attribute 700, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; SUPER REPEL
+; SUPER_REPEL
item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-; MAX REPEL
+; MAX_REPEL
item_attribute 700, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-; DIRE HIT
+; DIRE_HIT
item_attribute 650, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; TERU-SAMA
+; ITEM_2D
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; FRESH WATER
+; FRESH_WATER
item_attribute 200, 0, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; SODA POP
+; SODA_POP
item_attribute 300, 0, 60, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; LEMONADE
item_attribute 350, 0, 80, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; X ATTACK
+; X_ATTACK
item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; TERU-SAMA
+; ITEM_32
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; X DEFEND
+; X_DEFEND
item_attribute 550, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; X SPEED
+; X_SPEED
item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; X SPECIAL
+; X_SPECIAL
item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; COIN CASE
+; COIN_CASE
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
; ITEMFINDER
item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; POKE_FLUTE
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; EXP.SHARE
+; EXP_SHARE
item_attribute 3000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; OLD ROD
+; OLD_ROD
item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; GOOD ROD
+; GOOD_ROD
item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; SILVER LEAF
+; SILVER_LEAF
item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SUPER ROD
+; SUPER_ROD
item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; PP UP
+; PP_UP
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; ETHER
item_attribute 1200, 0, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; MAX ETHER
+; MAX_ETHER
item_attribute 2000, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; ELIXER
item_attribute 3000, 0, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; RED SCALE
+; RED_SCALE
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; SECRETPOTION
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; S.S.TICKET
+; S_S_TICKET
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; MYSTERY EGG
+; MYSTERY_EGG
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; CLEAR BELL
+; CLEAR_BELL
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SILVER WING
+; SILVER_WING
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; MOOMOO MILK
+; MOOMOO_MILK
item_attribute 500, 0, 100, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; QUICK CLAW
+; QUICK_CLAW
item_attribute 100, HELD_QUICK_CLAW, 60, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; PSNCUREBERRY
item_attribute 10, HELD_HEAL_POISON, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; GOLD LEAF
+; GOLD_LEAF
item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SOFT SAND
+; SOFT_SAND
item_attribute 100, HELD_GROUND_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SHARP BEAK
+; SHARP_BEAK
item_attribute 100, HELD_FLYING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; PRZCUREBERRY
item_attribute 10, HELD_HEAL_PARALYZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; BURNT BERRY
+; BURNT_BERRY
item_attribute 10, HELD_HEAL_FREEZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; ICE BERRY
+; ICE_BERRY
item_attribute 10, HELD_HEAL_BURN, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; POISON BARB
+; POISON_BARB
item_attribute 100, HELD_POISON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; KING'S ROCK
+; KINGS_ROCK
item_attribute 100, HELD_FLINCH, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BITTER BERRY
+; BITTER_BERRY
item_attribute 10, HELD_HEAL_CONFUSION, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_PARTY
-; MINT BERRY
+; MINT_BERRY
item_attribute 10, HELD_HEAL_SLEEP, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; RED APRICORN
+; RED_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; TINYMUSHROOM
item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BIG MUSHROOM
+; BIG_MUSHROOM
item_attribute 5000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; SILVERPOWDER
item_attribute 100, HELD_BUG_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BLU APRICORN
+; BLU_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_5A
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; AMULET COIN
+; AMULET_COIN
item_attribute 100, HELD_AMULET_COIN, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; YLW APRICORN
+; YLW_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; GRN APRICORN
+; GRN_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; CLEANSE TAG
+; CLEANSE_TAG
item_attribute 200, HELD_CLEANSE_TAG, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; MYSTIC WATER
+; MYSTIC_WATER
item_attribute 100, HELD_WATER_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; TWISTEDSPOON
item_attribute 100, HELD_PSYCHIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; WHT APRICORN
+; WHT_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; BLACKBELT
item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BLK APRICORN
+; BLK_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_64
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; PNK APRICORN
+; PNK_APRICORN
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; BLACKGLASSES
item_attribute 100, HELD_DARK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; SLOWPOKETAIL
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; PINK BOW
+; PINK_BOW
item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; STICK
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SMOKE BALL
+; SMOKE_BALL
item_attribute 200, HELD_ESCAPE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; NEVERMELTICE
item_attribute 100, HELD_ICE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
@@ -227,165 +227,165 @@ ItemAttributes: ; 67c1
item_attribute 10, HELD_HEAL_STATUS, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; PEARL
item_attribute 1400, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BIG PEARL
+; BIG_PEARL
item_attribute 7500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; EVERSTONE
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SPELL TAG
+; SPELL_TAG
item_attribute 100, HELD_GHOST_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; RAGECANDYBAR
item_attribute 300, 0, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; GS BALL
+; GS_BALL
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BLUE CARD
+; BLUE_CARD
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-; MIRACLE SEED
+; MIRACLE_SEED
item_attribute 100, HELD_GRASS_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; THICK CLUB
+; THICK_CLUB
item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; FOCUS BAND
+; FOCUS_BAND
item_attribute 200, HELD_FOCUS_BAND, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_78
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; ENERGYPOWDER
item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; ENERGY ROOT
+; ENERGY_ROOT
item_attribute 800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; HEAL POWDER
+; HEAL_POWDER
item_attribute 450, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; REVIVAL HERB
+; REVIVAL_HERB
item_attribute 2800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; HARD STONE
+; HARD_STONE
item_attribute 100, HELD_ROCK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; LUCKY EGG
+; LUCKY_EGG
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; CARD KEY
+; CARD_KEY
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; MACHINE PART
+; MACHINE_PART
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; EGG TICKET
+; EGG_TICKET
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; LOST ITEM
+; LOST_ITEM
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; STARDUST
item_attribute 2000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; STAR PIECE
item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BASEMENT KEY
+; BASEMENT_KEY
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
; PASS
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_87
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_88
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_89
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; CHARCOAL
item_attribute 9800, HELD_FIRE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BERRY JUICE
+; BERRY_JUICE
item_attribute 100, HELD_BERRY, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; SCOPE LENS
+; SCOPE_LENS
item_attribute 200, HELD_CRITICAL_UP, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_8D
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_8E
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; METAL COAT
+; METAL_COAT
item_attribute 100, HELD_STEEL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; DRAGON FANG
+; DRAGON_FANG
item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_91
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; LEFTOVERS
item_attribute 200, HELD_LEFTOVERS, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_93
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_94
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_95
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; MYSTERYBERRY
item_attribute 10, HELD_RESTORE_PP, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; DRAGON SCALE
+; DRAGON_SCALE
item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BERSERK GENE
+; BERSERK_GENE
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_99
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_9A
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_9B
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SACRED ASH
+; SACRED_ASH
item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; HEAVY BALL
+; HEAVY_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; FLOWER MAIL
+; FLOWER_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; LEVEL BALL
+; LEVEL_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; LURE BALL
+; LURE_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; FAST BALL
+; FAST_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; TERU-SAMA
+; ITEM_A2
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; LIGHT BALL
+; LIGHT_BALL
item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; FRIEND BALL
+; FRIEND_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; MOON BALL
+; MOON_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; LOVE BALL
+; LOVE_BALL
item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; NORMAL BOX
+; NORMAL_BOX
item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-; GORGEOUS BOX
+; GORGEOUS_BOX
item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-; SUN STONE
+; SUN_STONE
item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; POLKADOT BOW
+; POLKADOT_BOW
item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_AB
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; UP-GRADE
+; UP_GRADE
item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; BERRY
item_attribute 10, HELD_BERRY, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-; GOLD BERRY
+; GOLD_BERRY
item_attribute 10, HELD_BERRY, 30, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
; SQUIRTBOTTLE
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_B0
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; PARK BALL
+; PARK_BALL
item_attribute 0, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-; RAINBOW WING
+; RAINBOW_WING
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_B3
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BRICK PIECE
+; BRICK_PIECE
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; SURF MAIL
+; SURF_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; LITEBLUEMAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; PORTRAITMAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; LOVELY MAIL
+; LOVELY_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; EON MAIL
+; EON_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; MORPH MAIL
+; MORPH_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; BLUESKY MAIL
+; BLUESKY_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; MUSIC MAIL
+; MUSIC_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; MIRAGE MAIL
+; MIRAGE_MAIL
item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_BE
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; TM01
item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
@@ -395,7 +395,7 @@ ItemAttributes: ; 67c1
item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; TM04
item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_C3
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; TM05
item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
@@ -445,7 +445,7 @@ ItemAttributes: ; 67c1
item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; TM28
item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_DC
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
; TM29
item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
@@ -505,17 +505,17 @@ ItemAttributes: ; 67c1
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
; HM07
item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-; TERU-SAMA
+; ITEM_FA
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; $fb
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; $fc
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; $fd
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; $fe
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; TERU-SAMA
+; $ff
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-; ?
+; $00
item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
diff --git a/data/time_capsule/catch_rate_items.asm b/data/items/catch_rate_items.asm
index fbab7d434..fbab7d434 100644
--- a/data/time_capsule/catch_rate_items.asm
+++ b/data/items/catch_rate_items.asm
diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm
index e5b01e8fd..20542b9e0 100644
--- a/data/items/descriptions.asm
+++ b/data/items/descriptions.asm
@@ -1,36 +1,3 @@
-PrintItemDescription: ; 0x1c8955
-; Print the description for item [CurSpecies] at de.
-
- ld a, [CurSpecies]
- cp TM01
- jr c, .not_a_tm
-
- ld [CurItem], a
- push de
- farcall GetTMHMItemMove
- pop hl
- ld a, [wd265]
- ld [CurSpecies], a
- predef PrintMoveDesc
- ret
-
-.not_a_tm
- push de
- ld hl, ItemDescriptions
- ld a, [CurSpecies]
- dec a
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- pop hl
- jp PlaceString
-; 0x1c8987
-
-
ItemDescriptions:
dw MasterBallDesc
dw UltraBallDesc
diff --git a/data/items/heal_hp.asm b/data/items/heal_hp.asm
new file mode 100644
index 000000000..a84670450
--- /dev/null
+++ b/data/items/heal_hp.asm
@@ -0,0 +1,18 @@
+HealingHPAmounts: ; f3af
+ dbw FRESH_WATER, 50
+ dbw SODA_POP, 60
+ dbw LEMONADE, 80
+ dbw HYPER_POTION, 200
+ dbw SUPER_POTION, 50
+ dbw POTION, 20
+ dbw MAX_POTION, MAX_STAT_VALUE
+ dbw FULL_RESTORE, MAX_STAT_VALUE
+ dbw MOOMOO_MILK, 100
+ dbw BERRY, 10
+ dbw GOLD_BERRY, 30
+ dbw ENERGYPOWDER, 50
+ dbw ENERGY_ROOT, 200
+ dbw RAGECANDYBAR, 20
+ dbw BERRY_JUICE, 20
+ dbw -1, 0 ; end
+; f3df
diff --git a/data/items/heal_status.asm b/data/items/heal_status.asm
new file mode 100644
index 000000000..f0b0148bb
--- /dev/null
+++ b/data/items/heal_status.asm
@@ -0,0 +1,18 @@
+StatusHealingActions: ; f071
+ ; item, party menu action text, status
+ db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
+ db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
+ db ICE_HEAL, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
+ db AWAKENING, PARTYMENUTEXT_HEAL_SLP, SLP
+ db PARLYZ_HEAL, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
+ db FULL_HEAL, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db FULL_RESTORE, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db HEAL_POWDER, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db PSNCUREBERRY, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
+ db PRZCUREBERRY, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
+ db BURNT_BERRY, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
+ db ICE_BERRY, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
+ db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP
+ db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db -1, 0, 0 ; end
+; f09e
diff --git a/data/items/marts.asm b/data/items/marts.asm
index cd17ca36b..fd156225d 100644
--- a/data/items/marts.asm
+++ b/data/items/marts.asm
@@ -1,4 +1,5 @@
Marts: ; 160a9
+; entries correspond to MART_* constants
dw MartCherrygrove
dw MartCherrygroveDex
dw MartViolet
@@ -43,7 +44,7 @@ MartCherrygrove: ; 160ed
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
- db $ff
+ db -1 ; end
; 160f3
MartCherrygroveDex: ; 160f3
@@ -53,7 +54,7 @@ MartCherrygroveDex: ; 160f3
db ANTIDOTE
db PARLYZ_HEAL
db AWAKENING
- db $ff
+ db -1 ; end
; 160fa
MartViolet: ; 160fa
@@ -68,7 +69,7 @@ MartViolet: ; 160fa
db X_ATTACK
db X_SPEED
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 16106
MartAzalea: ; 16106
@@ -82,7 +83,7 @@ MartAzalea: ; 16106
db ANTIDOTE
db PARLYZ_HEAL
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 16111
MartCianwood: ; 16111
@@ -92,7 +93,7 @@ MartCianwood: ; 16111
db HYPER_POTION
db FULL_HEAL
db REVIVE
- db $ff
+ db -1 ; end
; 16118
MartGoldenrod2F1: ; 16118
@@ -104,7 +105,7 @@ MartGoldenrod2F1: ; 16118
db AWAKENING
db BURN_HEAL
db ICE_HEAL
- db $ff
+ db -1 ; end
; 16121
MartGoldenrod2F2: ; 16121
@@ -117,7 +118,7 @@ MartGoldenrod2F2: ; 16121
db FULL_HEAL
db POKE_DOLL
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 1612b
MartGoldenrod3F: ; 1612b
@@ -129,7 +130,7 @@ MartGoldenrod3F: ; 1612b
db DIRE_HIT
db GUARD_SPEC
db X_ACCURACY
- db $ff
+ db -1 ; end
; 16134
MartGoldenrod4F: ; 16134
@@ -139,7 +140,7 @@ MartGoldenrod4F: ; 16134
db CARBOS
db CALCIUM
db HP_UP
- db $ff
+ db -1 ; end
; 1613b
MartGoldenrod5F1: ; 1613b
@@ -147,7 +148,7 @@ MartGoldenrod5F1: ; 1613b
db TM_THUNDERPUNCH
db TM_FIRE_PUNCH
db TM_ICE_PUNCH
- db $ff
+ db -1 ; end
; 16140
MartGoldenrod5F2: ; 16140
@@ -156,7 +157,7 @@ MartGoldenrod5F2: ; 16140
db TM_FIRE_PUNCH
db TM_ICE_PUNCH
db TM_HEADBUTT
- db $ff
+ db -1 ; end
; 16146
MartGoldenrod5F3: ; 16146
@@ -165,7 +166,7 @@ MartGoldenrod5F3: ; 16146
db TM_FIRE_PUNCH
db TM_ICE_PUNCH
db TM_ROCK_SMASH
- db $ff
+ db -1 ; end
; 1614c
MartGoldenrod5F4: ; 1614c
@@ -175,7 +176,7 @@ MartGoldenrod5F4: ; 1614c
db TM_ICE_PUNCH
db TM_HEADBUTT
db TM_ROCK_SMASH
- db $ff
+ db -1 ; end
; 16153
MartOlivine: ; 16153
@@ -189,7 +190,7 @@ MartOlivine: ; 16153
db ICE_HEAL
db SUPER_REPEL
db SURF_MAIL
- db $ff
+ db -1 ; end
; 1615e
MartEcruteak: ; 1615e
@@ -204,7 +205,7 @@ MartEcruteak: ; 1615e
db BURN_HEAL
db ICE_HEAL
db REVIVE
- db $ff
+ db -1 ; end
; 1616a
MartMahogany1: ; 1616a
@@ -213,7 +214,7 @@ MartMahogany1: ; 1616a
db SLOWPOKETAIL
db POKE_BALL
db POTION
- db $ff
+ db -1 ; end
; 16170
MartMahogany2: ; 16170
@@ -227,7 +228,7 @@ MartMahogany2: ; 16170
db SUPER_REPEL
db REVIVE
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 1617b
MartBlackthorn: ; 1617b
@@ -241,7 +242,7 @@ MartBlackthorn: ; 1617b
db MAX_REPEL
db X_DEFEND
db X_ATTACK
- db $ff
+ db -1 ; end
; 16186
MartViridian: ; 16186
@@ -255,7 +256,7 @@ MartViridian: ; 16186
db AWAKENING
db BURN_HEAL
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 16191
MartPewter: ; 16191
@@ -267,7 +268,7 @@ MartPewter: ; 16191
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
- db $ff
+ db -1 ; end
; 1619a
MartCerulean: ; 1619a
@@ -281,7 +282,7 @@ MartCerulean: ; 1619a
db X_ATTACK
db DIRE_HIT
db SURF_MAIL
- db $ff
+ db -1 ; end
; 161a5
MartLavender: ; 161a5
@@ -294,7 +295,7 @@ MartLavender: ; 161a5
db PARLYZ_HEAL
db AWAKENING
db BURN_HEAL
- db $ff
+ db -1 ; end
; 161af
MartVermilion: ; 161af
@@ -307,7 +308,7 @@ MartVermilion: ; 161af
db AWAKENING
db BURN_HEAL
db LITEBLUEMAIL
- db $ff
+ db -1 ; end
; 161b9
MartCeladon2F1: ; 161b9
@@ -319,7 +320,7 @@ MartCeladon2F1: ; 161b9
db REVIVE
db SUPER_REPEL
db MAX_REPEL
- db $ff
+ db -1 ; end
; 161c2
MartCeladon2F2: ; 161c2
@@ -334,7 +335,7 @@ MartCeladon2F2: ; 161c2
db ICE_HEAL
db AWAKENING
db PARLYZ_HEAL
- db $ff
+ db -1 ; end
; 161ce
MartCeladon3F: ; 161ce
@@ -344,7 +345,7 @@ MartCeladon3F: ; 161ce
db TM_PROTECT
db TM_RAIN_DANCE
db TM_SANDSTORM
- db $ff
+ db -1 ; end
; 161d5
MartCeladon4F: ; 161d5
@@ -352,7 +353,7 @@ MartCeladon4F: ; 161d5
db POKE_DOLL
db LOVELY_MAIL
db SURF_MAIL
- db $ff
+ db -1 ; end
; 161da
MartCeladon5F1: ; 161da
@@ -362,7 +363,7 @@ MartCeladon5F1: ; 161da
db IRON
db CARBOS
db CALCIUM
- db $ff
+ db -1 ; end
; 161e1
MartCeladon5F2: ; 161e1
@@ -374,7 +375,7 @@ MartCeladon5F2: ; 161e1
db X_DEFEND
db X_SPEED
db X_SPECIAL
- db $ff
+ db -1 ; end
; 161ea
MartFuchsia: ; 161ea
@@ -386,7 +387,7 @@ MartFuchsia: ; 161ea
db FULL_HEAL
db MAX_REPEL
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 161f3
MartSaffron: ; 161f3
@@ -399,7 +400,7 @@ MartSaffron: ; 161f3
db X_ATTACK
db X_DEFEND
db FLOWER_MAIL
- db $ff
+ db -1 ; end
; 161fd
MartMtMoon: ; 161fd
@@ -410,7 +411,7 @@ MartMtMoon: ; 161fd
db LEMONADE
db REPEL
db PORTRAITMAIL
- db $ff
+ db -1 ; end
; 16205
MartIndigoPlateau: ; 16205
@@ -422,7 +423,7 @@ MartIndigoPlateau: ; 16205
db FULL_RESTORE
db REVIVE
db FULL_HEAL
- db $ff
+ db -1 ; end
; 1620e
MartUnderground: ; 1620e
@@ -431,12 +432,12 @@ MartUnderground: ; 1620e
db ENERGY_ROOT
db HEAL_POWDER
db REVIVAL_HERB
- db $ff
+ db -1 ; end
; 16214
DefaultMart: ; 16214
db 2 ; # items
db POKE_BALL
db POTION
- db $ff
+ db -1 ; end
; 16218
diff --git a/data/mystery_gift_items.asm b/data/items/mystery_gift_items.asm
index b2379071e..b2379071e 100644
--- a/data/mystery_gift_items.asm
+++ b/data/items/mystery_gift_items.asm
diff --git a/data/items/x_stats.asm b/data/items/x_stats.asm
new file mode 100644
index 000000000..ac2d0ad27
--- /dev/null
+++ b/data/items/x_stats.asm
@@ -0,0 +1,7 @@
+XItemStats: ; f504
+ ; item, stat
+ db X_ATTACK, ATTACK
+ db X_DEFEND, DEFENSE
+ db X_SPEED, SPEED
+ db X_SPECIAL, SP_ATTACK
+; f50c
diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm
index 8064a63e9..c7e30114a 100644
--- a/data/maps/outdoor_sprites.asm
+++ b/data/maps/outdoor_sprites.asm
@@ -2,6 +2,7 @@
; Maps with environment ROUTE or TOWN can only use these sprites.
OutdoorSprites: ; 144b8
+; entries correspond to map groups
dw OlivineGroupSprites
dw MahoganyGroupSprites
dw DungeonsGroupSprites
diff --git a/data/maps/roofs.asm b/data/maps/roofs.asm
index 8c79e6f82..2a1b8d3eb 100644
--- a/data/maps/roofs.asm
+++ b/data/maps/roofs.asm
@@ -1,5 +1,6 @@
MapGroupRoofs: ; 1c021i
-; entries correspond to Roofs (see below)
+; entries correspond to map groups
+; values are indexes for Roofs (see below)
db -1 ; group 0 (unused)
db 3 ; group 1 (Olivine)
db 2 ; group 2 (Mahogany)
diff --git a/data/maps/scenes.asm b/data/maps/scenes.asm
index 3d9600407..a835d4895 100644
--- a/data/maps/scenes.asm
+++ b/data/maps/scenes.asm
@@ -15,9 +15,9 @@ MapScenes:: ; 4d01e
scene_def ROUTE_25, wRoute25SceneID
scene_def TRAINER_HOUSE_B1F, wTrainerHouseB1FSceneID
scene_def VICTORY_ROAD_GATE, wVictoryRoadGateSceneID
- scene_def SAFFRON_TRAIN_STATION, wSaffronTrainStationSceneID
+ scene_def SAFFRON_MAGNET_TRAIN_STATION, wSaffronMagnetTrainStationSceneID
scene_def ROUTE_16_GATE, wRoute16GateSceneID
- scene_def ROUTE_17_18_GATE, wRoute1718GateSceneID
+ scene_def ROUTE_17_ROUTE_18_GATE, wRoute17Route18GateSceneID
scene_def INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FSceneID
scene_def WILLS_ROOM, wWillsRoomSceneID
scene_def KOGAS_ROOM, wKogasRoomSceneID
diff --git a/data/moves/animations.asm b/data/moves/animations.asm
index 1bc7f596a..7f097c3f6 100644
--- a/data/moves/animations.asm
+++ b/data/moves/animations.asm
@@ -455,28 +455,28 @@ BattleAnim_SendOutMon: ; c93d1
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $0
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $0
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $8
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $8
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $10
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $10
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $18
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $18
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $20
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $20
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $28
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $28
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $30
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $30
anim_wait 4
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_6D, 48, 96, $38
+ anim_obj ANIM_OBJ_SHINY, 48, 96, $38
anim_wait 32
anim_ret
@@ -512,7 +512,7 @@ BattleAnim_Slp: ; c94a3
anim_1gfx ANIM_GFX_STATUS
anim_sound 0, 0, SFX_TAIL_WHIP
.loop
- anim_obj ANIM_OBJ_54, 64, 80, $0
+ anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0
anim_wait 40
anim_loop 3, .loop
anim_wait 32
@@ -588,11 +588,11 @@ BattleAnim_InLove: ; c951e
BattleAnim_InSandstorm: ; c9533
anim_1gfx ANIM_GFX_POWDER
- anim_obj ANIM_OBJ_A2, 88, 0, $0
+ anim_obj ANIM_OBJ_SANDSTORM, 88, 0, $0
anim_wait 8
- anim_obj ANIM_OBJ_A2, 72, 0, $1
+ anim_obj ANIM_OBJ_SANDSTORM, 72, 0, $1
anim_wait 8
- anim_obj ANIM_OBJ_A2, 56, 0, $2
+ anim_obj ANIM_OBJ_SANDSTORM, 56, 0, $2
.loop
anim_sound 0, 1, SFX_MENU
anim_wait 8
@@ -604,7 +604,7 @@ BattleAnim_InSandstorm: ; c9533
BattleAnim_InNightmare: ; c9550
anim_1gfx ANIM_GFX_ANGELS
anim_sound 0, 0, SFX_BUBBLEBEAM
- anim_obj ANIM_OBJ_95, 68, 80, $0
+ anim_obj ANIM_OBJ_IN_NIGHTMARE, 68, 80, $0
anim_wait 40
anim_ret
; c955c
@@ -884,7 +884,7 @@ BattleAnim_HyperFang: ; c9764
anim_1gfx ANIM_GFX_HIT
anim_bgeffect ANIM_BG_1F, $20, $1, $0
anim_sound 0, 1, SFX_BITE
- anim_obj ANIM_OBJ_09, 136, 56, $0
+ anim_obj ANIM_OBJ_FANG, 136, 56, $0
anim_wait 6
anim_obj ANIM_OBJ_01, 136, 56, $0
anim_wait 16
@@ -898,10 +898,10 @@ BattleAnim_SuperFang: ; c977b
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3
.loop
anim_sound 0, 1, SFX_BITE
- anim_obj ANIM_OBJ_09, 136, 56, $0
+ anim_obj ANIM_OBJ_FANG, 136, 56, $0
anim_obj ANIM_OBJ_00, 136, 56, $0
anim_wait 6
- anim_obj ANIM_OBJ_09, 136, 56, $0
+ anim_obj ANIM_OBJ_FANG, 136, 56, $0
anim_wait 6
anim_loop 3, .loop
anim_ret
@@ -910,21 +910,21 @@ BattleAnim_SuperFang: ; c977b
BattleAnim_Ember: ; c97a1
anim_1gfx ANIM_GFX_FIRE
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0B, 64, 96, $12
+ anim_obj ANIM_OBJ_EMBER, 64, 96, $12
anim_wait 4
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0B, 64, 100, $14
+ anim_obj ANIM_OBJ_EMBER, 64, 100, $14
anim_wait 4
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0B, 64, 84, $13
+ anim_obj ANIM_OBJ_EMBER, 64, 84, $13
anim_wait 16
anim_incobj 1
anim_incobj 2
anim_incobj 3
anim_sound 0, 1, SFX_EMBER
- anim_obj ANIM_OBJ_0B, 120, 68, $30
- anim_obj ANIM_OBJ_0B, 132, 68, $30
- anim_obj ANIM_OBJ_0B, 144, 68, $30
+ anim_obj ANIM_OBJ_EMBER, 120, 68, $30
+ anim_obj ANIM_OBJ_EMBER, 132, 68, $30
+ anim_obj ANIM_OBJ_EMBER, 144, 68, $30
anim_wait 32
anim_ret
; c97d8
@@ -941,16 +941,16 @@ BattleAnim_FireSpin: ; c97e5
anim_1gfx ANIM_GFX_FIRE
.loop
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0E, 64, 88, $4
+ anim_obj ANIM_OBJ_FIRE_SPIN, 64, 88, $4
anim_wait 2
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0E, 64, 96, $3
+ anim_obj ANIM_OBJ_FIRE_SPIN, 64, 96, $3
anim_wait 2
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0E, 64, 88, $3
+ anim_obj ANIM_OBJ_FIRE_SPIN, 64, 88, $3
anim_wait 2
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0E, 64, 96, $4
+ anim_obj ANIM_OBJ_FIRE_SPIN, 64, 96, $4
anim_wait 2
anim_loop 2, .loop
anim_wait 96
@@ -961,7 +961,7 @@ BattleAnim_DragonRage: ; c9811
anim_1gfx ANIM_GFX_FIRE
.loop
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0C, 64, 92, $0
+ anim_obj ANIM_OBJ_DRAGON_RAGE, 64, 92, $0
anim_wait 3
anim_loop 16, .loop
anim_wait 64
@@ -971,21 +971,21 @@ BattleAnim_DragonRage: ; c9811
BattleAnim_Flamethrower: ; c9822
anim_1gfx ANIM_GFX_FIRE
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0D, 64, 92, $3
+ anim_obj ANIM_OBJ_FLAMETHROWER, 64, 92, $3
anim_wait 2
- anim_obj ANIM_OBJ_0D, 75, 86, $5
+ anim_obj ANIM_OBJ_FLAMETHROWER, 75, 86, $5
anim_wait 2
- anim_obj ANIM_OBJ_0D, 85, 81, $7
+ anim_obj ANIM_OBJ_FLAMETHROWER, 85, 81, $7
anim_wait 2
- anim_obj ANIM_OBJ_0D, 96, 76, $9
+ anim_obj ANIM_OBJ_FLAMETHROWER, 96, 76, $9
anim_wait 2
- anim_obj ANIM_OBJ_0D, 106, 71, $b
+ anim_obj ANIM_OBJ_FLAMETHROWER, 106, 71, $b
anim_wait 2
- anim_obj ANIM_OBJ_0D, 116, 66, $c
+ anim_obj ANIM_OBJ_FLAMETHROWER, 116, 66, $c
anim_wait 2
- anim_obj ANIM_OBJ_0D, 126, 61, $a
+ anim_obj ANIM_OBJ_FLAMETHROWER, 126, 61, $a
anim_wait 2
- anim_obj ANIM_OBJ_0D, 136, 56, $8
+ anim_obj ANIM_OBJ_FLAMETHROWER, 136, 56, $8
anim_wait 16
.loop
anim_sound 0, 1, SFX_EMBER
@@ -999,7 +999,7 @@ BattleAnim_FireBlast: ; c9861
anim_1gfx ANIM_GFX_FIRE
.loop1
anim_sound 6, 2, SFX_EMBER
- anim_obj ANIM_OBJ_0F, 64, 92, $7
+ anim_obj ANIM_OBJ_FIRE_BLAST, 64, 92, $7
anim_wait 6
anim_loop 10, .loop1
.loop2
@@ -1019,11 +1019,11 @@ BattleAnim_FireBlast: ; c9861
anim_wait 2
.loop3
anim_sound 0, 1, SFX_EMBER
- anim_obj ANIM_OBJ_0F, 136, 56, $1
- anim_obj ANIM_OBJ_0F, 136, 56, $2
- anim_obj ANIM_OBJ_0F, 136, 56, $3
- anim_obj ANIM_OBJ_0F, 136, 56, $4
- anim_obj ANIM_OBJ_0F, 136, 56, $5
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $1
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $2
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $3
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $4
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $5
anim_wait 16
anim_loop 2, .loop3
anim_wait 32
@@ -1129,11 +1129,11 @@ BattleAnim_WaterGun: ; c9979
anim_1gfx ANIM_GFX_WATER
anim_call BattleAnim_FollowPlayerHead_1
anim_sound 16, 2, SFX_WATER_GUN
- anim_obj ANIM_OBJ_24, 64, 88, $0
+ anim_obj ANIM_OBJ_WATER_GUN, 64, 88, $0
anim_wait 8
- anim_obj ANIM_OBJ_24, 64, 76, $0
+ anim_obj ANIM_OBJ_WATER_GUN, 64, 76, $0
anim_wait 8
- anim_obj ANIM_OBJ_24, 64, 82, $0
+ anim_obj ANIM_OBJ_WATER_GUN, 64, 82, $0
anim_wait 24
anim_bgeffect ANIM_BG_31, $1c, $0, $0
anim_wait 8
@@ -1152,31 +1152,31 @@ BattleAnim_HydroPump: ; c99b4
anim_1gfx ANIM_GFX_WATER
anim_call BattleAnim_FollowPlayerHead_1
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 108, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 108, 72, $0
anim_bgeffect ANIM_BG_31, $1c, $0, $0
anim_wait 8
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 116, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 116, 72, $0
anim_bgeffect ANIM_BG_31, $8, $0, $0
anim_wait 8
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 124, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 124, 72, $0
anim_bgeffect ANIM_BG_31, $30, $0, $0
anim_wait 8
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 132, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 132, 72, $0
anim_bgeffect ANIM_BG_31, $1c, $0, $0
anim_wait 8
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 140, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 140, 72, $0
anim_bgeffect ANIM_BG_31, $8, $0, $0
anim_wait 8
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 148, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 148, 72, $0
anim_bgeffect ANIM_BG_31, $30, $0, $0
anim_wait 8
anim_sound 0, 1, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_25, 156, 72, $0
+ anim_obj ANIM_OBJ_HYDRO_PUMP, 156, 72, $0
anim_bgeffect ANIM_BG_31, $1c, $0, $0
anim_wait 32
anim_call BattleAnim_ShowMon_1
@@ -1188,7 +1188,7 @@ BattleAnim_HydroPump: ; c99b4
BattleAnim_Surf: ; c9a2a
anim_1gfx ANIM_GFX_BUBBLE
anim_bgeffect ANIM_BG_SURF, $0, $0, $0
- anim_obj ANIM_OBJ_22, 88, 104, $8
+ anim_obj ANIM_OBJ_SURF, 88, 104, $8
.loop
anim_sound 0, 1, SFX_SURF
anim_wait 32
@@ -1340,7 +1340,7 @@ BattleAnim_ThunderWave: ; c9b84
anim_1gfx ANIM_GFX_LIGHTNING
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3
anim_sound 0, 1, SFX_THUNDERSHOCK
- anim_obj ANIM_OBJ_30, 136, 56, $0
+ anim_obj ANIM_OBJ_THUNDER_WAVE, 136, 56, $0
anim_wait 20
anim_bgp $1b
anim_incobj 1
@@ -1393,13 +1393,13 @@ BattleAnim_Sonicboom_JP: ; c9c00
anim_2gfx ANIM_GFX_WHIP, ANIM_GFX_HIT
.loop
anim_sound 3, 0, SFX_RAZOR_WIND
- anim_obj ANIM_OBJ_43, 64, 80, $3
+ anim_obj ANIM_OBJ_SONICBOOM_JP, 64, 80, $3
anim_wait 8
anim_sound 3, 0, SFX_RAZOR_WIND
- anim_obj ANIM_OBJ_43, 64, 88, $2
+ anim_obj ANIM_OBJ_SONICBOOM_JP, 64, 88, $2
anim_wait 8
anim_sound 3, 0, SFX_RAZOR_WIND
- anim_obj ANIM_OBJ_43, 64, 96, $4
+ anim_obj ANIM_OBJ_SONICBOOM_JP, 64, 96, $4
anim_wait 8
anim_loop 2, .loop
anim_wait 32
@@ -1477,19 +1477,19 @@ BattleAnim_RockThrow: ; c9c9d
anim_1gfx ANIM_GFX_ROCKS
anim_bgeffect ANIM_BG_1F, $60, $1, $0
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 128, 64, $40
+ anim_obj ANIM_OBJ_SMALL_ROCK, 128, 64, $40
anim_wait 2
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1D, 120, 68, $30
+ anim_obj ANIM_OBJ_BIG_ROCK, 120, 68, $30
anim_wait 2
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 152, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 152, 68, $30
anim_wait 2
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1D, 144, 64, $40
+ anim_obj ANIM_OBJ_BIG_ROCK, 144, 64, $40
anim_wait 2
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 136, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30
anim_wait 96
anim_ret
; c9cd2
@@ -1499,19 +1499,19 @@ BattleAnim_RockSlide: ; c9cd2
anim_bgeffect ANIM_BG_1F, $c0, $1, $0
.loop
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 128, 64, $40
+ anim_obj ANIM_OBJ_SMALL_ROCK, 128, 64, $40
anim_wait 4
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1D, 120, 68, $30
+ anim_obj ANIM_OBJ_BIG_ROCK, 120, 68, $30
anim_wait 4
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 152, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 152, 68, $30
anim_wait 4
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1D, 144, 64, $40
+ anim_obj ANIM_OBJ_BIG_ROCK, 144, 64, $40
anim_wait 4
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 136, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30
anim_wait 16
anim_loop 4, .loop
anim_wait 96
@@ -1522,15 +1522,15 @@ BattleAnim_Sing: ; c9d0c
anim_1gfx ANIM_GFX_NOISE
anim_sound 16, 2, SFX_SING
.loop
- anim_obj ANIM_OBJ_23, 64, 92, $0
+ anim_obj ANIM_OBJ_SING, 64, 92, $0
anim_wait 8
- anim_obj ANIM_OBJ_23, 64, 92, $1
+ anim_obj ANIM_OBJ_SING, 64, 92, $1
anim_wait 8
- anim_obj ANIM_OBJ_23, 64, 92, $2
+ anim_obj ANIM_OBJ_SING, 64, 92, $2
anim_wait 8
- anim_obj ANIM_OBJ_23, 64, 92, $0
+ anim_obj ANIM_OBJ_SING, 64, 92, $0
anim_wait 8
- anim_obj ANIM_OBJ_23, 64, 92, $2
+ anim_obj ANIM_OBJ_SING, 64, 92, $2
anim_wait 8
anim_loop 4, .loop
anim_wait 64
@@ -1544,19 +1544,19 @@ BattleAnim_StunSpore: ; c9d35
anim_1gfx ANIM_GFX_POWDER
.loop
anim_sound 0, 1, SFX_POWDER
- anim_obj ANIM_OBJ_26, 104, 16, $0
+ anim_obj ANIM_OBJ_POWDER, 104, 16, $0
anim_wait 4
anim_sound 0, 1, SFX_POWDER
- anim_obj ANIM_OBJ_26, 136, 16, $0
+ anim_obj ANIM_OBJ_POWDER, 136, 16, $0
anim_wait 4
anim_sound 0, 1, SFX_POWDER
- anim_obj ANIM_OBJ_26, 112, 16, $0
+ anim_obj ANIM_OBJ_POWDER, 112, 16, $0
anim_wait 4
anim_sound 0, 1, SFX_POWDER
- anim_obj ANIM_OBJ_26, 128, 16, $0
+ anim_obj ANIM_OBJ_POWDER, 128, 16, $0
anim_wait 4
anim_sound 0, 1, SFX_POWDER
- anim_obj ANIM_OBJ_26, 120, 16, $0
+ anim_obj ANIM_OBJ_POWDER, 120, 16, $0
anim_wait 4
anim_loop 2, .loop
anim_wait 96
@@ -1645,8 +1645,8 @@ BattleAnim_Slash: ; c9dfc
BattleAnim_Clamp: ; c9e0d
anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT
- anim_obj ANIM_OBJ_35, 136, 56, $a0
- anim_obj ANIM_OBJ_35, 136, 56, $20
+ anim_obj ANIM_OBJ_CLAMP, 136, 56, $a0
+ anim_obj ANIM_OBJ_CLAMP, 136, 56, $20
anim_wait 16
anim_sound 0, 1, SFX_BITE
anim_obj ANIM_OBJ_01, 144, 48, $18
@@ -1659,8 +1659,8 @@ BattleAnim_Clamp: ; c9e0d
BattleAnim_Bite: ; c9e2e
anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT
- anim_obj ANIM_OBJ_36, 136, 56, $98
- anim_obj ANIM_OBJ_36, 136, 56, $18
+ anim_obj ANIM_OBJ_BITE, 136, 56, $98
+ anim_obj ANIM_OBJ_BITE, 136, 56, $18
anim_wait 8
anim_sound 0, 1, SFX_BITE
anim_obj ANIM_OBJ_01, 144, 48, $18
@@ -1725,14 +1725,14 @@ BattleAnim_Recover: ; c9eaf
anim_call BattleAnim_FollowEnemyFeet_0
anim_sound 0, 0, SFX_FULL_HEAL
anim_bgeffect ANIM_BG_18, $0, $1, $40
- anim_obj ANIM_OBJ_2C, 44, 88, $30
- anim_obj ANIM_OBJ_2C, 44, 88, $31
- anim_obj ANIM_OBJ_2C, 44, 88, $32
- anim_obj ANIM_OBJ_2C, 44, 88, $33
- anim_obj ANIM_OBJ_2C, 44, 88, $34
- anim_obj ANIM_OBJ_2C, 44, 88, $35
- anim_obj ANIM_OBJ_2C, 44, 88, $36
- anim_obj ANIM_OBJ_2C, 44, 88, $37
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $30
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $31
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $32
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $33
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $34
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $35
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $36
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $37
anim_wait 64
anim_incbgeffect ANIM_BG_18
anim_call BattleAnim_ShowMon_0
@@ -1793,7 +1793,7 @@ BattleAnim_MegaDrain: ; c9f13
BattleAnim_EggBomb: ; c9f55
anim_2gfx ANIM_GFX_EGG, ANIM_GFX_EXPLOSION
anim_sound 0, 0, SFX_SWITCH_POKEMON
- anim_obj ANIM_OBJ_46, 44, 104, $1
+ anim_obj ANIM_OBJ_EGG, 44, 104, $1
anim_wait 128
anim_wait 96
anim_incobj 1
@@ -1814,15 +1814,15 @@ BattleAnim_Softboiled: ; c9f85
anim_2gfx ANIM_GFX_EGG, ANIM_GFX_BUBBLE
anim_call BattleAnim_FollowEnemyFeet_0
anim_sound 0, 0, SFX_SWITCH_POKEMON
- anim_obj ANIM_OBJ_46, 44, 104, $6
+ anim_obj ANIM_OBJ_EGG, 44, 104, $6
anim_wait 128
anim_incobj 2
- anim_obj ANIM_OBJ_46, 76, 104, $b
+ anim_obj ANIM_OBJ_EGG, 76, 104, $b
anim_wait 16
anim_bgeffect ANIM_BG_18, $0, $1, $40
anim_sound 0, 0, SFX_METRONOME
.loop
- anim_obj ANIM_OBJ_2C, 44, 88, $20
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $20
anim_wait 8
anim_loop 8, .loop
anim_wait 128
@@ -1995,7 +1995,7 @@ BattleAnim_Supersonic: ; ca0f4
anim_1gfx ANIM_GFX_PSYCHIC
.loop
anim_sound 6, 2, SFX_SUPERSONIC
- anim_obj ANIM_OBJ_4C, 64, 88, $2
+ anim_obj ANIM_OBJ_WAVE, 64, 88, $2
anim_wait 4
anim_loop 10, .loop
anim_wait 64
@@ -2007,7 +2007,7 @@ BattleAnim_Screech: ; ca105
anim_bgeffect ANIM_BG_1F, $8, $1, $20
anim_sound 6, 2, SFX_SCREECH
.loop
- anim_obj ANIM_OBJ_4C, 64, 88, $2
+ anim_obj ANIM_OBJ_WAVE, 64, 88, $2
anim_wait 2
anim_loop 2, .loop
anim_wait 64
@@ -2018,15 +2018,15 @@ BattleAnim_ConfuseRay: ; ca11b
anim_1gfx ANIM_GFX_SPEED
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_bgeffect ANIM_BG_08, $0, $4, $0
- anim_obj ANIM_OBJ_4D, 64, 88, $0
- anim_obj ANIM_OBJ_4D, 64, 88, $80
- anim_obj ANIM_OBJ_4D, 64, 88, $88
- anim_obj ANIM_OBJ_4D, 64, 88, $90
- anim_obj ANIM_OBJ_4D, 64, 88, $98
- anim_obj ANIM_OBJ_4D, 64, 88, $a0
- anim_obj ANIM_OBJ_4D, 64, 88, $a8
- anim_obj ANIM_OBJ_4D, 64, 88, $b0
- anim_obj ANIM_OBJ_4D, 64, 88, $b8
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $0
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $80
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $88
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $90
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $98
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $a0
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $a8
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $b0
+ anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $b8
.loop
anim_sound 6, 2, SFX_WHIRLWIND
anim_wait 16
@@ -2048,11 +2048,11 @@ BattleAnim_Reflect: ; ca16a
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_50, 72, 80, $0
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
anim_wait 24
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_50, 72, 80, $0
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
anim_wait 64
anim_ret
; ca18e
@@ -2061,24 +2061,24 @@ BattleAnim_LightScreen: ; ca18e
anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_REFLECT
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_sound 0, 0, SFX_FLASH
- anim_obj ANIM_OBJ_50, 72, 80, $0
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $0
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $0
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $8
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $8
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $10
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $10
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $18
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $18
anim_wait 4
- anim_obj ANIM_OBJ_50, 72, 80, $0
- anim_obj ANIM_OBJ_6D, 72, 80, $20
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $20
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $28
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $28
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $30
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $30
anim_wait 4
- anim_obj ANIM_OBJ_6D, 72, 80, $38
+ anim_obj ANIM_OBJ_SHINY, 72, 80, $38
anim_wait 64
anim_ret
; ca1d5
@@ -2086,11 +2086,11 @@ BattleAnim_LightScreen: ; ca18e
BattleAnim_Amnesia: ; ca1d5
anim_1gfx ANIM_GFX_STATUS
anim_sound 0, 0, SFX_LICK
- anim_obj ANIM_OBJ_53, 64, 80, $2
+ anim_obj ANIM_OBJ_AMNESIA, 64, 80, $2
anim_wait 16
- anim_obj ANIM_OBJ_53, 68, 80, $1
+ anim_obj ANIM_OBJ_AMNESIA, 68, 80, $1
anim_wait 16
- anim_obj ANIM_OBJ_53, 72, 80, $0
+ anim_obj ANIM_OBJ_AMNESIA, 72, 80, $0
anim_wait 64
anim_ret
; ca1ed
@@ -2113,7 +2113,7 @@ BattleAnim_Rest: ; ca212
anim_1gfx ANIM_GFX_STATUS
anim_sound 0, 0, SFX_TAIL_WHIP
.loop
- anim_obj ANIM_OBJ_54, 64, 80, $0
+ anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0
anim_wait 40
anim_loop 3, .loop
anim_wait 32
@@ -2181,22 +2181,22 @@ BattleAnim_StringShot: ; ca293
anim_1gfx ANIM_GFX_WEB
anim_bgeffect ANIM_BG_07, $0, $2, $0
anim_sound 6, 2, SFX_MENU
- anim_obj ANIM_OBJ_5A, 64, 80, $0
+ anim_obj ANIM_OBJ_STRING_SHOT, 64, 80, $0
anim_wait 4
anim_sound 0, 1, SFX_MENU
- anim_obj ANIM_OBJ_5A, 132, 48, $1
+ anim_obj ANIM_OBJ_STRING_SHOT, 132, 48, $1
anim_wait 4
anim_sound 6, 2, SFX_MENU
- anim_obj ANIM_OBJ_5A, 64, 88, $0
+ anim_obj ANIM_OBJ_STRING_SHOT, 64, 88, $0
anim_wait 4
anim_sound 0, 1, SFX_MENU
- anim_obj ANIM_OBJ_5A, 132, 64, $1
+ anim_obj ANIM_OBJ_STRING_SHOT, 132, 64, $1
anim_wait 4
anim_sound 6, 2, SFX_MENU
- anim_obj ANIM_OBJ_5A, 64, 84, $0
+ anim_obj ANIM_OBJ_STRING_SHOT, 64, 84, $0
anim_wait 4
anim_sound 0, 1, SFX_MENU
- anim_obj ANIM_OBJ_5A, 132, 56, $2
+ anim_obj ANIM_OBJ_STRING_SHOT, 132, 56, $2
anim_wait 64
anim_ret
; ca2d1
@@ -2325,8 +2325,8 @@ BattleAnim_Hypnosis: ; ca3d8
anim_1gfx ANIM_GFX_PSYCHIC
.loop
anim_sound 6, 2, SFX_SUPERSONIC
- anim_obj ANIM_OBJ_4C, 64, 88, $2
- anim_obj ANIM_OBJ_4C, 56, 80, $2
+ anim_obj ANIM_OBJ_WAVE, 64, 88, $2
+ anim_obj ANIM_OBJ_WAVE, 56, 80, $2
anim_wait 8
anim_loop 3, .loop
anim_wait 56
@@ -2512,7 +2512,7 @@ BattleAnim_PetalDance: ; ca564
anim_sound 0, 0, SFX_MENU
anim_2gfx ANIM_GFX_FLOWER, ANIM_GFX_HIT
.loop
- anim_obj ANIM_OBJ_61, 48, 56, $0
+ anim_obj ANIM_OBJ_PETAL_DANCE, 48, 56, $0
anim_wait 11
anim_loop 8, .loop
anim_wait 128
@@ -2526,7 +2526,7 @@ BattleAnim_PetalDance: ; ca564
BattleAnim_Barrage: ; ca580
anim_2gfx ANIM_GFX_EGG, ANIM_GFX_EXPLOSION
anim_sound 6, 2, SFX_THROW_BALL
- anim_obj ANIM_OBJ_62, 64, 92, $10
+ anim_obj ANIM_OBJ_SLUDGE_BOMB, 64, 92, $10
anim_wait 36
anim_sound 0, 1, SFX_EGG_BOMB
anim_obj ANIM_OBJ_18, 136, 56, $0
@@ -2540,7 +2540,7 @@ BattleAnim_PayDay: ; ca596
anim_obj ANIM_OBJ_01, 128, 56, $0
anim_wait 16
anim_sound 0, 1, SFX_PAY_DAY
- anim_obj ANIM_OBJ_63, 120, 76, $1
+ anim_obj ANIM_OBJ_PAY_DAY, 120, 76, $1
anim_wait 64
anim_ret
; ca5ac
@@ -2549,14 +2549,14 @@ BattleAnim_Mimic: ; ca5ac
anim_1gfx ANIM_GFX_SPEED
anim_obp0 $fc
anim_sound 63, 3, SFX_LICK
- anim_obj ANIM_OBJ_65, 132, 44, $0
- anim_obj ANIM_OBJ_65, 132, 44, $8
- anim_obj ANIM_OBJ_65, 132, 44, $10
- anim_obj ANIM_OBJ_65, 132, 44, $18
- anim_obj ANIM_OBJ_65, 132, 44, $20
- anim_obj ANIM_OBJ_65, 132, 44, $28
- anim_obj ANIM_OBJ_65, 132, 44, $30
- anim_obj ANIM_OBJ_65, 132, 44, $38
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $0
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $8
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $10
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $18
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $20
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $28
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $30
+ anim_obj ANIM_OBJ_MIMIC, 132, 44, $38
anim_wait 128
anim_wait 48
anim_ret
@@ -2565,7 +2565,7 @@ BattleAnim_Mimic: ; ca5ac
BattleAnim_LovelyKiss: ; ca5de
anim_2gfx ANIM_GFX_OBJECTS, ANIM_GFX_ANGELS
anim_bgeffect ANIM_BG_07, $0, $2, $0
- anim_obj ANIM_OBJ_96, 152, 40, $0
+ anim_obj ANIM_OBJ_LOVELY_KISS, 152, 40, $0
anim_wait 32
anim_sound 0, 1, SFX_LICK
anim_obj ANIM_OBJ_HEART, 128, 40, $0
@@ -2576,7 +2576,7 @@ BattleAnim_LovelyKiss: ; ca5de
BattleAnim_Bonemerang: ; ca5f6
anim_2gfx ANIM_GFX_MISC, ANIM_GFX_HIT
anim_sound 6, 2, SFX_HYDRO_PUMP
- anim_obj ANIM_OBJ_67, 88, 56, $1c
+ anim_obj ANIM_OBJ_BONEMERANG, 88, 56, $1c
anim_wait 24
anim_sound 0, 1, SFX_MOVE_PUZZLE_PIECE
anim_obj ANIM_OBJ_01, 136, 56, $0
@@ -2587,11 +2587,11 @@ BattleAnim_Bonemerang: ; ca5f6
BattleAnim_Swift: ; ca60c
anim_1gfx ANIM_GFX_OBJECTS
anim_sound 6, 2, SFX_METRONOME
- anim_obj ANIM_OBJ_6A, 64, 88, $4
+ anim_obj ANIM_OBJ_SWIFT, 64, 88, $4
anim_wait 4
- anim_obj ANIM_OBJ_6A, 64, 72, $4
+ anim_obj ANIM_OBJ_SWIFT, 64, 72, $4
anim_wait 4
- anim_obj ANIM_OBJ_6A, 64, 76, $4
+ anim_obj ANIM_OBJ_SWIFT, 64, 76, $4
anim_wait 64
anim_ret
; ca624
@@ -2630,7 +2630,7 @@ BattleAnim_SkullBash: ; ca63f
BattleAnim_Kinesis: ; ca66a
anim_2gfx ANIM_GFX_MISC, ANIM_GFX_NOISE
anim_bgeffect ANIM_BG_06, $0, $2, $0
- anim_obj ANIM_OBJ_6B, 80, 76, $0
+ anim_obj ANIM_OBJ_KINESIS, 80, 76, $0
anim_wait 32
.loop
anim_sound 0, 0, SFX_KINESIS
@@ -2695,21 +2695,21 @@ BattleAnim_Flash: ; ca700
anim_sound 0, 1, SFX_FLASH
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $20
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $0
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $0
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $8
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $8
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $10
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $10
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $18
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $18
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $20
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $20
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $28
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $28
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $30
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $30
anim_wait 4
- anim_obj ANIM_OBJ_6C, 136, 56, $38
+ anim_obj ANIM_OBJ_FLASH, 136, 56, $38
anim_wait 32
anim_ret
; ca73c
@@ -2776,7 +2776,7 @@ BattleAnim_SkyAttack: ; ca7a1
anim_bgeffect ANIM_BG_27, $0, $1, $0
anim_wait 32
anim_sound 0, 0, SFX_HYPER_BEAM
- anim_obj ANIM_OBJ_SKY_ATTACK_FEAROW, 48, 88, $40
+ anim_obj ANIM_OBJ_SKY_ATTACK, 48, 88, $40
anim_wait 64
anim_incobj 1
anim_wait 21
@@ -2846,7 +2846,7 @@ BattleAnim_Psybeam: ; ca829
anim_bgeffect ANIM_BG_08, $0, $4, $0
.loop
anim_sound 6, 2, SFX_PSYBEAM
- anim_obj ANIM_OBJ_4C, 64, 88, $4
+ anim_obj ANIM_OBJ_WAVE, 64, 88, $4
anim_wait 4
anim_loop 10, .loop
anim_wait 48
@@ -2887,13 +2887,13 @@ BattleAnim_Psywave: ; ca86c
anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0
.loop
anim_sound 6, 2, SFX_PSYCHIC
- anim_obj ANIM_OBJ_4C, 64, 80, $2
+ anim_obj ANIM_OBJ_WAVE, 64, 80, $2
anim_wait 8
anim_sound 6, 2, SFX_PSYCHIC
- anim_obj ANIM_OBJ_4C, 64, 88, $3
+ anim_obj ANIM_OBJ_WAVE, 64, 88, $3
anim_wait 8
anim_sound 6, 2, SFX_PSYCHIC
- anim_obj ANIM_OBJ_4C, 64, 96, $4
+ anim_obj ANIM_OBJ_WAVE, 64, 96, $4
anim_wait 8
anim_loop 3, .loop
anim_wait 32
@@ -2932,14 +2932,14 @@ BattleAnim_Growth: ; ca8d5
anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0
anim_1gfx ANIM_GFX_CHARGE
anim_sound 0, 0, SFX_SWORDS_DANCE
- anim_obj ANIM_OBJ_72, 48, 108, $0
- anim_obj ANIM_OBJ_72, 48, 108, $8
- anim_obj ANIM_OBJ_72, 48, 108, $10
- anim_obj ANIM_OBJ_72, 48, 108, $18
- anim_obj ANIM_OBJ_72, 48, 108, $20
- anim_obj ANIM_OBJ_72, 48, 108, $28
- anim_obj ANIM_OBJ_72, 48, 108, $30
- anim_obj ANIM_OBJ_72, 48, 108, $38
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $0
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $8
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $10
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $18
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $20
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $28
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $30
+ anim_obj ANIM_OBJ_GROWTH, 48, 108, $38
anim_wait 64
anim_ret
; ca909
@@ -2947,14 +2947,14 @@ BattleAnim_Growth: ; ca8d5
BattleAnim_Conversion2: ; ca909
anim_1gfx ANIM_GFX_EXPLOSION
anim_sound 63, 3, SFX_SHARPEN
- anim_obj ANIM_OBJ_73, 132, 44, $0
- anim_obj ANIM_OBJ_73, 132, 44, $8
- anim_obj ANIM_OBJ_73, 132, 44, $10
- anim_obj ANIM_OBJ_73, 132, 44, $18
- anim_obj ANIM_OBJ_73, 132, 44, $20
- anim_obj ANIM_OBJ_73, 132, 44, $28
- anim_obj ANIM_OBJ_73, 132, 44, $30
- anim_obj ANIM_OBJ_73, 132, 44, $38
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $0
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $8
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $10
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $18
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $20
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $28
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $30
+ anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $38
anim_wait 128
anim_wait 48
anim_ret
@@ -2963,7 +2963,7 @@ BattleAnim_Conversion2: ; ca909
BattleAnim_Smokescreen: ; ca939
anim_3gfx ANIM_GFX_HAZE, ANIM_GFX_EGG, ANIM_GFX_SMOKE
anim_sound 6, 2, SFX_THROW_BALL
- anim_obj ANIM_OBJ_75, 64, 92, $6c
+ anim_obj ANIM_OBJ_SMOKESCREEN, 64, 92, $6c
anim_wait 24
anim_incobj 1
anim_sound 0, 1, SFX_BALL_POOF
@@ -2971,7 +2971,7 @@ BattleAnim_Smokescreen: ; ca939
anim_wait 8
.loop
anim_sound 0, 1, SFX_MENU
- anim_obj ANIM_OBJ_74, 132, 60, $20
+ anim_obj ANIM_OBJ_SMOKE, 132, 60, $20
anim_wait 8
anim_loop 5, .loop
anim_wait 128
@@ -2982,7 +2982,7 @@ BattleAnim_Strength: ; ca960
anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT
anim_bgeffect ANIM_BG_20, $10, $1, $20
anim_sound 0, 0, SFX_STRENGTH
- anim_obj ANIM_OBJ_1F, 64, 104, $1
+ anim_obj ANIM_OBJ_STRENGTH, 64, 104, $1
anim_wait 128
anim_incobj 1
anim_wait 20
@@ -2995,11 +2995,11 @@ BattleAnim_Strength: ; ca960
BattleAnim_SwordsDance: ; ca97e
anim_1gfx ANIM_GFX_WHIP
anim_sound 0, 0, SFX_SWORDS_DANCE
- anim_obj ANIM_OBJ_76, 48, 108, $0
- anim_obj ANIM_OBJ_76, 48, 108, $d
- anim_obj ANIM_OBJ_76, 48, 108, $1a
- anim_obj ANIM_OBJ_76, 48, 108, $27
- anim_obj ANIM_OBJ_76, 48, 108, $34
+ anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $0
+ anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $d
+ anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $1a
+ anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $27
+ anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $34
anim_wait 56
anim_ret
; ca99e
@@ -3008,12 +3008,12 @@ BattleAnim_QuickAttack: ; ca99e
anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_HIT
anim_sound 0, 0, SFX_MENU
anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0
- anim_obj ANIM_OBJ_77, 24, 88, $2
- anim_obj ANIM_OBJ_77, 32, 88, $1
- anim_obj ANIM_OBJ_77, 40, 88, $0
- anim_obj ANIM_OBJ_77, 48, 88, $80
- anim_obj ANIM_OBJ_77, 56, 88, $81
- anim_obj ANIM_OBJ_77, 64, 88, $82
+ anim_obj ANIM_OBJ_SPEED_LINE, 24, 88, $2
+ anim_obj ANIM_OBJ_SPEED_LINE, 32, 88, $1
+ anim_obj ANIM_OBJ_SPEED_LINE, 40, 88, $0
+ anim_obj ANIM_OBJ_SPEED_LINE, 48, 88, $80
+ anim_obj ANIM_OBJ_SPEED_LINE, 56, 88, $81
+ anim_obj ANIM_OBJ_SPEED_LINE, 64, 88, $82
anim_wait 12
anim_sound 0, 1, SFX_COMET_PUNCH
anim_obj ANIM_OBJ_01, 136, 56, $0
@@ -3041,7 +3041,7 @@ BattleAnim_Sharpen: ; ca9ed
anim_call BattleAnim_FollowEnemyFeet_0
anim_sound 0, 0, SFX_SHARPEN
anim_bgeffect ANIM_BG_18, $0, $1, $40
- anim_obj ANIM_OBJ_78, 48, 88, $0
+ anim_obj ANIM_OBJ_SHARPEN, 48, 88, $0
anim_wait 96
anim_incobj 2
anim_incbgeffect ANIM_BG_18
@@ -3055,7 +3055,7 @@ BattleAnim_DefenseCurl: ; caa0a
anim_call BattleAnim_FollowEnemyFeet_0
anim_sound 0, 0, SFX_SHARPEN
anim_bgeffect ANIM_BG_18, $0, $1, $40
- anim_obj ANIM_OBJ_79, 48, 88, $0
+ anim_obj ANIM_OBJ_DEFENSE_CURL, 48, 88, $0
anim_wait 96
anim_incobj 2
anim_incbgeffect ANIM_BG_18
@@ -3067,7 +3067,7 @@ BattleAnim_SeismicToss: ; caa27
anim_2gfx ANIM_GFX_GLOBE, ANIM_GFX_HIT
anim_bgeffect ANIM_BG_20, $10, $1, $20
anim_sound 0, 0, SFX_STRENGTH
- anim_obj ANIM_OBJ_20, 64, 104, $1
+ anim_obj ANIM_OBJ_SEISMIC_TOSS, 64, 104, $1
anim_wait 128
anim_incobj 1
anim_wait 20
@@ -3102,14 +3102,14 @@ BattleAnim_Agility: ; caa74
anim_obp0 $fc
anim_call BattleAnim_FollowEnemyFeet_0
anim_bgeffect ANIM_BG_18, $0, $1, $40
- anim_obj ANIM_OBJ_7D, 8, 24, $10
- anim_obj ANIM_OBJ_7D, 8, 48, $2
- anim_obj ANIM_OBJ_7D, 8, 88, $8
+ anim_obj ANIM_OBJ_AGILITY, 8, 24, $10
+ anim_obj ANIM_OBJ_AGILITY, 8, 48, $2
+ anim_obj ANIM_OBJ_AGILITY, 8, 88, $8
anim_wait 4
- anim_obj ANIM_OBJ_7D, 8, 32, $6
- anim_obj ANIM_OBJ_7D, 8, 56, $c
- anim_obj ANIM_OBJ_7D, 8, 80, $4
- anim_obj ANIM_OBJ_7D, 8, 104, $e
+ anim_obj ANIM_OBJ_AGILITY, 8, 32, $6
+ anim_obj ANIM_OBJ_AGILITY, 8, 56, $c
+ anim_obj ANIM_OBJ_AGILITY, 8, 80, $4
+ anim_obj ANIM_OBJ_AGILITY, 8, 104, $e
.loop
anim_sound 0, 0, SFX_RAZOR_WIND
anim_wait 4
@@ -3121,7 +3121,7 @@ BattleAnim_Agility: ; caa74
BattleAnim_BoneClub: ; caab2
anim_2gfx ANIM_GFX_HIT, ANIM_GFX_MISC
- anim_obj ANIM_OBJ_68, 64, 88, $2
+ anim_obj ANIM_OBJ_BONE_CLUB, 64, 88, $2
anim_wait 32
anim_sound 0, 1, SFX_BONE_CLUB
anim_obj ANIM_OBJ_01, 136, 56, $0
@@ -3135,10 +3135,10 @@ BattleAnim_Barrier: ; caac5
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_wait 8
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_50, 72, 80, $0
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
anim_wait 32
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_50, 72, 80, $0
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
anim_wait 32
anim_ret
; caae1
@@ -3173,7 +3173,7 @@ BattleAnim_PsychicM: ; cab1d
anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0
.loop
anim_sound 6, 2, SFX_PSYCHIC
- anim_obj ANIM_OBJ_4C, 64, 88, $2
+ anim_obj ANIM_OBJ_WAVE, 64, 88, $2
anim_wait 8
anim_loop 8, .loop
anim_wait 96
@@ -3283,7 +3283,7 @@ BattleAnim_Slam: ; cac13
BattleAnim_Disable: ; cac24
anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_STATUS
anim_bgeffect ANIM_BG_06, $0, $2, $0
- anim_obj ANIM_OBJ_7C, 132, 56, $0
+ anim_obj ANIM_OBJ_DISABLE, 132, 56, $0
anim_wait 16
anim_sound 0, 1, SFX_BIND
anim_obj ANIM_OBJ_PARALYZED, 104, 56, $42
@@ -3316,7 +3316,7 @@ BattleAnim_Sketch: ; cac61
anim_call BattleAnim_FollowEnemyFeet_0
anim_bgeffect ANIM_BG_1A, $0, $1, $20
anim_sound 0, 0, SFX_SKETCH
- anim_obj ANIM_OBJ_98, 72, 80, $0
+ anim_obj ANIM_OBJ_SKETCH, 72, 80, $0
anim_wait 80
anim_incbgeffect ANIM_BG_1A
anim_call BattleAnim_ShowMon_0
@@ -3366,7 +3366,7 @@ BattleAnim_Thief: ; cacb5
anim_wait 1
anim_1gfx ANIM_GFX_STATUS
anim_sound 0, 1, SFX_THIEF_2
- anim_obj ANIM_OBJ_8B, 120, 76, $1
+ anim_obj ANIM_OBJ_THIEF, 120, 76, $1
anim_wait 64
anim_ret
; cacd9
@@ -3374,13 +3374,13 @@ BattleAnim_Thief: ; cacb5
BattleAnim_SpiderWeb: ; cacd9
anim_1gfx ANIM_GFX_WEB
anim_bgeffect ANIM_BG_07, $0, $2, $0
- anim_obj ANIM_OBJ_92, 132, 48, $0
+ anim_obj ANIM_OBJ_SPIDER_WEB, 132, 48, $0
anim_sound 6, 2, SFX_SPIDER_WEB
- anim_obj ANIM_OBJ_5A, 64, 80, $0
+ anim_obj ANIM_OBJ_STRING_SHOT, 64, 80, $0
anim_wait 4
- anim_obj ANIM_OBJ_5A, 64, 88, $0
+ anim_obj ANIM_OBJ_STRING_SHOT, 64, 88, $0
anim_wait 4
- anim_obj ANIM_OBJ_5A, 64, 84, $0
+ anim_obj ANIM_OBJ_STRING_SHOT, 64, 84, $0
anim_wait 64
anim_ret
; cacfb
@@ -3389,10 +3389,10 @@ BattleAnim_MindReader: ; cacfb
anim_1gfx ANIM_GFX_MISC
anim_sound 0, 1, SFX_MIND_READER
.loop
- anim_obj ANIM_OBJ_88, 132, 48, $3
- anim_obj ANIM_OBJ_88, 132, 48, $12
- anim_obj ANIM_OBJ_88, 132, 48, $20
- anim_obj ANIM_OBJ_88, 132, 48, $31
+ anim_obj ANIM_OBJ_MIND_READER, 132, 48, $3
+ anim_obj ANIM_OBJ_MIND_READER, 132, 48, $12
+ anim_obj ANIM_OBJ_MIND_READER, 132, 48, $20
+ anim_obj ANIM_OBJ_MIND_READER, 132, 48, $31
anim_wait 16
anim_loop 2, .loop
anim_wait 32
@@ -3403,8 +3403,8 @@ BattleAnim_Nightmare: ; cad1b
anim_1gfx ANIM_GFX_ANGELS
anim_bgp $1b
anim_obp0 $f
- anim_obj ANIM_OBJ_94, 132, 40, $0
- anim_obj ANIM_OBJ_94, 132, 40, $a0
+ anim_obj ANIM_OBJ_NIGHTMARE, 132, 40, $0
+ anim_obj ANIM_OBJ_NIGHTMARE, 132, 40, $a0
anim_sound 0, 1, SFX_NIGHTMARE
anim_wait 96
anim_ret
@@ -3414,7 +3414,7 @@ BattleAnim_FlameWheel: ; cad30
anim_1gfx ANIM_GFX_FIRE
.loop
anim_sound 0, 0, SFX_EMBER
- anim_obj ANIM_OBJ_7F, 48, 96, $0
+ anim_obj ANIM_OBJ_FLAME_WHEEL, 48, 96, $0
anim_wait 6
anim_loop 8, .loop
anim_wait 96
@@ -3423,9 +3423,9 @@ BattleAnim_FlameWheel: ; cad30
anim_wait 4
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3
anim_sound 0, 1, SFX_EMBER
- anim_obj ANIM_OBJ_0F, 136, 48, $1
- anim_obj ANIM_OBJ_0F, 136, 48, $4
- anim_obj ANIM_OBJ_0F, 136, 48, $5
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $1
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $4
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $5
anim_wait 8
anim_bgeffect ANIM_BG_SHOW_MON, $0, $0, $0
anim_wait 4
@@ -3436,7 +3436,7 @@ BattleAnim_FlameWheel: ; cad30
BattleAnim_Snore: ; cad6b
anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_NOISE
- anim_obj ANIM_OBJ_54, 64, 80, $0
+ anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0
anim_wait 32
anim_bgeffect ANIM_BG_1F, $60, $2, $0
anim_sound 0, 0, SFX_SNORE
@@ -3451,7 +3451,7 @@ BattleAnim_Snore: ; cad6b
BattleAnim_Curse: ; cad86
anim_if_param_equal $1, .NotGhost
anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS
- anim_obj ANIM_OBJ_A5, 68, 72, $0
+ anim_obj ANIM_OBJ_CURSE, 68, 72, $0
anim_sound 0, 0, SFX_CURSE
anim_wait 32
anim_incobj 1
@@ -3515,14 +3515,14 @@ BattleAnim_Conversion: ; cae17
anim_1gfx ANIM_GFX_EXPLOSION
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
anim_sound 63, 3, SFX_SHARPEN
- anim_obj ANIM_OBJ_91, 48, 88, $0
- anim_obj ANIM_OBJ_91, 48, 88, $8
- anim_obj ANIM_OBJ_91, 48, 88, $10
- anim_obj ANIM_OBJ_91, 48, 88, $18
- anim_obj ANIM_OBJ_91, 48, 88, $20
- anim_obj ANIM_OBJ_91, 48, 88, $28
- anim_obj ANIM_OBJ_91, 48, 88, $30
- anim_obj ANIM_OBJ_91, 48, 88, $38
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $0
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $8
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $10
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $18
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $20
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $28
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $30
+ anim_obj ANIM_OBJ_CONVERSION, 48, 88, $38
anim_wait 128
anim_ret
; cae4b
@@ -3533,7 +3533,7 @@ BattleAnim_Aeroblast: ; cae4b
anim_bgeffect ANIM_BG_1F, $50, $4, $10
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_sound 0, 0, SFX_AEROBLAST
- anim_obj ANIM_OBJ_B3, 72, 88, $0
+ anim_obj ANIM_OBJ_AEROBLAST, 72, 88, $0
anim_wait 32
anim_sound 0, 0, SFX_HYPER_BEAM
anim_obj ANIM_OBJ_27, 80, 84, $0
@@ -3567,26 +3567,26 @@ BattleAnim_Reversal: ; cae97
anim_obj ANIM_OBJ_04, 112, 64, $0
anim_wait 2
anim_sound 0, 1, SFX_SHINE
- anim_obj ANIM_OBJ_A7, 120, 56, $0
+ anim_obj ANIM_OBJ_FORESIGHT, 120, 56, $0
anim_wait 2
anim_sound 0, 1, SFX_MEGA_PUNCH
anim_obj ANIM_OBJ_04, 128, 56, $0
anim_wait 2
anim_sound 0, 1, SFX_SHINE
- anim_obj ANIM_OBJ_A7, 136, 48, $0
+ anim_obj ANIM_OBJ_FORESIGHT, 136, 48, $0
anim_wait 2
anim_sound 0, 1, SFX_MEGA_PUNCH
anim_obj ANIM_OBJ_04, 144, 48, $0
anim_wait 2
anim_sound 0, 1, SFX_SHINE
- anim_obj ANIM_OBJ_A7, 152, 40, $0
+ anim_obj ANIM_OBJ_FORESIGHT, 152, 40, $0
anim_wait 24
anim_ret
; caed6
BattleAnim_Spite: ; caed6
anim_1gfx ANIM_GFX_ANGELS
- anim_obj ANIM_OBJ_A4, 132, 16, $0
+ anim_obj ANIM_OBJ_SPITE, 132, 16, $0
anim_sound 0, 1, SFX_SPITE
anim_wait 96
anim_ret
@@ -3596,13 +3596,13 @@ BattleAnim_PowderSnow: ; caee2
anim_1gfx ANIM_GFX_ICE
.loop ; caee4
anim_sound 6, 2, SFX_SHINE
- anim_obj ANIM_OBJ_8F, 64, 88, $23
+ anim_obj ANIM_OBJ_POWDER_SNOW, 64, 88, $23
anim_wait 2
anim_sound 6, 2, SFX_SHINE
- anim_obj ANIM_OBJ_8F, 64, 80, $24
+ anim_obj ANIM_OBJ_POWDER_SNOW, 64, 80, $24
anim_wait 2
anim_sound 6, 2, SFX_SHINE
- anim_obj ANIM_OBJ_8F, 64, 96, $23
+ anim_obj ANIM_OBJ_POWDER_SNOW, 64, 96, $23
anim_wait 2
anim_loop 2, .loop
anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0
@@ -3615,11 +3615,11 @@ BattleAnim_PowderSnow: ; caee2
BattleAnim_Protect: ; caf0e
anim_1gfx ANIM_GFX_OBJECTS
anim_bgeffect ANIM_BG_07, $0, $2, $0
- anim_obj ANIM_OBJ_8A, 80, 80, $0
- anim_obj ANIM_OBJ_8A, 80, 80, $d
- anim_obj ANIM_OBJ_8A, 80, 80, $1a
- anim_obj ANIM_OBJ_8A, 80, 80, $27
- anim_obj ANIM_OBJ_8A, 80, 80, $34
+ anim_obj ANIM_OBJ_PROTECT, 80, 80, $0
+ anim_obj ANIM_OBJ_PROTECT, 80, 80, $d
+ anim_obj ANIM_OBJ_PROTECT, 80, 80, $1a
+ anim_obj ANIM_OBJ_PROTECT, 80, 80, $27
+ anim_obj ANIM_OBJ_PROTECT, 80, 80, $34
anim_sound 0, 0, SFX_PROTECT
anim_wait 96
anim_ret
@@ -3629,12 +3629,12 @@ BattleAnim_MachPunch: ; caf33
anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_HIT
anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0
anim_sound 0, 0, SFX_MENU
- anim_obj ANIM_OBJ_77, 24, 88, $2
- anim_obj ANIM_OBJ_77, 32, 88, $1
- anim_obj ANIM_OBJ_77, 40, 88, $0
- anim_obj ANIM_OBJ_77, 48, 88, $80
- anim_obj ANIM_OBJ_77, 56, 88, $81
- anim_obj ANIM_OBJ_77, 64, 88, $82
+ anim_obj ANIM_OBJ_SPEED_LINE, 24, 88, $2
+ anim_obj ANIM_OBJ_SPEED_LINE, 32, 88, $1
+ anim_obj ANIM_OBJ_SPEED_LINE, 40, 88, $0
+ anim_obj ANIM_OBJ_SPEED_LINE, 48, 88, $80
+ anim_obj ANIM_OBJ_SPEED_LINE, 56, 88, $81
+ anim_obj ANIM_OBJ_SPEED_LINE, 64, 88, $82
anim_wait 12
anim_sound 0, 1, SFX_MEGA_PUNCH
anim_obj ANIM_OBJ_06, 136, 56, $0
@@ -3679,7 +3679,7 @@ BattleAnim_FaintAttack: ; caf84
BattleAnim_SweetKiss: ; cafb4
anim_2gfx ANIM_GFX_OBJECTS, ANIM_GFX_ANGELS
anim_bgeffect ANIM_BG_07, $0, $2, $0
- anim_obj ANIM_OBJ_97, 96, 40, $0
+ anim_obj ANIM_OBJ_SWEET_KISS, 96, 40, $0
anim_sound 0, 1, SFX_SWEET_KISS
anim_wait 32
anim_sound 0, 1, SFX_SWEET_KISS_2
@@ -3733,7 +3733,7 @@ BattleAnim_SludgeBomb: ; cb051
anim_2gfx ANIM_GFX_EGG, ANIM_GFX_POISON
anim_bgeffect ANIM_BG_BLACK_HUES, $0, $8, $0
anim_sound 6, 2, SFX_SLUDGE_BOMB
- anim_obj ANIM_OBJ_62, 64, 92, $10
+ anim_obj ANIM_OBJ_SLUDGE_BOMB, 64, 92, $10
anim_wait 36
anim_call BattleAnim_SludgeBomb_branch_cbc15
anim_wait 64
@@ -3750,13 +3750,13 @@ BattleAnim_MudSlap: ; cb067
BattleAnim_Octazooka: ; cb06f
anim_3gfx ANIM_GFX_HAZE, ANIM_GFX_EGG, ANIM_GFX_SMOKE
anim_sound 6, 2, SFX_SLUDGE_BOMB
- anim_obj ANIM_OBJ_8C, 64, 92, $4
+ anim_obj ANIM_OBJ_OCTAZOOKA, 64, 92, $4
anim_wait 16
anim_obj ANIM_OBJ_BALL_POOF, 132, 56, $10
anim_wait 8
anim_if_param_equal $0, .done
.loop
- anim_obj ANIM_OBJ_74, 132, 60, $20
+ anim_obj ANIM_OBJ_SMOKE, 132, 60, $20
anim_wait 8
anim_loop 5, .loop
anim_wait 128
@@ -3783,7 +3783,7 @@ BattleAnim_ZapCannon: ; cb0b0
anim_bgp $1b
anim_obp0 $30
anim_sound 6, 2, SFX_ZAP_CANNON
- anim_obj ANIM_OBJ_A3, 64, 92, $2
+ anim_obj ANIM_OBJ_ZAP_CANNON, 64, 92, $2
anim_wait 40
anim_sound 0, 1, SFX_THUNDERSHOCK
anim_obj ANIM_OBJ_LIGHTNING_BOLT, 136, 56, $2
@@ -3798,7 +3798,7 @@ BattleAnim_Foresight: ; cb0d0
anim_call BattleAnim_FollowEnemyFeet_1
anim_bgeffect ANIM_BG_07, $0, $0, $0
anim_sound 0, 1, SFX_FORESIGHT
- anim_obj ANIM_OBJ_A7, 132, 40, $0
+ anim_obj ANIM_OBJ_FORESIGHT, 132, 40, $0
anim_wait 24
anim_bgeffect ANIM_BG_19, $0, $0, $40
anim_wait 64
@@ -3814,13 +3814,13 @@ BattleAnim_DestinyBond: ; cb0f0
anim_obp0 $0
anim_if_param_equal $1, BattleAnim_DestinyBond_branch_cb104
anim_sound 6, 2, SFX_WHIRLWIND
- anim_obj ANIM_OBJ_9B, 44, 120, $2
+ anim_obj ANIM_OBJ_DESTINY_BOND, 44, 120, $2
anim_wait 128
anim_ret
; cb104
BattleAnim_DestinyBond_branch_cb104: ; cb104
- anim_obj ANIM_OBJ_9B, 132, 76, $0
+ anim_obj ANIM_OBJ_DESTINY_BOND, 132, 76, $0
anim_sound 0, 1, SFX_KINESIS
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
anim_wait 32
@@ -3876,7 +3876,7 @@ BattleAnim_Detect: ; cb18c
anim_1gfx ANIM_GFX_SHINE
anim_bgeffect ANIM_BG_07, $0, $0, $0
anim_sound 0, 0, SFX_FORESIGHT
- anim_obj ANIM_OBJ_A7, 64, 88, $0
+ anim_obj ANIM_OBJ_FORESIGHT, 64, 88, $0
anim_wait 24
anim_ret
; cb19d
@@ -3884,7 +3884,7 @@ BattleAnim_Detect: ; cb18c
BattleAnim_BoneRush: ; cb19d
anim_2gfx ANIM_GFX_HIT, ANIM_GFX_MISC
anim_sound 0, 1, SFX_BONE_CLUB
- anim_obj ANIM_OBJ_69, 132, 56, $2
+ anim_obj ANIM_OBJ_BONE_RUSH, 132, 56, $2
anim_wait 16
anim_sound 0, 1, SFX_COMET_PUNCH
anim_obj ANIM_OBJ_01, 120, 48, $0
@@ -3899,10 +3899,10 @@ BattleAnim_LockOn: ; cb1bc
anim_1gfx ANIM_GFX_MISC
anim_sound 0, 1, SFX_MIND_READER
.loop
- anim_obj ANIM_OBJ_87, 132, 48, $3
- anim_obj ANIM_OBJ_87, 132, 48, $12
- anim_obj ANIM_OBJ_87, 132, 48, $20
- anim_obj ANIM_OBJ_87, 132, 48, $31
+ anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $3
+ anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $12
+ anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $20
+ anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $31
anim_wait 16
anim_loop 2, .loop
anim_wait 32
@@ -3932,11 +3932,11 @@ BattleAnim_Outrage: ; cb1dc
BattleAnim_Sandstorm: ; cb210
anim_1gfx ANIM_GFX_POWDER
- anim_obj ANIM_OBJ_A2, 88, 0, $0
+ anim_obj ANIM_OBJ_SANDSTORM, 88, 0, $0
anim_wait 8
- anim_obj ANIM_OBJ_A2, 72, 0, $1
+ anim_obj ANIM_OBJ_SANDSTORM, 72, 0, $1
anim_wait 8
- anim_obj ANIM_OBJ_A2, 56, 0, $2
+ anim_obj ANIM_OBJ_SANDSTORM, 56, 0, $2
.loop
anim_sound 0, 1, SFX_MENU
anim_wait 8
@@ -3960,15 +3960,15 @@ BattleAnim_GigaDrain: ; cb22d
anim_bgeffect ANIM_BG_07, $0, $0, $0
.loop
anim_sound 0, 0, SFX_METRONOME
- anim_obj ANIM_OBJ_9D, 24, 64, $0
+ anim_obj ANIM_OBJ_GLIMMER, 24, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 56, 104, $0
+ anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 24, 104, $0
+ anim_obj ANIM_OBJ_GLIMMER, 24, 104, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 56, 64, $0
+ anim_obj ANIM_OBJ_GLIMMER, 56, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 40, 84, $0
+ anim_obj ANIM_OBJ_GLIMMER, 40, 84, $0
anim_wait 5
anim_loop 2, .loop
anim_wait 32
@@ -4036,7 +4036,7 @@ BattleAnim_FalseSwipe: ; cb2f5
anim_sound 0, 1, SFX_CUT
anim_obj ANIM_OBJ_3A, 152, 40, $0
anim_wait 4
- anim_obj ANIM_OBJ_9D, 136, 40, $0
+ anim_obj ANIM_OBJ_GLIMMER, 136, 40, $0
anim_wait 32
anim_ret
; cb30d
@@ -4045,12 +4045,12 @@ BattleAnim_Swagger: ; cb30d
anim_2gfx ANIM_GFX_MISC, ANIM_GFX_WIND
.loop
anim_sound 0, 0, SFX_MENU
- anim_obj ANIM_OBJ_A9, 72, 88, $44
+ anim_obj ANIM_OBJ_SWAGGER, 72, 88, $44
anim_wait 32
anim_loop 2, .loop
anim_wait 32
anim_sound 0, 1, SFX_KINESIS_2
- anim_obj ANIM_OBJ_83, 104, 40, $0
+ anim_obj ANIM_OBJ_ANGER, 104, 40, $0
anim_wait 40
anim_ret
; cb328
@@ -4058,12 +4058,12 @@ BattleAnim_Swagger: ; cb30d
BattleAnim_MilkDrink: ; cb328
anim_2gfx ANIM_GFX_MISC, ANIM_GFX_BUBBLE
anim_call BattleAnim_FollowEnemyFeet_0
- anim_obj ANIM_OBJ_82, 74, 104, $0
+ anim_obj ANIM_OBJ_MILK_DRINK, 74, 104, $0
anim_wait 16
anim_bgeffect ANIM_BG_18, $0, $1, $40
anim_sound 0, 0, SFX_MILK_DRINK
.loop
- anim_obj ANIM_OBJ_2C, 44, 88, $20
+ anim_obj ANIM_OBJ_RECOVER, 44, 88, $20
anim_wait 8
anim_loop 8, .loop
anim_wait 128
@@ -4076,7 +4076,7 @@ BattleAnim_Spark: ; cb34d
anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION
anim_sound 0, 0, SFX_ZAP_CANNON
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3
- anim_obj ANIM_OBJ_30, 48, 92, $0
+ anim_obj ANIM_OBJ_THUNDER_WAVE, 48, 92, $0
anim_wait 24
anim_setobj $1, $3
anim_wait 1
@@ -4139,15 +4139,15 @@ BattleAnim_MeanLook: ; cb3df
anim_1gfx ANIM_GFX_PSYCHIC
anim_obp0 $e0
anim_sound 0, 1, SFX_MEAN_LOOK
- anim_obj ANIM_OBJ_AC, 148, 32, $0
+ anim_obj ANIM_OBJ_MEAN_LOOK, 148, 32, $0
anim_wait 5
- anim_obj ANIM_OBJ_AC, 116, 64, $0
+ anim_obj ANIM_OBJ_MEAN_LOOK, 116, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_AC, 148, 64, $0
+ anim_obj ANIM_OBJ_MEAN_LOOK, 148, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_AC, 116, 32, $0
+ anim_obj ANIM_OBJ_MEAN_LOOK, 116, 32, $0
anim_wait 5
- anim_obj ANIM_OBJ_AC, 132, 48, $0
+ anim_obj ANIM_OBJ_MEAN_LOOK, 132, 48, $0
anim_wait 128
anim_ret
; cb405
@@ -4156,7 +4156,7 @@ BattleAnim_Attract: ; cb405
anim_1gfx ANIM_GFX_OBJECTS
.loop
anim_sound 0, 0, SFX_ATTRACT
- anim_obj ANIM_OBJ_66, 44, 80, $2
+ anim_obj ANIM_OBJ_ATTRACT, 44, 80, $2
anim_wait 8
anim_loop 5, .loop
anim_wait 128
@@ -4168,7 +4168,7 @@ BattleAnim_SleepTalk: ; cb417
anim_1gfx ANIM_GFX_STATUS
.loop
anim_sound 0, 0, SFX_STRENGTH
- anim_obj ANIM_OBJ_54, 64, 80, $0
+ anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0
anim_wait 40
anim_loop 2, .loop
anim_wait 32
@@ -4220,9 +4220,9 @@ BattleAnim_Return: ; cb464
BattleAnim_Present: ; cb488
anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_BUBBLE
anim_sound 0, 1, SFX_PRESENT
- anim_obj ANIM_OBJ_8D, 64, 88, $6c
+ anim_obj ANIM_OBJ_PRESENT, 64, 88, $6c
anim_wait 56
- anim_obj ANIM_OBJ_53, 104, 48, $0
+ anim_obj ANIM_OBJ_AMNESIA, 104, 48, $0
anim_wait 48
anim_incobj 2
anim_if_param_equal $3, .heal
@@ -4239,7 +4239,7 @@ BattleAnim_Present: ; cb488
.heal
anim_sound 0, 1, SFX_METRONOME
.loop2
- anim_obj ANIM_OBJ_2C, 132, 48, $24
+ anim_obj ANIM_OBJ_RECOVER, 132, 48, $24
anim_wait 8
anim_loop 8, .loop2
anim_wait 128
@@ -4249,7 +4249,7 @@ BattleAnim_Present: ; cb488
BattleAnim_Frustration: ; cb4c1
anim_1gfx ANIM_GFX_MISC
anim_sound 0, 0, SFX_KINESIS_2
- anim_obj ANIM_OBJ_83, 72, 80, $0
+ anim_obj ANIM_OBJ_ANGER, 72, 80, $0
anim_wait 40
anim_1gfx ANIM_GFX_HIT
anim_call BattleAnim_FollowEnemyFeet_0
@@ -4273,11 +4273,11 @@ BattleAnim_Frustration: ; cb4c1
BattleAnim_Safeguard: ; cb4f9
anim_1gfx ANIM_GFX_MISC
anim_bgeffect ANIM_BG_06, $0, $2, $0
- anim_obj ANIM_OBJ_89, 80, 80, $0
- anim_obj ANIM_OBJ_89, 80, 80, $d
- anim_obj ANIM_OBJ_89, 80, 80, $1a
- anim_obj ANIM_OBJ_89, 80, 80, $27
- anim_obj ANIM_OBJ_89, 80, 80, $34
+ anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $0
+ anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $d
+ anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $1a
+ anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $27
+ anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $34
anim_sound 0, 0, SFX_PROTECT
anim_wait 96
anim_ret
@@ -4303,7 +4303,7 @@ BattleAnim_SacredFire: ; cb53d
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
.loop
anim_sound 0, 0, SFX_EMBER
- anim_obj ANIM_OBJ_80, 48, 104, $0
+ anim_obj ANIM_OBJ_SACRED_FIRE, 48, 104, $0
anim_wait 8
anim_loop 8, .loop
anim_wait 96
@@ -4311,9 +4311,9 @@ BattleAnim_SacredFire: ; cb53d
anim_bgeffect ANIM_BG_TACKLE, $0, $1, $0
anim_wait 4
anim_sound 0, 1, SFX_EMBER
- anim_obj ANIM_OBJ_0F, 136, 48, $1
- anim_obj ANIM_OBJ_0F, 136, 48, $4
- anim_obj ANIM_OBJ_0F, 136, 48, $5
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $1
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $4
+ anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $5
anim_wait 8
anim_bgeffect ANIM_BG_SHOW_MON, $0, $0, $0
anim_wait 4
@@ -4327,15 +4327,15 @@ BattleAnim_Magnitude: ; cb57d
.loop
anim_bgeffect ANIM_BG_1F, $e, $4, $0
anim_sound 0, 1, SFX_STRENGTH
- anim_obj ANIM_OBJ_1E, 128, 64, $40
+ anim_obj ANIM_OBJ_SMALL_ROCK, 128, 64, $40
anim_wait 2
- anim_obj ANIM_OBJ_1E, 120, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 120, 68, $30
anim_wait 2
- anim_obj ANIM_OBJ_1E, 152, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 152, 68, $30
anim_wait 2
- anim_obj ANIM_OBJ_1E, 144, 64, $40
+ anim_obj ANIM_OBJ_SMALL_ROCK, 144, 64, $40
anim_wait 2
- anim_obj ANIM_OBJ_1E, 136, 68, $30
+ anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30
anim_wait 2
anim_jumpuntil .loop
anim_wait 96
@@ -4370,7 +4370,7 @@ BattleAnim_Dragonbreath: ; cb5de
anim_1gfx ANIM_GFX_FIRE
anim_sound 6, 2, SFX_EMBER
.loop
- anim_obj ANIM_OBJ_90, 64, 92, $4
+ anim_obj ANIM_OBJ_DRAGONBREATH, 64, 92, $4
anim_wait 4
anim_loop 10, .loop
anim_wait 64
@@ -4379,7 +4379,7 @@ BattleAnim_Dragonbreath: ; cb5de
BattleAnim_BatonPass: ; cb5ef
anim_1gfx ANIM_GFX_MISC
- anim_obj ANIM_OBJ_86, 44, 104, $20
+ anim_obj ANIM_OBJ_BATON_PASS, 44, 104, $20
anim_sound 0, 0, SFX_BATON_PASS
anim_call BattleAnim_BatonPass_branch_c9486
anim_wait 64
@@ -4434,7 +4434,7 @@ BattleAnim_RapidSpin: ; cb65e
anim_obp0 $e4
.loop
anim_sound 0, 0, SFX_MENU
- anim_obj ANIM_OBJ_A8, 44, 112, $0
+ anim_obj ANIM_OBJ_RAPID_SPIN, 44, 112, $0
anim_wait 2
anim_loop 5, .loop
anim_wait 24
@@ -4532,7 +4532,7 @@ BattleAnim_MorningSun: ; cb739
anim_bgeffect ANIM_BG_07, $0, $0, $0
anim_sound 0, 0, SFX_MORNING_SUN
.loop
- anim_obj ANIM_OBJ_9C, 16, 48, $88
+ anim_obj ANIM_OBJ_MORNING_SUN, 16, 48, $88
anim_wait 6
anim_loop 5, .loop
anim_wait 32
@@ -4570,8 +4570,8 @@ BattleAnim_Crunch: ; cb77e
anim_bgp $1b
anim_obp0 $c0
anim_bgeffect ANIM_BG_1F, $20, $2, $0
- anim_obj ANIM_OBJ_36, 136, 56, $a8
- anim_obj ANIM_OBJ_36, 136, 56, $28
+ anim_obj ANIM_OBJ_BITE, 136, 56, $a8
+ anim_obj ANIM_OBJ_BITE, 136, 56, $28
anim_wait 8
anim_sound 0, 1, SFX_BITE
anim_obj ANIM_OBJ_00, 144, 48, $18
@@ -4586,11 +4586,11 @@ BattleAnim_Moonlight: ; cb7a8
anim_1gfx ANIM_GFX_SHINE
anim_bgp $1b
anim_bgeffect ANIM_BG_07, $0, $0, $0
- anim_obj ANIM_OBJ_9E, 0, 40, $0
- anim_obj ANIM_OBJ_9E, 16, 56, $0
- anim_obj ANIM_OBJ_9E, 32, 72, $0
- anim_obj ANIM_OBJ_9E, 48, 88, $0
- anim_obj ANIM_OBJ_9E, 64, 104, $0
+ anim_obj ANIM_OBJ_MOONLIGHT, 0, 40, $0
+ anim_obj ANIM_OBJ_MOONLIGHT, 16, 56, $0
+ anim_obj ANIM_OBJ_MOONLIGHT, 32, 72, $0
+ anim_obj ANIM_OBJ_MOONLIGHT, 48, 88, $0
+ anim_obj ANIM_OBJ_MOONLIGHT, 64, 104, $0
anim_wait 1
anim_sound 0, 0, SFX_MOONLIGHT
anim_wait 63
@@ -4608,14 +4608,14 @@ BattleAnim_HiddenPower: ; cb7db
anim_call BattleAnim_FollowEnemyFeet_0
anim_bgeffect ANIM_BG_1A, $0, $1, $20
anim_bgeffect ANIM_BG_07, $0, $2, $0
- anim_obj ANIM_OBJ_9F, 44, 88, $0
- anim_obj ANIM_OBJ_9F, 44, 88, $8
- anim_obj ANIM_OBJ_9F, 44, 88, $10
- anim_obj ANIM_OBJ_9F, 44, 88, $18
- anim_obj ANIM_OBJ_9F, 44, 88, $20
- anim_obj ANIM_OBJ_9F, 44, 88, $28
- anim_obj ANIM_OBJ_9F, 44, 88, $30
- anim_obj ANIM_OBJ_9F, 44, 88, $38
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $0
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $8
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $10
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $18
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $20
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $28
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $30
+ anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $38
.loop
anim_sound 0, 0, SFX_SWORDS_DANCE
anim_wait 8
@@ -4701,11 +4701,11 @@ BattleAnim_RainDance: ; cb8b3
anim_bgp $f8
anim_obp0 $7c
anim_sound 0, 1, SFX_RAIN_DANCE
- anim_obj ANIM_OBJ_AF, 88, 0, $0
+ anim_obj ANIM_OBJ_RAIN, 88, 0, $0
anim_wait 8
- anim_obj ANIM_OBJ_AF, 88, 0, $1
+ anim_obj ANIM_OBJ_RAIN, 88, 0, $1
anim_wait 8
- anim_obj ANIM_OBJ_AF, 88, 0, $2
+ anim_obj ANIM_OBJ_RAIN, 88, 0, $2
anim_wait 128
anim_ret
; cb8cf
@@ -4714,11 +4714,11 @@ BattleAnim_SunnyDay: ; cb8cf
anim_1gfx ANIM_GFX_WATER
anim_bgp $90
anim_sound 0, 1, SFX_MORNING_SUN
- anim_obj ANIM_OBJ_AF, 88, 0, $2
+ anim_obj ANIM_OBJ_RAIN, 88, 0, $2
anim_wait 8
- anim_obj ANIM_OBJ_AF, 88, 0, $2
+ anim_obj ANIM_OBJ_RAIN, 88, 0, $2
anim_wait 8
- anim_obj ANIM_OBJ_AF, 88, 0, $2
+ anim_obj ANIM_OBJ_RAIN, 88, 0, $2
anim_wait 128
anim_ret
; cb8e9
@@ -4728,7 +4728,7 @@ BattleAnim_MirrorCoat: ; cb8e9
anim_bgeffect ANIM_BG_06, $0, $2, $0
.loop
anim_sound 0, 0, SFX_SHINE
- anim_obj ANIM_OBJ_50, 72, 80, $0
+ anim_obj ANIM_OBJ_SCREEN, 72, 80, $0
anim_obj ANIM_OBJ_AE, 64, 72, $4
anim_wait 8
anim_obj ANIM_OBJ_AE, 64, 88, $4
@@ -4747,10 +4747,10 @@ BattleAnim_PsychUp: ; cb917
anim_call BattleAnim_FollowEnemyFeet_0
anim_bgeffect ANIM_BG_1A, $0, $1, $20
anim_sound 0, 0, SFX_PSYBEAM
- anim_obj ANIM_OBJ_B1, 44, 88, $0
- anim_obj ANIM_OBJ_B1, 44, 88, $10
- anim_obj ANIM_OBJ_B1, 44, 88, $20
- anim_obj ANIM_OBJ_B1, 44, 88, $30
+ anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $0
+ anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $10
+ anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $20
+ anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $30
anim_wait 64
anim_incbgeffect ANIM_BG_1A
anim_call BattleAnim_ShowMon_0
@@ -4762,12 +4762,12 @@ BattleAnim_Extremespeed: ; cb940
anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_CUT
anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0
anim_sound 0, 0, SFX_MENU
- anim_obj ANIM_OBJ_77, 24, 88, $2
- anim_obj ANIM_OBJ_77, 32, 88, $1
- anim_obj ANIM_OBJ_77, 40, 88, $0
- anim_obj ANIM_OBJ_77, 48, 88, $80
- anim_obj ANIM_OBJ_77, 56, 88, $81
- anim_obj ANIM_OBJ_77, 64, 88, $82
+ anim_obj ANIM_OBJ_SPEED_LINE, 24, 88, $2
+ anim_obj ANIM_OBJ_SPEED_LINE, 32, 88, $1
+ anim_obj ANIM_OBJ_SPEED_LINE, 40, 88, $0
+ anim_obj ANIM_OBJ_SPEED_LINE, 48, 88, $80
+ anim_obj ANIM_OBJ_SPEED_LINE, 56, 88, $81
+ anim_obj ANIM_OBJ_SPEED_LINE, 64, 88, $82
anim_wait 12
anim_sound 0, 1, SFX_CUT
anim_obj ANIM_OBJ_3A, 152, 40, $0
@@ -4780,25 +4780,25 @@ BattleAnim_Extremespeed: ; cb940
BattleAnim_Ancientpower: ; cb97a
anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT
anim_sound 0, 0, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 64, 108, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 64, 108, $20
anim_wait 8
anim_sound 0, 0, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 75, 102, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 75, 102, $20
anim_wait 8
anim_sound 0, 0, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 85, 97, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 85, 97, $20
anim_wait 8
anim_sound 0, 0, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 96, 92, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 96, 92, $20
anim_wait 8
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 106, 87, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 106, 87, $20
anim_wait 8
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 116, 82, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 116, 82, $20
anim_wait 8
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B2, 126, 77, $20
+ anim_obj ANIM_OBJ_ANCIENTPOWER, 126, 77, $20
anim_wait 8
anim_sound 0, 1, SFX_SPARK
anim_obj ANIM_OBJ_00, 136, 56, $0
@@ -4810,7 +4810,7 @@ BattleAnim_ShadowBall: ; cb9c6
anim_2gfx ANIM_GFX_EGG, ANIM_GFX_SMOKE
anim_bgp $1b
anim_sound 6, 2, SFX_SLUDGE_BOMB
- anim_obj ANIM_OBJ_B4, 64, 92, $2
+ anim_obj ANIM_OBJ_SHADOW_BALL, 64, 92, $2
anim_wait 32
anim_obj ANIM_OBJ_BALL_POOF, 132, 56, $10
anim_wait 24
@@ -4822,14 +4822,14 @@ BattleAnim_FutureSight: ; cb9db
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0
- anim_obj ANIM_OBJ_7D, 8, 24, $10
- anim_obj ANIM_OBJ_7D, 8, 48, $2
- anim_obj ANIM_OBJ_7D, 8, 88, $8
+ anim_obj ANIM_OBJ_AGILITY, 8, 24, $10
+ anim_obj ANIM_OBJ_AGILITY, 8, 48, $2
+ anim_obj ANIM_OBJ_AGILITY, 8, 88, $8
anim_wait 4
- anim_obj ANIM_OBJ_7D, 8, 32, $6
- anim_obj ANIM_OBJ_7D, 8, 56, $c
- anim_obj ANIM_OBJ_7D, 8, 80, $4
- anim_obj ANIM_OBJ_7D, 8, 104, $e
+ anim_obj ANIM_OBJ_AGILITY, 8, 32, $6
+ anim_obj ANIM_OBJ_AGILITY, 8, 56, $c
+ anim_obj ANIM_OBJ_AGILITY, 8, 80, $4
+ anim_obj ANIM_OBJ_AGILITY, 8, 104, $e
.loop
anim_sound 0, 0, SFX_THROW_BALL
anim_wait 16
@@ -4843,21 +4843,21 @@ BattleAnim_RockSmash: ; cba1b
anim_sound 0, 1, SFX_SPARK
anim_obj ANIM_OBJ_01, 128, 56, $0
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B5, 128, 64, $28
- anim_obj ANIM_OBJ_B5, 128, 64, $5c
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $28
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $5c
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B5, 128, 64, $10
- anim_obj ANIM_OBJ_B5, 128, 64, $e8
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $10
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $e8
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B5, 128, 64, $9c
- anim_obj ANIM_OBJ_B5, 128, 64, $d0
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $9c
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $d0
anim_wait 6
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B5, 128, 64, $1c
- anim_obj ANIM_OBJ_B5, 128, 64, $50
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $1c
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $50
anim_sound 0, 1, SFX_SPARK
- anim_obj ANIM_OBJ_B5, 128, 64, $dc
- anim_obj ANIM_OBJ_B5, 128, 64, $90
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $dc
+ anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $90
anim_wait 32
anim_ret
; cba6a
@@ -5077,9 +5077,9 @@ BattleAnim_SteelWing_branch_cbc43: ; cbc43
anim_sound 0, 0, SFX_SHINE
anim_bgeffect ANIM_BG_17, $0, $1, $40
anim_wait 8
- anim_obj ANIM_OBJ_51, 48, 84, $0
+ anim_obj ANIM_OBJ_HARDEN, 48, 84, $0
anim_wait 32
- anim_obj ANIM_OBJ_51, 48, 84, $0
+ anim_obj ANIM_OBJ_HARDEN, 48, 84, $0
anim_wait 64
anim_incbgeffect ANIM_BG_17
anim_ret
@@ -5100,11 +5100,11 @@ BattleAnim_Moonlight_branch_cbc6a: ; cbc6a
BattleAnim_MorningSun_branch_cbc6a: ; cbc6a
BattleAnim_Synthesis_branch_cbc6a: ; cbc6a
anim_sound 0, 0, SFX_METRONOME
- anim_obj ANIM_OBJ_9D, 44, 64, $0
+ anim_obj ANIM_OBJ_GLIMMER, 44, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 24, 96, $0
+ anim_obj ANIM_OBJ_GLIMMER, 24, 96, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 56, 104, $0
+ anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0
anim_wait 21
anim_ret
; cbc80
@@ -5114,15 +5114,15 @@ BattleAnim_MorningSun_branch_cbc80: ; cbc80
BattleAnim_Synthesis_branch_cbc80: ; cbc80
anim_sound 0, 0, SFX_METRONOME
.loop
- anim_obj ANIM_OBJ_9D, 24, 64, $0
+ anim_obj ANIM_OBJ_GLIMMER, 24, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 56, 104, $0
+ anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 24, 104, $0
+ anim_obj ANIM_OBJ_GLIMMER, 24, 104, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 56, 64, $0
+ anim_obj ANIM_OBJ_GLIMMER, 56, 64, $0
anim_wait 5
- anim_obj ANIM_OBJ_9D, 40, 84, $0
+ anim_obj ANIM_OBJ_GLIMMER, 40, 84, $0
anim_wait 5
anim_loop 2, .loop
anim_wait 16
diff --git a/data/moves/effects_priorities.asm b/data/moves/effects_priorities.asm
new file mode 100644
index 000000000..6faa6d032
--- /dev/null
+++ b/data/moves/effects_priorities.asm
@@ -0,0 +1,9 @@
+MoveEffectPriorities: ; 3c5df
+ db EFFECT_PROTECT, 3
+ db EFFECT_ENDURE, 3
+ db EFFECT_PRIORITY_HIT, 2
+ db EFFECT_FORCE_SWITCH, 0
+ db EFFECT_COUNTER, 0
+ db EFFECT_MIRROR_COAT, 0
+ db -1
+; 3c5ec
diff --git a/data/moves/grammar.asm b/data/moves/grammar.asm
new file mode 100644
index 000000000..94c152ccf
--- /dev/null
+++ b/data/moves/grammar.asm
@@ -0,0 +1,102 @@
+; Used by GetMoveGrammar (see engine/battle/used_move_text.asm)
+; Each move is given an identifier for what usedmovetext to use (0-4).
+; Made redundant in English localization, where all are just "[mon]¯used [move]!"
+
+MoveGrammar: ; 105e7a
+; 0: originally "[mon]の¯[move]¯つかった!" ("[mon]¯used¯[move]!")
+ db SWORDS_DANCE
+ db GROWTH
+ db STRENGTH
+ db HARDEN
+ db MINIMIZE
+ db SMOKESCREEN
+ db WITHDRAW
+ db DEFENSE_CURL
+ db EGG_BOMB
+ db SMOG
+ db BONE_CLUB
+ db FLASH
+ db SPLASH
+ db ACID_ARMOR
+ db BONEMERANG
+ db REST
+ db SHARPEN
+ db SUBSTITUTE
+ db MIND_READER
+ db SNORE
+ db PROTECT
+ db SPIKES
+ db ENDURE
+ db ROLLOUT
+ db SWAGGER
+ db SLEEP_TALK
+ db HIDDEN_POWER
+ db PSYCH_UP
+ db EXTREMESPEED
+ db 0 ; end set
+
+; 1: originally "[mon]の¯[move]した!" ("[mon]¯did [move]!")
+ db RECOVER
+ db TELEPORT
+ db BIDE
+ db SELFDESTRUCT
+ db AMNESIA
+ db FLAIL
+ db 0 ; end set
+
+; 2: originally "[mon]の¯[move]¯した!" ("[mon]¯did¯[move]!")
+ db MEDITATE
+ db AGILITY
+ db MIMIC
+ db DOUBLE_TEAM
+ db BARRAGE
+ db TRANSFORM
+ db STRUGGLE
+ db SCARY_FACE
+ db 0 ; end set
+
+; 3: originally "[mon]の¯[move] こうげき!" ("[mon]'s¯[move] attack!")
+ db POUND
+ db SCRATCH
+ db VICEGRIP
+ db WING_ATTACK
+ db FLY
+ db BIND
+ db SLAM
+ db HORN_ATTACK
+ db WRAP
+ db THRASH
+ db TAIL_WHIP
+ db LEER
+ db BITE
+ db GROWL
+ db ROAR
+ db SING
+ db PECK
+ db ABSORB
+ db STRING_SHOT
+ db EARTHQUAKE
+ db FISSURE
+ db DIG
+ db TOXIC
+ db SCREECH
+ db METRONOME
+ db LICK
+ db CLAMP
+ db CONSTRICT
+ db POISON_GAS
+ db BUBBLE
+ db SLASH
+ db SPIDER_WEB
+ db NIGHTMARE
+ db CURSE
+ db FORESIGHT
+ db CHARM
+ db ATTRACT
+ db ROCK_SMASH
+ db 0 ; end set
+
+; 4: originally "[mon]の¯[move]!" ("[mon]'s¯[move]!")
+; Any move not listed above uses this grammar.
+ db -1 ; end
+; 105ed0
diff --git a/data/npc_trades.asm b/data/npc_trades.asm
index 57b2411d3..d16670984 100644
--- a/data/npc_trades.asm
+++ b/data/npc_trades.asm
@@ -1,7 +1,3 @@
-TRADE_EITHER_GENDER EQU 0
-TRADE_MALE_ONLY EQU 1
-TRADE_FEMALE_ONLY EQU 2
-
npctrade: MACRO
; dialog set, requested mon, offered mon, nickname, dvs, item, OT ID, OT name, gender requested
db \1, \2, \3, \4, \5, \6, \7
@@ -12,11 +8,11 @@ ENDM
NPCTrades: ; fce58
; entries correspond to NPCTRADE_* constants
- npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER
- npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER
- npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER
- npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY
- npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER
- npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER
- npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER
+ npctrade TRADE_DIALOG_COLLECTOR, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER
+ npctrade TRADE_DIALOG_COLLECTOR, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER
+ npctrade TRADE_DIALOG_HAPPY, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER
+ npctrade TRADE_DIALOG_GIRL, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY
+ npctrade TRADE_DIALOG_NEWBIE, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER
+ npctrade TRADE_DIALOG_GIRL, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER
+ npctrade TRADE_DIALOG_COLLECTOR, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER
; fcf38
diff --git a/data/palettes/overworld/roofs.pal b/data/palettes/overworld/roofs.pal
deleted file mode 100644
index ba65fc7d2..000000000
--- a/data/palettes/overworld/roofs.pal
+++ /dev/null
@@ -1,161 +0,0 @@
-; group 0 (unused)
- RGB 21, 21, 21
- RGB 11, 11, 11
- RGB 21, 21, 21
- RGB 11, 11, 11
-
-; group 1 (Olivine)
- RGB 14, 17, 31
- RGB 07, 11, 15
- RGB 09, 09, 17
- RGB 05, 07, 13
-
-; group 2 (Mahogany)
- RGB 12, 19, 00
- RGB 06, 10, 00
- RGB 06, 09, 07
- RGB 04, 05, 06
-
-; group 3
- RGB 21, 21, 21
- RGB 11, 11, 11
- RGB 21, 21, 21
- RGB 17, 08, 07
-
-; group 4 (Ecruteak)
- RGB 31, 19, 00
- RGB 27, 10, 05
- RGB 15, 07, 02
- RGB 11, 04, 02
-
-; group 5 (Blackthorn)
- RGB 11, 10, 16
- RGB 05, 06, 07
- RGB 03, 04, 08
- RGB 00, 00, 00
-
-; group 6 (Cinnabar)
- RGB 31, 10, 00
- RGB 18, 06, 00
- RGB 18, 05, 09
- RGB 17, 08, 07
-
-; group 7 (Cerulean)
- RGB 17, 27, 31
- RGB 05, 15, 31
- RGB 07, 08, 22
- RGB 07, 07, 16
-
-; group 8 (Azalea)
- RGB 22, 20, 10
- RGB 17, 14, 03
- RGB 11, 11, 05
- RGB 10, 09, 07
-
-; group 9 (Lake of Rage)
- RGB 31, 08, 04
- RGB 09, 09, 08
- RGB 18, 05, 09
- RGB 09, 09, 08
-
-; group 10 (Violet)
- RGB 24, 14, 31
- RGB 13, 07, 21
- RGB 12, 03, 18
- RGB 09, 03, 15
-
-; group 11 (Goldenrod)
- RGB 25, 25, 00
- RGB 20, 17, 08
- RGB 12, 12, 00
- RGB 10, 09, 05
-
-; group 12 (Vermilion)
- RGB 27, 23, 01
- RGB 23, 11, 00
- RGB 15, 11, 01
- RGB 11, 10, 01
-
-; group 13 (Pallet)
- RGB 27, 28, 31
- RGB 17, 19, 22
- RGB 14, 14, 18
- RGB 10, 09, 13
-
-; group 14 (Pewter)
- RGB 19, 19, 16
- RGB 10, 12, 15
- RGB 09, 09, 11
- RGB 04, 05, 07
-
-; group 15 (Mount Moon Square)
- RGB 14, 17, 31
- RGB 07, 11, 15
- RGB 09, 13, 19
- RGB 07, 07, 16
-
-; group 16 (Route 23)
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 11, 11, 19
- RGB 07, 07, 12
-
-; group 17 (Fuchsia)
- RGB 31, 18, 29
- RGB 17, 13, 20
- RGB 14, 06, 12
- RGB 11, 03, 10
-
-; group 18 (Lavender)
- RGB 23, 15, 31
- RGB 16, 05, 31
- RGB 12, 07, 17
- RGB 08, 06, 10
-
-; group 19 (Route 28)
- RGB 21, 21, 25
- RGB 16, 16, 16
- RGB 13, 13, 13
- RGB 07, 07, 07
-
-; group 20
- RGB 21, 21, 21
- RGB 11, 11, 11
- RGB 21, 21, 21
- RGB 11, 11, 11
-
-; group 21 (Celadon)
- RGB 19, 31, 15
- RGB 31, 22, 02
- RGB 12, 13, 09
- RGB 09, 12, 03
-
-; group 22 (Cianwood)
- RGB 15, 10, 31
- RGB 07, 05, 15
- RGB 06, 05, 17
- RGB 02, 02, 08
-
-; group 23 (Viridian)
- RGB 21, 31, 07
- RGB 13, 25, 04
- RGB 09, 14, 08
- RGB 06, 10, 04
-
-; group 24 (New Bark)
- RGB 20, 31, 14
- RGB 11, 23, 05
- RGB 09, 13, 08
- RGB 06, 09, 04
-
-; group 25 (Saffron)
- RGB 31, 26, 00
- RGB 31, 15, 00
- RGB 13, 13, 01
- RGB 08, 08, 01
-
-; group 26 (Cherrygrove)
- RGB 31, 14, 28
- RGB 31, 05, 21
- RGB 14, 07, 17
- RGB 13, 00, 08
diff --git a/data/palettes/unknown/4985a.asm b/data/palettes/unknown/4985a.asm
deleted file mode 100644
index 35f272227..000000000
--- a/data/palettes/unknown/4985a.asm
+++ /dev/null
@@ -1,15 +0,0 @@
- db $ab, $03, $57, $24, $ac, $0e, $13, $32
-
- db $be, $30, $5b, $4c, $47, $60, $ed, $f2
-
- db $ab, $03, $55, $26, $aa, $0a, $13, $3a
-
- db $be, $28, $33, $24, $6e, $71, $df, $b0
-
- db $a8, $00, $e5, $e0, $9a, $fc, $f4, $2c
-
- db $fe, $4c, $a3, $5e, $c6, $3a, $ab, $4d
-
- db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c
-
- db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd
diff --git a/data/party_menu_qualities.asm b/data/party_menu_qualities.asm
new file mode 100644
index 000000000..9ccc9745d
--- /dev/null
+++ b/data/party_menu_qualities.asm
@@ -0,0 +1,41 @@
+; WritePartyMenuTilemap.Jumptable indexes (see engine/party_menu.asm)
+ const_def
+ const PARTYMENUQUALITY_NICKNAMES
+ const PARTYMENUQUALITY_HP_BAR
+ const PARTYMENUQUALITY_HP_DIGITS
+ const PARTYMENUQUALITY_LEVEL
+ const PARTYMENUQUALITY_STATUS
+ const PARTYMENUQUALITY_TMHM_COMPAT
+ const PARTYMENUQUALITY_EVO_STONE_COMPAT
+ const PARTYMENUQUALITY_GENDER
+ const PARTYMENUQUALITY_MOBILE_SELECTION
+
+partymenuqualities: MACRO
+rept _NARG
+ db PARTYMENUQUALITY_\1
+shift
+endr
+ db -1 ; end
+ENDM
+
+
+PartyMenuQualityPointers: ; 503b2
+; entries correspond to PARTYMENUACTION_* constants
+ dw .Default ; PARTYMENUACTION_CHOOSE_POKEMON
+ dw .Default ; PARTYMENUACTION_HEALING_ITEM
+ dw .Default ; PARTYMENUACTION_SWITCH
+ dw .TMHM ; PARTYMENUACTION_TEACH_TMHM
+ dw .Default ; PARTYMENUACTION_MOVE
+ dw .EvoStone ; PARTYMENUACTION_EVO_STONE
+ dw .Gender ; PARTYMENUACTION_GIVE_MON
+ dw .Gender ; PARTYMENUACTION_GIVE_MON_FEMALE
+ dw .Default ; PARTYMENUACTION_GIVE_ITEM
+ dw .Mobile ; PARTYMENUACTION_MOBILE
+; 503c6
+
+.Default: partymenuqualities NICKNAMES, HP_BAR, HP_DIGITS, LEVEL, STATUS
+.TMHM: partymenuqualities NICKNAMES, TMHM_COMPAT, LEVEL, STATUS
+.EvoStone: partymenuqualities NICKNAMES, EVO_STONE_COMPAT, LEVEL, STATUS
+.Gender: partymenuqualities NICKNAMES, GENDER, LEVEL, STATUS
+.Mobile: partymenuqualities NICKNAMES, MOBILE_SELECTION, LEVEL, STATUS
+; 503e0
diff --git a/data/phone/permanent_numbers.asm b/data/phone/permanent_numbers.asm
new file mode 100644
index 000000000..a5101f2b6
--- /dev/null
+++ b/data/phone/permanent_numbers.asm
@@ -0,0 +1,5 @@
+PermanentNumbers: ; 90066
+ db PHONECONTACT_MOM
+ db PHONECONTACT_ELM
+ db -1 ; end
+; 90069
diff --git a/data/phone_contacts.asm b/data/phone/phone_contacts.asm
index cfeaad8a1..cfeaad8a1 100644
--- a/data/phone_contacts.asm
+++ b/data/phone/phone_contacts.asm
diff --git a/data/phone_special.asm b/data/phone/special_calls.asm
index 03c27743a..03c27743a 100644
--- a/data/phone_special.asm
+++ b/data/phone/special_calls.asm
diff --git a/text/phone/alan_overworld.asm b/data/phone/text/alan_overworld.asm
index e1246037a..e1246037a 100644
--- a/text/phone/alan_overworld.asm
+++ b/data/phone/text/alan_overworld.asm
diff --git a/text/phone/anthony_overworld.asm b/data/phone/text/anthony_overworld.asm
index 71e419c42..71e419c42 100644
--- a/text/phone/anthony_overworld.asm
+++ b/data/phone/text/anthony_overworld.asm
diff --git a/text/phone/arnie_overworld.asm b/data/phone/text/arnie_overworld.asm
index 4b12bd976..4b12bd976 100644
--- a/text/phone/arnie_overworld.asm
+++ b/data/phone/text/arnie_overworld.asm
diff --git a/text/phone/beth_overworld.asm b/data/phone/text/beth_overworld.asm
index 5c23a7ab6..5c23a7ab6 100644
--- a/text/phone/beth_overworld.asm
+++ b/data/phone/text/beth_overworld.asm
diff --git a/text/phone/beverly_overworld.asm b/data/phone/text/beverly_overworld.asm
index cd4b5b4d3..cd4b5b4d3 100644
--- a/text/phone/beverly_overworld.asm
+++ b/data/phone/text/beverly_overworld.asm
diff --git a/text/phone/bill.asm b/data/phone/text/bill.asm
index 37c0cd546..37c0cd546 100644
--- a/text/phone/bill.asm
+++ b/data/phone/text/bill.asm
diff --git a/text/phone/brent_overworld.asm b/data/phone/text/brent_overworld.asm
index 0ece72091..0ece72091 100644
--- a/text/phone/brent_overworld.asm
+++ b/data/phone/text/brent_overworld.asm
diff --git a/text/phone/buena.asm b/data/phone/text/buena.asm
index 226839ee5..226839ee5 100644
--- a/text/phone/buena.asm
+++ b/data/phone/text/buena.asm
diff --git a/text/phone/chad_overworld.asm b/data/phone/text/chad_overworld.asm
index 883baa21c..883baa21c 100644
--- a/text/phone/chad_overworld.asm
+++ b/data/phone/text/chad_overworld.asm
diff --git a/text/phone/dana_overworld.asm b/data/phone/text/dana_overworld.asm
index 099909eb6..099909eb6 100644
--- a/text/phone/dana_overworld.asm
+++ b/data/phone/text/dana_overworld.asm
diff --git a/text/phone/derek_overworld.asm b/data/phone/text/derek_overworld.asm
index 12472ec75..12472ec75 100644
--- a/text/phone/derek_overworld.asm
+++ b/data/phone/text/derek_overworld.asm
diff --git a/text/phone/elm.asm b/data/phone/text/elm.asm
index cea36061f..cea36061f 100644
--- a/text/phone/elm.asm
+++ b/data/phone/text/elm.asm
diff --git a/text/phone/erin_overworld.asm b/data/phone/text/erin_overworld.asm
index 3cfbe742e..3cfbe742e 100644
--- a/text/phone/erin_overworld.asm
+++ b/data/phone/text/erin_overworld.asm
diff --git a/text/phone/extra.asm b/data/phone/text/extra.asm
index 92ac0f508..92ac0f508 100644
--- a/text/phone/extra.asm
+++ b/data/phone/text/extra.asm
diff --git a/text/phone/extra2.asm b/data/phone/text/extra2.asm
index cef21f23b..cef21f23b 100644
--- a/text/phone/extra2.asm
+++ b/data/phone/text/extra2.asm
diff --git a/text/phone/gaven_overworld.asm b/data/phone/text/gaven_overworld.asm
index 501aa0e79..501aa0e79 100644
--- a/text/phone/gaven_overworld.asm
+++ b/data/phone/text/gaven_overworld.asm
diff --git a/text/phone/gina_overworld.asm b/data/phone/text/gina_overworld.asm
index 559e7fc5b..559e7fc5b 100644
--- a/text/phone/gina_overworld.asm
+++ b/data/phone/text/gina_overworld.asm
diff --git a/text/phone/huey_overworld.asm b/data/phone/text/huey_overworld.asm
index 4629f8022..4629f8022 100644
--- a/text/phone/huey_overworld.asm
+++ b/data/phone/text/huey_overworld.asm
diff --git a/text/phone/irwin_overworld.asm b/data/phone/text/irwin_overworld.asm
index 530ad94dd..530ad94dd 100644
--- a/text/phone/irwin_overworld.asm
+++ b/data/phone/text/irwin_overworld.asm
diff --git a/text/phone/jack_overworld.asm b/data/phone/text/jack_overworld.asm
index 3cef012c3..3cef012c3 100644
--- a/text/phone/jack_overworld.asm
+++ b/data/phone/text/jack_overworld.asm
diff --git a/text/phone/joey_overworld.asm b/data/phone/text/joey_overworld.asm
index cb7c5934d..cb7c5934d 100644
--- a/text/phone/joey_overworld.asm
+++ b/data/phone/text/joey_overworld.asm
diff --git a/text/phone/jose_overworld.asm b/data/phone/text/jose_overworld.asm
index 05e50172c..05e50172c 100644
--- a/text/phone/jose_overworld.asm
+++ b/data/phone/text/jose_overworld.asm
diff --git a/text/phone/kenji_overworld.asm b/data/phone/text/kenji_overworld.asm
index a3206b946..a3206b946 100644
--- a/text/phone/kenji_overworld.asm
+++ b/data/phone/text/kenji_overworld.asm
diff --git a/text/phone/liz_overworld.asm b/data/phone/text/liz_overworld.asm
index cd840b5f8..cd840b5f8 100644
--- a/text/phone/liz_overworld.asm
+++ b/data/phone/text/liz_overworld.asm
diff --git a/text/phone/mom.asm b/data/phone/text/mom.asm
index 249b5c01d..249b5c01d 100644
--- a/text/phone/mom.asm
+++ b/data/phone/text/mom.asm
diff --git a/text/phone/parry_overworld.asm b/data/phone/text/parry_overworld.asm
index 6286aa272..6286aa272 100644
--- a/text/phone/parry_overworld.asm
+++ b/data/phone/text/parry_overworld.asm
diff --git a/text/phone/ralph_overworld.asm b/data/phone/text/ralph_overworld.asm
index 6c737cdf1..6c737cdf1 100644
--- a/text/phone/ralph_overworld.asm
+++ b/data/phone/text/ralph_overworld.asm
diff --git a/text/phone/reena_overworld.asm b/data/phone/text/reena_overworld.asm
index 04bf42c9a..04bf42c9a 100644
--- a/text/phone/reena_overworld.asm
+++ b/data/phone/text/reena_overworld.asm
diff --git a/text/phone/tiffany_overworld.asm b/data/phone/text/tiffany_overworld.asm
index a03173dfa..a03173dfa 100644
--- a/text/phone/tiffany_overworld.asm
+++ b/data/phone/text/tiffany_overworld.asm
diff --git a/text/phone/todd_overworld.asm b/data/phone/text/todd_overworld.asm
index 6b4e9dd4c..6b4e9dd4c 100644
--- a/text/phone/todd_overworld.asm
+++ b/data/phone/text/todd_overworld.asm
diff --git a/text/phone/trainers1.asm b/data/phone/text/trainers1.asm
index 29080f114..29080f114 100644
--- a/text/phone/trainers1.asm
+++ b/data/phone/text/trainers1.asm
diff --git a/text/phone/tully_overworld.asm b/data/phone/text/tully_overworld.asm
index 48d41ba7c..48d41ba7c 100644
--- a/text/phone/tully_overworld.asm
+++ b/data/phone/text/tully_overworld.asm
diff --git a/text/phone/vance_overworld.asm b/data/phone/text/vance_overworld.asm
index b01907d36..b01907d36 100644
--- a/text/phone/vance_overworld.asm
+++ b/data/phone/text/vance_overworld.asm
diff --git a/text/phone/wade_overworld.asm b/data/phone/text/wade_overworld.asm
index 7b0b96009..7b0b96009 100644
--- a/text/phone/wade_overworld.asm
+++ b/data/phone/text/wade_overworld.asm
diff --git a/text/phone/wilton_overworld.asm b/data/phone/text/wilton_overworld.asm
index a6e43ffb4..a6e43ffb4 100644
--- a/text/phone/wilton_overworld.asm
+++ b/data/phone/text/wilton_overworld.asm
diff --git a/data/default_names.asm b/data/player_names.asm
index 87c341652..47aa17529 100644
--- a/data/default_names.asm
+++ b/data/player_names.asm
@@ -1,7 +1,6 @@
ChrisNameMenuHeader: ; 882b5
db $40 ; flags
- db 00, 00 ; start coords
- db 11, 10 ; end coords
+ menu_coords 0, 0, 10, TEXTBOX_Y - 1
dw .MaleNames
db 1 ; ????
db 0 ; default option
@@ -20,8 +19,7 @@ MalePlayerNameArray: ; 882c9
KrisNameMenuHeader: ; 882e5
db $40 ; flags
- db 00, 00 ; start coords
- db 11, 10 ; end coords
+ menu_coords 0, 0, 10, TEXTBOX_Y - 1
dw .FemaleNames
db 1 ; ????
db 0 ; default option
diff --git a/data/pokemon/base_stats.asm b/data/pokemon/base_stats.asm
index 8a6435a40..27f9174e5 100644
--- a/data/pokemon/base_stats.asm
+++ b/data/pokemon/base_stats.asm
@@ -1,3 +1,36 @@
+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)
+rept _NARG
+ if DEF(\1_TMNUM)
+ if \1_TMNUM < 24 + 1
+tms1 = tms1 | (1 << ((\1_TMNUM) - 1))
+ elif \1_TMNUM < 48 + 1
+tms2 = tms2 | (1 << ((\1_TMNUM) - 1 - 24))
+ else
+tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48))
+ endc
+ else
+ fail "\1 is not a TM, HM, or move tutor move"
+ endc
+ shift
+endr
+rept 3 ; TM01-TM24 (24/24)
+ db tms1 & $ff
+tms1 = tms1 >> 8
+endr
+rept 3 ; TM25-TM48 (24/24)
+ db tms2 & $ff
+tms2 = tms2 >> 8
+endr
+rept 2 ; TM49-TM50 + HM01-HM07 + MT01-MT03 (12/16)
+ db tms3 & $ff
+tms3 = tms3 >> 8
+endr
+ENDM
+
BaseData::
INCLUDE "data/pokemon/base_stats/bulbasaur.asm"
INCLUDE "data/pokemon/base_stats/ivysaur.asm"
diff --git a/data/pokemon/dex_entries.asm b/data/pokemon/dex_entries.asm
index 92b9c6b06..7381a4262 100644
--- a/data/pokemon/dex_entries.asm
+++ b/data/pokemon/dex_entries.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "Pokedex Entries 001-064", ROMX
diff --git a/data/pokemon/egg_moves.asm b/data/pokemon/egg_moves.asm
index 52d244c39..886c47349 100644
--- a/data/pokemon/egg_moves.asm
+++ b/data/pokemon/egg_moves.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "Egg Moves", ROMX
@@ -26,7 +26,7 @@ if !_CRYSTAL
endc
db RAZOR_WIND
db PETAL_DANCE
- db $ff
+ db -1 ; end
CharmanderEggMoves:
db BELLY_DRUM
@@ -35,7 +35,7 @@ CharmanderEggMoves:
db BITE
db OUTRAGE
db BEAT_UP
- db $ff
+ db -1 ; end
SquirtleEggMoves:
db MIRROR_COAT
@@ -44,7 +44,7 @@ SquirtleEggMoves:
db CONFUSION
db FORESIGHT
db FLAIL
- db $ff
+ db -1 ; end
PidgeyEggMoves:
db PURSUIT
@@ -53,7 +53,7 @@ PidgeyEggMoves:
if !_CRYSTAL
db STEEL_WING
endc
- db $ff
+ db -1 ; end
RattataEggMoves:
db SCREECH
@@ -62,7 +62,7 @@ RattataEggMoves:
db BITE
db COUNTER
db REVERSAL
- db $ff
+ db -1 ; end
SpearowEggMoves:
db FAINT_ATTACK
@@ -70,7 +70,7 @@ SpearowEggMoves:
db SCARY_FACE
db QUICK_ATTACK
db TRI_ATTACK
- db $ff
+ db -1 ; end
EkansEggMoves:
db PURSUIT
@@ -80,7 +80,7 @@ EkansEggMoves:
if _CRYSTAL
db CRUNCH
endc
- db $ff
+ db -1 ; end
SandshrewEggMoves:
db FLAIL
@@ -90,7 +90,7 @@ SandshrewEggMoves:
if _CRYSTAL
db METAL_CLAW
endc
- db $ff
+ db -1 ; end
NidoranFEggMoves:
db SUPERSONIC
@@ -100,7 +100,7 @@ NidoranFEggMoves:
db CHARM
db COUNTER
db BEAT_UP
- db $ff
+ db -1 ; end
NidoranMEggMoves:
db SUPERSONIC
@@ -110,7 +110,7 @@ NidoranMEggMoves:
db AMNESIA
db COUNTER
db BEAT_UP
- db $ff
+ db -1 ; end
VulpixEggMoves:
db FAINT_ATTACK
@@ -118,7 +118,7 @@ VulpixEggMoves:
db FLAIL
db SPITE
db DISABLE
- db $ff
+ db -1 ; end
ZubatEggMoves:
db QUICK_ATTACK
@@ -126,7 +126,7 @@ ZubatEggMoves:
db FAINT_ATTACK
db GUST
db WHIRLWIND
- db $ff
+ db -1 ; end
OddishEggMoves:
db SWORDS_DANCE
@@ -136,7 +136,7 @@ OddishEggMoves:
if !_CRYSTAL
db CHARM
endc
- db $ff
+ db -1 ; end
ParasEggMoves:
db FALSE_SWIPE
@@ -149,13 +149,13 @@ if !_CRYSTAL
endc
db LIGHT_SCREEN
db PURSUIT
- db $ff
+ db -1 ; end
VenonatEggMoves:
db BATON_PASS
db SCREECH
db GIGA_DRAIN
- db $ff
+ db -1 ; end
DiglettEggMoves:
db FAINT_ATTACK
@@ -163,14 +163,14 @@ DiglettEggMoves:
db ANCIENTPOWER
db PURSUIT
db BEAT_UP
- db $ff
+ db -1 ; end
MeowthEggMoves:
db SPITE
db CHARM
db HYPNOSIS
db AMNESIA
- db $ff
+ db -1 ; end
PsyduckEggMoves:
db ICE_BEAM
@@ -183,7 +183,7 @@ PsyduckEggMoves:
if _CRYSTAL
db CROSS_CHOP
endc
- db $ff
+ db -1 ; end
MankeyEggMoves:
db ROCK_SLIDE
@@ -192,7 +192,7 @@ MankeyEggMoves:
db COUNTER
db REVERSAL
db BEAT_UP
- db $ff
+ db -1 ; end
GrowlitheEggMoves:
db BODY_SLAM
@@ -200,7 +200,7 @@ GrowlitheEggMoves:
db CRUNCH
db THRASH
db FIRE_SPIN
- db $ff
+ db -1 ; end
PoliwagEggMoves:
db MIST
@@ -208,20 +208,20 @@ PoliwagEggMoves:
db BUBBLEBEAM
db HAZE
db MIND_READER
- db $ff
+ db -1 ; end
AbraEggMoves:
db LIGHT_SCREEN
db ENCORE
db BARRIER
- db $ff
+ db -1 ; end
MachopEggMoves:
db LIGHT_SCREEN
db MEDITATE
db ROLLING_KICK
db ENCORE
- db $ff
+ db -1 ; end
BellsproutEggMoves:
db SWORDS_DANCE
@@ -229,7 +229,7 @@ BellsproutEggMoves:
db REFLECT
db SYNTHESIS
db LEECH_LIFE
- db $ff
+ db -1 ; end
TentacoolEggMoves:
db AURORA_BEAM
@@ -237,12 +237,12 @@ TentacoolEggMoves:
db RAPID_SPIN
db HAZE
db SAFEGUARD
- db $ff
+ db -1 ; end
GeodudeEggMoves:
db MEGA_PUNCH
db ROCK_SLIDE
- db $ff
+ db -1 ; end
PonytaEggMoves:
db FLAME_WHEEL
@@ -251,14 +251,14 @@ PonytaEggMoves:
db HYPNOSIS
db CHARM
db QUICK_ATTACK
- db $ff
+ db -1 ; end
SlowpokeEggMoves:
db SAFEGUARD
db BELLY_DRUM
db FUTURE_SIGHT
db STOMP
- db $ff
+ db -1 ; end
FarfetchDEggMoves:
if !_CRYSTAL
@@ -269,7 +269,7 @@ endc
db GUST
db QUICK_ATTACK
db FLAIL
- db $ff
+ db -1 ; end
DoduoEggMoves:
db QUICK_ATTACK
@@ -277,7 +277,7 @@ DoduoEggMoves:
db HAZE
db FAINT_ATTACK
db FLAIL
- db $ff
+ db -1 ; end
SeelEggMoves:
db LICK
@@ -286,13 +286,13 @@ SeelEggMoves:
db PECK
db SLAM
db ENCORE
- db $ff
+ db -1 ; end
GrimerEggMoves:
db HAZE
db MEAN_LOOK
db LICK
- db $ff
+ db -1 ; end
ShellderEggMoves:
db BUBBLEBEAM
@@ -300,23 +300,23 @@ ShellderEggMoves:
db BARRIER
db RAPID_SPIN
db SCREECH
- db $ff
+ db -1 ; end
GastlyEggMoves:
db PSYWAVE
db PERISH_SONG
db HAZE
- db $ff
+ db -1 ; end
OnixEggMoves:
db ROCK_SLIDE
db FLAIL
- db $ff
+ db -1 ; end
DrowzeeEggMoves:
db LIGHT_SCREEN
db BARRIER
- db $ff
+ db -1 ; end
KrabbyEggMoves:
db DIG
@@ -324,7 +324,7 @@ KrabbyEggMoves:
db AMNESIA
db FLAIL
db SLAM
- db $ff
+ db -1 ; end
ExeggcuteEggMoves:
db SYNTHESIS
@@ -332,7 +332,7 @@ ExeggcuteEggMoves:
db REFLECT
db MEGA_DRAIN
db ANCIENTPOWER
- db $ff
+ db -1 ; end
CuboneEggMoves:
db ROCK_SLIDE
@@ -344,13 +344,13 @@ CuboneEggMoves:
if _CRYSTAL
db SWORDS_DANCE
endc
- db $ff
+ db -1 ; end
LickitungEggMoves:
db BELLY_DRUM
db MAGNITUDE
db BODY_SLAM
- db $ff
+ db -1 ; end
KoffingEggMoves:
db SCREECH
@@ -358,7 +358,7 @@ KoffingEggMoves:
db PSYBEAM
db DESTINY_BOND
db PAIN_SPLIT
- db $ff
+ db -1 ; end
RhyhornEggMoves:
db CRUNCH
@@ -368,13 +368,13 @@ RhyhornEggMoves:
db PURSUIT
db COUNTER
db MAGNITUDE
- db $ff
+ db -1 ; end
ChanseyEggMoves:
db PRESENT
db METRONOME
db HEAL_BELL
- db $ff
+ db -1 ; end
TangelaEggMoves:
db FLAIL
@@ -382,7 +382,7 @@ TangelaEggMoves:
db MEGA_DRAIN
db REFLECT
db AMNESIA
- db $ff
+ db -1 ; end
KangaskhanEggMoves:
db STOMP
@@ -390,7 +390,7 @@ KangaskhanEggMoves:
db FOCUS_ENERGY
db SAFEGUARD
db DISABLE
- db $ff
+ db -1 ; end
HorseaEggMoves:
db FLAIL
@@ -399,27 +399,27 @@ HorseaEggMoves:
db DISABLE
db SPLASH
db DRAGON_RAGE
- db $ff
+ db -1 ; end
GoldeenEggMoves:
db PSYBEAM
db HAZE
db HYDRO_PUMP
- db $ff
+ db -1 ; end
if !_CRYSTAL
StaryuEggMoves:
db AURORA_BEAM
db BARRIER
db SUPERSONIC
- db $ff
+ db -1 ; end
endc
MrMimeEggMoves:
db FUTURE_SIGHT
db HYPNOSIS
db MIMIC
- db $ff
+ db -1 ; end
ScytherEggMoves:
db COUNTER
@@ -428,22 +428,22 @@ ScytherEggMoves:
db RAZOR_WIND
db REVERSAL
db LIGHT_SCREEN
- db $ff
+ db -1 ; end
PinsirEggMoves:
db FURY_ATTACK
db FLAIL
- db $ff
+ db -1 ; end
LaprasEggMoves:
db AURORA_BEAM
db FORESIGHT
- db $ff
+ db -1 ; end
EeveeEggMoves:
db FLAIL
db CHARM
- db $ff
+ db -1 ; end
OmanyteEggMoves:
db BUBBLEBEAM
@@ -451,7 +451,7 @@ OmanyteEggMoves:
db SLAM
db SUPERSONIC
db HAZE
- db $ff
+ db -1 ; end
KabutoEggMoves:
db BUBBLEBEAM
@@ -459,7 +459,7 @@ KabutoEggMoves:
db RAPID_SPIN
db DIG
db FLAIL
- db $ff
+ db -1 ; end
AerodactylEggMoves:
db WHIRLWIND
@@ -468,21 +468,21 @@ AerodactylEggMoves:
if !_CRYSTAL
db STEEL_WING
endc
- db $ff
+ db -1 ; end
SnorlaxEggMoves:
db LICK
if !_CRYSTAL
db CHARM
endc
- db $ff
+ db -1 ; end
DratiniEggMoves:
db LIGHT_SCREEN
db MIST
db HAZE
db SUPERSONIC
- db $ff
+ db -1 ; end
ChikoritaEggMoves:
db VINE_WHIP
@@ -491,7 +491,7 @@ ChikoritaEggMoves:
db ANCIENTPOWER
db FLAIL
db SWORDS_DANCE
- db $ff
+ db -1 ; end
CyndaquilEggMoves:
db FURY_SWIPES
@@ -502,7 +502,7 @@ CyndaquilEggMoves:
if _CRYSTAL
db SUBMISSION
endc
- db $ff
+ db -1 ; end
TotodileEggMoves:
db CRUNCH
@@ -511,7 +511,7 @@ TotodileEggMoves:
db ANCIENTPOWER
db RAZOR_WIND
db ROCK_SLIDE
- db $ff
+ db -1 ; end
SentretEggMoves:
db DOUBLE_EDGE
@@ -519,7 +519,7 @@ SentretEggMoves:
db SLASH
db FOCUS_ENERGY
db REVERSAL
- db $ff
+ db -1 ; end
HoothootEggMoves:
db MIRROR_MOVE
@@ -530,13 +530,13 @@ HoothootEggMoves:
if _CRYSTAL
db SKY_ATTACK
endc
- db $ff
+ db -1 ; end
LedybaEggMoves:
db PSYBEAM
db BIDE
db LIGHT_SCREEN
- db $ff
+ db -1 ; end
SpinarakEggMoves:
db PSYBEAM
@@ -544,13 +544,13 @@ SpinarakEggMoves:
db SONICBOOM
db BATON_PASS
db PURSUIT
- db $ff
+ db -1 ; end
ChinchouEggMoves:
db FLAIL
db SUPERSONIC
db SCREECH
- db $ff
+ db -1 ; end
PichuEggMoves:
db REVERSAL
@@ -558,7 +558,7 @@ PichuEggMoves:
db PRESENT
db ENCORE
db DOUBLESLAP
- db $ff
+ db -1 ; end
CleffaEggMoves:
db PRESENT
@@ -567,13 +567,13 @@ CleffaEggMoves:
db BELLY_DRUM
db SPLASH
db MIMIC
- db $ff
+ db -1 ; end
IgglybuffEggMoves:
db PERISH_SONG
db PRESENT
db FAINT_ATTACK
- db $ff
+ db -1 ; end
TogepiEggMoves:
db PRESENT
@@ -581,7 +581,7 @@ TogepiEggMoves:
db PECK
db FORESIGHT
db FUTURE_SIGHT
- db $ff
+ db -1 ; end
NatuEggMoves:
db HAZE
@@ -589,7 +589,7 @@ NatuEggMoves:
db QUICK_ATTACK
db FAINT_ATTACK
db STEEL_WING
- db $ff
+ db -1 ; end
MareepEggMoves:
db THUNDERBOLT
@@ -598,7 +598,7 @@ MareepEggMoves:
db SAFEGUARD
db SCREECH
db REFLECT
- db $ff
+ db -1 ; end
MarillEggMoves:
db LIGHT_SCREEN
@@ -609,11 +609,11 @@ MarillEggMoves:
db PERISH_SONG
db SUPERSONIC
db FORESIGHT
- db $ff
+ db -1 ; end
SudowoodoEggMoves:
db SELFDESTRUCT
- db $ff
+ db -1 ; end
HoppipEggMoves:
db CONFUSION
@@ -623,7 +623,7 @@ HoppipEggMoves:
db REFLECT
db AMNESIA
db PAY_DAY
- db $ff
+ db -1 ; end
AipomEggMoves:
db COUNTER
@@ -634,19 +634,19 @@ AipomEggMoves:
db SLAM
db DOUBLESLAP
db BEAT_UP
- db $ff
+ db -1 ; end
YanmaEggMoves:
db WHIRLWIND
db REVERSAL
db LEECH_LIFE
- db $ff
+ db -1 ; end
WooperEggMoves:
db BODY_SLAM
db ANCIENTPOWER
db SAFEGUARD
- db $ff
+ db -1 ; end
MurkrowEggMoves:
db WHIRLWIND
@@ -657,12 +657,12 @@ MurkrowEggMoves:
if _CRYSTAL
db SKY_ATTACK
endc
- db $ff
+ db -1 ; end
MisdreavusEggMoves:
db SCREECH
db DESTINY_BOND
- db $ff
+ db -1 ; end
GirafarigEggMoves:
db TAKE_DOWN
@@ -670,14 +670,14 @@ GirafarigEggMoves:
db FORESIGHT
db FUTURE_SIGHT
db BEAT_UP
- db $ff
+ db -1 ; end
PinecoEggMoves:
db REFLECT
db PIN_MISSILE
db FLAIL
db SWIFT
- db $ff
+ db -1 ; end
DunsparceEggMoves:
db BIDE
@@ -685,14 +685,14 @@ DunsparceEggMoves:
db ROCK_SLIDE
db BITE
db RAGE
- db $ff
+ db -1 ; end
GligarEggMoves:
db METAL_CLAW
db WING_ATTACK
db RAZOR_WIND
db COUNTER
- db $ff
+ db -1 ; end
SnubbullEggMoves:
db METRONOME
@@ -703,24 +703,24 @@ SnubbullEggMoves:
db HEAL_BELL
db LICK
db LEER
- db $ff
+ db -1 ; end
QwilfishEggMoves:
db FLAIL
db HAZE
db BUBBLEBEAM
db SUPERSONIC
- db $ff
+ db -1 ; end
ShuckleEggMoves:
db SWEET_SCENT
- db $ff
+ db -1 ; end
HeracrossEggMoves:
db HARDEN
db BIDE
db FLAIL
- db $ff
+ db -1 ; end
SneaselEggMoves:
db COUNTER
@@ -728,7 +728,7 @@ SneaselEggMoves:
db FORESIGHT
db REFLECT
db BITE
- db $ff
+ db -1 ; end
TeddiursaEggMoves:
db CRUNCH
@@ -739,11 +739,11 @@ TeddiursaEggMoves:
if _CRYSTAL
db METAL_CLAW
endc
- db $ff
+ db -1 ; end
SlugmaEggMoves:
db ACID_ARMOR
- db $ff
+ db -1 ; end
SwinubEggMoves:
db TAKE_DOWN
@@ -751,7 +751,7 @@ SwinubEggMoves:
db BODY_SLAM
db ROCK_SLIDE
db ANCIENTPOWER
- db $ff
+ db -1 ; end
CorsolaEggMoves:
db ROCK_SLIDE
@@ -759,7 +759,7 @@ CorsolaEggMoves:
db SCREECH
db MIST
db AMNESIA
- db $ff
+ db -1 ; end
RemoraidEggMoves:
db AURORA_BEAM
@@ -767,7 +767,7 @@ RemoraidEggMoves:
db SUPERSONIC
db HAZE
db SCREECH
- db $ff
+ db -1 ; end
DelibirdEggMoves:
db AURORA_BEAM
@@ -775,14 +775,14 @@ DelibirdEggMoves:
db FUTURE_SIGHT
db SPLASH
db RAPID_SPIN
- db $ff
+ db -1 ; end
MantineEggMoves:
db TWISTER
db HYDRO_PUMP
db HAZE
db SLAM
- db $ff
+ db -1 ; end
SkarmoryEggMoves:
db DRILL_PECK
@@ -791,7 +791,7 @@ SkarmoryEggMoves:
if _CRYSTAL
db SKY_ATTACK
endc
- db $ff
+ db -1 ; end
HoundourEggMoves:
db FIRE_SPIN
@@ -801,7 +801,7 @@ HoundourEggMoves:
db SPITE
db REVERSAL
db BEAT_UP
- db $ff
+ db -1 ; end
PhanpyEggMoves:
db FOCUS_ENERGY
@@ -810,7 +810,7 @@ PhanpyEggMoves:
if _CRYSTAL
db WATER_GUN
endc
- db $ff
+ db -1 ; end
StantlerEggMoves:
db REFLECT
@@ -818,21 +818,21 @@ StantlerEggMoves:
db DISABLE
db LIGHT_SCREEN
db BITE
- db $ff
+ db -1 ; end
TyrogueEggMoves:
db RAPID_SPIN
db HI_JUMP_KICK
db MACH_PUNCH
db MIND_READER
- db $ff
+ db -1 ; end
SmoochumEggMoves:
if !_CRYSTAL
db LOVELY_KISS
endc
db MEDITATE
- db $ff
+ db -1 ; end
ElekidEggMoves:
db KARATE_CHOP
@@ -842,7 +842,7 @@ ElekidEggMoves:
if _CRYSTAL
db CROSS_CHOP
endc
- db $ff
+ db -1 ; end
MagbyEggMoves:
db KARATE_CHOP
@@ -852,13 +852,13 @@ MagbyEggMoves:
if _CRYSTAL
db CROSS_CHOP
endc
- db $ff
+ db -1 ; end
MiltankEggMoves:
db PRESENT
db REVERSAL
db SEISMIC_TOSS
- db $ff
+ db -1 ; end
LarvitarEggMoves:
db PURSUIT
@@ -866,7 +866,7 @@ LarvitarEggMoves:
db OUTRAGE
db FOCUS_ENERGY
db ANCIENTPOWER
- db $ff
+ db -1 ; end
NoEggMoves:
- db $ff
+ db -1 ; end
diff --git a/data/pokemon/evos_attacks.asm b/data/pokemon/evos_attacks.asm
index f21febf87..2649bb7a1 100644
--- a/data/pokemon/evos_attacks.asm
+++ b/data/pokemon/evos_attacks.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "Evolutions and Attacks", ROMX
diff --git a/data/pokemon/ezchat_order.asm b/data/pokemon/ezchat_order.asm
new file mode 100644
index 000000000..8cb860028
--- /dev/null
+++ b/data/pokemon/ezchat_order.asm
@@ -0,0 +1,96 @@
+; Every Pokémon sorted by their Japanese names in gojūon order.
+; Notably, Rhydon is missing (it should be before Rhyhorn).
+
+EZChat_SortedPokemon:
+ dw .a
+ dw .i
+ dw .u
+ dw .e
+ dw .o
+ dw .ka_ga
+ dw .ki_gi
+ dw .ku_gu
+ dw .ke_ge
+ dw .ko_go
+ dw .sa_za
+ dw .shi_ji
+ dw .su_zu
+ dw .se_ze
+ dw .so_zo
+ dw .ta_da
+ dw .chi_dhi
+ dw .tsu_du
+ dw .te_de
+ dw .to_do
+ dw .na
+ dw .ni
+ dw .nu
+ dw .ne
+ dw .no
+ dw .ha_ba_pa
+ dw .hi_bi_pi
+ dw .fu_bu_pu
+ dw .he_be_pe
+ dw .ho_bo_po
+ dw .ma
+ dw .mi
+ dw .mu
+ dw .me
+ dw .mo
+ dw .ya
+ dw .yu
+ dw .yo
+ dw .ra
+ dw .ri
+ dw .ru
+ dw .re
+ dw .ro
+ dw .wa
+ dw .end
+
+.a: db EKANS, ARBOK, SEAKING, ARIADOS, CROCONAW, UNOWN, -1
+.i: db EEVEE, GEODUDE, SPINARAK, PILOSWINE, ONIX, -1
+.u: db ARCANINE, SUDOWOODO, WEEPINBELL, VICTREEBEL, WOOPER, SWINUB, -1
+.e: db SKARMORY, AIPOM, ESPEON, HITMONCHAN, ELEKID, ELECTABUZZ, ENTEI, -1
+.o: db FERALIGATR, FURRET, OCTILLERY, PRIMEAPE, SENTRET, STANTLER, SPEAROW, FEAROW, OMASTAR, OMANYTE, -1
+.ka_ga: db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN, -1
+.ki_gi: db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER, -1
+.ku_gu: db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT, -1
+.ke_ge: db ABRA, GENGAR, TAUROS, -1
+.ko_go: db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT, -1
+.sa_za: db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH, -1 ; RHYDON should lead this list
+.shi_ji: db SEADRA, SHELLDER, VAPOREON, DEWGONG, -1
+.su_zu: db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE, -1
+.se_ze: db SQUIRTLE, CELEBI, -1
+.so_zo: db WOBBUFFET, -1
+.ta_da: db DUGTRIO, HORSEA, EXEGGCUTE, -1
+.chi_dhi: db CHIKORITA, CHINCHOU, -1
+.tsu_du: db SHUCKLE, -1
+.te_de: db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS, -1
+.to_do: db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN, -1
+.na: db ODDISH, EXEGGUTOR, -1
+.ni: db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG, -1
+.nu: db QUAGSIRE, -1
+.ne: db NATU, XATU, -1
+.no: db DUNSPARCE, -1
+.ha_ba_pa: db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR, -1
+.hi_bi_pi: db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB, -1
+.fu_bu_pu: db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL, -1
+.he_be_pe: db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG, -1
+.ho_bo_po: db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2, -1
+.ma: db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE, -1
+.mi: db DRATINI, MEW, MEWTWO, MILTANK, -1
+.mu: db MISDREAVUS, SMOOCHUM, -1
+.me: db MEGANIUM, DITTO, TENTACOOL, MAREEP, -1
+.mo: db FLAAFFY, VENOMOTH, TANGELA, -1
+.ya: db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA, -1
+.yu: db KADABRA, -1
+.yo: db LARVITAR, NOCTOWL, -1
+.ra: db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN, -1
+.ri: db CHARMELEON, CHARIZARD, URSARING, -1
+.ru: db JYNX, LUGIA, -1
+.re: db MAGNETON, LEDIAN, LEDYBA, -1
+.ro: db VULPIX, -1
+.wa: db JUMPLUFF, TOTODILE, MACHOP ;, -1
+.end: db -1
+; 11d67e
diff --git a/data/pokemon/palettes.asm b/data/pokemon/palettes.asm
index 2e47bbdaf..ec2cc3c0b 100644
--- a/data/pokemon/palettes.asm
+++ b/data/pokemon/palettes.asm
@@ -518,12 +518,8 @@ INCLUDE "gfx/pokemon/celebi/shiny.pal"
RGB 30, 26, 11
RGB 23, 16, 00
-; Egg
- RGB 30, 26, 11
- RGB 23, 16, 00
-; Egg shiny
- RGB 30, 26, 11
- RGB 23, 16, 00
+INCLUDE "gfx/pokemon/egg/normal.pal"
+INCLUDE "gfx/pokemon/egg/shiny.pal"
; 254
RGB 30, 26, 11
diff --git a/data/pokemon/pic_pointers.asm b/data/pokemon/pic_pointers.asm
index cca5c3b9c..c45a9837e 100644
--- a/data/pokemon/pic_pointers.asm
+++ b/data/pokemon/pic_pointers.asm
@@ -1,3 +1,5 @@
+; Pics are defined in gfx/pics.asm
+
PokemonPicPointers::
; entries correspond to Pokémon species, two apiece
dba_pic BulbasaurFrontpic
diff --git a/data/time_capsule/special_stats.asm b/data/pokemon/rby_base_special.asm
index 9998692ab..9998692ab 100644
--- a/data/time_capsule/special_stats.asm
+++ b/data/pokemon/rby_base_special.asm
diff --git a/data/time_capsule/mon_order.asm b/data/pokemon/rby_order.asm
index e40ba0273..e40ba0273 100644
--- a/data/time_capsule/mon_order.asm
+++ b/data/pokemon/rby_order.asm
diff --git a/data/radio/buenas_passwords.asm b/data/radio/buenas_passwords.asm
new file mode 100644
index 000000000..85e1b951b
--- /dev/null
+++ b/data/radio/buenas_passwords.asm
@@ -0,0 +1,26 @@
+BuenasPasswordTable:
+; there are NUM_PASSWORD_CATEGORIES entries
+ dw .JohtoStarters
+ dw .Beverages
+ dw .HealingItems
+ dw .Balls
+ dw .Pokemon1
+ dw .Pokemon2
+ dw .JohtoTowns
+ dw .Types
+ dw .Moves
+ dw .XItems
+ dw .RadioStations
+
+ ; string type, points, option 1, option 2, option 3
+.JohtoStarters: db BUENA_MON, 10, CYNDAQUIL, TOTODILE, CHIKORITA
+.Beverages: db BUENA_ITEM, 12, FRESH_WATER, SODA_POP, LEMONADE
+.HealingItems: db BUENA_ITEM, 12, POTION, ANTIDOTE, PARLYZ_HEAL
+.Balls: db BUENA_ITEM, 12, POKE_BALL, GREAT_BALL, ULTRA_BALL
+.Pokemon1: db BUENA_MON, 10, PIKACHU, RATTATA, GEODUDE
+.Pokemon2: db BUENA_MON, 10, HOOTHOOT, SPINARAK, DROWZEE
+.JohtoTowns: db BUENA_STRING, 16, "NEW BARK TOWN@", "CHERRYGROVE CITY@", "AZALEA TOWN@"
+.Types: db BUENA_STRING, 6, "FLYING@", "BUG@", "GRASS@"
+.Moves: db BUENA_MOVE, 12, TACKLE, GROWL, MUD_SLAP
+.XItems: db BUENA_ITEM, 12, X_ATTACK, X_DEFEND, X_SPEED
+.RadioStations: db BUENA_STRING, 13, "#MON Talk@", "#MON Music@", "Lucky Channel@"
diff --git a/data/radio/channel_music.asm b/data/radio/channel_music.asm
new file mode 100644
index 000000000..62504ed11
--- /dev/null
+++ b/data/radio/channel_music.asm
@@ -0,0 +1,13 @@
+RadioChannelSongs:
+; entries correspond to radio channel ids
+ dw MUSIC_POKEMON_TALK
+ dw MUSIC_POKEMON_CENTER
+ dw MUSIC_TITLE
+ dw MUSIC_GAME_CORNER
+ dw MUSIC_BUENAS_PASSWORD
+ dw MUSIC_VIRIDIAN_CITY
+ dw MUSIC_BICYCLE
+ dw MUSIC_ROCKET_OVERTURE
+ dw MUSIC_POKE_FLUTE_CHANNEL
+ dw MUSIC_RUINS_OF_ALPH_RADIO
+ dw MUSIC_LAKE_OF_RAGE_ROCKET_RADIO
diff --git a/data/radio/oaks_pkmn_talk_routes.asm b/data/radio/oaks_pkmn_talk_routes.asm
new file mode 100644
index 000000000..ad7b6529d
--- /dev/null
+++ b/data/radio/oaks_pkmn_talk_routes.asm
@@ -0,0 +1,19 @@
+; Oak's Pokémon Talk will list wild Pokémon on these maps.
+
+OaksPkmnTalkRoutes:
+ map ROUTE_29
+ map ROUTE_46
+ map ROUTE_30
+ map ROUTE_32
+ map ROUTE_34
+ map ROUTE_35
+ map ROUTE_37
+ map ROUTE_38
+ map ROUTE_39
+ map ROUTE_42
+ map ROUTE_43
+ map ROUTE_44
+ map ROUTE_45
+ map ROUTE_36
+ map ROUTE_31
+OaksPkmnTalkRoutesEnd
diff --git a/data/radio/pnp_hidden_people.asm b/data/radio/pnp_hidden_people.asm
new file mode 100644
index 000000000..5eb178572
--- /dev/null
+++ b/data/radio/pnp_hidden_people.asm
@@ -0,0 +1,26 @@
+; Places and People will not describe these trainers.
+
+PnP_HiddenPeople:
+ db WILL
+ db BRUNO
+ db KAREN
+ db KOGA
+ db CHAMPION
+ ; fallthrough
+PnP_HiddenPeople_BeatE4:
+ db BROCK
+ db MISTY
+ db LT_SURGE
+ db ERIKA
+ db JANINE
+ db SABRINA
+ db BLAINE
+ db BLUE
+ ; fallthrough
+PnP_HiddenPeople_BeatKanto:
+ db RIVAL1
+ db POKEMON_PROF
+ db CAL
+ db RIVAL2
+ db RED
+ db -1
diff --git a/data/radio/pnp_hidden_places.asm b/data/radio/pnp_hidden_places.asm
new file mode 100644
index 000000000..4cf1987d3
--- /dev/null
+++ b/data/radio/pnp_hidden_places.asm
@@ -0,0 +1,13 @@
+; Places and People will not describe these maps.
+
+PnP_HiddenPlaces:
+ map PALLET_TOWN
+ map ROUTE_22
+ map PEWTER_CITY
+ map CERULEAN_POLICE_STATION
+ map ROUTE_12
+ map ROUTE_11
+ map ROUTE_16
+ map ROUTE_14
+ map CINNABAR_POKECENTER_2F_BETA
+PnP_HiddenPlacesEnd
diff --git a/data/sgb_border_map.asm b/data/sgb_border_map.asm
deleted file mode 100644
index 18e6c7740..000000000
--- a/data/sgb_border_map.asm
+++ /dev/null
@@ -1,29 +0,0 @@
-SGBBorderMap:
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
- db $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $54, $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54
- db $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54
- db $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54, $20, $54, $07, $14, $08, $14, $09, $14, $0a, $14, $0b, $14, $0c, $14, $0d, $14, $07, $14, $07, $14, $18, $14, $09, $14, $1a, $14, $1b, $14, $0d, $14, $0c, $14, $1c, $14, $29, $14, $07, $14, $20, $14, $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54
- db $31, $14, $32, $14, $07, $14, $07, $14, $32, $54, $36, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $27, $10, $32, $14, $07, $54, $07, $54, $32, $54, $31, $54
- db $05, $14, $06, $14, $07, $14, $07, $54, $06, $54, $1f, $10, $37, $10, $06, $14, $07, $14, $07, $54, $06, $54, $05, $54
- db $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $1f, $10, $37, $10, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54
- db $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $1f, $10, $37, $10, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54
- db $33, $14, $34, $14, $35, $14, $35, $54, $34, $54, $1f, $10, $37, $10, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
- db $02, $54, $01, $54, $07, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $01, $14, $02, $14
- db $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14
- db $22, $54, $21, $54, $20, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $20, $14, $21, $14, $22, $14
- db $32, $54, $31, $54, $30, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $30, $14, $31, $14, $32, $14
- db $06, $54, $05, $54, $04, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $04, $14, $05, $14, $06, $14
- db $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14
- db $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14
- db $34, $54, $33, $54, $07, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $33, $14, $34, $14
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
- db $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $1f, $10, $37, $10, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54
- db $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $1f, $10, $37, $10, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54
- db $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $1f, $10, $37, $10, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54
- db $31, $14, $32, $14, $07, $14, $07, $14, $32, $54, $1f, $10, $37, $10, $32, $14, $07, $54, $07, $54, $32, $54, $31, $54
- db $05, $14, $06, $14, $07, $14, $07, $54, $06, $54, $2e, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2d, $10, $06, $14, $07, $14, $07, $54, $06, $54, $05, $54
- db $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $39, $14, $0e, $14, $09, $14, $0f, $14, $28, $14, $07, $14, $19, $14, $0c, $14, $1c, $14, $29, $14, $2a, $14, $2b, $14, $2c, $14, $39, $14, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54
- db $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54
- db $33, $14, $34, $14, $35, $14, $35, $54, $34, $54, $24, $54, $07, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $20, $14, $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54, $20, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
diff --git a/data/sprite_anims/framesets.asm b/data/sprite_anims/framesets.asm
index 24b058859..a4e126cef 100755
--- a/data/sprite_anims/framesets.asm
+++ b/data/sprite_anims/framesets.asm
@@ -9,7 +9,7 @@ SpriteAnimFrameData: ; 8d6e6
dw .Frameset_PartyMonWithItemFast
dw .Frameset_GSTitleTrail
dw .Frameset_TextEntryCursor
- dw .Frameset_09
+ dw .Frameset_TextEntryCursorBig
dw .Frameset_GameFreakLogo
dw .Frameset_GSIntroStar
dw .Frameset_GSIntroSparkle
@@ -20,7 +20,7 @@ SpriteAnimFrameData: ; 8d6e6
dw .Frameset_RedWalk
dw .Frameset_StillCursor
dw .Frameset_TradePokeBall
- dw .Frameset_TradePokeBall0
+ dw .Frameset_TradePokeBallWiggle
dw .Frameset_TradePoof
dw .Frameset_TradeTubeBulge
dw .Frameset_TrademonIcon
@@ -28,31 +28,31 @@ SpriteAnimFrameData: ; 8d6e6
dw .Frameset_EvolutionBallOfLight
dw .Frameset_RadioTuningKnob
dw .Frameset_MagnetTrainRed
- dw .Frameset_1c
+ dw .Frameset_Unused1C
dw .Frameset_Leaf
dw .Frameset_CutTree
dw .Frameset_EggCrack
- dw .Frameset_EggHatch
- dw .Frameset_21
- dw .Frameset_22
- dw .Frameset_23
- dw .Frameset_24
+ dw .Frameset_EggHatch1
+ dw .Frameset_EggHatch2
+ dw .Frameset_EggHatch3
+ dw .Frameset_EggHatch4
+ dw .Frameset_GSIntroHoOh
dw .Frameset_HeadbuttTree
- dw .Frameset_26
- dw .Frameset_27
- dw .Frameset_28
- dw .Frameset_29
- dw .Frameset_2a
- dw .Frameset_2b
- dw .Frameset_2c
+ dw .Frameset_EZChatCursor1
+ dw .Frameset_EZChatCursor2
+ dw .Frameset_EZChatCursor3
+ dw .Frameset_EZChatCursor4
+ dw .Frameset_EZChatCursor5
+ dw .Frameset_EZChatCursor6
+ dw .Frameset_EZChatCursor7
dw .Frameset_BlueWalk
dw .Frameset_MagnetTrainBlue
dw .Frameset_MobileTradeSentBall
dw .Frameset_MobileTradeOTBall
- dw .Frameset_ForMobile22
- dw .Frameset_ForMobile23
- dw .Frameset_ForMobile24
- dw .Frameset_ForMobile25
+ dw .Frameset_MobileTradeCableBulge
+ dw .Frameset_MobileTradeSentPulse
+ dw .Frameset_MobileTradeOTPulse
+ dw .Frameset_MobileTradePing
dw .Frameset_IntroSuicune
dw .Frameset_IntroSuicune2
dw .Frameset_IntroPichu
@@ -133,8 +133,8 @@ SpriteAnimFrameData: ; 8d6e6
dorepeat 1
dorestart
-.Frameset_09:
- frame SPRITE_ANIM_OAMSET_FOR_FRAMESET_09, 1
+.Frameset_TextEntryCursorBig:
+ frame SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG, 1
dorepeat 1
dorestart
@@ -202,7 +202,7 @@ SpriteAnimFrameData: ; 8d6e6
frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 32
endanim
-.Frameset_TradePokeBall0:
+.Frameset_TradePokeBallWiggle:
frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3
frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3
frame SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3
@@ -216,8 +216,8 @@ SpriteAnimFrameData: ; 8d6e6
delanim
.Frameset_TradeTubeBulge:
- frame SPRITE_ANIM_OAMSET_35, 3
- frame SPRITE_ANIM_OAMSET_36, 3
+ frame SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_1, 3
+ frame SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_2, 3
dorestart
.Frameset_TrademonIcon:
@@ -246,50 +246,50 @@ SpriteAnimFrameData: ; 8d6e6
frame SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP
dorestart
-; XXX
- frame SPRITE_ANIM_OAMSET_43, 8
- frame SPRITE_ANIM_OAMSET_44, 8
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_43, 8
+ frame SPRITE_ANIM_OAMSET_UNUSED_44, 8
dorestart
-; XXX
- frame SPRITE_ANIM_OAMSET_45, 8
- frame SPRITE_ANIM_OAMSET_46, 8
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_45, 8
+ frame SPRITE_ANIM_OAMSET_UNUSED_46, 8
dorestart
-; XXX
- frame SPRITE_ANIM_OAMSET_47, 8
- frame SPRITE_ANIM_OAMSET_48, 8
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_47, 8
+ frame SPRITE_ANIM_OAMSET_UNUSED_48, 8
dorestart
-; XXX
- frame SPRITE_ANIM_OAMSET_49, 1
- frame SPRITE_ANIM_OAMSET_49, 1, OAM_X_FLIP
- frame SPRITE_ANIM_OAMSET_49, 1, OAM_X_FLIP, OAM_Y_FLIP
- frame SPRITE_ANIM_OAMSET_49, 1, OAM_Y_FLIP
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_49, 1
+ frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP
+ frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP, OAM_Y_FLIP
+ frame SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP
dorestart
-; XXX
- frame SPRITE_ANIM_OAMSET_4A, 32
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_4A, 32
endanim
-; XXX
- frame SPRITE_ANIM_OAMSET_4B, 32
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_4B, 32
endanim
-; XXX
- frame SPRITE_ANIM_OAMSET_4C, 32
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_4C, 32
endanim
-; XXX
- frame SPRITE_ANIM_OAMSET_4D, 32
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_4D, 32
endanim
-; XXX
- frame SPRITE_ANIM_OAMSET_4E, 3
+; unused
+ frame SPRITE_ANIM_OAMSET_UNUSED_4E, 3
dorepeat 3
dorestart
-.Frameset_1c:
+.Frameset_Unused1C:
dorepeat 32
endanim
@@ -310,29 +310,29 @@ SpriteAnimFrameData: ; 8d6e6
frame SPRITE_ANIM_OAMSET_EGG_CRACK, 32
endanim
-.Frameset_EggHatch:
- frame SPRITE_ANIM_OAMSET_55, 32
+.Frameset_EggHatch1:
+ frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32
endanim
-.Frameset_21:
- frame SPRITE_ANIM_OAMSET_55, 32, OAM_X_FLIP
+.Frameset_EggHatch2:
+ frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP
endanim
-.Frameset_22:
- frame SPRITE_ANIM_OAMSET_55, 32, OAM_Y_FLIP
+.Frameset_EggHatch3:
+ frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_Y_FLIP
endanim
-.Frameset_23:
- frame SPRITE_ANIM_OAMSET_55, 32, OAM_X_FLIP, OAM_Y_FLIP
+.Frameset_EggHatch4:
+ frame SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP, OAM_Y_FLIP
endanim
-.Frameset_24:
- frame SPRITE_ANIM_OAMSET_56, 10
- frame SPRITE_ANIM_OAMSET_57, 9
- frame SPRITE_ANIM_OAMSET_58, 10
- frame SPRITE_ANIM_OAMSET_59, 10
- frame SPRITE_ANIM_OAMSET_58, 9
- frame SPRITE_ANIM_OAMSET_5A, 10
+.Frameset_GSIntroHoOh:
+ frame SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_1, 10
+ frame SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_2, 9
+ frame SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_3, 10
+ frame SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_4, 10
+ frame SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_3, 9
+ frame SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_5, 10
dorestart
.Frameset_HeadbuttTree:
@@ -342,32 +342,32 @@ SpriteAnimFrameData: ; 8d6e6
frame SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2, OAM_X_FLIP
dorestart
-.Frameset_26:
- frame SPRITE_ANIM_OAMSET_5C, 2
+.Frameset_EZChatCursor1:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_1, 2
endanim
-.Frameset_27:
- frame SPRITE_ANIM_OAMSET_5D, 2
+.Frameset_EZChatCursor2:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_2, 2
endanim
-.Frameset_28:
- frame SPRITE_ANIM_OAMSET_5E, 2
+.Frameset_EZChatCursor3:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_3, 2
endanim
-.Frameset_29:
- frame SPRITE_ANIM_OAMSET_5F, 2
+.Frameset_EZChatCursor4:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_4, 2
endanim
-.Frameset_2a:
- frame SPRITE_ANIM_OAMSET_60, 2
+.Frameset_EZChatCursor5:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_5, 2
endanim
-.Frameset_2b:
- frame SPRITE_ANIM_OAMSET_61, 2
+.Frameset_EZChatCursor6:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_6, 2
endanim
-.Frameset_2c:
- frame SPRITE_ANIM_OAMSET_62, 2
+.Frameset_EZChatCursor7:
+ frame SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_7, 2
endanim
.Frameset_MobileTradeSentBall:
@@ -406,23 +406,23 @@ SpriteAnimFrameData: ; 8d6e6
frame SPRITE_ANIM_OAMSET_TRADE_POOF_3, 3
delanim
-.Frameset_ForMobile22:
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_22_1, 3
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_22_2, 3
+.Frameset_MobileTradeCableBulge:
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_1, 3
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_2, 3
dorestart
-.Frameset_ForMobile23:
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_23, 3
+.Frameset_MobileTradeSentPulse:
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_SENT_PULSE, 3
endanim
-.Frameset_ForMobile24:
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_24, 3
+.Frameset_MobileTradeOTPulse:
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_OT_PULSE, 3
endanim
-.Frameset_ForMobile25:
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_25_1, 2
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_25_2, 2
- frame SPRITE_ANIM_OAMSET_FOR_MOBILE_25_3, 2
+.Frameset_MobileTradePing:
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_1, 2
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_2, 2
+ frame SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_3, 2
delanim
.Frameset_IntroSuicune:
diff --git a/data/sprite_anims/oam.asm b/data/sprite_anims/oam.asm
index 99adc9df3..cd03eec29 100644
--- a/data/sprite_anims/oam.asm
+++ b/data/sprite_anims/oam.asm
@@ -1,157 +1,157 @@
SpriteAnimOAMData: ; 8d94d
; entries correspond to SPRITE_ANIM_OAMSET_* constants
; vtile offset, pointer
- dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_1
- dbw $04, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_2
- dbw $4c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_02
- dbw $5c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_03
- dbw $6c, .OAMData_04 ; SPRITE_ANIM_OAMSET_04
- dbw $6e, .OAMData_04 ; SPRITE_ANIM_OAMSET_05
- dbw $2d, .OAMData_06 ; SPRITE_ANIM_OAMSET_06
- dbw $4d, .OAMData_06 ; SPRITE_ANIM_OAMSET_07
- dbw $60, .OAMData_08 ; SPRITE_ANIM_OAMSET_08
- dbw $00, .OAMData_08 ; SPRITE_ANIM_OAMSET_09
- dbw $00, .OAMData_08 ; SPRITE_ANIM_OAMSET_0A
- dbw $06, .OAMData_08 ; SPRITE_ANIM_OAMSET_0B
- dbw $0c, .OAMData_0c ; SPRITE_ANIM_OAMSET_0C
- dbw $0d, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_0D
- dbw $00, .OAMData_0e ; SPRITE_ANIM_OAMSET_0E
- dbw $04, .OAMData_0e ; SPRITE_ANIM_OAMSET_0F
- dbw $08, .OAMData_0e ; SPRITE_ANIM_OAMSET_10
- dbw $40, .OAMData_0e ; SPRITE_ANIM_OAMSET_11
- dbw $44, .OAMData_0e ; SPRITE_ANIM_OAMSET_12
- dbw $48, .OAMData_0e ; SPRITE_ANIM_OAMSET_13
- dbw $4c, .OAMData_0e ; SPRITE_ANIM_OAMSET_14
- dbw $80, .OAMData_15 ; SPRITE_ANIM_OAMSET_15
- dbw $85, .OAMData_15 ; SPRITE_ANIM_OAMSET_16
- dbw $8a, .OAMData_15 ; SPRITE_ANIM_OAMSET_17
- dbw $00, .OAMData_18 ; SPRITE_ANIM_OAMSET_18
- dbw $01, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_19
- dbw $09, .OAMData_1a ; SPRITE_ANIM_OAMSET_1A
- dbw $10, .OAMData_1b ; SPRITE_ANIM_OAMSET_1B
- dbw $29, .OAMData_1b ; SPRITE_ANIM_OAMSET_1C
- dbw $42, .OAMData_1b ; SPRITE_ANIM_OAMSET_1D
- dbw $f8, .OAMData_GSTitleTrail ; SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1
- dbw $fa, .OAMData_GSTitleTrail ; SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2
- dbw $00, .OAMData_TextEntryCursor ; SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR
- dbw $00, .OAMData_ForFrameset09 ; SPRITE_ANIM_OAMSET_FOR_FRAMESET_09
- dbw $00, .OAMData_22 ; SPRITE_ANIM_OAMSET_22
- dbw $0f, .OAMData_GSIntroStar ; SPRITE_ANIM_OAMSET_GS_INTRO_STAR
- dbw $11, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_1
- dbw $12, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_2
- dbw $13, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_3
- dbw $00, .OAMData_SlotsGolem ; SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1
- dbw $08, .OAMData_SlotsGolem ; SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2
- dbw $10, .OAMData_SlotsChansey1 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1
- dbw $10, .OAMData_SlotsChansey2 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2
- dbw $10, .OAMData_SlotsChansey3 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3
- dbw $10, .OAMData_SlotsChansey4 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4
- dbw $10, .OAMData_SlotsChansey5 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5
- dbw $3a, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_SLOTS_EGG
- dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_STILL_CURSOR
- dbw $00, .OAMData_TradePokeBall1 ; SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1
- dbw $02, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2
- dbw $06, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_1
- dbw $0a, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_2
- dbw $0e, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_3
- dbw $12, .OAMData_35 ; SPRITE_ANIM_OAMSET_35
- dbw $13, .OAMData_35 ; SPRITE_ANIM_OAMSET_36
- dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_TRADEMON_ICON_1
- dbw $04, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_TRADEMON_ICON_2
- dbw $10, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE
- dbw $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1
- dbw $04, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2
- dbw $00, .OAMData_RadioTuningKnob ; SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB
- dbw $00, .OAMData_PartyMonWithMail1 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1
- dbw $00, .OAMData_PartyMonWithMail2 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2
- dbw $00, .OAMData_PartyMonWithItem1 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1
- dbw $00, .OAMData_PartyMonWithItem2 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2
- dbw $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1
- dbw $04, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2
- dbw $00, .OAMData_43 ; SPRITE_ANIM_OAMSET_43
- dbw $30, .OAMData_43 ; SPRITE_ANIM_OAMSET_44
- dbw $03, .OAMData_43 ; SPRITE_ANIM_OAMSET_45
- dbw $33, .OAMData_43 ; SPRITE_ANIM_OAMSET_46
- dbw $06, .OAMData_43 ; SPRITE_ANIM_OAMSET_47
- dbw $36, .OAMData_43 ; SPRITE_ANIM_OAMSET_48
- dbw $09, .OAMData_43 ; SPRITE_ANIM_OAMSET_49
- dbw $39, .OAMData_43 ; SPRITE_ANIM_OAMSET_4A
- dbw $0c, .OAMData_4b ; SPRITE_ANIM_OAMSET_4B
- dbw $0c, .OAMData_4c ; SPRITE_ANIM_OAMSET_4C
- dbw $3c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_4D
- dbw $3e, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_4E
- dbw $00, .OAMData_Leaf ; SPRITE_ANIM_OAMSET_LEAF
- dbw $00, .OAMData_Tree ; SPRITE_ANIM_OAMSET_TREE_1
- dbw $00, .OAMData_CutTree2 ; SPRITE_ANIM_OAMSET_CUT_TREE_2
- dbw $00, .OAMData_CutTree3 ; SPRITE_ANIM_OAMSET_CUT_TREE_3
- dbw $00, .OAMData_CutTree4 ; SPRITE_ANIM_OAMSET_CUT_TREE_4
- dbw $00, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EGG_CRACK
- dbw $01, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_55
- dbw $00, .OAMData_56 ; SPRITE_ANIM_OAMSET_56
- dbw $00, .OAMData_57 ; SPRITE_ANIM_OAMSET_57
- dbw $00, .OAMData_58 ; SPRITE_ANIM_OAMSET_58
- dbw $00, .OAMData_59 ; SPRITE_ANIM_OAMSET_59
- dbw $00, .OAMData_5a ; SPRITE_ANIM_OAMSET_5A
- dbw $04, .OAMData_Tree ; SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2
- dbw $00, .OAMData_5c ; SPRITE_ANIM_OAMSET_5C
- dbw $00, .OAMData_5d ; SPRITE_ANIM_OAMSET_5D
- dbw $00, .OAMData_5e ; SPRITE_ANIM_OAMSET_5E
- dbw $00, .OAMData_5f ; SPRITE_ANIM_OAMSET_5F
- dbw $00, .OAMData_60 ; SPRITE_ANIM_OAMSET_60
- dbw $00, .OAMData_61 ; SPRITE_ANIM_OAMSET_61
- dbw $00, .OAMData_62 ; SPRITE_ANIM_OAMSET_62
- dbw $00, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_BLUE_WALK_1
- dbw $04, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_BLUE_WALK_2
- dbw $00, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1
- dbw $04, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2
- dbw $20, .OAMData_ForMobile22 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_22_1
- dbw $21, .OAMData_ForMobile22 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_22_2
- dbw $22, .OAMData_ForMobile25_1 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_25_1
- dbw $23, .OAMData_ForMobile25_2 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_25_2
- dbw $27, .OAMData_ForMobile25_3 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_25_3
- dbw $2a, .OAMData_ForMobile23 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_23
- dbw $2a, .OAMData_ForMobile24 ; SPRITE_ANIM_OAMSET_FOR_MOBILE_24
- dbw $00, .OAMData_IntroSuicune1 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1
- dbw $08, .OAMData_IntroSuicune2 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2
- dbw $60, .OAMData_IntroSuicune3 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3
- dbw $68, .OAMData_IntroSuicune4 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4
- dbw $00, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_1
- dbw $05, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_2
- dbw $0a, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_3
- dbw $50, .OAMData_IntroWooper ; SPRITE_ANIM_OAMSET_INTRO_WOOPER
- dbw $00, .OAMData_IntroUnown1 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_1
- dbw $01, .OAMData_IntroUnown2 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_2
- dbw $04, .OAMData_IntroUnown3 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_3
- dbw $00, .OAMData_18 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1
- dbw $01, .OAMData_IntroUnownF2_2 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2
- dbw $03, .OAMData_IntroUnownF2_3 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3
- dbw $08, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4
- dbw $1c, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5
- dbw $80, .OAMData_IntroSuicuneAway ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY
- dbw $00, .OAMData_Celebi ; SPRITE_ANIM_OAMSET_CELEBI_1
- dbw $04, .OAMData_Celebi ; SPRITE_ANIM_OAMSET_CELEBI_2
- dbw $d0, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1
- dbw $d3, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2
- dbw $d6, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3
- dbw $6c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4
- dbw $68, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5
- dbw $64, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6
- dbw $60, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7
- dbw $0c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8
- dbw $08, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9
- dbw $04, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10
- dbw $00, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11
+ dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_1
+ dbw $04, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_2
+ dbw $4c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_1
+ dbw $5c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_2
+ dbw $6c, .OAMData_GSIntroShellder ; SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_1
+ dbw $6e, .OAMData_GSIntroShellder ; SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_2
+ dbw $2d, .OAMData_GSIntroMagikarp ; SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_1
+ dbw $4d, .OAMData_GSIntroMagikarp ; SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_2
+ dbw $60, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_1
+ dbw $00, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_2
+ dbw $00, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_3
+ dbw $06, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_4
+ dbw $0c, .OAMData_GSIntroNote ; SPRITE_ANIM_OAMSET_GS_INTRO_NOTE
+ dbw $0d, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_UNUSED_0D
+ dbw $00, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_1
+ dbw $04, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_2
+ dbw $08, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_3
+ dbw $40, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_1
+ dbw $44, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_2
+ dbw $48, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_3
+ dbw $4c, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_4
+ dbw $80, .OAMData_GSIntroPikachuTail ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_1
+ dbw $85, .OAMData_GSIntroPikachuTail ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_2
+ dbw $8a, .OAMData_GSIntroPikachuTail ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_3
+ dbw $00, .OAMData_IntroUnownF2_1 ; SPRITE_ANIM_OAMSET_GS_INTRO_SMALL_FIREBALL
+ dbw $01, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_GS_INTRO_MED_FIREBALL
+ dbw $09, .OAMData_GSIntroBigFireball ; SPRITE_ANIM_OAMSET_GS_INTRO_BIG_FIREBALL
+ dbw $10, .OAMData_GSIntroStarter ; SPRITE_ANIM_OAMSET_GS_INTRO_CHIKORITA
+ dbw $29, .OAMData_GSIntroStarter ; SPRITE_ANIM_OAMSET_GS_INTRO_CYNDAQUIL
+ dbw $42, .OAMData_GSIntroStarter ; SPRITE_ANIM_OAMSET_GS_INTRO_TOTODILE
+ dbw $f8, .OAMData_GSTitleTrail ; SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1
+ dbw $fa, .OAMData_GSTitleTrail ; SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2
+ dbw $00, .OAMData_TextEntryCursor ; SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR
+ dbw $00, .OAMData_TextEntryCursorBig ; SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG
+ dbw $00, .OAMData_GSIntroGameFreakLogo ; SPRITE_ANIM_OAMSET_GS_INTRO_GAMEFREAK_LOGO
+ dbw $0f, .OAMData_GSIntroStar ; SPRITE_ANIM_OAMSET_GS_INTRO_STAR
+ dbw $11, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_1
+ dbw $12, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_2
+ dbw $13, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_SPARKLE_3
+ dbw $00, .OAMData_SlotsGolem ; SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1
+ dbw $08, .OAMData_SlotsGolem ; SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2
+ dbw $10, .OAMData_SlotsChansey1 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1
+ dbw $10, .OAMData_SlotsChansey2 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2
+ dbw $10, .OAMData_SlotsChansey3 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3
+ dbw $10, .OAMData_SlotsChansey4 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4
+ dbw $10, .OAMData_SlotsChansey5 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5
+ dbw $3a, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_SLOTS_EGG
+ dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_STILL_CURSOR
+ dbw $00, .OAMData_TradePokeBall1 ; SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1
+ dbw $02, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2
+ dbw $06, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_1
+ dbw $0a, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_2
+ dbw $0e, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_3
+ dbw $12, .OAMData_TradeTubeBulge ; SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_1
+ dbw $13, .OAMData_TradeTubeBulge ; SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_2
+ dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_TRADEMON_ICON_1
+ dbw $04, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_TRADEMON_ICON_2
+ dbw $10, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE
+ dbw $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1
+ dbw $04, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2
+ dbw $00, .OAMData_RadioTuningKnob ; SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB
+ dbw $00, .OAMData_PartyMonWithMail1 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1
+ dbw $00, .OAMData_PartyMonWithMail2 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2
+ dbw $00, .OAMData_PartyMonWithItem1 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1
+ dbw $00, .OAMData_PartyMonWithItem2 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2
+ dbw $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1
+ dbw $04, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2
+ dbw $00, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_43
+ dbw $30, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_44
+ dbw $03, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_45
+ dbw $33, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_46
+ dbw $06, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_47
+ dbw $36, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_48
+ dbw $09, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_49
+ dbw $39, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_4A
+ dbw $0c, .OAMData_Unused4B ; SPRITE_ANIM_OAMSET_UNUSED_4B
+ dbw $0c, .OAMData_Unused4C ; SPRITE_ANIM_OAMSET_UNUSED_4C
+ dbw $3c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_UNUSED_4D
+ dbw $3e, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_UNUSED_4E
+ dbw $00, .OAMData_Leaf ; SPRITE_ANIM_OAMSET_LEAF
+ dbw $00, .OAMData_Tree ; SPRITE_ANIM_OAMSET_TREE_1
+ dbw $00, .OAMData_CutTree2 ; SPRITE_ANIM_OAMSET_CUT_TREE_2
+ dbw $00, .OAMData_CutTree3 ; SPRITE_ANIM_OAMSET_CUT_TREE_3
+ dbw $00, .OAMData_CutTree4 ; SPRITE_ANIM_OAMSET_CUT_TREE_4
+ dbw $00, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EGG_CRACK
+ dbw $01, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EGG_HATCH
+ dbw $00, .OAMData_GSIntroHoOh1 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_1
+ dbw $00, .OAMData_GSIntroHoOh2 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_2
+ dbw $00, .OAMData_GSIntroHoOh3 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_3
+ dbw $00, .OAMData_GSIntroHoOh4 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_4
+ dbw $00, .OAMData_GSIntroHoOh5 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_5
+ dbw $04, .OAMData_Tree ; SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2
+ dbw $00, .OAMData_EZChatCursor1 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_1
+ dbw $00, .OAMData_EZChatCursor2 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_2
+ dbw $00, .OAMData_EZChatCursor3 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_3
+ dbw $00, .OAMData_EZChatCursor4 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_4
+ dbw $00, .OAMData_EZChatCursor5 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_5
+ dbw $00, .OAMData_EZChatCursor6 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_6
+ dbw $00, .OAMData_EZChatCursor7 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_7
+ dbw $00, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_BLUE_WALK_1
+ dbw $04, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_BLUE_WALK_2
+ dbw $00, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1
+ dbw $04, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2
+ dbw $20, .OAMData_MobileTradeCableBulge ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_1
+ dbw $21, .OAMData_MobileTradeCableBulge ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_2
+ dbw $22, .OAMData_MobileTradePing1 ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_1
+ dbw $23, .OAMData_MobileTradePing2 ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_2
+ dbw $27, .OAMData_MobileTradePing3 ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_3
+ dbw $2a, .OAMData_MobileTradeSentPulse ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_SENT_PULSE
+ dbw $2a, .OAMData_MobileTradeOTPulse ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_OT_PULSE
+ dbw $00, .OAMData_IntroSuicune1 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1
+ dbw $08, .OAMData_IntroSuicune2 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2
+ dbw $60, .OAMData_IntroSuicune3 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3
+ dbw $68, .OAMData_IntroSuicune4 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4
+ dbw $00, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_1
+ dbw $05, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_2
+ dbw $0a, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_3
+ dbw $50, .OAMData_IntroWooper ; SPRITE_ANIM_OAMSET_INTRO_WOOPER
+ dbw $00, .OAMData_IntroUnown1 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_1
+ dbw $01, .OAMData_IntroUnown2 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_2
+ dbw $04, .OAMData_IntroUnown3 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_3
+ dbw $00, .OAMData_IntroUnownF2_1 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1
+ dbw $01, .OAMData_IntroUnownF2_2 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2
+ dbw $03, .OAMData_IntroUnownF2_3 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3
+ dbw $08, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4
+ dbw $1c, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5
+ dbw $80, .OAMData_IntroSuicuneAway ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY
+ dbw $00, .OAMData_Celebi ; SPRITE_ANIM_OAMSET_CELEBI_1
+ dbw $04, .OAMData_Celebi ; SPRITE_ANIM_OAMSET_CELEBI_2
+ dbw $d0, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1
+ dbw $d3, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2
+ dbw $d6, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3
+ dbw $6c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4
+ dbw $68, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5
+ dbw $64, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6
+ dbw $60, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7
+ dbw $0c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8
+ dbw $08, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9
+ dbw $04, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10
+ dbw $00, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11
.OAMData_1x1_Palette0:
db 1
- dsprite -1, 4, -1, 4, $00, $00
+ dsprite -1, 4, -1, 4, $00, 0
-.OAMData_04:
+.OAMData_GSIntroShellder:
db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $10, $00
- dsprite 0, 0, 0, 0, $11, $00
+ dsprite -1, 0, -1, 0, $00, 0
+ dsprite -1, 0, 0, 0, $01, 0
+ dsprite 0, 0, -1, 0, $10, 0
+ dsprite 0, 0, 0, 0, $11, 0
.OAMData_GSIntroStar:
db 4
@@ -162,32 +162,31 @@ SpriteAnimOAMData: ; 8d94d
.OAMData_TradePokeBall1:
db 4
- dsprite -1, 0, -1, 0, $00, $80
- dsprite -1, 0, 0, 0, $00, $a0
- dsprite 0, 0, -1, 0, $01, $80
- dsprite 0, 0, 0, 0, $01, $a0
+ dsprite -1, 0, -1, 0, $00, 0 | PRIORITY
+ dsprite -1, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY
+ dsprite 0, 0, -1, 0, $01, 0 | PRIORITY
+ dsprite 0, 0, 0, 0, $01, 0 | X_FLIP | PRIORITY
-.OAMData_18:
+.OAMData_IntroUnownF2_1:
db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $00, $20
- dsprite 0, 0, -1, 0, $00, $40
- dsprite 0, 0, 0, 0, $00, $60
+ dsprite -1, 0, -1, 0, $00, 0
+ dsprite -1, 0, 0, 0, $00, 0 | X_FLIP
+ dsprite 0, 0, -1, 0, $00, 0 | Y_FLIP
+ dsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP
-.OAMData_35:
+.OAMData_TradeTubeBulge:
db 4
- dsprite -1, 0, -1, 0, $00, $07
- dsprite -1, 0, 0, 0, $00, $27
- dsprite 0, 0, -1, 0, $00, $47
- dsprite 0, 0, 0, 0, $00, $67
-; 8db4b
+ dsprite -1, 0, -1, 0, $00, 7
+ dsprite -1, 0, 0, 0, $00, 7 | X_FLIP
+ dsprite 0, 0, -1, 0, $00, 7 | Y_FLIP
+ dsprite 0, 0, 0, 0, $00, 7 | X_FLIP | Y_FLIP
-; 8db4b
+; unused
db 4
- dsprite -1, 0, -1, 0, $00, $80
- dsprite -1, 0, 0, 0, $00, $a0
- dsprite 0, 0, -1, 0, $00, $c0
- dsprite 0, 0, 0, 0, $00, $e0
+ dsprite -1, 0, -1, 0, $00, 0 | PRIORITY
+ dsprite -1, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY
+ dsprite 0, 0, -1, 0, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY
.OAMData_TradePoofBubble:
db 16
@@ -208,143 +207,142 @@ SpriteAnimOAMData: ; 8d94d
dsprite 1, 0, 0, 0, $01, 0 | X_FLIP | Y_FLIP
dsprite 1, 0, 1, 0, $00, 0 | X_FLIP | Y_FLIP
-.OAMData_1a:
+.OAMData_GSIntroBigFireball:
db 36
- dsprite -3, 0, -3, 0, $00, $00
- dsprite -3, 0, -2, 0, $01, $00
- dsprite -3, 0, -1, 0, $02, $00
- dsprite -2, 0, -3, 0, $03, $00
- dsprite -2, 0, -2, 0, $04, $00
- dsprite -2, 0, -1, 0, $05, $00
- dsprite -1, 0, -3, 0, $06, $00
- dsprite -1, 0, -2, 0, $05, $00
- dsprite -1, 0, -1, 0, $05, $00
- dsprite -3, 0, 0, 0, $02, $20
- dsprite -3, 0, 1, 0, $01, $20
- dsprite -3, 0, 2, 0, $00, $20
- dsprite -2, 0, 0, 0, $05, $20
- dsprite -2, 0, 1, 0, $04, $20
- dsprite -2, 0, 2, 0, $03, $20
- dsprite -1, 0, 0, 0, $05, $20
- dsprite -1, 0, 1, 0, $05, $20
- dsprite -1, 0, 2, 0, $06, $20
- dsprite 0, 0, -3, 0, $06, $40
- dsprite 0, 0, -2, 0, $05, $40
- dsprite 0, 0, -1, 0, $05, $40
- dsprite 1, 0, -3, 0, $03, $40
- dsprite 1, 0, -2, 0, $04, $40
- dsprite 1, 0, -1, 0, $05, $40
- dsprite 2, 0, -3, 0, $00, $40
- dsprite 2, 0, -2, 0, $01, $40
- dsprite 2, 0, -1, 0, $02, $40
- dsprite 0, 0, 0, 0, $05, $60
- dsprite 0, 0, 1, 0, $05, $60
- dsprite 0, 0, 2, 0, $06, $60
- dsprite 1, 0, 0, 0, $05, $60
- dsprite 1, 0, 1, 0, $04, $60
- dsprite 1, 0, 2, 0, $03, $60
- dsprite 2, 0, 0, 0, $02, $60
- dsprite 2, 0, 1, 0, $01, $60
- dsprite 2, 0, 2, 0, $00, $60
-
-.OAMData_43:
+ dsprite -3, 0, -3, 0, $00, 0
+ dsprite -3, 0, -2, 0, $01, 0
+ dsprite -3, 0, -1, 0, $02, 0
+ dsprite -2, 0, -3, 0, $03, 0
+ dsprite -2, 0, -2, 0, $04, 0
+ dsprite -2, 0, -1, 0, $05, 0
+ dsprite -1, 0, -3, 0, $06, 0
+ dsprite -1, 0, -2, 0, $05, 0
+ dsprite -1, 0, -1, 0, $05, 0
+ dsprite -3, 0, 0, 0, $02, 0 | X_FLIP
+ dsprite -3, 0, 1, 0, $01, 0 | X_FLIP
+ dsprite -3, 0, 2, 0, $00, 0 | X_FLIP
+ dsprite -2, 0, 0, 0, $05, 0 | X_FLIP
+ dsprite -2, 0, 1, 0, $04, 0 | X_FLIP
+ dsprite -2, 0, 2, 0, $03, 0 | X_FLIP
+ dsprite -1, 0, 0, 0, $05, 0 | X_FLIP
+ dsprite -1, 0, 1, 0, $05, 0 | X_FLIP
+ dsprite -1, 0, 2, 0, $06, 0 | X_FLIP
+ dsprite 0, 0, -3, 0, $06, 0 | Y_FLIP
+ dsprite 0, 0, -2, 0, $05, 0 | Y_FLIP
+ dsprite 0, 0, -1, 0, $05, 0 | Y_FLIP
+ dsprite 1, 0, -3, 0, $03, 0 | Y_FLIP
+ dsprite 1, 0, -2, 0, $04, 0 | Y_FLIP
+ dsprite 1, 0, -1, 0, $05, 0 | Y_FLIP
+ dsprite 2, 0, -3, 0, $00, 0 | Y_FLIP
+ dsprite 2, 0, -2, 0, $01, 0 | Y_FLIP
+ dsprite 2, 0, -1, 0, $02, 0 | Y_FLIP
+ dsprite 0, 0, 0, 0, $05, 0 | X_FLIP | Y_FLIP
+ dsprite 0, 0, 1, 0, $05, 0 | X_FLIP | Y_FLIP
+ dsprite 0, 0, 2, 0, $06, 0 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 0, 0, $05, 0 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 1, 0, $04, 0 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 2, 0, $03, 0 | X_FLIP | Y_FLIP
+ dsprite 2, 0, 0, 0, $02, 0 | X_FLIP | Y_FLIP
+ dsprite 2, 0, 1, 0, $01, 0 | X_FLIP | Y_FLIP
+ dsprite 2, 0, 2, 0, $00, 0 | X_FLIP | Y_FLIP
+
+.OAMData_Unused43_4A:
db 9
- dsprite -2, 4, -2, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -2, 4, 0, 4, $02, $00
- dsprite -1, 4, -2, 4, $10, $00
- dsprite -1, 4, -1, 4, $11, $00
- dsprite -1, 4, 0, 4, $12, $00
- dsprite 0, 4, -2, 4, $20, $00
- dsprite 0, 4, -1, 4, $21, $00
- dsprite 0, 4, 0, 4, $22, $00
-
-.OAMData_0e:
+ dsprite -2, 4, -2, 4, $00, 0
+ dsprite -2, 4, -1, 4, $01, 0
+ dsprite -2, 4, 0, 4, $02, 0
+ dsprite -1, 4, -2, 4, $10, 0
+ dsprite -1, 4, -1, 4, $11, 0
+ dsprite -1, 4, 0, 4, $12, 0
+ dsprite 0, 4, -2, 4, $20, 0
+ dsprite 0, 4, -1, 4, $21, 0
+ dsprite 0, 4, 0, 4, $22, 0
+
+.OAMData_GSIntroJigglypuffPikachu:
db 16
- dsprite -2, 0, -2, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -2, 0, 0, 0, $02, $00
- dsprite -2, 0, 1, 0, $03, $00
- dsprite -1, 0, -2, 0, $10, $00
- dsprite -1, 0, -1, 0, $11, $00
- dsprite -1, 0, 0, 0, $12, $00
- dsprite -1, 0, 1, 0, $13, $00
- dsprite 0, 0, -2, 0, $20, $00
- dsprite 0, 0, -1, 0, $21, $00
- dsprite 0, 0, 0, 0, $22, $00
- dsprite 0, 0, 1, 0, $23, $00
- dsprite 1, 0, -2, 0, $30, $00
- dsprite 1, 0, -1, 0, $31, $00
- dsprite 1, 0, 0, 0, $32, $00
- dsprite 1, 0, 1, 0, $33, $00
-
-.OAMData_1b:
+ dsprite -2, 0, -2, 0, $00, 0
+ dsprite -2, 0, -1, 0, $01, 0
+ dsprite -2, 0, 0, 0, $02, 0
+ dsprite -2, 0, 1, 0, $03, 0
+ dsprite -1, 0, -2, 0, $10, 0
+ dsprite -1, 0, -1, 0, $11, 0
+ dsprite -1, 0, 0, 0, $12, 0
+ dsprite -1, 0, 1, 0, $13, 0
+ dsprite 0, 0, -2, 0, $20, 0
+ dsprite 0, 0, -1, 0, $21, 0
+ dsprite 0, 0, 0, 0, $22, 0
+ dsprite 0, 0, 1, 0, $23, 0
+ dsprite 1, 0, -2, 0, $30, 0
+ dsprite 1, 0, -1, 0, $31, 0
+ dsprite 1, 0, 0, 0, $32, 0
+ dsprite 1, 0, 1, 0, $33, 0
+
+.OAMData_GSIntroStarter:
db 25
- dsprite -3, 4, -3, 4, $00, $00
- dsprite -2, 4, -3, 4, $01, $00
- dsprite -1, 4, -3, 4, $02, $00
- dsprite 0, 4, -3, 4, $03, $00
- dsprite 1, 4, -3, 4, $04, $00
- dsprite -3, 4, -2, 4, $05, $00
- dsprite -2, 4, -2, 4, $06, $00
- dsprite -1, 4, -2, 4, $07, $00
- dsprite 0, 4, -2, 4, $08, $00
- dsprite 1, 4, -2, 4, $09, $00
- dsprite -3, 4, -1, 4, $0a, $00
- dsprite -2, 4, -1, 4, $0b, $00
- dsprite -1, 4, -1, 4, $0c, $00
- dsprite 0, 4, -1, 4, $0d, $00
- dsprite 1, 4, -1, 4, $0e, $00
- dsprite -3, 4, 0, 4, $0f, $00
- dsprite -2, 4, 0, 4, $10, $00
- dsprite -1, 4, 0, 4, $11, $00
- dsprite 0, 4, 0, 4, $12, $00
- dsprite 1, 4, 0, 4, $13, $00
- dsprite -3, 4, 1, 4, $14, $00
- dsprite -2, 4, 1, 4, $15, $00
- dsprite -1, 4, 1, 4, $16, $00
- dsprite 0, 4, 1, 4, $17, $00
- dsprite 1, 4, 1, 4, $18, $00
-; 8dcf9
-
-; 8dcf9
+ dsprite -3, 4, -3, 4, $00, 0
+ dsprite -2, 4, -3, 4, $01, 0
+ dsprite -1, 4, -3, 4, $02, 0
+ dsprite 0, 4, -3, 4, $03, 0
+ dsprite 1, 4, -3, 4, $04, 0
+ dsprite -3, 4, -2, 4, $05, 0
+ dsprite -2, 4, -2, 4, $06, 0
+ dsprite -1, 4, -2, 4, $07, 0
+ dsprite 0, 4, -2, 4, $08, 0
+ dsprite 1, 4, -2, 4, $09, 0
+ dsprite -3, 4, -1, 4, $0a, 0
+ dsprite -2, 4, -1, 4, $0b, 0
+ dsprite -1, 4, -1, 4, $0c, 0
+ dsprite 0, 4, -1, 4, $0d, 0
+ dsprite 1, 4, -1, 4, $0e, 0
+ dsprite -3, 4, 0, 4, $0f, 0
+ dsprite -2, 4, 0, 4, $10, 0
+ dsprite -1, 4, 0, 4, $11, 0
+ dsprite 0, 4, 0, 4, $12, 0
+ dsprite 1, 4, 0, 4, $13, 0
+ dsprite -3, 4, 1, 4, $14, 0
+ dsprite -2, 4, 1, 4, $15, 0
+ dsprite -1, 4, 1, 4, $16, 0
+ dsprite 0, 4, 1, 4, $17, 0
+ dsprite 1, 4, 1, 4, $18, 0
+
+; unused
db 36
- dsprite -3, 0, -3, 0, $00, $00
- dsprite -3, 0, -2, 0, $01, $00
- dsprite -3, 0, -1, 0, $02, $00
- dsprite -3, 0, 0, 0, $03, $00
- dsprite -3, 0, 1, 0, $04, $00
- dsprite -3, 0, 2, 0, $05, $00
- dsprite -2, 0, -3, 0, $06, $00
- dsprite -2, 0, -2, 0, $07, $00
- dsprite -2, 0, -1, 0, $08, $00
- dsprite -2, 0, 0, 0, $09, $00
- dsprite -2, 0, 1, 0, $0a, $00
- dsprite -2, 0, 2, 0, $0b, $00
- dsprite -1, 0, -3, 0, $0c, $00
- dsprite -1, 0, -2, 0, $0d, $00
- dsprite -1, 0, -1, 0, $0e, $00
- dsprite -1, 0, 0, 0, $0f, $00
- dsprite -1, 0, 1, 0, $10, $00
- dsprite -1, 0, 2, 0, $11, $00
- dsprite 0, 0, -3, 0, $12, $00
- dsprite 0, 0, -2, 0, $13, $00
- dsprite 0, 0, -1, 0, $14, $00
- dsprite 0, 0, 0, 0, $15, $00
- dsprite 0, 0, 1, 0, $16, $00
- dsprite 0, 0, 2, 0, $17, $00
- dsprite 1, 0, -3, 0, $18, $00
- dsprite 1, 0, -2, 0, $19, $00
- dsprite 1, 0, -1, 0, $1a, $00
- dsprite 1, 0, 0, 0, $1b, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite 1, 0, 2, 0, $1d, $00
- dsprite 2, 0, -3, 0, $1e, $00
- dsprite 2, 0, -2, 0, $1f, $00
- dsprite 2, 0, -1, 0, $20, $00
- dsprite 2, 0, 0, 0, $21, $00
- dsprite 2, 0, 1, 0, $22, $00
- dsprite 2, 0, 2, 0, $23, $00
+ dsprite -3, 0, -3, 0, $00, 0
+ dsprite -3, 0, -2, 0, $01, 0
+ dsprite -3, 0, -1, 0, $02, 0
+ dsprite -3, 0, 0, 0, $03, 0
+ dsprite -3, 0, 1, 0, $04, 0
+ dsprite -3, 0, 2, 0, $05, 0
+ dsprite -2, 0, -3, 0, $06, 0
+ dsprite -2, 0, -2, 0, $07, 0
+ dsprite -2, 0, -1, 0, $08, 0
+ dsprite -2, 0, 0, 0, $09, 0
+ dsprite -2, 0, 1, 0, $0a, 0
+ dsprite -2, 0, 2, 0, $0b, 0
+ dsprite -1, 0, -3, 0, $0c, 0
+ dsprite -1, 0, -2, 0, $0d, 0
+ dsprite -1, 0, -1, 0, $0e, 0
+ dsprite -1, 0, 0, 0, $0f, 0
+ dsprite -1, 0, 1, 0, $10, 0
+ dsprite -1, 0, 2, 0, $11, 0
+ dsprite 0, 0, -3, 0, $12, 0
+ dsprite 0, 0, -2, 0, $13, 0
+ dsprite 0, 0, -1, 0, $14, 0
+ dsprite 0, 0, 0, 0, $15, 0
+ dsprite 0, 0, 1, 0, $16, 0
+ dsprite 0, 0, 2, 0, $17, 0
+ dsprite 1, 0, -3, 0, $18, 0
+ dsprite 1, 0, -2, 0, $19, 0
+ dsprite 1, 0, -1, 0, $1a, 0
+ dsprite 1, 0, 0, 0, $1b, 0
+ dsprite 1, 0, 1, 0, $1c, 0
+ dsprite 1, 0, 2, 0, $1d, 0
+ dsprite 2, 0, -3, 0, $1e, 0
+ dsprite 2, 0, -2, 0, $1f, 0
+ dsprite 2, 0, -1, 0, $20, 0
+ dsprite 2, 0, 0, 0, $21, 0
+ dsprite 2, 0, 1, 0, $22, 0
+ dsprite 2, 0, 2, 0, $23, 0
.OAMData_RedWalk:
db 4
@@ -355,10 +353,10 @@ SpriteAnimOAMData: ; 8d94d
.OAMData_MagnetTrainRed:
db 4
- dsprite -1, 0, -1, 0, $00, PAL_OW_RED | BEHIND_BG
- dsprite -1, 0, 0, 0, $01, PAL_OW_RED | BEHIND_BG
- dsprite 0, 0, -1, 0, $02, PAL_OW_RED | BEHIND_BG
- dsprite 0, 0, 0, 0, $03, PAL_OW_RED | BEHIND_BG
+ dsprite -1, 0, -1, 0, $00, PAL_OW_RED | PRIORITY
+ dsprite -1, 0, 0, 0, $01, PAL_OW_RED | PRIORITY
+ dsprite 0, 0, -1, 0, $02, PAL_OW_RED | PRIORITY
+ dsprite 0, 0, 0, 0, $03, PAL_OW_RED | PRIORITY
.OAMData_PartyMonWithMail1:
db 4
@@ -388,59 +386,59 @@ SpriteAnimOAMData: ; 8d94d
dsprite 0, 0, -1, 0, $09, PAL_OW_RED
dsprite 0, 0, 0, 0, $07, PAL_OW_RED
-.OAMData_06:
+.OAMData_GSIntroMagikarp:
db 6
- dsprite -1, 0, -2, 4, $00, $01
- dsprite -1, 0, -1, 4, $01, $01
- dsprite -1, 0, 0, 4, $02, $01
- dsprite 0, 0, -2, 4, $10, $01
- dsprite 0, 0, -1, 4, $11, $01
- dsprite 0, 0, 0, 4, $12, $01
-
-.OAMData_08:
+ dsprite -1, 0, -2, 4, $00, 1
+ dsprite -1, 0, -1, 4, $01, 1
+ dsprite -1, 0, 0, 4, $02, 1
+ dsprite 0, 0, -2, 4, $10, 1
+ dsprite 0, 0, -1, 4, $11, 1
+ dsprite 0, 0, 0, 4, $12, 1
+
+.OAMData_GSIntroLapras:
db 29
- dsprite -3, 0, -3, 0, $00, $00
- dsprite -3, 0, -2, 0, $01, $00
- dsprite -3, 0, -1, 0, $02, $00
- dsprite -3, 0, 0, 0, $03, $00
- dsprite -2, 0, -3, 0, $10, $00
- dsprite -2, 0, -2, 0, $11, $00
- dsprite -2, 0, -1, 0, $12, $00
- dsprite -2, 0, 0, 0, $13, $00
- dsprite -1, 0, -3, 0, $20, $00
- dsprite -1, 0, -2, 0, $21, $00
- dsprite -1, 0, -1, 0, $22, $00
- dsprite -1, 0, 0, 0, $23, $00
- dsprite -1, 0, 1, 0, $24, $00
- dsprite 0, 0, -3, 0, $30, $80
- dsprite 0, 0, -2, 0, $31, $80
- dsprite 0, 0, -1, 0, $32, $80
- dsprite 0, 0, 0, 0, $33, $80
- dsprite 0, 0, 1, 0, $34, $80
- dsprite 1, 0, -3, 0, $40, $80
- dsprite 1, 0, -2, 0, $41, $80
- dsprite 1, 0, -1, 0, $42, $80
- dsprite 1, 0, 0, 0, $43, $80
- dsprite 1, 0, 1, 0, $44, $80
- dsprite 1, 0, 2, 0, $45, $80
- dsprite 2, 0, -2, 0, $51, $80
- dsprite 2, 0, -1, 0, $52, $80
- dsprite 2, 0, 0, 0, $53, $80
- dsprite 2, 0, 1, 0, $54, $80
- dsprite 2, 0, 2, 0, $55, $80
-
-.OAMData_0c:
+ dsprite -3, 0, -3, 0, $00, 0
+ dsprite -3, 0, -2, 0, $01, 0
+ dsprite -3, 0, -1, 0, $02, 0
+ dsprite -3, 0, 0, 0, $03, 0
+ dsprite -2, 0, -3, 0, $10, 0
+ dsprite -2, 0, -2, 0, $11, 0
+ dsprite -2, 0, -1, 0, $12, 0
+ dsprite -2, 0, 0, 0, $13, 0
+ dsprite -1, 0, -3, 0, $20, 0
+ dsprite -1, 0, -2, 0, $21, 0
+ dsprite -1, 0, -1, 0, $22, 0
+ dsprite -1, 0, 0, 0, $23, 0
+ dsprite -1, 0, 1, 0, $24, 0
+ dsprite 0, 0, -3, 0, $30, 0 | PRIORITY
+ dsprite 0, 0, -2, 0, $31, 0 | PRIORITY
+ dsprite 0, 0, -1, 0, $32, 0 | PRIORITY
+ dsprite 0, 0, 0, 0, $33, 0 | PRIORITY
+ dsprite 0, 0, 1, 0, $34, 0 | PRIORITY
+ dsprite 1, 0, -3, 0, $40, 0 | PRIORITY
+ dsprite 1, 0, -2, 0, $41, 0 | PRIORITY
+ dsprite 1, 0, -1, 0, $42, 0 | PRIORITY
+ dsprite 1, 0, 0, 0, $43, 0 | PRIORITY
+ dsprite 1, 0, 1, 0, $44, 0 | PRIORITY
+ dsprite 1, 0, 2, 0, $45, 0 | PRIORITY
+ dsprite 2, 0, -2, 0, $51, 0 | PRIORITY
+ dsprite 2, 0, -1, 0, $52, 0 | PRIORITY
+ dsprite 2, 0, 0, 0, $53, 0 | PRIORITY
+ dsprite 2, 0, 1, 0, $54, 0 | PRIORITY
+ dsprite 2, 0, 2, 0, $55, 0 | PRIORITY
+
+.OAMData_GSIntroNote:
db 2
- dsprite -1, 0, -1, 4, $00, $00
- dsprite 0, 0, -1, 4, $10, $00
+ dsprite -1, 0, -1, 4, $00, 0
+ dsprite 0, 0, -1, 4, $10, 0
-.OAMData_15:
+.OAMData_GSIntroPikachuTail:
db 5
- dsprite -2, 0, 3, 0, $00, $00
- dsprite -2, 0, 4, 0, $01, $00
- dsprite -1, 0, 2, 0, $02, $00
- dsprite -1, 0, 3, 0, $03, $00
- dsprite 0, 0, 2, 0, $04, $00
+ dsprite -2, 0, 3, 0, $00, 0
+ dsprite -2, 0, 4, 0, $01, 0
+ dsprite -1, 0, 2, 0, $02, 0
+ dsprite -1, 0, 3, 0, $03, 0
+ dsprite 0, 0, 2, 0, $04, 0
.OAMData_Leaf:
db 1
@@ -460,7 +458,7 @@ SpriteAnimOAMData: ; 8d94d
dsprite 0, 0, -1, 7, $00, 0 | Y_FLIP
dsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP
-.OAMData_ForFrameset09:
+.OAMData_TextEntryCursorBig:
db 10
dsprite -1, 7, 0, 0, $00, 0
dsprite -1, 7, 1, 0, $01, 0
@@ -473,23 +471,23 @@ SpriteAnimOAMData: ; 8d94d
dsprite 0, 0, 3, 0, $01, 0 | Y_FLIP
dsprite 0, 0, 4, 0, $00, 0 | X_FLIP | Y_FLIP
-.OAMData_22:
+.OAMData_GSIntroGameFreakLogo:
db 15
- dsprite -3, 4, -2, 4, $00, $11
- dsprite -3, 4, -1, 4, $01, $11
- dsprite -3, 4, 0, 4, $02, $11
- dsprite -2, 4, -2, 4, $03, $11
- dsprite -2, 4, -1, 4, $04, $11
- dsprite -2, 4, 0, 4, $05, $11
- dsprite -1, 4, -2, 4, $06, $11
- dsprite -1, 4, -1, 4, $07, $11
- dsprite -1, 4, 0, 4, $08, $11
- dsprite 0, 4, -2, 4, $09, $11
- dsprite 0, 4, -1, 4, $0a, $11
- dsprite 0, 4, 0, 4, $0b, $11
- dsprite 1, 4, -2, 4, $0c, $11
- dsprite 1, 4, -1, 4, $0d, $11
- dsprite 1, 4, 0, 4, $0e, $11
+ dsprite -3, 4, -2, 4, $00, 1 | OBP_NUM
+ dsprite -3, 4, -1, 4, $01, 1 | OBP_NUM
+ dsprite -3, 4, 0, 4, $02, 1 | OBP_NUM
+ dsprite -2, 4, -2, 4, $03, 1 | OBP_NUM
+ dsprite -2, 4, -1, 4, $04, 1 | OBP_NUM
+ dsprite -2, 4, 0, 4, $05, 1 | OBP_NUM
+ dsprite -1, 4, -2, 4, $06, 1 | OBP_NUM
+ dsprite -1, 4, -1, 4, $07, 1 | OBP_NUM
+ dsprite -1, 4, 0, 4, $08, 1 | OBP_NUM
+ dsprite 0, 4, -2, 4, $09, 1 | OBP_NUM
+ dsprite 0, 4, -1, 4, $0a, 1 | OBP_NUM
+ dsprite 0, 4, 0, 4, $0b, 1 | OBP_NUM
+ dsprite 1, 4, -2, 4, $0c, 1 | OBP_NUM
+ dsprite 1, 4, -1, 4, $0d, 1 | OBP_NUM
+ dsprite 1, 4, 0, 4, $0e, 1 | OBP_NUM
.OAMData_SlotsGolem:
db 6
@@ -551,21 +549,21 @@ SpriteAnimOAMData: ; 8d94d
dsprite -1, 4, -1, 4, $00, 0 | OBP_NUM
dsprite 0, 4, -1, 4, $00, 0 | OBP_NUM
-.OAMData_4b:
+.OAMData_Unused4B:
db 6
- dsprite 0, 0, 0, 0, $00, $00
- dsprite 0, 0, 1, 0, $01, $00
- dsprite 0, 0, 2, 0, $01, $00
- dsprite 0, 0, 3, 0, $01, $00
- dsprite 0, 0, 4, 0, $02, $00
- dsprite 0, 0, 5, 0, $03, $00
-
-.OAMData_4c:
+ dsprite 0, 0, 0, 0, $00, 0
+ dsprite 0, 0, 1, 0, $01, 0
+ dsprite 0, 0, 2, 0, $01, 0
+ dsprite 0, 0, 3, 0, $01, 0
+ dsprite 0, 0, 4, 0, $02, 0
+ dsprite 0, 0, 5, 0, $03, 0
+
+.OAMData_Unused4C:
db 4
- dsprite 0, 0, 0, 0, $00, $00
- dsprite 0, 0, 1, 0, $01, $00
- dsprite 0, 0, 2, 0, $02, $00
- dsprite 0, 0, 3, 0, $03, $00
+ dsprite 0, 0, 0, 0, $00, 0
+ dsprite 0, 0, 1, 0, $01, 0
+ dsprite 0, 0, 2, 0, $02, 0
+ dsprite 0, 0, 3, 0, $03, 0
.OAMData_CutTree2:
db 4
@@ -588,159 +586,159 @@ SpriteAnimOAMData: ; 8d94d
dsprite 0, 0, -2, 0, $02, PAL_OW_TREE
dsprite 0, 0, 1, 0, $03, PAL_OW_TREE
-.OAMData_56:
+.OAMData_GSIntroHoOh1:
db 19
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -3, 0, -2, 0, $06, $00
- dsprite -1, 0, -2, 0, $08, $00
- dsprite 1, 0, -2, 0, $0a, $00
- dsprite -3, 0, -1, 0, $0c, $00
- dsprite -1, 0, -1, 0, $0e, $00
- dsprite 1, 0, -1, 0, $10, $00
- dsprite -3, 0, 0, 0, $12, $00
- dsprite -1, 0, 0, 0, $14, $00
- dsprite 1, 0, 0, 0, $16, $00
- dsprite -3, 0, 1, 0, $18, $00
- dsprite -1, 0, 1, 0, $1a, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_57:
+ dsprite -1, 0, -4, 0, $00, 0
+ dsprite -2, 0, -3, 0, $02, 0
+ dsprite 0, 0, -3, 0, $04, 0
+ dsprite -3, 0, -2, 0, $06, 0
+ dsprite -1, 0, -2, 0, $08, 0
+ dsprite 1, 0, -2, 0, $0a, 0
+ dsprite -3, 0, -1, 0, $0c, 0
+ dsprite -1, 0, -1, 0, $0e, 0
+ dsprite 1, 0, -1, 0, $10, 0
+ dsprite -3, 0, 0, 0, $12, 0
+ dsprite -1, 0, 0, 0, $14, 0
+ dsprite 1, 0, 0, 0, $16, 0
+ dsprite -3, 0, 1, 0, $18, 0
+ dsprite -1, 0, 1, 0, $1a, 0
+ dsprite 1, 0, 1, 0, $1c, 0
+ dsprite -1, 0, 2, 0, $1e, 0
+ dsprite 1, 0, 2, 0, $20, 0
+ dsprite -2, 0, 3, 0, $22, 0
+ dsprite 0, 0, 3, 0, $24, 0
+
+.OAMData_GSIntroHoOh2:
db 16
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -1, 0, -2, 0, $26, $00
- dsprite 1, 0, -2, 0, $0a, $00
- dsprite -3, 0, -1, 0, $28, $00
- dsprite -1, 0, -1, 0, $2a, $00
- dsprite 1, 0, -1, 0, $10, $00
- dsprite -1, 0, 0, 0, $2c, $00
- dsprite 1, 0, 0, 0, $16, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_58:
+ dsprite -1, 0, -4, 0, $00, 0
+ dsprite -2, 0, -3, 0, $02, 0
+ dsprite 0, 0, -3, 0, $04, 0
+ dsprite -1, 0, -2, 0, $26, 0
+ dsprite 1, 0, -2, 0, $0a, 0
+ dsprite -3, 0, -1, 0, $28, 0
+ dsprite -1, 0, -1, 0, $2a, 0
+ dsprite 1, 0, -1, 0, $10, 0
+ dsprite -1, 0, 0, 0, $2c, 0
+ dsprite 1, 0, 0, 0, $16, 0
+ dsprite -1, 0, 1, 0, $30, 0
+ dsprite 1, 0, 1, 0, $1c, 0
+ dsprite -1, 0, 2, 0, $1e, 0
+ dsprite 1, 0, 2, 0, $20, 0
+ dsprite -2, 0, 3, 0, $22, 0
+ dsprite 0, 0, 3, 0, $24, 0
+
+.OAMData_GSIntroHoOh3:
db 15
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $32, $00
- dsprite -1, 0, -2, 0, $34, $00
- dsprite 1, 0, -2, 0, $36, $00
- dsprite -1, 0, -1, 0, $38, $00
- dsprite 1, 0, -1, 0, $3a, $00
- dsprite -1, 0, 0, 0, $3c, $00
- dsprite 1, 0, 0, 0, $3e, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_59:
+ dsprite -1, 0, -4, 0, $00, 0
+ dsprite -2, 0, -3, 0, $02, 0
+ dsprite 0, 0, -3, 0, $32, 0
+ dsprite -1, 0, -2, 0, $34, 0
+ dsprite 1, 0, -2, 0, $36, 0
+ dsprite -1, 0, -1, 0, $38, 0
+ dsprite 1, 0, -1, 0, $3a, 0
+ dsprite -1, 0, 0, 0, $3c, 0
+ dsprite 1, 0, 0, 0, $3e, 0
+ dsprite -1, 0, 1, 0, $30, 0
+ dsprite 1, 0, 1, 0, $1c, 0
+ dsprite -1, 0, 2, 0, $1e, 0
+ dsprite 1, 0, 2, 0, $20, 0
+ dsprite -2, 0, 3, 0, $22, 0
+ dsprite 0, 0, 3, 0, $24, 0
+
+.OAMData_GSIntroHoOh4:
db 17
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -1, 0, -2, 0, $40, $00
- dsprite 1, 0, -2, 0, $42, $00
- dsprite 3, 0, -2, 0, $44, $00
- dsprite -1, 0, -1, 0, $46, $00
- dsprite 1, 0, -1, 0, $48, $00
- dsprite 3, 0, -1, 0, $4a, $00
- dsprite -1, 0, 0, 0, $4c, $00
- dsprite 1, 0, 0, 0, $4e, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_5a:
+ dsprite -1, 0, -4, 0, $00, 0
+ dsprite -2, 0, -3, 0, $02, 0
+ dsprite 0, 0, -3, 0, $04, 0
+ dsprite -1, 0, -2, 0, $40, 0
+ dsprite 1, 0, -2, 0, $42, 0
+ dsprite 3, 0, -2, 0, $44, 0
+ dsprite -1, 0, -1, 0, $46, 0
+ dsprite 1, 0, -1, 0, $48, 0
+ dsprite 3, 0, -1, 0, $4a, 0
+ dsprite -1, 0, 0, 0, $4c, 0
+ dsprite 1, 0, 0, 0, $4e, 0
+ dsprite -1, 0, 1, 0, $30, 0
+ dsprite 1, 0, 1, 0, $1c, 0
+ dsprite -1, 0, 2, 0, $1e, 0
+ dsprite 1, 0, 2, 0, $20, 0
+ dsprite -2, 0, 3, 0, $22, 0
+ dsprite 0, 0, 3, 0, $24, 0
+
+.OAMData_GSIntroHoOh5:
db 17
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -1, 0, -2, 0, $50, $00
- dsprite 1, 0, -2, 0, $0a, $00
- dsprite -3, 0, -1, 0, $52, $00
- dsprite -1, 0, -1, 0, $54, $00
- dsprite 1, 0, -1, 0, $10, $00
- dsprite -3, 0, 0, 0, $56, $00
- dsprite -1, 0, 0, 0, $2e, $00
- dsprite 1, 0, 0, 0, $16, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
+ dsprite -1, 0, -4, 0, $00, 0
+ dsprite -2, 0, -3, 0, $02, 0
+ dsprite 0, 0, -3, 0, $04, 0
+ dsprite -1, 0, -2, 0, $50, 0
+ dsprite 1, 0, -2, 0, $0a, 0
+ dsprite -3, 0, -1, 0, $52, 0
+ dsprite -1, 0, -1, 0, $54, 0
+ dsprite 1, 0, -1, 0, $10, 0
+ dsprite -3, 0, 0, 0, $56, 0
+ dsprite -1, 0, 0, 0, $2e, 0
+ dsprite 1, 0, 0, 0, $16, 0
+ dsprite -1, 0, 1, 0, $30, 0
+ dsprite 1, 0, 1, 0, $1c, 0
+ dsprite -1, 0, 2, 0, $1e, 0
+ dsprite 1, 0, 2, 0, $20, 0
+ dsprite -2, 0, 3, 0, $22, 0
+ dsprite 0, 0, 3, 0, $24, 0
.OAMData_GSTitleTrail:
db 1
dsprite -1, 4, -1, 4, $00, 1 | OBP_NUM
-.OAMData_5c:
+.OAMData_EZChatCursor1:
db 12
- dsprite 0, 0, 0, 0, $30, $00
- dsprite 0, 0, 1, 0, $31, $00
- dsprite 0, 0, 2, 0, $31, $00
- dsprite 0, 0, 3, 0, $31, $00
- dsprite 0, 0, 4, 0, $31, $00
- dsprite 0, 0, 5, 0, $32, $00
- dsprite 1, 0, 0, 0, $33, $00
- dsprite 1, 0, 1, 0, $34, $00
- dsprite 1, 0, 2, 0, $34, $00
- dsprite 1, 0, 3, 0, $34, $00
- dsprite 1, 0, 4, 0, $34, $00
- dsprite 1, 0, 5, 0, $35, $00
-
-.OAMData_5d:
+ dsprite 0, 0, 0, 0, $30, 0
+ dsprite 0, 0, 1, 0, $31, 0
+ dsprite 0, 0, 2, 0, $31, 0
+ dsprite 0, 0, 3, 0, $31, 0
+ dsprite 0, 0, 4, 0, $31, 0
+ dsprite 0, 0, 5, 0, $32, 0
+ dsprite 1, 0, 0, 0, $33, 0
+ dsprite 1, 0, 1, 0, $34, 0
+ dsprite 1, 0, 2, 0, $34, 0
+ dsprite 1, 0, 3, 0, $34, 0
+ dsprite 1, 0, 4, 0, $34, 0
+ dsprite 1, 0, 5, 0, $35, 0
+
+.OAMData_EZChatCursor2:
db 1
- dsprite 0, 0, 0, 0, $ed, $00
+ dsprite 0, 0, 0, 0, $ed, 0
-.OAMData_5e:
+.OAMData_EZChatCursor3:
db 4
- dsprite -1, 7, -1, 7, $30, $00
- dsprite -1, 7, 0, 1, $32, $00
- dsprite 0, 1, -1, 7, $33, $00
- dsprite 0, 1, 0, 1, $35, $00
+ dsprite -1, 7, -1, 7, $30, 0
+ dsprite -1, 7, 0, 1, $32, 0
+ dsprite 0, 1, -1, 7, $33, 0
+ dsprite 0, 1, 0, 1, $35, 0
-.OAMData_5f:
+.OAMData_EZChatCursor4:
db 8
- dsprite -1, 7, -1, 7, $30, $00
- dsprite -1, 7, 0, 4, $31, $00
- dsprite -1, 7, 1, 4, $31, $00
- dsprite -1, 7, 2, 1, $32, $00
- dsprite 0, 1, -1, 7, $33, $00
- dsprite 0, 1, 0, 4, $34, $00
- dsprite 0, 1, 1, 4, $34, $00
- dsprite 0, 1, 2, 1, $35, $00
-
-.OAMData_60:
+ dsprite -1, 7, -1, 7, $30, 0
+ dsprite -1, 7, 0, 4, $31, 0
+ dsprite -1, 7, 1, 4, $31, 0
+ dsprite -1, 7, 2, 1, $32, 0
+ dsprite 0, 1, -1, 7, $33, 0
+ dsprite 0, 1, 0, 4, $34, 0
+ dsprite 0, 1, 1, 4, $34, 0
+ dsprite 0, 1, 2, 1, $35, 0
+
+.OAMData_EZChatCursor5:
db 1
- dsprite 0, 0, 0, 0, $34, $00
+ dsprite 0, 0, 0, 0, $34, 0
-.OAMData_61:
+.OAMData_EZChatCursor6:
db 2
- dsprite 0, 0, 0, 0, $30, $00
- dsprite 1, 0, 0, 0, $33, $00
+ dsprite 0, 0, 0, 0, $30, 0
+ dsprite 1, 0, 0, 0, $33, 0
-.OAMData_62:
+.OAMData_EZChatCursor7:
db 2
- dsprite 0, 0, 0, 0, $32, $00
- dsprite 1, 0, 0, 0, $35, $00
+ dsprite 0, 0, 0, 0, $32, 0
+ dsprite 1, 0, 0, 0, $35, 0
.OAMData_BlueWalk:
db 4
@@ -751,37 +749,37 @@ SpriteAnimOAMData: ; 8d94d
.OAMData_MagnetTrainBlue:
db 4
- dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE | BEHIND_BG
- dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE | BEHIND_BG
- dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE | BEHIND_BG
- dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE | BEHIND_BG
+ dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE | PRIORITY
+ dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE | PRIORITY
+ dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE | PRIORITY
+ dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE | PRIORITY
-.OAMData_ForMobile22:
+.OAMData_MobileTradeCableBulge:
db 1
dsprite -1, 4, -1, 4, $00, 2
-.OAMData_ForMobile23:
+.OAMData_MobileTradeSentPulse:
db 4
dsprite -2, 0, -1, 4, $00, 3
dsprite -1, 0, -1, 4, $01, 3
dsprite 0, 0, -1, 4, $02, 3
dsprite 1, 0, -1, 4, $03, 3
-.OAMData_ForMobile24:
+.OAMData_MobileTradeOTPulse:
db 4
dsprite -2, 0, -1, 4, $03, 4 | Y_FLIP
dsprite -1, 0, -1, 4, $02, 4 | Y_FLIP
dsprite 0, 0, -1, 4, $01, 4 | Y_FLIP
dsprite 1, 0, -1, 4, $00, 4 | Y_FLIP
-.OAMData_ForMobile25_1:
+.OAMData_MobileTradePing1:
db 4
dsprite -1, 0, -1, 0, $00, 1
dsprite -1, 0, 0, 0, $00, 1 | X_FLIP
dsprite 0, 0, -1, 0, $00, 1 | Y_FLIP
dsprite 0, 0, 0, 0, $00, 1 | X_FLIP | Y_FLIP
-.OAMData_ForMobile25_2:
+.OAMData_MobileTradePing2:
db 8
dsprite -2, 4, -2, 4, $00, 1
dsprite -2, 4, -1, 4, $01, 1
@@ -792,7 +790,7 @@ SpriteAnimOAMData: ; 8d94d
dsprite 0, 4, -1, 4, $01, 1 | Y_FLIP
dsprite 0, 4, 0, 4, $00, 1 | X_FLIP | Y_FLIP
-.OAMData_ForMobile25_3:
+.OAMData_MobileTradePing3:
db 12
dsprite -2, 0, -2, 0, $00, 1
dsprite -2, 0, -1, 0, $01, 1
@@ -993,23 +991,23 @@ SpriteAnimOAMData: ; 8d94d
.OAMData_IntroUnown1:
db 1
- dsprite -1, 4, -1, 4, $00, $00
+ dsprite -1, 4, -1, 4, $00, 0
.OAMData_IntroUnown2:
db 3
- dsprite 0, 0, -1, 0, $00, $00
- dsprite -1, 0, -1, 0, $01, $00
- dsprite -1, 0, 0, 0, $02, $00
+ dsprite 0, 0, -1, 0, $00, 0
+ dsprite -1, 0, -1, 0, $01, 0
+ dsprite -1, 0, 0, 0, $02, 0
.OAMData_IntroUnown3:
db 7
- dsprite 1, 0, -2, 0, $00, $00
- dsprite 0, 0, -2, 0, $01, $00
- dsprite -1, 0, -2, 0, $02, $00
- dsprite -1, 0, -1, 0, $03, $00
- dsprite -2, 0, -1, 0, $04, $00
- dsprite -2, 0, 0, 0, $05, $00
- dsprite -2, 0, 1, 0, $06, $00
+ dsprite 1, 0, -2, 0, $00, 0
+ dsprite 0, 0, -2, 0, $01, 0
+ dsprite -1, 0, -2, 0, $02, 0
+ dsprite -1, 0, -1, 0, $03, 0
+ dsprite -2, 0, -1, 0, $04, 0
+ dsprite -2, 0, 0, 0, $05, 0
+ dsprite -2, 0, 1, 0, $06, 0
.OAMData_IntroUnownF2_2:
db 8
@@ -1062,26 +1060,26 @@ SpriteAnimOAMData: ; 8d94d
.OAMData_IntroSuicuneAway:
db 20
- dsprite 0, 0, 1, 0, $00, 1 | BEHIND_BG
- dsprite 1, 0, 2, 0, $00, 1 | BEHIND_BG
- dsprite 2, 0, 3, 0, $00, 1 | BEHIND_BG
- dsprite 3, 0, 4, 0, $00, 1 | BEHIND_BG
- dsprite 4, 0, 5, 0, $00, 1 | BEHIND_BG
- dsprite 3, 0, 6, 0, $00, 1 | BEHIND_BG
- dsprite 2, 0, 7, 0, $00, 1 | BEHIND_BG
- dsprite 1, 0, 8, 0, $00, 1 | BEHIND_BG
- dsprite 0, 0, 9, 0, $00, 1 | BEHIND_BG
- dsprite 1, 0, 10, 0, $00, 1 | BEHIND_BG
- dsprite 2, 0, 11, 0, $00, 1 | BEHIND_BG
- dsprite 3, 0, 12, 0, $00, 1 | BEHIND_BG
- dsprite 4, 0, 13, 0, $00, 1 | BEHIND_BG
- dsprite 3, 0, 14, 0, $00, 1 | BEHIND_BG
- dsprite 2, 0, 15, 0, $00, 1 | BEHIND_BG
- dsprite 1, 0, 16, 0, $00, 1 | BEHIND_BG
- dsprite 0, 0, -15, 0, $00, 1 | BEHIND_BG
- dsprite 1, 0, -14, 0, $00, 1 | BEHIND_BG
- dsprite 2, 0, -13, 0, $00, 1 | BEHIND_BG
- dsprite 3, 0, -12, 0, $00, 1 | BEHIND_BG
+ dsprite 0, 0, 1, 0, $00, 1 | PRIORITY
+ dsprite 1, 0, 2, 0, $00, 1 | PRIORITY
+ dsprite 2, 0, 3, 0, $00, 1 | PRIORITY
+ dsprite 3, 0, 4, 0, $00, 1 | PRIORITY
+ dsprite 4, 0, 5, 0, $00, 1 | PRIORITY
+ dsprite 3, 0, 6, 0, $00, 1 | PRIORITY
+ dsprite 2, 0, 7, 0, $00, 1 | PRIORITY
+ dsprite 1, 0, 8, 0, $00, 1 | PRIORITY
+ dsprite 0, 0, 9, 0, $00, 1 | PRIORITY
+ dsprite 1, 0, 10, 0, $00, 1 | PRIORITY
+ dsprite 2, 0, 11, 0, $00, 1 | PRIORITY
+ dsprite 3, 0, 12, 0, $00, 1 | PRIORITY
+ dsprite 4, 0, 13, 0, $00, 1 | PRIORITY
+ dsprite 3, 0, 14, 0, $00, 1 | PRIORITY
+ dsprite 2, 0, 15, 0, $00, 1 | PRIORITY
+ dsprite 1, 0, 16, 0, $00, 1 | PRIORITY
+ dsprite 0, 0, -15, 0, $00, 1 | PRIORITY
+ dsprite 1, 0, -14, 0, $00, 1 | PRIORITY
+ dsprite 2, 0, -13, 0, $00, 1 | PRIORITY
+ dsprite 3, 0, -12, 0, $00, 1 | PRIORITY
.OAMData_Celebi:
db 4
diff --git a/data/sprite_anims/sequences.asm b/data/sprite_anims/sequences.asm
index 70544a60a..36a0f4afc 100644
--- a/data/sprite_anims/sequences.asm
+++ b/data/sprite_anims/sequences.asm
@@ -1,49 +1,49 @@
SpriteAnimSeqData: ; 8d1c4
; entries correspond to SPRITE_ANIM_INDEX_* constants
; frameset sequence, tile
- db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, $00 ; SPRITE_ANIM_INDEX_PARTY_MON
- db SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL, SPRITE_ANIM_SEQ_GS_TITLE_TRAIL, $00 ; SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
- db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR, $05 ; SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
- db SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO, SPRITE_ANIM_SEQ_GAMEFREAK_LOGO, $00 ; SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
- db SPRITE_ANIM_FRAMESET_GS_INTRO_STAR, SPRITE_ANIM_SEQ_GS_INTRO_STAR, $06 ; SPRITE_ANIM_INDEX_GS_INTRO_STAR
- db SPRITE_ANIM_FRAMESET_GS_INTRO_SPARKLE, SPRITE_ANIM_SEQ_GS_INTRO_SPARKLE, $06 ; SPRITE_ANIM_INDEX_GS_INTRO_SPARKLE
- db SPRITE_ANIM_FRAMESET_SLOTS_GOLEM, SPRITE_ANIM_SEQ_SLOTS_GOLEM, $07 ; SPRITE_ANIM_INDEX_SLOTS_GOLEM
- db SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY, SPRITE_ANIM_SEQ_SLOTS_CHANSEY, $07 ; SPRITE_ANIM_INDEX_SLOTS_CHANSEY
- db SPRITE_ANIM_FRAMESET_SLOTS_EGG, SPRITE_ANIM_SEQ_SLOTS_EGG, $07 ; SPRITE_ANIM_INDEX_SLOTS_EGG
- db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_MAIL_CURSOR, $05 ; SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
- db SPRITE_ANIM_FRAMESET_RED_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_RED_WALK
- db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_FOR_UNUSED_CURSOR, $08 ; SPRITE_ANIM_INDEX_UNUSED_CURSOR
- db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR, $08 ; SPRITE_ANIM_INDEX_DUMMY_GAME
- db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_POKEGEAR_ARROW, $08 ; SPRITE_ANIM_INDEX_POKEGEAR_ARROW
- db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_TRADE_POKE_BALL, $00 ; SPRITE_ANIM_INDEX_TRADE_POKE_BALL
- db SPRITE_ANIM_FRAMESET_TRADE_POOF, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_TRADE_POOF
- db SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE, SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE, $00 ; SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE
- db SPRITE_ANIM_FRAMESET_TRADEMON_ICON, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; SPRITE_ANIM_INDEX_TRADEMON_ICON
- db SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; SPRITE_ANIM_INDEX_TRADEMON_BUBBLE
- db SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, $00 ; SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT
- db SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB, SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB, $00 ; SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB
- db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED
- db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_CUT_LEAVES, $00 ; SPRITE_ANIM_INDEX_LEAF
- db SPRITE_ANIM_FRAMESET_CUT_TREE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CUT_TREE
- db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_FLY_LEAF, $00 ; SPRITE_ANIM_INDEX_FLY_LEAF
- db SPRITE_ANIM_FRAMESET_EGG_CRACK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_EGG_CRACK
- db SPRITE_ANIM_FRAMESET_24, SPRITE_ANIM_SEQ_19, $00 ; SPRITE_ANIM_INDEX_1A
- db SPRITE_ANIM_FRAMESET_HEADBUTT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_HEADBUTT
- db SPRITE_ANIM_FRAMESET_EGG_HATCH, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, $00 ; SPRITE_ANIM_INDEX_EGG_HATCH
- db SPRITE_ANIM_FRAMESET_26, SPRITE_ANIM_SEQ_1A, $00 ; SPRITE_ANIM_INDEX_1D
- db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_BLUE_WALK
- db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE
- db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
- db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
- db SPRITE_ANIM_FRAMESET_FOR_MOBILE_22, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_22
- db SPRITE_ANIM_FRAMESET_FOR_MOBILE_23, SPRITE_ANIM_SEQ_FOR_MOBILE_23, $00 ; SPRITE_ANIM_INDEX_MOBILE_23
- db SPRITE_ANIM_FRAMESET_FOR_MOBILE_24, SPRITE_ANIM_SEQ_FOR_MOBILE_24, $00 ; SPRITE_ANIM_INDEX_MOBILE_24
- db SPRITE_ANIM_FRAMESET_FOR_MOBILE_25, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_25
- db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_INTRO_SUICUNE, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE
- db SPRITE_ANIM_FRAMESET_INTRO_PICHU, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, $00 ; SPRITE_ANIM_INDEX_INTRO_PICHU
- db SPRITE_ANIM_FRAMESET_INTRO_WOOPER, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, $00 ; SPRITE_ANIM_INDEX_INTRO_WOOPER
- db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1, SPRITE_ANIM_SEQ_INTRO_UNOWN, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN
- db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F, SPRITE_ANIM_SEQ_INTRO_UNOWN_F, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN_F
- db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY
- db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CELEBI
+ db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, $00 ; SPRITE_ANIM_INDEX_PARTY_MON
+ db SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL, SPRITE_ANIM_SEQ_GS_TITLE_TRAIL, $00 ; SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
+ db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR, $05 ; SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
+ db SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO, SPRITE_ANIM_SEQ_GAMEFREAK_LOGO, $00 ; SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
+ db SPRITE_ANIM_FRAMESET_GS_INTRO_STAR, SPRITE_ANIM_SEQ_GS_INTRO_STAR, $06 ; SPRITE_ANIM_INDEX_GS_INTRO_STAR
+ db SPRITE_ANIM_FRAMESET_GS_INTRO_SPARKLE, SPRITE_ANIM_SEQ_GS_INTRO_SPARKLE, $06 ; SPRITE_ANIM_INDEX_GS_INTRO_SPARKLE
+ db SPRITE_ANIM_FRAMESET_SLOTS_GOLEM, SPRITE_ANIM_SEQ_SLOTS_GOLEM, $07 ; SPRITE_ANIM_INDEX_SLOTS_GOLEM
+ db SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY, SPRITE_ANIM_SEQ_SLOTS_CHANSEY, $07 ; SPRITE_ANIM_INDEX_SLOTS_CHANSEY
+ db SPRITE_ANIM_FRAMESET_SLOTS_EGG, SPRITE_ANIM_SEQ_SLOTS_EGG, $07 ; SPRITE_ANIM_INDEX_SLOTS_EGG
+ db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_MAIL_CURSOR, $05 ; SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
+ db SPRITE_ANIM_FRAMESET_RED_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_RED_WALK
+ db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_UNUSED_CURSOR, $08 ; SPRITE_ANIM_INDEX_UNUSED_CURSOR
+ db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR, $08 ; SPRITE_ANIM_INDEX_DUMMY_GAME
+ db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_POKEGEAR_ARROW, $08 ; SPRITE_ANIM_INDEX_POKEGEAR_ARROW
+ db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_TRADE_POKE_BALL, $00 ; SPRITE_ANIM_INDEX_TRADE_POKE_BALL
+ db SPRITE_ANIM_FRAMESET_TRADE_POOF, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_TRADE_POOF
+ db SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE, SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE, $00 ; SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE
+ db SPRITE_ANIM_FRAMESET_TRADEMON_ICON, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; SPRITE_ANIM_INDEX_TRADEMON_ICON
+ db SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; SPRITE_ANIM_INDEX_TRADEMON_BUBBLE
+ db SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, $00 ; SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT
+ db SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB, SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB, $00 ; SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB
+ db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED
+ db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_CUT_LEAVES, $00 ; SPRITE_ANIM_INDEX_LEAF
+ db SPRITE_ANIM_FRAMESET_CUT_TREE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CUT_TREE
+ db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_FLY_LEAF, $00 ; SPRITE_ANIM_INDEX_FLY_LEAF
+ db SPRITE_ANIM_FRAMESET_EGG_CRACK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_EGG_CRACK
+ db SPRITE_ANIM_FRAMESET_GS_INTRO_HO_OH, SPRITE_ANIM_SEQ_GS_INTRO_HO_OH, $00 ; SPRITE_ANIM_INDEX_GS_INTRO_HO_OH
+ db SPRITE_ANIM_FRAMESET_HEADBUTT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_HEADBUTT
+ db SPRITE_ANIM_FRAMESET_EGG_HATCH_1, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, $00 ; SPRITE_ANIM_INDEX_EGG_HATCH
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1, SPRITE_ANIM_SEQ_EZCHAT_CURSOR, $00 ; SPRITE_ANIM_INDEX_EZCHAT_CURSOR
+ db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_BLUE_WALK
+ db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_CABLE_BULGE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_PULSE, SPRITE_ANIM_SEQ_MOBILE_TRADE_SENT_PULSE, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_PULSE, SPRITE_ANIM_SEQ_MOBILE_TRADE_OT_PULSE, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_PING, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_PING
+ db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_INTRO_SUICUNE, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE
+ db SPRITE_ANIM_FRAMESET_INTRO_PICHU, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, $00 ; SPRITE_ANIM_INDEX_INTRO_PICHU
+ db SPRITE_ANIM_FRAMESET_INTRO_WOOPER, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, $00 ; SPRITE_ANIM_INDEX_INTRO_WOOPER
+ db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1, SPRITE_ANIM_SEQ_INTRO_UNOWN, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN
+ db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F, SPRITE_ANIM_SEQ_INTRO_UNOWN_F, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN_F
+ db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY
+ db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CELEBI
; 8d24b
diff --git a/data/emotes.asm b/data/sprites/emotes.asm
index 2e25e52b5..2e25e52b5 100644
--- a/data/emotes.asm
+++ b/data/sprites/emotes.asm
diff --git a/data/facings.asm b/data/sprites/facings.asm
index 4d2a55364..4d2a55364 100644
--- a/data/facings.asm
+++ b/data/sprites/facings.asm
diff --git a/data/map_objects.asm b/data/sprites/map_objects.asm
index 19a7c8d27..19a7c8d27 100755
--- a/data/map_objects.asm
+++ b/data/sprites/map_objects.asm
diff --git a/data/sprite_mons.asm b/data/sprites/sprite_mons.asm
index d3000e2b7..d3000e2b7 100644
--- a/data/sprite_mons.asm
+++ b/data/sprites/sprite_mons.asm
diff --git a/data/sprites.asm b/data/sprites/sprites.asm
index 214b14757..214b14757 100644
--- a/data/sprites.asm
+++ b/data/sprites/sprites.asm
diff --git a/text/stdtext.asm b/data/std_text.asm
index 7b558cc49..7b558cc49 100644
--- a/text/stdtext.asm
+++ b/data/std_text.asm
diff --git a/tilesets/tilesets.asm b/data/tilesets.asm
index 06cbdb05d..e7f68d894 100644
--- a/tilesets/tilesets.asm
+++ b/data/tilesets.asm
@@ -5,6 +5,11 @@ tileset: MACRO
dw \1PalMap
ENDM
+; Associated data:
+; - The *GFX, *Meta, and *Coll are defined in gfx/tilesets.asm
+; - The *Anim are defined in engine/tileset_anims.asm
+; - The *PalMap are defined in gfx/tilesets/palette_maps.asm
+
Tilesets:: ; 4d596
; entries correspond to TILESET_* constants
tileset Tileset0
diff --git a/tilesets/aerodactyl_word_room_collision.asm b/data/tilesets/aerodactyl_word_room_collision.asm
index 138f07143..138f07143 100644
--- a/tilesets/aerodactyl_word_room_collision.asm
+++ b/data/tilesets/aerodactyl_word_room_collision.asm
diff --git a/tilesets/aerodactyl_word_room_metatiles.bin b/data/tilesets/aerodactyl_word_room_metatiles.bin
index 0538baa98..0538baa98 100644
--- a/tilesets/aerodactyl_word_room_metatiles.bin
+++ b/data/tilesets/aerodactyl_word_room_metatiles.bin
diff --git a/tilesets/battle_tower_collision.asm b/data/tilesets/battle_tower_collision.asm
index 908fee326..908fee326 100644
--- a/tilesets/battle_tower_collision.asm
+++ b/data/tilesets/battle_tower_collision.asm
diff --git a/tilesets/battle_tower_metatiles.bin b/data/tilesets/battle_tower_metatiles.bin
index c64ef0a12..c64ef0a12 100644
--- a/tilesets/battle_tower_metatiles.bin
+++ b/data/tilesets/battle_tower_metatiles.bin
Binary files differ
diff --git a/tilesets/battle_tower_outside_collision.asm b/data/tilesets/battle_tower_outside_collision.asm
index 3aaa60113..3aaa60113 100644
--- a/tilesets/battle_tower_outside_collision.asm
+++ b/data/tilesets/battle_tower_outside_collision.asm
diff --git a/tilesets/battle_tower_outside_metatiles.bin b/data/tilesets/battle_tower_outside_metatiles.bin
index c4390bcba..c4390bcba 100644
--- a/tilesets/battle_tower_outside_metatiles.bin
+++ b/data/tilesets/battle_tower_outside_metatiles.bin
Binary files differ
diff --git a/tilesets/beta_word_room_collision.asm b/data/tilesets/beta_word_room_collision.asm
index 138f07143..138f07143 100644
--- a/tilesets/beta_word_room_collision.asm
+++ b/data/tilesets/beta_word_room_collision.asm
diff --git a/tilesets/beta_word_room_metatiles.bin b/data/tilesets/beta_word_room_metatiles.bin
index 47c531b2e..47c531b2e 100644
--- a/tilesets/beta_word_room_metatiles.bin
+++ b/data/tilesets/beta_word_room_metatiles.bin
diff --git a/tilesets/cave_collision.asm b/data/tilesets/cave_collision.asm
index 3d5e0ae05..3d5e0ae05 100644
--- a/tilesets/cave_collision.asm
+++ b/data/tilesets/cave_collision.asm
diff --git a/tilesets/cave_metatiles.bin b/data/tilesets/cave_metatiles.bin
index a41b5b080..a41b5b080 100644
--- a/tilesets/cave_metatiles.bin
+++ b/data/tilesets/cave_metatiles.bin
diff --git a/tilesets/celadon_mansion_collision.asm b/data/tilesets/celadon_mansion_collision.asm
index 5db409be7..5db409be7 100644
--- a/tilesets/celadon_mansion_collision.asm
+++ b/data/tilesets/celadon_mansion_collision.asm
diff --git a/tilesets/celadon_mansion_metatiles.bin b/data/tilesets/celadon_mansion_metatiles.bin
index d4506328f..d4506328f 100644
--- a/tilesets/celadon_mansion_metatiles.bin
+++ b/data/tilesets/celadon_mansion_metatiles.bin
diff --git a/tilesets/game_corner_collision.asm b/data/tilesets/game_corner_collision.asm
index 65b99cf54..65b99cf54 100644
--- a/tilesets/game_corner_collision.asm
+++ b/data/tilesets/game_corner_collision.asm
diff --git a/tilesets/game_corner_metatiles.bin b/data/tilesets/game_corner_metatiles.bin
index 24beba2d3..24beba2d3 100644
--- a/tilesets/game_corner_metatiles.bin
+++ b/data/tilesets/game_corner_metatiles.bin
Binary files differ
diff --git a/tilesets/gate_collision.asm b/data/tilesets/gate_collision.asm
index 54cd95d34..54cd95d34 100644
--- a/tilesets/gate_collision.asm
+++ b/data/tilesets/gate_collision.asm
diff --git a/tilesets/gate_metatiles.bin b/data/tilesets/gate_metatiles.bin
index 74076ff58..74076ff58 100644
--- a/tilesets/gate_metatiles.bin
+++ b/data/tilesets/gate_metatiles.bin
Binary files differ
diff --git a/tilesets/gym_1_collision.asm b/data/tilesets/gym_1_collision.asm
index cc0b705f3..cc0b705f3 100644
--- a/tilesets/gym_1_collision.asm
+++ b/data/tilesets/gym_1_collision.asm
diff --git a/tilesets/gym_1_metatiles.bin b/data/tilesets/gym_1_metatiles.bin
index a9df6062c..a9df6062c 100644
--- a/tilesets/gym_1_metatiles.bin
+++ b/data/tilesets/gym_1_metatiles.bin
Binary files differ
diff --git a/tilesets/ho_oh_word_room_collision.asm b/data/tilesets/ho_oh_word_room_collision.asm
index 138f07143..138f07143 100644
--- a/tilesets/ho_oh_word_room_collision.asm
+++ b/data/tilesets/ho_oh_word_room_collision.asm
diff --git a/tilesets/ho_oh_word_room_metatiles.bin b/data/tilesets/ho_oh_word_room_metatiles.bin
index 2b542c632..2b542c632 100644
--- a/tilesets/ho_oh_word_room_metatiles.bin
+++ b/data/tilesets/ho_oh_word_room_metatiles.bin
diff --git a/tilesets/house_1_collision.asm b/data/tilesets/house_1_collision.asm
index ae5580782..ae5580782 100644
--- a/tilesets/house_1_collision.asm
+++ b/data/tilesets/house_1_collision.asm
diff --git a/tilesets/house_1_metatiles.bin b/data/tilesets/house_1_metatiles.bin
index 0d3a22f32..0d3a22f32 100644
--- a/tilesets/house_1_metatiles.bin
+++ b/data/tilesets/house_1_metatiles.bin
Binary files differ
diff --git a/tilesets/ice_path_collision.asm b/data/tilesets/ice_path_collision.asm
index 4fd9376ad..4fd9376ad 100644
--- a/tilesets/ice_path_collision.asm
+++ b/data/tilesets/ice_path_collision.asm
diff --git a/tilesets/ice_path_metatiles.bin b/data/tilesets/ice_path_metatiles.bin
index c92246e8a..c92246e8a 100644
--- a/tilesets/ice_path_metatiles.bin
+++ b/data/tilesets/ice_path_metatiles.bin
diff --git a/tilesets/ilex_forest_collision.asm b/data/tilesets/ilex_forest_collision.asm
index 70cc72ff1..70cc72ff1 100644
--- a/tilesets/ilex_forest_collision.asm
+++ b/data/tilesets/ilex_forest_collision.asm
diff --git a/tilesets/ilex_forest_metatiles.bin b/data/tilesets/ilex_forest_metatiles.bin
index a8b82d8cf..a8b82d8cf 100644
--- a/tilesets/ilex_forest_metatiles.bin
+++ b/data/tilesets/ilex_forest_metatiles.bin
diff --git a/tilesets/johto_1_collision.asm b/data/tilesets/johto_1_collision.asm
index 4d6d2c072..4d6d2c072 100644
--- a/tilesets/johto_1_collision.asm
+++ b/data/tilesets/johto_1_collision.asm
diff --git a/tilesets/johto_1_metatiles.bin b/data/tilesets/johto_1_metatiles.bin
index 9024f2ad6..9024f2ad6 100644
--- a/tilesets/johto_1_metatiles.bin
+++ b/data/tilesets/johto_1_metatiles.bin
Binary files differ
diff --git a/tilesets/johto_2_collision.asm b/data/tilesets/johto_2_collision.asm
index 40255d744..40255d744 100644
--- a/tilesets/johto_2_collision.asm
+++ b/data/tilesets/johto_2_collision.asm
diff --git a/tilesets/johto_2_metatiles.bin b/data/tilesets/johto_2_metatiles.bin
index a15c0c2c7..a15c0c2c7 100644
--- a/tilesets/johto_2_metatiles.bin
+++ b/data/tilesets/johto_2_metatiles.bin
Binary files differ
diff --git a/tilesets/kabuto_word_room_collision.asm b/data/tilesets/kabuto_word_room_collision.asm
index 138f07143..138f07143 100644
--- a/tilesets/kabuto_word_room_collision.asm
+++ b/data/tilesets/kabuto_word_room_collision.asm
diff --git a/tilesets/kabuto_word_room_metatiles.bin b/data/tilesets/kabuto_word_room_metatiles.bin
index 14d082e2a..14d082e2a 100644
--- a/tilesets/kabuto_word_room_metatiles.bin
+++ b/data/tilesets/kabuto_word_room_metatiles.bin
diff --git a/tilesets/kanto_collision.asm b/data/tilesets/kanto_collision.asm
index 9b0f0c275..9b0f0c275 100644
--- a/tilesets/kanto_collision.asm
+++ b/data/tilesets/kanto_collision.asm
diff --git a/tilesets/kanto_metatiles.bin b/data/tilesets/kanto_metatiles.bin
index 41b0cfffd..41b0cfffd 100644
--- a/tilesets/kanto_metatiles.bin
+++ b/data/tilesets/kanto_metatiles.bin
Binary files differ
diff --git a/tilesets/kurts_house_collision.asm b/data/tilesets/kurts_house_collision.asm
index 95cb1c21d..95cb1c21d 100644
--- a/tilesets/kurts_house_collision.asm
+++ b/data/tilesets/kurts_house_collision.asm
diff --git a/tilesets/kurts_house_metatiles.bin b/data/tilesets/kurts_house_metatiles.bin
index 3f6b41bd1..3f6b41bd1 100644
--- a/tilesets/kurts_house_metatiles.bin
+++ b/data/tilesets/kurts_house_metatiles.bin
Binary files differ
diff --git a/tilesets/lab_collision.asm b/data/tilesets/lab_collision.asm
index 436c8e0a7..436c8e0a7 100644
--- a/tilesets/lab_collision.asm
+++ b/data/tilesets/lab_collision.asm
diff --git a/tilesets/lab_metatiles.bin b/data/tilesets/lab_metatiles.bin
index 62da01e8b..62da01e8b 100644
--- a/tilesets/lab_metatiles.bin
+++ b/data/tilesets/lab_metatiles.bin
Binary files differ
diff --git a/tilesets/lighthouse_collision.asm b/data/tilesets/lighthouse_collision.asm
index 05b6cd614..05b6cd614 100644
--- a/tilesets/lighthouse_collision.asm
+++ b/data/tilesets/lighthouse_collision.asm
diff --git a/tilesets/lighthouse_metatiles.bin b/data/tilesets/lighthouse_metatiles.bin
index 21ca0f09a..21ca0f09a 100644
--- a/tilesets/lighthouse_metatiles.bin
+++ b/data/tilesets/lighthouse_metatiles.bin
Binary files differ
diff --git a/tilesets/mart_collision.asm b/data/tilesets/mart_collision.asm
index 80076ac3f..80076ac3f 100644
--- a/tilesets/mart_collision.asm
+++ b/data/tilesets/mart_collision.asm
diff --git a/tilesets/mart_metatiles.bin b/data/tilesets/mart_metatiles.bin
index 63b2f629d..63b2f629d 100644
--- a/tilesets/mart_metatiles.bin
+++ b/data/tilesets/mart_metatiles.bin
diff --git a/tilesets/olivine_gym_collision.asm b/data/tilesets/olivine_gym_collision.asm
index 351f76f61..351f76f61 100644
--- a/tilesets/olivine_gym_collision.asm
+++ b/data/tilesets/olivine_gym_collision.asm
diff --git a/tilesets/olivine_gym_metatiles.bin b/data/tilesets/olivine_gym_metatiles.bin
index a2adb197a..a2adb197a 100644
--- a/tilesets/olivine_gym_metatiles.bin
+++ b/data/tilesets/olivine_gym_metatiles.bin
diff --git a/tilesets/omanyte_word_room_collision.asm b/data/tilesets/omanyte_word_room_collision.asm
index 138f07143..138f07143 100644
--- a/tilesets/omanyte_word_room_collision.asm
+++ b/data/tilesets/omanyte_word_room_collision.asm
diff --git a/tilesets/omanyte_word_room_metatiles.bin b/data/tilesets/omanyte_word_room_metatiles.bin
index 3cc62f562..3cc62f562 100644
--- a/tilesets/omanyte_word_room_metatiles.bin
+++ b/data/tilesets/omanyte_word_room_metatiles.bin
diff --git a/tilesets/park_collision.asm b/data/tilesets/park_collision.asm
index c5965e0c9..c5965e0c9 100644
--- a/tilesets/park_collision.asm
+++ b/data/tilesets/park_collision.asm
diff --git a/tilesets/park_metatiles.bin b/data/tilesets/park_metatiles.bin
index 1fe931640..1fe931640 100644
--- a/tilesets/park_metatiles.bin
+++ b/data/tilesets/park_metatiles.bin
Binary files differ
diff --git a/tilesets/players_house_2f_collision.asm b/data/tilesets/players_house_2f_collision.asm
index 464d80b83..464d80b83 100644
--- a/tilesets/players_house_2f_collision.asm
+++ b/data/tilesets/players_house_2f_collision.asm
diff --git a/tilesets/players_house_2f_metatiles.bin b/data/tilesets/players_house_2f_metatiles.bin
index 0839798fe..0839798fe 100644
--- a/tilesets/players_house_2f_metatiles.bin
+++ b/data/tilesets/players_house_2f_metatiles.bin
Binary files differ
diff --git a/tilesets/players_house_collision.asm b/data/tilesets/players_house_collision.asm
index ed6b70a29..ed6b70a29 100644
--- a/tilesets/players_house_collision.asm
+++ b/data/tilesets/players_house_collision.asm
diff --git a/tilesets/players_house_metatiles.bin b/data/tilesets/players_house_metatiles.bin
index f316eb8c1..f316eb8c1 100644
--- a/tilesets/players_house_metatiles.bin
+++ b/data/tilesets/players_house_metatiles.bin
Binary files differ
diff --git a/tilesets/pokecenter_collision.asm b/data/tilesets/pokecenter_collision.asm
index 5b776330e..5b776330e 100644
--- a/tilesets/pokecenter_collision.asm
+++ b/data/tilesets/pokecenter_collision.asm
diff --git a/tilesets/pokecenter_metatiles.bin b/data/tilesets/pokecenter_metatiles.bin
index c96c4843b..c96c4843b 100644
--- a/tilesets/pokecenter_metatiles.bin
+++ b/data/tilesets/pokecenter_metatiles.bin
Binary files differ
diff --git a/tilesets/pokecom_center_collision.asm b/data/tilesets/pokecom_center_collision.asm
index 1ecef84de..1ecef84de 100644
--- a/tilesets/pokecom_center_collision.asm
+++ b/data/tilesets/pokecom_center_collision.asm
diff --git a/tilesets/pokecom_center_metatiles.bin b/data/tilesets/pokecom_center_metatiles.bin
index 097a882fd..097a882fd 100644
--- a/tilesets/pokecom_center_metatiles.bin
+++ b/data/tilesets/pokecom_center_metatiles.bin
diff --git a/tilesets/port_collision.asm b/data/tilesets/port_collision.asm
index fb37ee11e..fb37ee11e 100644
--- a/tilesets/port_collision.asm
+++ b/data/tilesets/port_collision.asm
diff --git a/tilesets/port_metatiles.bin b/data/tilesets/port_metatiles.bin
index 69a600707..69a600707 100644
--- a/tilesets/port_metatiles.bin
+++ b/data/tilesets/port_metatiles.bin
diff --git a/tilesets/power_plant_collision.asm b/data/tilesets/power_plant_collision.asm
index eb5cd8f33..eb5cd8f33 100644
--- a/tilesets/power_plant_collision.asm
+++ b/data/tilesets/power_plant_collision.asm
diff --git a/tilesets/power_plant_metatiles.bin b/data/tilesets/power_plant_metatiles.bin
index f6089d29c..f6089d29c 100644
--- a/tilesets/power_plant_metatiles.bin
+++ b/data/tilesets/power_plant_metatiles.bin
diff --git a/tilesets/radio_tower_collision.asm b/data/tilesets/radio_tower_collision.asm
index 1713eb438..1713eb438 100644
--- a/tilesets/radio_tower_collision.asm
+++ b/data/tilesets/radio_tower_collision.asm
diff --git a/tilesets/radio_tower_metatiles.bin b/data/tilesets/radio_tower_metatiles.bin
index 01c0b4aa5..01c0b4aa5 100644
--- a/tilesets/radio_tower_metatiles.bin
+++ b/data/tilesets/radio_tower_metatiles.bin
Binary files differ
diff --git a/tilesets/ruins_of_alph_collision.asm b/data/tilesets/ruins_of_alph_collision.asm
index 8c65340ab..8c65340ab 100644
--- a/tilesets/ruins_of_alph_collision.asm
+++ b/data/tilesets/ruins_of_alph_collision.asm
diff --git a/tilesets/ruins_of_alph_metatiles.bin b/data/tilesets/ruins_of_alph_metatiles.bin
index 61ef041b5..61ef041b5 100644
--- a/tilesets/ruins_of_alph_metatiles.bin
+++ b/data/tilesets/ruins_of_alph_metatiles.bin
Binary files differ
diff --git a/tilesets/sprout_tower_collision.asm b/data/tilesets/sprout_tower_collision.asm
index 9d02e9640..9d02e9640 100644
--- a/tilesets/sprout_tower_collision.asm
+++ b/data/tilesets/sprout_tower_collision.asm
diff --git a/tilesets/sprout_tower_metatiles.bin b/data/tilesets/sprout_tower_metatiles.bin
index b6668fcd4..b6668fcd4 100644
--- a/tilesets/sprout_tower_metatiles.bin
+++ b/data/tilesets/sprout_tower_metatiles.bin
diff --git a/tilesets/train_station_collision.asm b/data/tilesets/train_station_collision.asm
index 55b147237..55b147237 100644
--- a/tilesets/train_station_collision.asm
+++ b/data/tilesets/train_station_collision.asm
diff --git a/tilesets/train_station_metatiles.bin b/data/tilesets/train_station_metatiles.bin
index 9bbdd0bd2..9bbdd0bd2 100644
--- a/tilesets/train_station_metatiles.bin
+++ b/data/tilesets/train_station_metatiles.bin
Binary files differ
diff --git a/tilesets/underground_collision.asm b/data/tilesets/underground_collision.asm
index 0c3120451..0c3120451 100644
--- a/tilesets/underground_collision.asm
+++ b/data/tilesets/underground_collision.asm
diff --git a/tilesets/underground_metatiles.bin b/data/tilesets/underground_metatiles.bin
index 28b807e1e..28b807e1e 100644
--- a/tilesets/underground_metatiles.bin
+++ b/data/tilesets/underground_metatiles.bin
diff --git a/tilesets/unused_whirl_islands_collision.asm b/data/tilesets/unused_whirl_islands_collision.asm
index 0022d3881..0022d3881 100644
--- a/tilesets/unused_whirl_islands_collision.asm
+++ b/data/tilesets/unused_whirl_islands_collision.asm
diff --git a/tilesets/unused_whirl_islands_metatiles.bin b/data/tilesets/unused_whirl_islands_metatiles.bin
index b70f1a0e6..b70f1a0e6 100644
--- a/tilesets/unused_whirl_islands_metatiles.bin
+++ b/data/tilesets/unused_whirl_islands_metatiles.bin
Binary files differ
diff --git a/tilesets/whirl_islands_collision.asm b/data/tilesets/whirl_islands_collision.asm
index 3d5e0ae05..3d5e0ae05 100644
--- a/tilesets/whirl_islands_collision.asm
+++ b/data/tilesets/whirl_islands_collision.asm
diff --git a/tilesets/whirl_islands_metatiles.bin b/data/tilesets/whirl_islands_metatiles.bin
index a41b5b080..a41b5b080 100644
--- a/tilesets/whirl_islands_metatiles.bin
+++ b/data/tilesets/whirl_islands_metatiles.bin
diff --git a/data/trainers/encounter_music.asm b/data/trainers/encounter_music.asm
index cd0348d81..a64d160fe 100644
--- a/data/trainers/encounter_music.asm
+++ b/data/trainers/encounter_music.asm
@@ -2,74 +2,74 @@
TrainerEncounterMusic::
; entries correspond to trainer classes (see constants/trainer_constants.asm)
- db MUSIC_HIKER_ENCOUNTER ; none
- db MUSIC_YOUNGSTER_ENCOUNTER ; falkner
- db MUSIC_LASS_ENCOUNTER ; whitney
- db MUSIC_YOUNGSTER_ENCOUNTER ; bugsy
- db MUSIC_OFFICER_ENCOUNTER ; morty
- db MUSIC_OFFICER_ENCOUNTER ; pryce
- db MUSIC_LASS_ENCOUNTER ; jasmine
- db MUSIC_OFFICER_ENCOUNTER ; chuck
- db MUSIC_BEAUTY_ENCOUNTER ; clair
- db MUSIC_RIVAL_ENCOUNTER ; rival1
- db MUSIC_HIKER_ENCOUNTER ; pokemon_prof
- db MUSIC_HIKER_ENCOUNTER ; will
- db MUSIC_HIKER_ENCOUNTER ; cal
- db MUSIC_OFFICER_ENCOUNTER ; bruno
- db MUSIC_HIKER_ENCOUNTER ; karen
- db MUSIC_HIKER_ENCOUNTER ; koga
- db MUSIC_OFFICER_ENCOUNTER ; champion
- db MUSIC_YOUNGSTER_ENCOUNTER ; brock
- db MUSIC_LASS_ENCOUNTER ; misty
- db MUSIC_OFFICER_ENCOUNTER ; lt_surge
- db MUSIC_ROCKET_ENCOUNTER ; scientist
- db MUSIC_OFFICER_ENCOUNTER ; erika
- db MUSIC_YOUNGSTER_ENCOUNTER ; youngster
- db MUSIC_YOUNGSTER_ENCOUNTER ; schoolboy
- db MUSIC_YOUNGSTER_ENCOUNTER ; bird_keeper
- db MUSIC_LASS_ENCOUNTER ; lass
- db MUSIC_LASS_ENCOUNTER ; janine
- db MUSIC_HIKER_ENCOUNTER ; cooltrainerm
- db MUSIC_BEAUTY_ENCOUNTER ; cooltrainerf
- db MUSIC_BEAUTY_ENCOUNTER ; beauty
- db MUSIC_POKEMANIAC_ENCOUNTER ; pokemaniac
- db MUSIC_ROCKET_ENCOUNTER ; gruntm
- db MUSIC_HIKER_ENCOUNTER ; gentleman
- db MUSIC_BEAUTY_ENCOUNTER ; skier
- db MUSIC_BEAUTY_ENCOUNTER ; teacher
- db MUSIC_BEAUTY_ENCOUNTER ; sabrina
- db MUSIC_YOUNGSTER_ENCOUNTER ; bug_catcher
- db MUSIC_HIKER_ENCOUNTER ; fisher
- db MUSIC_HIKER_ENCOUNTER ; swimmerm
- db MUSIC_BEAUTY_ENCOUNTER ; swimmerf
- db MUSIC_HIKER_ENCOUNTER ; sailor
- db MUSIC_POKEMANIAC_ENCOUNTER ; super_nerd
- db MUSIC_RIVAL_ENCOUNTER ; rival2
- db MUSIC_HIKER_ENCOUNTER ; guitarist
- db MUSIC_HIKER_ENCOUNTER ; hiker
- db MUSIC_HIKER_ENCOUNTER ; biker
- db MUSIC_OFFICER_ENCOUNTER ; blaine
- db MUSIC_POKEMANIAC_ENCOUNTER ; burglar
- db MUSIC_HIKER_ENCOUNTER ; firebreather
- db MUSIC_POKEMANIAC_ENCOUNTER ; juggler
- db MUSIC_HIKER_ENCOUNTER ; blackbelt_t
- db MUSIC_ROCKET_ENCOUNTER ; executivem
- db MUSIC_YOUNGSTER_ENCOUNTER ; psychic_t
- db MUSIC_LASS_ENCOUNTER ; picnicker
- db MUSIC_YOUNGSTER_ENCOUNTER ; camper
- db MUSIC_ROCKET_ENCOUNTER ; executivef
- db MUSIC_SAGE_ENCOUNTER ; sage
- db MUSIC_SAGE_ENCOUNTER ; medium
- db MUSIC_HIKER_ENCOUNTER ; boarder
- db MUSIC_HIKER_ENCOUNTER ; pokefanm
- db MUSIC_KIMONO_ENCOUNTER ; kimono_girl
- db MUSIC_LASS_ENCOUNTER ; twins
- db MUSIC_BEAUTY_ENCOUNTER ; pokefanf
- db MUSIC_HIKER_ENCOUNTER ; red
- db MUSIC_RIVAL_ENCOUNTER ; blue
- db MUSIC_HIKER_ENCOUNTER ; officer
- db MUSIC_ROCKET_ENCOUNTER ; gruntf
- db MUSIC_HIKER_ENCOUNTER ; mysticalman
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_HIKER_ENCOUNTER
+ db MUSIC_HIKER_ENCOUNTER ; none
+ db MUSIC_YOUNGSTER_ENCOUNTER ; falkner
+ db MUSIC_LASS_ENCOUNTER ; whitney
+ db MUSIC_YOUNGSTER_ENCOUNTER ; bugsy
+ db MUSIC_OFFICER_ENCOUNTER ; morty
+ db MUSIC_OFFICER_ENCOUNTER ; pryce
+ db MUSIC_LASS_ENCOUNTER ; jasmine
+ db MUSIC_OFFICER_ENCOUNTER ; chuck
+ db MUSIC_BEAUTY_ENCOUNTER ; clair
+ db MUSIC_RIVAL_ENCOUNTER ; rival1
+ db MUSIC_HIKER_ENCOUNTER ; pokemon_prof
+ db MUSIC_HIKER_ENCOUNTER ; will
+ db MUSIC_HIKER_ENCOUNTER ; cal
+ db MUSIC_OFFICER_ENCOUNTER ; bruno
+ db MUSIC_HIKER_ENCOUNTER ; karen
+ db MUSIC_HIKER_ENCOUNTER ; koga
+ db MUSIC_OFFICER_ENCOUNTER ; champion
+ db MUSIC_YOUNGSTER_ENCOUNTER ; brock
+ db MUSIC_LASS_ENCOUNTER ; misty
+ db MUSIC_OFFICER_ENCOUNTER ; lt_surge
+ db MUSIC_ROCKET_ENCOUNTER ; scientist
+ db MUSIC_OFFICER_ENCOUNTER ; erika
+ db MUSIC_YOUNGSTER_ENCOUNTER ; youngster
+ db MUSIC_YOUNGSTER_ENCOUNTER ; schoolboy
+ db MUSIC_YOUNGSTER_ENCOUNTER ; bird_keeper
+ db MUSIC_LASS_ENCOUNTER ; lass
+ db MUSIC_LASS_ENCOUNTER ; janine
+ db MUSIC_HIKER_ENCOUNTER ; cooltrainerm
+ db MUSIC_BEAUTY_ENCOUNTER ; cooltrainerf
+ db MUSIC_BEAUTY_ENCOUNTER ; beauty
+ db MUSIC_POKEMANIAC_ENCOUNTER ; pokemaniac
+ db MUSIC_ROCKET_ENCOUNTER ; gruntm
+ db MUSIC_HIKER_ENCOUNTER ; gentleman
+ db MUSIC_BEAUTY_ENCOUNTER ; skier
+ db MUSIC_BEAUTY_ENCOUNTER ; teacher
+ db MUSIC_BEAUTY_ENCOUNTER ; sabrina
+ db MUSIC_YOUNGSTER_ENCOUNTER ; bug_catcher
+ db MUSIC_HIKER_ENCOUNTER ; fisher
+ db MUSIC_HIKER_ENCOUNTER ; swimmerm
+ db MUSIC_BEAUTY_ENCOUNTER ; swimmerf
+ db MUSIC_HIKER_ENCOUNTER ; sailor
+ db MUSIC_POKEMANIAC_ENCOUNTER ; super_nerd
+ db MUSIC_RIVAL_ENCOUNTER ; rival2
+ db MUSIC_HIKER_ENCOUNTER ; guitarist
+ db MUSIC_HIKER_ENCOUNTER ; hiker
+ db MUSIC_HIKER_ENCOUNTER ; biker
+ db MUSIC_OFFICER_ENCOUNTER ; blaine
+ db MUSIC_POKEMANIAC_ENCOUNTER ; burglar
+ db MUSIC_HIKER_ENCOUNTER ; firebreather
+ db MUSIC_POKEMANIAC_ENCOUNTER ; juggler
+ db MUSIC_HIKER_ENCOUNTER ; blackbelt_t
+ db MUSIC_ROCKET_ENCOUNTER ; executivem
+ db MUSIC_YOUNGSTER_ENCOUNTER ; psychic_t
+ db MUSIC_LASS_ENCOUNTER ; picnicker
+ db MUSIC_YOUNGSTER_ENCOUNTER ; camper
+ db MUSIC_ROCKET_ENCOUNTER ; executivef
+ db MUSIC_SAGE_ENCOUNTER ; sage
+ db MUSIC_SAGE_ENCOUNTER ; medium
+ db MUSIC_HIKER_ENCOUNTER ; boarder
+ db MUSIC_HIKER_ENCOUNTER ; pokefanm
+ db MUSIC_KIMONO_ENCOUNTER ; kimono_girl
+ db MUSIC_LASS_ENCOUNTER ; twins
+ db MUSIC_BEAUTY_ENCOUNTER ; pokefanf
+ db MUSIC_HIKER_ENCOUNTER ; red
+ db MUSIC_RIVAL_ENCOUNTER ; blue
+ db MUSIC_HIKER_ENCOUNTER ; officer
+ db MUSIC_ROCKET_ENCOUNTER ; gruntf
+ db MUSIC_HIKER_ENCOUNTER ; mysticalman
+ db MUSIC_HIKER_ENCOUNTER
+ db MUSIC_HIKER_ENCOUNTER
+ db MUSIC_HIKER_ENCOUNTER
diff --git a/data/trainers/gendered_trainers.asm b/data/trainers/gendered_trainers.asm
index 98cfec2ac..758e3f0a4 100644
--- a/data/trainers/gendered_trainers.asm
+++ b/data/trainers/gendered_trainers.asm
@@ -1,3 +1,5 @@
+; Used by GetMobileOTTrainerClass
+
MaleTrainers: ; 4e95d
db BURGLAR
db YOUNGSTER
diff --git a/data/trainers/genders.asm b/data/trainers/genders.asm
new file mode 100644
index 000000000..ab3be659b
--- /dev/null
+++ b/data/trainers/genders.asm
@@ -0,0 +1,71 @@
+; Used by
+
+BTTrainerClassGenders: ; 11f2f0
+; entries correspond to trainer classes
+ db MALE ; FALKNER
+ db FEMALE ; WHITNEY
+ db FEMALE ; BUGSY
+ db MALE ; MORTY
+ db MALE ; PRYCE
+ db FEMALE ; JASMINE
+ db MALE ; CHUCK
+ db FEMALE ; CLAIR
+ db MALE ; RIVAL1
+ db MALE ; POKEMON_PROF
+ db FEMALE ; WILL
+ db MALE ; CAL
+ db MALE ; BRUNO
+ db FEMALE ; KAREN
+ db MALE ; KOGA
+ db MALE ; CHAMPION
+ db MALE ; BROCK
+ db FEMALE ; MISTY
+ db MALE ; LT_SURGE
+ db MALE ; SCIENTIST
+ db FEMALE ; ERIKA
+ db MALE ; YOUNGSTER
+ db MALE ; SCHOOLBOY
+ db MALE ; BIRD_KEEPER
+ db FEMALE ; LASS
+ db FEMALE ; JANINE
+ db MALE ; COOLTRAINERM
+ db FEMALE ; COOLTRAINERF
+ db FEMALE ; BEAUTY
+ db MALE ; POKEMANIAC
+ db MALE ; GRUNTM
+ db MALE ; GENTLEMAN
+ db FEMALE ; SKIER
+ db FEMALE ; TEACHER
+ db FEMALE ; SABRINA
+ db MALE ; BUG_CATCHER
+ db MALE ; FISHER
+ db MALE ; SWIMMERM
+ db FEMALE ; SWIMMERF
+ db MALE ; SAILOR
+ db MALE ; SUPER_NERD
+ db MALE ; RIVAL2
+ db MALE ; GUITARIST
+ db MALE ; HIKER
+ db MALE ; BIKER
+ db MALE ; BLAINE
+ db MALE ; BURGLAR
+ db MALE ; FIREBREATHER
+ db MALE ; JUGGLER
+ db MALE ; BLACKBELT_T
+ db MALE ; EXECUTIVEM
+ db MALE ; PSYCHIC_T
+ db FEMALE ; PICNICKER
+ db MALE ; CAMPER
+ db FEMALE ; EXECUTIVEF
+ db MALE ; SAGE
+ db FEMALE ; MEDIUM
+ db MALE ; BOARDER
+ db MALE ; POKEFANM
+ db FEMALE ; KIMONO_GIRL
+ db FEMALE ; TWINS
+ db FEMALE ; POKEFANF
+ db MALE ; RED
+ db MALE ; BLUE
+ db MALE ; OFFICER
+ db FEMALE ; GRUNTF
+; 11f332
diff --git a/data/trainers/leaders.asm b/data/trainers/leaders.asm
new file mode 100644
index 000000000..a41f641e2
--- /dev/null
+++ b/data/trainers/leaders.asm
@@ -0,0 +1,32 @@
+; These lists determine the battle music and victory music, and whether to
+; award HAPPINESS_GYMBATTLE for winning.
+
+; Note: CHAMPION and RED are unused for battle music checks, since they are
+; accounted for prior to the list check.
+
+GymLeaders:
+ db FALKNER
+ db WHITNEY
+ db BUGSY
+ db MORTY
+ db PRYCE
+ db JASMINE
+ db CHUCK
+ db CLAIR
+ db WILL
+ db BRUNO
+ db KAREN
+ db KOGA
+ db CHAMPION
+ db RED
+; fallthrough
+KantoGymLeaders:
+ db BROCK
+ db MISTY
+ db LT_SURGE
+ db ERIKA
+ db JANINE
+ db SABRINA
+ db BLAINE
+ db BLUE
+ db -1
diff --git a/data/trainers/palettes.asm b/data/trainers/palettes.asm
index c943e49d7..c502846c4 100644
--- a/data/trainers/palettes.asm
+++ b/data/trainers/palettes.asm
@@ -1,11 +1,9 @@
TrainerPalettes: ; b0ce
; entries correspond to trainer classes
-PlayerPalette: ; b0ce
-; Chris uses the same colors as Cal
+PlayerPalette: ; Chris uses the same colors as Cal
INCLUDE "gfx/trainers/cal.pal"
-KrisPalette: ; b0d0
-; Kris shares Falkner's palette
+KrisPalette: ; Kris shares Falkner's palette
INCLUDE "gfx/trainers/falkner.pal"
INCLUDE "gfx/trainers/whitney.pal"
INCLUDE "gfx/trainers/bugsy.pal"
diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm
index e96cfd895..1bf5cb859 100644
--- a/data/trainers/parties.asm
+++ b/data/trainers/parties.asm
@@ -35,7 +35,7 @@ FalknerGroup:
db GUST
db 0
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -63,7 +63,7 @@ WhitneyGroup:
db STOMP
db MILK_DRINK
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -97,7 +97,7 @@ BugsyGroup:
db FURY_CUTTER
db 0
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -137,7 +137,7 @@ MortyGroup:
db MIMIC
db NIGHT_SHADE
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -171,7 +171,7 @@ PryceGroup:
db MIST
db BLIZZARD
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -205,7 +205,7 @@ JasmineGroup:
db ROCK_THROW
db IRON_TAIL
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -233,7 +233,7 @@ ChuckGroup:
db SURF
db DYNAMICPUNCH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -273,7 +273,7 @@ ClairGroup:
db HYPER_BEAM
db DRAGONBREATH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -290,7 +290,7 @@ Rival1Group:
; party
db 5, CHIKORITA
- db $ff ; end
+ db -1 ; end
; ================
@@ -301,7 +301,7 @@ Rival1Group:
; party
db 5, CYNDAQUIL
- db $ff ; end
+ db -1 ; end
; ================
@@ -312,7 +312,7 @@ Rival1Group:
; party
db 5, TOTODILE
- db $ff ; end
+ db -1 ; end
; ================
@@ -325,7 +325,7 @@ Rival1Group:
db 14, ZUBAT
db 16, BAYLEEF
- db $ff ; end
+ db -1 ; end
; ================
@@ -338,7 +338,7 @@ Rival1Group:
db 14, ZUBAT
db 16, QUILAVA
- db $ff ; end
+ db -1 ; end
; ================
@@ -351,7 +351,7 @@ Rival1Group:
db 14, ZUBAT
db 16, CROCONAW
- db $ff ; end
+ db -1 ; end
; ================
@@ -385,7 +385,7 @@ Rival1Group:
db RAZOR_LEAF
db POISONPOWDER
- db $ff ; end
+ db -1 ; end
; ================
@@ -419,7 +419,7 @@ Rival1Group:
db EMBER
db QUICK_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
@@ -453,7 +453,7 @@ Rival1Group:
db WATER_GUN
db BITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -493,7 +493,7 @@ Rival1Group:
db POISONPOWDER
db BODY_SLAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -533,7 +533,7 @@ Rival1Group:
db QUICK_ATTACK
db FLAME_WHEEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -573,7 +573,7 @@ Rival1Group:
db BITE
db SCARY_FACE
- db $ff ; end
+ db -1 ; end
; ================
@@ -619,7 +619,7 @@ Rival1Group:
db POISONPOWDER
db BODY_SLAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -665,7 +665,7 @@ Rival1Group:
db QUICK_ATTACK
db FLAME_WHEEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -711,7 +711,7 @@ Rival1Group:
db SCARY_FACE
db SLASH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -763,7 +763,7 @@ WillGroup:
db CONFUSE_RAY
db PSYCHIC_M
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -782,7 +782,7 @@ PKMNTrainerGroup:
db 10, CYNDAQUIL
db 10, TOTODILE
- db $ff ; end
+ db -1 ; end
; ================
@@ -795,7 +795,7 @@ PKMNTrainerGroup:
db 30, QUILAVA
db 30, CROCONAW
- db $ff ; end
+ db -1 ; end
; ================
@@ -808,7 +808,7 @@ PKMNTrainerGroup:
db 50, TYPHLOSION
db 50, FERALIGATR
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -854,7 +854,7 @@ BrunoGroup:
db VITAL_THROW
db CROSS_CHOP
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -900,7 +900,7 @@ KarenGroup:
db FLAMETHROWER
db CRUNCH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -946,7 +946,7 @@ KogaGroup:
db WING_ATTACK
db TOXIC
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -998,7 +998,7 @@ ChampionGroup:
db OUTRAGE
db HYPER_BEAM
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1044,7 +1044,7 @@ BrockGroup:
db ENDURE
db GIGA_DRAIN
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1084,7 +1084,7 @@ MistyGroup:
db RECOVER
db ICE_BEAM
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1130,7 +1130,7 @@ LtSurgeGroup:
db LIGHT_SCREEN
db THUNDER
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1148,7 +1148,7 @@ ScientistGroup:
db 22, KOFFING
db 22, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -1159,7 +1159,7 @@ ScientistGroup:
; party
db 24, DITTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1172,7 +1172,7 @@ ScientistGroup:
db 20, MAGNEMITE
db 20, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1185,7 +1185,7 @@ ScientistGroup:
db 27, MAGNEMITE
db 27, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1201,7 +1201,7 @@ ScientistGroup:
db RECOVER
db TRI_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1241,7 +1241,7 @@ ErikaGroup:
db PETAL_DANCE
db SOLARBEAM
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1258,7 +1258,7 @@ YoungsterGroup:
; party
db 4, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1270,7 +1270,7 @@ YoungsterGroup:
db 2, PIDGEY
db 4, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1282,7 +1282,7 @@ YoungsterGroup:
db 6, RATTATA
db 8, ZUBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -1293,7 +1293,7 @@ YoungsterGroup:
; party
db 10, WOOPER
- db $ff ; end
+ db -1 ; end
; ================
@@ -1307,7 +1307,7 @@ YoungsterGroup:
db 8, SPEAROW
db 8, SPEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1319,7 +1319,7 @@ YoungsterGroup:
db 10, MANKEY
db 12, DIGLETT
- db $ff ; end
+ db -1 ; end
; ================
@@ -1330,7 +1330,7 @@ YoungsterGroup:
; party
db 15, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1346,7 +1346,7 @@ YoungsterGroup:
db HYPER_FANG
db SCARY_FACE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1357,7 +1357,7 @@ YoungsterGroup:
; party
db 35, FEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1369,7 +1369,7 @@ YoungsterGroup:
db 33, RATICATE
db 33, ARBOK
- db $ff ; end
+ db -1 ; end
; ================
@@ -1380,7 +1380,7 @@ YoungsterGroup:
; party
db 35, GROWLITHE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1392,7 +1392,7 @@ YoungsterGroup:
db 33, SANDSLASH
db 33, CROBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -1408,7 +1408,7 @@ YoungsterGroup:
db HYPER_FANG
db PURSUIT
- db $ff ; end
+ db -1 ; end
; ================
@@ -1424,7 +1424,7 @@ YoungsterGroup:
db HYPER_FANG
db PURSUIT
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1442,7 +1442,7 @@ SchoolboyGroup:
db 12, ODDISH
db 15, VOLTORB
- db $ff ; end
+ db -1 ; end
; ================
@@ -1456,7 +1456,7 @@ SchoolboyGroup:
db 31, VOLTORB
db 31, MAGNETON
- db $ff ; end
+ db -1 ; end
; ================
@@ -1467,7 +1467,7 @@ SchoolboyGroup:
; party
db 16, TANGELA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1480,7 +1480,7 @@ SchoolboyGroup:
db 31, WEEPINBELL
db 33, VICTREEBEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -1493,7 +1493,7 @@ SchoolboyGroup:
db 31, ELECTABUZZ
db 31, MAGMAR
- db $ff ; end
+ db -1 ; end
; ================
@@ -1505,7 +1505,7 @@ SchoolboyGroup:
db 32, XATU
db 34, ALAKAZAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -1516,7 +1516,7 @@ SchoolboyGroup:
; party
db 35, ODDISH
- db $ff ; end
+ db -1 ; end
; ================
@@ -1528,7 +1528,7 @@ SchoolboyGroup:
db 33, TANGELA
db 33, VAPOREON
- db $ff ; end
+ db -1 ; end
; ================
@@ -1542,7 +1542,7 @@ SchoolboyGroup:
db 27, POLIWHIRL
db 35, DITTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1553,7 +1553,7 @@ SchoolboyGroup:
; party
db 19, MR__MIME
- db $ff ; end
+ db -1 ; end
; ================
@@ -1565,7 +1565,7 @@ SchoolboyGroup:
db 32, LEDIAN
db 32, EXEGGUTOR
- db $ff ; end
+ db -1 ; end
; ================
@@ -1577,7 +1577,7 @@ SchoolboyGroup:
db 32, AIPOM
db 32, DITTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1589,7 +1589,7 @@ SchoolboyGroup:
db 14, ODDISH
db 17, VOLTORB
- db $ff ; end
+ db -1 ; end
; ================
@@ -1601,7 +1601,7 @@ SchoolboyGroup:
db 28, GLOOM
db 31, ELECTRODE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1613,7 +1613,7 @@ SchoolboyGroup:
db 17, TANGELA
db 17, YANMA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1627,7 +1627,7 @@ SchoolboyGroup:
db 20, QUAGSIRE
db 25, YANMA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1639,7 +1639,7 @@ SchoolboyGroup:
db 19, MR__MIME
db 19, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1651,7 +1651,7 @@ SchoolboyGroup:
db 27, MR__MIME
db 31, MAGNETON
- db $ff ; end
+ db -1 ; end
; ================
@@ -1664,7 +1664,7 @@ SchoolboyGroup:
db 33, GROWLITHE
db 33, ELECTRODE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1692,7 +1692,7 @@ SchoolboyGroup:
db ACID
db MOONLIGHT
- db $ff ; end
+ db -1 ; end
; ================
@@ -1706,7 +1706,7 @@ SchoolboyGroup:
db 30, QUAGSIRE
db 30, YANMA
- db $ff ; end
+ db -1 ; end
; ================
@@ -1740,7 +1740,7 @@ SchoolboyGroup:
db AMNESIA
db EARTHQUAKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -1752,7 +1752,7 @@ SchoolboyGroup:
db 30, MR__MIME
db 34, MAGNETON
- db $ff ; end
+ db -1 ; end
; ================
@@ -1774,7 +1774,7 @@ SchoolboyGroup:
db LOCK_ON
db SWIFT
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -1792,7 +1792,7 @@ BirdKeeperGroup:
db 7, PIDGEY
db 7, PIDGEY
- db $ff ; end
+ db -1 ; end
; ================
@@ -1803,7 +1803,7 @@ BirdKeeperGroup:
; party
db 9, SPEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1815,7 +1815,7 @@ BirdKeeperGroup:
db 12, PIDGEY
db 14, PIDGEOTTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1830,7 +1830,7 @@ BirdKeeperGroup:
db 15, PIDGEY
db 15, PIDGEY
- db $ff ; end
+ db -1 ; end
; ================
@@ -1843,7 +1843,7 @@ BirdKeeperGroup:
db 16, DODUO
db 17, DODUO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1856,7 +1856,7 @@ BirdKeeperGroup:
db 20, FEAROW
db 18, SPEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1868,7 +1868,7 @@ BirdKeeperGroup:
db 25, PIDGEOTTO
db 25, PIDGEOTTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1880,7 +1880,7 @@ BirdKeeperGroup:
db 12, PIDGEY
db 34, PIDGEOT
- db $ff ; end
+ db -1 ; end
; ================
@@ -1892,7 +1892,7 @@ BirdKeeperGroup:
db 29, FEAROW
db 35, FEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1905,7 +1905,7 @@ BirdKeeperGroup:
db 28, DODUO
db 32, DODRIO
- db $ff ; end
+ db -1 ; end
; ================
@@ -1916,7 +1916,7 @@ BirdKeeperGroup:
; party
db 34, NOCTOWL
- db $ff ; end
+ db -1 ; end
; ================
@@ -1927,7 +1927,7 @@ BirdKeeperGroup:
; party
db 36, FARFETCH_D
- db $ff ; end
+ db -1 ; end
; ================
@@ -1940,7 +1940,7 @@ BirdKeeperGroup:
db 6, PIDGEY
db 8, SPEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1951,7 +1951,7 @@ BirdKeeperGroup:
; party
db 34, FARFETCH_D
- db $ff ; end
+ db -1 ; end
; ================
@@ -1962,7 +1962,7 @@ BirdKeeperGroup:
; party
db 34, FARFETCH_D
- db $ff ; end
+ db -1 ; end
; ================
@@ -1974,7 +1974,7 @@ BirdKeeperGroup:
db 32, PIDGEOTTO
db 32, FEAROW
- db $ff ; end
+ db -1 ; end
; ================
@@ -1990,7 +1990,7 @@ BirdKeeperGroup:
db FLY
db SLASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -2002,7 +2002,7 @@ BirdKeeperGroup:
db 32, PIDGEOTTO
db 32, PIDGEOTTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -2024,7 +2024,7 @@ BirdKeeperGroup:
db STEEL_WING
db FLY
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -2046,7 +2046,7 @@ LassGroup:
db BITE
db LICK
- db $ff ; end
+ db -1 ; end
; ================
@@ -2059,7 +2059,7 @@ LassGroup:
db 15, JIGGLYPUFF
db 15, JIGGLYPUFF
- db $ff ; end
+ db -1 ; end
; ================
@@ -2072,7 +2072,7 @@ LassGroup:
db 34, ARBOK
db 30, GLOOM
- db $ff ; end
+ db -1 ; end
; ================
@@ -2084,7 +2084,7 @@ LassGroup:
db 12, ODDISH
db 15, CUBONE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2095,7 +2095,7 @@ LassGroup:
; party
db 21, MARILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -2108,7 +2108,7 @@ LassGroup:
db 32, IVYSAUR
db 34, VENUSAUR
- db $ff ; end
+ db -1 ; end
; ================
@@ -2121,7 +2121,7 @@ LassGroup:
db 31, PIDGEOTTO
db 31, BELLOSSOM
- db $ff ; end
+ db -1 ; end
; ================
@@ -2134,7 +2134,7 @@ LassGroup:
db 29, PARAS
db 32, PARASECT
- db $ff ; end
+ db -1 ; end
; ================
@@ -2147,7 +2147,7 @@ LassGroup:
db 33, HOPPIP
db 34, JUMPLUFF
- db $ff ; end
+ db -1 ; end
; ================
@@ -2169,7 +2169,7 @@ LassGroup:
db DISABLE
db CONFUSION
- db $ff ; end
+ db -1 ; end
; ================
@@ -2181,7 +2181,7 @@ LassGroup:
db 30, WIGGLYTUFF
db 34, GRANBULL
- db $ff ; end
+ db -1 ; end
; ================
@@ -2192,7 +2192,7 @@ LassGroup:
; party
db 21, MARILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -2203,7 +2203,7 @@ LassGroup:
; party
db 21, MARILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -2225,7 +2225,7 @@ LassGroup:
db DISABLE
db CONFUSION
- db $ff ; end
+ db -1 ; end
; ================
@@ -2247,7 +2247,7 @@ LassGroup:
db THUNDER_WAVE
db COTTON_SPORE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2269,7 +2269,7 @@ LassGroup:
db THUNDER_WAVE
db COTTON_SPORE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2291,7 +2291,7 @@ LassGroup:
db PSYCHIC_M
db SCREECH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -2337,7 +2337,7 @@ JanineGroup:
db GUST
db PSYCHIC_M
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -2371,7 +2371,7 @@ CooltrainerMGroup:
db SLEEP_POWDER
db RAZOR_LEAF
- db $ff ; end
+ db -1 ; end
; ================
@@ -2384,7 +2384,7 @@ CooltrainerMGroup:
db 24, CHARMELEON
db 24, WARTORTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2397,7 +2397,7 @@ CooltrainerMGroup:
db 34, DRATINI
db 34, DRATINI
- db $ff ; end
+ db -1 ; end
; ================
@@ -2409,7 +2409,7 @@ CooltrainerMGroup:
db 34, HORSEA
db 36, SEADRA
- db $ff ; end
+ db -1 ; end
; ================
@@ -2420,7 +2420,7 @@ CooltrainerMGroup:
; party
db 37, DRAGONAIR
- db $ff ; end
+ db -1 ; end
; ================
@@ -2448,7 +2448,7 @@ CooltrainerMGroup:
db BITE
db FIRE_SPIN
- db $ff ; end
+ db -1 ; end
; ================
@@ -2476,7 +2476,7 @@ CooltrainerMGroup:
db BITE
db FIRE_SPIN
- db $ff ; end
+ db -1 ; end
; ================
@@ -2498,7 +2498,7 @@ CooltrainerMGroup:
db SWIFT
db SCREECH
- db $ff ; end
+ db -1 ; end
; ================
@@ -2520,7 +2520,7 @@ CooltrainerMGroup:
db PSYCH_UP
db FURY_SWIPES
- db $ff ; end
+ db -1 ; end
; ================
@@ -2548,7 +2548,7 @@ CooltrainerMGroup:
db BITE
db FIRE_SPIN
- db $ff ; end
+ db -1 ; end
; ================
@@ -2576,7 +2576,7 @@ CooltrainerMGroup:
db SLEEP_POWDER
db SOLARBEAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -2592,7 +2592,7 @@ CooltrainerMGroup:
db SLASH
db SWIFT
- db $ff ; end
+ db -1 ; end
; ================
@@ -2605,7 +2605,7 @@ CooltrainerMGroup:
db 10, CHARMANDER
db 10, SQUIRTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2618,7 +2618,7 @@ CooltrainerMGroup:
db 10, CHARMANDER
db 10, SQUIRTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2631,7 +2631,7 @@ CooltrainerMGroup:
db 10, CHARMANDER
db 10, SQUIRTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2644,7 +2644,7 @@ CooltrainerMGroup:
db 35, TANGELA
db 35, TAUROS
- db $ff ; end
+ db -1 ; end
; ================
@@ -2657,7 +2657,7 @@ CooltrainerMGroup:
db 35, CHARMELEON
db 35, WARTORTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2670,7 +2670,7 @@ CooltrainerMGroup:
db 14, CHARMANDER
db 14, SQUIRTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2686,7 +2686,7 @@ CooltrainerMGroup:
db RAGE
db SCARY_FACE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2702,7 +2702,7 @@ CooltrainerMGroup:
db DRAGON_RAGE
db SLAM
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -2722,7 +2722,7 @@ CooltrainerFGroup:
db 22, VAPOREON
db 22, JOLTEON
- db $ff ; end
+ db -1 ; end
; ================
@@ -2744,7 +2744,7 @@ CooltrainerFGroup:
db CONFUSE_RAY
db SAFEGUARD
- db $ff ; end
+ db -1 ; end
; ================
@@ -2755,7 +2755,7 @@ CooltrainerFGroup:
; party
db 37, SEADRA
- db $ff ; end
+ db -1 ; end
; ================
@@ -2767,7 +2767,7 @@ CooltrainerFGroup:
db 34, DRATINI
db 36, DRAGONAIR
- db $ff ; end
+ db -1 ; end
; ================
@@ -2779,7 +2779,7 @@ CooltrainerFGroup:
db 26, SHELLDER
db 28, CLOYSTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -2791,7 +2791,7 @@ CooltrainerFGroup:
db 22, GOLDEEN
db 24, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -2804,7 +2804,7 @@ CooltrainerFGroup:
db 24, WARTORTLE
db 24, WARTORTLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2826,7 +2826,7 @@ CooltrainerFGroup:
db SURF
db RAIN_DANCE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2842,7 +2842,7 @@ CooltrainerFGroup:
db FURY_ATTACK
db AGILITY
- db $ff ; end
+ db -1 ; end
; ================
@@ -2855,7 +2855,7 @@ CooltrainerFGroup:
db 33, NIDOQUEEN
db 31, STARMIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2883,7 +2883,7 @@ CooltrainerFGroup:
db RAZOR_LEAF
db SWEET_SCENT
- db $ff ; end
+ db -1 ; end
; ================
@@ -2899,7 +2899,7 @@ CooltrainerFGroup:
db FURY_ATTACK
db AGILITY
- db $ff ; end
+ db -1 ; end
; ================
@@ -2912,7 +2912,7 @@ CooltrainerFGroup:
db 35, STARMIE
db 35, NINETALES
- db $ff ; end
+ db -1 ; end
; ================
@@ -2924,7 +2924,7 @@ CooltrainerFGroup:
db 38, IVYSAUR
db 38, STARMIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2935,7 +2935,7 @@ CooltrainerFGroup:
; party
db 28, POLIWHIRL
- db $ff ; end
+ db -1 ; end
; ================
@@ -2957,7 +2957,7 @@ CooltrainerFGroup:
db ACID
db SOLARBEAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -2969,7 +2969,7 @@ CooltrainerFGroup:
db 24, STARYU
db 26, STARMIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -2985,7 +2985,7 @@ CooltrainerFGroup:
db FURY_ATTACK
db FIRE_BLAST
- db $ff ; end
+ db -1 ; end
; ================
@@ -2998,7 +2998,7 @@ CooltrainerFGroup:
db 36, NIDOQUEEN
db 34, STARMIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3026,7 +3026,7 @@ CooltrainerFGroup:
db WATERFALL
db RECOVER
- db $ff ; end
+ db -1 ; end
; ================
@@ -3054,7 +3054,7 @@ CooltrainerFGroup:
db WATERFALL
db TWISTER
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -3073,7 +3073,7 @@ BeautyGroup:
db 13, SENTRET
db 17, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3095,7 +3095,7 @@ BeautyGroup:
db BITE
db SLASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -3106,7 +3106,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3117,7 +3117,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3128,7 +3128,7 @@ BeautyGroup:
; party
db 16, FURRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3140,7 +3140,7 @@ BeautyGroup:
db 28, VILEPLUME
db 34, BUTTERFREE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3153,7 +3153,7 @@ BeautyGroup:
db 32, SEEL
db 30, MARILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -3164,7 +3164,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3175,7 +3175,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3186,7 +3186,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3197,7 +3197,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3208,7 +3208,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3219,7 +3219,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3232,7 +3232,7 @@ BeautyGroup:
db 32, EXEGGCUTE
db 35, PARASECT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3243,7 +3243,7 @@ BeautyGroup:
; party
db 15, SENTRET
- db $ff ; end
+ db -1 ; end
; ================
@@ -3265,7 +3265,7 @@ BeautyGroup:
db TACKLE
db STUN_SPORE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3276,7 +3276,7 @@ BeautyGroup:
; party
db 19, CORSOLA
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -3293,7 +3293,7 @@ PokemaniacGroup:
; party
db 10, SLOWPOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3305,7 +3305,7 @@ PokemaniacGroup:
db 24, MAROWAK
db 24, MAROWAK
- db $ff ; end
+ db -1 ; end
; ================
@@ -3316,7 +3316,7 @@ PokemaniacGroup:
; party
db 26, KANGASKHAN
- db $ff ; end
+ db -1 ; end
; ================
@@ -3328,7 +3328,7 @@ PokemaniacGroup:
db 16, NIDORINA
db 16, NIDORINO
- db $ff ; end
+ db -1 ; end
; ================
@@ -3339,7 +3339,7 @@ PokemaniacGroup:
; party
db 19, SLOWBRO
- db $ff ; end
+ db -1 ; end
; ================
@@ -3350,7 +3350,7 @@ PokemaniacGroup:
; party
db 19, LICKITUNG
- db $ff ; end
+ db -1 ; end
; ================
@@ -3361,7 +3361,7 @@ PokemaniacGroup:
; party
db 19, NIDOKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3373,7 +3373,7 @@ PokemaniacGroup:
db 31, RHYHORN
db 31, RHYDON
- db $ff ; end
+ db -1 ; end
; ================
@@ -3384,7 +3384,7 @@ PokemaniacGroup:
; party
db 25, KANGASKHAN
- db $ff ; end
+ db -1 ; end
; ================
@@ -3400,7 +3400,7 @@ PokemaniacGroup:
db CONVERSION2
db TRI_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
@@ -3416,7 +3416,7 @@ PokemaniacGroup:
db CUT
db 0
- db $ff ; end
+ db -1 ; end
; ================
@@ -3428,7 +3428,7 @@ PokemaniacGroup:
db 10, SLOWPOKE
db 10, SLOWPOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3439,7 +3439,7 @@ PokemaniacGroup:
; party
db 27, RHYHORN
- db $ff ; end
+ db -1 ; end
; ================
@@ -3455,7 +3455,7 @@ PokemaniacGroup:
db EGG_BOMB
db SOFTBOILED
- db $ff ; end
+ db -1 ; end
; ================
@@ -3467,7 +3467,7 @@ PokemaniacGroup:
db 17, NIDOKING
db 17, NIDOQUEEN
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -3484,7 +3484,7 @@ GruntMGroup:
; party
db 14, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3497,7 +3497,7 @@ GruntMGroup:
db 9, ZUBAT
db 9, ZUBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3509,7 +3509,7 @@ GruntMGroup:
db 24, RATICATE
db 24, RATICATE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3522,7 +3522,7 @@ GruntMGroup:
db 23, GRIMER
db 25, MUK
- db $ff ; end
+ db -1 ; end
; ================
@@ -3537,7 +3537,7 @@ GruntMGroup:
db 23, RATTATA
db 23, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3549,7 +3549,7 @@ GruntMGroup:
db 26, ZUBAT
db 26, ZUBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3563,7 +3563,7 @@ GruntMGroup:
db 23, ZUBAT
db 23, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3574,7 +3574,7 @@ GruntMGroup:
; party
db 26, WEEZING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3586,7 +3586,7 @@ GruntMGroup:
db 24, RATICATE
db 26, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3599,7 +3599,7 @@ GruntMGroup:
db 24, GOLBAT
db 22, GRIMER
- db $ff ; end
+ db -1 ; end
; ================
@@ -3612,7 +3612,7 @@ GruntMGroup:
db 23, KOFFING
db 25, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3623,7 +3623,7 @@ GruntMGroup:
; party
db 33, HOUNDOUR
- db $ff ; end
+ db -1 ; end
; ================
@@ -3634,7 +3634,7 @@ GruntMGroup:
; party
db 27, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3646,7 +3646,7 @@ GruntMGroup:
db 24, RATICATE
db 24, GOLBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3658,7 +3658,7 @@ GruntMGroup:
db 26, GRIMER
db 23, WEEZING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3672,7 +3672,7 @@ GruntMGroup:
db 16, RATTATA
db 16, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3683,7 +3683,7 @@ GruntMGroup:
; party
db 18, GOLBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3696,7 +3696,7 @@ GruntMGroup:
db 17, ZUBAT
db 17, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3708,7 +3708,7 @@ GruntMGroup:
db 18, VENONAT
db 18, VENONAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3720,7 +3720,7 @@ GruntMGroup:
db 17, DROWZEE
db 19, ZUBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3733,7 +3733,7 @@ GruntMGroup:
db 17, GRIMER
db 18, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3744,7 +3744,7 @@ GruntMGroup:
; party
db 36, GOLBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3755,7 +3755,7 @@ GruntMGroup:
; party
db 30, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3767,7 +3767,7 @@ GruntMGroup:
db 25, KOFFING
db 25, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -3779,7 +3779,7 @@ GruntMGroup:
db 24, KOFFING
db 24, MUK
- db $ff ; end
+ db -1 ; end
; ================
@@ -3791,7 +3791,7 @@ GruntMGroup:
db 15, RATTATA
db 15, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3802,7 +3802,7 @@ GruntMGroup:
; party
db 22, ZUBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -3813,7 +3813,7 @@ GruntMGroup:
; party
db 19, RATICATE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3825,7 +3825,7 @@ GruntMGroup:
db 9, RATTATA
db 9, RATTATA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3838,7 +3838,7 @@ GruntMGroup:
db 25, GOLBAT
db 30, ARBOK
- db $ff ; end
+ db -1 ; end
; ================
@@ -3849,7 +3849,7 @@ GruntMGroup:
; party
db 30, GOLBAT
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -3867,7 +3867,7 @@ GentlemanGroup:
db 18, GROWLITHE
db 18, GROWLITHE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3878,7 +3878,7 @@ GentlemanGroup:
; party
db 33, PERSIAN
- db $ff ; end
+ db -1 ; end
; ================
@@ -3890,7 +3890,7 @@ GentlemanGroup:
db 37, PIKACHU
db 33, FLAAFFY
- db $ff ; end
+ db -1 ; end
; ================
@@ -3901,7 +3901,7 @@ GentlemanGroup:
; party
db 20, PONYTA
- db $ff ; end
+ db -1 ; end
; ================
@@ -3912,7 +3912,7 @@ GentlemanGroup:
; party
db 20, NOCTOWL
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -3929,7 +3929,7 @@ SkierGroup:
; party
db 28, JYNX
- db $ff ; end
+ db -1 ; end
; ================
@@ -3940,7 +3940,7 @@ SkierGroup:
; party
db 28, DEWGONG
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -3957,7 +3957,7 @@ TeacherGroup:
; party
db 36, CLEFAIRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -3969,7 +3969,7 @@ TeacherGroup:
db 32, AIPOM
db 36, CUBONE
- db $ff ; end
+ db -1 ; end
; ================
@@ -3980,7 +3980,7 @@ TeacherGroup:
; party
db 35, JIGGLYPUFF
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -4014,7 +4014,7 @@ SabrinaGroup:
db PSYCHIC_M
db REFLECT
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -4032,7 +4032,7 @@ BugCatcherGroup:
db 3, CATERPIE
db 3, CATERPIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4044,7 +4044,7 @@ BugCatcherGroup:
db 32, BEEDRILL
db 32, BUTTERFREE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4057,7 +4057,7 @@ BugCatcherGroup:
db 30, BEEDRILL
db 30, BEEDRILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4071,7 +4071,7 @@ BugCatcherGroup:
db 3, WEEDLE
db 2, CATERPIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4084,7 +4084,7 @@ BugCatcherGroup:
db 9, KAKUNA
db 12, BEEDRILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4096,7 +4096,7 @@ BugCatcherGroup:
db 12, CATERPIE
db 12, WEEDLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4107,7 +4107,7 @@ BugCatcherGroup:
; party
db 13, PARAS
- db $ff ; end
+ db -1 ; end
; ================
@@ -4118,7 +4118,7 @@ BugCatcherGroup:
; party
db 15, VENONAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -4130,7 +4130,7 @@ BugCatcherGroup:
db 30, ARIADOS
db 32, PINSIR
- db $ff ; end
+ db -1 ; end
; ================
@@ -4144,7 +4144,7 @@ BugCatcherGroup:
db 10, KAKUNA
db 9, METAPOD
- db $ff ; end
+ db -1 ; end
; ================
@@ -4158,7 +4158,7 @@ BugCatcherGroup:
db 15, BEEDRILL
db 14, BUTTERFREE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4169,7 +4169,7 @@ BugCatcherGroup:
; party
db 34, ARIADOS
- db $ff ; end
+ db -1 ; end
; ================
@@ -4180,7 +4180,7 @@ BugCatcherGroup:
; party
db 19, VENONAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -4196,7 +4196,7 @@ BugCatcherGroup:
db CONFUSION
db LEECH_LIFE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4230,7 +4230,7 @@ BugCatcherGroup:
db SUPERSONIC
db WHIRLWIND
- db $ff ; end
+ db -1 ; end
; ================
@@ -4264,7 +4264,7 @@ BugCatcherGroup:
db GUST
db WHIRLWIND
- db $ff ; end
+ db -1 ; end
; ================
@@ -4280,7 +4280,7 @@ BugCatcherGroup:
db PSYBEAM
db LEECH_LIFE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4296,7 +4296,7 @@ BugCatcherGroup:
db PSYCHIC_M
db TOXIC
- db $ff ; end
+ db -1 ; end
; ================
@@ -4308,7 +4308,7 @@ BugCatcherGroup:
db 8, LEDYBA
db 10, PARAS
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -4328,7 +4328,7 @@ FisherGroup:
db 15, MAGIKARP
db 5, MAGIKARP
- db $ff ; end
+ db -1 ; end
; ================
@@ -4339,7 +4339,7 @@ FisherGroup:
; party
db 10, GOLDEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -4350,7 +4350,7 @@ FisherGroup:
; party
db 34, TENTACRUEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4363,7 +4363,7 @@ FisherGroup:
db 31, POLIWHIRL
db 31, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -4375,7 +4375,7 @@ FisherGroup:
db 8, POLIWAG
db 8, POLIWAG
- db $ff ; end
+ db -1 ; end
; ================
@@ -4389,7 +4389,7 @@ FisherGroup:
db 15, MAGIKARP
db 15, GYARADOS
- db $ff ; end
+ db -1 ; end
; ================
@@ -4400,7 +4400,7 @@ FisherGroup:
; party
db 18, QWILFISH
- db $ff ; end
+ db -1 ; end
; ================
@@ -4411,7 +4411,7 @@ FisherGroup:
; party
db 27, GYARADOS
- db $ff ; end
+ db -1 ; end
; ================
@@ -4425,7 +4425,7 @@ FisherGroup:
db 22, MAGIKARP
db 22, MAGIKARP
- db $ff ; end
+ db -1 ; end
; ================
@@ -4438,7 +4438,7 @@ FisherGroup:
db 23, GOLDEEN
db 25, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -4460,7 +4460,7 @@ FisherGroup:
db AURORA_BEAM
db BUBBLEBEAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -4474,7 +4474,7 @@ FisherGroup:
db 25, REMORAID
db 29, CLOYSTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -4486,7 +4486,7 @@ FisherGroup:
db 32, REMORAID
db 32, REMORAID
- db $ff ; end
+ db -1 ; end
; ================
@@ -4500,7 +4500,7 @@ FisherGroup:
db 31, QWILFISH
db 31, TENTACRUEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4513,7 +4513,7 @@ FisherGroup:
db 30, GYARADOS
db 30, GYARADOS
- db $ff ; end
+ db -1 ; end
; ================
@@ -4524,7 +4524,7 @@ FisherGroup:
; party
db 17, GOLDEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -4536,7 +4536,7 @@ FisherGroup:
db 17, QWILFISH
db 19, GOLDEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -4547,7 +4547,7 @@ FisherGroup:
; party
db 23, QWILFISH
- db $ff ; end
+ db -1 ; end
; ================
@@ -4560,7 +4560,7 @@ FisherGroup:
db 32, GOLDEEN
db 32, QWILFISH
- db $ff ; end
+ db -1 ; end
; ================
@@ -4573,7 +4573,7 @@ FisherGroup:
db 29, GOLDEEN
db 32, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -4586,7 +4586,7 @@ FisherGroup:
db 30, QWILFISH
db 34, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -4614,7 +4614,7 @@ FisherGroup:
db BUBBLEBEAM
db HYPER_BEAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -4626,7 +4626,7 @@ FisherGroup:
db 30, QWILFISH
db 32, GOLDEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -4648,7 +4648,7 @@ FisherGroup:
db FURY_ATTACK
db WATERFALL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4676,7 +4676,7 @@ FisherGroup:
db PIN_MISSILE
db TAKE_DOWN
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -4694,7 +4694,7 @@ SwimmerMGroup:
db 32, REMORAID
db 30, SEADRA
- db $ff ; end
+ db -1 ; end
; ================
@@ -4706,7 +4706,7 @@ SwimmerMGroup:
db 20, TENTACOOL
db 20, TENTACOOL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4719,7 +4719,7 @@ SwimmerMGroup:
db 20, WARTORTLE
db 18, SHELLDER
- db $ff ; end
+ db -1 ; end
; ================
@@ -4732,7 +4732,7 @@ SwimmerMGroup:
db 19, TENTACOOL
db 19, TENTACRUEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4748,7 +4748,7 @@ SwimmerMGroup:
db 17, TENTACOOL
db 19, REMORAID
- db $ff ; end
+ db -1 ; end
; ================
@@ -4759,7 +4759,7 @@ SwimmerMGroup:
; party
db 23, QWILFISH
- db $ff ; end
+ db -1 ; end
; ================
@@ -4771,7 +4771,7 @@ SwimmerMGroup:
db 20, GYARADOS
db 20, GYARADOS
- db $ff ; end
+ db -1 ; end
; ================
@@ -4782,7 +4782,7 @@ SwimmerMGroup:
; party
db 23, KRABBY
- db $ff ; end
+ db -1 ; end
; ================
@@ -4795,7 +4795,7 @@ SwimmerMGroup:
db 25, DEWGONG
db 24, SEEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4807,7 +4807,7 @@ SwimmerMGroup:
db 26, PILOSWINE
db 26, PILOSWINE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4820,7 +4820,7 @@ SwimmerMGroup:
db 25, CLOYSTER
db 24, SHELLDER
- db $ff ; end
+ db -1 ; end
; ================
@@ -4833,7 +4833,7 @@ SwimmerMGroup:
db 15, HORSEA
db 20, SEADRA
- db $ff ; end
+ db -1 ; end
; ================
@@ -4846,7 +4846,7 @@ SwimmerMGroup:
db 18, STARMIE
db 16, HORSEA
- db $ff ; end
+ db -1 ; end
; ================
@@ -4860,7 +4860,7 @@ SwimmerMGroup:
db 30, TENTACRUEL
db 28, GOLDEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -4872,7 +4872,7 @@ SwimmerMGroup:
db 30, SHELLDER
db 34, CLOYSTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -4885,7 +4885,7 @@ SwimmerMGroup:
db 18, STARMIE
db 16, HORSEA
- db $ff ; end
+ db -1 ; end
; ================
@@ -4896,7 +4896,7 @@ SwimmerMGroup:
; party
db 34, MARILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -4909,7 +4909,7 @@ SwimmerMGroup:
db 29, OCTILLERY
db 32, QUAGSIRE
- db $ff ; end
+ db -1 ; end
; ================
@@ -4922,7 +4922,7 @@ SwimmerMGroup:
db 18, STARMIE
db 16, HORSEA
- db $ff ; end
+ db -1 ; end
; ================
@@ -4935,7 +4935,7 @@ SwimmerMGroup:
db 18, STARMIE
db 16, HORSEA
- db $ff ; end
+ db -1 ; end
; ================
@@ -4948,7 +4948,7 @@ SwimmerMGroup:
db 32, HORSEA
db 35, SEADRA
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -4965,7 +4965,7 @@ SwimmerFGroup:
; party
db 21, STARYU
- db $ff ; end
+ db -1 ; end
; ================
@@ -4977,7 +4977,7 @@ SwimmerFGroup:
db 19, STARYU
db 19, SHELLDER
- db $ff ; end
+ db -1 ; end
; ================
@@ -4990,7 +4990,7 @@ SwimmerFGroup:
db 20, GOLDEEN
db 20, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -5012,7 +5012,7 @@ SwimmerFGroup:
db SUPERSONIC
db HORN_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
@@ -5023,7 +5023,7 @@ SwimmerFGroup:
; party
db 22, SEEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -5035,7 +5035,7 @@ SwimmerFGroup:
db 20, STARYU
db 20, STARMIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5057,7 +5057,7 @@ SwimmerFGroup:
db LEER
db WATER_GUN
- db $ff ; end
+ db -1 ; end
; ================
@@ -5068,7 +5068,7 @@ SwimmerFGroup:
; party
db 28, JYNX
- db $ff ; end
+ db -1 ; end
; ================
@@ -5079,7 +5079,7 @@ SwimmerFGroup:
; party
db 28, DEWGONG
- db $ff ; end
+ db -1 ; end
; ================
@@ -5090,7 +5090,7 @@ SwimmerFGroup:
; party
db 20, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -5101,7 +5101,7 @@ SwimmerFGroup:
; party
db 33, DEWGONG
- db $ff ; end
+ db -1 ; end
; ================
@@ -5112,7 +5112,7 @@ SwimmerFGroup:
; party
db 34, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -5123,7 +5123,7 @@ SwimmerFGroup:
; party
db 20, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -5136,7 +5136,7 @@ SwimmerFGroup:
db 29, MARILL
db 32, LAPRAS
- db $ff ; end
+ db -1 ; end
; ================
@@ -5148,7 +5148,7 @@ SwimmerFGroup:
db 32, STARMIE
db 32, STARMIE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5159,7 +5159,7 @@ SwimmerFGroup:
; party
db 20, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -5173,7 +5173,7 @@ SwimmerFGroup:
db 28, SEEL
db 28, DEWGONG
- db $ff ; end
+ db -1 ; end
; ================
@@ -5184,7 +5184,7 @@ SwimmerFGroup:
; party
db 37, GOLDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -5196,7 +5196,7 @@ SwimmerFGroup:
db 35, SEAKING
db 35, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -5215,7 +5215,7 @@ SailorGroup:
db 17, RATICATE
db 19, KRABBY
- db $ff ; end
+ db -1 ; end
; ================
@@ -5227,7 +5227,7 @@ SailorGroup:
db 18, POLIWAG
db 18, POLIWHIRL
- db $ff ; end
+ db -1 ; end
; ================
@@ -5238,7 +5238,7 @@ SailorGroup:
; party
db 20, POLIWHIRL
- db $ff ; end
+ db -1 ; end
; ================
@@ -5260,7 +5260,7 @@ SailorGroup:
db VICEGRIP
db HARDEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -5273,7 +5273,7 @@ SailorGroup:
db 18, MACHOP
db 18, POLIWHIRL
- db $ff ; end
+ db -1 ; end
; ================
@@ -5285,7 +5285,7 @@ SailorGroup:
db 32, RATICATE
db 32, RATICATE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5296,7 +5296,7 @@ SailorGroup:
; party
db 34, KINGLER
- db $ff ; end
+ db -1 ; end
; ================
@@ -5310,7 +5310,7 @@ SailorGroup:
db 28, POLIWRATH
db 28, MACHOP
- db $ff ; end
+ db -1 ; end
; ================
@@ -5323,7 +5323,7 @@ SailorGroup:
db 33, MACHOKE
db 26, PSYDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -5334,7 +5334,7 @@ SailorGroup:
; party
db 19, WOOPER
- db $ff ; end
+ db -1 ; end
; ================
@@ -5346,7 +5346,7 @@ SailorGroup:
db 28, POLIWHIRL
db 28, POLIWHIRL
- db $ff ; end
+ db -1 ; end
; ================
@@ -5358,7 +5358,7 @@ SailorGroup:
db 34, POLIWHIRL
db 34, POLIWRATH
- db $ff ; end
+ db -1 ; end
; ================
@@ -5380,7 +5380,7 @@ SailorGroup:
db ICE_PUNCH
db SUBMISSION
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -5397,7 +5397,7 @@ SuperNerdGroup:
; party
db 20, GRIMER
- db $ff ; end
+ db -1 ; end
; ================
@@ -5409,7 +5409,7 @@ SuperNerdGroup:
db 11, GRIMER
db 11, GRIMER
- db $ff ; end
+ db -1 ; end
; ================
@@ -5422,7 +5422,7 @@ SuperNerdGroup:
db 20, MAGNEMITE
db 20, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5434,7 +5434,7 @@ SuperNerdGroup:
db 22, KOFFING
db 22, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -5445,7 +5445,7 @@ SuperNerdGroup:
; party
db 24, DITTO
- db $ff ; end
+ db -1 ; end
; ================
@@ -5457,7 +5457,7 @@ SuperNerdGroup:
db 34, GRIMER
db 34, MUK
- db $ff ; end
+ db -1 ; end
; ================
@@ -5470,7 +5470,7 @@ SuperNerdGroup:
db 32, MAGNEMITE
db 32, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5481,7 +5481,7 @@ SuperNerdGroup:
; party
db 36, PORYGON
- db $ff ; end
+ db -1 ; end
; ================
@@ -5494,7 +5494,7 @@ SuperNerdGroup:
db 33, MUK
db 31, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5508,7 +5508,7 @@ SuperNerdGroup:
db 7, MAGNEMITE
db 9, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5521,7 +5521,7 @@ SuperNerdGroup:
db 27, MAGNEMITE
db 27, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5537,7 +5537,7 @@ SuperNerdGroup:
db RECOVER
db TRI_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
@@ -5553,7 +5553,7 @@ SuperNerdGroup:
db SURF
db WATERFALL
- db $ff ; end
+ db -1 ; end
; ================
@@ -5569,7 +5569,7 @@ SuperNerdGroup:
db GROWL
db STRENGTH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -5621,7 +5621,7 @@ Rival2Group:
db BODY_SLAM
db LIGHT_SCREEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -5667,7 +5667,7 @@ Rival2Group:
db FLAME_WHEEL
db SWIFT
- db $ff ; end
+ db -1 ; end
; ================
@@ -5713,7 +5713,7 @@ Rival2Group:
db SCARY_FACE
db SLASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -5759,7 +5759,7 @@ Rival2Group:
db LIGHT_SCREEN
db SAFEGUARD
- db $ff ; end
+ db -1 ; end
; ================
@@ -5805,7 +5805,7 @@ Rival2Group:
db FIRE_BLAST
db SWIFT
- db $ff ; end
+ db -1 ; end
; ================
@@ -5851,7 +5851,7 @@ Rival2Group:
db SLASH
db SCREECH
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -5868,7 +5868,7 @@ GuitaristGroup:
; party
db 34, ELECTABUZZ
- db $ff ; end
+ db -1 ; end
; ================
@@ -5882,7 +5882,7 @@ GuitaristGroup:
db 32, MAGNEMITE
db 32, MAGNEMITE
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -5900,7 +5900,7 @@ HikerGroup:
db 16, GEODUDE
db 18, MACHAMP
- db $ff ; end
+ db -1 ; end
; ================
@@ -5913,7 +5913,7 @@ HikerGroup:
db 6, GEODUDE
db 8, GEODUDE
- db $ff ; end
+ db -1 ; end
; ================
@@ -5926,7 +5926,7 @@ HikerGroup:
db 23, GEODUDE
db 23, GRAVELER
- db $ff ; end
+ db -1 ; end
; ================
@@ -5938,7 +5938,7 @@ HikerGroup:
db 23, GEODUDE
db 25, MACHOP
- db $ff ; end
+ db -1 ; end
; ================
@@ -5950,7 +5950,7 @@ HikerGroup:
db 11, GEODUDE
db 11, MACHOP
- db $ff ; end
+ db -1 ; end
; ================
@@ -5963,7 +5963,7 @@ HikerGroup:
db 14, GEODUDE
db 16, DUGTRIO
- db $ff ; end
+ db -1 ; end
; ================
@@ -5976,7 +5976,7 @@ HikerGroup:
db 27, GRAVELER
db 27, MACHOP
- db $ff ; end
+ db -1 ; end
; ================
@@ -5989,7 +5989,7 @@ HikerGroup:
db 25, GRAVELER
db 25, GOLEM
- db $ff ; end
+ db -1 ; end
; ================
@@ -6001,7 +6001,7 @@ HikerGroup:
db 35, ONIX
db 33, SWINUB
- db $ff ; end
+ db -1 ; end
; ================
@@ -6023,7 +6023,7 @@ HikerGroup:
db SAND_ATTACK
db SLASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -6038,7 +6038,7 @@ HikerGroup:
db 13, GEODUDE
db 13, GEODUDE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6051,7 +6051,7 @@ HikerGroup:
db 27, GRAVELER
db 29, MACHOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6064,7 +6064,7 @@ HikerGroup:
db 31, GRAVELER
db 31, GRAVELER
- db $ff ; end
+ db -1 ; end
; ================
@@ -6076,7 +6076,7 @@ HikerGroup:
db 31, SANDSLASH
db 33, GOLEM
- db $ff ; end
+ db -1 ; end
; ================
@@ -6088,7 +6088,7 @@ HikerGroup:
db 34, DUGTRIO
db 32, ONIX
- db $ff ; end
+ db -1 ; end
; ================
@@ -6102,7 +6102,7 @@ HikerGroup:
db 31, GOLEM
db 29, GRAVELER
- db $ff ; end
+ db -1 ; end
; ================
@@ -6113,7 +6113,7 @@ HikerGroup:
; party
db 35, MACHAMP
- db $ff ; end
+ db -1 ; end
; ================
@@ -6124,7 +6124,7 @@ HikerGroup:
; party
db 11, ONIX
- db $ff ; end
+ db -1 ; end
; ================
@@ -6152,7 +6152,7 @@ HikerGroup:
db SANDSTORM
db SLAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -6163,7 +6163,7 @@ HikerGroup:
; party
db 29, ONIX
- db $ff ; end
+ db -1 ; end
; ================
@@ -6176,7 +6176,7 @@ HikerGroup:
db 30, GRAVELER
db 32, MACHOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6204,7 +6204,7 @@ HikerGroup:
db HEADBUTT
db DIG
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6223,7 +6223,7 @@ BikerGroup:
db 20, KOFFING
db 20, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6236,7 +6236,7 @@ BikerGroup:
db 20, KOFFING
db 20, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6250,7 +6250,7 @@ BikerGroup:
db 29, KOFFING
db 30, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6261,7 +6261,7 @@ BikerGroup:
; party
db 34, FLAREON
- db $ff ; end
+ db -1 ; end
; ================
@@ -6273,7 +6273,7 @@ BikerGroup:
db 32, KOFFING
db 32, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6286,7 +6286,7 @@ BikerGroup:
db 30, CHARMELEON
db 30, WEEZING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6297,7 +6297,7 @@ BikerGroup:
; party
db 34, WEEZING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6309,7 +6309,7 @@ BikerGroup:
db 32, MAGMAR
db 32, MAGMAR
- db $ff ; end
+ db -1 ; end
; ================
@@ -6322,7 +6322,7 @@ BikerGroup:
db 30, MAGMAR
db 32, WEEZING
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6356,7 +6356,7 @@ BlaineGroup:
db FURY_ATTACK
db FIRE_BLAST
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6375,7 +6375,7 @@ BurglarGroup:
db 25, MAGMAR
db 23, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6397,7 +6397,7 @@ BurglarGroup:
db SLUDGE
db SMOKESCREEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -6411,7 +6411,7 @@ BurglarGroup:
db 25, KOFFING
db 30, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6430,7 +6430,7 @@ FirebreatherGroup:
db 32, WEEZING
db 29, MAGMAR
- db $ff ; end
+ db -1 ; end
; ================
@@ -6441,7 +6441,7 @@ FirebreatherGroup:
; party
db 17, CHARMELEON
- db $ff ; end
+ db -1 ; end
; ================
@@ -6454,7 +6454,7 @@ FirebreatherGroup:
db 16, GROWLITHE
db 15, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6466,7 +6466,7 @@ FirebreatherGroup:
db 32, KOFFING
db 32, SLUGMA
- db $ff ; end
+ db -1 ; end
; ================
@@ -6478,7 +6478,7 @@ FirebreatherGroup:
db 6, KOFFING
db 6, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
@@ -6490,7 +6490,7 @@ FirebreatherGroup:
db 11, MAGMAR
db 13, MAGMAR
- db $ff ; end
+ db -1 ; end
; ================
@@ -6501,7 +6501,7 @@ FirebreatherGroup:
; party
db 9, VULPIX
- db $ff ; end
+ db -1 ; end
; ================
@@ -6514,7 +6514,7 @@ FirebreatherGroup:
db 31, FLAREON
db 28, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6534,7 +6534,7 @@ JugglerGroup:
db 10, VOLTORB
db 14, VOLTORB
- db $ff ; end
+ db -1 ; end
; ================
@@ -6547,7 +6547,7 @@ JugglerGroup:
db 29, MAGMAR
db 29, MACHOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6561,7 +6561,7 @@ JugglerGroup:
db 33, ELECTRODE
db 33, ELECTRODE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6575,7 +6575,7 @@ JugglerGroup:
db 14, VOLTORB
db 18, VOLTORB
- db $ff ; end
+ db -1 ; end
; ================
@@ -6589,7 +6589,7 @@ JugglerGroup:
db 26, VOLTORB
db 30, ELECTRODE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6603,7 +6603,7 @@ JugglerGroup:
db 26, VOLTORB
db 30, ELECTRODE
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6623,7 +6623,7 @@ BlackbeltGroup:
db 27, ONIX
db 32, MACHOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6639,7 +6639,7 @@ BlackbeltGroup:
db JUMP_KICK
db FOCUS_ENERGY
- db $ff ; end
+ db -1 ; end
; ================
@@ -6673,7 +6673,7 @@ BlackbeltGroup:
db MUD_SLAP
db SWIFT
- db $ff ; end
+ db -1 ; end
; ================
@@ -6689,7 +6689,7 @@ BlackbeltGroup:
db ICE_PUNCH
db FIRE_PUNCH
- db $ff ; end
+ db -1 ; end
; ================
@@ -6711,7 +6711,7 @@ BlackbeltGroup:
db SEISMIC_TOSS
db ROCK_SLIDE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6723,7 +6723,7 @@ BlackbeltGroup:
db 34, HITMONLEE
db 34, HITMONCHAN
- db $ff ; end
+ db -1 ; end
; ================
@@ -6736,7 +6736,7 @@ BlackbeltGroup:
db 23, MANKEY
db 25, PRIMEAPE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6747,7 +6747,7 @@ BlackbeltGroup:
; party
db 28, MACHOKE
- db $ff ; end
+ db -1 ; end
; ================
@@ -6760,7 +6760,7 @@ BlackbeltGroup:
db 32, MACHOKE
db 34, MACHOKE
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6794,7 +6794,7 @@ ExecutiveMGroup:
db BITE
db FAINT_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
@@ -6810,7 +6810,7 @@ ExecutiveMGroup:
db CONFUSE_RAY
db WING_ATTACK
- db $ff ; end
+ db -1 ; end
; ================
@@ -6856,7 +6856,7 @@ ExecutiveMGroup:
db SLUDGE
db SMOKESCREEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -6869,7 +6869,7 @@ ExecutiveMGroup:
db 24, RATICATE
db 22, KOFFING
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -6886,7 +6886,7 @@ PsychicGroup:
; party
db 26, GIRAFARIG
- db $ff ; end
+ db -1 ; end
; ================
@@ -6897,7 +6897,7 @@ PsychicGroup:
; party
db 37, KADABRA
- db $ff ; end
+ db -1 ; end
; ================
@@ -6910,7 +6910,7 @@ PsychicGroup:
db 30, EXEGGCUTE
db 30, EXEGGUTOR
- db $ff ; end
+ db -1 ; end
; ================
@@ -6921,7 +6921,7 @@ PsychicGroup:
; party
db 34, XATU
- db $ff ; end
+ db -1 ; end
; ================
@@ -6937,7 +6937,7 @@ PsychicGroup:
db DREAM_EATER
db 0
- db $ff ; end
+ db -1 ; end
; ================
@@ -6959,7 +6959,7 @@ PsychicGroup:
db WATER_GUN
db CONFUSION
- db $ff ; end
+ db -1 ; end
; ================
@@ -6987,7 +6987,7 @@ PsychicGroup:
db CONFUSION
db 0
- db $ff ; end
+ db -1 ; end
; ================
@@ -7009,7 +7009,7 @@ PsychicGroup:
db RECOVER
db FUTURE_SIGHT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7020,7 +7020,7 @@ PsychicGroup:
; party
db 36, ESPEON
- db $ff ; end
+ db -1 ; end
; ================
@@ -7033,7 +7033,7 @@ PsychicGroup:
db 30, EXEGGCUTE
db 34, GIRAFARIG
- db $ff ; end
+ db -1 ; end
; ================
@@ -7046,7 +7046,7 @@ PsychicGroup:
db 32, EXEGGCUTE
db 35, EXEGGCUTE
- db $ff ; end
+ db -1 ; end
; ================
@@ -7058,7 +7058,7 @@ PsychicGroup:
db 29, DROWZEE
db 33, HYPNO
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -7075,7 +7075,7 @@ PicnickerGroup:
; party
db 9, NIDORAN_F
- db $ff ; end
+ db -1 ; end
; ================
@@ -7088,7 +7088,7 @@ PicnickerGroup:
db 9, HOPPIP
db 12, BULBASAUR
- db $ff ; end
+ db -1 ; end
; ================
@@ -7104,7 +7104,7 @@ PicnickerGroup:
db QUICK_ATTACK
db DOUBLE_TEAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -7115,7 +7115,7 @@ PicnickerGroup:
; party
db 15, VULPIX
- db $ff ; end
+ db -1 ; end
; ================
@@ -7126,7 +7126,7 @@ PicnickerGroup:
; party
db 36, NIDOQUEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -7137,7 +7137,7 @@ PicnickerGroup:
; party
db 34, FLAAFFY
- db $ff ; end
+ db -1 ; end
; ================
@@ -7149,7 +7149,7 @@ PicnickerGroup:
db 31, FURRET
db 33, RAPIDASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -7160,7 +7160,7 @@ PicnickerGroup:
; party
db 33, SEAKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -7173,7 +7173,7 @@ PicnickerGroup:
db 14, HOPPIP
db 17, IVYSAUR
- db $ff ; end
+ db -1 ; end
; ================
@@ -7185,7 +7185,7 @@ PicnickerGroup:
db 16, PONYTA
db 16, PONYTA
- db $ff ; end
+ db -1 ; end
; ================
@@ -7197,7 +7197,7 @@ PicnickerGroup:
db 15, WEEPINBELL
db 15, NIDORINA
- db $ff ; end
+ db -1 ; end
; ================
@@ -7210,7 +7210,7 @@ PicnickerGroup:
db 19, NIDORINO
db 21, NIDOQUEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -7222,7 +7222,7 @@ PicnickerGroup:
db 32, SKIPLOOM
db 32, SKIPLOOM
- db $ff ; end
+ db -1 ; end
; ================
@@ -7234,7 +7234,7 @@ PicnickerGroup:
db 30, NIDORINA
db 34, RAICHU
- db $ff ; end
+ db -1 ; end
; ================
@@ -7247,7 +7247,7 @@ PicnickerGroup:
db 26, SKIPLOOM
db 29, IVYSAUR
- db $ff ; end
+ db -1 ; end
; ================
@@ -7263,7 +7263,7 @@ PicnickerGroup:
db DOUBLESLAP
db MINIMIZE
- db $ff ; end
+ db -1 ; end
; ================
@@ -7279,7 +7279,7 @@ PicnickerGroup:
db MINIMIZE
db METRONOME
- db $ff ; end
+ db -1 ; end
; ================
@@ -7291,7 +7291,7 @@ PicnickerGroup:
db 32, PONYTA
db 32, PONYTA
- db $ff ; end
+ db -1 ; end
; ================
@@ -7302,7 +7302,7 @@ PicnickerGroup:
; party
db 37, EXEGGUTOR
- db $ff ; end
+ db -1 ; end
; ================
@@ -7318,7 +7318,7 @@ PicnickerGroup:
db DOUBLESLAP
db MINIMIZE
- db $ff ; end
+ db -1 ; end
; ================
@@ -7346,7 +7346,7 @@ PicnickerGroup:
db FIRE_SPIN
db SUNNY_DAY
- db $ff ; end
+ db -1 ; end
; ================
@@ -7359,7 +7359,7 @@ PicnickerGroup:
db 26, NIDORINO
db 26, NIDOQUEEN
- db $ff ; end
+ db -1 ; end
; ================
@@ -7387,7 +7387,7 @@ PicnickerGroup:
db TAIL_WHIP
db BODY_SLAM
- db $ff ; end
+ db -1 ; end
; ================
@@ -7400,7 +7400,7 @@ PicnickerGroup:
db 30, SKIPLOOM
db 32, IVYSAUR
- db $ff ; end
+ db -1 ; end
; ================
@@ -7428,7 +7428,7 @@ PicnickerGroup:
db HEADBUTT
db MUD_SLAP
- db $ff ; end
+ db -1 ; end
; ================
@@ -7444,7 +7444,7 @@ PicnickerGroup:
db MOONLIGHT
db MINIMIZE
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -7461,7 +7461,7 @@ CamperGroup:
; party
db 9, NIDORAN_M
- db $ff ; end
+ db -1 ; end
; ================
@@ -7472,7 +7472,7 @@ CamperGroup:
; party
db 14, PSYDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7485,7 +7485,7 @@ CamperGroup:
db 10, ZUBAT
db 14, DIGLETT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7497,7 +7497,7 @@ CamperGroup:
db 13, SANDSHREW
db 15, MARILL
- db $ff ; end
+ db -1 ; end
; ================
@@ -7508,7 +7508,7 @@ CamperGroup:
; party
db 36, NIDOKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -7519,7 +7519,7 @@ CamperGroup:
; party
db 34, NIDOKING
- db $ff ; end
+ db -1 ; end
; ================
@@ -7531,7 +7531,7 @@ CamperGroup:
db 33, GOLDUCK
db 31, SANDSLASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -7544,7 +7544,7 @@ CamperGroup:
db 29, PRIMEAPE
db 29, POLIWRATH
- db $ff ; end
+ db -1 ; end
; ================
@@ -7555,7 +7555,7 @@ CamperGroup:
; party
db 15, NIDORINO
- db $ff ; end
+ db -1 ; end
; ================
@@ -7566,7 +7566,7 @@ CamperGroup:
; party
db 15, NIDORINO
- db $ff ; end
+ db -1 ; end
; ================
@@ -7577,7 +7577,7 @@ CamperGroup:
; party
db 17, MANKEY
- db $ff ; end
+ db -1 ; end
; ================
@@ -7590,7 +7590,7 @@ CamperGroup:
db 17, GEODUDE
db 23, PSYDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7603,7 +7603,7 @@ CamperGroup:
db 23, GEODUDE
db 26, PSYDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7617,7 +7617,7 @@ CamperGroup:
db 40, GOLBAT
db 42, GOLDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7631,7 +7631,7 @@ CamperGroup:
db 40, GOLBAT
db 42, GOLDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7645,7 +7645,7 @@ CamperGroup:
db 40, GOLBAT
db 42, GOLDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7659,7 +7659,7 @@ CamperGroup:
db 40, GOLBAT
db 42, GOLDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7670,7 +7670,7 @@ CamperGroup:
; party
db 37, SANDSLASH
- db $ff ; end
+ db -1 ; end
; ================
@@ -7683,7 +7683,7 @@ CamperGroup:
db 17, SANDSLASH
db 19, ZUBAT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7697,7 +7697,7 @@ CamperGroup:
db 30, SLUGMA
db 32, PSYDUCK
- db $ff ; end
+ db -1 ; end
; ================
@@ -7731,7 +7731,7 @@ CamperGroup:
db SURF
db PSYCH_UP
- db $ff ; end
+ db -1 ; end
; ================
@@ -7744,7 +7744,7 @@ CamperGroup:
db 30, PRIMEAPE
db 30, TAUROS
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -7778,7 +7778,7 @@ ExecutiveFGroup:
db HAZE
db NIGHT_SHADE
- db $ff ; end
+ db -1 ; end
; ================
@@ -7806,7 +7806,7 @@ ExecutiveFGroup:
db HAZE
db 0
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -7825,7 +7825,7 @@ SageGroup:
db 3, BELLSPROUT
db 3, BELLSPROUT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7838,7 +7838,7 @@ SageGroup:
db 3, BELLSPROUT
db 3, BELLSPROUT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7849,7 +7849,7 @@ SageGroup:
; party
db 6, BELLSPROUT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7861,7 +7861,7 @@ SageGroup:
db 7, BELLSPROUT
db 7, HOOTHOOT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7872,7 +7872,7 @@ SageGroup:
; party
db 22, HAUNTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -7887,7 +7887,7 @@ SageGroup:
db 16, GASTLY
db 16, GASTLY
- db $ff ; end
+ db -1 ; end
; ================
@@ -7900,7 +7900,7 @@ SageGroup:
db 3, BELLSPROUT
db 3, BELLSPROUT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7911,7 +7911,7 @@ SageGroup:
; party
db 6, BELLSPROUT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7924,7 +7924,7 @@ SageGroup:
db 7, BELLSPROUT
db 10, HOOTHOOT
- db $ff ; end
+ db -1 ; end
; ================
@@ -7936,7 +7936,7 @@ SageGroup:
db 32, NOCTOWL
db 32, FLAREON
- db $ff ; end
+ db -1 ; end
; ================
@@ -7948,7 +7948,7 @@ SageGroup:
db 32, NOCTOWL
db 32, JOLTEON
- db $ff ; end
+ db -1 ; end
; ================
@@ -7960,7 +7960,7 @@ SageGroup:
db 32, NOCTOWL
db 32, VAPOREON
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -7979,7 +7979,7 @@ MediumGroup:
db 20, HAUNTER
db 20, GASTLY
- db $ff ; end
+ db -1 ; end
; ================
@@ -7991,7 +7991,7 @@ MediumGroup:
db 20, HAUNTER
db 20, HAUNTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -8002,7 +8002,7 @@ MediumGroup:
; party
db 25, HAUNTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -8013,7 +8013,7 @@ MediumGroup:
; party
db 25, HAUNTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -8024,7 +8024,7 @@ MediumGroup:
; party
db 25, HAUNTER
- db $ff ; end
+ db -1 ; end
; ================
@@ -8036,7 +8036,7 @@ MediumGroup:
db 35, DROWZEE
db 35, HYPNO
- db $ff ; end
+ db -1 ; end
; ================
@@ -8048,7 +8048,7 @@ MediumGroup:
db 34, SLOWPOKE
db 36, SLOWBRO
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8067,7 +8067,7 @@ BoarderGroup:
db 25, DEWGONG
db 24, SEEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -8079,7 +8079,7 @@ BoarderGroup:
db 26, SWINUB
db 26, SWINUB
- db $ff ; end
+ db -1 ; end
; ================
@@ -8092,7 +8092,7 @@ BoarderGroup:
db 25, CLOYSTER
db 24, SHELLDER
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8109,7 +8109,7 @@ PokefanMGroup:
; party
db 14, RAICHU, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8120,7 +8120,7 @@ PokefanMGroup:
; party
db 17, PIKACHU, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8131,7 +8131,7 @@ PokefanMGroup:
; party
db 33, QUAGSIRE, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8147,7 +8147,7 @@ PokefanMGroup:
db 23, PIKACHU, BERRY
db 23, PIKACHU, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8160,7 +8160,7 @@ PokefanMGroup:
db 29, CHARMANDER, BERRY
db 29, SQUIRTLE, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8171,7 +8171,7 @@ PokefanMGroup:
; party
db 33, PSYDUCK, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8182,7 +8182,7 @@ PokefanMGroup:
; party
db 13, SNUBBULL, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8195,7 +8195,7 @@ PokefanMGroup:
db 28, MEOWTH, BERRY
db 28, MEOWTH, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8206,7 +8206,7 @@ PokefanMGroup:
; party
db 32, DELIBIRD, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8217,7 +8217,7 @@ PokefanMGroup:
; party
db 19, PIKACHU, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8228,7 +8228,7 @@ PokefanMGroup:
; party
db 36, PIKACHU, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8241,7 +8241,7 @@ PokefanMGroup:
db 29, SLOWKING, BERRY
db 29, SEAKING, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8252,7 +8252,7 @@ PokefanMGroup:
; party
db 35, PHANPY, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8263,7 +8263,7 @@ PokefanMGroup:
; party
db 35, TEDDIURSA, BERRY
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8282,7 +8282,7 @@ KimonoGirlGroup:
db 20, VULPIX
db 18, SKIPLOOM
- db $ff ; end
+ db -1 ; end
; ================
@@ -8293,7 +8293,7 @@ KimonoGirlGroup:
; party
db 17, FLAREON
- db $ff ; end
+ db -1 ; end
; ================
@@ -8304,7 +8304,7 @@ KimonoGirlGroup:
; party
db 17, ESPEON
- db $ff ; end
+ db -1 ; end
; ================
@@ -8315,7 +8315,7 @@ KimonoGirlGroup:
; party
db 17, UMBREON
- db $ff ; end
+ db -1 ; end
; ================
@@ -8326,7 +8326,7 @@ KimonoGirlGroup:
; party
db 17, VAPOREON
- db $ff ; end
+ db -1 ; end
; ================
@@ -8337,7 +8337,7 @@ KimonoGirlGroup:
; party
db 17, JOLTEON
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8355,7 +8355,7 @@ TwinsGroup:
db 10, SPINARAK
db 10, LEDYBA
- db $ff ; end
+ db -1 ; end
; ================
@@ -8377,7 +8377,7 @@ TwinsGroup:
db POUND
db DISABLE
- db $ff ; end
+ db -1 ; end
; ================
@@ -8399,7 +8399,7 @@ TwinsGroup:
db DOUBLESLAP
db METRONOME
- db $ff ; end
+ db -1 ; end
; ================
@@ -8411,7 +8411,7 @@ TwinsGroup:
db 10, LEDYBA
db 10, SPINARAK
- db $ff ; end
+ db -1 ; end
; ================
@@ -8423,7 +8423,7 @@ TwinsGroup:
db 35, VICTREEBEL
db 35, VILEPLUME
- db $ff ; end
+ db -1 ; end
; ================
@@ -8435,7 +8435,7 @@ TwinsGroup:
db 35, VILEPLUME
db 35, VICTREEBEL
- db $ff ; end
+ db -1 ; end
; ================
@@ -8447,7 +8447,7 @@ TwinsGroup:
db 31, TEDDIURSA
db 31, PHANPY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8459,7 +8459,7 @@ TwinsGroup:
db 31, PHANPY
db 31, TEDDIURSA
- db $ff ; end
+ db -1 ; end
; ================
@@ -8481,7 +8481,7 @@ TwinsGroup:
db ICE_BEAM
db HEADBUTT
- db $ff ; end
+ db -1 ; end
; ================
@@ -8503,7 +8503,7 @@ TwinsGroup:
db FLAMETHROWER
db HEADBUTT
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8520,7 +8520,7 @@ PokefanFGroup:
; party
db 14, SNUBBULL, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8531,7 +8531,7 @@ PokefanFGroup:
; party
db 17, PIKACHU, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8542,7 +8542,7 @@ PokefanFGroup:
; party
db 18, SNUBBULL, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8553,7 +8553,7 @@ PokefanFGroup:
; party
db 30, GRANBULL, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8568,7 +8568,7 @@ PokefanFGroup:
db 28, FURRET, BERRY
db 23, SENTRET, BERRY
- db $ff ; end
+ db -1 ; end
; ================
@@ -8579,7 +8579,7 @@ PokefanFGroup:
; party
db 16, MEOWTH, BERRY
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8631,7 +8631,7 @@ RedGroup:
db BLIZZARD
db WHIRLPOOL
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8683,7 +8683,7 @@ BlueGroup:
db FLAMETHROWER
db EXTREMESPEED
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8700,7 +8700,7 @@ OfficerGroup:
; party
db 17, GROWLITHE
- db $ff ; end
+ db -1 ; end
; ================
@@ -8712,7 +8712,7 @@ OfficerGroup:
db 14, GROWLITHE
db 14, GROWLITHE
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8730,7 +8730,7 @@ GruntFGroup:
db 9, ZUBAT
db 11, EKANS
- db $ff ; end
+ db -1 ; end
; ================
@@ -8741,7 +8741,7 @@ GruntFGroup:
; party
db 26, ARBOK
- db $ff ; end
+ db -1 ; end
; ================
@@ -8753,7 +8753,7 @@ GruntFGroup:
db 25, GLOOM
db 25, GLOOM
- db $ff ; end
+ db -1 ; end
; ================
@@ -8767,7 +8767,7 @@ GruntFGroup:
db 21, EKANS
db 24, GLOOM
- db $ff ; end
+ db -1 ; end
; ================
@@ -8789,7 +8789,7 @@ GruntFGroup:
db STUN_SPORE
db SLEEP_POWDER
- db $ff ; end
+ db -1 ; end
; ================
; ================================
@@ -8823,7 +8823,7 @@ MysticalmanGroup:
db THUNDER
db ROLLOUT
- db $ff ; end
+ db -1 ; end
; ================
; ================================
diff --git a/data/trainers/party_pointers.asm b/data/trainers/party_pointers.asm
index c0b3d4538..887544126 100644
--- a/data/trainers/party_pointers.asm
+++ b/data/trainers/party_pointers.asm
@@ -1,6 +1,7 @@
-; Each trainer class has its own group. See trainers.asm.
+; Groups are defined in data/trainers/parties.asm.
TrainerGroups: ; 0x39999
+; entries correspond to trainer classes (see constants/trainer_constants.asm)
dw FalknerGroup
dw WhitneyGroup
dw BugsyGroup
diff --git a/data/trainers/pic_pointers.asm b/data/trainers/pic_pointers.asm
index 201b44200..6fc444eb6 100644
--- a/data/trainers/pic_pointers.asm
+++ b/data/trainers/pic_pointers.asm
@@ -1,3 +1,5 @@
+; Pics are defined in gfx/pics.asm
+
TrainerPicPointers::
; entries correspond to trainer classes (see constants/trainer_constants.asm)
dba_pic FalknerPic
diff --git a/data/trainers/sprites.asm b/data/trainers/sprites.asm
new file mode 100644
index 000000000..df6c04920
--- /dev/null
+++ b/data/trainers/sprites.asm
@@ -0,0 +1,68 @@
+BTTrainerClassSprites:
+; entries correspond to trainer classes
+ db SPRITE_FALKNER
+ db SPRITE_WHITNEY
+ db SPRITE_BUGSY
+ db SPRITE_MORTY
+ db SPRITE_PRYCE
+ db SPRITE_JASMINE
+ db SPRITE_CHUCK
+ db SPRITE_CLAIR
+ db SPRITE_SILVER
+ db SPRITE_OAK
+ db SPRITE_WILL
+ db SPRITE_CHRIS
+ db SPRITE_BRUNO
+ db SPRITE_KAREN
+ db SPRITE_KOGA
+ db SPRITE_LANCE
+ db SPRITE_BROCK
+ db SPRITE_MISTY
+ db SPRITE_SURGE
+ db SPRITE_SCIENTIST
+ db SPRITE_ERIKA
+ db SPRITE_YOUNGSTER
+ db SPRITE_YOUNGSTER
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_JANINE
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_BUENA
+ db SPRITE_SUPER_NERD
+ db SPRITE_ROCKET
+ db SPRITE_GENTLEMAN
+ db SPRITE_BUENA
+ db SPRITE_TEACHER
+ db SPRITE_SABRINA
+ db SPRITE_BUG_CATCHER
+ db SPRITE_FISHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_SAILOR
+ db SPRITE_SUPER_NERD
+ db SPRITE_BLUE
+ db SPRITE_ROCKER
+ db SPRITE_POKEFAN_M
+ db SPRITE_BIKER
+ db SPRITE_BLAINE
+ db SPRITE_PHARMACIST
+ db SPRITE_FISHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_BLACK_BELT
+ db SPRITE_ROCKET
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_YOUNGSTER
+ db SPRITE_ROCKET_GIRL
+ db SPRITE_SAGE
+ db SPRITE_GRANNY
+ db SPRITE_ROCKER
+ db SPRITE_POKEFAN_M
+ db SPRITE_KIMONO_GIRL
+ db SPRITE_TWIN
+ db SPRITE_POKEFAN_F
+ db SPRITE_RED
+ db SPRITE_BLUE
+ db SPRITE_OFFICER
+ db SPRITE_ROCKET_GIRL
diff --git a/data/type_names.asm b/data/types/names.asm
index d86fd62c7..ca810aea3 100644
--- a/data/type_names.asm
+++ b/data/types/names.asm
@@ -48,3 +48,5 @@ Ghost: db "GHOST@"
Steel: db "STEEL@"
Dragon: db "DRAGON@"
Dark: db "DARK@"
+
+; 50a28
diff --git a/data/types/search_strings.asm b/data/types/search_strings.asm
new file mode 100644
index 000000000..7e6eb71c2
--- /dev/null
+++ b/data/types/search_strings.asm
@@ -0,0 +1,21 @@
+PokedexTypeSearchStrings: ; 40fe4
+; entries correspond with PokedexTypeSearchConversionTable (see data/types/search_types.asm)
+ db " ---- @"
+ db " NORMAL @"
+ db " FIRE @"
+ db " WATER @"
+ db " GRASS @"
+ db "ELECTRIC@"
+ db " ICE @"
+ db "FIGHTING@"
+ db " POISON @"
+ db " GROUND @"
+ db " FLYING @"
+ db "PSYCHIC @"
+ db " BUG @"
+ db " ROCK @"
+ db " GHOST @"
+ db " DRAGON @"
+ db " DARK @"
+ db " STEEL @"
+; 41086
diff --git a/data/types/search_types.asm b/data/types/search_types.asm
new file mode 100644
index 000000000..2c5dbd4f4
--- /dev/null
+++ b/data/types/search_types.asm
@@ -0,0 +1,20 @@
+PokedexTypeSearchConversionTable: ; 410f6
+; entries correspond with PokedexTypeSearchStrings (see data/types/search_strings.asm)
+ db NORMAL
+ db FIRE
+ db WATER
+ db GRASS
+ db ELECTRIC
+ db ICE
+ db FIGHTING
+ db POISON
+ db GROUND
+ db FLYING
+ db PSYCHIC
+ db BUG
+ db ROCK
+ db GHOST
+ db DRAGON
+ db DARK
+ db STEEL
+; 41107
diff --git a/data/unknown_table.asm b/data/unknown_table.asm
new file mode 100755
index 000000000..026ec5275
--- /dev/null
+++ b/data/unknown_table.asm
@@ -0,0 +1,13 @@
+Unreferenced_53d84:
+ db $1a, $15
+ db $33, $16
+ db $4b, $17
+ db $62, $18
+ db $79, $19
+ db $90, $1a
+ db $a8, $1b
+ db $c4, $1c
+ db $e0, $1d
+ db $f6, $1e
+ db $ff, $1f
+ db $ff, $20
diff --git a/data/unown_walls.asm b/data/unown_walls.asm
new file mode 100644
index 000000000..4a7b985c7
--- /dev/null
+++ b/data/unown_walls.asm
@@ -0,0 +1,54 @@
+unownwall: MACRO
+rept _NARG
+if \1 == "-"
+x = $64
+else
+if \1 >= "Y"
+x = 2 * (\1 - "Y") + $60
+else
+if \1 >= "Q"
+x = 2 * (\1 - "Q") + $40
+else
+if \1 >= "I"
+x = 2 * (\1 - "I") + $20
+else
+x = 2 * (\1 - "A")
+endc
+endc
+endc
+endc
+ db x
+shift
+endr
+ db -1 ; end
+ENDM
+
+UnownWalls: ; 8aebc
+; UNOWNWORDS_ESCAPE
+ ; db $08, $44, $04, $00, $2e, $08, $ff
+ unownwall "E", "S", "C", "A", "P", "E"
+; UNOWNWORDS_LIGHT
+ ; db $26, $20, $0c, $0e, $46, $ff
+ unownwall "L", "I", "G", "H", "T"
+; UNOWNWORDS_WATER
+ ; db $4c, $00, $46, $08, $42, $ff
+ unownwall "W", "A", "T", "E", "R"
+; UNOWNWORDS_HO_OH
+ ; db $0e, $2c, $64, $2c, $0e, $ff
+ unownwall "H", "O", "-", "O", "H"
+; 8aed5
+
+MenuDataHeaders_UnownWalls: ; 0x8aed5
+; UNOWNWORDS_ESCAPE
+ db $40 ; flags
+ menu_coords 3, 4, 16, 9
+; UNOWNWORDS_LIGHT
+ db $40 ; flags
+ menu_coords 4, 4, 15, 9
+; UNOWNWORDS_WATER
+ db $40 ; flags
+ menu_coords 4, 4, 15, 9
+; UNOWNWORDS_HO_OH
+ db $40 ; flags
+ menu_coords 4, 4, 15, 9
+; 8aee9
diff --git a/data/unused_text/dakutens.asm b/data/unused_text/dakutens.asm
new file mode 100644
index 000000000..82e884fdf
--- /dev/null
+++ b/data/unused_text/dakutens.asm
@@ -0,0 +1,15 @@
+Dakutens: ; unused
+ db "かが", "きぎ", "くぐ", "けげ", "こご"
+ db "さざ", "しじ", "すず", "せぜ", "そぞ"
+ db "ただ", "ちぢ", "つづ", "てで", "とど"
+ db "はば", "ひび", "ふぶ", "へべ", "ほぼ"
+ db "カガ", "キギ", "クグ", "ケゲ", "コゴ"
+ db "サザ", "シジ", "スズ", "セゼ", "ソゾ"
+ db "タダ", "チヂ", "ツヅ", "テデ", "トド"
+ db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
+ db -1 ; end
+
+Handakutens: ; unused
+ db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
+ db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
+ db -1 ; end
diff --git a/text/unused_gen_1_trainers.asm b/data/unused_text/gen_1_trainers.asm
index 9a637d6a2..e7e985f84 100644
--- a/text/unused_gen_1_trainers.asm
+++ b/data/unused_text/gen_1_trainers.asm
@@ -1,5 +1,4 @@
-GetGen1TrainerClassName: ; 50a28
-; XXX
+Unreferenced_GetGen1TrainerClassName: ; 50a28
ld hl, .Strings
ld a, [TrainerClass]
dec a
diff --git a/text/unused_sweet_honey.asm b/data/unused_text/sweet_honey.asm
index 9bfa4f6b1..9bfa4f6b1 100644
--- a/text/unused_sweet_honey.asm
+++ b/data/unused_text/sweet_honey.asm
diff --git a/data/wild/fish.asm b/data/wild/fish.asm
index de7e57a33..91a887b53 100644
--- a/data/wild/fish.asm
+++ b/data/wild/fish.asm
@@ -1,3 +1,5 @@
+time_group EQUS "0," ; use the nth TimeFishGroups entry
+
FishGroups: ; 92488
dbwww 50 percent + 1, .Shore_Old, .Shore_Good, .Shore_Super
dbwww 50 percent + 1, .Ocean_Old, .Ocean_Good, .Ocean_Super
@@ -21,10 +23,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, KRABBY, 20
db 90 percent + 1, KRABBY, 20
- db 100 percent, 0, 0
+ db 100 percent, time_group 0
.Shore_Super: ; 924f8
db 40 percent, KRABBY, 40
- db 70 percent, 0, 1
+ db 70 percent, time_group 1
db 90 percent + 1, KRABBY, 40
db 100 percent, KINGLER, 40
@@ -36,10 +38,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, TENTACOOL, 20
db 90 percent + 1, CHINCHOU, 20
- db 100 percent, 0, 2
+ db 100 percent, time_group 2
.Ocean_Super: ; 92519
db 40 percent, CHINCHOU, 40
- db 70 percent, 0, 3
+ db 70 percent, time_group 3
db 90 percent + 1, TENTACRUEL, 40
db 100 percent, LANTURN, 40
@@ -51,10 +53,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, GOLDEEN, 20
db 90 percent + 1, GOLDEEN, 20
- db 100 percent, 0, 4
+ db 100 percent, time_group 4
.Lake_Super: ; 9253a
db 40 percent, GOLDEEN, 40
- db 70 percent, 0, 5
+ db 70 percent, time_group 5
db 90 percent + 1, MAGIKARP, 40
db 100 percent, SEAKING, 40
@@ -66,10 +68,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, POLIWAG, 20
db 90 percent + 1, POLIWAG, 20
- db 100 percent, 0, 6
+ db 100 percent, time_group 6
.Pond_Super: ; 9255b
db 40 percent, POLIWAG, 40
- db 70 percent, 0, 7
+ db 70 percent, time_group 7
db 90 percent + 1, MAGIKARP, 40
db 100 percent, POLIWAG, 40
@@ -81,10 +83,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, MAGIKARP, 20
db 90 percent + 1, MAGIKARP, 20
- db 100 percent, 0, 8
+ db 100 percent, time_group 8
.Dratini_Super: ; 9257c
db 40 percent, MAGIKARP, 40
- db 70 percent, 0, 9
+ db 70 percent, time_group 9
db 90 percent + 1, MAGIKARP, 40
db 100 percent, DRAGONAIR, 40
@@ -96,10 +98,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, QWILFISH, 20
db 90 percent + 1, QWILFISH, 20
- db 100 percent, 0, 10
+ db 100 percent, time_group 10
.Qwilfish_Swarm_Super: ; 9259d
db 40 percent, QWILFISH, 40
- db 70 percent, 0, 11
+ db 70 percent, time_group 11
db 90 percent + 1, QWILFISH, 40
db 100 percent, QWILFISH, 40
@@ -111,10 +113,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, REMORAID, 20
db 90 percent + 1, REMORAID, 20
- db 100 percent, 0, 12
+ db 100 percent, time_group 12
.Remoraid_Swarm_Super: ; 925be
db 40 percent, REMORAID, 40
- db 70 percent, 0, 13
+ db 70 percent, time_group 13
db 90 percent + 1, REMORAID, 40
db 100 percent, REMORAID, 40
@@ -126,10 +128,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, MAGIKARP, 20
db 90 percent + 1, MAGIKARP, 20
- db 100 percent, 0, 14
+ db 100 percent, time_group 14
.Gyarados_Super: ; 925df
db 40 percent, MAGIKARP, 40
- db 70 percent, 0, 15
+ db 70 percent, time_group 15
db 90 percent + 1, MAGIKARP, 40
db 100 percent, MAGIKARP, 40
@@ -141,10 +143,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 10
db 70 percent, MAGIKARP, 10
db 90 percent + 1, MAGIKARP, 10
- db 100 percent, 0, 16
+ db 100 percent, time_group 16
.Dratini_2_Super: ; 92600
db 40 percent, MAGIKARP, 10
- db 70 percent, 0, 17
+ db 70 percent, time_group 17
db 90 percent + 1, MAGIKARP, 10
db 100 percent, DRAGONAIR, 10
@@ -156,10 +158,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, KRABBY, 20
db 90 percent + 1, KRABBY, 20
- db 100 percent, 0, 18
+ db 100 percent, time_group 18
.WhirlIslands_Super: ; 92621
db 40 percent, KRABBY, 40
- db 70 percent, 0, 19
+ db 70 percent, time_group 19
db 90 percent + 1, KINGLER, 40
db 100 percent, SEADRA, 40
@@ -173,11 +175,11 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, TENTACOOL, 20
db 90 percent + 1, TENTACOOL, 20
- db 100 percent, 0, 20
+ db 100 percent, time_group 20
.Qwilfish_NoSwarm_Super:
.Qwilfish_Super: ; 92642
db 40 percent, TENTACOOL, 40
- db 70 percent, 0, 21
+ db 70 percent, time_group 21
db 90 percent + 1, MAGIKARP, 40
db 100 percent, QWILFISH, 40
@@ -189,10 +191,10 @@ FishGroups: ; 92488
db 35 percent, MAGIKARP, 20
db 70 percent, POLIWAG, 20
db 90 percent + 1, POLIWAG, 20
- db 100 percent, 0, 6
+ db 100 percent, time_group 6
.Remoraid_Super: ; 92663
db 40 percent, POLIWAG, 40
- db 70 percent, 0, 7
+ db 70 percent, time_group 7
db 90 percent + 1, MAGIKARP, 40
db 100 percent, REMORAID, 40
; 9266f
diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm
index e825930cc..7860110ca 100644
--- a/data/wild/treemon_maps.asm
+++ b/data/wild/treemon_maps.asm
@@ -4,47 +4,47 @@ treemon_map: MACRO
ENDM
TreeMonMaps: ; b825e
- treemon_map ROUTE_26, 4
- treemon_map ROUTE_27, 4
- treemon_map ROUTE_28, 0
- treemon_map ROUTE_29, 3
- treemon_map ROUTE_30, 3
- treemon_map ROUTE_31, 3
- treemon_map ROUTE_32, 4
- treemon_map ROUTE_33, 2
- treemon_map ROUTE_34, 3
- treemon_map ROUTE_35, 3
- treemon_map ROUTE_36, 3
- treemon_map ROUTE_37, 3
- treemon_map ROUTE_38, 3
- treemon_map ROUTE_39, 3
- treemon_map ROUTE_40, 0
- treemon_map ROUTE_41, 0
- treemon_map ROUTE_42, 2
- treemon_map ROUTE_43, 5
- treemon_map ROUTE_44, 1
- treemon_map ROUTE_45, 1
- treemon_map ROUTE_46, 1
- treemon_map NEW_BARK_TOWN, 0
- treemon_map CHERRYGROVE_CITY, 0
- treemon_map VIOLET_CITY, 0
- treemon_map AZALEA_TOWN, 2
- treemon_map CIANWOOD_CITY, 0
- treemon_map GOLDENROD_CITY, 0
- treemon_map OLIVINE_CITY, 0
- treemon_map ECRUTEAK_CITY, 0
- treemon_map MAHOGANY_TOWN, 0
- treemon_map LAKE_OF_RAGE, 5
- treemon_map BLACKTHORN_CITY, 0
- treemon_map SILVER_CAVE_OUTSIDE, 0
- treemon_map ILEX_FOREST, 6
+ treemon_map ROUTE_26, TREEMON_SET_KANTO
+ treemon_map ROUTE_27, TREEMON_SET_KANTO
+ treemon_map ROUTE_28, TREEMON_SET_CITY
+ treemon_map ROUTE_29, TREEMON_SET_ROUTE
+ treemon_map ROUTE_30, TREEMON_SET_ROUTE
+ treemon_map ROUTE_31, TREEMON_SET_ROUTE
+ treemon_map ROUTE_32, TREEMON_SET_KANTO
+ treemon_map ROUTE_33, TREEMON_SET_AZALEA
+ treemon_map ROUTE_34, TREEMON_SET_ROUTE
+ treemon_map ROUTE_35, TREEMON_SET_ROUTE
+ treemon_map ROUTE_36, TREEMON_SET_ROUTE
+ treemon_map ROUTE_37, TREEMON_SET_ROUTE
+ treemon_map ROUTE_38, TREEMON_SET_ROUTE
+ treemon_map ROUTE_39, TREEMON_SET_ROUTE
+ treemon_map ROUTE_40, TREEMON_SET_CITY
+ treemon_map ROUTE_41, TREEMON_SET_CITY
+ treemon_map ROUTE_42, TREEMON_SET_AZALEA
+ treemon_map ROUTE_43, TREEMON_SET_LAKE
+ treemon_map ROUTE_44, TREEMON_SET_CANYON
+ treemon_map ROUTE_45, TREEMON_SET_CANYON
+ treemon_map ROUTE_46, TREEMON_SET_CANYON
+ treemon_map NEW_BARK_TOWN, TREEMON_SET_CITY
+ treemon_map CHERRYGROVE_CITY, TREEMON_SET_CITY
+ treemon_map VIOLET_CITY, TREEMON_SET_CITY
+ treemon_map AZALEA_TOWN, TREEMON_SET_AZALEA
+ treemon_map CIANWOOD_CITY, TREEMON_SET_CITY
+ treemon_map GOLDENROD_CITY, TREEMON_SET_CITY
+ treemon_map OLIVINE_CITY, TREEMON_SET_CITY
+ treemon_map ECRUTEAK_CITY, TREEMON_SET_CITY
+ treemon_map MAHOGANY_TOWN, TREEMON_SET_CITY
+ treemon_map LAKE_OF_RAGE, TREEMON_SET_LAKE
+ treemon_map BLACKTHORN_CITY, TREEMON_SET_CITY
+ treemon_map SILVER_CAVE_OUTSIDE, TREEMON_SET_CITY
+ treemon_map ILEX_FOREST, TREEMON_SET_FOREST
db -1
; b82c5
RockMonMaps: ; b82c5
- treemon_map CIANWOOD_CITY, 7
- treemon_map ROUTE_40, 7
- treemon_map DARK_CAVE_VIOLET_ENTRANCE, 7
- treemon_map SLOWPOKE_WELL_B1F, 7
+ treemon_map CIANWOOD_CITY, TREEMON_SET_ROCK
+ treemon_map ROUTE_40, TREEMON_SET_ROCK
+ treemon_map DARK_CAVE_VIOLET_ENTRANCE, TREEMON_SET_ROCK
+ treemon_map SLOWPOKE_WELL_B1F, TREEMON_SET_ROCK
db -1
; b82d2
diff --git a/data/wild/treemons.asm b/data/wild/treemons.asm
index 0cb8fa83d..21cef29ec 100644
--- a/data/wild/treemons.asm
+++ b/data/wild/treemons.asm
@@ -1,19 +1,21 @@
TreeMons: ; b82e8
- dw TreeMons1
- dw TreeMons1
- dw TreeMons2
- dw TreeMons3
- dw TreeMons4
- dw TreeMons5
- dw TreeMons6
- dw RockMons
- dw TreeMons1
+; entries correspond to TREEMON_SET_* constants
+ dw TreeMonSet_City
+ dw TreeMonSet_Canyon
+ dw TreeMonSet_Azalea
+ dw TreeMonSet_Route
+ dw TreeMonSet_Kanto
+ dw TreeMonSet_Lake
+ dw TreeMonSet_Forest
+ dw TreeMonSet_Rock
+ dw TreeMonSet_City
; Two tables each (common, rare).
; Structure:
; db %, species, level
-TreeMons1: ; b82fa
+TreeMonSet_City:
+TreeMonSet_Canyon: ; b82fa
; common
db 50, SPEAROW, 10
db 15, SPEAROW, 10
@@ -31,7 +33,7 @@ TreeMons1: ; b82fa
db 5, AIPOM, 10
db -1
-TreeMons2: ; b8320
+TreeMonSet_Azalea: ; b8320
; common
db 50, SPEAROW, 10
db 15, EKANS, 10
@@ -49,7 +51,7 @@ TreeMons2: ; b8320
db 5, AIPOM, 10
db -1
-TreeMons3: ; b8346
+TreeMonSet_Route: ; b8346
; common
db 50, HOOTHOOT, 10
db 15, SPINARAK, 10
@@ -67,7 +69,7 @@ TreeMons3: ; b8346
db 5, EXEGGCUTE, 10
db -1
-TreeMons4: ; b836c
+TreeMonSet_Kanto: ; b836c
; common
db 50, HOOTHOOT, 10
db 15, EKANS, 10
@@ -85,7 +87,7 @@ TreeMons4: ; b836c
db 5, EXEGGCUTE, 10
db -1
-TreeMons5: ; b8392
+TreeMonSet_Lake: ; b8392
; common
db 50, HOOTHOOT, 10
db 15, VENONAT, 10
@@ -103,7 +105,7 @@ TreeMons5: ; b8392
db 5, EXEGGCUTE, 10
db -1
-TreeMons6: ; b83b8
+TreeMonSet_Forest: ; b83b8
; common
db 50, HOOTHOOT, 10
db 15, PINECO, 10
@@ -121,7 +123,7 @@ TreeMons6: ; b83b8
db 5, KAKUNA, 10
db -1
-RockMons: ; b83de
+TreeMonSet_Rock: ; b83de
db 90, KRABBY, 15
db 10, SHUCKLE, 15
db -1
diff --git a/data/wild/treemons_asleep.asm b/data/wild/treemons_asleep.asm
new file mode 100644
index 000000000..50c50f99f
--- /dev/null
+++ b/data/wild/treemons_asleep.asm
@@ -0,0 +1,31 @@
+; Used by CheckSleepingTreeMon
+
+AsleepTreeMonsNite:
+ db CATERPIE
+ db METAPOD
+ db BUTTERFREE
+ db WEEDLE
+ db KAKUNA
+ db BEEDRILL
+ db SPEAROW
+ db EKANS
+ db EXEGGCUTE
+ db LEDYBA
+ db AIPOM
+ db -1 ; end
+
+AsleepTreeMonsDay:
+ db VENONAT
+ db HOOTHOOT
+ db NOCTOWL
+ db SPINARAK
+ db HERACROSS
+ db -1 ; end
+
+AsleepTreeMonsMorn:
+ db VENONAT
+ db HOOTHOOT
+ db NOCTOWL
+ db SPINARAK
+ db HERACROSS
+ db -1 ; end
diff --git a/docs/battle_anim_commands.md b/docs/battle_anim_commands.md
index e7eb4a98f..4c29aea30 100644
--- a/docs/battle_anim_commands.md
+++ b/docs/battle_anim_commands.md
@@ -9,7 +9,8 @@ Defined in [macros/scripts/battle_anims.asm](/macros/scripts/battle_anims.asm) a
## `$D0`: `anim_obj` *object*, *x*, *y*, *param*
-*Alternate*: `anim_obj` *object*, *x_tile*, *x*, *y_tile*, *y*, *param*
+
+***Alternate*: `anim_obj` *object*, *x_tile*, *x*, *y_tile*, *y*, *param***
Spawns an *object* at coordinate (*x*, *y*).
diff --git a/docs/design_flaws.md b/docs/design_flaws.md
index 21a222743..7dbe79cfb 100644
--- a/docs/design_flaws.md
+++ b/docs/design_flaws.md
@@ -471,7 +471,7 @@ GetNumberedTMHM: ; d417
## `GetForestTreeFrame` works, but it's still bad
-In [tilesets/animations.asm](/tilesets/animations.asm):
+In [engine/tileset_anims.asm](/engine/tileset_anims.asm):
```asm
GetForestTreeFrame: ; fc54c
diff --git a/docs/event_commands.md b/docs/event_commands.md
index b4314bd24..dfbe943f1 100644
--- a/docs/event_commands.md
+++ b/docs/event_commands.md
@@ -133,7 +133,7 @@ Defined in [macros/scripts/events.asm](/macros/scripts/events.asm) and [engine/s
## `$3E`: `readcoins` *memory*
-## `$3F`: `RAM2MEM` *memory*
+## `$3F`: `vartomem` *memory*
## `$40`: `pokenamemem` *mon_id*, *memory*
@@ -151,7 +151,7 @@ Defined in [macros/scripts/events.asm](/macros/scripts/events.asm) and [engine/s
## `$47`: `opentext`
-## `$48`: `refreshscreen` *dummy*
+## `$48`: `refreshscreen` [*dummy*=0]
## `$49`: `closetext`
diff --git a/docs/images/hp_exp_bar_border.png b/docs/images/hp_exp_bar_border.png
index 9d16a042b..f0f5d31a6 100644
--- a/docs/images/hp_exp_bar_border.png
+++ b/docs/images/hp_exp_bar_border.png
Binary files differ
diff --git a/docs/images/hp_exp_bar_border_fix.png b/docs/images/hp_exp_bar_border_fix.png
index 02d36f8a0..26135576f 100644
--- a/docs/images/hp_exp_bar_border_fix.png
+++ b/docs/images/hp_exp_bar_border_fix.png
Binary files differ
diff --git a/docs/images/port.png b/docs/images/port.png
index 8a18aad7d..3e05e0da7 100644
--- a/docs/images/port.png
+++ b/docs/images/port.png
Binary files differ
diff --git a/docs/images/port_fix.png b/docs/images/port_fix.png
index 055a377a5..3156b065d 100644
--- a/docs/images/port_fix.png
+++ b/docs/images/port_fix.png
Binary files differ
diff --git a/docs/map_scripts.md b/docs/map_scripts.md
index c6b1c58ba..e6794b543 100644
--- a/docs/map_scripts.md
+++ b/docs/map_scripts.md
@@ -16,7 +16,7 @@
## `.MapCallbacks: db` *N*
-- **`dbw` *type*, *script***
+- **`callback` *type*, *script***
Callback types:
@@ -30,11 +30,21 @@ Callback types:
- **`MAPCALLBACK_CMDQUEUE`**
- **`dbw CMDQUEUE_STONETABLE,` *table_pointer***
-
- **`stonetable` *warp_id*, *person*, *script***
-
- **`db -1 ; end`**
+<!-- need pre tags here; can't use inline bold/italic formatting in Markdown code blocks -->
+<pre>
+ callback MAPCALLBACK_CMDQUEUE, .Boulders
+
+.Boulders:
+ writecmdqueue .BoulderCmdQueue
+ return
+
+.BoulderCmdQueue:
+ cmdqueue CMDQUEUE_STONETABLE, .BoulderTable
+
+.BoulderTable:
+ stonetable <i>warp_id</i>, <i>person</i>, <i>script</i>
+ db -1 ; end
+</pre>
## Event scripts
@@ -54,8 +64,10 @@ Callback types:
## `MapName_MapEventHeader:`
+```asm
; filler
db 0, 0
+```
## `.Warps: db` *N*
@@ -80,11 +92,11 @@ BG event types:
- **`BGEVENT_IFSET/IFNOTSET`**
- **`dw` *event_flag*, *script***
+ **`conditional_event` *event_flag*, *script***
- **`BGEVENT_ITEM`**
- **`dwb` *event_flag*, *item_id***
+ **`hiddenitem` *event_flag*, *item_id***
- **`BGEVENT_COPY`**
diff --git a/docs/move_effect_commands.md b/docs/move_effect_commands.md
index b8b09c5c2..a7a779123 100644
--- a/docs/move_effect_commands.md
+++ b/docs/move_effect_commands.md
@@ -1,6 +1,6 @@
# Move Effect Commands
-Defined in [macros/scripts/battle_commands.asm](/macros/scripts/battle_commands.asm) and [data/battle_command_pointers.asm:BattleCommandPointers](/data/battle_command_pointers.asm).
+Defined in [macros/scripts/battle_commands.asm](/macros/scripts/battle_commands.asm) and [data/battle/effect_command_pointers.asm:BattleCommandPointers](/data/battle/effect_command_pointers.asm).
## `$01`: `checkturn`
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm
index 09595077a..5bdc070ec 100644
--- a/engine/battle/ai/items.asm
+++ b/engine/battle/ai/items.asm
@@ -291,7 +291,7 @@ AI_Items: ; 39196
dbw X_DEFEND, .XDefend
dbw X_SPEED, .XSpeed
dbw X_SPECIAL, .XSpecial
- db $ff
+ db -1 ; end
; 381be
.FullHeal: ; 381be
@@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty
- farcall UpdateEnemyHUD
+ farcall Predef_UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, wEnemyItemState
@@ -664,7 +664,7 @@ EnemyPotionFinish: ; 38436
xor a
ld [wWhichHPBar], a
call AIUsedItemSound
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
jp AIUpdateHUD
diff --git a/engine/battle/ai/move.asm b/engine/battle/ai/move.asm
index 11586c0da..d04fb9930 100755
--- a/engine/battle/ai/move.asm
+++ b/engine/battle/ai/move.asm
@@ -56,7 +56,7 @@ AIChooseMove: ; 440ce
inc hl
ld a, [de]
inc de
- and $3f
+ and PP_MASK
jr nz, .CheckMovePP
ld [hl], 80
jr .CheckMovePP
@@ -92,7 +92,7 @@ AIChooseMove: ; 440ce
push bc
ld d, BANK(TrainerClassAttributes)
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld d, c
pop bc
@@ -186,7 +186,7 @@ AIChooseMove: ; 440ce
.ChooseMove:
ld hl, Buffer1
call Random
- and 3
+ maskbits NUM_MOVES +- 1
ld c, a
ld b, 0
add hl, bc
diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm
index 44194d6f7..c1d175c38 100644
--- a/engine/battle/ai/scoring.asm
+++ b/engine/battle/ai/scoring.asm
@@ -68,7 +68,7 @@ AI_Basic: ; 38591
db EFFECT_TOXIC
db EFFECT_POISON
db EFFECT_PARALYZE
- db $ff
+ db -1 ; end
; 385e0
@@ -400,7 +400,7 @@ AI_Smart: ; 386be
dbw EFFECT_SOLARBEAM, AI_Smart_Solarbeam
dbw EFFECT_THUNDER, AI_Smart_Thunder
dbw EFFECT_FLY, AI_Smart_Fly
- db $ff
+ db -1 ; end
; 387e3
@@ -1488,7 +1488,7 @@ AI_Smart_Encore: ; 38c3b
push hl
ld a, [wEnemyMoveStruct + MOVE_TYPE]
ld hl, EnemyMonType1
- predef CheckTypeMatchup
+ predef Predef_CheckTypeMatchup
pop hl
ld a, [wd265]
@@ -1553,7 +1553,7 @@ AI_Smart_Encore: ; 38c3b
db AEROBLAST
db COTTON_SPORE
db POWDER_SNOW
- db $ff
+ db -1 ; end
; 38ca4
@@ -2214,7 +2214,7 @@ AI_Smart_Sandstorm: ; 38f7a
db ROCK
db GROUND
db STEEL
- db $ff
+ db -1 ; end
; 38fac
@@ -2533,7 +2533,7 @@ RainDanceMoves: ; 390e7
db CRABHAMMER
db OCTAZOOKA
db WHIRLPOOL
- db $ff
+ db -1 ; end
; 390f3
@@ -2622,7 +2622,7 @@ SunnyDayMoves: ; 39134
db SACRED_FIRE
db MORNING_SUN
db SYNTHESIS
- db $ff
+ db -1 ; end
; 3913d
@@ -3125,7 +3125,7 @@ UsefulMoves: ; 39301
db FIRE_BLAST
db SOFTBOILED
db SUPER_FANG
- db $ff
+ db -1 ; end
; 39315
@@ -3209,7 +3209,7 @@ AI_Opportunist: ; 39315
db CONVERSION
db SUBSTITUTE
db FLAME_WHEEL
- db $ff
+ db -1 ; end
; 39369
@@ -3324,7 +3324,7 @@ AI_Aggressive: ; 39369
db EFFECT_RAMPAGE
db EFFECT_MULTI_HIT
db EFFECT_DOUBLE_HIT
- db $ff
+ db -1 ; end
; 393e7
@@ -3350,7 +3350,7 @@ AIDamageCalc: ; 393e7
db EFFECT_STATIC_DAMAGE
db EFFECT_LEVEL_DAMAGE
db EFFECT_PSYWAVE
- db $ff
+ db -1 ; end
; 39418
@@ -3406,7 +3406,7 @@ AI_Cautious: ; 39418
db CONVERSION
db SUBSTITUTE
db SPIKES
- db $ff
+ db -1 ; end
; 39453
@@ -3544,7 +3544,7 @@ endr
.RiskyMoves:
db EFFECT_SELFDESTRUCT
db EFFECT_OHKO
- db $ff
+ db -1 ; end
; 39502
diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm
index c2f83fa1f..cb278676e 100755
--- a/engine/battle/ai/switch.asm
+++ b/engine/battle/ai/switch.asm
@@ -28,7 +28,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
inc hl
call GetMoveByte
ld hl, EnemyMonType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
@@ -73,7 +73,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
ld a, [BattleMonType1]
ld b, a
ld hl, EnemyMonType1
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
jr c, .ok
@@ -82,7 +82,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
ld a, [BattleMonType2]
cp b
jr z, .ok2
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1
jr c, .ok2
@@ -123,7 +123,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
inc hl
call GetMoveByte
ld hl, BattleMonType1
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
; immune
@@ -390,7 +390,7 @@ FindEnemyMonsImmuneToLastCounterMove: ; 34a2a
inc hl
call GetMoveByte
ld hl, BaseType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
and a
jr nz, .next
@@ -481,7 +481,7 @@ FindEnemyMonsWithASuperEffectiveMove: ; 34aa7
inc hl
call GetMoveByte
ld hl, BattleMonType1
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
; if immune or not very effective: continue
ld a, [wTypeMatchup]
@@ -585,7 +585,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20
.skip_move
ld a, [BattleMonType1]
ld hl, BaseType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1
jr nc, .dont_choose_mon
@@ -593,7 +593,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20
.check_type
ld hl, BaseType
- call CheckTypeMatchup
+ call Predef_CheckTypeMatchup
ld a, [wTypeMatchup]
cp 10 + 1
jr nc, .dont_choose_mon
diff --git a/engine/battle/anim_hp_bar.asm b/engine/battle/anim_hp_bar.asm
index 71276d27e..d67a46a70 100755
--- a/engine/battle/anim_hp_bar.asm
+++ b/engine/battle/anim_hp_bar.asm
@@ -67,7 +67,7 @@ _AnimateHPBar: ; d627
ld a, [hli]
ld b, a
pop hl
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
ld a, e
ld [wCurHPBarPixels], a
@@ -79,7 +79,7 @@ _AnimateHPBar: ; d627
ld e, a
ld a, [wCurHPAnimMaxHP + 1]
ld d, a
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
ld a, e
ld [wNewHPBarPixels], a
@@ -183,11 +183,11 @@ LongAnim_UpdateVariables: ; d6f5
ld c, a
ld a, [hli]
ld b, a
- ; This routine is buggy. The result from ComputeHPBarPixels is stored
+ ; This routine is buggy. The result from Predef_ComputeHPBarPixels is stored
; in e. However, the pop de opcode deletes this result before it is even
; used. The game then proceeds as though it never deleted that output.
; To fix, uncomment the line below.
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
; ld a, e
pop bc
pop de
@@ -227,7 +227,7 @@ LongHPBarAnim_UpdateTiles: ; d749
ld e, a
ld a, [wCurHPAnimMaxHP + 1]
ld d, a
- call ComputeHPBarPixels
+ call Predef_ComputeHPBarPixels
ld c, e
ld d, HP_BAR_LENGTH
ld a, [wWhichHPBar]
diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm
index 73f7eaef4..f035867b5 100644
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -1,4 +1,4 @@
-Predef_StartBattle: ; 8c20f
+Predef_DoBattleTransition: ; 8c20f
call .InitGFX
ld a, [rBGP]
ld [wBGP], a
@@ -16,7 +16,7 @@ Predef_StartBattle: ; 8c20f
ld a, [wJumptableIndex]
bit 7, a
jr nz, .done
- call FlashyTransitionToBattle
+ call BattleTransitionJumptable
call DelayFrame
jr .loop
@@ -144,7 +144,7 @@ TrainerBattlePokeballTiles: ; 8c2f4
INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
-FlashyTransitionToBattle: ; 8c314
+BattleTransitionJumptable: ; 8c314
jumptable .dw, wJumptableIndex
; 8c323
@@ -589,7 +589,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
dec b
jr nz, .loop
- call .loadpokeballgfx ; ld a, [OtherTrainerClass] \ ld de, PokeBallTransition \ ret
+ call .loadpokeballgfx
hlcoord 2, 1
ld b, SCREEN_WIDTH - 4
@@ -640,8 +640,8 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
.cgb
ld hl, .daypals
ld a, [TimeOfDayPal]
- and (1 << 2) - 1
- cp 3
+ maskbits NUM_DAYTIMES +- 1
+ cp DARKNESS_F
jr nz, .daytime
ld hl, .nightpals
.daytime
@@ -691,17 +691,12 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
; 8c6a1 (23:46a1)
.daypals ; 8c6a1
- RGB 31, 18, 29
- RGB 31, 11, 15
- RGB 31, 05, 05
- RGB 07, 07, 07
+INCLUDE "gfx/overworld/trainer_battle_day.pal"
; 8c6a9
.nightpals ; 8c6a9
- RGB 31, 18, 29
- RGB 31, 05, 05
- RGB 31, 05, 05
- RGB 31, 05, 05
+INCLUDE "gfx/overworld/trainer_battle_nite.pal"
+; 8c6b1
.loadpokeballgfx
ld a, [OtherTrainerClass]
@@ -754,22 +749,23 @@ WipeLYOverrides: ; 8c6d8
StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
- and (1 << 6) - 1
- cp 1 << 5
- jr nc, .okay
- call .DoSineWave
+; a = d * sin(a * pi/32)
+ and %111111
+ cp %100000
+ jr nc, .negative
+ call .ApplySineWave
ld a, h
ret
-.okay
- and (1 << 5) - 1
- call .DoSineWave
+.negative
+ and %011111
+ call .ApplySineWave
ld a, h
- xor -1 ; cpl
+ xor $ff
inc a
ret
-.DoSineWave: ; 8c70c (23:470c)
+.ApplySineWave: ; 8c70c (23:470c)
ld e, a
ld a, d
ld d, 0
@@ -780,15 +776,15 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
inc hl
ld d, [hl]
ld hl, 0
-.loop
+.multiply
srl a
- jr nc, .skip
+ jr nc, .even
add hl, de
-.skip
+.even
sla e
rl d
and a
- jr nz, .loop
+ jr nz, .multiply
ret
; 8c728 (23:4728)
@@ -863,8 +859,7 @@ ENDM
ret
; 8c7c9 (23:47c9)
-Function8c7c9:
-; XXX
+Unreferenced_Function8c7c9:
ld a, $1
ld [hBGMapMode], a
call WaitBGMap
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 6d4401946..cf9c821b7 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -47,7 +47,7 @@ DoBattle: ; 3c000
.player_2
call LoadTileMapToTempTileMap
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
jp z, LostBattle
@@ -160,7 +160,7 @@ WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
BattleTurn: ; 3c12f
.loop
- call MobileFn_3c1bf
+ call Stubbed_Function3c1bf
call CheckContestBattleOver
jp c, .quit
@@ -231,7 +231,8 @@ BattleTurn: ; 3c12f
ret
; 3c1bf
-MobileFn_3c1bf: mobile
+Stubbed_Function3c1bf:
+ ret
ld a, 5 ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call GetSRAMBank
ld hl, $a89b ; address of MBC30 bank
@@ -730,7 +731,7 @@ HandleEncore: ; 3c4df
ld b, 0
add hl, bc
ld a, [hl]
- and $3f
+ and PP_MASK
ret nz
.end_player_encore
@@ -754,7 +755,7 @@ HandleEncore: ; 3c4df
ld b, 0
add hl, bc
ld a, [hl]
- and $3f
+ and PP_MASK
ret nz
.end_enemy_encore
@@ -857,7 +858,7 @@ GetMovePriority: ; 3c5c5
cp -1
jr nz, .loop
- ld a, 1
+ ld a, BASE_PRIORITY
ret
.done
@@ -865,15 +866,7 @@ GetMovePriority: ; 3c5c5
ret
; 3c5df
-MoveEffectPriorities: ; 3c5df
- db EFFECT_PROTECT, 3
- db EFFECT_ENDURE, 3
- db EFFECT_PRIORITY_HIT, 2
- db EFFECT_FORCE_SWITCH, 0
- db EFFECT_COUNTER, 0
- db EFFECT_MIRROR_COAT, 0
- db -1
-; 3c5ec
+INCLUDE "data/moves/effects_priorities.asm"
GetMoveEffect: ; 3c5ec
ld a, b
@@ -1285,7 +1278,7 @@ HandleWrap: ; 3c874
xor a
ld [wNumHits], a
ld [FXAnimID + 1], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
call SwitchTurnCore
.skip_anim
@@ -1409,7 +1402,7 @@ HandleMysteryberry: ; 3c93c
and a
jr z, .quit
ld a, [de]
- and $3f
+ and PP_MASK
jr z, .restore
inc hl
inc de
@@ -1951,8 +1944,7 @@ GetMaxHP: ; 3ccac
ret
; 3ccc2
-GetHalfHP: ; 3ccc2
-; unreferenced
+Unreferenced_GetHalfHP: ; 3ccc2
ld hl, BattleMonHP
ld a, [hBattleTurn]
and a
@@ -2048,7 +2040,7 @@ UpdateHPBar: ; 3cd3c
.ok
push bc
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
pop bc
ret
; 3cd55
@@ -2062,7 +2054,7 @@ HandleEnemyMonFaint: ; 3cd55
xor a
ld [wWhichMonFaintedFirst], a
call UpdateBattleStateAndExperienceAfterEnemyFaint
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
jp z, LostBattle
@@ -2070,7 +2062,7 @@ HandleEnemyMonFaint: ; 3cd55
ld hl, BattleMonHP
ld a, [hli]
or [hl]
- call nz, UpdatePlayerHUD
+ call nz, Predef_UpdatePlayerHUD
ld a, $1
ld [hBGMapMode], a
@@ -2194,7 +2186,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
call PlayerMonFaintHappinessMod
.player_mon_did_not_faint
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
ret z
@@ -2460,7 +2452,7 @@ WinTrainerBattle: ; 3cfa4
ld c, 40
call DelayFrames
call EmptyBattleTextBox
- ld c, $3
+ ld c, BATTLETOWERTEXT_LOSS_TEXT
farcall BattleTowerText
call WaitPressAorB_BlinkCursor
ld hl, wPayDayMoney
@@ -2589,7 +2581,7 @@ AddBattleMoneyToAccount: ; 3d0be
push bc
ld b, h
ld c, l
- farcall TrainerRankings_AddToBattlePayouts
+ farcall StubbedTrainerRankings_AddToBattlePayouts
pop bc
pop hl
.loop
@@ -2640,7 +2632,7 @@ PlayVictoryMusic: ; 3d0ea
.trainer_victory
ld de, MUSIC_GYM_VICTORY
- call IsJohtoGymLeader
+ call IsGymLeader
jr c, .play_music
ld de, MUSIC_TRAINER_VICTORY
@@ -2652,58 +2644,22 @@ PlayVictoryMusic: ; 3d0ea
ret
; 3d123
-; These functions check if the current opponent is a gym leader or one of a
-; few other special trainers.
-
-; Note: KantoGymLeaders is a subset of JohtoGymLeaders. If you wish to
-; differentiate between the two, call IsKantoGymLeader first.
-
-; The Lance and Red entries are unused for music checks; those trainers are
-; accounted for elsewhere.
-
IsKantoGymLeader: ; 0x3d123
ld hl, KantoGymLeaders
jr IsGymLeaderCommon
-IsJohtoGymLeader: ; 0x3d128
- ld hl, JohtoGymLeaders
+IsGymLeader: ; 0x3d128
+ ld hl, GymLeaders
IsGymLeaderCommon:
push de
ld a, [OtherTrainerClass]
- ld de, $0001
+ ld de, $1
call IsInArray
pop de
ret
; 0x3d137
-JohtoGymLeaders:
- db FALKNER
- db WHITNEY
- db BUGSY
- db MORTY
- db PRYCE
- db JASMINE
- db CHUCK
- db CLAIR
- db WILL
- db BRUNO
- db KAREN
- db KOGA
-; fallthrough
-; these two entries are unused
- db CHAMPION
- db RED
-; fallthrough
-KantoGymLeaders:
- db BROCK
- db MISTY
- db LT_SURGE
- db ERIKA
- db JANINE
- db SABRINA
- db BLAINE
- db BLUE
- db -1
+INCLUDE "data/trainers/leaders.asm"
HandlePlayerMonFaint: ; 3d14e
call FaintYourPokemon
@@ -2714,7 +2670,7 @@ HandlePlayerMonFaint: ; 3d14e
ld a, $1
ld [wWhichMonFaintedFirst], a
call PlayerMonFaintHappinessMod
- call CheckPlayerPartyForFitPkmn
+ call Predef_CheckPlayerPartyForFitPkmn
ld a, d
and a
jp z, LostBattle
@@ -2760,7 +2716,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
ld c, a
ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld hl, EnemySubStatus3
res SUBSTATUS_IN_LOOP, [hl]
xor a
@@ -3066,7 +3022,7 @@ LostBattle: ; 3d38e
call DelayFrames
call EmptyBattleTextBox
- ld c, 2
+ ld c, BATTLETOWERTEXT_WIN_TEXT
farcall BattleTowerText
call WaitPressAorB_BlinkCursor
call ClearTileMap
@@ -3357,10 +3313,10 @@ AddBattleParticipant: ; 3d581
ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG
push bc
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop bc
ld hl, wBattleParticipantsIncludingFainted
- predef_jump FlagPredef
+ predef_jump Predef_SmallFarFlagAction
; 3d599
FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599
@@ -3578,7 +3534,7 @@ LoadEnemyPkmnToSwitchTo: ; 3d6ca
and a
jr nz, .skip_unown
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld a, [UnownLetter]
ld [wFirstUnownSeen], a
.skip_unown
@@ -3688,8 +3644,8 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call GetBaseData
ld a, OTPARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
- call GetEnemyMonFrontpic
+ predef Predef_CopyPkmnToTempMon
+ call Predef_GetEnemyMonFrontpic
xor a
ld [wNumHits], a
@@ -3714,7 +3670,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
hlcoord 12, 0
ld d, $0
ld e, ANIM_MON_SLOW
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
jr .skip_cry
.cry_no_anim
@@ -3724,7 +3680,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call PlayStereoCry
.skip_cry
- call UpdateEnemyHUD
+ call Predef_UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ret
@@ -3765,7 +3721,7 @@ ResetEnemyStatLevels: ; 3d867
ret
; 3d873
-CheckPlayerPartyForFitPkmn: ; 3d873
+Predef_CheckPlayerPartyForFitPkmn: ; 3d873
; Has the player any Pkmn in his Party that can fight?
ld a, [PartyCount]
ld e, a
@@ -4168,7 +4124,7 @@ SwitchPlayerMon: ; 3db32
SendOutPlayerMon: ; 3db5f
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
hlcoord 1, 5
ld b, 7
ld c, 8
@@ -4176,7 +4132,7 @@ SendOutPlayerMon: ; 3db5f
call WaitBGMap
xor a
ld [hBGMapMode], a
- call GetBattleMonBackpic
+ call Predef_GetBattleMonBackpic
xor a
ld [hGraphicStartTile], a
ld [wBattleMenuCursorBuffer], a
@@ -4216,7 +4172,7 @@ SendOutPlayerMon: ; 3db5f
call PlayStereoCry
.statused
- call UpdatePlayerHUD
+ call Predef_UpdatePlayerHUD
ld a, $1
ld [hBGMapMode], a
ret
@@ -4262,13 +4218,13 @@ BreakAttraction: ; 3dc18
SpikesDamage: ; 3dc23
ld hl, PlayerScreens
ld de, BattleMonType
- ld bc, UpdatePlayerHUD
+ ld bc, Predef_UpdatePlayerHUD
ld a, [hBattleTurn]
and a
jr z, .ok
ld hl, EnemyScreens
ld de, EnemyMonType
- ld bc, UpdateEnemyHUD
+ ld bc, Predef_UpdateEnemyHUD
.ok
bit SCREENS_SPIKES, [hl]
@@ -4350,7 +4306,7 @@ PursuitSwitch: ; 3dc5b
ld c, a
ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
call PlayerMonFaintedAnimation
ld hl, BattleText_PkmnFainted
jr .done_fainted
@@ -4499,7 +4455,7 @@ HandleHPHealingItem: ; 3dd2f
.got_hp_bar_coords
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
UseOpponentItem:
call RefreshBattleHuds
callfar GetOpponentItem
@@ -4522,7 +4478,7 @@ ItemRecoveryAnim: ; 3ddc8
xor a
ld [wNumHits], a
ld [FXAnimID + 1], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
call SwitchTurnCore
pop bc
pop de
@@ -4586,13 +4542,13 @@ UseHeldStatusHealingItem: ; 3dde9
; 3de44
.Statuses: ; 3de44
- db HELD_HEAL_POISON, 1 << PSN
- db HELD_HEAL_FREEZE, 1 << FRZ
- db HELD_HEAL_BURN, 1 << BRN
- db HELD_HEAL_SLEEP, SLP
+ db HELD_HEAL_POISON, 1 << PSN
+ db HELD_HEAL_FREEZE, 1 << FRZ
+ db HELD_HEAL_BURN, 1 << BRN
+ db HELD_HEAL_SLEEP, SLP
db HELD_HEAL_PARALYZE, 1 << PAR
- db HELD_HEAL_STATUS, ALL_STATUS
- db $ff
+ db HELD_HEAL_STATUS, ALL_STATUS
+ db -1 ; end
; 3de51
UseConfusionHealingItem: ; 3de51
@@ -4716,7 +4672,7 @@ HandleStatBoostingHeldItems: ; 3de97
dbw HELD_SP_DEFENSE_UP, BattleCommand_SpecialDefenseUp
dbw HELD_ACCURACY_UP, BattleCommand_AccuracyUp
dbw HELD_EVASION_UP, BattleCommand_EvasionUp
- db $ff
+ db -1 ; end
; 3df12
GetPartymonItem: ; 3df12
@@ -4752,7 +4708,7 @@ UpdateBattleHUDs: ; 3df2c
ret
; 3df48
-UpdatePlayerHUD:: ; 3df48
+Predef_UpdatePlayerHUD:: ; 3df48
push hl
push de
push bc
@@ -4785,7 +4741,7 @@ DrawPlayerHUD: ; 3df58
ld b, 1
xor a ; PARTYMON
ld [MonType], a
- predef DrawPlayerHP
+ predef Predef_DrawPlayerHP
; Exp bar
push de
@@ -4798,7 +4754,7 @@ DrawPlayerHUD: ; 3df58
hlcoord 10, 11
ld a, [TempMonLevel]
ld b, a
- call FillInExpBar
+ call Predef_FillInExpBar
pop de
ret
; 3df98
@@ -4852,7 +4808,7 @@ PrintPlayerHUD: ; 3dfbf
ld [de], a
ld hl, BattleMonLevel
ld de, TempMonLevel
- ld bc, $0011
+ ld bc, $11
call CopyBytes
ld a, [CurBattleMon]
ld hl, PartyMon1Species
@@ -4867,7 +4823,7 @@ PrintPlayerHUD: ; 3dfbf
ld a, TEMPMON
ld [MonType], a
- callfar GetGender
+ callfar Predef_GetGender
ld a, " "
jr c, .got_gender_char
ld a, "♂"
@@ -4881,7 +4837,7 @@ PrintPlayerHUD: ; 3dfbf
push af ; back up gender
push hl
ld de, BattleMonStatus
- predef PlaceNonFaintStatus
+ predef Predef_PlaceNonFaintStatus
pop hl
pop bc
ret nz
@@ -4896,7 +4852,7 @@ PrintPlayerHUD: ; 3dfbf
jp PrintLevel
; 3e036
-UpdateEnemyHUD:: ; 3e036
+Predef_UpdateEnemyHUD:: ; 3e036
push hl
push de
push bc
@@ -4945,7 +4901,7 @@ DrawEnemyHUD: ; 3e043
ld a, TEMPMON
ld [MonType], a
- callfar GetGender
+ callfar Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -4960,7 +4916,7 @@ DrawEnemyHUD: ; 3e043
push af
push hl
ld de, EnemyMonStatus
- predef PlaceNonFaintStatus
+ predef Predef_PlaceNonFaintStatus
pop hl
pop bc
jr nz, .skip_level
@@ -5185,8 +5141,8 @@ BattleMenu_Pack: ; 3e1c7
call ClearPalettes
call DelayFrame
call _LoadBattleFontsHPBar
- call GetBattleMonBackpic
- call GetEnemyMonFrontpic
+ call Predef_GetBattleMonBackpic
+ call Predef_GetEnemyMonFrontpic
call ExitMenu
call WaitBGMap
call FinishBattleAnim
@@ -5218,10 +5174,10 @@ BattleMenu_Pack: ; 3e1c7
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .tutorial2
- call GetBattleMonBackpic
+ call Predef_GetBattleMonBackpic
.tutorial2
- call GetEnemyMonFrontpic
+ call Predef_GetEnemyMonFrontpic
ld a, $1
ld [wMenuCursorY], a
call ExitMenu
@@ -5575,7 +5531,7 @@ MoveSelectionScreen: ; 3e4bc
.got_start_coord
ld a, SCREEN_WIDTH
ld [Buffer1], a
- predef ListMoves
+ predef Predef_ListMoves
ld b, 5
ld a, [wMoveSelectionMenuType]
@@ -5694,7 +5650,7 @@ MoveSelectionScreen: ; 3e4bc
ld b, 0
add hl, bc
ld a, [hl]
- and $3f
+ and PP_MASK
jr z, .no_pp_left
ld a, [PlayerDisableCount]
swap a
@@ -5893,7 +5849,7 @@ MoveInfoBox: ; 3e6c8
ld hl, BattleMonPP
add hl, bc
ld a, [hl]
- and $3f
+ and PP_MASK
ld [StringBuffer1], a
call .PrintPP
@@ -5908,7 +5864,7 @@ MoveInfoBox: ; 3e6c8
ld a, [wPlayerMoveStruct + MOVE_ANIM]
ld b, a
hlcoord 2, 10
- predef PrintMoveType
+ predef Predef_PrintMoveType
.done
ret
@@ -5956,7 +5912,7 @@ CheckPlayerHasUsableMoves: ; 3e786
or [hl]
inc hl
or [hl]
- and $3f
+ and PP_MASK
ret nz
jr .force_struggle
@@ -5978,8 +5934,7 @@ CheckPlayerHasUsableMoves: ; 3e786
.done
; Bug: this will result in a move with PP Up confusing the game.
- ; Replace with "and $3f" to fix.
- and a
+ and a ; should be "and PP_MASK"
ret nz
.force_struggle
@@ -6058,7 +6013,7 @@ ParseEnemyAction: ; 3e7c1
cp [hl]
jr z, .disabled
ld a, [de]
- and $3f
+ and PP_MASK
jr nz, .enough_pp
.disabled
@@ -6076,7 +6031,7 @@ ParseEnemyAction: ; 3e7c1
.loop2
ld hl, EnemyMonMoves
call BattleRandom
- and 3 ; TODO factor in NUM_MOVES
+ maskbits NUM_MOVES +- 1
ld c, a
ld b, 0
add hl, bc
@@ -6093,7 +6048,7 @@ ParseEnemyAction: ; 3e7c1
add hl, bc
ld b, a
ld a, [hl]
- and $3f
+ and PP_MASK
jr z, .loop2
ld a, c
ld [CurEnemyMoveNum], a
@@ -6364,7 +6319,7 @@ LoadEnemyMon: ; 3e8eb
; Get letter based on DVs
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
; Can't use any letters that haven't been unlocked
; If combined with forced shiny battletype, causes an infinite loop
call CheckUnownLetter
@@ -6376,9 +6331,9 @@ LoadEnemyMon: ; 3e8eb
; but the value is in feet and inches (one byte each).
; The first filter is supposed to make very large Magikarp even rarer,
-; by targeting those 1600 mm or larger.
+; by targeting those 1600 mm (= 5'3") or larger.
; After the conversion to feet, it is unable to target any,
-; as the largest possible Magikarp is 5'3'', which reads as 1283.
+; since the largest possible Magikarp is 5'3", and $0503 = 1283 mm.
ld a, [TempEnemyMonSpecies]
cp MAGIKARP
jr nz, .Happiness
@@ -6388,42 +6343,43 @@ LoadEnemyMon: ; 3e8eb
ld bc, PlayerID
callfar CalcMagikarpLength
-; No reason to keep going if length > 1536 (i.e. if length / 256 != 6)
+; No reason to keep going if length > 1536 mm (i.e. if HIGH(length) > 6 feet)
ld a, [wMagikarpLength]
- cp HIGH(1536) ; this compares to 6'0'', should be cp 5
+ cp HIGH(1536) ; should be "cp 5", since 1536 mm = 5'0", but HIGH(1536) = 6
jr nz, .CheckMagikarpArea
; 5% chance of skipping both size checks
call Random
cp 5 percent
jr c, .CheckMagikarpArea
-; Try again if length > 1615
+; Try again if length >= 1616 mm (i.e. if LOW(length) >= 3 inches)
ld a, [wMagikarpLength + 1]
- cp LOW(1616) ; this compares to 6'80'', should be cp 3
+ cp LOW(1616) ; should be "cp 3", since 1616 mm = 5'3", but LOW(1616) = 80
jr nc, .GenerateDVs
; 20% chance of skipping this check
call Random
cp 20 percent - 1
jr c, .CheckMagikarpArea
-; Try again if length > 1599
+; Try again if length >= 1600 mm (i.e. if LOW(length) >= 2 inches)
ld a, [wMagikarpLength + 1]
- cp LOW(1600) ; this compares to 6'64'', should be cp 2
+ cp LOW(1600) ; should be "cp 2", since 1600 mm = 5'2", but LOW(1600) = 64
jr nc, .GenerateDVs
.CheckMagikarpArea:
-; The z checks are supposed to be nz
-; Instead, all maps in GROUP_LAKE_OF_RAGE (mahogany area)
-; and routes 20 and 44 are treated as Lake of Rage
+; The "jr z" checks are supposed to be "jr nz".
+
+; Instead, all maps in GROUP_LAKE_OF_RAGE (Mahogany area)
+; and Routes 20 and 44 are treated as Lake of Rage.
; This also means Lake of Rage Magikarp can be smaller than ones
-; caught elsewhere rather than the other way around
+; caught elsewhere rather than the other way around.
-; Intended behavior enforces a minimum size at Lake of Rage
-; The real behavior prevents size flooring in the Lake of Rage area
+; Intended behavior enforces a minimum size at Lake of Rage.
+; The real behavior prevents a minimum size in the Lake of Rage area.
-; Moreover, due to the check not being translated to feet, all Magikarp
-; smaller than 4'0'' may be caught by the filter, a lot more than intended
+; Moreover, due to the check not being translated to feet+inches, all Magikarp
+; smaller than 4'0" may be caught by the filter, a lot more than intended.
ld a, [MapGroup]
cp GROUP_LAKE_OF_RAGE
jr z, .Happiness
@@ -6434,9 +6390,9 @@ LoadEnemyMon: ; 3e8eb
call Random
cp 40 percent - 2
jr c, .Happiness
-; Floor at length 1024
+; Try again if length < 1024 mm (i.e. if HIGH(length) < 3 feet)
ld a, [wMagikarpLength]
- cp HIGH(1024) ; compares to 4'0'', cp 3 would be closer to intended value
+ cp HIGH(1024) ; should be "cp 3", since 1024 mm = 3'4", but HIGH(1024) = 4
jr c, .GenerateDVs ; try again
; Finally done with DVs
@@ -6452,7 +6408,7 @@ LoadEnemyMon: ; 3e8eb
ld de, EnemyMonMaxHP
ld b, FALSE
ld hl, EnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) ; LinkBattleRNs + 7 ; ?
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
; If we're in a trainer battle,
; get the rest of the parameters from the party struct
@@ -6567,7 +6523,7 @@ LoadEnemyMon: ; 3e8eb
; Make sure the predef knows this isn't a partymon
ld [wEvolutionOldSpecies], a
; Fill moves based on level
- predef FillMoves
+ predef Predef_FillMoves
.PP:
; Trainer battle?
@@ -6578,7 +6534,7 @@ LoadEnemyMon: ; 3e8eb
; Fill wild PP
ld hl, EnemyMonMoves
ld de, EnemyMonPP
- predef FillPP
+ predef Predef_FillPP
jr .Finish
.TrainerPP:
@@ -6631,7 +6587,7 @@ LoadEnemyMon: ; 3e8eb
ld c, a
ld b, SET_FLAG
ld hl, PokedexSeen
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld hl, EnemyMonStats
ld de, EnemyStats
@@ -6651,13 +6607,13 @@ CheckSleepingTreeMon: ; 3eb38
jr nz, .NotSleeping
; Get list for the time of day
- ld hl, .Morn
+ ld hl, AsleepTreeMonsMorn
ld a, [TimeOfDay]
cp DAY_F
jr c, .Check
- ld hl, .Day
+ ld hl, AsleepTreeMonsDay
jr z, .Check
- ld hl, .Nite
+ ld hl, AsleepTreeMonsNite
.Check:
ld a, [TempEnemyMonSpecies]
@@ -6670,36 +6626,7 @@ CheckSleepingTreeMon: ; 3eb38
and a
ret
-.Nite:
- db CATERPIE
- db METAPOD
- db BUTTERFREE
- db WEEDLE
- db KAKUNA
- db BEEDRILL
- db SPEAROW
- db EKANS
- db EXEGGCUTE
- db LEDYBA
- db AIPOM
- db -1 ; end
-
-.Day:
- db VENONAT
- db HOOTHOOT
- db NOCTOWL
- db SPINARAK
- db HERACROSS
- db -1 ; end
-
-.Morn:
- db VENONAT
- db HOOTHOOT
- db NOCTOWL
- db SPINARAK
- db HERACROSS
- db -1 ; end
-; 3eb75
+INCLUDE "data/wild/treemons_asleep.asm"
CheckUnownLetter: ; 3eb75
; Return carry if the Unown letter hasn't been unlocked yet
@@ -6769,8 +6696,7 @@ CheckUnownLetter: ; 3eb75
; 3ebc7
-SwapBattlerLevels: ; 3ebc7
-; unreferenced
+Unreferenced_SwapBattlerLevels: ; 3ebc7
push bc
ld a, [BattleMonLevel]
ld b, a
@@ -6789,7 +6715,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
ld a, [OtherTrainerClass]
ld [TrainerClass], a
ld de, vTiles2
- callfar GetTrainerPic
+ callfar Predef_GetTrainerPic
hlcoord 19, 0
ld c, 0
@@ -7162,7 +7088,7 @@ _LoadHPBar: ; 3eda6
ret
; 3edad
-LoadHPExpBarGFX: ; unreferenced
+Unreferenced_LoadHPExpBarGFX:
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
@@ -7266,7 +7192,7 @@ Call_PlayBattleAnim: ; 3ee17
ld a, d
ld [FXAnimID + 1], a
call WaitBGMap
- predef_jump PlayBattleAnim
+ predef_jump Predef_PlayBattleAnim
; 3ee27
FinishBattleAnim: ; 3ee27
@@ -7314,7 +7240,7 @@ GiveExperiencePoints: ; 3ee3b
ld c, a
ld b, CHECK_FLAG
ld d, $0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
pop bc
@@ -7492,7 +7418,7 @@ GiveExperiencePoints: ; 3ee3b
.not_max_exp
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
callfar CalcLevel
pop bc
ld hl, MON_LEVEL
@@ -7529,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b
add hl, bc
push bc
ld b, TRUE
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
pop de
ld hl, MON_MAXHP + 1
@@ -7582,7 +7508,7 @@ GiveExperiencePoints: ; 3ee3b
call ApplyStatLevelMultiplierOnAllStats
callfar ApplyStatusEffectOnPlayerStats
callfar BadgeStatBoosts
- callfar UpdatePlayerHUD
+ callfar Predef_UpdatePlayerHUD
call EmptyBattleTextBox
call LoadTileMapToTempTileMap
ld a, $1
@@ -7605,14 +7531,14 @@ GiveExperiencePoints: ; 3ee3b
.skip_animation2
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
hlcoord 9, 0
ld b, $a
ld c, $9
call TextBox
hlcoord 11, 1
ld bc, 4
- predef PrintTempMonStats
+ predef Predef_PrintTempMonStats
ld c, $1e
call DelayFrames
call WaitPressAorB_BlinkCursor
@@ -7632,7 +7558,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, b
ld [CurPartyLevel], a
push bc
- predef LearnLevelMoves
+ predef Predef_LearnLevelMoves
pop bc
ld a, b
cp c
@@ -7643,7 +7569,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, [CurPartyMon]
ld c, a
ld b, SET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop af
ld [CurPartyLevel], a
@@ -7765,7 +7691,7 @@ AnimateExpBar: ; 3f136
ld [wd002], a
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
ld a, [TempMonLevel]
ld b, a
ld e, a
@@ -8093,7 +8019,7 @@ TextJump_GoodComeBack: ; 3f352
db "@"
; 3f357
-UnusedFunction_TextJump_ComeBack: ; 3f357
+Unreferenced_TextJump_ComeBack: ; 3f357
; this function doesn't seem to be used
ld hl, TextJump_ComeBack
ret
@@ -8104,7 +8030,7 @@ TextJump_ComeBack: ; 3f35b
db "@"
; 3f360
-HandleSafariAngerEatingStatus: ; unreferenced
+Unreferenced_HandleSafariAngerEatingStatus:
ld hl, wSafariMonEating
ld a, [hl]
and a
@@ -8136,7 +8062,7 @@ HandleSafariAngerEatingStatus: ; unreferenced
jp StdBattleTextBox
; 3f390
-FillInExpBar: ; 3f390
+Predef_FillInExpBar: ; 3f390
push hl
call CalcExpBar
pop hl
@@ -8278,7 +8204,7 @@ PlaceExpBar: ; 3f41c
ret
; 3f43d
-GetBattleMonBackpic: ; 3f43d
+Predef_GetBattleMonBackpic: ; 3f43d
ld a, [PlayerSubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
@@ -8294,9 +8220,9 @@ DropPlayerSub: ; 3f447
ld a, [BattleMonSpecies]
ld [CurPartySpecies], a
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
pop af
ld [CurPartySpecies], a
ret
@@ -8314,7 +8240,7 @@ GetBattleMonBackpic_DoAnim: ; 3f46f
ret
; 3f47c
-GetEnemyMonFrontpic: ; 3f47c
+Predef_GetEnemyMonFrontpic: ; 3f47c
ld a, [EnemySubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
@@ -8333,9 +8259,9 @@ DropEnemySub: ; 3f486
ld [CurPartySpecies], a
call GetBaseData
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
pop af
ld [CurPartySpecies], a
ret
@@ -8352,7 +8278,7 @@ GetEnemyMonFrontpic_DoAnim: ; 3f4b4
ret
; 3f4c1
-StartBattle: ; 3f4c1
+Predef_StartBattle: ; 3f4c1
; This check prevents you from entering a battle without any Pokemon.
; Those using walk-through-walls to bypass getting a Pokemon experience
; the effects of this check.
@@ -8371,14 +8297,13 @@ StartBattle: ; 3f4c1
ret
; 3f4d9
-_DoBattle: ; 3f4d9
-; unreferenced
+Unreferenced_DoBattle: ; 3f4d9
call DoBattle
ret
; 3f4dd
BattleIntro: ; 3f4dd
- farcall TrainerRankings_Battles ; mobile
+ farcall StubbedTrainerRankings_Battles ; mobile
call LoadTrainerOrWildMonPic
xor a
ld [TempBattleMonSpecies], a
@@ -8412,7 +8337,7 @@ BattleIntro: ; 3f4dd
call ClearSprites
ld a, [wBattleMode]
cp WILD_BATTLE
- call z, UpdateEnemyHUD
+ call z, Predef_UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ret
@@ -8463,7 +8388,7 @@ BackUpBGMap2: ; 3f568
InitEnemyTrainer: ; 3f594
ld [TrainerClass], a
- farcall TrainerRankings_TrainerBattles
+ farcall StubbedTrainerRankings_TrainerBattles
xor a
ld [TempEnemyMonSpecies], a
callfar GetTrainerAttributes
@@ -8477,20 +8402,20 @@ InitEnemyTrainer: ; 3f594
.ok
ld de, vTiles2
- callfar GetTrainerPic
+ callfar Predef_GetTrainerPic
xor a
ld [hGraphicStartTile], a
dec a
ld [wEnemyItemState], a
hlcoord 12, 0
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, -1
ld [CurOTMon], a
ld a, TRAINER_BATTLE
ld [wBattleMode], a
- call IsJohtoGymLeader
+ call IsGymLeader
jr nc, .done
xor a
ld [CurPartyMon], a
@@ -8519,7 +8444,7 @@ InitEnemyTrainer: ; 3f594
InitEnemyWildmon: ; 3f607
ld a, WILD_BATTLE
ld [wBattleMode], a
- farcall TrainerRankings_WildBattles
+ farcall StubbedTrainerRankings_WildBattles
call LoadEnemyMon
ld hl, EnemyMonMoves
ld de, wWildMonMoves
@@ -8530,7 +8455,7 @@ InitEnemyWildmon: ; 3f607
ld bc, NUM_MOVES
call CopyBytes
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld a, [CurPartySpecies]
cp UNOWN
jr nz, .skip_unown
@@ -8541,18 +8466,17 @@ InitEnemyWildmon: ; 3f607
ld [wFirstUnownSeen], a
.skip_unown
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
xor a
ld [TrainerClass], a
ld [hGraphicStartTile], a
hlcoord 12, 0
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 3f662
-Function3f662: ; 3f662
-; XXX
+Unreferenced_Function3f662: ; 3f662
ld hl, EnemyMonMoves
ld de, wListMoves_MoveIndicesBuffer
ld b, NUM_MOVES
@@ -8627,7 +8551,7 @@ ExitBattle: ; 3f69e
call CheckPayDay
xor a
ld [wForceEvolution], a
- predef EvolveAfterBattle
+ predef Predef_EvolveAfterBattle
farcall GivePokerusAndConvertBerries
ret
; 3f6d0
@@ -8702,7 +8626,7 @@ CheckPayDay: ; 3f71d
; 3f759
ShowLinkBattleParticipantsAfterEnd: ; 3f759
- farcall TrainerRankings_LinkBattles
+ farcall StubbedTrainerRankings_LinkBattles
farcall BackupMobileEventIndex
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
@@ -8732,17 +8656,17 @@ DisplayLinkBattleResult: ; 3f77c
cp $1
jr c, .victory
jr z, .loss
- farcall TrainerRankings_ColosseumDraws
+ farcall StubbedTrainerRankings_ColosseumDraws
ld de, .Draw
jr .store_result
.victory
- farcall TrainerRankings_ColosseumWins
+ farcall StubbedTrainerRankings_ColosseumWins
ld de, .Win
jr .store_result
.loss
- farcall TrainerRankings_ColosseumLosses
+ farcall StubbedTrainerRankings_ColosseumLosses
ld de, .Lose
jr .store_result
@@ -9301,7 +9225,7 @@ InitBattleDisplay: ; 3fb6c
ld [hGraphicStartTile], a
hlcoord 2, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
xor a
ld [hWY], a
ld [rWY], a
@@ -9374,7 +9298,7 @@ GetTrainerBackpic: ; 3fbff
.Decompress:
ld de, vTiles2 tile $31
ld c, $31
- predef DecompressPredef
+ predef Predef_Decompress
ret
; 3fc30
@@ -9396,32 +9320,32 @@ CopyBackpic: ; 3fc30
ld [hGraphicStartTile], a
hlcoord 2, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 3fc5b
.LoadTrainerBackpicAsOAM: ; 3fc5b
- ld hl, Sprites
+ ld hl, Sprite01
xor a
ld [hMapObjectIndexBuffer], a
- ld b, $6
- ld e, 21 * 8
+ ld b, 6
+ ld e, (SCREEN_WIDTH + 1) * TILE_WIDTH
.outer_loop
- ld c, $3
- ld d, 8 * 8
+ ld c, 3
+ ld d, 8 * TILE_WIDTH
.inner_loop
- ld [hl], d
+ ld [hl], d ; y
inc hl
- ld [hl], e
+ ld [hl], e ; x
inc hl
ld a, [hMapObjectIndexBuffer]
- ld [hli], a
+ ld [hli], a ; tile id
inc a
ld [hMapObjectIndexBuffer], a
- ld a, $1
- ld [hli], a
+ ld a, PAL_BATTLE_OB_PLAYER
+ ld [hli], a ; attributes
ld a, d
- add $8
+ add 1 * TILE_WIDTH
ld d, a
dec c
jr nz, .inner_loop
@@ -9429,7 +9353,7 @@ CopyBackpic: ; 3fc30
add $3
ld [hMapObjectIndexBuffer], a
ld a, e
- add $8
+ add 1 * TILE_WIDTH
ld e, a
dec b
jr nz, .outer_loop
@@ -9476,7 +9400,7 @@ BattleStartMessage: ; 3fc8b
hlcoord 12, 0
ld d, $0
ld e, ANIM_MON_NORMAL
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
jr .skip_cry ; cry is played during the animation
.cry_no_anim
@@ -9490,7 +9414,7 @@ BattleStartMessage: ; 3fc8b
cp BATTLETYPE_FISH
jr nz, .NotFishing
- farcall TrainerRankings_HookedEncounters
+ farcall StubbedTrainerRankings_HookedEncounters
ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index f86f90479..c46ded638 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -64,7 +64,7 @@ DoMove: ; 3402c
inc hl
ld [de], a
inc de
- cp $ff
+ cp -1
jr nz, .GetMoveEffect
; Start at the first command.
@@ -138,7 +138,7 @@ BattleCommand_CheckTurn: ; 34084
ld [AlreadyFailed], a
ld [wSomeoneIsRampaging], a
- ld a, 10 ; 1.0
+ ld a, EFFECTIVE
ld [TypeModifier], a
ld a, [hBattleTurn]
@@ -182,7 +182,7 @@ CheckPlayerTurn:
call StdBattleTextBox
call CantMove
call UpdateBattleMonInParty
- ld hl, UpdatePlayerHUD
+ ld hl, Predef_UpdatePlayerHUD
call CallBattleCore
ld a, $1
ld [hBGMapMode], a
@@ -282,7 +282,7 @@ CheckPlayerTurn:
; 50% chance of hitting itself
call BattleRandom
- cp $80
+ cp 50 percent + 1
jr nc, .not_confused
; clear confusion-dependent substatus
@@ -311,7 +311,7 @@ CheckPlayerTurn:
; 50% chance of infatuation
call BattleRandom
- cp $80
+ cp 50 percent + 1
jr c, .not_infatuated
ld hl, InfatuationText
@@ -345,7 +345,7 @@ CheckPlayerTurn:
; 25% chance to be fully paralyzed
call BattleRandom
- cp $3f
+ cp 25 percent
ret nc
ld hl, FullyParalyzedText
@@ -433,7 +433,7 @@ CheckEnemyTurn: ; 3421f
call StdBattleTextBox
call CantMove
call UpdateEnemyMonInParty
- ld hl, UpdateEnemyHUD
+ ld hl, Predef_UpdateEnemyHUD
call CallBattleCore
ld a, $1
ld [hBGMapMode], a
@@ -457,6 +457,8 @@ CheckEnemyTurn: ; 3421f
ld hl, EnemyMonStatus
bit FRZ, [hl]
jr z, .not_frozen
+
+ ; Flame Wheel and Sacred Fire thaw the user.
ld a, [CurEnemyMove]
cp FLAME_WHEEL
jr z, .not_frozen
@@ -611,7 +613,7 @@ CheckEnemyTurn: ; 3421f
; 25% chance to be fully paralyzed
call BattleRandom
- cp $3f
+ cp 25 percent
ret nc
ld hl, FullyParalyzedText
@@ -670,7 +672,7 @@ HitConfusion: ; 343a5
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
call z, PlayFXAnimID
- ld hl, UpdatePlayerHUD
+ ld hl, Predef_UpdatePlayerHUD
call CallBattleCore
ld a, $1
ld [hBGMapMode], a
@@ -844,19 +846,20 @@ BattleCommand_CheckObedience: ; 343db
.DoNothing:
+ ; 4 random choices
call BattleRandom
- and 3
+ and %11
ld hl, LoafingAroundText
- and a
+ and a ; 0
jr z, .Print
ld hl, WontObeyText
- dec a
+ dec a ; 1
jr z, .Print
ld hl, TurnedAwayText
- dec a
+ dec a ; 2
jr z, .Print
ld hl, IgnoredOrdersText
@@ -886,7 +889,7 @@ BattleCommand_CheckObedience: ; 343db
.GetTotalPP:
ld a, [hli]
- and $3f ; exclude pp up
+ and PP_MASK
add b
ld b, a
@@ -909,7 +912,7 @@ BattleCommand_CheckObedience: ; 343db
; Can't use another move if only one move has PP.
ld a, [hl]
- and $3f
+ and PP_MASK
cp b
jr z, .DoNothing
@@ -929,7 +932,7 @@ BattleCommand_CheckObedience: ; 343db
.RandomMove:
call BattleRandom
- and 3 ; TODO NUM_MOVES
+ maskbits NUM_MOVES +- 1
cp b
jr nc, .RandomMove
@@ -945,7 +948,7 @@ BattleCommand_CheckObedience: ; 343db
ld d, 0
add hl, de
ld a, [hl]
- and $3f
+ and PP_MASK
jr z, .RandomMove
@@ -989,6 +992,7 @@ IgnoreSleepOnly: ; 3451f
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
+ ; Snore and Sleep Talk bypass sleep.
cp SNORE
jr z, .CheckSleep
cp SLEEP_TALK
@@ -1115,7 +1119,7 @@ BattleCommand_DoTurn: ; 34555
ld b, 0
add hl, bc
ld a, [hl]
- and $3f
+ and PP_MASK
jr z, .out_of_pp
dec [hl]
ld b, 0
@@ -1172,7 +1176,7 @@ BattleCommand_DoTurn: ; 34555
db EFFECT_ROLLOUT
db EFFECT_BIDE
db EFFECT_RAMPAGE
- db $ff
+ db -1
; 3460b
CheckMimicUsed: ; 3460b
@@ -1266,7 +1270,7 @@ BattleCommand_Critical: ; 34631
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
ld de, 1
- ld hl, .Criticals
+ ld hl, CriticalHitMoves
push bc
call IsInArray
pop bc
@@ -1288,7 +1292,7 @@ BattleCommand_Critical: ; 34631
inc c
.Tally:
- ld hl, .Chances
+ ld hl, CriticalHitChances
ld b, 0
add hl, bc
call BattleRandom
@@ -1298,12 +1302,7 @@ BattleCommand_Critical: ; 34631
ld [CriticalHit], a
ret
-.Criticals:
- db KARATE_CHOP, RAZOR_WIND, RAZOR_LEAF, CRABHAMMER, SLASH, AEROBLAST, CROSS_CHOP, $ff
-.Chances:
- ; 6.25% 12.1% 24.6% 33.2% 49.6% 49.6% 49.6%
- db $11, $20, $40, $55, $80, $80, $80
- ; 0 1 2 3 4 5 6
+INCLUDE "data/battle/critical_hits.asm"
; 346b2
@@ -1433,11 +1432,11 @@ BattleCommand_Stab: ; 346d2
.TypesLoop:
ld a, [hli]
- cp $ff
+ cp -1
jr z, .end
; foresight
- cp $fe
+ cp -2
jr nz, .SkipForesightCheck
ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar
@@ -1539,12 +1538,12 @@ BattleCheckTypeMatchup: ; 347c8
ld hl, EnemyMonType1
ld a, [hBattleTurn]
and a
- jr z, CheckTypeMatchup
+ jr z, Predef_CheckTypeMatchup
ld hl, BattleMonType1
-CheckTypeMatchup: ; 347d3
+Predef_CheckTypeMatchup: ; 347d3
; There is an incorrect assumption about this function made in the AI related code: when
-; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the
-; offensive type in a will make this function do the right thing. Since a is overwritten,
+; the AI calls Predef_CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing
+; the offensive type in a will make this function do the right thing. Since a is overwritten,
; this assumption is incorrect. A simple fix would be to load the move type for the
; current move into a in BattleCheckTypeMatchup, before falling through, which is
; consistent with how the rest of the code assumes this code works like.
@@ -1562,9 +1561,9 @@ CheckTypeMatchup: ; 347d3
ld hl, TypeMatchups
.TypesLoop:
ld a, [hli]
- cp $ff
+ cp -1
jr z, .End
- cp $fe
+ cp -2
jr nz, .Next
ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar
@@ -1640,7 +1639,7 @@ BattleCommand_ResetTypeMatchup: ; 34833
INCLUDE "engine/battle/ai/switch.asm"
-INCLUDE "data/type_matchups.asm"
+INCLUDE "data/battle/type_matchups.asm"
BattleCommand_DamageVariation: ; 34cfd
; damagevariation
@@ -1675,7 +1674,7 @@ BattleCommand_DamageVariation: ; 34cfd
.loop
call BattleRandom
rrca
- cp $d9 ; 85%
+ cp 85 percent + 1
jr c, .loop
ld [hMultiplier], a
@@ -1756,7 +1755,7 @@ BattleCommand_CheckHit: ; 34d32
.skip_brightpowder
ld a, b
- cp $ff
+ cp -1
jr z, .Hit
call BattleRandom
@@ -1954,7 +1953,7 @@ BattleCommand_CheckHit: ; 34d32
.skip_foresight_check
; subtract evasion from 14
- ld a, 14
+ ld a, MAX_STAT_LEVEL + 1
sub c
ld c, a
; store the base move accuracy for math ops
@@ -1969,7 +1968,7 @@ BattleCommand_CheckHit: ; 34d32
.accuracy_loop
; look up the multiplier from the table
push bc
- ld hl, .AccProb
+ ld hl, AccuracyLevelMultipliers
dec b
sla b
ld c, b
@@ -2013,21 +2012,7 @@ BattleCommand_CheckHit: ; 34d32
ld [hl], a
ret
-.AccProb:
- db 33, 100 ; 33% -6
- db 36, 100 ; 36% -5
- db 43, 100 ; 43% -4
- db 50, 100 ; 50% -3
- db 60, 100 ; 60% -2
- db 75, 100 ; 75% -1
- db 1, 1 ; 100% 0
- db 133, 100 ; 133% +1
- db 166, 100 ; 166% +2
- db 2, 1 ; 200% +3
- db 233, 100 ; 233% +4
- db 133, 50 ; 266% +5
- db 3, 1 ; 300% +6
-
+INCLUDE "data/battle/accuracy_multipliers.asm"
; 34ecc
@@ -2199,7 +2184,7 @@ BattleCommand_HitTargetNoSub: ; 34f60
xor 1
ld [wKickCounter], a
ld a, [de]
- cp $1
+ cp 1
push af
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@@ -2438,7 +2423,7 @@ GetFailureResultText: ; 350e4
ld hl, AttackMissedText
ld de, AttackMissed2Text
ld a, [CriticalHit]
- cp $ff
+ cp -1
jr nz, .got_text
ld hl, UnaffectedText
.got_text
@@ -2636,7 +2621,7 @@ BattleCommand_CheckDestinyBond: ; 351c0
ld [Buffer6], a
ld h, b
ld l, c
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
call RefreshBattleHuds
call BattleCommand_SwitchTurn
@@ -3519,7 +3504,7 @@ BattleCommand_DamageCalc: ; 35612
.NextItem:
ld a, [hli]
- cp $ff
+ cp -1
jr z, .DoneItem
; Item effect
@@ -3657,26 +3642,7 @@ BattleCommand_DamageCalc: ; 35612
; 35703
-TypeBoostItems: ; 35703
- db HELD_NORMAL_BOOST, NORMAL ; Pink/Polkadot Bow
- db HELD_FIGHTING_BOOST, FIGHTING ; Blackbelt
- db HELD_FLYING_BOOST, FLYING ; Sharp Beak
- db HELD_POISON_BOOST, POISON ; Poison Barb
- db HELD_GROUND_BOOST, GROUND ; Soft Sand
- db HELD_ROCK_BOOST, ROCK ; Hard Stone
- db HELD_BUG_BOOST, BUG ; Silverpowder
- db HELD_GHOST_BOOST, GHOST ; Spell Tag
- db HELD_FIRE_BOOST, FIRE ; Charcoal
- db HELD_WATER_BOOST, WATER ; Mystic Water
- db HELD_GRASS_BOOST, GRASS ; Miracle Seed
- db HELD_ELECTRIC_BOOST, ELECTRIC ; Magnet
- db HELD_PSYCHIC_BOOST, PSYCHIC ; Twistedspoon
- db HELD_ICE_BOOST, ICE ; Nevermeltice
- db HELD_DRAGON_BOOST, DRAGON ; Dragon Scale
- db HELD_DARK_BOOST, DARK ; Blackglasses
- db HELD_STEEL_BOOST, STEEL ; Metal Coat
- db $ff
-; 35726
+INCLUDE "data/battle/type_boost_items.asm"
BattleCommand_ConstantDamage: ; 35726
@@ -3941,7 +3907,7 @@ BattleCommand_Encore: ; 35864
ld bc, BattleMonPP - BattleMonMoves - 1
add hl, bc
ld a, [hl]
- and $3f
+ and PP_MASK
jp z, .failed
ld a, [AttackMissed]
and a
@@ -4049,7 +4015,7 @@ BattleCommand_PainSplit: ; 35926
ld a, $1
ld [wWhichHPBar], a
hlcoord 10, 9
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
ld hl, EnemyMonHP
ld a, [hli]
ld [Buffer4], a
@@ -4064,7 +4030,7 @@ BattleCommand_PainSplit: ; 35926
ld [wWhichHPBar], a
call ResetDamage
hlcoord 2, 2
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
farcall _UpdateBattleHUDs
ld hl, SharedPainText
@@ -4206,7 +4172,7 @@ BattleCommand_Conversion2: ; 359e6
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
- predef GetTypeName
+ predef Predef_GetTypeName
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -4421,7 +4387,7 @@ BattleCommand_SleepTalk: ; 35b33
.sample_move
push hl
call BattleRandom
- and 3 ; TODO factor in NUM_MOVES
+ maskbits NUM_MOVES +- 1
ld c, a
ld b, 0
add hl, bc
@@ -4585,17 +4551,18 @@ BattleCommand_Spite: ; 35c0f
add hl, bc
pop bc
ld a, [hl]
- and $3f
+ and PP_MASK
jr z, .failed
push bc
call GetMoveName
+ ; lose 2-5 PP
call BattleRandom
- and 3
+ and %11
inc a
inc a
ld b, a
ld a, [hl]
- and $3f
+ and PP_MASK
cp b
jr nc, .deplete_pp
ld b, a
@@ -4671,7 +4638,7 @@ BattleCommand_FalseSwipe: ; 35c94
ld [de], a
.okay
ld a, [CriticalHit]
- cp $2
+ cp 2
jr nz, .carry
xor a
ld [CriticalHit], a
@@ -4744,7 +4711,7 @@ PlayFXAnimID: ; 35d08
ld c, 3
call DelayFrames
- callfar PlayBattleAnim
+ callfar Predef_PlayBattleAnim
ret
@@ -4806,7 +4773,7 @@ EnemyHurtItself: ; 35d1c
hlcoord 2, 2
xor a
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
.did_no_damage
jp RefreshBattleHuds
@@ -4866,7 +4833,7 @@ PlayerHurtItself: ; 35d7e
hlcoord 10, 9
ld a, $1
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
.did_no_damage
jp RefreshBattleHuds
@@ -5049,7 +5016,7 @@ BattleCommand_SleepTarget: ; 35e5c
jr nz, .dont_fail
call BattleRandom
- cp $40 ; 25%
+ cp 25 percent + 1 ; 25% chance AI fails
ret c
.dont_fail
@@ -5149,7 +5116,7 @@ BattleCommand_Poison: ; 35f2c
jr nz, .mimic_random
call BattleRandom
- cp $40 ; 25% chance AI fails
+ cp 25 percent + 1 ; 25% chance AI fails
jr c, .failed
.mimic_random
@@ -5334,7 +5301,7 @@ SapHealth: ; 36011
xor a
.hp_bar
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
call RefreshBattleHuds
jp UpdateBattleMonInParty
@@ -5827,7 +5794,7 @@ BattleCommand_StatDown: ; 362e3
inc b
.ComputerMiss:
-; Computer opponents have a 1/4 chance of failing.
+; Computer opponents have a 25% chance of failing.
ld a, [hBattleTurn]
and a
jr z, .DidntMiss
@@ -5852,7 +5819,7 @@ BattleCommand_StatDown: ; 362e3
jr z, .DidntMiss
call BattleRandom
- cp $40
+ cp 25 percent + 1 ; 25% chance AI fails
jr c, .Failed
.DidntMiss:
@@ -6104,7 +6071,7 @@ BattleCommand_StatDownFailText: ; 3646a
GetStatName: ; 3648f
- ld hl, .names
+ ld hl, StatNames
ld c, "@"
.CheckName:
dec b
@@ -6120,33 +6087,10 @@ GetStatName: ; 3648f
ld bc, StringBuffer3 - StringBuffer2
jp CopyBytes
-.names
- db "ATTACK@"
- db "DEFENSE@"
- db "SPEED@"
- db "SPCL.ATK@"
- db "SPCL.DEF@"
- db "ACCURACY@"
- db "EVASION@"
- db "ABILITY@"
-; 364e6
-
-
-StatLevelMultipliers: ; 364e6
- db 25, 100 ; 0.25x
- db 28, 100 ; 0.28x
- db 33, 100 ; 0.33x
- db 40, 100 ; 0.40x
- db 50, 100 ; 0.50x
- db 66, 100 ; 0.66x
- db 1, 1 ; 1.00x
- db 15, 10 ; 1.50x
- db 2, 1 ; 2.00x
- db 25, 10 ; 2.50x
- db 3, 1 ; 3.00x
- db 35, 10 ; 3.50x
- db 4, 1 ; 4.00x
-; 36500
+INCLUDE "data/battle/stat_names.asm"
+
+
+INCLUDE "data/battle/stat_multipliers.asm"
BattleCommand_AllStatsUp: ; 36500
@@ -6266,13 +6210,12 @@ BattleCommand_TriStatusChance: ; 3658f
call BattleCommand_EffectChance
-; 1/3 chance of each status
.loop
+ ; 1/3 chance of each status
call BattleRandom
swap a
- and 3
+ and %11
jr z, .loop
-; jump
dec a
ld hl, .ptrs
rst JumpTable
@@ -6296,11 +6239,11 @@ BattleCommand_Curl: ; 365a7
BattleCommand_RaiseSubNoAnim: ; 365af
- ld hl, GetBattleMonBackpic
+ ld hl, Predef_GetBattleMonBackpic
ld a, [hBattleTurn]
and a
jr z, .PlayerTurn
- ld hl, GetEnemyMonFrontpic
+ ld hl, Predef_GetEnemyMonFrontpic
.PlayerTurn:
xor a
ld [hBGMapMode], a
@@ -7450,7 +7393,8 @@ BattleCommand_TrapTarget: ; 36c2d
bit SUBSTATUS_SUBSTITUTE, a
ret nz
call BattleRandom
- and 3
+ ; trapped for 2-5 turns
+ and %11
inc a
inc a
inc a
@@ -7581,7 +7525,7 @@ BattleCommand_Recoil: ; 36cb2
xor a
.animate_hp_bar
ld [wWhichHPBar], a
- predef AnimateHPBar
+ predef Predef_AnimateHPBar
call RefreshBattleHuds
ld hl, RecoilText
jp StdBattleTextBox
@@ -7648,8 +7592,9 @@ BattleCommand_FinishConfusingTarget: ; 36d70
.got_confuse_count
set SUBSTATUS_CONFUSED, [hl]
+ ; confused for 2-5 turns
call BattleRandom
- and 3
+ and %11
inc a
inc a
ld [bc], a
@@ -8078,7 +8023,7 @@ BattleCommand_LeechSeed: ; 36f9d
BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove
- farcall TrainerRankings_Splash
+ farcall StubbedTrainerRankings_Splash
jp PrintNothingHappened
; 36fed
@@ -8259,7 +8204,7 @@ BattleCommand_Conversion: ; 3707f
.done
.loop3
call BattleRandom
- and 3 ; TODO factor in NUM_MOVES
+ maskbits NUM_MOVES +- 1
ld c, a
ld b, 0
ld hl, StringBuffer1
@@ -8282,7 +8227,7 @@ BattleCommand_Conversion: ; 3707f
inc de
ld [de], a
ld [wNamedObjectIndexBuffer], a
- farcall GetTypeName
+ farcall Predef_GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -8605,7 +8550,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_Selfdestruct: ; 37380
- farcall TrainerRankings_Selfdestruct
+ farcall StubbedTrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a
ld c, 3
@@ -9911,7 +9856,7 @@ PlayUserBattleAnim: ; 37e47
push hl
push de
push bc
- callfar PlayBattleAnim
+ callfar Predef_PlayBattleAnim
pop bc
pop de
pop hl
@@ -9933,7 +9878,7 @@ PlayOpponentBattleAnim: ; 37e54
push bc
call BattleCommand_SwitchTurn
- callfar PlayBattleAnim
+ callfar Predef_PlayBattleAnim
call BattleCommand_SwitchTurn
pop bc
diff --git a/engine/battle/effect_commands/attract.asm b/engine/battle/effect_commands/attract.asm
index 0a6d7c975..fc73d234c 100755
--- a/engine/battle/effect_commands/attract.asm
+++ b/engine/battle/effect_commands/attract.asm
@@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
xor a
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .genderless_samegender
ld b, 1
@@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
pop bc
jr c, .genderless_samegender
diff --git a/engine/battle/effect_commands/present.asm b/engine/battle/effect_commands/present.asm
index 819294f8c..2b358e8b9 100755
--- a/engine/battle/effect_commands/present.asm
+++ b/engine/battle/effect_commands/present.asm
@@ -31,7 +31,7 @@ BattleCommand_Present: ; 37874
ld c, 0
.next
ld a, [hli]
- cp $ff
+ cp -1
jr z, .heal_effect ; 378a4 $11
cp b
jr nc, .got_power ; 378a7 $4
@@ -89,5 +89,5 @@ BattleCommand_Present: ; 37874
db 40 percent, 40
db 70 percent + 1, 80
db 80 percent, 120
- db $ff
+ db -1 ; end
; 3790e
diff --git a/engine/battle/hidden_power.asm b/engine/battle/hidden_power.asm
index c75a67ab3..a1d3957e4 100644
--- a/engine/battle/hidden_power.asm
+++ b/engine/battle/hidden_power.asm
@@ -16,12 +16,12 @@ HiddenPowerDamage: ; fbced
; Attack
ld a, [hl]
swap a
- and 8
+ and %1000
; Defense
ld b, a
ld a, [hli]
- and 8
+ and %1000
srl a
or b
@@ -29,7 +29,7 @@ HiddenPowerDamage: ; fbced
ld b, a
ld a, [hl]
swap a
- and 8
+ and %1000
srl a
srl a
or b
@@ -37,7 +37,7 @@ HiddenPowerDamage: ; fbced
; Special
ld b, a
ld a, [hl]
- and 8
+ and %1000
srl a
srl a
srl a
@@ -52,7 +52,7 @@ HiddenPowerDamage: ; fbced
; Add Special & 3
ld b, a
ld a, [hld]
- and 3
+ and %0011
add b
; Divide by 2 and add 30 + 1
@@ -67,12 +67,12 @@ HiddenPowerDamage: ; fbced
; Def & 3
ld a, [hl]
- and 3
+ and %0011
ld b, a
; + (Atk & 3) << 2
ld a, [hl]
- and 3 << 4
+ and %0011 << 4
swap a
add a
add a
diff --git a/engine/battle/menu.asm b/engine/battle/menu.asm
index 07d3e6081..e44d92f83 100755
--- a/engine/battle/menu.asm
+++ b/engine/battle/menu.asm
@@ -34,8 +34,7 @@ Function24f19: ; 24f19
BattleMenuDataHeader: ; 24f2c
db $40 ; flags
- db 12, 08 ; start coords
- db 17, 19 ; end coords
+ menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw MenuData_0x24f34
db 1 ; default option
; 24f34
@@ -57,8 +56,7 @@ Strings24f3d: ; 0x24f3d
MenuDataHeader_0x24f4e: ; 24f4e
db $40 ; flags
- db 12, 00 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw MenuData_0x24f56
db 1 ; default option
; 24f56
@@ -88,8 +86,7 @@ Function24f7c: ; 24f7c
MenuDataHeader_0x24f89: ; 24f89
db $40 ; flags
- db 12, 02 ; start coords
- db 17, 19 ; end coords
+ menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw MenuData_0x24f91
db 1 ; default option
; 24f91
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index c78e9fd84..40c472e50 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -33,7 +33,7 @@ AppearUser: ; fbd77 (3e:7d77)
ld a, $31
.okay
ld [hGraphicStartTile], a
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
FinishAppearDisappearUser: ; fbd91 (3e:7d91)
ld a, $1
ld [hBGMapMode], a
@@ -146,15 +146,15 @@ DoWeatherModifiers: ; fbda4
ret
.WeatherTypeModifiers:
- db WEATHER_RAIN, WATER, 15
- db WEATHER_RAIN, FIRE, 05
- db WEATHER_SUN, FIRE, 15
- db WEATHER_SUN, WATER, 05
- db $ff
+ db WEATHER_RAIN, WATER, MORE_EFFECTIVE
+ db WEATHER_RAIN, FIRE, NOT_VERY_EFFECTIVE
+ db WEATHER_SUN, FIRE, MORE_EFFECTIVE
+ db WEATHER_SUN, WATER, NOT_VERY_EFFECTIVE
+ db -1 ; end
.WeatherMoveModifiers:
- db WEATHER_RAIN, EFFECT_SOLARBEAM, 05
- db $ff
+ db WEATHER_RAIN, EFFECT_SOLARBEAM, NOT_VERY_EFFECTIVE
+ db -1 ; end
; fbe24
@@ -183,7 +183,7 @@ DoBadgeTypeBoosts: ; fbe24
.CheckBadge:
ld a, [hl]
- cp $ff
+ cp -1
jr z, .done
srl b
@@ -236,22 +236,24 @@ DoBadgeTypeBoosts: ; fbe24
ret
.BadgeTypes:
- db FLYING ; zephyrbadge
- db BUG ; hivebadge
- db NORMAL ; plainbadge
- db GHOST ; fogbadge
- db STEEL ; mineralbadge
- db FIGHTING ; stormbadge
- db ICE ; glacierbadge
- db DRAGON ; risingbadge
-
- db ROCK ; boulderbadge
- db WATER ; cascadebadge
- db ELECTRIC ; thunderbadge
- db GRASS ; rainbowbadge
- db POISON ; soulbadge
- db PSYCHIC ; marshbadge
- db FIRE ; volcanobadge
- db GROUND ; earthbadge
- db $ff
+; entries correspond to wJohtoBadges constants
+ db FLYING ; ZEPHYRBADGE
+ db BUG ; HIVEBADGE
+ db NORMAL ; PLAINBADGE
+ db GHOST ; FOGBADGE
+ db STEEL ; MINERALBADGE
+ db FIGHTING ; STORMBADGE
+ db ICE ; GLACIERBADGE
+ db DRAGON ; RISINGBADGE
+ ; fallthrough
+; entries correspond to wKantoBadges constants
+ db ROCK ; BOULDERBADGE
+ db WATER ; CASCADEBADGE
+ db ELECTRIC ; THUNDERBADGE
+ db GRASS ; RAINBOWBADGE
+ db POISON ; SOULBADGE
+ db PSYCHIC ; MARSHBADGE
+ db FIRE ; VOLCANOBADGE
+ db GROUND ; EARTHBADGE
+ db -1 ; end
; fbe91
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index a09c6dd08..4f3dc8e55 100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -103,7 +103,7 @@ TrainerType1: ; 397eb
ld a, OTPARTYMON
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
pop hl
jr .loop
; 39806
@@ -124,7 +124,7 @@ TrainerType2: ; 39806
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld a, [OTPartyCount]
dec a
ld hl, OTPartyMon1Moves
@@ -200,7 +200,7 @@ TrainerType3: ; 39871
ld a, OTPARTYMON
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld a, [OTPartyCount]
dec a
ld hl, OTPartyMon1Item
@@ -231,7 +231,7 @@ TrainerType4: ; 3989d
ld [MonType], a
push hl
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld a, [OTPartyCount]
dec a
ld hl, OTPartyMon1Item
diff --git a/engine/battle/returntobattle_useball.asm b/engine/battle/returntobattle_useball.asm
index e6e33f900..4254d24f4 100644
--- a/engine/battle/returntobattle_useball.asm
+++ b/engine/battle/returntobattle_useball.asm
@@ -4,13 +4,13 @@ _ReturnToBattle_UseBall: ; 2715c
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
- farcall GetBattleMonBackpic
+ farcall Predef_GetBattleMonBackpic
jr .continue
.gettutorialbackpic
farcall GetTrainerBackpic
.continue
- farcall GetEnemyMonFrontpic
+ farcall Predef_GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow
diff --git a/engine/battle/sliding_intro.asm b/engine/battle/sliding_intro.asm
index 2cd242c84..418454283 100755
--- a/engine/battle/sliding_intro.asm
+++ b/engine/battle/sliding_intro.asm
@@ -60,9 +60,9 @@ BattleIntroSlidingPics: ; 4e980
; 4e9d6
.subfunction3 ; 4e9d6
- ld hl, Sprites + 1 ; x pixel
+ ld hl, Sprite01XCoord
ld c, $12 ; 18
- ld de, $4
+ ld de, SPRITEOAMSTRUCT_LENGTH
.loop3
dec [hl]
dec [hl]
diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm
index 7f0bff96b..b97eda1b3 100644
--- a/engine/battle/start_battle.asm
+++ b/engine/battle/start_battle.asm
@@ -33,7 +33,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f
add hl, de
ld a, [hl]
ld [BattleMonLevel], a
- predef Predef_StartBattle
+ predef Predef_DoBattleTransition
farcall _LoadBattleFontsHPBar
ld a, 1
ld [hBGMapMode], a
@@ -93,7 +93,7 @@ PlayBattleMusic: ; 2ee6c
cp RED
jr z, .done
- ; really, they should have included admins and scientists here too...
+ ; They should have included EXECUTIVEM, EXECUTIVEF, and SCIENTIST too...
ld de, MUSIC_ROCKET_BATTLE
cp GRUNTM
jr z, .done
@@ -104,8 +104,10 @@ PlayBattleMusic: ; 2ee6c
farcall IsKantoGymLeader
jr c, .done
+ ; IsGymLeader also counts CHAMPION, RED, and the Kanto gym leaders
+ ; but they have been taken care of before this
ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
- farcall IsJohtoGymLeader
+ farcall IsGymLeader
jr c, .done
ld de, MUSIC_RIVAL_BATTLE
diff --git a/engine/battle/trainer_huds.asm b/engine/battle/trainer_huds.asm
index b236fc56b..179cc806d 100755
--- a/engine/battle/trainer_huds.asm
+++ b/engine/battle/trainer_huds.asm
@@ -28,7 +28,7 @@ ShowPlayerMonsRemaining: ; 2c01c
ld [hl], a
ld a, 8
ld [wPlaceBallsDirection], a
- ld hl, Sprites
+ ld hl, Sprite01
jp LoadTrainerHudOAM
; 2c03a
@@ -44,7 +44,7 @@ ShowOTTrainerMonsRemaining: ; 2c03a
ld [hl], 4 * 8
ld a, -8
ld [wPlaceBallsDirection], a
- ld hl, Sprites + PARTY_LENGTH * 4
+ ld hl, Sprite07
jp LoadTrainerHudOAM
; 2c059
@@ -193,7 +193,7 @@ LinkBattle_TrainerHuds: ; 2c10d
ld [hl], 8 * 8
ld a, $8
ld [wPlaceBallsDirection], a
- ld hl, Sprites
+ ld hl, Sprite01
call LoadTrainerHudOAM
ld hl, OTPartyMon1HP
@@ -203,7 +203,7 @@ LinkBattle_TrainerHuds: ; 2c10d
ld a, 10 * 8
ld [hli], a
ld [hl], 13 * 8
- ld hl, Sprites + PARTY_LENGTH * 4
+ ld hl, Sprite07
jp LoadTrainerHudOAM
; 2c143
@@ -212,13 +212,13 @@ LoadTrainerHudOAM: ; 2c143
ld c, PARTY_LENGTH
.loop
ld a, [wPlaceBallsY]
- ld [hli], a
+ ld [hli], a ; y
ld a, [wPlaceBallsX]
- ld [hli], a
+ ld [hli], a ; x
ld a, [de]
- ld [hli], a
- ld a, $3
- ld [hli], a
+ ld [hli], a ; tile id
+ ld a, PAL_BATTLE_OB_YELLOW
+ ld [hli], a ; attributes
ld a, [wPlaceBallsX]
ld b, a
ld a, [wPlaceBallsDirection]
diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm
index ce9e51359..1b5aa564c 100755
--- a/engine/battle/used_move_text.asm
+++ b/engine/battle/used_move_text.asm
@@ -157,12 +157,12 @@ GetMoveGrammar: ; 105e5c
.loop
ld a, [hli]
; end of table?
- cp $ff
+ cp -1
jr z, .end
; match?
cp c
jr z, .end
-; advance grammar type at $00
+; advance grammar type at 0
and a
jr nz, .loop
; next grammar type
@@ -179,106 +179,7 @@ GetMoveGrammar: ; 105e5c
ret
; 105e7a
-MoveGrammar: ; 105e7a
-; made redundant in localization
-; each move is given an identifier for what usedmovetext to use (0-4):
-
-; 0
- db SWORDS_DANCE
- db GROWTH
- db STRENGTH
- db HARDEN
- db MINIMIZE
- db SMOKESCREEN
- db WITHDRAW
- db DEFENSE_CURL
- db EGG_BOMB
- db SMOG
- db BONE_CLUB
- db FLASH
- db SPLASH
- db ACID_ARMOR
- db BONEMERANG
- db REST
- db SHARPEN
- db SUBSTITUTE
- db MIND_READER
- db SNORE
- db PROTECT
- db SPIKES
- db ENDURE
- db ROLLOUT
- db SWAGGER
- db SLEEP_TALK
- db HIDDEN_POWER
- db PSYCH_UP
- db EXTREMESPEED
- db 0 ; end set
-
-; 1
- db RECOVER
- db TELEPORT
- db BIDE
- db SELFDESTRUCT
- db AMNESIA
- db FLAIL
- db 0 ; end set
-
-; 2
- db MEDITATE
- db AGILITY
- db MIMIC
- db DOUBLE_TEAM
- db BARRAGE
- db TRANSFORM
- db STRUGGLE
- db SCARY_FACE
- db 0 ; end set
-
-; 3
- db POUND
- db SCRATCH
- db VICEGRIP
- db WING_ATTACK
- db FLY
- db BIND
- db SLAM
- db HORN_ATTACK
- db WRAP
- db THRASH
- db TAIL_WHIP
- db LEER
- db BITE
- db GROWL
- db ROAR
- db SING
- db PECK
- db ABSORB
- db STRING_SHOT
- db EARTHQUAKE
- db FISSURE
- db DIG
- db TOXIC
- db SCREECH
- db METRONOME
- db LICK
- db CLAMP
- db CONSTRICT
- db POISON_GAS
- db BUBBLE
- db SLASH
- db SPIDER_WEB
- db NIGHTMARE
- db CURSE
- db FORESIGHT
- db CHARM
- db ATTRACT
- db ROCK_SMASH
- db 0 ; end set
-
-; all other moves = 4
- db $ff ; end
-; 105ed0
+INCLUDE "data/moves/grammar.asm"
UpdateUsedMoves: ; 105ed0
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index 16c101301..ee13fbd96 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -1,6 +1,6 @@
; Battle animation command interpreter.
-PlayBattleAnim: ; cc0d6
+Predef_PlayBattleAnim: ; cc0d6
ld a, [rSVBK]
push af
@@ -167,7 +167,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld [rSVBK], a
ld hl, UpdateBattleHuds
- ld a, BANK(UpdatePlayerHUD)
+ ld a, BANK(Predef_UpdatePlayerHUD)
rst FarCall ; Why not "call UpdateBattleHuds"?
pop af
@@ -232,8 +232,7 @@ ClearActorHud: ; cc207
ret
; cc220
-Functioncc220: ; cc220
-; Appears to be unused.
+Unreferenced_Functioncc220: ; cc220
xor a
ld [hBGMapMode], a
ld a, LOW(vBGMap0 tile $28)
@@ -258,15 +257,15 @@ BattleAnim_ClearCGB_OAMFlags: ; cc23d
bit 3, a
jr z, .delete
- ld hl, Sprites + 3
- ld c, (SpritesEnd - Sprites) / 4
+ ld hl, Sprite01Attributes
+ ld c, NUM_SPRITE_OAM_STRUCTS
.loop
ld a, [hl]
and $f0
ld [hli], a
+rept SPRITEOAMSTRUCT_LENGTH +- 1
inc hl
- inc hl
- inc hl
+endr
dec c
jr nz, .loop
ret
@@ -929,18 +928,18 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies
ld hl, BattleMonDVs ; BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles0 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
jr .done
.player
ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies
ld hl, EnemyMonDVs ; EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles0 tile $00
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
.done
pop af
@@ -1077,7 +1076,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
call CopyMinimizePic
ld hl, vTiles2 tile $00
ld de, sScratch
- lb bc, BANK(GetMinimizePic), $31
+ lb bc, BANK(GetMinimizePic), 7 * 7
ret
.player
@@ -1085,7 +1084,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
call CopyMinimizePic
ld hl, vTiles2 tile $31
ld de, sScratch
- lb bc, BANK(GetMinimizePic), $24
+ lb bc, BANK(GetMinimizePic), 6 * 6
ret
CopyMinimizePic: ; cc719 (33:4719)
@@ -1156,16 +1155,16 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
jr z, .player
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
jr .done
.player
ld hl, EnemyMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
.done
pop af
@@ -1207,7 +1206,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
srl a
ld [wSFXDuration], a
call .GetCryTrack
- and 3
+ maskbits NUM_NOISE_CHANS +- 1
ld [CryTracks], a ; CryTracks
ld e, a
@@ -1244,7 +1243,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
BattleAnimCmd_Cry: ; cc807 (33:4807)
call GetBattleAnimByte
- and 3
+ maskbits NUM_NOISE_CHANS +- 1
ld e, a
ld d, 0
ld hl, .CryData
diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm
index 3dd6e7785..a7c2012e5 100644
--- a/engine/battle_anims/bg_effects.asm
+++ b/engine/battle_anims/bg_effects.asm
@@ -506,13 +506,13 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
push bc
call BGEffect_CheckBattleTurn
jr nz, .player_turn
- ld a, ANIM_OBJ_BA
+ ld a, ANIM_OBJ_PLAYERHEADFOLLOW
ld [wBattleAnimTemp0], a
ld a, 16 * 8 + 4
jr .okay
.player_turn
- ld a, ANIM_OBJ_BB
+ ld a, ANIM_OBJ_ENEMYHEADFOLLOW
ld [wBattleAnimTemp0], a
ld a, 6 * 8
.okay
diff --git a/engine/battle_anims/engine.asm b/engine/battle_anims/core.asm
index 55adeae8c..55adeae8c 100755
--- a/engine/battle_anims/engine.asm
+++ b/engine/battle_anims/core.asm
diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm
index 1a66ed51d..5e85ffdb0 100755
--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -4083,18 +4083,19 @@ BattleAnim_IncAnonJumptableIndex: ; ce72c (33:672c)
ret
BattleAnim_Cosine: ; ce732 (33:6732)
- add $10
+; a = d * cos(a * pi/32)
+ add %010000
BattleAnim_Sine: ; ce734 (33:6734)
-; a = d sin a
- and $3f
- cp $20
+; a = d * sin(a * pi/32)
+ and %111111
+ cp %100000
jr nc, .negative
call .ApplySineWave
ld a, h
ret
.negative
- and $1f
+ and %011111
call .ApplySineWave
ld a, h
xor $ff
@@ -4111,7 +4112,7 @@ BattleAnim_Sine: ; ce734 (33:6734)
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, $0
+ ld hl, 0
.multiply
srl a
jr nc, .even
diff --git a/engine/billspc.asm b/engine/billspc.asm
index 3d1177f83..996509beb 100755
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -136,7 +136,7 @@ _DepositPKMN: ; e2391 (38:6391)
jp c, BillsPCDepositFuncCancel
ld a, [wMenuCursorY]
dec a
- and $3
+ and %11
ld e, a
ld d, 0
ld hl, BillsPCDepositJumptable
@@ -230,8 +230,7 @@ BillsPCDepositFuncCancel: ; e2537 (38:6537)
BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d)
db $40 ; flags
- db 04, 09 ; start coords
- db 13, 19 ; end coords
+ menu_coords 9, 4, SCREEN_WIDTH - 1, 13
dw .MenuData2
db 1 ; default option
; 0xe2545
@@ -245,8 +244,7 @@ BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d)
db "CANCEL@"
; 0xe2564 (38:6564)
-BillsPC_ClearThreeBoxes: ; e2564
-; unreferenced
+Unreferenced_BillsPCClearThreeBoxes: ; e2564
hlcoord 0, 0
ld b, 4
ld c, 8
@@ -401,7 +399,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
jp c, .cancel
ld a, [wMenuCursorY]
dec a
- and 3
+ and %11
ld e, a
ld d, 0
ld hl, .dw
@@ -491,8 +489,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
.MenuDataHeader: ; 0xe2731
db $40 ; flags
- db 04, 09 ; start coords
- db 13, 19 ; end coords
+ menu_coords 9, 4, SCREEN_WIDTH - 1, 13
dw .MenuData
db 1 ; default option
; 0xe2739
@@ -663,7 +660,7 @@ _MovePKMNWithoutMail: ; e2759
jp c, .Cancel
ld a, [wMenuCursorY]
dec a
- and 3
+ and %11
ld e, a
ld d, 0
ld hl, .Jumptable2
@@ -715,8 +712,7 @@ _MovePKMNWithoutMail: ; e2759
.MenuDataHeader: ; 0xe28c3
db $40 ; flags
- db 04, 09 ; start coords
- db 13, 19 ; end coords
+ menu_coords 9, 4, SCREEN_WIDTH - 1, 13
dw .MenuData2
db 1 ; default option
; 0xe28cb
@@ -1099,10 +1095,10 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld [CurPartySpecies], a
ld [CurSpecies], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
call GetBaseData
ld de, vTiles2 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
xor a
ld [wBillsPC_MonHasMail], a
ld a, [CurPartySpecies]
@@ -1119,7 +1115,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld a, $3
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .skip_gender
ld a, "♂"
jr nz, .printgender
@@ -1502,7 +1498,7 @@ BillsPC_UpdateSelectionCursor: ; e2e01 (38:6e01)
.place_cursor
ld hl, .OAM
- ld de, Sprites
+ ld de, Sprite01
.loop
ld a, [hl]
cp -1
@@ -1512,9 +1508,9 @@ BillsPC_UpdateSelectionCursor: ; e2e01 (38:6e01)
swap a
add [hl]
inc hl
- ld [de], a
+ ld [de], a ; y
inc de
-rept 3
+rept SPRITEOAMSTRUCT_LENGTH +- 1
ld a, [hli]
ld [de], a
inc de
@@ -1523,36 +1519,36 @@ endr
; e2e2b (38:6e2b)
.OAM: ; e2e2b
- dsprite 4, 6, 10, 0, $00, $00
- dsprite 4, 6, 11, 0, $00, $00
- dsprite 4, 6, 12, 0, $00, $00
- dsprite 4, 6, 13, 0, $00, $00
- dsprite 4, 6, 14, 0, $00, $00
- dsprite 4, 6, 15, 0, $00, $00
- dsprite 4, 6, 16, 0, $00, $00
- dsprite 4, 6, 17, 0, $00, $00
- dsprite 4, 6, 18, 0, $00, $00
- dsprite 4, 6, 18, 7, $00, $00
- dsprite 7, 1, 10, 0, $00, $40
- dsprite 7, 1, 11, 0, $00, $40
- dsprite 7, 1, 12, 0, $00, $40
- dsprite 7, 1, 13, 0, $00, $40
- dsprite 7, 1, 14, 0, $00, $40
- dsprite 7, 1, 15, 0, $00, $40
- dsprite 7, 1, 16, 0, $00, $40
- dsprite 7, 1, 17, 0, $00, $40
- dsprite 7, 1, 18, 0, $00, $40
- dsprite 7, 1, 18, 7, $00, $40
- dsprite 5, 6, 9, 6, $01, $00
- dsprite 6, 1, 9, 6, $01, $40
- dsprite 5, 6, 19, 1, $01, $20
- dsprite 6, 1, 19, 1, $01, $60
+ dsprite 4, 6, 10, 0, $00, 0
+ dsprite 4, 6, 11, 0, $00, 0
+ dsprite 4, 6, 12, 0, $00, 0
+ dsprite 4, 6, 13, 0, $00, 0
+ dsprite 4, 6, 14, 0, $00, 0
+ dsprite 4, 6, 15, 0, $00, 0
+ dsprite 4, 6, 16, 0, $00, 0
+ dsprite 4, 6, 17, 0, $00, 0
+ dsprite 4, 6, 18, 0, $00, 0
+ dsprite 4, 6, 18, 7, $00, 0
+ dsprite 7, 1, 10, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 11, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 12, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 13, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 14, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 15, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 16, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 17, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 18, 0, $00, 0 | Y_FLIP
+ dsprite 7, 1, 18, 7, $00, 0 | Y_FLIP
+ dsprite 5, 6, 9, 6, $01, 0
+ dsprite 6, 1, 9, 6, $01, 0 | Y_FLIP
+ dsprite 5, 6, 19, 1, $01, 0 | X_FLIP
+ dsprite 6, 1, 19, 1, $01, 0 | X_FLIP | Y_FLIP
db -1
; e2e8c
BillsPC_UpdateInsertCursor: ; e2e8c
ld hl, .OAM
- ld de, Sprites
+ ld de, Sprite01
.loop
ld a, [hl]
cp -1
@@ -1562,9 +1558,9 @@ BillsPC_UpdateInsertCursor: ; e2e8c
swap a
add [hl]
inc hl
- ld [de], a
+ ld [de], a ; y
inc de
-rept 3
+rept SPRITEOAMSTRUCT_LENGTH +- 1
ld a, [hli]
ld [de], a
inc de
@@ -1573,20 +1569,20 @@ endr
; e2eac
.OAM: ; e2eac
- dsprite 4, 7, 10, 0, $06, $00
- dsprite 5, 3, 11, 0, $00, $40
- dsprite 5, 3, 12, 0, $00, $40
- dsprite 5, 3, 13, 0, $00, $40
- dsprite 5, 3, 14, 0, $00, $40
- dsprite 5, 3, 15, 0, $00, $40
- dsprite 5, 3, 16, 0, $00, $40
- dsprite 5, 3, 17, 0, $00, $40
- dsprite 5, 3, 18, 0, $00, $40
- dsprite 4, 7, 19, 0, $07, $00
+ dsprite 4, 7, 10, 0, $06, 0
+ dsprite 5, 3, 11, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 12, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 13, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 14, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 15, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 16, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 17, 0, $00, 0 | Y_FLIP
+ dsprite 5, 3, 18, 0, $00, 0 | Y_FLIP
+ dsprite 4, 7, 19, 0, $07, 0
db -1
; e2ed5
-BillsPC_UnusedFillBox: ; e2ed5
+Unreferenced_BillsPC_FillBox: ; e2ed5
.row
push bc
push hl
@@ -1702,7 +1698,7 @@ BillsPC_StatsScreen: ; e2f7e (38:6f7e)
call BillsPC_CopyMon
ld a, $3
ld [MonType], a
- predef StatsScreenInit
+ predef Predef_StatsScreenInit
call BillsPC_InitGFX
call MaxVolume
ret
@@ -1730,7 +1726,7 @@ StatsScreenDPad: ; e2f95 (38:6f95)
ld [CurPartySpecies], a
ld [CurSpecies], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
call GetBaseData
call BillsPC_CopyMon
.pressed_a_b_right_left
@@ -1823,7 +1819,7 @@ DepositPokemon: ; e307c (38:707c)
call GetNick
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- predef SentGetPkmnIntoFromBox
+ predef Predef_SendGetPkmnIntoFromBox
jr c, .asm_boxisfull
xor a
ld [wPokemonWithdrawDepositParameter], a
@@ -1878,7 +1874,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa)
call CloseSRAM
xor a
ld [wPokemonWithdrawDepositParameter], a
- predef SentGetPkmnIntoFromBox
+ predef Predef_SendGetPkmnIntoFromBox
jr c, .PartyFull
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
@@ -2334,8 +2330,7 @@ BillsPC_ClearTilemap: ; e35e2 (38:75e2)
_ChangeBox_menudataheader: ; 0xe35f1
db $40 ; flags
- db 05, 01 ; start coords
- db 12, 09 ; end coords
+ menu_coords 1, 5, 9, 12
dw .menudata2
db 1 ; default option
; 0xe35f9
@@ -2559,12 +2554,11 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
ret
; e3778 (38:7778)
- hlcoord 11, 7 ; XXX
+ hlcoord 11, 7 ; unused
.MenuDataHeader: ; 0xe377b
db $40 ; flags
- db 04, 11 ; start coords
- db 13, 19 ; end coords
+ menu_coords 11, 4, SCREEN_WIDTH - 1, 13
dw .MenuData2
db 1 ; default option
; 0xe3783
diff --git a/engine/billspctop.asm b/engine/billspctop.asm
index c36cbe45d..9bbb513a7 100755
--- a/engine/billspctop.asm
+++ b/engine/billspctop.asm
@@ -70,8 +70,7 @@ _BillsPC: ; e3fd
.MenuDataHeader: ; 0xe46f
db $40 ; flags
- db 00, 00 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData2
db 1 ; default option
@@ -143,7 +142,7 @@ BillsPC_DepositMenu: ; e4fe (3:64fe)
and a
ret
-Functione512: ; unused
+Unreferenced_Functione512:
ld a, [PartyCount]
and a
jr z, .no_pkmn
@@ -212,7 +211,7 @@ BillsPC_WithdrawMenu: ; e559 (3:6559)
and a
ret
-Functione56d: ; unused
+Unreferenced_Functione56d:
ld a, [PartyCount]
cp PARTY_LENGTH
jr nc, .asm_e576
@@ -268,7 +267,7 @@ CopyBoxmonToTempMon: ; e5bb
call CloseSRAM
ret
-Functione5d9: ; unreferenced
+Unreferenced_Functione5d9:
ld a, [wCurBox]
cp b
jr z, .same_box
diff --git a/engine/breeding.asm b/engine/breeding.asm
index 234e05448..e86cf5832 100755
--- a/engine/breeding.asm
+++ b/engine/breeding.asm
@@ -10,7 +10,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [TempMonDVs + 1], a
ld a, TEMPMON
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
jr c, .genderless
ld b, $1
jr nz, .breedmon2
@@ -26,7 +26,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [TempMonDVs + 1], a
ld a, $3
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
pop bc
jr c, .genderless
ld a, $1
@@ -232,7 +232,7 @@ HatchEggs: ; 16f70 (5:6f70)
push de
farcall SetEggMonCaughtData
- farcall TrainerRankings_EggsHatched
+ farcall StubbedTrainerRankings_EggsHatched
ld a, [CurPartyMon]
ld hl, PartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH
@@ -289,7 +289,7 @@ HatchEggs: ; 16f70 (5:6f70)
ld bc, MON_STAT_EXP - 1
add hl, bc
ld b, $0
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
ld hl, MON_MAXHP
add hl, bc
@@ -514,7 +514,7 @@ GLOBAL EggMoves
cp b
jr nz, .loop5
ld [wPutativeTMHMMove], a
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
ld a, c
and a
jr z, .done
@@ -559,7 +559,7 @@ LoadEggMove: ; 17169
ld [hl], b
ld hl, wEggMonMoves
ld de, wEggMonPP
- predef FillPP
+ predef Predef_FillPP
pop bc
pop de
ret
@@ -590,7 +590,7 @@ GetHeritableMoves: ; 17197
ld [TempMonDVs + 1], a
ld a, TEMPMON
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
jr c, .inherit_mon2_moves
jr nz, .inherit_mon2_moves
jr .inherit_mon1_moves
@@ -606,7 +606,7 @@ GetHeritableMoves: ; 17197
ld [TempMonDVs + 1], a
ld a, TEMPMON
ld [MonType], a
- predef GetGender
+ predef Predef_GetGender
jr c, .inherit_mon1_moves
jr nz, .inherit_mon1_moves
@@ -647,9 +647,9 @@ GetEggFrontpic: ; 17224 (5:7224)
ld [CurSpecies], a
call GetBaseData
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop de
- predef_jump GetMonFrontpic
+ predef_jump Predef_GetMonFrontpic
GetHatchlingFrontpic: ; 1723c (5:723c)
push de
@@ -657,9 +657,9 @@ GetHatchlingFrontpic: ; 1723c (5:723c)
ld [CurSpecies], a
call GetBaseData
ld hl, BattleMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop de
- predef_jump GetAnimatedFrontpicPredef
+ predef_jump Predef_GetAnimatedFrontpic
Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
push af
@@ -677,7 +677,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
ld a, c
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
pop af
call Hatch_LoadFrontpicPal
call SetPalettes
@@ -726,11 +726,11 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
ld c, 80
call DelayFrames
xor a
- ld [wcf64], a
+ ld [wFrameCounter], a
ld a, [hSCX]
ld b, a
.outerloop
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
inc [hl]
cp 8
@@ -779,7 +779,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
hlcoord 6, 3
ld d, $0
ld e, ANIM_MON_HATCH
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
pop af
ld [CurSpecies], a
ret
@@ -791,7 +791,7 @@ Hatch_LoadFrontpicPal: ; 17363 (5:7363)
jp GetSGBLayout
EggHatch_CrackShell: ; 1736d (5:736d)
- ld a, [wcf64]
+ ld a, [wFrameCounter]
dec a
and $7
cp $7
@@ -860,18 +860,22 @@ Hatch_InitShellFragments: ; 173b3 (5:73b3)
ret
; 173ef (5:73ef)
+shell_fragment: MACRO
+; y tile, y pxl, x tile, x pxl, frameset offset, ???
+ db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5 - SPRITE_ANIM_FRAMESET_EGG_HATCH_1, \6
+ENDM
+
.SpriteData: ; 173ef
-; Probably OAM.
- dsprite 10, 4, 9, 0, $00, $3c
- dsprite 11, 4, 9, 0, $01, $04
- dsprite 10, 4, 10, 0, $00, $30
- dsprite 11, 4, 10, 0, $01, $10
- dsprite 10, 4, 11, 0, $02, $24
- dsprite 11, 4, 11, 0, $03, $1c
- dsprite 10, 0, 9, 4, $00, $36
- dsprite 12, 0, 9, 4, $01, $0a
- dsprite 10, 0, 10, 4, $02, $2a
- dsprite 12, 0, 10, 4, $03, $16
+ shell_fragment 10, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $3c
+ shell_fragment 11, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $04
+ shell_fragment 10, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $30
+ shell_fragment 11, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $10
+ shell_fragment 10, 4, 11, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $24
+ shell_fragment 11, 4, 11, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $1c
+ shell_fragment 10, 0, 9, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $36
+ shell_fragment 12, 0, 9, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $0a
+ shell_fragment 10, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $2a
+ shell_fragment 12, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $16
db -1
; 17418
@@ -981,8 +985,7 @@ DayCareMonCompatibilityText: ; 1746c
db "@"
; 0x174b5
-DayCareMonPrintEmptyString: ; 174b5
-; unreferenced
+Unreferenced_DayCareMonPrintEmptyString: ; 174b5
ld hl, .string
ret
; 174b9
diff --git a/engine/buy_sell_toss.asm b/engine/buy_sell_toss.asm
index 37bee86b1..b46fc1c27 100755
--- a/engine/buy_sell_toss.asm
+++ b/engine/buy_sell_toss.asm
@@ -215,24 +215,21 @@ BuySell_DisplaySubtotal: ; 250d1
TossItem_MenuDataHeader: ; 0x250ed
db $40 ; flags
- db 09, 15 ; start coords
- db 11, 19 ; end coords
+ menu_coords 15, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw ret_25097
db 0 ; default option
; 0x250f5
BuyItem_MenuDataHeader: ; 0x250f5
db $40 ; flags
- db 15, 07 ; start coords
- db 17, 19 ; end coords
+ menu_coords 7, 15, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw DisplayPurchasePrice
db -1 ; default option
; 0x250fd
SellItem_MenuDataHeader: ; 0x250fd
db $40 ; flags
- db 15, 07 ; start coords
- db 17, 19 ; end coords
+ menu_coords 7, 15, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw DisplaySellingPrice
db 0 ; default option
; 0x25105
diff --git a/engine/card_flip.asm b/engine/card_flip.asm
index 78a734514..ae90b124a 100755
--- a/engine/card_flip.asm
+++ b/engine/card_flip.asm
@@ -1,7 +1,15 @@
CARDFLIP_LIGHT_OFF EQU $ef
CARDFLIP_LIGHT_ON EQU $f5
+
CARDFLIP_DECK_SIZE EQU 4 * 6
+; two labels below called from inside ./dummy_game.asm
+Unknown_e00ed: ; e00ed (38:40ed)
+; Graphics for an unused Game Corner
+; game were meant to be here.
+ret_e00ed: ; e00ed (38:40ed)
+ ret
+
_CardFlip: ; e00ee (38:40ee)
ld hl, Options
set 4, [hl]
@@ -25,11 +33,11 @@ _CardFlip: ; e00ee (38:40ee)
ld de, vTiles0 tile $00
call Decompress
ld hl, CardFlipOffButtonGFX
- ld de, vTiles1 tile $6f
+ ld de, vTiles0 tile CARDFLIP_LIGHT_OFF
ld bc, 1 tiles
call CopyBytes
ld hl, CardFlipOnButtonGFX
- ld de, vTiles1 tile $75
+ ld de, vTiles0 tile CARDFLIP_LIGHT_ON
ld bc, 1 tiles
call CopyBytes
@@ -593,23 +601,23 @@ CardFlip_CopyToBox: ; e04f7 (38:44f7)
; e0509 (38:4509)
CardFlip_CopyOAM: ; e0509
- ld de, Sprites
+ ld de, Sprite01
ld a, [hli]
.loop
push af
ld a, [hli]
add b
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add c
- ld [de], a
+ ld [de], a ; x
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; tile id
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; attributes
inc de
pop af
dec a
@@ -618,11 +626,11 @@ CardFlip_CopyOAM: ; e0509
; e0521
CardFlip_ShiftDigitsLeftTwoPixels: ; e0521 (38:4521)
- ld de, vTiles1 tile ("0" & $7f)
- ld hl, vTiles1 tile ("0" & $7f) + 2
+ ld de, vTiles0 tile "0"
+ ld hl, vTiles0 tile "0" + 2
ld bc, 10 tiles - 2
call CopyBytes
- ld hl, vTiles1 tile $7f + 1 tiles - 2
+ ld hl, vTiles0 tile "9" + 1 tiles - 2
xor a
ld [hli], a
ld [hl], a
@@ -1210,29 +1218,29 @@ PlaceOAMCardBorder: ; e0849
.SpriteData: ; e0853
db 18
- dsprite 0, 0, 0, 0, $04, $00
- dsprite 0, 0, 1, 0, $06, $00
- dsprite 0, 0, 2, 0, $06, $00
- dsprite 0, 0, 3, 0, $06, $00
- dsprite 0, 0, 4, 0, $04, $20
+ dsprite 0, 0, 0, 0, $04, 0
+ dsprite 0, 0, 1, 0, $06, 0
+ dsprite 0, 0, 2, 0, $06, 0
+ dsprite 0, 0, 3, 0, $06, 0
+ dsprite 0, 0, 4, 0, $04, 0 | X_FLIP
- dsprite 1, 0, 0, 0, $05, $00
- dsprite 1, 0, 4, 0, $05, $20
+ dsprite 1, 0, 0, 0, $05, 0
+ dsprite 1, 0, 4, 0, $05, 0 | X_FLIP
- dsprite 2, 0, 0, 0, $05, $00
- dsprite 2, 0, 4, 0, $05, $20
+ dsprite 2, 0, 0, 0, $05, 0
+ dsprite 2, 0, 4, 0, $05, 0 | X_FLIP
- dsprite 3, 0, 0, 0, $05, $00
- dsprite 3, 0, 4, 0, $05, $20
+ dsprite 3, 0, 0, 0, $05, 0
+ dsprite 3, 0, 4, 0, $05, 0 | X_FLIP
dsprite 4, 0, 0, 0, $05, $00
- dsprite 4, 0, 4, 0, $05, $20
+ dsprite 4, 0, 4, 0, $05, 0 | X_FLIP
- dsprite 5, 0, 0, 0, $04, $40
- dsprite 5, 0, 1, 0, $06, $40
- dsprite 5, 0, 2, 0, $06, $40
- dsprite 5, 0, 3, 0, $06, $40
- dsprite 5, 0, 4, 0, $04, $60
+ dsprite 5, 0, 0, 0, $04, 0 | Y_FLIP
+ dsprite 5, 0, 1, 0, $06, 0 | Y_FLIP
+ dsprite 5, 0, 2, 0, $06, 0 | Y_FLIP
+ dsprite 5, 0, 3, 0, $06, 0 | Y_FLIP
+ dsprite 5, 0, 4, 0, $04, 0 | X_FLIP | Y_FLIP
; e089c
ChooseCard_HandleJoypad: ; e089c
@@ -1471,145 +1479,145 @@ ENDM
.SingleTile: ; e0a41
db 6
- dsprite 0, 0, -1, 7, $00, $80
- dsprite 0, 0, 0, 0, $02, $80
- dsprite 0, 0, 1, 0, $03, $80
- dsprite 0, 5, -1, 7, $00, $c0
- dsprite 0, 5, 0, 0, $02, $c0
- dsprite 0, 5, 1, 0, $03, $80
+ dsprite 0, 0, -1, 7, $00, 0 | PRIORITY
+ dsprite 0, 0, 0, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 0, 5, -1, 7, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 0, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 1, 0, $03, 0 | PRIORITY
.PokeGroup: ; e0a5a
db 26
- dsprite 0, 0, -1, 7, $00, $80
- dsprite 0, 0, 0, 0, $02, $80
- dsprite 0, 0, 1, 0, $00, $a0
- dsprite 1, 0, -1, 7, $01, $80
- dsprite 1, 0, 1, 0, $01, $a0
- dsprite 2, 0, -1, 7, $01, $80
- dsprite 2, 0, 1, 0, $03, $80
- dsprite 3, 0, -1, 7, $01, $80
- dsprite 3, 0, 1, 0, $03, $80
- dsprite 4, 0, -1, 7, $01, $80
- dsprite 4, 0, 1, 0, $03, $80
- dsprite 5, 0, -1, 7, $01, $80
- dsprite 5, 0, 1, 0, $03, $80
- dsprite 6, 0, -1, 7, $01, $80
- dsprite 6, 0, 1, 0, $03, $80
- dsprite 7, 0, -1, 7, $01, $80
- dsprite 7, 0, 1, 0, $03, $80
- dsprite 8, 0, -1, 7, $01, $80
- dsprite 8, 0, 1, 0, $03, $80
- dsprite 9, 0, -1, 7, $01, $80
- dsprite 9, 0, 1, 0, $03, $80
- dsprite 10, 0, -1, 7, $01, $80
- dsprite 10, 0, 1, 0, $03, $80
- dsprite 10, 1, -1, 7, $00, $c0
- dsprite 10, 1, 0, 0, $02, $c0
- dsprite 10, 1, 1, 0, $03, $80
+ dsprite 0, 0, -1, 7, $00, 0 | PRIORITY
+ dsprite 0, 0, 0, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 1, 0, $00, 0 | X_FLIP | PRIORITY
+ dsprite 1, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 1, 0, 1, 0, $01, 0 | X_FLIP | PRIORITY
+ dsprite 2, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 2, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 3, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 3, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 4, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 4, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 5, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 5, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 6, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 6, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 7, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 7, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 8, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 8, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 9, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 9, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 10, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 10, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 10, 1, -1, 7, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 10, 1, 0, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 10, 1, 1, 0, $03, 0 | PRIORITY
.NumGroup: ; e0ac3
db 20
- dsprite 0, 0, -1, 7, $00, $80
- dsprite 0, 0, 0, 0, $02, $80
- dsprite 0, 0, 1, 0, $02, $80
- dsprite 0, 0, 2, 0, $03, $80
- dsprite 0, 0, 3, 0, $02, $80
- dsprite 0, 0, 4, 0, $03, $80
- dsprite 0, 0, 5, 0, $02, $80
- dsprite 0, 0, 6, 0, $03, $80
- dsprite 0, 0, 7, 0, $02, $80
- dsprite 0, 0, 8, 0, $03, $80
- dsprite 0, 5, -1, 7, $00, $c0
- dsprite 0, 5, 0, 0, $02, $c0
- dsprite 0, 5, 1, 0, $02, $c0
- dsprite 0, 5, 2, 0, $03, $80
- dsprite 0, 5, 3, 0, $02, $c0
- dsprite 0, 5, 4, 0, $03, $80
- dsprite 0, 5, 5, 0, $02, $c0
- dsprite 0, 5, 6, 0, $03, $80
- dsprite 0, 5, 7, 0, $02, $c0
- dsprite 0, 5, 8, 0, $03, $80
+ dsprite 0, 0, -1, 7, $00, 0 | PRIORITY
+ dsprite 0, 0, 0, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 1, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 2, 0, $03, 0 | PRIORITY
+ dsprite 0, 0, 3, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 4, 0, $03, 0 | PRIORITY
+ dsprite 0, 0, 5, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 6, 0, $03, 0 | PRIORITY
+ dsprite 0, 0, 7, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 8, 0, $03, 0 | PRIORITY
+ dsprite 0, 5, -1, 7, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 0, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 1, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 2, 0, $03, 0 | PRIORITY
+ dsprite 0, 5, 3, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 4, 0, $03, 0 | PRIORITY
+ dsprite 0, 5, 5, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 6, 0, $03, 0 | PRIORITY
+ dsprite 0, 5, 7, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 0, 5, 8, 0, $03, 0 | PRIORITY
.NumGroupPair: ; e0b14
db 30
- dsprite 0, 0, 0, 0, $00, $80
- dsprite 0, 0, 1, 0, $02, $80
- dsprite 0, 0, 2, 0, $02, $80
- dsprite 0, 0, 3, 0, $03, $80
- dsprite 0, 0, 4, 0, $02, $80
- dsprite 0, 0, 5, 0, $03, $80
- dsprite 0, 0, 6, 0, $02, $80
- dsprite 0, 0, 7, 0, $03, $80
- dsprite 0, 0, 8, 0, $02, $80
- dsprite 0, 0, 9, 0, $03, $80
- dsprite 1, 0, 0, 0, $01, $80
- dsprite 1, 0, 3, 0, $03, $80
- dsprite 1, 0, 5, 0, $03, $80
- dsprite 1, 0, 7, 0, $03, $80
- dsprite 1, 0, 9, 0, $03, $80
- dsprite 2, 0, 0, 0, $01, $80
- dsprite 2, 0, 3, 0, $03, $80
- dsprite 2, 0, 5, 0, $03, $80
- dsprite 2, 0, 7, 0, $03, $80
- dsprite 2, 0, 9, 0, $03, $80
- dsprite 2, 1, 0, 0, $00, $c0
- dsprite 2, 1, 1, 0, $02, $c0
- dsprite 2, 1, 2, 0, $02, $c0
- dsprite 2, 1, 3, 0, $03, $80
- dsprite 2, 1, 4, 0, $03, $80
- dsprite 2, 1, 5, 0, $03, $80
- dsprite 2, 1, 6, 0, $03, $80
- dsprite 2, 1, 7, 0, $03, $80
- dsprite 2, 1, 8, 0, $03, $80
- dsprite 2, 1, 9, 0, $03, $80
+ dsprite 0, 0, 0, 0, $00, 0 | PRIORITY
+ dsprite 0, 0, 1, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 2, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 0, 0, 4, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 5, 0, $03, 0 | PRIORITY
+ dsprite 0, 0, 6, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 7, 0, $03, 0 | PRIORITY
+ dsprite 0, 0, 8, 0, $02, 0 | PRIORITY
+ dsprite 0, 0, 9, 0, $03, 0 | PRIORITY
+ dsprite 1, 0, 0, 0, $01, 0 | PRIORITY
+ dsprite 1, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 1, 0, 5, 0, $03, 0 | PRIORITY
+ dsprite 1, 0, 7, 0, $03, 0 | PRIORITY
+ dsprite 1, 0, 9, 0, $03, 0 | PRIORITY
+ dsprite 2, 0, 0, 0, $01, 0 | PRIORITY
+ dsprite 2, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 2, 0, 5, 0, $03, 0 | PRIORITY
+ dsprite 2, 0, 7, 0, $03, 0 | PRIORITY
+ dsprite 2, 0, 9, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 0, 0, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 2, 1, 1, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 2, 1, 2, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 2, 1, 3, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 4, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 5, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 6, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 7, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 8, 0, $03, 0 | PRIORITY
+ dsprite 2, 1, 9, 0, $03, 0 | PRIORITY
.PokeGroupPair: ; e0b8d
db 38
- dsprite 0, 0, -1, 7, $00, $80
- dsprite 0, 0, 3, 0, $00, $a0
- dsprite 1, 0, -1, 7, $01, $80
- dsprite 1, 0, 3, 0, $01, $a0
- dsprite 2, 0, -1, 7, $01, $80
- dsprite 2, 0, 3, 0, $01, $a0
- dsprite 3, 0, -1, 7, $01, $80
- dsprite 3, 0, 1, 0, $03, $80
- dsprite 3, 0, 3, 0, $03, $80
- dsprite 4, 0, -1, 7, $01, $80
- dsprite 4, 0, 1, 0, $03, $80
- dsprite 4, 0, 3, 0, $03, $80
- dsprite 5, 0, -1, 7, $01, $80
- dsprite 5, 0, 1, 0, $03, $80
- dsprite 5, 0, 3, 0, $03, $80
- dsprite 6, 0, -1, 7, $01, $80
- dsprite 6, 0, 1, 0, $03, $80
- dsprite 6, 0, 3, 0, $03, $80
- dsprite 7, 0, -1, 7, $01, $80
- dsprite 7, 0, 1, 0, $03, $80
- dsprite 7, 0, 3, 0, $03, $80
- dsprite 8, 0, -1, 7, $01, $80
- dsprite 8, 0, 1, 0, $03, $80
- dsprite 8, 0, 3, 0, $03, $80
- dsprite 9, 0, -1, 7, $01, $80
- dsprite 9, 0, 1, 0, $03, $80
- dsprite 9, 0, 3, 0, $03, $80
- dsprite 10, 0, -1, 7, $01, $80
- dsprite 10, 0, 1, 0, $03, $80
- dsprite 10, 0, 3, 0, $03, $80
- dsprite 11, 0, -1, 7, $01, $80
- dsprite 11, 0, 1, 0, $03, $80
- dsprite 11, 0, 3, 0, $03, $80
- dsprite 11, 1, -1, 7, $00, $c0
- dsprite 11, 1, 0, 0, $02, $c0
- dsprite 11, 1, 1, 0, $03, $c0
- dsprite 11, 1, 2, 0, $02, $c0
- dsprite 11, 1, 3, 0, $03, $e0
+ dsprite 0, 0, -1, 7, $00, 0 | PRIORITY
+ dsprite 0, 0, 3, 0, $00, 0 | X_FLIP | PRIORITY
+ dsprite 1, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 1, 0, 3, 0, $01, 0 | X_FLIP | PRIORITY
+ dsprite 2, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 2, 0, 3, 0, $01, 0 | X_FLIP | PRIORITY
+ dsprite 3, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 3, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 3, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 4, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 4, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 4, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 5, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 5, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 5, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 6, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 6, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 6, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 7, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 7, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 7, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 8, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 8, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 8, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 9, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 9, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 9, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 10, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 10, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 10, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 11, 0, -1, 7, $01, 0 | PRIORITY
+ dsprite 11, 0, 1, 0, $03, 0 | PRIORITY
+ dsprite 11, 0, 3, 0, $03, 0 | PRIORITY
+ dsprite 11, 1, -1, 7, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 11, 1, 0, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 11, 1, 1, 0, $03, 0 | Y_FLIP | PRIORITY
+ dsprite 11, 1, 2, 0, $02, 0 | Y_FLIP | PRIORITY
+ dsprite 11, 1, 3, 0, $03, 0 | X_FLIP | Y_FLIP | PRIORITY
.Impossible: ; e0c26
db 4
- dsprite 0, 0, 0, 0, $00, $80
- dsprite 0, 0, 1, 0, $00, $a0
- dsprite 1, 0, 0, 0, $00, $c0
- dsprite 1, 0, 1, 0, $00, $e0
+ dsprite 0, 0, 0, 0, $00, 0 | PRIORITY
+ dsprite 0, 0, 1, 0, $00, 0 | X_FLIP | PRIORITY
+ dsprite 1, 0, 0, 0, $00, 0 | Y_FLIP | PRIORITY
+ dsprite 1, 0, 1, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY
; e0c37
CardFlip_InitAttrPals: ; e0c37 (38:4c37)
@@ -1661,7 +1669,7 @@ CardFlip_InitAttrPals: ; e0c37 (38:4c37)
; e0c93 (38:4c93)
.palettes ; e0c93
-INCLUDE "data/palettes/card_flip.pal"
+INCLUDE "gfx/card_flip/card_flip.pal"
; e0cdb
CardFlipLZ03: ; e0cdb
diff --git a/engine/caught_data.asm b/engine/caught_data.asm
index 1f8b8cac4..56ef8a839 100644
--- a/engine/caught_data.asm
+++ b/engine/caught_data.asm
@@ -1,4 +1,4 @@
-CheckPartyFullAfterContest: ; 4d9e5
+Special_CheckPartyFullAfterContest: ; 4d9e5
ld a, [wContestMon]
and a
jp z, .DidntCatchAnything
@@ -7,17 +7,17 @@ CheckPartyFullAfterContest: ; 4d9e5
call GetBaseData
ld hl, PartyCount
ld a, [hl]
- cp 6
+ cp PARTY_LENGTH
jp nc, .TryAddToBox
inc a
ld [hl], a
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [wContestMon]
ld [hli], a
ld [CurSpecies], a
- ld a, $ff
+ ld a, -1
ld [hl], a
ld hl, PartyMon1Species
ld a, [PartyCount]
@@ -75,13 +75,13 @@ CheckPartyFullAfterContest: ; 4d9e5
ld hl, PartyMon1CaughtLocation
call GetPartyLocation
ld a, [hl]
- and $80
- ld b, $13
+ and CAUGHT_GENDER_MASK
+ ld b, NATIONAL_PARK
or b
ld [hl], a
xor a
ld [wContestMon], a
- and a
+ and a ; BUGCONTEST_CAUGHT_MON
ld [ScriptVar], a
ret
@@ -135,19 +135,19 @@ CheckPartyFullAfterContest: ; 4d9e5
call GetSRAMBank
ld hl, sBoxMon1CaughtLocation
ld a, [hl]
- and $80
- ld b, $13
+ and CAUGHT_GENDER_MASK
+ ld b, NATIONAL_PARK
or b
ld [hl], a
call CloseSRAM
xor a
ld [wContestMon], a
- ld a, $1
+ ld a, BUGCONTEST_BOXED_MON
ld [ScriptVar], a
ret
.DidntCatchAnything: ; 4db35
- ld a, $2
+ ld a, BUGCONTEST_NO_CATCH
ld [ScriptVar], a
ret
@@ -227,7 +227,7 @@ SetGiftPartyMonCaughtData: ; 4dba3
SetGiftMonCaughtData: ; 4dbaf
xor a
ld [hli], a
- ld a, $7e
+ ld a, GIFT_LOCATION
rrc b
or b
ld [hl], a
@@ -239,7 +239,7 @@ SetEggMonCaughtData: ; 4dbb8 (13:5bb8)
call GetPartyLocation
ld a, [CurPartyLevel]
push af
- ld a, $1
+ ld a, CAUGHT_EGG_LEVEL
ld [CurPartyLevel], a
call SetBoxmonOrEggmonCaughtData
pop af
diff --git a/engine/cgb_layouts.asm b/engine/cgb_layouts.asm
index 74d476dec..70429a453 100644
--- a/engine/cgb_layouts.asm
+++ b/engine/cgb_layouts.asm
@@ -6,7 +6,7 @@ CheckCGB: ; 8d55
ret
; 8d59
-Predef_LoadSGBLayoutCGB: ; 8d59
+LoadSGBLayoutCGB: ; 8d59
ld a, b
cp SCGB_RAM
jr nz, .not_ram
@@ -258,30 +258,11 @@ _CGB_StatsScreenHPPals: ; 8edb
; 8f52
StatsScreenPagePals: ; 8f52
-; pink
- RGB 31, 31, 31
- RGB 31, 19, 31
- RGB 31, 15, 31
- RGB 00, 00, 00
-; green
- RGB 31, 31, 31
- RGB 21, 31, 14
- RGB 17, 31, 00
- RGB 00, 00, 00
-; blue
- RGB 31, 31, 31
- RGB 17, 31, 31
- RGB 17, 31, 31
- RGB 00, 00, 00
+INCLUDE "gfx/stats/pages.pal"
; 8f6a
StatsScreenPals: ; 8f6a
-; pink
- RGB 31, 19, 31
-; green
- RGB 21, 31, 14
-; blue
- RGB 17, 31, 31
+INCLUDE "gfx/stats/stats.pal"
; 8f70
_CGB_Pokedex: ; 8f70
@@ -319,16 +300,11 @@ _CGB_Pokedex: ; 8f70
; 8fba
.PokedexQuestionMarkPalette: ; 8fba
- RGB 11, 23, 00
- RGB 07, 17, 00
- RGB 06, 16, 03
- RGB 05, 12, 01
+INCLUDE "gfx/pokedex/question_mark.pal"
+; 8fc2
.PokedexCursorPalette: ; 8fc2
- RGB 00, 00, 00
- RGB 11, 23, 00
- RGB 07, 17, 00
- RGB 00, 00, 00
+INCLUDE "gfx/pokedex/cursor.pal"
; 8fca
_CGB_BillsPC: ; 8fca
@@ -385,10 +361,7 @@ _CGB_BillsPC: ; 8fca
; 9036
.BillsPCOrangePalette: ; 9036
- RGB 31, 15, 00
- RGB 23, 12, 00
- RGB 15, 07, 00
- RGB 00, 00, 00
+INCLUDE "gfx/pc/orange.pal"
; 903e
_CGB_PokedexUnownMode: ; 903e
@@ -891,11 +864,11 @@ _CGB_PackPals: ; 93d3
; 9439
.ChrisPackPals: ; 9439
-INCLUDE "data/palettes/pack.pal"
+INCLUDE "gfx/pack/pack.pal"
; 9469
.KrisPackPals: ; 9469
-INCLUDE "data/palettes/pack_f.pal"
+INCLUDE "gfx/pack/pack_f.pal"
; 9499
_CGB_Pokepic: ; 9499
@@ -970,10 +943,7 @@ _CGB_GamefreakLogo: ; 94fa
; 9521
.Palette: ; 9521
- RGB 31, 31, 31
- RGB 13, 11, 00
- RGB 23, 12, 28
- RGB 00, 00, 00
+INCLUDE "gfx/splash/logo.pal"
; 9529
_CGB_PlayerOrMonFrontpicPals: ; 9529
@@ -1059,13 +1029,5 @@ _CGB_MysteryGift: ; 9591
; 95e0
.Palettes: ; 95e0
- RGB 31, 31, 31
- RGB 16, 31, 14
- RGB 05, 14, 21
- RGB 05, 13, 10
-
- RGB 31, 31, 31
- RGB 11, 21, 25
- RGB 05, 14, 21
- RGB 00, 03, 19
+INCLUDE "gfx/mystery_gift/mystery_gift.pal"
; 95f0
diff --git a/engine/clock_reset.asm b/engine/clock_reset.asm
index c81271442..82b81b85c 100755
--- a/engine/clock_reset.asm
+++ b/engine/clock_reset.asm
@@ -220,6 +220,7 @@ RestartClock: ; 20021 (8:4021)
ret
; 20160 (8:4160)
+; unused
.unreferenced ; 20160
ld a, [Buffer3]
ld b, a
diff --git a/engine/color.asm b/engine/color.asm
index b074d2080..7376cdf1a 100644
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -43,8 +43,7 @@ CheckShininess:
and a
ret
-; unreferenced
-CheckContestMon:
+UnusedPredef_CheckContestMon:
; Check a mon's DVs at hl in the bug catching contest.
; Return carry if its DVs are good enough to place in the contest.
@@ -78,8 +77,7 @@ CheckContestMon:
and a
ret
-Function8aa4:
-; XXX
+Unreferenced_Function8aa4:
push de
push bc
ld hl, PalPacket_9ce6
@@ -136,8 +134,7 @@ SGB_ApplyPartyMenuHPPals: ; 8ade
ld [hl], e
ret
-Function8b07:
-; Unreferenced
+Unreferenced_Function8b07:
call CheckCGB
ret z
; CGB only
@@ -170,8 +167,7 @@ Function8b07:
RGB 08, 16, 28
RGB 00, 00, 00
-Function8b3f:
-; Unreferenced
+Unreferenced_Function8b3f:
call CheckCGB
ret nz
ld a, [hSGB]
@@ -180,8 +176,7 @@ Function8b3f:
ld hl, BlkPacket_9a86
jp PushSGBPals_
-Function8b4d:
-; XXX
+Unreferenced_Function8b4d:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -196,8 +191,7 @@ Function8b4d:
call GetPredefPal
jp LoadHLPaletteIntoDE
-Function8b67:
-; XXX
+Unreferenced_Function8b67:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -212,8 +206,7 @@ Function8b67:
call GetPredefPal
jp LoadHLPaletteIntoDE
-Function8b81:
-; XXX
+Unreferenced_Function8b81:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -281,8 +274,7 @@ got_palette_pointer_8bd7
call LoadPalette_White_Col1_Col2_Black
ret
-Function8bec:
-; XXX
+Unreferenced_Function8bec:
ld a, [hCGB]
and a
jr nz, .cgb
@@ -451,12 +443,11 @@ LoadMailPalettes:
ret
.MailPals:
-INCLUDE "data/palettes/mail.pal"
+INCLUDE "gfx/mail/mail.pal"
INCLUDE "engine/cgb_layouts.asm"
-Function95f0:
-; XXX
+Unreferenced_Function95f0:
ld hl, .Palette
ld de, wBGPals1
ld bc, 1 palettes
@@ -746,7 +737,8 @@ GetMonPalettePointer_:
call GetMonPalettePointer
ret
-Function9779: mobile
+Unreferenced_Function9779:
+ ret
call CheckCGB
ret z
ld hl, BattleObjectPals
@@ -766,10 +758,9 @@ Function9779: mobile
ret
BattleObjectPals:
-INCLUDE "data/palettes/battle_objects.pal"
+INCLUDE "gfx/battle_anims/battle_anims.pal"
-Function97cc:
-; XXX
+Unreferenced_Function97cc:
call CheckCGB
ret z
ld a, $90
@@ -864,7 +855,7 @@ PushSGBPals:
jr nz, .loop
ret
-InitSGBBorder:
+Predef_InitSGBBorder:
call CheckCGB
ret nz
; SGB/DMG only
@@ -979,8 +970,7 @@ _InitSGBBorderPals:
dw PalPacket_9dd6
dw PalPacket_9de6
-Function9911:
-; XXX
+Unreferenced_Function9911:
di
xor a
ld [rJOYP], a
@@ -1197,26 +1187,27 @@ SGBDelayCycles:
jr nz, .wait
ret
-INCLUDE "data/palettes/blk_packets.asm"
+INCLUDE "gfx/sgb/blk_packets.asm"
-INCLUDE "data/palettes/pal_packets.asm"
+INCLUDE "gfx/sgb/pal_packets.asm"
PredefPals:
-INCLUDE "data/palettes/predef.pal"
+INCLUDE "gfx/sgb/predef.pal"
-INCLUDE "data/sgb_border_map.asm"
+SGBBorderMap:
+INCBIN "gfx/sgb/sgb_border.tilemap"
SGBBorderPalettes:
-INCLUDE "data/palettes/sgb_border.pal"
+INCLUDE "gfx/sgb/sgb_border.pal"
SGBBorder:
INCBIN "gfx/sgb/sgb_border.2bpp"
HPBarPals:
-INCLUDE "data/palettes/hp_bar.pal"
+INCLUDE "gfx/battle/hp_bar.pal"
ExpBarPalette:
-INCLUDE "data/palettes/exp_bar.pal"
+INCLUDE "gfx/battle/exp_bar.pal"
INCLUDE "data/pokemon/palettes.asm"
@@ -1239,7 +1230,7 @@ LoadMapPals:
ld l, a
; Futher refine by time of day
ld a, [TimeOfDayPal]
- and 3
+ maskbits NUM_DAYTIMES +- 1
add a
add a
add a
@@ -1285,7 +1276,7 @@ LoadMapPals:
.got_pals
ld a, [TimeOfDayPal]
- and 3
+ maskbits NUM_DAYTIMES +- 1
ld bc, 8 palettes
ld hl, MapObjectPals
call AddNTimes
@@ -1309,7 +1300,7 @@ LoadMapPals:
ld de, RoofPals
add hl, de
ld a, [TimeOfDayPal]
- and 3
+ maskbits NUM_DAYTIMES +- 1
cp NITE_F
jr c, .morn_day
rept 4
@@ -1337,34 +1328,34 @@ Palette_b311: ; b311 not mobile
RGB 00, 00, 00
TilesetBGPalette:
-INCLUDE "data/palettes/overworld/tileset_bg.pal"
+INCLUDE "gfx/tilesets/bg_tiles.pal"
MapObjectPals::
-INCLUDE "data/palettes/overworld/map_objects.pal"
+INCLUDE "gfx/overworld/npc_sprites.pal"
RoofPals:
-INCLUDE "data/palettes/overworld/roofs.pal"
+INCLUDE "gfx/tilesets/roofs.pal"
DiplomaPalettes:
-INCLUDE "data/palettes/diploma.pal"
+INCLUDE "gfx/diploma/diploma.pal"
PartyMenuOBPals:
-INCLUDE "data/palettes/party_menu.pal"
+INCLUDE "gfx/icons/party_menu.pal"
Palettes_b6f1:
-INCLUDE "data/palettes/unknown/b6f1.pal"
+INCLUDE "gfx/unknown/b6f1.pal"
Palettes_b719:
-INCLUDE "data/palettes/unknown/b719.pal"
+INCLUDE "gfx/unknown/b719.pal"
MalePokegearPals:
-INCLUDE "data/palettes/pokegear.pal"
+INCLUDE "gfx/pokegear/pokegear.pal"
FemalePokegearPals:
-INCLUDE "data/palettes/pokegear_f.pal"
+INCLUDE "gfx/pokegear/pokegear_f.pal"
Palettes_b789:
-INCLUDE "data/palettes/unknown/b789.pal"
+INCLUDE "gfx/unknown/b789.pal"
SlotMachinePals:
-INCLUDE "data/palettes/slot_machine.pal"
+INCLUDE "gfx/slots/slots.pal"
diff --git a/engine/credits.asm b/engine/credits.asm
index 8a5cd2c75..ac5064a41 100644
--- a/engine/credits.asm
+++ b/engine/credits.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "Credits", ROMX
@@ -34,17 +34,17 @@ Credits:: ; 109847
ld de, CreditsBorderGFX
ld hl, vTiles2 tile $20
- lb bc, BANK(CreditsBorderGFX), $09
+ lb bc, BANK(CreditsBorderGFX), 9
call Request2bpp
ld de, CopyrightGFX
ld hl, vTiles2 tile $60
- lb bc, BANK(CopyrightGFX), $1d
+ lb bc, BANK(CopyrightGFX), 29
call Request2bpp
ld de, TheEndGFX
ld hl, vTiles2 tile $40
- lb bc, BANK(TheEndGFX), $10
+ lb bc, BANK(TheEndGFX), 16
call Request2bpp
ld a, $ff
@@ -504,7 +504,7 @@ GetCreditsPalette: ; 109b2c
.GetPalAddress:
; Each set of palette data is 24 bytes long.
ld a, [wCreditsBorderMon] ; scene
- and 3
+ and %11
add a
add a ; * 8
add a
@@ -540,7 +540,7 @@ GetCreditsPalette: ; 109b2c
ret
CreditsPalettes:
-INCLUDE "data/palettes/credits.pal"
+INCLUDE "gfx/credits/credits.pal"
; 109bca
Credits_LoadBorderGFX: ; 109bca (42:5bca)
@@ -549,13 +549,13 @@ Credits_LoadBorderGFX: ; 109bca (42:5bca)
cp $ff
jr z, .init
- and 3
+ and %11
ld e, a
inc a
- and 3
+ and %11
ld [hl], a
ld a, [wCreditsBorderMon]
- and 3
+ and %11
add a
add a
add e
diff --git a/engine/crystal_colors.asm b/engine/crystal_colors.asm
index 20cd4f4a2..31344791e 100755
--- a/engine/crystal_colors.asm
+++ b/engine/crystal_colors.asm
@@ -113,7 +113,7 @@ MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
; 493e1 (12:53e1)
Palette_493e1: ; 493e1
-INCLUDE "data/palettes/mg_mobile.pal"
+INCLUDE "gfx/mystery_gift/mg_mobile.pal"
; 49409
LoadOW_BGPal7:: ; 49409
@@ -126,11 +126,11 @@ LoadOW_BGPal7:: ; 49409
; 49418
Palette_TextBG7: ; 49418
-INCLUDE "data/palettes/overworld/bg_text.pal"
+INCLUDE "gfx/font/bg_text.pal"
; 49420
Function49420:: ; 49420 (12:5420)
- ld hl, MansionPalette4
+ ld hl, MansionPalette1 + 8 palettes
ld de, wBGPals1 palette PAL_BG_ROOF
ld bc, 1 palettes
ld a, BANK(wBGPals1)
@@ -204,7 +204,7 @@ Function49496: ; 49496
ret
; 494ac
-INCLUDE "tilesets/special_palettes.asm"
+INCLUDE "engine/tileset_palettes.asm"
MG_Mobile_Layout02: ; 49706
ld hl, .Palette_49732
@@ -248,7 +248,7 @@ Function49742: ; 49742
; 49757
.Palette_49757: ; 49757
-INCLUDE "data/palettes/unknown/49757.pal"
+INCLUDE "gfx/unknown/49757.pal"
; 49797
_InitMG_Mobile_LinkTradePalMap: ; 49797
@@ -314,7 +314,7 @@ LoadTradeRoomBGPals: ; 49811
; 49826
TradeRoomPalette: ; 49826
-INCLUDE "data/palettes/trade_room.pal"
+INCLUDE "gfx/trade/border.pal"
; 49856
InitMG_Mobile_LinkTradePalMap: ; 49856
@@ -322,5 +322,5 @@ InitMG_Mobile_LinkTradePalMap: ; 49856
ret
; 4985a
-Unknown_4985a: ; unreferenced
-INCLUDE "data/palettes/unknown/4985a.asm"
+; unused
+INCLUDE "gfx/unknown/4985a.asm"
diff --git a/engine/crystal_intro.asm b/engine/crystal_intro.asm
index 2c4a31af5..ea6828f14 100755
--- a/engine/crystal_intro.asm
+++ b/engine/crystal_intro.asm
@@ -52,7 +52,7 @@ Copyright_GFPresents: ; e4579
.GetGFLogoGFX: ; e45e8
ld de, GameFreakLogo
ld hl, vTiles2
- lb bc, BANK(GameFreakLogo), $1c
+ lb bc, BANK(GameFreakLogo), 28
call Get1bpp
ld a, [rSVBK]
@@ -94,7 +94,7 @@ Copyright_GFPresents: ; e4579
xor a
ld [wJumptableIndex], a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld [hSCX], a
ld [hSCY], a
ld a, $1
@@ -146,7 +146,7 @@ PlaceGameFreakPresents_0: ; e468c
; e468d
PlaceGameFreakPresents_1: ; e468d
- ld hl, wcf65
+ ld hl, wIntroSceneTimer
ld a, [hl]
cp $20
jr nc, .PlaceGameFreak
@@ -173,7 +173,7 @@ PlaceGameFreakPresents_1: ; e468d
; e46ba
PlaceGameFreakPresents_2: ; e46ba
- ld hl, wcf65
+ ld hl, wIntroSceneTimer
ld a, [hl]
cp $40
jr nc, .place_presents
@@ -197,7 +197,7 @@ PlaceGameFreakPresents_2: ; e46ba
; e46dd
PlaceGameFreakPresents_3: ; e46dd
- ld hl, wcf65
+ ld hl, wIntroSceneTimer
ld a, [hl]
cp $80
jr nc, .finish
@@ -247,10 +247,10 @@ GameFreakLogoScene2: ; e470d (39:470d)
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld a, [hl]
- and $3f
- cp $20
+ and %111111
+ cp %100000
jr nc, .asm_e4723
- add $20
+ add %100000
.asm_e4723
ld e, a
farcall BattleAnim_Sine_e
@@ -341,7 +341,7 @@ GameFreakLogoScene5: ; e47ab (39:47ab)
; e47ac (39:47ac)
GameFreakLogoPalettes: ; e47ac
-INCLUDE "data/palettes/crystal_intro/gamefreak_logo.pal"
+INCLUDE "gfx/intro/gamefreak_logo.pal"
; e47cc
GameFreakLogo: ; e47cc
@@ -503,7 +503,7 @@ IntroScene1: ; e495b (39:495b)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -523,7 +523,7 @@ IntroScene2: ; e49d6 (39:49d6)
call PlaySFX
pop af
.DontPlaySound:
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
xor a
call CrystalIntro_UnownFade
ret
@@ -642,7 +642,7 @@ IntroScene5: ; e4a7a (39:4a7a)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -669,7 +669,7 @@ IntroScene6: ; e4af7 (39:4af7)
call PlaySFX
pop af
.NoUnown:
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
xor a
call CrystalIntro_UnownFade
ret
@@ -682,7 +682,7 @@ IntroScene6: ; e4af7 (39:4af7)
call PlaySFX
pop af
.StopUnown:
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld a, $1
call CrystalIntro_UnownFade
ret
@@ -758,7 +758,7 @@ IntroScene7: ; e4b3f (39:4b3f)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -907,7 +907,7 @@ IntroScene11: ; e4c86 (39:4c86)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -925,7 +925,7 @@ IntroScene12: ; e4cfa (39:4cfa)
ld c, a
and $1f
sla a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld a, c
and $e0
srl a
@@ -939,7 +939,7 @@ IntroScene12: ; e4cfa (39:4cfa)
and $f
sla a
sla a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld a, c
and $70
or $40
@@ -1041,7 +1041,7 @@ IntroScene13: ; e4d6d (39:4d6d)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -1068,7 +1068,7 @@ IntroScene14: ; e4dfa (39:4dfa)
.asm_e4e1a
ld a, $1
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld a, [wGlobalAnimXOffset]
cp $88
jr c, .asm_e4e2c
@@ -1150,7 +1150,7 @@ IntroScene15: ; e4e40 (39:4e40)
call _InitSpriteAnimStruct
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -1217,7 +1217,7 @@ IntroScene17: ; e4ef5 (39:4ef5)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -1299,7 +1299,7 @@ IntroScene19: ; e4f7e (39:4f7e)
call _InitSpriteAnimStruct
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -1331,7 +1331,7 @@ IntroScene20: ; e5019 (39:5019)
and $1c
srl a
srl a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
xor a
call Intro_Scene20_AppearUnown
ret
@@ -1341,7 +1341,7 @@ IntroScene20: ; e5019 (39:5019)
and $1c
srl a
srl a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld a, 1
call Intro_Scene20_AppearUnown
ret
@@ -1358,7 +1358,7 @@ IntroScene21: ; e505d (39:505d)
xor a
ld [hBGMapMode], a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
@@ -1461,13 +1461,13 @@ IntroScene26: ; e50bb (39:50bb)
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
call NextIntroScene
ret
IntroScene27: ; e512d (39:512d)
; Spell out C R Y S T A L with Unown.
- ld hl, wcf65
+ ld hl, wIntroSceneTimer
inc [hl]
ld hl, wIntroSceneFrameCounter
ld a, [hl]
@@ -1477,7 +1477,7 @@ IntroScene27: ; e512d (39:512d)
ld c, a
and $f
- ld [wcf65], a
+ ld [wIntroSceneTimer], a
ld a, c
and $70
swap a
@@ -1550,7 +1550,7 @@ Intro_Scene24_ApplyPaletteFade: ; e5172 (39:5172)
; e519c (39:519c)
.FadePals: ; e519c
-INCLUDE "data/palettes/crystal_intro/fade.pal"
+INCLUDE "gfx/intro/fade.pal"
; e51dc
CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
@@ -1603,13 +1603,13 @@ CrystalIntro_UnownFade: ; e5223 (39:5223)
add hl, de
inc hl
inc hl
- ld a, [wcf65]
- and $3f
- cp $1f
+ ld a, [wIntroSceneTimer]
+ and %111111
+ cp %011111
jr z, .okay
jr c, .okay
ld c, a
- ld a, $3f
+ ld a, %111111
sub c
.okay
@@ -1714,7 +1714,7 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348)
ld hl, .pal2
.got_pointer
- ld a, [wcf65]
+ ld a, [wIntroSceneTimer]
and $7
add a
add a
@@ -1784,7 +1784,7 @@ Intro_FadeUnownWordPals: ; e539d (39:539d)
rept 4
inc hl
endr
- ld a, [wcf65]
+ ld a, [wIntroSceneTimer]
add a
ld c, a
ld b, $0
@@ -2088,7 +2088,7 @@ INCBIN "gfx/intro/003.tilemap.lz"
; e5edd
Palette_e5edd: ; e5edd
-INCLUDE "data/palettes/crystal_intro/intro_1.pal"
+INCLUDE "gfx/intro/intro_1.pal"
; e5f5d
IntroUnownsGFX: ; e5f5d
@@ -2124,7 +2124,7 @@ INCBIN "gfx/intro/007.tilemap.lz"
; e65ad
Palette_365ad: ; e65ad
-INCLUDE "data/palettes/crystal_intro/intro_2.pal"
+INCLUDE "gfx/intro/intro_2.pal"
; e662d
IntroCrystalUnownsGFX: ; e662d
@@ -2140,7 +2140,7 @@ INCBIN "gfx/intro/015.tilemap.lz"
; e679d
Palette_e679d: ; e679d
-INCLUDE "data/palettes/crystal_intro/intro_3.pal"
+INCLUDE "gfx/intro/intro_3.pal"
; e681d
IntroSuicuneCloseGFX: ; e681d
@@ -2156,7 +2156,7 @@ INCBIN "gfx/intro/011.tilemap.lz"
; e6d6d
Palette_e6d6d: ; e6d6d
-INCLUDE "data/palettes/crystal_intro/intro_4.pal"
+INCLUDE "gfx/intro/intro_4.pal"
; e6ded
IntroSuicuneJumpGFX: ; e6ded
@@ -2184,7 +2184,7 @@ INCBIN "gfx/intro/013.tilemap.lz"
; e77dd
Palette_e77dd: ; e77dd
-INCLUDE "data/palettes/crystal_intro/intro_5.pal"
+INCLUDE "gfx/intro/intro_5.pal"
IntroUnownBackGFX: ; e785d
INCBIN "gfx/intro/unown_back.2bpp.lz"
diff --git a/engine/debug.asm b/engine/debug.asm
index 8cc4809e8..a23e9d674 100755
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -193,10 +193,10 @@ Function819a7: ; 819a7
; 819f4
Palette_819f4: ; 819f4
-INCLUDE "data/palettes/debug/bg.pal"
+INCLUDE "gfx/debug/bg.pal"
Palette_81a34: ; 81a34
-INCLUDE "data/palettes/debug/ob.pal"
+INCLUDE "gfx/debug/ob.pal"
; 81a74
Function81a74: ; 81a74
@@ -315,12 +315,12 @@ Function81adb: ; 81adb
hlcoord 12, 3
call _PrepMonFrontpic
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 2, 4
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, [wd003]
and a
jr z, .asm_81b66
@@ -346,13 +346,13 @@ Function81adb: ; 81adb
hlcoord 4, 1
call PlaceString
ld de, vTiles2
- callfar GetTrainerPic
+ callfar Predef_GetTrainerPic
xor a
ld [TempEnemyMonSpecies], a
ld [hGraphicStartTile], a
hlcoord 2, 3
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
.asm_81ba9
ld a, $1
@@ -739,7 +739,7 @@ Function81df4: ; 81df4
ld a, [wd004]
inc a
ld [wd265], a
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [wPutativeTMHMMove], a
call GetMoveName
@@ -748,7 +748,7 @@ Function81df4: ; 81df4
ld a, [wd004]
call Function81e55
ld [CurItem], a
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
ld a, c
and a
ld de, String_81e46
@@ -1016,17 +1016,17 @@ Function81f5e: ; 81f5e
.asm_81fb7
ld a, b
- ld [hli], a
+ ld [hli], a ; y
ld a, [de]
add a
add a
- add $18
- ld [hli], a
+ add 3 * TILE_WIDTH
+ ld [hli], a ; x
xor a
- ld [hli], a
+ ld [hli], a ; tile id
ld a, c
- ld [hli], a
- ld a, $10
+ ld [hli], a ; attributes
+ ld a, 2 * TILE_WIDTH
add b
ld b, a
inc c
@@ -1061,9 +1061,9 @@ TilesetColorTest:
call WaitBGMap2
xor a
ld [hBGMapMode], a
- ld de, DebugColorTestGFX + $10
+ ld de, DebugColorTestGFX + 1 tiles
ld hl, vTiles2 tile $6a
- lb bc, BANK(DebugColorTestGFX), $16
+ lb bc, BANK(DebugColorTestGFX), 22
call Request2bpp
ld de, DebugColorTestGFX
ld hl, vTiles1
diff --git a/engine/decorations.asm b/engine/decorations.asm
index c1b703fb6..0598d8c34 100755
--- a/engine/decorations.asm
+++ b/engine/decorations.asm
@@ -38,8 +38,7 @@ _KrisDecorationMenu: ; 0x2675c
.MenuDataHeader: ; 0x2679a
db $40 ; flags
- db 00, 05 ; start coords
- db 17, 19 ; end coords
+ menu_coords 5, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData2
db 1 ; default option
; 0x267a2
@@ -424,8 +423,7 @@ PopulateDecoCategoryMenu: ; 2695b
.NonscrollingMenuDataHeader: ; 0x269b5
db $40 ; flags
- db 00, 00 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .NonscrollingMenuData2
db 1 ; default option
; 0x269bd
@@ -440,8 +438,7 @@ PopulateDecoCategoryMenu: ; 2695b
.ScrollingMenuDataHeader: ; 0x269c5
db $40 ; flags
- db 01, 01 ; start coords
- db 16, 18 ; end coords
+ menu_coords 1, 1, SCREEN_WIDTH - 2, SCREEN_HEIGHT - 2
dw .ScrollingMenuData2
db 1 ; default option
; 0x269cd
@@ -952,8 +949,7 @@ QueryWhichSide: ; 26e9a
MenuDataHeader_0x26eab: ; 0x26eab
db $40 ; flags
- db 00, 00 ; start coords
- db 07, 13 ; end coords
+ menu_coords 0, 0, 13, 7
dw MenuData2_0x26eb3
db 1 ; default option
; 0x26eb3
@@ -1061,12 +1057,13 @@ INCLUDE "data/decorations/decorations.asm"
DescribeDecoration:: ; 26f59
ld a, b
- ld hl, JumpTable_DecorationDesc
+ ld hl, .JumpTable
rst JumpTable
ret
; 26f5f
-JumpTable_DecorationDesc: ; 26f5f
+.JumpTable: ; 26f5f
+; entries correspond to DECODESC_* constants
dw DecorationDesc_Poster
dw DecorationDesc_LeftOrnament
dw DecorationDesc_RightOrnament
@@ -1197,7 +1194,7 @@ DecorationDesc_GiantOrnament: ; 26fdd
db "@"
; 0x26feb
-ToggleMaptileDecorations: ; 26feb
+Special_ToggleMaptileDecorations: ; 26feb
lb de, 0, 4
ld a, [Bed]
call SetDecorationTile
@@ -1251,7 +1248,7 @@ SetDecorationTile: ; 27037
ret
; 27043
-ToggleDecorationsVisibility: ; 27043
+Special_ToggleDecorationsVisibility: ; 27043
ld de, EVENT_KRISS_HOUSE_2F_CONSOLE
ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS
ld a, [Console]
diff --git a/engine/delete_save_change_clock.asm b/engine/delete_save_change_clock.asm
index e77874e1c..6e9a37b71 100755
--- a/engine/delete_save_change_clock.asm
+++ b/engine/delete_save_change_clock.asm
@@ -48,8 +48,7 @@ _ResetClock: ; 4d3b1
.NoYes_MenuDataHeader: ; 0x4d40d
db $00 ; flags
- db 07, 14 ; start coords
- db 11, 19 ; end coords
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .NoYes_MenuData2
db 1 ; default option
@@ -286,8 +285,7 @@ _DeleteSaveData: ; 4d54c
.NoYesMenuDataHeader: ; 0x4d585
db $00 ; flags
- db 07, 14 ; start coords
- db 11, 19 ; end coords
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
diff --git a/engine/dma_transfer.asm b/engine/dma_transfer.asm
index 2ab45b00d..60b515acf 100755
--- a/engine/dma_transfer.asm
+++ b/engine/dma_transfer.asm
@@ -112,7 +112,7 @@ Mobile_ReloadMapPart: ; 104099
ret
; 1040d4
-; XXX
+; unused
ld hl, .unreferenced_1040da
jp CallInSafeGFXMode
@@ -136,7 +136,7 @@ Mobile_ReloadMapPart: ; 104099
ret
; 1040fb
-; XXX
+; unused
ld hl, .unreferenced_104101
jp CallInSafeGFXMode
diff --git a/engine/events.asm b/engine/events.asm
index 7356a8910..f95e9ab12 100644
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -1,4 +1,5 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
+
SECTION "Events", ROMX
@@ -994,6 +995,7 @@ CountStep: ; 96b79
ret
; 96bd3
+; unused
.unreferenced ; 96bd3
ld a, 7
scf
@@ -1060,7 +1062,7 @@ Invalid_0x96c2d: ; 96c2d
end
; 96c2e
-; unreferenced
+; unused
end
; 96c2f
@@ -1105,4 +1107,5 @@ ChangeDirectionScript: ; 9
; 96c56
INCLUDE "engine/scripting.asm"
+
INCLUDE "engine/events_2.asm"
diff --git a/mobile/battle_tower_5c.asm b/engine/events/battle_tower/battle_tower.asm
index f89e83b5a..93b283d27 100755
--- a/mobile/battle_tower_5c.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -1,11 +1,11 @@
-BattleTowerRoomMenu: ; 1700b0
+Special_BattleTowerRoomMenu: ; 1700b0
; special
call InitBattleTowerChallengeRAM
farcall _BattleTowerRoomMenu
ret
; 1700ba
-Function1700ba: ; 1700ba
+Special_Function1700ba: ; 1700ba
call InitBattleTowerChallengeRAM
farcall Function11811a
ret
@@ -53,7 +53,7 @@ Function1700c4: ; 1700c4
ret
; 170114
-Function170114: ; 170114
+Special_Function170114: ; 170114
call InitBattleTowerChallengeRAM
call .Function170121
farcall Function11805f
@@ -182,14 +182,14 @@ Function170139: ; 170139
ret
; 170215
-BattleTowerBattle: ; 170215
+Special_BattleTowerBattle: ; 170215
xor a
ld [wBattleTowerBattleEnded], a
call _BattleTowerBattle
ret
; 17021d
-EmptySpecial_17021d: ; 17021d
+DummySpecial_17021d: ; 17021d
ret
; 17021e
@@ -243,12 +243,12 @@ RunBattleTowerTrainer: ; 17024d
xor a
ld [wLinkMode], a
- farcall TrainerRankings_Healings
+ farcall Special_StubbedTrainerRankings_Healings
farcall HealParty
call ReadBTTrainerParty
call Clears5_a89a
- predef StartBattle
+ predef Predef_StartBattle
farcall LoadPokemonData
farcall HealParty
@@ -484,7 +484,7 @@ endr
ld hl, MON_STAT_EXP - 1
add hl, bc
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop de
pop hl
dec de
@@ -570,42 +570,7 @@ Function17042c: ; 17042c
ret
; 170470
-Unknown_170470:
- db $12
- db $24
- db $45
- db $45
- db $42
- db $42
- db $45
- db $42
- db $27
- db $27
- db $45
- db $27
- db $42
- db $24
-
-Unknown_17047e:
-; see data/battle_tower_2.asm
- db $03, 4
- db $05, 8
- db $03, 5
- db $0e, 6
- db $03, 2
- db $00, 0
- db $39, 7
- db $07, 4
- db $00, 5
- db $04, 7
- db $01, 5
- db $00, 0
- db $0f, 5
- db $14, 7
- db $05, 5
- db $11, 12
- db $0c, 6
- db $06, 4
+INCLUDE "data/battle_tower/unknown_levels.asm"
CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2
@@ -634,8 +599,7 @@ SkipBattleTowerTrainer: ; 1704c9
ret
; 1704ca
-Function1704ca: ; 1704ca
-; unreferenced mobile function
+Unreferenced_Function1704ca: ; 1704ca
ld a, [$be46]
cp $7
jr c, .asm_1704d3
@@ -655,8 +619,7 @@ Function1704ca: ; 1704ca
ret
; 1704e1
-Function1704e1: ; 1704e1
-; unreferenced special
+UnusedSpecial_Function1704e1: ; 1704e1
call SpeechTextBox
call FadeToMenu
call InitBattleTowerChallengeRAM
@@ -785,39 +748,39 @@ Function1704e1: ; 1704e1
.DrawBorder: ; 1705b7
hlcoord 0, 4
- ld a, $79
+ ld a, "┌"
ld [hli], a
ld c, SCREEN_WIDTH - 2
.top_border_loop
- ld a, $7a
+ ld a, "─"
ld [hli], a
dec c
jr nz, .top_border_loop
- ld a, $7b
+ ld a, "┐"
ld [hli], a
ld de, SCREEN_WIDTH
ld c, 12
.left_border_loop
- ld a, $7c
+ ld a, "│"
ld [hl], a
add hl, de
dec c
jr nz, .left_border_loop
- ld a, $7d
+ ld a, "└"
ld [hli], a
ld c, SCREEN_WIDTH - 2
.bottom_border_loop
- ld a, $7a
+ ld a, "─"
ld [hli], a
dec c
jr nz, .bottom_border_loop
- ld a, $7e
+ ld a, "┘"
ld [hl], a
ld de, -SCREEN_WIDTH
add hl, de
ld c, 12
.right_border_loop
- ld a, $7c
+ ld a, "│"
ld [hl], a
add hl, de
dec c
@@ -937,7 +900,7 @@ Function1704e1: ; 1704e1
db "れきだいりーダーいちらん@"
; 170687
-BattleTowerAction: ; 170687
+Special_BattleTowerAction: ; 170687
ld a, [ScriptVar]
ld e, a
ld d, 0
@@ -1640,7 +1603,7 @@ BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19
ld [ScriptVar], a
ret
-Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
+Special_LoadOpponentTrainerAndPokemonWithOTSprite: ; 0x170b44
farcall Function_LoadOpponentTrainerAndPokemons
ld a, [rSVBK]
push af
@@ -1653,7 +1616,7 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
ld b, $0
pop af
ld [rSVBK], a
- ld hl, .Sprites
+ ld hl, BTTrainerClassSprites
add hl, bc
ld a, [hl]
ld [wBTTempOTSprite], a
@@ -1685,86 +1648,20 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
ret
; 170b90
-.Sprites:
- db SPRITE_FALKNER
- db SPRITE_WHITNEY
- db SPRITE_BUGSY
- db SPRITE_MORTY
- db SPRITE_PRYCE
- db SPRITE_JASMINE
- db SPRITE_CHUCK
- db SPRITE_CLAIR
- db SPRITE_SILVER
- db SPRITE_OAK
- db SPRITE_WILL
- db SPRITE_CHRIS
- db SPRITE_BRUNO
- db SPRITE_KAREN
- db SPRITE_KOGA
- db SPRITE_LANCE
- db SPRITE_BROCK
- db SPRITE_MISTY
- db SPRITE_SURGE
- db SPRITE_SCIENTIST
- db SPRITE_ERIKA
- db SPRITE_YOUNGSTER
- db SPRITE_YOUNGSTER
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_JANINE
- db SPRITE_COOLTRAINER_M
- db SPRITE_COOLTRAINER_F
- db SPRITE_BUENA
- db SPRITE_SUPER_NERD
- db SPRITE_ROCKET
- db SPRITE_GENTLEMAN
- db SPRITE_BUENA
- db SPRITE_TEACHER
- db SPRITE_SABRINA
- db SPRITE_BUG_CATCHER
- db SPRITE_FISHER
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_F
- db SPRITE_SAILOR
- db SPRITE_SUPER_NERD
- db SPRITE_BLUE
- db SPRITE_ROCKER
- db SPRITE_POKEFAN_M
- db SPRITE_BIKER
- db SPRITE_BLAINE
- db SPRITE_PHARMACIST
- db SPRITE_FISHER
- db SPRITE_SUPER_NERD
- db SPRITE_BLACK_BELT
- db SPRITE_ROCKET
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_YOUNGSTER
- db SPRITE_ROCKET_GIRL
- db SPRITE_SAGE
- db SPRITE_GRANNY
- db SPRITE_ROCKER
- db SPRITE_POKEFAN_M
- db SPRITE_KIMONO_GIRL
- db SPRITE_TWIN
- db SPRITE_POKEFAN_F
- db SPRITE_RED
- db SPRITE_BLUE
- db SPRITE_OFFICER
- db SPRITE_ROCKET_GIRL
-
-ret_170bd2: ; 170bd2
+INCLUDE "data/trainers/sprites.asm"
+
+DummySpecial_170bd2: ; 170bd2
ret
; 170bd3
-SpecialCheckForBattleTowerRules: ; 170bd3
+Special_CheckForBattleTowerRules: ; 170bd3
farcall CheckForBattleTowerRules
jr c, .asm_170bde
- xor a
+ xor a ; FALSE
jr .asm_170be0
.asm_170bde
- ld a, $1
+ ld a, TRUE
.asm_170be0
ld [ScriptVar], a
diff --git a/mobile/get_trainer_class.asm b/engine/events/battle_tower/get_trainer_class.asm
index 37fe91c56..37fe91c56 100644
--- a/mobile/get_trainer_class.asm
+++ b/engine/events/battle_tower/get_trainer_class.asm
diff --git a/engine/events/battle_tower.asm b/engine/events/battle_tower/load_trainer.asm
index 530bdf41c..006e0afa3 100644
--- a/engine/events/battle_tower.asm
+++ b/engine/events/battle_tower/load_trainer.asm
@@ -26,12 +26,14 @@ Function_LoadOpponentTrainerAndPokemons: ; 1f8000
ld a, [hRandomAdd]
add b
ld b, a ; b contains the nr of the trainer
-if DEF(CRYSTAL11)
- and (1 << 7) - 1
- cp 70
+if DEF(_CRYSTAL11)
+ maskbits BATTLETOWER_NUM_UNIQUE_TRAINERS +- 1
+ cp BATTLETOWER_NUM_UNIQUE_TRAINERS
else
- and (1 << 5) - 1
- cp 21
+; Crystal 1.0 used the wrong constant here, so only the first 21
+; trainers in BattleTowerTrainers can be sampled.
+ maskbits BATTLETOWER_NUM_UNIQUE_PKMN +- 1
+ cp BATTLETOWER_NUM_UNIQUE_PKMN
endc
jr nc, .resample
ld b, a
@@ -113,8 +115,8 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
ld a, [hRandomAdd]
add b
ld b, a
- and $1f
- cp BATTLETOWER_NRMONSPERLEVELBRACKET
+ maskbits BATTLETOWER_NUM_UNIQUE_PKMN +- 1
+ cp BATTLETOWER_NUM_UNIQUE_PKMN
jr nc, .resample
; in register 'a' is the chosen Pkmn of the LevelGroup
@@ -207,4 +209,6 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
ret
; 1f814e
-INCLUDE "data/battle_tower.asm"
+INCLUDE "data/battle_tower/classes.asm"
+
+INCLUDE "data/battle_tower/parties.asm"
diff --git a/engine/events/battle_tower_rules.asm b/engine/events/battle_tower/rules.asm
index de6022145..8d037951b 100644
--- a/engine/events/battle_tower_rules.asm
+++ b/engine/events/battle_tower/rules.asm
@@ -213,7 +213,7 @@ BattleTower_ExecuteJumptable: ; 8b25b
BattleTower_CheckPartyLengthIs3: ; 8b2bb
ld a, [PartyCount]
- cp 3
+ cp BATTLETOWER_NROFPKMNS
ret
; 8b2c1
@@ -235,13 +235,13 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
cp b
ret z
ld a, b
- cp 3
+ cp BATTLETOWER_NROFPKMNS
ret
; 8b2da
Function_PartyCountEq3: ; 8b2da
ld a, [PartyCount]
- cp 3
+ cp BATTLETOWER_NROFPKMNS
ret z
scf
ret
diff --git a/mobile/battle_tower_47.asm b/engine/events/battle_tower/trainer_text.asm
index 14f69d654..96c91caa9 100755
--- a/mobile/battle_tower_47.asm
+++ b/engine/events/battle_tower/trainer_text.asm
@@ -7,7 +7,7 @@ BattleTowerText:: ; 11c000
push af
ld a, BANK(BT_OTTrainerClass)
ld [rSVBK], a
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
ld hl, BT_OTTrainerClass
else
; BUG ALERT
@@ -16,7 +16,7 @@ else
; uses it to get the gender of the trainer.
; As a consequence, the enemy trainer's dialog will
; always be sampled from the female array.
- ld hl, BT_OTName + 5
+ ld hl, BT_OTName + NAME_LENGTH_JAPANESE - 1
endc
ld a, [hl]
dec a
@@ -87,73 +87,7 @@ endc
INCLUDE "mobile/fixed_words.asm"
-BTTrainerClassGenders: ; 11f2f0
- db MALE ; FALKNER
- db FEMALE ; WHITNEY
- db FEMALE ; BUGSY
- db MALE ; MORTY
- db MALE ; PRYCE
- db FEMALE ; JASMINE
- db MALE ; CHUCK
- db FEMALE ; CLAIR
- db MALE ; RIVAL1
- db MALE ; POKEMON_PROF
- db FEMALE ; WILL
- db MALE ; CAL
- db MALE ; BRUNO
- db FEMALE ; KAREN
- db MALE ; KOGA
- db MALE ; CHAMPION
- db MALE ; BROCK
- db FEMALE ; MISTY
- db MALE ; LT_SURGE
- db MALE ; SCIENTIST
- db FEMALE ; ERIKA
- db MALE ; YOUNGSTER
- db MALE ; SCHOOLBOY
- db MALE ; BIRD_KEEPER
- db FEMALE ; LASS
- db FEMALE ; JANINE
- db MALE ; COOLTRAINERM
- db FEMALE ; COOLTRAINERF
- db FEMALE ; BEAUTY
- db MALE ; POKEMANIAC
- db MALE ; GRUNTM
- db MALE ; GENTLEMAN
- db FEMALE ; SKIER
- db FEMALE ; TEACHER
- db FEMALE ; SABRINA
- db MALE ; BUG_CATCHER
- db MALE ; FISHER
- db MALE ; SWIMMERM
- db FEMALE ; SWIMMERF
- db MALE ; SAILOR
- db MALE ; SUPER_NERD
- db MALE ; RIVAL2
- db MALE ; GUITARIST
- db MALE ; HIKER
- db MALE ; BIKER
- db MALE ; BLAINE
- db MALE ; BURGLAR
- db MALE ; FIREBREATHER
- db MALE ; JUGGLER
- db MALE ; BLACKBELT_T
- db MALE ; EXECUTIVEM
- db MALE ; PSYCHIC_T
- db FEMALE ; PICNICKER
- db MALE ; CAMPER
- db FEMALE ; EXECUTIVEF
- db MALE ; SAGE
- db FEMALE ; MEDIUM
- db MALE ; BOARDER
- db MALE ; POKEFANM
- db FEMALE ; KIMONO_GIRL
- db FEMALE ; TWINS
- db FEMALE ; POKEFANF
- db MALE ; RED
- db MALE ; BLUE
- db MALE ; OFFICER
- db FEMALE ; GRUNTF
+INCLUDE "data/trainers/genders.asm"
BTMaleTrainerTexts: ; 11f332
diff --git a/engine/events/buena.asm b/engine/events/buena.asm
index 1227593eb..014c6b7a7 100644
--- a/engine/events/buena.asm
+++ b/engine/events/buena.asm
@@ -1,4 +1,4 @@
-SpecialBuenasPassword: ; 8af6b
+Special_BuenasPassword: ; 8af6b
xor a
ld [wWhichIndexSet], a
ld hl, .MenuDataHeader
@@ -17,7 +17,7 @@ SpecialBuenasPassword: ; 8af6b
ld a, [MenuSelection]
ld c, a
ld a, [wBuenasPassword]
- and $3
+ maskbits NUM_PASSWORDS_PER_CATEGORY +- 1
cp c
jr nz, .wrong
ld b, $1
@@ -30,8 +30,7 @@ SpecialBuenasPassword: ; 8af6b
.MenuDataHeader: ; 0x8afa9
db $40 ; flags
- db 00, 00 ; start coords
- db 07, 10 ; end coords
+ menu_coords 0, 0, 10, 7
dw .MenuData2
db 1 ; default option
; 0x8afb1
@@ -46,7 +45,7 @@ SpecialBuenasPassword: ; 8af6b
; 0x8afb4
.PasswordIndices: ; 8afb8
- db 3
+ db NUM_PASSWORDS_PER_CATEGORY
db 0, 1, 2
db -1
@@ -64,7 +63,7 @@ SpecialBuenasPassword: ; 8af6b
ret
; 8afd4
-SpecialBuenaPrize: ; 8afd4
+Special_BuenaPrize: ; 8afd4
xor a
ld [wMenuScrollPosition], a
ld a, $1
@@ -226,8 +225,7 @@ PrintBlueCardBalance: ; 8b097
BlueCardBalanceMenuDataHeader: ; 0x8b0d1
db $40 ; flags
- db 11, 00 ; start coords
- db 13, 11 ; end coords
+ menu_coords 0, 11, 11, 13
; 8b0d6
Buena_PlacePrizeMenuBox: ; 8b0d6
@@ -238,8 +236,7 @@ Buena_PlacePrizeMenuBox: ; 8b0d6
.menudataheader ; 0x8b0dd
db $40 ; flags
- db 00, 00 ; start coords
- db 11, 17 ; end coords
+ menu_coords 0, 0, 17, TEXTBOX_Y - 1
; 8b0e2
Buena_PrizeMenu: ; 8b0e2
@@ -271,8 +268,7 @@ Buena_PrizeMenu: ; 8b0e2
.MenuDataHeader: ; 0x8b113
db $40 ; flags
- db 01, 01 ; start coords
- db 09, 16 ; end coords
+ menu_coords 1, 1, 16, 9
dw .MenuData2
db 1 ; default option
; 0x8b11b
diff --git a/engine/events/buena_menu.asm b/engine/events/buena_menu.asm
index b453da783..cf6fecf72 100644
--- a/engine/events/buena_menu.asm
+++ b/engine/events/buena_menu.asm
@@ -1,4 +1,4 @@
-AskRememberPassword: ; 4ae12
+Special_AskRememberPassword: ; 4ae12
call .DoMenu
ld a, $0
jr c, .okay
diff --git a/engine/events/bug_contest/contest_2.asm b/engine/events/bug_contest/contest_2.asm
index 493c69d0c..7ade44815 100755
--- a/engine/events/bug_contest/contest_2.asm
+++ b/engine/events/bug_contest/contest_2.asm
@@ -2,7 +2,7 @@ Special_SelectRandomBugContestContestants: ; 139a8
; Select five random people to participate in the current contest.
; First we have to make sure that any old data is cleared away.
- ld c, 10 ; Number of people to choose from.
+ ld c, NUM_BUG_CONTESTANTS
ld hl, BugCatchingContestantEventFlagTable
.loop1
push bc
@@ -26,9 +26,9 @@ Special_SelectRandomBugContestContestants: ; 139a8
.next
; Choose a flag at uniform random to be set.
call Random
- cp 250
+ cp $ff / NUM_BUG_CONTESTANTS * NUM_BUG_CONTESTANTS
jr nc, .next
- ld c, 25
+ ld c, $ff / NUM_BUG_CONTESTANTS
call SimpleDivide
ld e, b
ld d, 0
@@ -59,7 +59,7 @@ Special_SelectRandomBugContestContestants: ; 139a8
Special_CheckBugContestContestantFlag: ; 139ed
; Checks the flag of the Bug Catching Contestant whose index is loaded in a.
-; Bug: If a >= 10 when this is called, it will read beyond the table.
+; Bug: If a >= NUM_BUG_CONTESTANTS when this is called, it will read beyond the table.
ld hl, BugCatchingContestantEventFlagTable
ld e, a
@@ -74,20 +74,9 @@ Special_CheckBugContestContestantFlag: ; 139ed
ret
; 139fe
-BugCatchingContestantEventFlagTable: ; 139fe
- dw EVENT_BUG_CATCHING_CONTESTANT_1A
- dw EVENT_BUG_CATCHING_CONTESTANT_2A
- dw EVENT_BUG_CATCHING_CONTESTANT_3A
- dw EVENT_BUG_CATCHING_CONTESTANT_4A
- dw EVENT_BUG_CATCHING_CONTESTANT_5A
- dw EVENT_BUG_CATCHING_CONTESTANT_6A
- dw EVENT_BUG_CATCHING_CONTESTANT_7A
- dw EVENT_BUG_CATCHING_CONTESTANT_8A
- dw EVENT_BUG_CATCHING_CONTESTANT_9A
- dw EVENT_BUG_CATCHING_CONTESTANT_10A
-; 13a12
+INCLUDE "data/bug_contest_flags.asm"
-ContestDropOffMons: ; 13a12
+Special_ContestDropOffMons: ; 13a12
ld hl, PartyMon1HP
ld a, [hli]
or [hl]
@@ -101,7 +90,7 @@ ContestDropOffMons: ; 13a12
ld a, [hl]
ld [wBugContestSecondPartySpecies], a
; ... and replacing it with the terminator byte
- ld [hl], $ff
+ ld [hl], -1
xor a
ld [ScriptVar], a
ret
@@ -112,13 +101,13 @@ ContestDropOffMons: ; 13a12
ret
; 13a31
-ContestReturnMons: ; 13a31
+Special_ContestReturnMons: ; 13a31
; Restore the species of the second mon.
ld hl, PartySpecies + 1
ld a, [wBugContestSecondPartySpecies]
ld [hl], a
; Restore the party count, which must be recomputed.
- ld b, $1
+ ld b, 1
.loop
ld a, [hli]
cp -1
diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm
index d6ad3997e..0e2567c28 100644
--- a/engine/events/bug_contest/display_stats.asm
+++ b/engine/events/bug_contest/display_stats.asm
@@ -101,7 +101,7 @@ DisplayAlreadyCaughtText: ; cc0c7
text_jump UnknownText_0x1c10dd
db "@"
-Predef2F:
-Predef38:
-Predef39: ; cc0d5
+DummyPredef2F:
+DummyPredef38:
+DummyPredef39: ; cc0d5
ret
diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm
index 901ae88fa..8681feb8d 100755
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -1,6 +1,6 @@
-_BugContestJudging: ; 1369d
+_Special_BugContestJudging: ; 1369d
call ContestScore
- farcall TrainerRankings_BugContestScore
+ farcall StubbedTrainerRankings_BugContestScore
call BugContest_JudgeContestants
ld a, [wBugContestThirdPlaceWinnerID]
call LoadContestantName
@@ -77,9 +77,8 @@ BugContest_ThirdPlaceScoreText: ; 0x1372b
; 0x13730
LoadContestantName: ; 13730
-
-; If a = 0, get your name.
- dec a
+; If a = 1, get your name.
+ dec a ; BUG_CONTEST_PLAYER
jr z, .player
; Find the pointer for the trainer class of the Bug Catching Contestant whose ID is in a.
ld c, a
@@ -141,11 +140,11 @@ INCLUDE "data/bug_contest_winners.asm"
BugContest_GetPlayersResult: ; 13807
ld hl, wBugContestThirdPlaceWinnerID
- ld de, -4
- ld b, 3
+ ld de, - BUG_CONTESTANT_SIZE
+ ld b, 3 ; 3rd, 2nd, or 1st
.loop
ld a, [hl]
- cp 1 ; Player
+ cp BUG_CONTEST_PLAYER
jr z, .done
add hl, de
dec b
@@ -159,7 +158,7 @@ BugContest_JudgeContestants: ; 13819
call ClearContestResults
call ComputeAIContestantScores
ld hl, wBugContestTempWinnerID
- ld a, 1 ; Player
+ ld a, BUG_CONTEST_PLAYER
ld [hli], a
ld a, [wContestMon]
ld [hli], a
@@ -190,11 +189,11 @@ DetermineContestWinners: ; 1383e
jr c, .not_first_place
ld hl, wBugContestSecondPlaceWinnerID
ld de, wBugContestThirdPlaceWinnerID
- ld bc, 4
+ ld bc, BUG_CONTESTANT_SIZE
call CopyBytes
ld hl, wBugContestFirstPlaceWinnerID
ld de, wBugContestSecondPlaceWinnerID
- ld bc, 4
+ ld bc, BUG_CONTESTANT_SIZE
call CopyBytes
ld hl, wBugContestFirstPlaceWinnerID
call CopyTempContestant
@@ -208,7 +207,7 @@ DetermineContestWinners: ; 1383e
jr c, .not_second_place
ld hl, wBugContestSecondPlaceWinnerID
ld de, wBugContestThirdPlaceWinnerID
- ld bc, 4
+ ld bc, BUG_CONTESTANT_SIZE
call CopyBytes
ld hl, wBugContestSecondPlaceWinnerID
call CopyTempContestant
@@ -230,7 +229,7 @@ DetermineContestWinners: ; 1383e
CopyTempContestant: ; 138a0
; Could've just called CopyBytes.
ld de, wBugContestTempWinnerID
-rept 3
+rept BUG_CONTESTANT_SIZE +- 1
ld a, [de]
inc de
ld [hli], a
@@ -264,6 +263,7 @@ ComputeAIContestantScores: ; 138b0
inc hl
inc hl
.loop2
+ ; 0, 1, or 2 for 1st, 2nd, or 3rd
call Random
and 3
cp 3
@@ -278,8 +278,9 @@ ComputeAIContestantScores: ; 138b0
ld a, [hli]
ld h, [hl]
ld l, a
+ ; randomly perturb score
call Random
- and 7
+ and %111
ld c, a
ld b, 0
add hl, bc
@@ -294,7 +295,7 @@ ComputeAIContestantScores: ; 138b0
.done
inc e
ld a, e
- cp 10
+ cp NUM_BUG_CONTESTANTS
jr nz, .loop
ret
; 13900
@@ -337,26 +338,26 @@ ContestScore: ; 13900
; DVs
ld a, [wContestMonDVs + 0]
ld b, a
- and 2
+ and %0010
add a
add a
ld c, a
swap b
ld a, b
- and 2
+ and %0010
add a
add c
ld d, a
ld a, [wContestMonDVs + 1]
ld b, a
- and 2
+ and %0010
ld c, a
swap b
ld a, b
- and 2
+ and %0010
srl a
add c
add c
diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm
index b9352ccd6..d91af65fe 100644
--- a/engine/events/catch_tutorial.asm
+++ b/engine/events/catch_tutorial.asm
@@ -41,7 +41,7 @@ CatchTutorial:: ; 4e554
ld hl, .AutoInput
ld a, BANK(.AutoInput)
call StartAutoInput
- callfar StartBattle
+ callfar Predef_StartBattle
call StopAutoInput
pop af
diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm
index 1139ad3d5..81565c27e 100755
--- a/engine/events/celebi.asm
+++ b/engine/events/celebi.asm
@@ -1,3 +1,5 @@
+SPECIALCELEBIEVENT_CELEBI EQU $84
+
Special_CelebiShrineEvent: ; 4989a
call DelayFrame
ld a, [VramState]
@@ -10,7 +12,7 @@ Special_CelebiShrineEvent: ; 4989a
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $84
+ ld [hl], SPECIALCELEBIEVENT_CELEBI
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_CELEBI
@@ -19,7 +21,7 @@ Special_CelebiShrineEvent: ; 4989a
ld a, $80
ld [hl], a
ld a, 160 ; frame count
- ld [wcf64], a
+ ld [wFrameCounter], a
ld d, $0
.loop
ld a, [wJumptableIndex]
@@ -43,26 +45,26 @@ Special_CelebiShrineEvent: ; 4989a
.done
pop af
ld [VramState], a
- call .RefreshPlayerSprite_ClearAllOthers
+ call .RestorePlayerSprite_DespawnLeaves
call CelebiEvent_SetBattleType
ret
; 498f9
-.RefreshPlayerSprite_ClearAllOthers: ; 498f9
- ld hl, Sprites + 2
+.RestorePlayerSprite_DespawnLeaves: ; 498f9
+ ld hl, Sprite01TileID
xor a
- ld c, $4
+ ld c, 4
.OAMloop:
- ld [hli], a
- inc hl
- inc hl
+ ld [hli], a ; tile id
+rept SPRITEOAMSTRUCT_LENGTH +- 1
inc hl
+endr
inc a
dec c
jr nz, .OAMloop
- ld hl, Sprites + 4 * 4
- ld bc, 36 * 4
+ ld hl, Sprite05
+ ld bc, SpritesEnd - Sprite05
xor a
call ByteFill
ret
@@ -76,8 +78,8 @@ LoadCelebiGFX: ; 49912
lb bc, BANK(SpecialCelebiLeafGFX), 4
call Request2bpp
ld de, SpecialCelebiGFX
- ld hl, vTiles0 tile $84
- lb bc, BANK(SpecialCelebiGFX), $10
+ ld hl, vTiles0 tile SPECIALCELEBIEVENT_CELEBI
+ lb bc, BANK(SpecialCelebiGFX), 4 * 4
call Request2bpp
xor a
ld [wJumptableIndex], a
@@ -86,7 +88,7 @@ LoadCelebiGFX: ; 49912
; 49935
CelebiEvent_CountDown: ; 49935
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .done
@@ -238,27 +240,27 @@ UpdateCelebiPosition: ; 49aa2 (12:5aa2)
CelebiEvent_Cosine: ; 49b3b (12:5b3b)
- add $10
- and $3f
- cp $20
+; a = d * cos(a * pi/32)
+ add %010000
+ and %111111
+ cp %100000
jr nc, .negative
- call .SineFunction
+ call .ApplySineWave
ld a, h
ret
.negative
- and $1f
- call .SineFunction
+ and %011111
+ call .ApplySineWave
ld a, h
xor $ff
inc a
ret
-
-.SineFunction: ; 49b52 (12:5b52)
+.ApplySineWave: ; 49b52 (12:5b52)
ld e, a
ld a, d
- ld d, $0
+ ld d, 0
ld hl, .sinewave
add hl, de
add hl, de
@@ -276,7 +278,6 @@ CelebiEvent_Cosine: ; 49b3b (12:5b3b)
and a
jr nz, .multiply
ret
-
; 49b6e (12:5b6e)
.sinewave ; 49b6e
@@ -307,22 +308,22 @@ GetCelebiSpriteTile: ; 49bae
.Frame1:
- ld a, $84
+ ld a, SPECIALCELEBIEVENT_CELEBI
jr .load_tile
.Frame2:
- ld a, $88
+ ld a, SPECIALCELEBIEVENT_CELEBI + 4
jr .load_tile
.Frame3:
- ld a, $8c
+ ld a, SPECIALCELEBIEVENT_CELEBI + 8
jr .load_tile
.Frame4:
- ld a, $90
+ ld a, SPECIALCELEBIEVENT_CELEBI + 12
.load_tile
ld hl, SPRITEANIMSTRUCT_TILE_ID
@@ -361,7 +362,7 @@ CelebiEvent_SetBattleType: ; 49bf3
; 49bf9
-CheckCaughtCelebi: ; 49bf9
+Special_CheckCaughtCelebi: ; 49bf9
ld a, [wBattleResult]
bit 6, a
jr z, .false
diff --git a/engine/events/checkforhiddenitems.asm b/engine/events/checkforhiddenitems.asm
new file mode 100644
index 000000000..3c13412d8
--- /dev/null
+++ b/engine/events/checkforhiddenitems.asm
@@ -0,0 +1,85 @@
+CheckForHiddenItems: ; b8172
+; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry.
+ call GetMapScriptHeaderBank
+ ld [Buffer1], a
+; Get the coordinate of the bottom right corner of the screen, and load it in Buffer3/Buffer4.
+ ld a, [XCoord]
+ add SCREEN_WIDTH / 4
+ ld [Buffer4], a
+ ld a, [YCoord]
+ add SCREEN_HEIGHT / 4
+ ld [Buffer3], a
+; Get the pointer for the first BG event header in the map...
+ ld hl, wCurrMapBGEventHeaderPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+; ... before even checking to see if there are any BG events on this map.
+ ld a, [wCurrMapBGEventCount]
+ and a
+ jr z, .nobgeventitems
+; For i = 1:wCurrMapBGEventCount...
+.loop
+; Store the counter in Buffer2, and store the BG event header pointer in the stack.
+ ld [Buffer2], a
+ push hl
+; Get the Y coordinate of the BG event.
+ call .GetFarByte
+ ld e, a
+; Is the Y coordinate of the BG event on the screen? If not, go to the next BG event.
+ ld a, [Buffer3]
+ sub e
+ jr c, .next
+ cp SCREEN_HEIGHT / 2
+ jr nc, .next
+; Is the X coordinate of the BG event on the screen? If not, go to the next BG event.
+ call .GetFarByte
+ ld d, a
+ ld a, [Buffer4]
+ sub d
+ jr c, .next
+ cp SCREEN_WIDTH / 2
+ jr nc, .next
+; Is this BG event a hidden item? If not, go to the next BG event.
+ call .GetFarByte
+ cp BGEVENT_ITEM
+ jr nz, .next
+; Has this item already been found? If not, set off the Itemfinder.
+ ld a, [Buffer1]
+ call GetFarHalfword
+ ld a, [Buffer1]
+ call GetFarHalfword
+ ld d, h
+ ld e, l
+ ld b, CHECK_FLAG
+ call EventFlagAction
+ ld a, c
+ and a
+ jr z, .itemnearby
+
+.next
+; Restore the BG event header pointer and increment it by the length of a BG event header.
+ pop hl
+ ld bc, 5
+ add hl, bc
+; Restore the BG event counter and decrement it. If it hits zero, there are no hidden items in range.
+ ld a, [Buffer2]
+ dec a
+ jr nz, .loop
+
+.nobgeventitems
+ xor a
+ ret
+
+.itemnearby
+ pop hl
+ scf
+ ret
+; b81e2
+
+.GetFarByte: ; b81e2
+ ld a, [Buffer1]
+ call GetFarByte
+ inc hl
+ ret
+; b81ea
diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm
index 6395a40fb..6310787ac 100755
--- a/engine/events/daycare.asm
+++ b/engine/events/daycare.asm
@@ -465,14 +465,14 @@ Special_DayCareManOutside: ; 16936
.Load0:
call PrintText
- xor a
+ xor a ; FALSE
ld [ScriptVar], a
ret
.PartyFull:
ld hl, .PartyFullText
call PrintText
- ld a, $1
+ ld a, TRUE
ld [ScriptVar], a
ret
; 16993
@@ -565,7 +565,7 @@ DayCare_GiveEgg: ; 169ac
pop hl
push bc
ld b, $0
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
ld hl, MON_HP
add hl, bc
@@ -639,7 +639,7 @@ DayCare_InitBreeding: ; 16a3b
cp DITTO
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
- farcall GetGender
+ farcall Predef_GetGender
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
inc a
@@ -684,7 +684,7 @@ DayCare_InitBreeding: ; 16a3b
ld de, wEggMonMoves
xor a
ld [Buffer1], a
- predef FillMoves
+ predef Predef_FillMoves
farcall InitEggMoves
ld hl, wEggMonID
ld a, [PlayerID]
@@ -726,7 +726,7 @@ DayCare_InitBreeding: ; 16a3b
ld a, TEMPMON
ld [MonType], a
push hl
- farcall GetGender
+ farcall Predef_GetGender
pop hl
ld de, wBreedMon1DVs
ld bc, wBreedMon2DVs
@@ -770,7 +770,7 @@ DayCare_InitBreeding: ; 16a3b
call CopyBytes
ld hl, wEggMonMoves
ld de, wEggMonPP
- predef FillPP
+ predef Predef_FillPP
ld hl, wMonOrItemNameBuffer
ld de, StringBuffer1
ld bc, NAME_LENGTH
diff --git a/engine/events/dratini.asm b/engine/events/dratini.asm
index f110b34ab..83732bef2 100644
--- a/engine/events/dratini.asm
+++ b/engine/events/dratini.asm
@@ -1,4 +1,4 @@
-SpecialDratini: ; 0x8b170
+Special_Dratini: ; 0x8b170
; if ScriptVar is 0 or 1, change the moveset of the last Dratini in the party.
; 0: give it a special moveset with Extremespeed.
; 1: give it the normal moveset of a level 15 Dratini.
diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm
index 9170b642d..77e74b11e 100755
--- a/engine/events/elevator.asm
+++ b/engine/events/elevator.asm
@@ -189,8 +189,7 @@ Elevator_GetCurrentFloorString: ; 1353f
Elevator_MenuDataHeader: ; 0x13550
db $40 ; flags
- db 01, 12 ; start coords
- db 09, 18 ; end coords
+ menu_coords 12, 1, 18, 9
dw Elevator_MenuData2
db 1 ; default option
; 0x13558
@@ -200,12 +199,12 @@ Elevator_MenuData2: ; 0x13558
db 4, 0 ; rows, columns
db 1 ; horizontal spacing
dbw 0, CurElevator
- dba GetElevatorFlorStrings
+ dba GetElevatorFloorStrings
dba NULL
dba NULL
; 13568
-GetElevatorFlorStrings: ; 13568
+GetElevatorFloorStrings: ; 13568
ld a, [MenuSelection]
GetFloorString: ; 1356b
push de
@@ -220,7 +219,7 @@ FloorToString: ; 13575
push de
ld e, a
ld d, 0
- ld hl, .floors
+ ld hl, ElevatorFloorNames
add hl, de
add hl, de
ld a, [hli]
@@ -230,54 +229,4 @@ FloorToString: ; 13575
ret
; 13583
-.floors
- dw .b4f
- dw .b3f
- dw .b2f
- dw .b1f
- dw ._1f
- dw ._2f
- dw ._3f
- dw ._4f
- dw ._5f
- dw ._6f
- dw ._7f
- dw ._8f
- dw ._9f
- dw ._10f
- dw ._11f
- dw .roof
-
-.b4f
- db "B4F@"
-.b3f
- db "B3F@"
-.b2f
- db "B2F@"
-.b1f
- db "B1F@"
-._1f
- db "1F@"
-._2f
- db "2F@"
-._3f
- db "3F@"
-._4f
- db "4F@"
-._5f
- db "5F@"
-._6f
- db "6F@"
-._7f
- db "7F@"
-._8f
- db "8F@"
-._9f
- db "9F@"
-._10f
- db "10F@"
-._11f
- db "11F@"
-.roof
- db "ROOF@"
-; 135db
+INCLUDE "data/elevator_floors.asm"
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm
index a1a2e2e79..3fb1fe9e6 100755
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -7,7 +7,7 @@ PlayWhirlpoolSound: ; 8c7d4
; 8c7e1
BlindingFlash: ; 8c7e1
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
ld hl, wStatusFlags
set 2, [hl] ; Flash
farcall ReplaceTimeOfDayPals
@@ -15,7 +15,7 @@ BlindingFlash: ; 8c7e1
ld b, SCGB_MAPPALS
call GetSGBLayout
farcall LoadOW_BGPal7
- farcall FadeInPalettes
+ farcall Special_FadeInPalettes
ret
; 8c80a
@@ -39,13 +39,13 @@ ShakeHeadbuttTree: ; 8c80a
ld [wCurrSpriteOAMAddr], a
farcall DoNextFrameForAllSprites
call HideHeadbuttTree
- ld a, $20
- ld [wcf64], a
+ ld a, 32
+ ld [wFrameCounter], a
call WaitSFX
ld de, SFX_SANDSTORM
call PlaySFX
.loop
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .done
@@ -62,8 +62,8 @@ ShakeHeadbuttTree: ; 8c80a
xor a
ld [hBGMapMode], a
farcall ClearSpriteAnims
- ld hl, Sprites + 36 * 4
- ld bc, SpritesEnd - (Sprites + 36 * 4)
+ ld hl, Sprite37
+ ld bc, SpritesEnd - Sprite37
xor a
call ByteFill
ld de, Font
@@ -188,7 +188,7 @@ Cut_SpawnAnimateTree: ; 8ca23 (23:4a23)
add hl, bc
ld [hl], $84
ld a, 32
- ld [wcf64], a
+ ld [wFrameCounter], a
; Cut_StartWaiting
ld hl, wJumptableIndex
inc [hl]
@@ -206,7 +206,7 @@ Cut_SpawnAnimateLeaves: ; 8ca3c (23:4a3c)
ld a, $30
call Cut_SpawnLeaf
ld a, 32 ; frames
- ld [wcf64], a
+ ld [wFrameCounter], a
; Cut_StartWaiting
ld hl, wJumptableIndex
inc [hl]
@@ -220,7 +220,7 @@ Cut_StartWaiting: ; 8ca5c (23:4a5c)
inc [hl]
Cut_WaitAnimSFX: ; 8ca64 (23:4a64)
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .finished
@@ -336,7 +336,7 @@ FlyFromAnim: ; 8caed
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_FLY_FROM
ld a, 128
- ld [wcf64], a
+ ld [wFrameCounter], a
.loop
ld a, [wJumptableIndex]
bit 7, a
@@ -374,7 +374,7 @@ FlyToAnim: ; 8cb33
add hl, bc
ld [hl], 11 * 8
ld a, 64
- ld [wcf64], a
+ ld [wFrameCounter], a
.loop
ld a, [wJumptableIndex]
bit 7, a
@@ -393,19 +393,19 @@ FlyToAnim: ; 8cb33
ret
.RestorePlayerSprite_DespawnLeaves: ; 8cb82 (23:4b82)
- ld hl, Sprites + 2 ; Tile ID
+ ld hl, Sprite01TileID
xor a
- ld c, $4
-.loop2
- ld [hli], a
- inc hl
- inc hl
+ ld c, 4
+.OAMloop
+ ld [hli], a ; tile id
+rept SPRITEOAMSTRUCT_LENGTH +- 1
inc hl
+endr
inc a
dec c
- jr nz, .loop2
- ld hl, Sprites + 4 * 4
- ld bc, SpritesEnd - (Sprites + 4 * 4)
+ jr nz, .OAMloop
+ ld hl, Sprite05
+ ld bc, SpritesEnd - Sprite05
xor a
call ByteFill
ret
@@ -431,7 +431,7 @@ FlyFunction_InitGFX: ; 8cb9b (23:4b9b)
FlyFunction_FrameTimer: ; 8cbc8 (23:4bc8)
call .SpawnLeaf
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .exit
diff --git a/engine/events/fish.asm b/engine/events/fish.asm
index 9d1ea63ae..05bd7f530 100644
--- a/engine/events/fish.asm
+++ b/engine/events/fish.asm
@@ -80,7 +80,7 @@ rept 4
endr
ld a, [TimeOfDay]
- and 3
+ maskbits NUM_DAYTIMES +- 1
cp NITE_F
jr c, .time_species
inc hl
diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm
index d0b0bac15..44f2315a0 100644
--- a/engine/events/fruit_trees.asm
+++ b/engine/events/fruit_trees.asm
@@ -2,7 +2,7 @@ FruitTreeScript:: ; 44000
callasm GetCurTreeFruit
opentext
copybytetovar CurFruit
- itemtotext $0, $0
+ itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0
writetext FruitBearingTreeText
buttonsound
callasm TryResetFruitTrees
@@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
; 4405f
PickedFruitTree: ; 4405f
- farcall TrainerRankings_FruitPicked
+ farcall StubbedTrainerRankings_FruitPicked
ld b, 1
jp GetFruitTreeFlag
; 4406a
diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm
index f1981c2fd..c3e90b597 100755
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -42,7 +42,7 @@ RedCredits:: ; 86455
ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
@@ -65,7 +65,7 @@ HallOfFame_FadeOutMusic: ; 8648e
ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
@@ -92,9 +92,9 @@ AnimateHallOfFame: ; 864c3
ld de, MUSIC_HALL_OF_FAME
call HallOfFame_PlayMusicDE
xor a
- ld [wcf64], a
+ ld [wHallOfFameMonCounter], a
.loop
- ld a, [wcf64]
+ ld a, [wHallOfFameMonCounter]
cp PARTY_LENGTH
jr nc, .done
ld hl, wHallOfFameTempMon1
@@ -108,7 +108,7 @@ AnimateHallOfFame: ; 864c3
pop hl
call .DisplayNewHallOfFamer
jr c, .done
- ld hl, wcf64
+ ld hl, wHallOfFameMonCounter
inc [hl]
jr .loop
@@ -130,7 +130,7 @@ AnimateHallOfFame: ; 864c3
call WaitBGMap
decoord 6, 5
ld c, $6
- predef HOF_AnimateFrontpic
+ predef HOF_Predef_AnimateFrontpic
ld c, 60
call DelayFrames
and a
@@ -244,18 +244,18 @@ AnimateHOFMonEntrance: ; 865b5
ld a, [hli]
ld [TempMonDVs + 1], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
ld de, vTiles2 tile $31
- predef GetMonBackpic
+ predef Predef_GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 6, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, $d0
ld [hSCY], a
ld a, $90
@@ -321,7 +321,7 @@ _HallOfFamePC: ; 86650
.DisplayTeam:
xor a
- ld [wcf64], a
+ ld [wHallOfFameMonCounter], a
.next
call .DisplayMonAndStrings
jr c, .start_button
@@ -341,7 +341,7 @@ _HallOfFamePC: ; 86650
jr .loop
.a_button
- ld hl, wcf64
+ ld hl, wHallOfFameMonCounter
inc [hl]
jr .next
@@ -356,7 +356,7 @@ _HallOfFamePC: ; 86650
.DisplayMonAndStrings:
; Print the number of times the player has entered the Hall of Fame.
; If that number is above 200, print "HOF Master!" instead.
- ld a, [wcf64]
+ ld a, [wHallOfFameMonCounter]
cp PARTY_LENGTH
jr nc, .fail
ld hl, wHallOfFameTempMon1
@@ -403,7 +403,7 @@ _HallOfFamePC: ; 86650
call SetPalettes
decoord 6, 5
ld c, $6
- predef HOF_AnimateFrontpic
+ predef HOF_Predef_AnimateFrontpic
and a
ret
@@ -478,7 +478,7 @@ DisplayHOFMon: ; 86748
ld [CurPartySpecies], a
ld [wd265], a
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
xor a
ld [wBoxAlignment], a
hlcoord 6, 5
@@ -499,7 +499,7 @@ DisplayHOFMon: ; 86748
call PlaceString
ld a, TEMPMON
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -546,7 +546,7 @@ HOF_AnimatePlayerPic: ; 86810
ld [hGraphicStartTile], a
hlcoord 6, 6
lb bc, 6, 6
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, $d0
ld [hSCY], a
ld a, $90
@@ -570,7 +570,7 @@ HOF_AnimatePlayerPic: ; 86810
ld [hGraphicStartTile], a
hlcoord 12, 5
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld a, $c0
ld [hSCX], a
call WaitBGMap
diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm
index a4ae8b7e6..2db54a1a7 100755
--- a/engine/events/happiness_egg.asm
+++ b/engine/events/happiness_egg.asm
@@ -1,4 +1,4 @@
-GetFirstPokemonHappiness: ; 718d
+Special_GetFirstPokemonHappiness: ; 718d
ld hl, PartyMon1Happiness
ld bc, PARTYMON_STRUCT_LENGTH
ld de, PartySpecies
@@ -17,11 +17,11 @@ GetFirstPokemonHappiness: ; 718d
call GetPokemonName
jp CopyPokemonName_Buffer1_Buffer3
-CheckFirstMonIsEgg: ; 71ac
+Special_CheckFirstMonIsEgg: ; 71ac
ld a, [PartySpecies]
ld [wd265], a
cp EGG
- ld a, $1
+ ld a, 1
jr z, .egg
xor a
diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm
index 809d11eb5..da3b845e5 100755
--- a/engine/events/heal_machine_anim.asm
+++ b/engine/events/heal_machine_anim.asm
@@ -1,4 +1,4 @@
-HealMachineAnim: ; 12324
+Special_HealMachineAnim: ; 12324
; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon.
ld a, [PartyCount]
and a
@@ -47,6 +47,7 @@ HealMachineAnim: ; 12324
; 12365
.Pointers: ; 12365
+; entries correspond to HEALMACHINE_* constants
dw .Pokecenter
dw .ElmLab
dw .HallOfFame
@@ -73,20 +74,20 @@ HealMachineAnim: ; 12324
call .LoadPalettes
ld de, .HealMachineGFX
ld hl, vTiles0 tile $7c
- lb bc, BANK(.HealMachineGFX), $2
+ lb bc, BANK(.HealMachineGFX), 2
call Request2bpp
ret
; 12393
.PC_LoadBallsOntoMachine: ; 12393
- ld hl, Sprites + $80
+ ld hl, Sprite33
ld de, .PC_ElmsLab_OAM
call .PlaceHealingMachineTile
call .PlaceHealingMachineTile
jr .LoadBallsOntoMachine
.HOF_LoadBallsOntoMachine: ; 123a1
- ld hl, Sprites + $80
+ ld hl, Sprite33
ld de, .HOF_OAM
.LoadBallsOntoMachine: ; 123a7
@@ -168,14 +169,11 @@ INCBIN "gfx/overworld/heal_machine.2bpp"
; 12451
.palettes ; 12451
- RGB 31, 31, 31
- RGB 31, 19, 10
- RGB 31, 07, 01
- RGB 00, 00, 00
+INCLUDE "gfx/overworld/heal_machine.pal"
; 12459
.FlashPalettes8Times: ; 12459
- ld c, $8
+ ld c, 8
.palette_loop
push bc
call .FlashPalettes
@@ -249,17 +247,17 @@ INCBIN "gfx/overworld/heal_machine.2bpp"
ld a, [de]
add c
inc de
- ld [hli], a
+ ld [hli], a ; y
ld a, [de]
add b
inc de
- ld [hli], a
+ ld [hli], a ; x
ld a, [de]
inc de
- ld [hli], a
+ ld [hli], a ; tile id
ld a, [de]
inc de
- ld [hli], a
+ ld [hli], a ; attributes
pop bc
ret
; 124c1
diff --git a/engine/events/kurt.asm b/engine/events/kurt.asm
index 9bc06a613..be395b9d8 100644
--- a/engine/events/kurt.asm
+++ b/engine/events/kurt.asm
@@ -76,7 +76,7 @@ Kurt_SelectApricorn: ; 88055
jr nz, .done
.nope
- xor a
+ xor a ; FALSE
.done
ld c, a
@@ -85,13 +85,12 @@ Kurt_SelectApricorn: ; 88055
.MenuDataHeader: ; 0x88086
db $40 ; flags
- db 01, 01 ; start coords
- db 10, 13 ; end coords
+ menu_coords 1, 1, 13, 10
dw .MenuData2
db 1 ; default option
; 0x8808e
- db 0
+ db 0 ; XXX
.MenuData2: ; 0x8808f
db $10 ; flags
@@ -160,10 +159,12 @@ Kurt_SelectQuantity: ; 880c2
.MenuDataHeader: ; 0x8810d
db $40 ; flags
- db 09, 06 ; start coords
- db 12, 19 ; end coords
+ menu_coords 6, 9, SCREEN_WIDTH - 1, 12
- db 0, 0, -1, 0 ; XXX
+ ; unused
+ dw 0
+ db -1
+ db 0
.PlaceApricornName: ; 88116
call MenuBoxCoord2Tile
diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm
index 4488cfcc9..a172fc431 100644
--- a/engine/events/lucky_number.asm
+++ b/engine/events/lucky_number.asm
@@ -103,7 +103,7 @@ Special_CheckForLuckyNumberWinners: ; 4d87a
ld a, [ScriptVar]
and a
ret z ; found nothing
- farcall TrainerRankings_LuckyNumberShow
+ farcall StubbedTrainerRankings_LuckyNumberShow
ld a, [wFoundMatchingIDInParty]
and a
push af
diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm
index 68e8baad7..6588295b8 100644
--- a/engine/events/magikarp.asm
+++ b/engine/events/magikarp.asm
@@ -28,7 +28,7 @@ Special_CheckMagikarpLength: ; fbb32
ld c, l
call CalcMagikarpLength
call PrintMagikarpLength
- farcall TrainerRankings_MagikarpLength
+ farcall StubbedTrainerRankings_MagikarpLength
ld hl, .MeasureItText
call PrintText
@@ -52,22 +52,22 @@ Special_CheckMagikarpLength: ; fbb32
ld hl, PartyMonOT
call SkipNames
call CopyBytes
- ld a, 3
+ ld a, MAGIKARPLENGTH_BEAT_RECORD
ld [ScriptVar], a
ret
.not_long_enough
- ld a, 2
+ ld a, MAGIKARPLENGTH_TOO_SHORT
ld [ScriptVar], a
ret
.declined
- ld a, 1
+ ld a, MAGIKARPLENGTH_REFUSED
ld [ScriptVar], a
ret
.not_magikarp
- xor a
+ xor a ; MAGIKARPLENGTH_NOT_MAGIKARP
ld [ScriptVar], a
ret
; fbba9
diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm
index 510af938a..c2ff36135 100755
--- a/engine/events/magnet_train.asm
+++ b/engine/events/magnet_train.asm
@@ -86,20 +86,20 @@ Special_MagnetTrain: ; 8cc04
MagnetTrain_UpdateLYOverrides: ; 8cc99
ld hl, LYOverridesBackup
ld c, $2f
- ld a, [wcf64]
+ ld a, [wMagnetTrainOffset]
add a
ld [hSCX], a
call .loadloop
ld c, $30
- ld a, [wcf65]
+ ld a, [wMagnetTrainPosition]
call .loadloop
ld c, $31
- ld a, [wcf64]
+ ld a, [wMagnetTrainOffset]
add a
call .loadloop
ld a, [wMagnetTrainDirection]
ld d, a
- ld hl, wcf64
+ ld hl, wMagnetTrainOffset
ld a, [hl]
add d
add d
@@ -147,11 +147,11 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9
call MagnetTrain_InitLYOverrides
ld hl, wJumptableIndex
xor a
- ld [hli], a
+ ld [hli], a ; wJumptableIndex
ld a, [wMagnetTrainInitPosition]
- ld [hli], a
- ld [hli], a
- ld [hli], a
+ ld [hli], a ; wMagnetTrainOffset
+ ld [hli], a ; wMagnetTrainPosition
+ ld [hli], a ; wMagnetTrainWaitCounter
ld de, MUSIC_MAGNET_TRAIN
call PlayMusic2
ret
@@ -220,8 +220,7 @@ GetMagnetTrainBGTiles: ; 8cd74
; 8cd82
MagnetTrainBGTiles: ; 8cd82
-; Alternating tiles for each line
-; of the Magnet Train tilemap.
+; Alternating tiles for each line of the Magnet Train tilemap.
db $4c, $4d ; bush
db $5c, $5d ; bush
db $4c, $4d ; bush
@@ -263,25 +262,25 @@ SetMagnetTrainPals: ; 8cdc3
; bushes
hlbgcoord 0, 0
ld bc, 4 * BG_MAP_WIDTH
- ld a, $2
+ ld a, PAL_BG_GREEN
call ByteFill
; train
hlbgcoord 0, 4
ld bc, 10 * BG_MAP_WIDTH
- xor a
+ xor a ; PAL_BG_GRAY
call ByteFill
; more bushes
hlbgcoord 0, 14
ld bc, 4 * BG_MAP_WIDTH
- ld a, $2
+ ld a, PAL_BG_GREEN
call ByteFill
; train window
hlbgcoord 7, 8
ld bc, 6
- ld a, $4
+ ld a, PAL_BG_YELLOW
call ByteFill
ld a, $0
@@ -342,13 +341,13 @@ MagnetTrain_Jumptable: ; 8cdf7
ld [hl], $0
call .Next
ld a, $80
- ld [wcf66], a
+ ld [wMagnetTrainWaitCounter], a
ret
; 8ce47
.MoveTrain1: ; 8ce47
ld hl, wMagnetTrainHoldPosition
- ld a, [wcf65]
+ ld a, [wMagnetTrainPosition]
cp [hl]
jr z, .PrepareToHoldTrain
ld e, a
@@ -356,7 +355,7 @@ MagnetTrain_Jumptable: ; 8cdf7
xor $ff
inc a
add e
- ld [wcf65], a
+ ld [wMagnetTrainPosition], a
ld hl, wGlobalAnimXOffset
ld a, [wMagnetTrainDirection]
add [hl]
@@ -366,12 +365,12 @@ MagnetTrain_Jumptable: ; 8cdf7
.PrepareToHoldTrain:
call .Next
ld a, $80
- ld [wcf66], a
+ ld [wMagnetTrainWaitCounter], a
ret
; 8ce6d
.WaitScene: ; 8ce6d
- ld hl, wcf66
+ ld hl, wMagnetTrainWaitCounter
ld a, [hl]
and a
jr z, .DoneWaiting
@@ -385,7 +384,7 @@ MagnetTrain_Jumptable: ; 8cdf7
.MoveTrain2: ; 8ce7a
ld hl, wMagnetTrainFinalPosition
- ld a, [wcf65]
+ ld a, [wMagnetTrainPosition]
cp [hl]
jr z, .PrepareToFinishAnim
ld e, a
@@ -396,7 +395,7 @@ MagnetTrain_Jumptable: ; 8cdf7
ld a, e
add d
add d
- ld [wcf65], a
+ ld [wMagnetTrainPosition], a
ld hl, wGlobalAnimXOffset
ld a, [wMagnetTrainDirection]
ld d, a
@@ -436,7 +435,7 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
ld a, [wEnvironment]
push af
ld a, [TimeOfDay]
- and $3
+ maskbits NUM_DAYTIMES +- 1
ld [TimeOfDayPal], a
ld a, $1
ld [wEnvironment], a
@@ -459,23 +458,11 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
; 8ceff
MagnetTrainTilemap1:
- db $1f, $05, $06, $0a, $0a
- db $0a, $09, $0a, $0a, $0a
- db $0a, $0a, $0a, $09, $0a
- db $0a, $0a, $0b, $0c, $1f
+ db $1f, $05, $06, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0b, $0c, $1f
MagnetTrainTilemap2:
- db $14, $15, $16, $1a, $1a
- db $1a, $19, $1a, $1a, $1a
- db $1a, $1a, $1a, $19, $1a
- db $1a, $1a, $1b, $1c, $1d
+ db $14, $15, $16, $1a, $1a, $1a, $19, $1a, $1a, $1a, $1a, $1a, $1a, $19, $1a, $1a, $1a, $1b, $1c, $1d
MagnetTrainTilemap3:
- db $24, $25, $26, $27, $07
- db $2f, $29, $28, $28, $28
- db $28, $28, $28, $29, $07
- db $2f, $2a, $2b, $2c, $2d
+ db $24, $25, $26, $27, $07, $2f, $29, $28, $28, $28, $28, $28, $28, $29, $07, $2f, $2a, $2b, $2c, $2d
MagnetTrainTilemap4:
- db $20, $1f, $2e, $1f, $17
- db $00, $2e, $1f, $1f, $1f
- db $1f, $1f, $1f, $2e, $17
- db $00, $1f, $2e, $1f, $0f
+ db $20, $1f, $2e, $1f, $17, $00, $2e, $1f, $1f, $1f, $1f, $1f, $1f, $2e, $17, $00, $1f, $2e, $1f, $0f
; 8cf4f
diff --git a/engine/events/map_name_sign.asm b/engine/events/map_name_sign.asm
new file mode 100644
index 000000000..b20d74ee4
--- /dev/null
+++ b/engine/events/map_name_sign.asm
@@ -0,0 +1,274 @@
+MAP_NAME_SIGN_START EQU $60
+
+ReturnFromMapSetupScript:: ; b8000
+ xor a
+ ld [hBGMapMode], a
+ farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
+ ret
+; b800a
+
+; should have just been a fallthrough
+.inefficient_farcall ; b800a
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetWorldMapLocation
+ ld [wCurrentLandmark], a
+ call .CheckNationalParkGate
+ jr z, .nationalparkgate
+
+ call GetMapEnvironment
+ cp GATE
+ jr nz, .not_gate
+
+.nationalparkgate
+ ld a, -1
+ ld [wCurrentLandmark], a
+
+.not_gate
+ ld hl, wEnteredMapFromContinue
+ bit 1, [hl]
+ res 1, [hl]
+ jr nz, .dont_do_map_sign
+
+ call .CheckMovingWithinLandmark
+ jr z, .dont_do_map_sign
+ ld a, [wCurrentLandmark]
+ ld [wPreviousLandmark], a
+
+ call .CheckSpecialMap
+ jr z, .dont_do_map_sign
+
+; Display for 60 frames
+ ld a, 60
+ ld [wLandmarkSignTimer], a
+ call LoadMapNameSignGFX
+ call InitMapNameFrame
+ farcall HDMATransfer_OnlyTopFourRows
+ ret
+
+.dont_do_map_sign
+ ld a, [wCurrentLandmark]
+ ld [wPreviousLandmark], a
+ ld a, $90
+ ld [rWY], a
+ ld [hWY], a
+ xor a
+ ld [hLCDCPointer], a
+ ret
+; b8064
+
+.CheckMovingWithinLandmark: ; b8064
+ ld a, [wCurrentLandmark]
+ ld c, a
+ ld a, [wPreviousLandmark]
+ cp c
+ ret z
+ cp SPECIAL_MAP
+ ret
+; b8070
+
+.CheckSpecialMap: ; b8070
+; These landmarks do not get pop-up signs.
+ cp -1
+ ret z
+ cp SPECIAL_MAP
+ ret z
+ cp RADIO_TOWER
+ ret z
+ cp LAV_RADIO_TOWER
+ ret z
+ cp UNDERGROUND_PATH
+ ret z
+ cp INDIGO_PLATEAU
+ ret z
+ cp POWER_PLANT
+ ret z
+ ld a, $1
+ and a
+ ret
+; b8089
+
+.CheckNationalParkGate: ; b8089
+ ld a, [MapGroup]
+ cp GROUP_ROUTE_35_NATIONAL_PARK_GATE
+ ret nz
+ ld a, [MapNumber]
+ cp MAP_ROUTE_35_NATIONAL_PARK_GATE
+ ret z
+ cp MAP_ROUTE_36_NATIONAL_PARK_GATE
+ ret
+; b8098
+
+
+PlaceMapNameSign:: ; b8098 (2e:4098)
+ ld hl, wLandmarkSignTimer
+ ld a, [hl]
+ and a
+ jr z, .disappear
+ dec [hl]
+ cp 60
+ ret z
+ cp 59
+ jr nz, .skip2
+ call InitMapNameFrame
+ call PlaceMapNameCenterAlign
+ farcall HDMATransfer_OnlyTopFourRows
+.skip2
+ ld a, $80
+ ld a, $70
+ ld [rWY], a
+ ld [hWY], a
+ ret
+
+.disappear
+ ld a, $90
+ ld [rWY], a
+ ld [hWY], a
+ xor a
+ ld [hLCDCPointer], a
+ ret
+
+
+LoadMapNameSignGFX: ; b80c6
+ ld de, MapEntryFrameGFX
+ ld hl, vTiles2 tile MAP_NAME_SIGN_START
+ lb bc, BANK(MapEntryFrameGFX), 14
+ call Get2bpp
+ ret
+; b80d3
+
+InitMapNameFrame: ; b80d3
+ hlcoord 0, 0
+ ld b, 2
+ ld c, 18
+ call InitMapSignAttrMap
+ call PlaceMapNameFrame
+ ret
+; b80e1
+
+
+PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
+ ld a, [wCurrentLandmark]
+ ld e, a
+ farcall GetLandmarkName
+ call .GetNameLength
+ ld a, SCREEN_WIDTH
+ sub c
+ srl a
+ ld b, $0
+ ld c, a
+ hlcoord 0, 2
+ add hl, bc
+ ld de, StringBuffer1
+ call PlaceString
+ ret
+
+.GetNameLength: ; b8101 (2e:4101)
+ ld c, 0
+ push hl
+ ld hl, StringBuffer1
+.loop
+ ld a, [hli]
+ cp "@"
+ jr z, .stop
+ cp "%"
+ jr z, .loop
+ inc c
+ jr .loop
+.stop
+ pop hl
+ ret
+
+
+InitMapSignAttrMap: ; b8115
+ ld de, AttrMap - TileMap
+ add hl, de
+ inc b
+ inc b
+ inc c
+ inc c
+ ld a, PAL_BG_TEXT | PRIORITY
+.loop
+ push bc
+ push hl
+.inner_loop
+ ld [hli], a
+ dec c
+ jr nz, .inner_loop
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .loop
+ ret
+; b812f
+
+PlaceMapNameFrame: ; b812f
+ hlcoord 0, 0
+ ; top left
+ ld a, MAP_NAME_SIGN_START + 1
+ ld [hli], a
+ ; top row
+ ld a, MAP_NAME_SIGN_START + 2
+ call .FillTopBottom
+ ; top right
+ ld a, MAP_NAME_SIGN_START + 4
+ ld [hli], a
+ ; left, first line
+ ld a, MAP_NAME_SIGN_START + 5
+ ld [hli], a
+ ; first line
+ call .FillMiddle
+ ; right, first line
+ ld a, MAP_NAME_SIGN_START + 11
+ ld [hli], a
+ ; left, second line
+ ld a, MAP_NAME_SIGN_START + 6
+ ld [hli], a
+ ; second line
+ call .FillMiddle
+ ; right, second line
+ ld a, MAP_NAME_SIGN_START + 12
+ ld [hli], a
+ ; bottom left
+ ld a, MAP_NAME_SIGN_START + 7
+ ld [hli], a
+ ; bottom
+ ld a, MAP_NAME_SIGN_START + 8
+ call .FillTopBottom
+ ; bottom right
+ ld a, MAP_NAME_SIGN_START + 10
+ ld [hl], a
+ ret
+; b815b
+
+.FillMiddle: ; b815b
+ ld c, SCREEN_WIDTH - 2
+ ld a, MAP_NAME_SIGN_START + 13
+.loop
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ ret
+; b8164
+
+.FillTopBottom: ; b8164
+ ld c, 5
+ jr .enterloop
+
+.continueloop
+ ld [hli], a
+ ld [hli], a
+
+.enterloop
+ inc a
+ ld [hli], a
+ ld [hli], a
+ dec a
+ dec c
+ jr nz, .continueloop
+ ret
+; b8172
diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm
index 97372a57a..73ed89143 100755
--- a/engine/events/misc_scripts.asm
+++ b/engine/events/misc_scripts.asm
@@ -2,7 +2,7 @@ Script_AbortBugContest: ; 0x122c1
checkflag ENGINE_BUG_CONTEST_TIMER
iffalse .finish
setflag ENGINE_DAILY_BUG_CONTEST
- special ContestReturnMons
+ special Special_ContestReturnMons
.finish
end
diff --git a/engine/events/misc_scripts_2.asm b/engine/events/misc_scripts_2.asm
index c4c51d5e6..29416a9e5 100644
--- a/engine/events/misc_scripts_2.asm
+++ b/engine/events/misc_scripts_2.asm
@@ -13,7 +13,7 @@ RepelWoreOffScript:: ; 0x13619
HiddenItemScript:: ; 0x13625
opentext
copybytetovar EngineBuffer3
- itemtotext 0, 0
+ itemtotext USE_SCRIPT_VAR, MEM_BUFFER_0
writetext .found_text
giveitem ITEM_FROM_MEM
iffalse .bag_full
diff --git a/engine/events/mom.asm b/engine/events/mom.asm
index 6e3c7b320..8a61a57d8 100644
--- a/engine/events/mom.asm
+++ b/engine/events/mom.asm
@@ -146,7 +146,7 @@ Special_BankOfMom: ; 16218
ld [hli], a
ld [hl], a
ld a, $5
- ld [wcf64], a
+ ld [wMomBankDigitCursorPosition], a
call LoadStandardMenuDataHeader
call Mom_SetUpDepositMenu
call Mom_Wait10Frames
@@ -213,7 +213,7 @@ Special_BankOfMom: ; 16218
ld [hli], a
ld [hl], a
ld a, $5
- ld [wcf64], a
+ ld [wMomBankDigitCursorPosition], a
call LoadStandardMenuDataHeader
call Mom_SetUpWithdrawMenu
call Mom_Wait10Frames
@@ -729,8 +729,7 @@ Mom_HeldString: ; 166b0
MenuDataHeader_0x166b5: ; 0x166b5
db $40 ; flags
- db 00, 00 ; start coords
- db 10, 10 ; end coords
+ menu_coords 0, 0, 10, 10
dw MenuData2_0x166bd
db 1 ; default option
; 0x166bd
diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm
index bef7d5688..50496e663 100755
--- a/engine/events/mom_phone.asm
+++ b/engine/events/mom_phone.asm
@@ -217,7 +217,7 @@ endr
INCLUDE "data/items/mom_phone.asm"
- db 0, 0, 0 ; XXX
+ db 0, 0, 0 ; unused
_MomText_HiHowAreYou: ; 0xfd1b1
; Hi, ! How are you?
@@ -255,10 +255,10 @@ _MomText_ItsInRoom: ; 0xfd1ca
db "@"
; 0xfd1cf
- db 0 ; XXX
+ db 0 ; unused
-Predef3A: ; fd1d0
+DummyPredef3A: ; fd1d0
ret
; fd1d1
- ret ; XXX
+ ret ; unused
diff --git a/engine/events/move_deleter.asm b/engine/events/move_deleter.asm
index 95fc0f1d8..3e06113ae 100644
--- a/engine/events/move_deleter.asm
+++ b/engine/events/move_deleter.asm
@@ -1,4 +1,4 @@
-MoveDeletion:
+Special_MoveDeletion:
ld hl, .IntroText
call PrintText
call YesNoBox
diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm
index a15ecaf93..3a7272538 100644
--- a/engine/events/move_tutor.asm
+++ b/engine/events/move_tutor.asm
@@ -22,7 +22,7 @@ Special_MoveTutor: ; 4925b
.enter_loop
call CheckCanLearnMoveTutorMove
jr nc, .loop
- xor a
+ xor a ; FALSE
ld [ScriptVar], a
jr .quit
@@ -35,10 +35,11 @@ Special_MoveTutor: ; 4925b
.GetMoveTutorMove: ; 492a5
ld a, [ScriptVar]
- cp 1
+ cp MOVETUTOR_FLAMETHROWER
jr z, .flamethrower
- cp 2
+ cp MOVETUTOR_THUNDERBOLT
jr z, .thunderbolt
+ ; MOVETUTOR_ICE_BEAM
ld a, ICE_BEAM
ret
@@ -54,7 +55,7 @@ CheckCanLearnMoveTutorMove: ; 492b9
ld hl, .MenuDataHeader
call LoadMenuDataHeader
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
push bc
ld a, [CurPartyMon]
@@ -78,7 +79,7 @@ CheckCanLearnMoveTutorMove: ; 492b9
callfar KnowsMove
jr c, .didnt_learn
- predef LearnMove
+ predef Predef_LearnMove
ld a, b
and a
jr z, .didnt_learn
@@ -99,5 +100,4 @@ CheckCanLearnMoveTutorMove: ; 492b9
.MenuDataHeader: ; 0x4930a
db $40 ; flags
- db 12, 00 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm
index 17ec54bb1..c9e0a5fe5 100755
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -427,7 +427,7 @@ UsedSurfScript: ; c986
end
.empty_fn ; c9a2
- farcall TrainerRankings_Surf
+ farcall StubbedTrainerRankings_Surf
ret
UsedSurfText: ; c9a9
@@ -623,7 +623,7 @@ FlyFunction: ; ca3b
special UpdateTimePals
callasm FlyFromAnim
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
callasm DelayLoadingNewSprites
writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_FLY
@@ -700,7 +700,7 @@ Script_UsedWaterfall: ; 0xcb20
ld a, [PlayerStandingTile]
call CheckWaterfallTile
ret z
- farcall TrainerRankings_Waterfall
+ farcall StubbedTrainerRankings_Waterfall
ld a, $1
ld [ScriptVar], a
ret
@@ -871,7 +871,7 @@ dig_incave
playsound SFX_WARP_TO
applymovement PLAYER, .DigOut
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_DOOR
playsound SFX_WARP_FROM
@@ -958,7 +958,7 @@ TeleportFunction: ; cc61
playsound SFX_WARP_TO
applymovement PLAYER, .TeleportFrom
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_TELEPORT
playsound SFX_WARP_FROM
@@ -986,7 +986,7 @@ StrengthFunction: ; cce5
jr c, .Failed
jr .UseStrength
-.AlreadyUsing: ; unreferenced
+.Unreferenced_AlreadyUsing:
ld hl, .JumpText
call MenuTextBoxBackup
ld a, $80
@@ -1749,7 +1749,7 @@ Script_GetOnBike_Register: ; 0xd14e
special ReplaceKrisSprite
end
-; XXX
+; unused
nop
ret
diff --git a/engine/events/poisonstep.asm b/engine/events/poisonstep.asm
index 00c7477bc..366ad1c03 100755
--- a/engine/events/poisonstep.asm
+++ b/engine/events/poisonstep.asm
@@ -104,7 +104,7 @@ DoPoisonStep:: ; 505da
ld de, SFX_POISON
call PlaySFX
ld b, $2
- predef LoadPoisonBGPals
+ predef Predef_LoadPoisonBGPals
call DelayFrame
ret
; 50669
@@ -145,7 +145,7 @@ DoPoisonStep:: ; 505da
ld a, [PartyCount]
cp [hl]
jr nz, .party_loop
- predef CheckPlayerPartyForFitPkmn
+ predef Predef_CheckPlayerPartyForFitPkmn
ld a, d
ld [ScriptVar], a
ret
diff --git a/engine/events/poisonstep_pals.asm b/engine/events/poisonstep_pals.asm
index b132b178f..326629138 100644
--- a/engine/events/poisonstep_pals.asm
+++ b/engine/events/poisonstep_pals.asm
@@ -1,4 +1,4 @@
-LoadPoisonBGPals: ; cbcdd
+Predef_LoadPoisonBGPals: ; cbcdd
call .LoadPals
ld a, [hCGB]
and a
@@ -10,8 +10,8 @@ LoadPoisonBGPals: ; cbcdd
and a
jr nz, .cgb
ld a, [TimeOfDayPal]
- and $3
- cp $3
+ maskbits NUM_DAYTIMES +- 1
+ cp DARKNESS_F
ld a, %00000000
jr z, .convert_pals
ld a, %10101010
@@ -31,7 +31,6 @@ LoadPoisonBGPals: ; cbcdd
ld hl, wBGPals2
ld c, 4 palettes
.loop
-; RGB 28, 21, 31
ld a, LOW(palred 28 + palgreen 21 + palblue 31)
ld [hli], a
ld a, HIGH(palred 28 + palgreen 21 + palblue 31)
diff --git a/engine/events/poke_seer.asm b/engine/events/poke_seer.asm
index d6e335298..c7e6bd5ee 100644
--- a/engine/events/poke_seer.asm
+++ b/engine/events/poke_seer.asm
@@ -15,12 +15,12 @@
const SEERACTION_CANT_TELL_2
const SEERACTION_LEVEL_ONLY
-SpecialPokeSeer: ; 4f0bc
+Special_PokeSeer: ; 4f0bc
ld a, SEER_INTRO
call PrintSeerText
call JoyWaitAorB
- ld b, $6
+ ld b, PARTY_LENGTH
farcall SelectMonFromParty
jr c, .cancel
@@ -163,11 +163,11 @@ GetCaughtLevel: ; 4f18c
call ByteFill
; caught level
- ; Limited to between 1 and 63 for some reason.
+ ; Limited to between 1 and 63 since it's a 6-bit quantity.
ld a, [wSeerCaughtData]
- and $3f
+ and CAUGHT_LEVEL_MASK
jr z, .unknown
- cp 1 ; hatched from an egg
+ cp CAUGHT_EGG_LEVEL ; egg marker value
jr nz, .print
ld a, EGG_LEVEL ; egg hatch level
@@ -193,7 +193,7 @@ GetCaughtLevel: ; 4f18c
GetCaughtTime: ; 4f1c5
ld a, [wSeerCaughtData]
- and $c0
+ and CAUGHT_TIME_MASK
jr z, .none
rlca
@@ -233,11 +233,11 @@ UnknownCaughtData: ; 4f1f8
GetCaughtLocation: ; 4f20a
ld a, [wSeerCaughtGender]
- and $7f
+ and CAUGHT_LOCATION_MASK
jr z, .Unknown
- cp $7f
+ cp EVENT_LOCATION
jr z, .event
- cp $7e
+ cp GIFT_LOCATION
jr z, .fail
ld e, a
farcall GetLandmarkName
@@ -440,22 +440,22 @@ GetCaughtGender: ; 4f301
add hl, bc
ld a, [hl]
- and $7f
+ and CAUGHT_LOCATION_MASK
jr z, .genderless
- cp $7f
+ cp EVENT_LOCATION
jr z, .genderless
ld a, [hl]
- and $80
+ and CAUGHT_GENDER_MASK
jr nz, .male
- ld c, 1
+ ld c, CAUGHT_BY_GIRL
ret
.male
- ld c, 2
+ ld c, CAUGHT_BY_BOY
ret
.genderless
- ld c, 0
+ ld c, CAUGHT_BY_UNKNOWN
ret
; 4f31c
diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm
index 7045dc1c8..efb5d8ad1 100755
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -1,4 +1,4 @@
-PokemonCenterPC: ; 1559a
+Special_PokemonCenterPC: ; 1559a
call PC_CheckPartyForPokemon
ret c
call PC_PlayBootSound
@@ -28,8 +28,7 @@ PokemonCenterPC: ; 1559a
.TopMenu:
db $48 ; flags
- db 00, 00 ; start coords
- db 12, 15 ; end coords
+ menu_coords 0, 0, 15, 12
dw .MenuData2
db 1 ; default option
@@ -354,7 +353,7 @@ KrisWithdrawItemMenu: ; 0x157d1
ld [CurItemQuantity], a
ld hl, PCItems
call TossItem
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
ld hl, .WithdrewText
call MenuTextBox
xor a
@@ -421,7 +420,7 @@ KrisDepositItemMenu: ; 0x1588b
farcall DepositSellInitPackBuffers
.loop
farcall DepositSellPack
- ld a, [wcf66]
+ ld a, [wPackUsedItem]
and a
jr z, .close
call .TryDepositItem
@@ -518,7 +517,7 @@ KrisDepositItemMenu: ; 0x1588b
ld [CurItemQuantity], a
ld hl, NumItems
call TossItem
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
ld hl, .DepositText
call PrintText
ret
@@ -621,8 +620,7 @@ PCItemsJoypad: ; 0x15985
.PCItemsMenuData:
db %01000000
- db 1, 4 ; start coords
- db 10, 18 ; end coords
+ menu_coords 4, 1, 18, 10
dw .MenuData2
db 1 ; default option
diff --git a/engine/events/pokepic.asm b/engine/events/pokepic.asm
index 82016403b..a2f0c0725 100755
--- a/engine/events/pokepic.asm
+++ b/engine/events/pokepic.asm
@@ -12,7 +12,7 @@ Pokepic:: ; 244e3
ld [CurSpecies], a
call GetBaseData
ld de, vTiles1
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ld a, [wMenuBorderTopCoord]
inc a
ld b, a
@@ -23,7 +23,7 @@ Pokepic:: ; 244e3
ld a, $80
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call WaitBGMap
ret
@@ -43,7 +43,6 @@ ClosePokepic:: ; 24528
PokepicMenuDataHeader: ; 0x24547
db $40 ; flags
- db 04, 06 ; start coords
- db 13, 14 ; end coords
+ menu_coords 6, 4, 14, 13
dw NULL
db 1 ; default option
diff --git a/engine/events/print_photo.asm b/engine/events/print_photo.asm
index 06b01bbcf..54aa1892d 100755
--- a/engine/events/print_photo.asm
+++ b/engine/events/print_photo.asm
@@ -1,4 +1,4 @@
-PhotoStudio: ; 16dc7
+Special_PhotoStudio: ; 16dc7
ld hl, .Text_AskWhichMon
call PrintText
farcall SelectMonFromParty
diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm
index 771d3ea5a..41f2bab9c 100644
--- a/engine/events/print_unown.asm
+++ b/engine/events/print_unown.asm
@@ -140,13 +140,13 @@ UnownPrinter: ; 16be4
xor a
ld [wBoxAlignment], a
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
call .Load2bppToSRAM
hlcoord 1, 6
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ld de, vTiles2 tile $31
farcall RotateUnownFrontpic
ret
@@ -228,6 +228,6 @@ PlaceUnownPrinterFrontpic: ; 16dac
ld a, $31
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 16dc7
diff --git a/engine/events/prof_oaks_pc.asm b/engine/events/prof_oaks_pc.asm
index 69949940b..ae84a43a5 100755
--- a/engine/events/prof_oaks_pc.asm
+++ b/engine/events/prof_oaks_pc.asm
@@ -3,7 +3,7 @@ ProfOaksPC: ; 0x265d3
call MenuTextBox
call YesNoBox
jr c, .shutdown
- call ProfOaksPCBoot ; player chose "yes"?
+ call Special_ProfOaksPCBoot ; player chose "yes"?
.shutdown
ld hl, OakPCText4
call PrintText
@@ -11,7 +11,7 @@ ProfOaksPC: ; 0x265d3
call ExitMenu
ret
-ProfOaksPCBoot ; 0x265ee
+Special_ProfOaksPCBoot ; 0x265ee
ld hl, OakPCText2
call PrintText
call Rate
diff --git a/engine/events/sacred_ash.asm b/engine/events/sacred_ash.asm
index cc46eac9f..65ed83438 100755
--- a/engine/events/sacred_ash.asm
+++ b/engine/events/sacred_ash.asm
@@ -52,12 +52,12 @@ SacredAshScript: ; 0x50821
special HealParty
reloadmappart
playsound SFX_WARP_TO
- special FadeOutPalettes
- special FadeInPalettes
- special FadeOutPalettes
- special FadeInPalettes
- special FadeOutPalettes
- special FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
waitsfx
writetext UnknownText_0x50845
playsound SFX_CAUGHT_MON
diff --git a/engine/events/special.asm b/engine/events/special.asm
index 939db4a25..62e0a620e 100755
--- a/engine/events/special.asm
+++ b/engine/events/special.asm
@@ -1,4 +1,6 @@
-SpecialGiveShuckle: ; 7305
+MANIA_OT_ID EQU 00518
+
+Special_GiveShuckle: ; 7305
; Adding to the party.
xor a
@@ -10,7 +12,7 @@ SpecialGiveShuckle: ; 7305
ld a, 15
ld [CurPartyLevel], a
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
jr nc, .NotGiven
; Caught data.
@@ -32,9 +34,9 @@ SpecialGiveShuckle: ; 7305
; OT ID.
ld hl, PartyMon1ID
call AddNTimes
- ld a, $2
+ ld a, HIGH(MANIA_OT_ID)
ld [hli], a
- ld [hl], $6
+ ld [hl], LOW(MANIA_OT_ID)
; Nickname.
ld a, [PartyCount]
@@ -54,8 +56,7 @@ SpecialGiveShuckle: ; 7305
; Engine flag for this event.
ld hl, wDailyFlags
- set 5, [hl]
-; setflag ENGINE_SHUCKLE_GIVEN
+ set 5, [hl] ; ENGINE_SHUCKLE_GIVEN
ld a, 1
ld [ScriptVar], a
ret
@@ -70,7 +71,7 @@ SpecialShuckleOT:
SpecialShuckleNick:
db "SHUCKIE@"
-SpecialReturnShuckle: ; 737e
+Special_ReturnShuckle: ; 737e
farcall SelectMonFromParty
jr c, .refused
@@ -85,10 +86,10 @@ SpecialReturnShuckle: ; 737e
; OT ID
ld a, [hli]
- cp HIGH(00518)
+ cp HIGH(MANIA_OT_ID)
jr nz, .DontReturn
ld a, [hl]
- cp LOW(00518)
+ cp LOW(MANIA_OT_ID)
jr nz, .DontReturn
; OT
@@ -115,28 +116,28 @@ SpecialReturnShuckle: ; 737e
call AddNTimes
ld a, [hl]
cp 150
- ld a, $3
+ ld a, SHUCKIE_HAPPY
jr nc, .HappyToStayWithYou
xor a ; take from pc
ld [wPokemonWithdrawDepositParameter], a
callfar RemoveMonFromPartyOrBox
- ld a, $2
+ ld a, SHUCKIE_RETURNED
.HappyToStayWithYou:
ld [ScriptVar], a
ret
.refused
- ld a, $1
+ ld a, SHUCKIE_REFUSED
ld [ScriptVar], a
ret
.DontReturn:
- xor a
+ xor a ; SHUCKIE_WRONG_MON
ld [ScriptVar], a
ret
.fainted
- ld a, $4
+ ld a, SHUCKIE_FAINTED
ld [ScriptVar], a
ret
@@ -230,6 +231,5 @@ CopyPokemonName_Buffer1_Buffer3: ; 746e
ld bc, PKMN_NAME_LENGTH
jp CopyBytes
-Predef1: ; 747a
-; not used
+DummyPredef1: ; 747a
ret
diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm
index 297725c60..8855555a7 100644
--- a/engine/events/std_scripts.asm
+++ b/engine/events/std_scripts.asm
@@ -1,4 +1,5 @@
StdScripts::
+; entries correspond to constants/std_constants.asm
dba PokecenterNurseScript
dba DifficultBookshelfScript
dba PictureBookshelfScript
@@ -107,13 +108,13 @@ PokecenterNurseScript:
farwritetext NurseTakePokemonText
pause 20
- special TrainerRankings_Healings
+ special Special_StubbedTrainerRankings_Healings
spriteface LAST_TALKED, LEFT
pause 10
special HealParty
playmusic MUSIC_NONE
- writebyte 0 ; Machine is at a Pokemon Center
- special HealMachineAnim
+ writebyte HEALMACHINE_POKECENTER
+ special Special_HealMachineAnim
pause 30
special RestartMapMusic
spriteface LAST_TALKED, DOWN
@@ -123,7 +124,7 @@ PokecenterNurseScript:
iftrue .no
checkflag ENGINE_POKERUS ; nurse already talked about pokerus
iftrue .no
- special SpecialCheckPokerus
+ special Special_CheckPokerus
iftrue .pokerus
.no
@@ -203,7 +204,7 @@ HomepageScript:
Radio1Script:
opentext
writebyte MAPRADIO_POKEMON_CHANNEL
- special MapRadio
+ special Special_MapRadio
closetext
end
@@ -211,7 +212,7 @@ Radio2Script:
; Lucky Channel
opentext
writebyte MAPRADIO_LUCKY_CHANNEL
- special MapRadio
+ special Special_MapRadio
closetext
end
@@ -220,7 +221,7 @@ TrashCanScript: ; 0xbc1a5
PCScript:
opentext
- special PokemonCenterPC
+ special Special_PokemonCenterPC
closetext
end
@@ -250,25 +251,25 @@ DayToTextScript:
if_equal THURSDAY, .Thursday
if_equal FRIDAY, .Friday
if_equal SATURDAY, .Saturday
- stringtotext .SundayText, 0
+ stringtotext .SundayText, MEM_BUFFER_0
end
.Monday:
- stringtotext .MondayText, 0
+ stringtotext .MondayText, MEM_BUFFER_0
end
.Tuesday:
- stringtotext .TuesdayText, 0
+ stringtotext .TuesdayText, MEM_BUFFER_0
end
.Wednesday:
- stringtotext .WednesdayText, 0
+ stringtotext .WednesdayText, MEM_BUFFER_0
end
.Thursday:
- stringtotext .ThursdayText, 0
+ stringtotext .ThursdayText, MEM_BUFFER_0
end
.Friday:
- stringtotext .FridayText, 0
+ stringtotext .FridayText, MEM_BUFFER_0
end
.Saturday:
- stringtotext .SaturdayText, 0
+ stringtotext .SaturdayText, MEM_BUFFER_0
end
.SundayText:
db "SUNDAY@"
@@ -297,7 +298,7 @@ RadioTowerRocketsScript:
clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
specialphonecall SPECIALCALL_WEIRDBROADCAST
- setmapscene MAHOGANY_TOWN, $1
+ setmapscene MAHOGANY_TOWN, 1
end
BugContestResultsWarpScript:
@@ -306,7 +307,7 @@ BugContestResultsWarpScript:
setevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
setevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
- warp ROUTE_36_NATIONAL_PARK_GATE, $0, $4
+ warp ROUTE_36_NATIONAL_PARK_GATE, 0, 4
applymovement PLAYER, Movement_ContestResults_WalkAfterWarp
BugContestResultsScript:
@@ -319,8 +320,8 @@ BugContestResultsScript:
opentext
farwritetext ContestResults_ReadyToJudgeText
waitbutton
- special BugContestJudging
- RAM2MEM $0
+ special Special_BugContestJudging
+ vartomem MEM_BUFFER_0
if_equal 1, BugContestResults_FirstPlace
if_equal 2, BugContestResults_SecondPlace
if_equal 3, BugContestResults_ThirdPlace
@@ -345,17 +346,18 @@ BugContestResults_FinishUp
iffalse BugContestResults_DidNotLeaveMons
farwritetext ContestResults_ReturnPartyText
waitbutton
- special ContestReturnMons
+ special Special_ContestReturnMons
BugContestResults_DidNotLeaveMons
- special CheckPartyFullAfterContest
- if_equal $0, BugContestResults_CleanUp
- if_equal $2, BugContestResults_CleanUp
+ special Special_CheckPartyFullAfterContest
+ if_equal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp
+ if_equal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp
+ ; BUGCONTEST_BOXED_MON
farwritetext ContestResults_PartyFullText
waitbutton
BugContestResults_CleanUp
closetext
- setscene $0
- setmapscene ROUTE_35_NATIONAL_PARK_GATE, $0
+ setscene 0
+ setmapscene ROUTE_35_NATIONAL_PARK_GATE, 0
setevent EVENT_BUG_CATCHING_CONTESTANT_1A
setevent EVENT_BUG_CATCHING_CONTESTANT_2A
setevent EVENT_BUG_CATCHING_CONTESTANT_3A
@@ -383,7 +385,7 @@ BugContestResults_CleanUp
BugContestResults_FirstPlace ; 0xbc31e
setevent EVENT_GAVE_KURT_APRICORNS
- itemtotext SUN_STONE, $1
+ itemtotext SUN_STONE, MEM_BUFFER_1
farwritetext ContestResults_PlayerWonAPrizeText
waitbutton
verbosegiveitem SUN_STONE
@@ -392,7 +394,7 @@ BugContestResults_FirstPlace ; 0xbc31e
; 0xbc332
BugContestResults_SecondPlace ; 0xbc332
- itemtotext EVERSTONE, $1
+ itemtotext EVERSTONE, MEM_BUFFER_1
farwritetext ContestResults_PlayerWonAPrizeText
waitbutton
verbosegiveitem EVERSTONE
@@ -401,7 +403,7 @@ BugContestResults_SecondPlace ; 0xbc332
; 0xbc343
BugContestResults_ThirdPlace ; 0xbc343
- itemtotext GOLD_BERRY, $1
+ itemtotext GOLD_BERRY, MEM_BUFFER_1
farwritetext ContestResults_PlayerWonAPrizeText
waitbutton
verbosegiveitem GOLD_BERRY
@@ -620,7 +622,7 @@ InitializeEventsScript:
return
AskNumber1MScript:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
checkcode VAR_CALLERID
if_equal PHONE_SCHOOLBOY_JACK, .Jack
if_equal PHONE_SAILOR_HUEY, .Huey
@@ -705,7 +707,7 @@ AskNumber1MScript:
end
AskNumber2MScript:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
checkcode VAR_CALLERID
if_equal PHONE_SCHOOLBOY_JACK, .Jack
if_equal PHONE_SAILOR_HUEY, .Huey
@@ -1758,7 +1760,7 @@ RematchGiftFScript:
end
GymStatue1Script:
- mapnametotext $0
+ mapnametotext MEM_BUFFER_0
opentext
farwritetext GymStatue_CityGymText
waitbutton
@@ -1766,7 +1768,7 @@ GymStatue1Script:
end
GymStatue2Script:
- mapnametotext $0
+ mapnametotext MEM_BUFFER_0
opentext
farwritetext GymStatue_CityGymText
buttonsound
@@ -1812,18 +1814,18 @@ CoinVendor_IntroScript: ; 0xbcde0
loadmenudata .MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .Buy50
- if_equal $2, .Buy500
+ if_equal 1, .Buy50
+ if_equal 2, .Buy500
jump .Cancel
; 0xbcdf7
.Buy50: ; 0xbcdf7
- checkcoins 9949
- if_equal $0, .CoinCaseFull
- checkmoney $0, 1000
- if_equal $2, .NotEnoughMoney
+ checkcoins MAX_COINS - 50
+ if_equal HAVE_MORE, .CoinCaseFull
+ checkmoney YOUR_MONEY, 1000
+ if_equal HAVE_LESS, .NotEnoughMoney
givecoins 50
- takemoney $0, 1000
+ takemoney YOUR_MONEY, 1000
waitsfx
playsound SFX_TRANSACTION
farwritetext CoinVendor_Buy50CoinsText
@@ -1832,12 +1834,12 @@ CoinVendor_IntroScript: ; 0xbcde0
; 0xbce1b
.Buy500: ; 0xbce1b
- checkcoins 9499
- if_equal $0, .CoinCaseFull
- checkmoney $0, 10000
- if_equal $2, .NotEnoughMoney
+ checkcoins MAX_COINS - 500
+ if_equal HAVE_MORE, .CoinCaseFull
+ checkmoney YOUR_MONEY, 10000
+ if_equal HAVE_LESS, .NotEnoughMoney
givecoins 500
- takemoney $0, 10000
+ takemoney YOUR_MONEY, 10000
waitsfx
playsound SFX_TRANSACTION
farwritetext CoinVendor_Buy500CoinsText
@@ -1869,8 +1871,7 @@ CoinVendor_IntroScript: ; 0xbcde0
.MenuDataHeader:
db $40 ; flags
- db 04, 00 ; start coords
- db 11, 15 ; end coords
+ menu_coords 0, 4, 15, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -1886,7 +1887,7 @@ CoinVendor_IntroScript: ; 0xbcde0
HappinessCheckScript:
faceplayer
opentext
- special GetFirstPokemonHappiness
+ special Special_GetFirstPokemonHappiness
if_less_than 50, .Unhappy
if_less_than 150, .KindaHappy
farwritetext HappinessText3
diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm
new file mode 100755
index 000000000..780fef2cc
--- /dev/null
+++ b/engine/events/treemons.asm
@@ -0,0 +1,285 @@
+TreeMonEncounter: ; b81ea
+ farcall StubbedTrainerRankings_TreeEncounters
+
+ xor a
+ ld [TempWildMonSpecies], a
+ ld [CurPartyLevel], a
+
+ ld hl, TreeMonMaps
+ call GetTreeMonSet
+ jr nc, .no_battle
+
+ call GetTreeMons
+ jr nc, .no_battle
+
+ call GetTreeMon
+ jr nc, .no_battle
+
+ ld a, BATTLETYPE_TREE
+ ld [BattleType], a
+ ld a, 1
+ ld [ScriptVar], a
+ ret
+
+.no_battle
+ xor a
+ ld [ScriptVar], a
+ ret
+; b8219
+
+RockMonEncounter: ; b8219
+
+ xor a
+ ld [TempWildMonSpecies], a
+ ld [CurPartyLevel], a
+
+ ld hl, RockMonMaps
+ call GetTreeMonSet
+ jr nc, .no_battle
+
+ call GetTreeMons
+ jr nc, .no_battle
+
+ ; 40% chance of an encounter
+ ld a, 10
+ call RandomRange
+ cp 4
+ jr nc, .no_battle
+
+ call SelectTreeMon
+ jr nc, .no_battle
+
+ ret
+
+.no_battle
+ xor a
+ ret
+; b823e
+
+ db $05 ; ????
+
+GetTreeMonSet: ; b823f
+; Return carry and treemon set in a
+; if the current map is in table hl.
+ ld a, [MapNumber]
+ ld e, a
+ ld a, [MapGroup]
+ ld d, a
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .not_in_table
+
+ cp d
+ jr nz, .skip2
+
+ ld a, [hli]
+ cp e
+ jr nz, .skip1
+
+ jr .in_table
+
+.skip2
+ inc hl
+.skip1
+ inc hl
+ jr .loop
+
+.not_in_table
+ xor a
+ ret
+
+.in_table
+ ld a, [hl]
+ scf
+ ret
+; b825e
+
+INCLUDE "data/wild/treemon_maps.asm"
+
+GetTreeMons: ; b82d2
+; Return the address of TreeMon table a in hl.
+; Return nc if table a doesn't exist.
+
+ cp NUM_TREEMON_SETS
+ jr nc, .quit
+
+ and a
+ jr z, .quit
+
+ ld e, a
+ ld d, 0
+ ld hl, TreeMons
+ add hl, de
+ add hl, de
+
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+
+ scf
+ ret
+
+.quit
+ xor a
+ ret
+; b82e8
+
+INCLUDE "data/wild/treemons.asm"
+
+GetTreeMon: ; b83e5
+ push hl
+ call GetTreeScore
+ pop hl
+ and a ; TREEMON_SCORE_BAD
+ jr z, .bad
+ cp TREEMON_SCORE_GOOD
+ jr z, .good
+ cp TREEMON_SCORE_RARE
+ jr z, .rare
+ ret
+
+.bad
+ ; 10% chance of an encounter
+ ld a, 10
+ call RandomRange
+ and a
+ jr nz, NoTreeMon
+ jr SelectTreeMon
+
+.good
+ ; 50% chance of an encounter
+ ld a, 10
+ call RandomRange
+ cp 5
+ jr nc, NoTreeMon
+ jr SelectTreeMon
+
+.rare
+ ; 80% chance of an encounter
+ ld a, 10
+ call RandomRange
+ cp 8
+ jr nc, NoTreeMon
+ jr .skip
+.skip
+ ld a, [hli]
+ cp -1
+ jr nz, .skip
+ call SelectTreeMon
+ ret
+; b841f
+
+SelectTreeMon: ; b841f
+; Read a TreeMons table and pick one monster at random.
+
+ ld a, 100
+ call RandomRange
+.loop
+ sub [hl]
+ jr c, .ok
+ inc hl
+ inc hl
+ inc hl
+ jr .loop
+
+.ok
+ ld a, [hli]
+ cp -1
+ jr z, NoTreeMon
+
+ ld a, [hli]
+ ld [TempWildMonSpecies], a
+ ld a, [hl]
+ ld [CurPartyLevel], a
+ scf
+ ret
+
+NoTreeMon: ; b843b
+ xor a
+ ld [TempWildMonSpecies], a
+ ld [CurPartyLevel], a
+ ret
+; b8443
+
+GetTreeScore: ; b8443
+ call .CoordScore
+ ld [Buffer1], a
+ call .OTIDScore
+ ld [Buffer2], a
+ ld c, a
+ ld a, [Buffer1]
+ sub c
+ jr z, .rare
+ jr nc, .ok
+ add 10
+.ok
+ cp 5
+ jr c, .good
+
+.bad
+ xor a ; TREEMON_SCORE_BAD
+ ret
+
+.good
+ ld a, TREEMON_SCORE_GOOD
+ ret
+
+.rare
+ ld a, TREEMON_SCORE_RARE
+ ret
+; b8466
+
+.CoordScore: ; b8466
+ call GetFacingTileCoord
+ ld hl, 0
+ ld c, e
+ ld b, 0
+ ld a, d
+
+ and a
+ jr z, .next
+.loop
+ add hl, bc
+ dec a
+ jr nz, .loop
+.next
+
+ add hl, bc
+ ld c, d
+ add hl, bc
+
+ ld a, h
+ ld [hDividend], a
+ ld a, l
+ ld [hDividend + 1], a
+ ld a, 5
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+
+ ld a, [hQuotient + 1]
+ ld [hDividend], a
+ ld a, [hQuotient + 2]
+ ld [hDividend + 1], a
+ ld a, 10
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+
+ ld a, [hQuotient + 3]
+ ret
+; b849d
+
+.OTIDScore: ; b849d
+ ld a, [PlayerID]
+ ld [hDividend], a
+ ld a, [PlayerID + 1]
+ ld [hDividend + 1], a
+ ld a, 10
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+ ld a, [hQuotient + 3]
+ ret
+; b84b3
diff --git a/engine/events/crystal_unown.asm b/engine/events/unown_walls.asm
index 09d44bb9a..af7e80bf0 100644
--- a/engine/events/crystal_unown.asm
+++ b/engine/events/unown_walls.asm
@@ -1,4 +1,4 @@
-SpecialHoOhChamber: ; 0x8addb
+Special_HoOhChamber: ; 0x8addb
ld hl, PartySpecies
ld a, [hl]
cp HO_OH ; is Ho-oh the first Pokémon in the party?
@@ -11,7 +11,7 @@ SpecialHoOhChamber: ; 0x8addb
ret
; 0x8adef
-SpecialOmanyteChamber: ; 8adef
+Special_OmanyteChamber: ; 8adef
call GetSecondaryMapHeaderPointer
ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
ld b, CHECK_FLAG
@@ -105,7 +105,7 @@ SpecialKabutoChamber: ; 8ae4e
Special_DisplayUnownWords: ; 8ae68
ld a, [ScriptVar]
- ld hl, .MenuDataHeaders_UnownWalls
+ ld hl, MenuDataHeaders_UnownWalls
and a
jr z, .load
@@ -131,21 +131,21 @@ Special_DisplayUnownWords: ; 8ae68
add hl, de
ld a, [ScriptVar]
ld c, a
- ld de, .UnownText
+ ld de, UnownWalls
and a
jr z, .copy
.loop2
ld a, [de]
inc de
- cp $ff
+ cp -1
jr nz, .loop2
dec c
jr nz, .loop2
.copy
- call .CopyWord
+ call _DisplayUnownWords_CopyWord
ld bc, AttrMap - TileMap
add hl, bc
- call .FillAttr
+ call _DisplayUnownWords_FillAttr
call WaitBGMap2
call JoyWaitAorB
call PlayClickSFX
@@ -153,66 +153,9 @@ Special_DisplayUnownWords: ; 8ae68
ret
; 8aebc
-unownwall: MACRO
-rept _NARG
-if \1 == "-"
-x = $64
-else
-if \1 >= "Y"
-x = 2 * (\1 - "Y") + $60
-else
-if \1 >= "Q"
-x = 2 * (\1 - "Q") + $40
-else
-if \1 >= "I"
-x = 2 * (\1 - "I") + $20
-else
-x = 2 * (\1 - "A")
-endc
-endc
-endc
-endc
- db x
-shift
-endr
- db $ff
-ENDM
-
-.UnownText: ; 8aebc
-;.UnownText_Escape:
- ; db $08, $44, $04, $00, $2e, $08, $ff
- unownwall "E", "S", "C", "A", "P", "E"
-;.UnownText_Light:
- ; db $26, $20, $0c, $0e, $46, $ff
- unownwall "L", "I", "G", "H", "T"
-;.UnownText_Water:
- ; db $4c, $00, $46, $08, $42, $ff
- unownwall "W", "A", "T", "E", "R"
-;.UnownText_Ho_Oh:
- ; db $0e, $2c, $64, $2c, $0e, $ff
- unownwall "H", "O", "-", "O", "H"
-; 8aed5
-
-.MenuDataHeaders_UnownWalls: ; 0x8aed5
-;.MenuDataHeader_Escape:
- db $40 ; flags
- db 04, 03 ; start coords
- db 09, 16 ; end coords
-;.MenuDataHeader_Light:
- db $40 ; flags
- db 04, 04 ; start coords
- db 09, 15 ; end coords
-;.MenuDataHeader_Water:
- db $40 ; flags
- db 04, 04 ; start coords
- db 09, 15 ; end coords
-;.MenuDataHeader_Ho_Oh:
- db $40 ; flags
- db 04, 04 ; start coords
- db 09, 15 ; end coords
-; 8aee9
+INCLUDE "data/unown_walls.asm"
-.FillAttr: ; 8aee9
+_DisplayUnownWords_FillAttr: ; 8aee9
ld a, [de]
cp $ff
ret z
@@ -226,7 +169,7 @@ ENDM
inc hl
inc hl
inc de
- jr .FillAttr
+ jr _DisplayUnownWords_FillAttr
; 8aefd
.PlaceSquare: ; 8aefd
@@ -242,7 +185,7 @@ ENDM
ret
; 8af09
-.CopyWord: ; 8af09
+_DisplayUnownWords_CopyWord: ; 8af09
push hl
push de
.word_loop
diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm
index a9d6f900e..aa629682f 100755
--- a/engine/events/whiteout.asm
+++ b/engine/events/whiteout.asm
@@ -4,13 +4,13 @@ Script_BattleWhiteout:: ; 0x124c1
; 0x124c8
Script_OverworldWhiteout:: ; 0x124c8
- refreshscreen $0
+ refreshscreen
callasm OverworldBGMap
Script_Whiteout: ; 0x124ce
writetext .WhitedOutText
waitbutton
- special FadeOutPalettes
+ special Special_FadeOutPalettes
pause 40
special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER
@@ -18,7 +18,7 @@ Script_Whiteout: ; 0x124ce
callasm HalveMoney
callasm GetWhiteoutSpawn
farscall Script_AbortBugContest
- special WarpToSpawnPoint
+ special Special_WarpToSpawnPoint
newloadmap MAPSETUP_WARP
end_all
@@ -49,7 +49,7 @@ BattleBGMap: ; 1250a
; 12513
HalveMoney: ; 12513
- farcall TrainerRankings_WhiteOuts
+ farcall StubbedTrainerRankings_WhiteOuts
; Halve the player's money.
ld hl, Money
diff --git a/engine/events_2.asm b/engine/events_2.asm
index cac736bab..e4458d9aa 100644
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -1,7 +1,7 @@
; More overworld event handling.
-WarpToSpawnPoint:: ; 97c28
+Special_WarpToSpawnPoint:: ; 97c28
ld hl, wStatusFlags2
res 1, [hl] ; safari zone?
res 2, [hl] ; bug contest
@@ -361,7 +361,7 @@ HandleCmdQueue:: ; 97e08
ret
; 97e25
-GetNthCmdQueueEntry: ; 97e25 unreferenced
+Unreferenced_GetNthCmdQueueEntry: ; 97e25
ld hl, wCmdQueue
ld bc, CMDQUEUE_ENTRY_SIZE
call AddNTimes
diff --git a/engine/events_3.asm b/engine/events_3.asm
deleted file mode 100755
index 5ee113a95..000000000
--- a/engine/events_3.asm
+++ /dev/null
@@ -1,689 +0,0 @@
-ReturnFromMapSetupScript:: ; b8000
- xor a
- ld [hBGMapMode], a
- ; For some reson, GameFreak chose to use a farcall here instead of just falling through.
- ; No other function in the game references the function at 2E:400A, here labeled
- ; ReturnFromMapSetupScript.inefficient_farcall.
- farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
- ret
-; b800a
-
-.inefficient_farcall ; b800a
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetWorldMapLocation
- ld [wCurrentLandmark], a
- call .CheckNationalParkGate
- jr z, .nationalparkgate
-
- call GetMapEnvironment
- cp GATE
- jr nz, .not_gate
-
-.nationalparkgate
- ld a, -1
- ld [wCurrentLandmark], a
-
-.not_gate
- ld hl, wEnteredMapFromContinue
- bit 1, [hl]
- res 1, [hl]
- jr nz, .dont_do_map_sign
-
- call .CheckMovingWithinLandmark
- jr z, .dont_do_map_sign
- ld a, [wCurrentLandmark]
- ld [wPreviousLandmark], a
-
- call .CheckSpecialMap
- jr z, .dont_do_map_sign
-
-; Display for 60 frames
- ld a, 60
- ld [wLandmarkSignTimer], a
- call LoadMapNameSignGFX
- call InitMapNameFrame
- farcall HDMATransfer_OnlyTopFourRows
- ret
-
-.dont_do_map_sign
- ld a, [wCurrentLandmark]
- ld [wPreviousLandmark], a
- ld a, $90
- ld [rWY], a
- ld [hWY], a
- xor a
- ld [hLCDCPointer], a
- ret
-; b8064
-
-.CheckMovingWithinLandmark: ; b8064
- ld a, [wCurrentLandmark]
- ld c, a
- ld a, [wPreviousLandmark]
- cp c
- ret z
- cp SPECIAL_MAP
- ret
-; b8070
-
-.CheckSpecialMap: ; b8070
- cp -1
- ret z
- cp SPECIAL_MAP
- ret z
- cp RADIO_TOWER
- ret z
- cp LAV_RADIO_TOWER
- ret z
- cp UNDERGROUND_PATH
- ret z
- cp INDIGO_PLATEAU
- ret z
- cp POWER_PLANT
- ret z
- ld a, $1
- and a
- ret
-; b8089
-
-.CheckNationalParkGate: ; b8089
- ld a, [MapGroup]
- cp GROUP_ROUTE_35_NATIONAL_PARK_GATE
- ret nz
- ld a, [MapNumber]
- cp MAP_ROUTE_35_NATIONAL_PARK_GATE
- ret z
- cp MAP_ROUTE_36_NATIONAL_PARK_GATE
- ret
-; b8098
-
-
-PlaceMapNameSign:: ; b8098 (2e:4098)
- ld hl, wLandmarkSignTimer
- ld a, [hl]
- and a
- jr z, .disappear
- dec [hl]
- cp 60
- ret z
- cp 59
- jr nz, .skip2
- call InitMapNameFrame
- call PlaceMapNameCenterAlign
- farcall HDMATransfer_OnlyTopFourRows
-.skip2
- ld a, $80
- ld a, $70
- ld [rWY], a
- ld [hWY], a
- ret
-
-.disappear
- ld a, $90
- ld [rWY], a
- ld [hWY], a
- xor a
- ld [hLCDCPointer], a
- ret
-
-
-LoadMapNameSignGFX: ; b80c6
- ld de, MapEntryFrameGFX
- ld hl, vTiles2 tile $60
- lb bc, BANK(MapEntryFrameGFX), $e
- call Get2bpp
- ret
-; b80d3
-
-InitMapNameFrame: ; b80d3
- hlcoord 0, 0
- ld b, 2
- ld c, 18
- call InitMapSignAttrMap
- call PlaceMapNameFrame
- ret
-; b80e1
-
-
-PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
- ld a, [wCurrentLandmark]
- ld e, a
- farcall GetLandmarkName
- call .GetNameLength
- ld a, SCREEN_WIDTH
- sub c
- srl a
- ld b, $0
- ld c, a
- hlcoord 0, 2
- add hl, bc
- ld de, StringBuffer1
- call PlaceString
- ret
-
-.GetNameLength: ; b8101 (2e:4101)
- ld c, 0
- push hl
- ld hl, StringBuffer1
-.loop
- ld a, [hli]
- cp "@"
- jr z, .stop
- cp "%"
- jr z, .loop
- inc c
- jr .loop
-.stop
- pop hl
- ret
-
-
-InitMapSignAttrMap: ; b8115
- ld de, AttrMap - TileMap
- add hl, de
- inc b
- inc b
- inc c
- inc c
- ld a, $87
-.loop
- push bc
- push hl
-.inner_loop
- ld [hli], a
- dec c
- jr nz, .inner_loop
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- pop bc
- dec b
- jr nz, .loop
- ret
-; b812f
-
-PlaceMapNameFrame: ; b812f
- hlcoord 0, 0
- ; top left
- ld a, $61
- ld [hli], a
- ; top row
- ld a, $62
- call .FillTopBottom
- ; top right
- ld a, $64
- ld [hli], a
- ; left, first line
- ld a, $65
- ld [hli], a
- ; first line
- call .FillMiddle
- ; right, first line
- ld a, $6b
- ld [hli], a
- ; left, second line
- ld a, $66
- ld [hli], a
- ; second line
- call .FillMiddle
- ; right, second line
- ld a, $6c
- ld [hli], a
- ; bottom left
- ld a, $67
- ld [hli], a
- ; bottom
- ld a, $68
- call .FillTopBottom
- ; bottom right
- ld a, $6a
- ld [hl], a
- ret
-; b815b
-
-.FillMiddle: ; b815b
- ld c, 18
- ld a, $6d
-.loop
- ld [hli], a
- dec c
- jr nz, .loop
- ret
-; b8164
-
-.FillTopBottom: ; b8164
- ld c, 5
- jr .enterloop
-
-.continueloop
- ld [hli], a
- ld [hli], a
-
-.enterloop
- inc a
- ld [hli], a
- ld [hli], a
- dec a
- dec c
- jr nz, .continueloop
- ret
-; b8172
-
-CheckForHiddenItems: ; b8172
-; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry.
- call GetMapScriptHeaderBank
- ld [Buffer1], a
-; Get the coordinate of the bottom right corner of the screen, and load it in Buffer3/Buffer4.
- ld a, [XCoord]
- add SCREEN_WIDTH / 4
- ld [Buffer4], a
- ld a, [YCoord]
- add SCREEN_HEIGHT / 4
- ld [Buffer3], a
-; Get the pointer for the first BG event header in the map...
- ld hl, wCurrMapBGEventHeaderPointer
- ld a, [hli]
- ld h, [hl]
- ld l, a
-; ... before even checking to see if there are any BG events on this map.
- ld a, [wCurrMapBGEventCount]
- and a
- jr z, .nobgeventitems
-; For i = 1:wCurrMapBGEventCount...
-.loop
-; Store the counter in Buffer2, and store the BG event header pointer in the stack.
- ld [Buffer2], a
- push hl
-; Get the Y coordinate of the BG event.
- call .GetFarByte
- ld e, a
-; Is the Y coordinate of the BG event on the screen? If not, go to the next BG event.
- ld a, [Buffer3]
- sub e
- jr c, .next
- cp SCREEN_HEIGHT / 2
- jr nc, .next
-; Is the X coordinate of the BG event on the screen? If not, go to the next BG event.
- call .GetFarByte
- ld d, a
- ld a, [Buffer4]
- sub d
- jr c, .next
- cp SCREEN_WIDTH / 2
- jr nc, .next
-; Is this BG event a hidden item? If not, go to the next BG event.
- call .GetFarByte
- cp BGEVENT_ITEM
- jr nz, .next
-; Has this item already been found? If not, set off the Itemfinder.
- ld a, [Buffer1]
- call GetFarHalfword
- ld a, [Buffer1]
- call GetFarHalfword
- ld d, h
- ld e, l
- ld b, CHECK_FLAG
- call EventFlagAction
- ld a, c
- and a
- jr z, .itemnearby
-
-.next
-; Restore the BG event header pointer and increment it by the length of a BG event header.
- pop hl
- ld bc, 5
- add hl, bc
-; Restore the BG event counter and decrement it. If it hits zero, there are no hidden items in range.
- ld a, [Buffer2]
- dec a
- jr nz, .loop
-
-.nobgeventitems
- xor a
- ret
-
-.itemnearby
- pop hl
- scf
- ret
-; b81e2
-
-.GetFarByte: ; b81e2
- ld a, [Buffer1]
- call GetFarByte
- inc hl
- ret
-; b81ea
-
-
-TreeMonEncounter: ; b81ea
- farcall TrainerRankings_TreeEncounters
-
- xor a
- ld [TempWildMonSpecies], a
- ld [CurPartyLevel], a
-
- ld hl, TreeMonMaps
- call GetTreeMonSet
- jr nc, .no_battle
-
- call GetTreeMons
- jr nc, .no_battle
-
- call GetTreeMon
- jr nc, .no_battle
-
- ld a, BATTLETYPE_TREE
- ld [BattleType], a
- ld a, 1
- ld [ScriptVar], a
- ret
-
-.no_battle
- xor a
- ld [ScriptVar], a
- ret
-; b8219
-
-RockMonEncounter: ; b8219
-
- xor a
- ld [TempWildMonSpecies], a
- ld [CurPartyLevel], a
-
- ld hl, RockMonMaps
- call GetTreeMonSet
- jr nc, .no_battle
-
- call GetTreeMons
- jr nc, .no_battle
-
- ld a, 10
- call RandomRange
- cp 4
- jr nc, .no_battle
-
- call SelectTreeMon
- jr nc, .no_battle
-
- ret
-
-.no_battle
- xor a
- ret
-; b823e
-
- db $05 ; ????
-
-GetTreeMonSet: ; b823f
-; Return carry and treemon set in a
-; if the current map is in table hl.
- ld a, [MapNumber]
- ld e, a
- ld a, [MapGroup]
- ld d, a
-.loop
- ld a, [hli]
- cp -1
- jr z, .not_in_table
-
- cp d
- jr nz, .skip2
-
- ld a, [hli]
- cp e
- jr nz, .skip1
-
- jr .in_table
-
-.skip2
- inc hl
-.skip1
- inc hl
- jr .loop
-
-.not_in_table
- xor a
- ret
-
-.in_table
- ld a, [hl]
- scf
- ret
-; b825e
-
-INCLUDE "data/wild/treemon_maps.asm"
-
-GetTreeMons: ; b82d2
-; Return the address of TreeMon table a in hl.
-; Return nc if table a doesn't exist.
-
- cp 8
- jr nc, .quit
-
- and a
- jr z, .quit
-
- ld e, a
- ld d, 0
- ld hl, TreeMons
- add hl, de
- add hl, de
-
- ld a, [hli]
- ld h, [hl]
- ld l, a
-
- scf
- ret
-
-.quit
- xor a
- ret
-; b82e8
-
-INCLUDE "data/wild/treemons.asm"
-
-GetTreeMon: ; b83e5
- push hl
- call GetTreeScore
- pop hl
- and a
- jr z, .bad
- cp 1
- jr z, .good
- cp 2
- jr z, .rare
- ret
-
-.bad
- ld a, 10
- call RandomRange
- and a
- jr nz, NoTreeMon
- jr SelectTreeMon
-
-.good
- ld a, 10
- call RandomRange
- cp 5
- jr nc, NoTreeMon
- jr SelectTreeMon
-
-.rare
- ld a, 10
- call RandomRange
- cp 8
- jr nc, NoTreeMon
- jr .skip
-.skip
- ld a, [hli]
- cp -1
- jr nz, .skip
- call SelectTreeMon
- ret
-; b841f
-
-SelectTreeMon: ; b841f
-; Read a TreeMons table and pick one monster at random.
-
- ld a, 100
- call RandomRange
-.loop
- sub [hl]
- jr c, .ok
- inc hl
- inc hl
- inc hl
- jr .loop
-
-.ok
- ld a, [hli]
- cp $ff
- jr z, NoTreeMon
-
- ld a, [hli]
- ld [TempWildMonSpecies], a
- ld a, [hl]
- ld [CurPartyLevel], a
- scf
- ret
-
-NoTreeMon: ; b843b
- xor a
- ld [TempWildMonSpecies], a
- ld [CurPartyLevel], a
- ret
-; b8443
-
-GetTreeScore: ; b8443
- call .CoordScore
- ld [Buffer1], a
- call .OTIDScore
- ld [Buffer2], a
- ld c, a
- ld a, [Buffer1]
- sub c
- jr z, .rare
- jr nc, .ok
- add 10
-.ok
- cp 5
- jr c, .good
-
-.bad
- xor a
- ret
-
-.good
- ld a, 1
- ret
-
-.rare
- ld a, 2
- ret
-; b8466
-
-.CoordScore: ; b8466
- call GetFacingTileCoord
- ld hl, 0
- ld c, e
- ld b, 0
- ld a, d
-
- and a
- jr z, .next
-.loop
- add hl, bc
- dec a
- jr nz, .loop
-.next
-
- add hl, bc
- ld c, d
- add hl, bc
-
- ld a, h
- ld [hDividend], a
- ld a, l
- ld [hDividend + 1], a
- ld a, 5
- ld [hDivisor], a
- ld b, 2
- call Divide
-
- ld a, [hQuotient + 1]
- ld [hDividend], a
- ld a, [hQuotient + 2]
- ld [hDividend + 1], a
- ld a, 10
- ld [hDivisor], a
- ld b, 2
- call Divide
-
- ld a, [hQuotient + 3]
- ret
-; b849d
-
-.OTIDScore: ; b849d
- ld a, [PlayerID]
- ld [hDividend], a
- ld a, [PlayerID + 1]
- ld [hDividend + 1], a
- ld a, 10
- ld [hDivisor], a
- ld b, 2
- call Divide
- ld a, [hQuotient + 3]
- ret
-; b84b3
-
-LoadFishingGFX: ; b84b3
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
-
- ld de, FishingGFX
- ld a, [wPlayerGender]
- bit 0, a
- jr z, .got_gender
- ld de, KrisFishingGFX
-.got_gender
-
- ld hl, vTiles0 tile $02
- call .LoadGFX
- ld hl, vTiles0 tile $06
- call .LoadGFX
- ld hl, vTiles0 tile $0a
- call .LoadGFX
- ld hl, vTiles1 tile $7c
- call .LoadGFX
-
- pop af
- ld [rVBK], a
- ret
-; b84e3
-
-.LoadGFX: ; b84e3
- lb bc, BANK(FishingGFX), 2
- push de
- call Get2bpp
- pop de
- ld hl, 2 tiles
- add hl, de
- ld d, h
- ld e, l
- ret
-; b84f2
-
-FishingGFX: ; b84f2
-INCBIN "gfx/overworld/chris_fish.2bpp"
-; b8582
-
-KrisFishingGFX: ; b8582
-INCBIN "gfx/overworld/kris_fish.2bpp"
-; b8612
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm
index 1fa55c10a..365f4e729 100755
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -122,7 +122,7 @@ EvolutionAnimation: ; 4e5e1
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_EVOLVE
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
pop af
ld [CurPartySpecies], a
@@ -168,7 +168,7 @@ EvolutionAnimation: ; 4e5e1
ld a, $1
ld [wBoxAlignment], a
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
xor a
ld [wBoxAlignment], a
ret
@@ -346,15 +346,15 @@ EvolutionAnimation: ; 4e5e1
inc a
and $7
ld b, a
- ld hl, Sprites + 3 ; attributes
- ld c, 40
+ ld hl, Sprite01Attributes
+ ld c, NUM_SPRITE_OAM_STRUCTS
.loop6
ld a, [hl]
or b
- ld [hli], a
- inc hl
- inc hl
+ ld [hli], a ; attributes
+rept SPRITEOAMSTRUCT_LENGTH +- 1
inc hl
+endr
dec c
jr nz, .loop6
pop bc
diff --git a/engine/evolve.asm b/engine/evolve.asm
index c335229d6..877dd9031 100755
--- a/engine/evolve.asm
+++ b/engine/evolve.asm
@@ -6,7 +6,7 @@ EvolvePokemon: ; 421d8
ld c, a
ld b, SET_FLAG
call EvoFlagAction
-EvolveAfterBattle: ; 421e6
+Predef_EvolveAfterBattle: ; 421e6
xor a
ld [wMonTriedToEvolve], a
dec a
@@ -55,7 +55,7 @@ EvolveAfterBattle_MasterLoop
push hl
xor a
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
pop hl
.loop
@@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop
push hl
ld hl, Text_EvolvedIntoPKMN
call PrintTextBoxText
- farcall TrainerRankings_MonsEvolved
+ farcall StubbedTrainerRankings_MonsEvolved
ld de, MUSIC_NONE
call PlayMusic
@@ -265,7 +265,7 @@ EvolveAfterBattle_MasterLoop
ld hl, TempMonExp + 2
ld de, TempMonMaxHP
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
ld a, [CurPartyMon]
ld hl, PartyMons
@@ -301,7 +301,7 @@ EvolveAfterBattle_MasterLoop
ld [wd265], a
xor a
ld [MonType], a
- call LearnLevelMoves
+ call Predef_LearnLevelMoves
ld a, [wd265]
dec a
call SetSeenAndCaughtMon
@@ -311,7 +311,7 @@ EvolveAfterBattle_MasterLoop
jr nz, .skip_unown
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
.skip_unown
@@ -333,7 +333,7 @@ EvolveAfterBattle_MasterLoop
inc hl
jp .loop
-; XXX
+; unused
pop hl
.ReturnToMap:
pop de
@@ -429,7 +429,7 @@ Text_WhatEvolving: ; 0x42482
; 0x42487
-LearnLevelMoves: ; 42487
+Predef_LearnLevelMoves: ; 42487
ld a, [wd265]
ld [CurPartySpecies], a
dec a
@@ -484,7 +484,7 @@ LearnLevelMoves: ; 42487
ld [wd265], a
call GetMoveName
call CopyName1
- predef LearnMove
+ predef Predef_LearnMove
pop hl
jr .find_move
@@ -495,7 +495,7 @@ LearnLevelMoves: ; 42487
; 424e1
-FillMoves: ; 424e1
+Predef_FillMoves: ; 424e1
; Fill in moves at de for CurPartySpecies at CurPartyLevel
push hl
@@ -621,7 +621,7 @@ ShiftMoves: ; 4256e
EvoFlagAction: ; 42577
push de
ld d, $0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop de
ret
; 42581
diff --git a/engine/health.asm b/engine/health.asm
index 0f7ba156d..eba75ddf4 100755
--- a/engine/health.asm
+++ b/engine/health.asm
@@ -52,7 +52,7 @@ HealPartyMon: ; c677
farcall RestoreAllPP
ret
-ComputeHPBarPixels: ; c699
+Predef_ComputeHPBarPixels: ; c699
; e = bc * (6 * 8) / de
ld a, b
or c
@@ -103,7 +103,7 @@ ComputeHPBarPixels: ; c699
ld e, 0
ret
-AnimateHPBar: ; c6e0
+Predef_AnimateHPBar: ; c6e0
call WaitBGMap
call _AnimateHPBar
call WaitBGMap
diff --git a/engine/init_gender.asm b/engine/init_gender.asm
index 2cb664072..0fb094ba8 100755
--- a/engine/init_gender.asm
+++ b/engine/init_gender.asm
@@ -45,8 +45,7 @@ InitGender: ; 48dcb (12:4dcb)
.MenuDataHeader: ; 0x48dfc
db $40 ; flags
- db 04, 06 ; start coords
- db 09, 12 ; end coords
+ menu_coords 6, 4, 12, 9
dw .MenuData2
db 1 ; default option
; 0x48e04
@@ -97,10 +96,7 @@ LoadGenderScreenPal: ; 48e47 (12:4e47)
; 48e5c (12:4e5c)
.Palette: ; 48e5c
- RGB 31, 31, 31
- RGB 09, 30, 31
- RGB 01, 11, 31
- RGB 00, 00, 00
+INCLUDE "gfx/intro/gender_screen.pal"
; 48e64
LoadGenderScreenLightBlueTile: ; 48e64 (12:4e64)
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index 441119342..d897617fb 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -10,7 +10,7 @@ _MainMenu: ; 5ae8
jp StartTitleScreen
; 5b04
-; unreferenced
+; unused
ret
; 5b05
@@ -554,8 +554,7 @@ Continue_LoadMenuHeader: ; 5ebf
.MenuDataHeader_Dex: ; 5ed9
db $40 ; flags
- db 00, 00 ; start coords
- db 09, 15 ; end coords
+ menu_coords 0, 0, 15, 9
dw .MenuData2_Dex
db 1 ; default option
; 5ee1
@@ -571,8 +570,7 @@ Continue_LoadMenuHeader: ; 5ebf
.MenuDataHeader_NoDex: ; 5efb
db $40 ; flags
- db 00, 00 ; start coords
- db 09, 15 ; end coords
+ menu_coords 0, 0, 15, 9
dw .MenuData2_NoDex
db 1 ; default option
; 5f03
@@ -827,7 +825,7 @@ NamePlayer: ; 0x6074
db "KRIS@@@@@@@"
; 60e9
-Function60e9: ; Unreferenced
+Unreferenced_Function60e9:
call LoadMenuDataHeader
call VerticalMenu
ld a, [wMenuCursorY]
@@ -853,7 +851,7 @@ ShrinkPlayer: ; 610f
ld a, [hROMBank]
push af
- ld a, 0 << 7 | 32 ; fade out
+ ld a, 32 ; fade time
ld [MusicFade], a
ld de, MUSIC_NONE
ld a, e
@@ -943,24 +941,24 @@ Intro_WipeInFrontpic: ; 6182
Intro_PrepTrainerPic: ; 619c
ld de, vTiles2
- farcall GetTrainerPic
+ farcall Predef_GetTrainerPic
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 61b4
ShrinkFrame: ; 61b4
ld de, vTiles2
ld c, $31
- predef DecompressPredef
+ predef Predef_Decompress
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 61cd
@@ -971,7 +969,7 @@ Intro_PlacePlayerSprite: ; 61cd
ld hl, vTiles0
call Request2bpp
- ld hl, Sprites
+ ld hl, Sprite01
ld de, .sprites
ld a, [de]
inc de
@@ -980,19 +978,19 @@ Intro_PlacePlayerSprite: ; 61cd
.loop
ld a, [de]
inc de
- ld [hli], a
+ ld [hli], a ; y
ld a, [de]
inc de
- ld [hli], a
+ ld [hli], a ; x
ld a, [de]
inc de
- ld [hli], a
+ ld [hli], a ; tile id
- ld b, 0
+ ld b, PAL_OW_RED
ld a, [wPlayerGender]
bit 0, a
jr z, .male
- ld b, 1
+ ld b, PAL_OW_BLUE
.male
ld a, b
@@ -1004,6 +1002,7 @@ Intro_PlacePlayerSprite: ; 61cd
.sprites ; 61fe
db 4
+ ; y pxl, x pxl, tile offset
db 9 * 8 + 4, 9 * 8, 0
db 9 * 8 + 4, 10 * 8, 1
db 10 * 8 + 4, 9 * 8, 2
@@ -1094,7 +1093,7 @@ RunTitleScreen: ; 627b
ret
; 6292
-Function6292: ; 6292 ; unreferenced
+Unreferenced_Function6292: ; 6292
ld a, [hVBlankCounter]
and $7
ret nz
@@ -1125,7 +1124,7 @@ TitleScreenScene: ; 62a3
dw TitleScreenEnd
; 62b7
-.NextScene: ; Unreferenced
+.Unreferenced_NextScene:
ld hl, wJumptableIndex
inc [hl]
ret
@@ -1329,10 +1328,10 @@ ResetClock: ; 6392
jp Init
; 639b
-Function639b: ; unreferenced
+Unreferenced_Function639b:
; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
ld a, [wTitleScreenTimer]
- and $3
+ and %00000011
ret nz
ld bc, SpriteAnim10
ld hl, SPRITEANIMSTRUCT_FRAME
@@ -1377,7 +1376,7 @@ Copyright: ; 63e2
call LoadFontsExtra
ld de, CopyrightGFX
ld hl, vTiles2 tile $60
- lb bc, BANK(CopyrightGFX), $1d
+ lb bc, BANK(CopyrightGFX), 29
call Request2bpp
hlcoord 2, 7
ld de, CopyrightString
diff --git a/engine/item_effects.asm b/engine/item_effects.asm
index 90dfdc7e0..a15e01247 100644
--- a/engine/item_effects.asm
+++ b/engine/item_effects.asm
@@ -415,7 +415,7 @@ ParkBall: ; e8a2
ld [hBattleTurn], a
ld [Buffer2], a
ld [wNumHits], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
ld a, [wWildMon]
and a
@@ -517,7 +517,7 @@ ParkBall: ; e8a2
cp BATTLETYPE_TUTORIAL
jp z, .FinishTutorial
- farcall TrainerRankings_WildMonsCaught
+ farcall StubbedTrainerRankings_WildMonsCaught
ld hl, Text_GotchaMonWasCaught
call PrintText
@@ -547,7 +547,7 @@ ParkBall: ; e8a2
ld a, [EnemyMonSpecies]
ld [wd265], a
- predef NewPokedexEntry
+ predef Predef_NewPokedexEntry
.skip_pokedex
ld a, [BattleType]
@@ -567,7 +567,7 @@ ParkBall: ; e8a2
ld [MonType], a
call ClearSprites
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
farcall SetCaughtData
@@ -623,7 +623,7 @@ ParkBall: ; e8a2
.SendToPC:
call ClearSprites
- predef SentPkmnIntoBox
+ predef Predef_SendPkmnIntoBox
farcall SetBoxMonCaughtData
@@ -748,7 +748,7 @@ BallMultiplierFunctionTable:
dbw MOON_BALL, MoonBallMultiplier
dbw LOVE_BALL, LoveBallMultiplier
dbw PARK_BALL, ParkBallMultiplier
- db $ff
+ db -1 ; end
UltraBallMultiplier:
; multiply catch rate by 2
@@ -775,7 +775,7 @@ GetPokedexEntryBank:
ld a, [EnemyMonSpecies]
rlca
rlca
- and 3
+ maskbits NUM_DEX_ENTRY_BANKS +- 1
ld hl, .PokedexEntryBanks
ld d, 0
ld e, a
@@ -786,12 +786,6 @@ GetPokedexEntryBank:
ret
.PokedexEntryBanks:
-
-GLOBAL PokedexEntries1
-GLOBAL PokedexEntries2
-GLOBAL PokedexEntries3
-GLOBAL PokedexEntries4
-
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)
@@ -985,7 +979,7 @@ LoveBallMultiplier:
ld [MonType], a
ld a, [CurBattleMon]
ld [CurPartyMon], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .done1 ; no effect on genderless
ld d, 0 ; male
@@ -999,7 +993,7 @@ LoveBallMultiplier:
ld [CurPartySpecies], a
ld a, WILDMON
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
jr c, .done2 ; no effect on genderless
ld d, 0 ; male
@@ -1289,7 +1283,7 @@ UpdateStatsAfterItem: ; ee8c
ld a, MON_STAT_EXP - 1
call GetPartyParamLocation
ld b, $1
- predef_jump CalcPkmnStats
+ predef_jump Predef_CalcPkmnStats
; ee9f
RareCandy_StatBooster_ExitMenu: ; ee9f
@@ -1428,7 +1422,7 @@ RareCandy: ; ef14
xor a ; PARTYMON
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
hlcoord 9, 0
ld b, 10
@@ -1436,8 +1430,8 @@ RareCandy: ; ef14
call TextBox
hlcoord 11, 1
- ld bc, $0004
- predef PrintTempMonStats
+ ld bc, 4
+ predef Predef_PrintTempMonStats
call WaitPressAorB_BlinkCursor
@@ -1445,7 +1439,7 @@ RareCandy: ; ef14
ld [MonType], a
ld a, [CurPartySpecies]
ld [wd265], a
- predef LearnLevelMoves
+ predef Predef_LearnLevelMoves
xor a
ld [wForceEvolution], a
@@ -1576,7 +1570,7 @@ HealStatus: ; f030 (3:7030)
GetItemHealingAction: ; f058 (3:7058)
push hl
ld a, [CurItem]
- ld hl, .healingactions
+ ld hl, StatusHealingActions
ld bc, 3
.next
cp [hl]
@@ -1595,24 +1589,7 @@ GetItemHealingAction: ; f058 (3:7058)
ret
; f071 (3:7071)
-.healingactions ; f071
-; item, party menu action text, status
- db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
- db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
- db ICE_HEAL, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
- db AWAKENING, PARTYMENUTEXT_HEAL_SLP, SLP
- db PARLYZ_HEAL, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
- db FULL_HEAL, PARTYMENUTEXT_HEAL_ALL, %11111111
- db FULL_RESTORE, PARTYMENUTEXT_HEAL_ALL, %11111111
- db HEAL_POWDER, PARTYMENUTEXT_HEAL_ALL, %11111111
- db PSNCUREBERRY, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
- db PRZCUREBERRY, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
- db BURNT_BERRY, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
- db ICE_BERRY, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
- db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP
- db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111
- db -1, 0, 0
-; f09e
+INCLUDE "data/items/heal_status.asm"
StatusHealer_Jumptable: ; f09e (3:709e)
ld hl, .dw
@@ -1668,7 +1645,7 @@ RevivePokemon: ; f0d6
ld d, 0
ld hl, wBattleParticipantsIncludingFainted
ld b, CHECK_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
jr z, .skip_to_revive
@@ -1677,7 +1654,7 @@ RevivePokemon: ; f0d6
ld c, a
ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
.skip_to_revive
xor a
@@ -1844,7 +1821,7 @@ HealHP_SFX_GFX: ; f1db (3:71db)
call AddNTimes
ld a, $2
ld [wWhichHPBar], a
- predef_jump AnimateHPBar
+ predef_jump Predef_AnimateHPBar
UseItem_SelectMon: ; f1f9 (3:71f9)
call .SelectMon
@@ -2118,7 +2095,7 @@ GetOneFifthMaxHP: ; f378 (3:7378)
GetHealingItemAmount: ; f395 (3:7395)
push hl
ld a, [CurItem]
- ld hl, .Healing
+ ld hl, HealingHPAmounts
ld d, a
.next
ld a, [hli]
@@ -2140,24 +2117,7 @@ GetHealingItemAmount: ; f395 (3:7395)
ret
; f3af (3:73af)
-.Healing: ; f3af
- dbw FRESH_WATER, 50
- dbw SODA_POP, 60
- dbw LEMONADE, 80
- dbw HYPER_POTION, 200
- dbw SUPER_POTION, 50
- dbw POTION, 20
- dbw MAX_POTION, MAX_STAT_VALUE
- dbw FULL_RESTORE, MAX_STAT_VALUE
- dbw MOOMOO_MILK, 100
- dbw BERRY, 10
- dbw GOLD_BERRY, 30
- dbw ENERGYPOWDER, 50
- dbw ENERGY_ROOT, 200
- dbw RAGECANDYBAR, 20
- dbw BERRY_JUICE, 20
- dbw -1, 0
-; f3df
+INCLUDE "data/items/heal_hp.asm"
Softboiled_MilkDrinkFunction: ; f3df (3:73df)
; Softboiled/Milk Drink in the field
@@ -2291,7 +2251,7 @@ PokeDoll: ; f48f
inc a
ld [wForcedSwitch], a
ld a, [wBattleResult]
- and 3 << 6
+ and $c0
or $2
ld [wBattleResult], a
jp UseItemText
@@ -2328,7 +2288,7 @@ XSpecial: ; f4c5
call UseItemText
ld a, [CurItem]
- ld hl, .x_item_table
+ ld hl, XItemStats
.loop
cp [hl]
@@ -2357,12 +2317,7 @@ XSpecial: ; f4c5
ret
; f504
-.x_item_table ; f504
- db X_ATTACK, ATTACK
- db X_DEFEND, DEFENSE
- db X_SPEED, SPEED
- db X_SPECIAL, SP_ATTACK
-; f50c
+INCLUDE "data/items/x_stats.asm"
PokeFlute: ; f50c
@@ -2572,10 +2527,10 @@ Mysteryberry: ; f5bf
cp SKETCH
jr z, .CantUsePPUpOnSketch
- ld bc, $0015
+ ld bc, MON_PP - MON_MOVES
add hl, bc
ld a, [hl]
- cp 3 << 6 ; have 3 PP Ups already been used?
+ cp PP_UP_MASK
jr c, .do_ppup
.CantUsePPUpOnSketch:
@@ -2586,7 +2541,7 @@ Mysteryberry: ; f5bf
.do_ppup
ld a, [hl]
- add 1 << 6 ; increase PP Up count by 1
+ add PP_UP_ONE
ld [hl], a
ld a, $1
ld [wd265], a
@@ -2714,7 +2669,7 @@ RestorePP: ; f6e8
ld a, [wd265]
ld b, a
ld a, [hl]
- and (1 << 6) - 1
+ and PP_MASK
cp b
jr nc, .dont_restore
@@ -2732,7 +2687,7 @@ RestorePP: ; f6e8
.restore_some
ld a, [hl]
- and (1 << 6) - 1
+ and PP_MASK
add c
cp b
jr nc, .restore_all
@@ -2740,7 +2695,7 @@ RestorePP: ; f6e8
.restore_all
ld a, [hl]
- and 3 << 6
+ and PP_UP_MASK
or b
ld [hl], a
ret
@@ -2957,7 +2912,7 @@ UseBallInTrainerBattle: ; f7a0
ld [wBattleAnimParam], a
ld [hBattleTurn], a
ld [wNumHits], a
- predef PlayBattleAnim
+ predef Predef_PlayBattleAnim
ld hl, BlockedTheBallText
call PrintText
ld hl, DontBeAThiefText
@@ -3104,7 +3059,7 @@ ApplyPPUp: ; f84c
call GetPartyParamLocation
push hl
ld de, Buffer1
- predef FillPP
+ predef Predef_FillPP
pop hl
ld bc, MON_PP - MON_MOVES
add hl, bc
@@ -3125,7 +3080,7 @@ ApplyPPUp: ; f84c
.use
ld a, [hl]
- and 3 << 6
+ and PP_UP_MASK
ld a, [de] ; wasted cycle
call nz, ComputeMaxPP
@@ -3209,7 +3164,7 @@ RestoreAllPP: ; f8b9
pop bc
pop de
ld a, [de]
- and 3 << 6
+ and PP_UP_MASK
ld b, a
ld a, [wd265]
add b
@@ -3282,7 +3237,7 @@ GetMaxPPOfMove: ; f8ec
.notwild
add hl, bc
ld a, [hl]
- and 3 << 6
+ and PP_UP_MASK
pop bc
or b
@@ -3293,7 +3248,7 @@ GetMaxPPOfMove: ; f8ec
ld a, b ; this gets lost anyway
call ComputeMaxPP
ld a, [hl]
- and (1 << 6) - 1
+ and PP_MASK
ld [wd265], a
pop af
diff --git a/engine/landmarks.asm b/engine/landmarks.asm
index 75605bbd9..452bd2e92 100644
--- a/engine/landmarks.asm
+++ b/engine/landmarks.asm
@@ -80,8 +80,8 @@ RegionCheck: ; 0x1caea1
jr c, .kanto
.johto
- ld e, 0
+ ld e, JOHTO_REGION
ret
.kanto
- ld e, 1
+ ld e, KANTO_REGION
ret
diff --git a/engine/learn.asm b/engine/learn.asm
index d2751235f..ceb814650 100755
--- a/engine/learn.asm
+++ b/engine/learn.asm
@@ -1,4 +1,4 @@
-LearnMove: ; 6508
+Predef_LearnMove: ; 6508
call LoadTileMapToTempTileMap
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
@@ -144,7 +144,7 @@ ForgetMove: ; 65d3
hlcoord 5 + 2, 2 + 2
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
- predef ListMoves
+ predef Predef_ListMoves
; wMenuData3
ld a, $4
ld [w2DMenuCursorInitY], a
diff --git a/engine/link.asm b/engine/link.asm
index 30d775350..0f17f1305 100755
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -150,7 +150,7 @@ TimeCapsule: ; 2805d
ld [wd265], a
push hl
push de
- callfar ConvertMon_1to2
+ callfar Predef_ConvertMon_1to2
pop de
pop hl
ld a, [wd265]
@@ -449,7 +449,7 @@ Gen2ToGen2LinkComms: ; 28177
pop af
ld [rIF], a
- predef StartBattle
+ predef Predef_StartBattle
ld a, [rIF]
ld h, a
@@ -786,7 +786,7 @@ Link_PrepPartyData_Gen1: ; 28499
add hl, bc
ld c, STAT_SATK
ld b, TRUE
- predef CalcPkmnStatC
+ predef Predef_CalcPkmnStatC
pop bc
pop de
@@ -986,7 +986,7 @@ Function2868a: ; 2868a
push bc
push de
ld [wd265], a
- callfar ConvertMon_1to2
+ callfar Predef_ConvertMon_1to2
pop de
pop bc
ld a, [wd265]
@@ -1065,7 +1065,7 @@ Function2868a: ; 2868a
add hl, bc
ld c, STAT_SATK
ld b, TRUE
- predef CalcPkmnStatC
+ predef Predef_CalcPkmnStatC
pop bc
pop hl
ld a, [hQuotient + 1]
@@ -1078,7 +1078,7 @@ Function2868a: ; 2868a
add hl, bc
ld c, STAT_SDEF
ld b, TRUE
- predef CalcPkmnStatC
+ predef Predef_CalcPkmnStatC
pop bc
pop hl
ld a, [hQuotient + 1]
@@ -1123,7 +1123,7 @@ TimeCapsule_ReplaceTeruSama: ; 28771
ret
-INCLUDE "data/time_capsule/catch_rate_items.asm"
+INCLUDE "data/items/catch_rate_items.asm"
Link_CopyOTData: ; 2879e
@@ -1590,8 +1590,7 @@ Function28b22: ; 28b22
ret
; 28b42
-Function28b42: ; 28b42
-; unreferenced
+Unreferenced_Function28b42: ; 28b42
hlcoord 0, 16
ld a, "┘"
ld bc, 2 * SCREEN_WIDTH
@@ -1885,11 +1884,11 @@ LinkTrade: ; 28b87
ld a, [hLinkPlayerNumber]
cp $1
jr z, .player_2
- predef TradeAnimation
+ predef Predef_TradeAnimation
jr .done_animation
.player_2
- predef TradeAnimationPlayer2
+ predef Predef_TradeAnimationPlayer2
.done_animation
pop af
@@ -1907,7 +1906,7 @@ LinkTrade: ; 28b87
ld de, TempMonSpecies
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
- predef AddTempmonToParty
+ predef Predef_AddTempmonToParty
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
@@ -1951,7 +1950,7 @@ LinkTrade: ; 28b87
.save
farcall SaveAfterLinkTrade
- farcall TrainerRankings_Trades
+ farcall StubbedTrainerRankings_Trades
farcall BackupMobileEventIndex
ld c, 40
call DelayFrames
@@ -2013,8 +2012,7 @@ SetTradeRoomBGPals: ; 28eff
ret
; 28f09
-Function28f09: ; 28f09
-; unreferenced
+Unreferenced_Function28f09: ; 28f09
hlcoord 0, 0
ld b, 6
ld c, 18
@@ -2038,12 +2036,12 @@ Special_CheckTimeCapsuleCompatibility: ; 29bfb
; If any party Pokemon was introduced in the generation 2 games, don't let it in.
ld hl, PartySpecies
- ld b, PARTY_LENGTH ; 6
+ ld b, PARTY_LENGTH
.loop
ld a, [hli]
cp -1
jr z, .checkitem
- cp CHIKORITA ; MEW + 1 ; 151 + 1
+ cp JOHTO_POKEMON
jr nc, .mon_too_new
dec b
jr nz, .loop
@@ -2138,7 +2136,7 @@ Special_EnterTimeCapsule: ; 29c7b
ret
; 29c92
-WaitForOtherPlayerToExit: ; 29c92
+Special_WaitForOtherPlayerToExit: ; 29c92
ld c, 3
call DelayFrames
ld a, -1
@@ -2570,17 +2568,16 @@ Special_CableClubCheckWhichChris: ; 29f47
ret
; 29f54
-UnusedGen1LinkCommsBorderGFX: ; 29f54
-; unreferenced
+Unreferenced_Gen1LinkCommsBorderGFX: ; 29f54
INCBIN "gfx/trade/unused_gen_1_border_tiles.2bpp"
; 29fe4
-Function29fe4: ; unreferenced
+Unreferenced_Function29fe4:
ld a, BANK(sPartyMail)
call GetSRAMBank
ld d, $0
ld b, CHECK_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
call CloseSRAM
ld a, c
and a
diff --git a/engine/link_2.asm b/engine/link_2.asm
index 72e5262b3..03b95b39a 100644
--- a/engine/link_2.asm
+++ b/engine/link_2.asm
@@ -3,7 +3,7 @@ LinkMonStatsScreen: ; 4d319
dec a
ld [CurPartyMon], a
call LowVolume
- predef StatsScreenInit
+ predef Predef_StatsScreenInit
ld a, [CurPartyMon]
inc a
ld [wMenuCursorY], a
diff --git a/engine/mail.asm b/engine/mail.asm
index 0335a6dfe..c2ecb7548 100755
--- a/engine/mail.asm
+++ b/engine/mail.asm
@@ -128,7 +128,7 @@ CheckPokeItem:: ; 44654
push bc
push de
farcall SelectMonFromParty
- ld a, $2
+ ld a, POKEMAIL_REFUSED
jr c, .pop_return
ld a, [CurPartyMon]
@@ -137,7 +137,7 @@ CheckPokeItem:: ; 44654
call AddNTimes
ld d, [hl]
farcall ItemIsMail
- ld a, $3
+ ld a, POKEMAIL_NO_MAIL
jr nc, .pop_return
ld a, BANK(sPartyMail)
@@ -162,7 +162,7 @@ CheckPokeItem:: ; 44654
cp "@"
jr z, .done
cp c
- ld a, $0
+ ld a, POKEMAIL_WRONG_MAIL
jr nz, .close_sram_return
inc hl
inc de
@@ -173,12 +173,12 @@ CheckPokeItem:: ; 44654
.done
farcall CheckCurPartyMonFainted
- ld a, $4
+ ld a, POKEMAIL_LAST_MON
jr c, .close_sram_return
xor a
ld [wPokemonWithdrawDepositParameter], a
farcall RemoveMonFromPartyOrBox
- ld a, $1
+ ld a, POKEMAIL_CORRECT
.close_sram_return
call CloseSRAM
@@ -559,8 +559,7 @@ MailboxPC: ; 0x44806
.TopMenuDataHeader: ; 0x4494c
db %01000000 ; flags
- db 1, 8 ; start coords
- db 10, 18 ; end coords
+ menu_coords 8, 1, SCREEN_WIDTH - 2, 10
dw .TopMenuData2
db 1 ; default option
@@ -575,8 +574,7 @@ MailboxPC: ; 0x44806
.SubMenuDataHeader: ; 0x44964
db %01000000 ; flags
- db 0, 0 ; start coords
- db 9, 13 ; end coords
+ menu_coords 0, 0, 13, 9
dw .SubMenuData2
db 1 ; default option
diff --git a/engine/mail_2.asm b/engine/mail_2.asm
index 886ee6e6e..4450063a4 100755
--- a/engine/mail_2.asm
+++ b/engine/mail_2.asm
@@ -725,8 +725,7 @@ MailGFX_PlaceMessage: ; b9803
jp PlaceString
; b984e
-Functionb984e: ; b984e
-; XXX
+Unreferenced_Functionb984e: ; b984e
.loop
ld a, [hl]
xor $ff
diff --git a/engine/main_menu.asm b/engine/main_menu.asm
index cbd516cd7..fe0dd6b2a 100755
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -31,8 +31,7 @@ MainMenu: ; 49cdc
.MenuDataHeader: ; 49d14
db $40 ; flags
- db 00, 00 ; start coords
- db 07, 16 ; end coords
+ menu_coords 0, 0, 16, 7
dw .MenuData2
db 1 ; default option
; 49d1c
@@ -279,7 +278,7 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09
ret
.min
-; unreferenced
+; unused
db "min.@"
; 49e75
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index fe3c13a13..0f04a0a16 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -1,6 +1,6 @@
-INCLUDE "data/facings.asm"
+INCLUDE "data/sprites/facings.asm"
-INCLUDE "data/map_objects.asm"
+INCLUDE "data/sprites/map_objects.asm"
; 4357
@@ -392,6 +392,7 @@ StepVectors: ; 4700
db -4, 0, 4, 4
db 4, 0, 4, 4
; 4730
+
GetStepVectorSign: ; 4730
add a
ret z ; 0 or 128
@@ -400,6 +401,7 @@ GetStepVectorSign: ; 4730
ld a, -1
ret ; 129 - 255
; 4738
+
UpdatePlayerStep: ; 4738
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -418,8 +420,7 @@ UpdatePlayerStep: ; 4738
ret
; 4759
-Function4759: ; 4759
-; unreferenced
+Unreferenced_Function4759: ; 4759
push bc
ld e, a
ld d, 0
@@ -892,7 +893,7 @@ MapObjectMovementPattern: ; 47dd
ld hl, OBJECT_DIRECTION_WALKING
add hl, de
ld a, [hl]
- and 3
+ maskbits NUM_DIRECTIONS +- 1
ld d, 1 * 8 + 6
cp DOWN
jr z, .ok_13
@@ -1571,7 +1572,7 @@ StepType05: ; 4e0c
ld [hl], a
call IncrementObjectStructField1c
StepType04: ; 4e21
- call MobileFn_4fb2
+ call Stubbed_Function4fb2
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
ld [hl], STANDING
@@ -1579,7 +1580,7 @@ StepType04: ; 4e21
; 4e2b
NPCStep: ; 4e2b
- call MobileFn_4fb2
+ call Stubbed_Function4fb2
call AddStepVector
ld hl, OBJECT_STEP_DURATION
add hl, bc
@@ -1842,7 +1843,8 @@ SkyfallTop: ; 4f83
ret
; 4fb2
-MobileFn_4fb2: mobile
+Stubbed_Function4fb2:
+ ret
ld hl, OBJECT_1D
add hl, bc
inc [hl]
@@ -2793,6 +2795,7 @@ Function5903: ; 5903
db SPRITEMOVEDATA_STANDING_LEFT
db SPRITEMOVEDATA_STANDING_RIGHT
; 5920
+
_UpdateSprites:: ; 5920
ld a, [VramState]
bit 0, a
@@ -2814,18 +2817,18 @@ _UpdateSprites:: ; 5920
bit 1, a
ld b, LOW(SpritesEnd)
jr z, .ok
- ld b, 28 * 4
+ ld b, 28 * SPRITEOAMSTRUCT_LENGTH
.ok
ld a, [hUsedSpriteIndex]
cp b
ret nc
ld l, a
ld h, HIGH(Sprites)
- ld de, 4
+ ld de, SPRITEOAMSTRUCT_LENGTH
ld a, b
- ld c, SCREEN_HEIGHT_PX + 16
+ ld c, SCREEN_HEIGHT_PX + 2 * TILE_WIDTH
.loop
- ld [hl], c
+ ld [hl], c ; y
add hl, de
cp l
jr nz, .loop
@@ -3042,12 +3045,12 @@ PRIORITY_HIGH EQU $30
ld a, [hFFC0]
add [hl]
inc hl
- ld [bc], a
+ ld [bc], a ; y
inc c
ld a, [hFFBF]
add [hl]
inc hl
- ld [bc], a
+ ld [bc], a ; x
inc c
ld e, [hl]
inc hl
@@ -3058,7 +3061,7 @@ PRIORITY_HIGH EQU $30
.nope1
add [hl]
inc hl
- ld [bc], a
+ ld [bc], a ; tile id
inc c
ld a, e
bit 1, a
@@ -3068,7 +3071,7 @@ PRIORITY_HIGH EQU $30
.nope2
and %11110000
or d
- ld [bc], a
+ ld [bc], a ; attributes
inc c
ld a, [hUsedSpriteTile]
dec a
diff --git a/engine/map_setup.asm b/engine/map_setup.asm
index 078e6a2fd..b3905b71e 100644
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -79,7 +79,7 @@ MapSetupCommands: ; 15440
dba LoadGraphics ; 0e
dba LoadTileset ; 0f
dba LoadMapTimeOfDay ; 10
- dba LoadMapPalettes ; 11
+ dba Special_LoadMapPalettes ; 11
dba LoadWildMonData ; 12
dba RefreshMapSprites ; 13
dba HandleNewMap ; 14
@@ -91,8 +91,8 @@ MapSetupCommands: ; 15440
dba LoadMapAttributes ; 1a
dba LoadMapAttributes_SkipPeople ; 1b
dba ClearBGPalettes ; 1c
- dba FadeOutPalettes ; 1d
- dba FadeInPalettes ; 1e
+ dba Special_FadeOutPalettes ; 1d
+ dba Special_FadeInPalettes ; 1e
dba GetCoordOfUpperLeftCorner ; 1f
dba RestoreFacingAfterWarp ; 20
dba SpawnInFacingDown ; 21
@@ -137,7 +137,7 @@ LoadObjectsRunCallback_02: ; 154d7
ret
; 154ea (5:54ea)
-; unreferenced
+; unused
ret
; 154eb
diff --git a/tilesets/roofs.asm b/engine/mapgroup_roofs.asm
index 72999efc6..2cd734234 100644
--- a/tilesets/roofs.asm
+++ b/engine/mapgroup_roofs.asm
@@ -5,13 +5,13 @@ LoadMapGroupRoof:: ; 1c000
ld hl, MapGroupRoofs
add hl, de
ld a, [hl]
- cp $ff
+ cp -1
ret z
ld hl, Roofs
- ld bc, $90
+ ld bc, 9 tiles
call AddNTimes
ld de, vTiles2 tile $0a
- ld bc, $90
+ ld bc, 9 tiles
call CopyBytes
ret
; 1c021
diff --git a/engine/mart.asm b/engine/mart.asm
index 4a8d9e17b..07d385f6d 100755
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -443,7 +443,7 @@ GetMartDialogGroup: ; 15ca3
BuyMenuLoop: ; 15cef
- farcall PlaceMoneyTopRight
+ farcall Special_PlaceMoneyTopRight
call UpdateSprites
ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader
@@ -525,7 +525,7 @@ StandardMartAskPurchaseQuantity:
; 15d97
MartConfirmPurchase: ; 15d97
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
ld a, MARTTEXT_COSTS_THIS_MUCH
call LoadBuyMenuText
call YesNoBox
@@ -618,8 +618,7 @@ Text_Mart_CostsThisMuch: ; 0x15e13
MenuDataHeader_Buy: ; 0x15e18
db $40 ; flags
- db 03, 01 ; start coords
- db 11, 19 ; end coords
+ menu_coords 1, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .menudata2
db 1 ; default option
; 0x15e20
@@ -785,7 +784,7 @@ SellMenu: ; 15eb3
farcall DepositSellInitPackBuffers
.loop
farcall DepositSellPack
- ld a, [wcf66]
+ ld a, [wPackUsedItem]
and a
jp z, .quit
call .TryToSellItem
@@ -797,7 +796,7 @@ SellMenu: ; 15eb3
ret
; 15ed3
-.NothingToSell: ; unreferenced
+.Unreferenced_NothingToSell:
ld hl, .NothingToSellText
call MenuTextBoxBackup
and a
@@ -864,7 +863,7 @@ SellMenu: ; 15eb3
ld a, [wMartItemID]
ld hl, NumItems
call TossItem
- predef PartyMonItemName
+ predef Predef_PartyMonItemName
hlcoord 1, 14
lb bc, 3, 18
call ClearBox
@@ -892,7 +891,7 @@ Text_Mart_ICanPayThisMuch: ; 0x15f78
db "@"
; 0x15f7d
-DummyString ; 15f7d
+.UnusedString15f7d: ; 15f7d
db "!ダミー!@"
Text_Mart_HowMayIHelpYou: ; 0x15f83
@@ -903,8 +902,7 @@ Text_Mart_HowMayIHelpYou: ; 0x15f83
MenuDataHeader_BuySell: ; 0x15f88
db $40 ; flags
- db 00, 00 ; start coords
- db 08, 07 ; end coords
+ menu_coords 0, 0, 7, 8
dw .menudata2
db 1 ; default option
; 0x15f90
diff --git a/engine/menu.asm b/engine/menu.asm
index f04e82ca1..8059d5b30 100755
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -291,8 +291,7 @@ MobileMenuJoypad: ; 241ba
; 241d5
-Function241d5: ; 241d5
-; Unreferenced
+Unreferenced_Function241d5: ; 241d5
call Place2DMenuCursor
.loop
call Move2DMenuCursor
@@ -725,8 +724,7 @@ _ExitMenu:: ; 243e8
ret
; 24423
-Function24423: ; 24423
-; Unreferenced
+Unreferenced_Function24423: ; 24423
ld a, [VramState]
bit 0, a
ret z
diff --git a/engine/menu_2.asm b/engine/menu_2.asm
index d88b75152..122a1ac62 100644
--- a/engine/menu_2.asm
+++ b/engine/menu_2.asm
@@ -27,7 +27,7 @@ PlaceMenuItemQuantity: ; 0x24ac3
.done
ret
-PlaceMoneyTopRight: ; 24ae8
+Special_PlaceMoneyTopRight: ; 24ae8
ld hl, MenuDataHeader_0x24b15
call CopyMenuDataHeader
jr PlaceMoneyDataHeader
@@ -54,15 +54,13 @@ PlaceMoneyDataHeader: ; 24b01
MenuDataHeader_0x24b15: ; 0x24b15
db $40 ; flags
- db 00, 11 ; start coords
- db 02, 19 ; end coords
+ menu_coords 11, 0, SCREEN_WIDTH - 1, 2
dw NULL
db 1 ; default option
MenuDataHeader_0x24b1d: ; 0x24b1d
db $40 ; flags
- db 11, 00 ; start coords
- db 13, 08 ; end coords
+ menu_coords 0, 11, 8, 13
dw NULL
db 1 ; default option
@@ -112,8 +110,8 @@ CoinString: ; 24b89
ShowMoney_TerminatorString: ; 24b8e
db "@"
-Function24b8f: ; 24b8f
-; unreferenced, related to safari?
+Unreferenced_Function24b8f: ; 24b8f
+; related to safari?
ld hl, Options
ld a, [hl]
push af
@@ -216,7 +214,7 @@ FindApricornsInBag: ; 24c64
ld bc, 10
call ByteFill
- ld hl, .ApricornBalls
+ ld hl, ApricornBalls
.loop
ld a, [hl]
cp -1
@@ -252,12 +250,4 @@ FindApricornsInBag: ; 24c64
pop hl
ret
-.ApricornBalls: ; 24ca0
- db RED_APRICORN, LEVEL_BALL
- db BLU_APRICORN, LURE_BALL
- db YLW_APRICORN, MOON_BALL
- db GRN_APRICORN, FRIEND_BALL
- db WHT_APRICORN, FAST_BALL
- db BLK_APRICORN, HEAVY_BALL
- db PNK_APRICORN, LOVE_BALL
- db -1
+INCLUDE "data/items/apricorn_balls.asm"
diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm
index 316ff3bac..db1a68ceb 100755
--- a/engine/mon_icons.asm
+++ b/engine/mon_icons.asm
@@ -281,8 +281,7 @@ FlyFunction_GetMonIcon: ; 8e9bc (23:69bc)
ret
; 8e9cc (23:69cc)
-GetMonIcon2: ; 8e9cc
-; unreferenced
+Unreferenced_GetMonIcon2: ; 8e9cc
push de
ld a, [wd265]
call ReadMonMenuIcon
@@ -307,8 +306,8 @@ GetIconGFX: ; 8e9de
ret
HeldItemIcons:
-INCBIN "gfx/icon/mail.2bpp"
-INCBIN "gfx/icon/item.2bpp"
+INCBIN "gfx/icons/mail.2bpp"
+INCBIN "gfx/icons/item.2bpp"
; 8ea17
GetIcon_de: ; 8ea17
diff --git a/engine/mon_menu.asm b/engine/mon_menu.asm
index e3570ab70..7dc2a2393 100755
--- a/engine/mon_menu.asm
+++ b/engine/mon_menu.asm
@@ -56,8 +56,7 @@ MonSubmenu: ; 24d19
.MenuDataHeader: ; 24d3f
db $40 ; tile backup
- db 00, 06 ; start coords
- db 17, 19 ; end coords
+ menu_coords 6, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw 0
db 1 ; default option
; 24d47
@@ -326,8 +325,7 @@ BattleMonMenu: ; 24e99
MenuDataHeader_0x24ed4: ; 24ed4
db $00 ; flags
- db 11, 11 ; start coords
- db 17, 19 ; end coords
+ menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw MenuData2_0x24edc
db 1 ; default option
; 24edc
diff --git a/engine/mon_stats.asm b/engine/mon_stats.asm
index dbaf635bb..a297b7760 100644
--- a/engine/mon_stats.asm
+++ b/engine/mon_stats.asm
@@ -1,8 +1,8 @@
-DrawPlayerHP: ; 50b0a
+Predef_DrawPlayerHP: ; 50b0a
ld a, $1
jr DrawHP
-DrawEnemyHP: ; 50b0e
+Predef_DrawEnemyHP: ; 50b0e
ld a, $2
DrawHP: ; 50b10
@@ -43,7 +43,7 @@ DrawHP: ; 50b10
ld c, e
.not_boxmon
- predef ComputeHPBarPixels
+ predef Predef_ComputeHPBarPixels
ld a, 6
ld d, a
ld c, a
@@ -82,7 +82,7 @@ DrawHP: ; 50b10
pop de
ret
-PrintTempMonStats: ; 50b7b
+Predef_PrintTempMonStats: ; 50b7b
; Print TempMon's stats at hl, with spacing bc.
push bc
push hl
@@ -121,7 +121,7 @@ PrintTempMonStats: ; 50b7b
next "SPEED"
next "@"
-GetGender: ; 50bdd
+Predef_GetGender: ; 50bdd
; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon).
; When calling this function, a should be set to an appropriate MonType value.
@@ -235,7 +235,7 @@ GetGender: ; 50bdd
scf
ret
-ListMovePP: ; 50c50
+Predef_ListMovePP: ; 50c50
ld a, [wNumMoves]
inc a
ld c, a
@@ -324,8 +324,7 @@ ListMovePP: ; 50c50
jr nz, .load_loop
ret
-Function50cd0: ; 50cd0
-; XXX
+Unreferenced_Function50cd0: ; 50cd0
.loop
ld [hl], $32
inc hl
@@ -336,7 +335,7 @@ Function50cd0: ; 50cd0
jr nz, .loop
ret
-Predef22: ; unreferenced predef
+UnusedPredef22:
push hl
push hl
ld hl, PartyMonNicknames
@@ -344,7 +343,7 @@ Predef22: ; unreferenced predef
call GetNick
pop hl
call PlaceString
- call CopyPkmnToTempMon
+ call Predef_CopyPkmnToTempMon
pop hl
ld a, [CurPartySpecies]
cp EGG
@@ -353,7 +352,7 @@ Predef22: ; unreferenced predef
ld bc, -12
add hl, bc
ld b, $0
- call DrawEnemyHP
+ call Predef_DrawEnemyHP
pop hl
ld bc, 5
add hl, bc
@@ -364,7 +363,7 @@ Predef22: ; unreferenced predef
.egg
ret
-PlaceStatusString: ; 50d0a
+Predef_PlaceStatusString: ; 50d0a
push de
inc de
inc de
@@ -374,7 +373,7 @@ PlaceStatusString: ; 50d0a
ld a, [de]
or b
pop de
- jr nz, PlaceNonFaintStatus
+ jr nz, Predef_PlaceNonFaintStatus
push de
ld de, FntString
call CopyStatusString
@@ -397,7 +396,7 @@ CopyStatusString: ; 50d25
ld [hl], a
ret
-PlaceNonFaintStatus: ; 50d2e
+Predef_PlaceNonFaintStatus: ; 50d2e
push de
ld a, [de]
ld de, PsnString
@@ -431,7 +430,7 @@ BrnString: db "BRN@"
FrzString: db "FRZ@"
ParString: db "PAR@"
-ListMoves: ; 50d6f
+Predef_ListMoves: ; 50d6f
; List moves at hl, spaced every [Buffer1] tiles.
ld de, wListMoves_MoveIndicesBuffer
ld b, $0
diff --git a/engine/move_mon.asm b/engine/move_mon.asm
index 90728e84c..426a3ba8b 100755
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -1,4 +1,4 @@
-TryAddMonToParty: ; d88c
+Predef_TryAddMonToParty: ; d88c
; Check if to copy wild Pkmn or generate new Pkmn
; Whose is it?
ld de, PartyCount
@@ -120,7 +120,7 @@ GeneratePartyMonStats: ; d906
endr
ld [hl], a
ld [Buffer1], a
- predef FillMoves
+ predef Predef_FillMoves
.next
pop de
@@ -195,7 +195,7 @@ endr
push de
inc hl
inc hl
- call FillPP
+ call Predef_FillPP
pop de
pop hl
rept 4
@@ -224,7 +224,7 @@ endr
ld a, $1
ld c, a
ld b, FALSE
- call CalcPkmnStatC
+ call Predef_CalcPkmnStatC
ld a, [hProduct + 2]
ld [de], a
inc de
@@ -297,7 +297,7 @@ endr
ld bc, MON_STAT_EXP - 1
add hl, bc
ld b, $0 ; if b = 1, then stat calculation takes stat exp into account.
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
.next3
ld a, [MonType]
@@ -311,7 +311,7 @@ endr
dec a
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
.done
@@ -319,7 +319,7 @@ endr
ret
; da6d
-FillPP: ; da6d
+Predef_FillPP: ; da6d
push bc
ld b, NUM_MOVES
.loop
@@ -350,7 +350,7 @@ FillPP: ; da6d
ret
; da96
-AddTempmonToParty: ; da96
+Predef_AddTempmonToParty: ; da96
ld hl, PartyCount
ld a, [hl]
cp PARTY_LENGTH
@@ -422,7 +422,7 @@ AddTempmonToParty: ; da96
dec a
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
@@ -434,7 +434,7 @@ AddTempmonToParty: ; da96
and a
ret
-SentGetPkmnIntoFromBox: ; db3f
+Predef_SendGetPkmnIntoFromBox: ; db3f
; Sents/Gets Pkmn into/from Box depending on Parameter
; wPokemonWithdrawDepositParameter == 0: get Pkmn into Party
; wPokemonWithdrawDepositParameter == 1: sent Pkmn into Box
@@ -597,7 +597,7 @@ SentGetPkmnIntoFromBox: ; db3f
srl a
add $2
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
callfar CalcLevel
ld a, d
ld [CurPartyLevel], a
@@ -617,7 +617,7 @@ SentGetPkmnIntoFromBox: ; db3f
push bc
ld b, $1
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
pop bc
ld a, [wPokemonWithdrawDepositParameter]
@@ -830,7 +830,7 @@ Functiondd64: ; dd64
add hl, bc
push bc
ld b, $1
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
ld hl, PartyMon1Moves
ld a, [PartyCount]
dec a
@@ -840,7 +840,7 @@ Functiondd64: ; dd64
ld e, l
ld a, $1
ld [Buffer1], a
- predef FillMoves
+ predef Predef_FillMoves
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
@@ -904,8 +904,8 @@ DepositBreedmon: ; de44
ld bc, BOXMON_STRUCT_LENGTH
jp CopyBytes
-SentPkmnIntoBox: ; de6e
-; Sents the Pkmn into one of Bills Boxes
+Predef_SendPkmnIntoBox: ; de6e
+; Sends the Pkmn into one of Bills Boxes
; the data comes mainly from 'EnemyMon:'
ld a, BANK(sBoxCount)
call GetSRAMBank
@@ -1010,7 +1010,7 @@ SentPkmnIntoBox: ; de6e
cp UNOWN
jr nz, .not_unown
ld hl, sBoxMon1DVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
.not_unown
@@ -1086,7 +1086,7 @@ ShiftBoxMon: ; df47
ret
; df8c
-GiveEgg:: ; df8c
+Predef_GiveEgg:: ; df8c
ld a, [CurPartySpecies]
push af
callfar GetPreEvolution
@@ -1094,7 +1094,7 @@ GiveEgg:: ; df8c
ld a, [CurPartySpecies]
dec a
-; TryAddMonToParty sets Seen and Caught flags
+; Predef_TryAddMonToParty sets Seen and Caught flags
; when it is successful. This routine will make
; sure that we aren't newly setting flags.
push af
@@ -1104,11 +1104,11 @@ GiveEgg:: ; df8c
call CheckSeenMon
push bc
- call TryAddMonToParty
+ call Predef_TryAddMonToParty
; If we haven't caught this Pokemon before receiving
; the Egg, reset the flag that was just set by
-; TryAddMonToParty.
+; Predef_TryAddMonToParty.
pop bc
ld a, c
and a
@@ -1119,12 +1119,12 @@ GiveEgg:: ; df8c
ld d, $0
ld hl, PokedexCaught
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
.skip_caught_flag
; If we haven't seen this Pokemon before receiving
; the Egg, reset the flag that was just set by
-; TryAddMonToParty.
+; Predef_TryAddMonToParty.
pop bc
ld a, c
and a
@@ -1135,7 +1135,7 @@ GiveEgg:: ; df8c
ld d, $0
ld hl, PokedexSeen
ld b, RESET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
.skip_seen_flag
pop af
@@ -1360,7 +1360,7 @@ ComputeNPCTrademonStats: ; e134
ld a, MON_STAT_EXP - 1
call GetPartyParamLocation
ld b, $1
- call CalcPkmnStats
+ call Predef_CalcPkmnStats
pop de
ld a, MON_HP
call GetPartyParamLocation
@@ -1372,7 +1372,7 @@ ComputeNPCTrademonStats: ; e134
ret
; e167
-CalcPkmnStats: ; e167
+Predef_CalcPkmnStats: ; e167
; Calculates all 6 Stats of a Pkmn
; b: Take into account stat EXP if TRUE
; 'c' counts from 1-6 and points with 'BaseStats' to the base value
@@ -1382,7 +1382,7 @@ CalcPkmnStats: ; e167
ld c, $0
.loop
inc c
- call CalcPkmnStatC
+ call Predef_CalcPkmnStatC
ld a, [hMultiplicand + 1]
ld [de], a
inc de
@@ -1395,7 +1395,7 @@ CalcPkmnStats: ; e167
ret
; e17b
-CalcPkmnStatC: ; e17b
+Predef_CalcPkmnStatC: ; e17b
; 'c' is 1-6 and points to the BaseStat
; 1: HP
; 2: Attack
@@ -1596,7 +1596,7 @@ GivePoke:: ; e277
push bc
xor a ; PARTYMON
ld [MonType], a
- call TryAddMonToParty
+ call Predef_TryAddMonToParty
jr nc, .failed
ld hl, PartyMonNicknames
ld a, [PartyCount]
@@ -1626,7 +1626,7 @@ GivePoke:: ; e277
ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a
callfar LoadEnemyMon
- call SentPkmnIntoBox
+ call Predef_SendPkmnIntoBox
jp nc, .FailedToGiveMon
ld a, BOXMON
ld [MonType], a
@@ -1795,7 +1795,7 @@ InitNickname: ; e3de
pop hl
ld de, StringBuffer1
call InitName
- ld a, $4 ; XXX could this be in bank 4 in pokered?
+ ld a, $4 ; ExitAllMenus is in bank 0, XXX could this be in bank 4 in pokered?
ld hl, ExitAllMenus
rst FarCall
ret
diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm
index ec5cdecab..0f5265bf7 100755
--- a/engine/mystery_gift.asm
+++ b/engine/mystery_gift.asm
@@ -63,7 +63,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
jr z, .skip_append_save
call .SaveMysteryGiftTrainerName
farcall RestoreMobileEventIndex
- farcall TrainerRankings_MysteryGift
+ farcall StubbedTrainerRankings_MysteryGift
farcall BackupMobileEventIndex
.skip_append_save
ld a, [wMysteryGiftPartnerSentDeco]
@@ -1117,7 +1117,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
ld d, $0
ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived
- predef_id FlagPredef
+ predef_id Predef_SmallFarFlagAction
push hl
push bc
call Predef
@@ -1129,7 +1129,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
ret nz
call GetMysteryGiftBank
ld b, SET_FLAG
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
call CloseSRAM
xor a
ret
@@ -1142,7 +1142,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
ld d, $0
ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
pop bc
@@ -1369,7 +1369,7 @@ InitMysteryGiftLayout: ; 105153 (41:5153)
jr .gfx_loop
; 105232 (41:5232)
-.Load6GFX: ; unreferenced
+.Unreferenced_Load6GFX:
ld b, 6
jr .gfx_loop
@@ -1456,33 +1456,33 @@ Function105688: ; 105688 (41:5688)
jr asm_105726
Function1056eb: ; 1056eb (41:56eb)
- ld c, $10
-.asm_1056ed
- ld hl, Sprites
- ld b, $8
-.asm_1056f2
+ ld c, 16
+.loop
+ ld hl, Sprite01YCoord
+ ld b, 8
+.dec_y_loop
dec [hl]
-rept 4
+rept SPRITEOAMSTRUCT_LENGTH
inc hl
endr
dec b
- jr nz, .asm_1056f2
- ld hl, Sprites + $20
- ld b, $8
-.asm_1056ff
+ jr nz, .dec_y_loop
+ ld hl, Sprite09YCoord
+ ld b, 8
+.inc_y_loop
inc [hl]
-rept 4
+rept SPRITEOAMSTRUCT_LENGTH
inc hl
endr
dec b
- jr nz, .asm_1056ff
+ jr nz, .inc_y_loop
dec c
ret z
push bc
ld c, 4
call DelayFrames
pop bc
- jr .asm_1056ed
+ jr .loop
Function105712: ; 105712 (41:5712)
call Function105777
@@ -1580,7 +1580,7 @@ Function1057d7: ; 1057d7 (41:57d7)
ld a, BANK(MysteryGiftJP_GFX)
lb bc, 4, 0
call FarCopyBytes
- ld hl, MysteryGiftJP_GFX + $400
+ ld hl, MysteryGiftJP_GFX + $40 tiles
ld de, vTiles0 tile $00
ld a, BANK(MysteryGiftJP_GFX)
ld bc, $80
@@ -1656,9 +1656,9 @@ Function1057d7: ; 1057d7 (41:57d7)
ld [hl], $3c
hlcoord 17, 15
ld [hl], $3e
- ld de, Sprites
+ ld de, Sprite01
ld hl, .OAM_data
- ld bc, $40
+ ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
call CopyBytes
call EnableLCD
call WaitBGMap
@@ -1713,22 +1713,22 @@ Function1057d7: ; 1057d7 (41:57d7)
; 1058f0 (41:58f0)
.OAM_data: ; 1058f0
- dsprite 2, 1, 6, 4, $00, $00
- dsprite 2, 1, 7, 4, $01, $00
- dsprite 2, 1, 8, 4, $02, $00
- dsprite 2, 1, 9, 4, $03, $00
- dsprite 3, 1, 6, 4, $04, $00
- dsprite 3, 1, 7, 4, $05, $00
- dsprite 3, 1, 8, 4, $06, $00
- dsprite 3, 1, 9, 4, $07, $00
- dsprite 0, 1, 11, 4, $00, $00
- dsprite 0, 1, 12, 4, $01, $00
- dsprite 0, 1, 13, 4, $02, $00
- dsprite 0, 1, 14, 4, $03, $00
- dsprite 1, 1, 11, 4, $04, $00
- dsprite 1, 1, 12, 4, $05, $00
- dsprite 1, 1, 13, 4, $06, $00
- dsprite 1, 1, 14, 4, $07, $00
+ dsprite 2, 1, 6, 4, $00, 0
+ dsprite 2, 1, 7, 4, $01, 0
+ dsprite 2, 1, 8, 4, $02, 0
+ dsprite 2, 1, 9, 4, $03, 0
+ dsprite 3, 1, 6, 4, $04, 0
+ dsprite 3, 1, 7, 4, $05, 0
+ dsprite 3, 1, 8, 4, $06, 0
+ dsprite 3, 1, 9, 4, $07, 0
+ dsprite 0, 1, 11, 4, $00, 0
+ dsprite 0, 1, 12, 4, $01, 0
+ dsprite 0, 1, 13, 4, $02, 0
+ dsprite 0, 1, 14, 4, $03, 0
+ dsprite 1, 1, 11, 4, $04, 0
+ dsprite 1, 1, 12, 4, $05, 0
+ dsprite 1, 1, 13, 4, $06, 0
+ dsprite 1, 1, 14, 4, $07, 0
; japanese mystery gift gfx
MysteryGiftJP_GFX: ; 105930
diff --git a/engine/mystery_gift_2.asm b/engine/mystery_gift_2.asm
index 1d180f714..72767aa17 100755
--- a/engine/mystery_gift_2.asm
+++ b/engine/mystery_gift_2.asm
@@ -29,7 +29,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
inc de ; wc80f
call CloseSRAM
call Random
- and $1
+ and 1
ld [de], a
inc de ; wc810
call .RandomSample
@@ -59,10 +59,10 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
.RandomSample: ; 2c6ac (b:46ac)
push de
call Random
- cp $19 ; 10 percent
+ cp 10 percent
jr c, .tenpercent
call Random
- and $7
+ and %111
ld d, a
rl d
ld e, $80
@@ -80,10 +80,10 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
.tenpercent
call Random
- cp $32 ; 20 percent
+ cp 20 percent - 1
jr c, .twopercent
call Random
- and $3
+ and %011
ld d, a
rl d
ld e, $80
@@ -102,7 +102,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
.twopercent
call Random
- cp $32 ; 50 ; 20 percent
+ cp 20 percent - 1
jr c, .pointfourpercent
ld a, b
swap a
@@ -147,6 +147,6 @@ MysteryGiftFallbackItem: ; 2c722 (b:4722)
; 2c725 (b:4725)
-INCLUDE "data/mystery_gift_items.asm"
+INCLUDE "data/items/mystery_gift_items.asm"
-INCLUDE "data/mystery_gift_decos.asm"
+INCLUDE "data/decorations/mystery_gift_decos.asm"
diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm
index 177f06f73..f16f7176f 100755
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -1,3 +1,9 @@
+NAMINGSCREEN_CURSOR EQU $7e
+
+NAMINGSCREEN_BORDER EQUS "\"<BLACK>\"" ; $60
+NAMINGSCREEN_MIDDLELINE EQUS "\"→\"" ; $eb
+NAMINGSCREEN_UNDERLINE EQUS "\"<DOT>\"" ; $f2
+
_NamingScreen: ; 0x116b7
call DisableSpriteUpdates
call NamingScreen
@@ -103,7 +109,7 @@ NamingScreen: ; 116c1
inc de
hlcoord 5, 4
call PlaceString
- farcall GetGender
+ farcall Predef_GetGender
jr c, .genderless
ld a, "♂"
jr nz, .place_gender
@@ -176,7 +182,7 @@ NamingScreen: ; 116c1
.Box: ; 117f5 (4:57f5)
ld de, PokeBallSpriteGFX
ld hl, vTiles0 tile $00
- lb bc, BANK(PokeBallSpriteGFX), $4
+ lb bc, BANK(PokeBallSpriteGFX), 4
call Request2bpp
xor a
ld hl, wSpriteAnimDict
@@ -287,7 +293,7 @@ NamingScreen_InitText: ; 118a8
call WaitTop
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, $60
+ ld a, NAMINGSCREEN_BORDER
call ByteFill
hlcoord 1, 1
lb bc, 6, 18
@@ -490,7 +496,7 @@ NamingScreenJoypadLoop: ; 11915
ret
.select
- ld hl, wcf64
+ ld hl, wNamingScreenLetterCase
ld a, [hl]
xor 1
ld [hl], a
@@ -562,14 +568,14 @@ NamingScreen_AnimateCursor: ; 11a3b (4:5a3b)
.ok
cp d
ld de, .LetterEntries
- ld a, $0
+ ld a, SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR - SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 0
jr nz, .ok2
ld de, .CaseDelEnd
- ld a, $1
+ ld a, SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR_BIG - SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 1
.ok2
ld hl, SPRITEANIMSTRUCT_0E
add hl, bc
- add [hl]
+ add [hl] ; default SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc
ld [hl], a
@@ -729,7 +735,7 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27
ld a, [hl]
cp "@"
jr z, .end_of_string
- ld [hl], $f2
+ ld [hl], NAMINGSCREEN_UNDERLINE
and a
ret
@@ -739,7 +745,7 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27
; 11b39 (4:5b39)
-; XXX
+; unused
ld a, [wNamingScreenCurrNameLength]
and a
ret z
@@ -765,21 +771,7 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27
; 11b56
-Dakutens: ; Dummied out
- db "かが", "きぎ", "くぐ", "けげ", "こご"
- db "さざ", "しじ", "すず", "せぜ", "そぞ"
- db "ただ", "ちぢ", "つづ", "てで", "とど"
- db "はば", "ひび", "ふぶ", "へべ", "ほぼ"
- db "カガ", "キギ", "クグ", "ケゲ", "コゴ"
- db "サザ", "シジ", "スズ", "セゼ", "ソゾ"
- db "タダ", "チヂ", "ツヅ", "テデ", "トド"
- db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
- db $ff
-
-Handakutens: ; Dummied out
- db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
- db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
- db $ff
+INCLUDE "data/unused_text/dakutens.asm"
; 11bbc
@@ -790,12 +782,12 @@ NamingScreen_DeleteCharacter: ; 11bbc (4:5bbc)
ret z
dec [hl]
call NamingScreen_GetTextCursorPosition
- ld [hl], $f2
+ ld [hl], NAMINGSCREEN_UNDERLINE
inc hl
ld a, [hl]
- cp $f2
+ cp NAMINGSCREEN_UNDERLINE
ret nz
- ld [hl], $eb
+ ld [hl], NAMINGSCREEN_MIDDLELINE
ret
NamingScreen_GetTextCursorPosition: ; 11bd0 (4:5bd0)
@@ -814,17 +806,17 @@ NamingScreen_GetTextCursorPosition: ; 11bd0 (4:5bd0)
; 11be0
NamingScreen_InitNameEntry: ; 11be0
-; load $f2, ($eb * [wNamingScreenMaxNameLength]), $50 into the dw address at wNamingScreenDestinationPointer
+; load NAMINGSCREEN_UNDERLINE, (NAMINGSCREEN_MIDDLELINE * [wNamingScreenMaxNameLength]), "@" into the dw address at wNamingScreenDestinationPointer
ld hl, wNamingScreenDestinationPointer
ld a, [hli]
ld h, [hl]
ld l, a
- ld [hl], $f2
+ ld [hl], NAMINGSCREEN_UNDERLINE
inc hl
ld a, [wNamingScreenMaxNameLength]
dec a
ld c, a
- ld a, $eb
+ ld a, NAMINGSCREEN_MIDDLELINE
.loop
ld [hli], a
dec c
@@ -843,9 +835,9 @@ NamingScreen_StoreEntry: ; 11bf7 (4:5bf7)
ld c, a
.loop
ld a, [hl]
- cp $eb
+ cp NAMINGSCREEN_MIDDLELINE
jr z, .terminator
- cp $f2
+ cp NAMINGSCREEN_UNDERLINE
jr nz, .not_terminator
.terminator
ld [hl], "@"
@@ -905,22 +897,22 @@ LoadNamingScreenGFX: ; 11c51
call LoadFontsExtra
ld de, NamingScreenGFX_MiddleLine
- ld hl, vTiles1 tile $6b
+ ld hl, vTiles0 tile NAMINGSCREEN_MIDDLELINE
lb bc, BANK(NamingScreenGFX_MiddleLine), 1
call Get1bpp
ld de, NamingScreenGFX_UnderLine
- ld hl, vTiles1 tile $72
+ ld hl, vTiles0 tile NAMINGSCREEN_UNDERLINE
lb bc, BANK(NamingScreenGFX_UnderLine), 1
call Get1bpp
- ld de, vTiles2 tile $60
+ ld de, vTiles2 tile NAMINGSCREEN_BORDER
ld hl, NamingScreenGFX_Border
ld bc, 1 tiles
ld a, BANK(NamingScreenGFX_Border)
call FarCopyBytes
- ld de, vTiles0 tile $7e
+ ld de, vTiles0 tile NAMINGSCREEN_CURSOR
ld hl, NamingScreenGFX_Cursor
ld bc, 2 tiles
ld a, BANK(NamingScreenGFX_Cursor)
@@ -929,14 +921,14 @@ LoadNamingScreenGFX: ; 11c51
ld a, $5
ld hl, wSpriteAnimDict + 9 * 2
ld [hli], a
- ld [hl], $7e
+ ld [hl], NAMINGSCREEN_CURSOR
xor a
ld [hSCY], a
ld [wGlobalAnimYOffset], a
ld [hSCX], a
ld [wGlobalAnimXOffset], a
ld [wJumptableIndex], a
- ld [wcf64], a
+ ld [wNamingScreenLetterCase], a
ld [hBGMapMode], a
ld [wNamingScreenCurrNameLength], a
ld a, $7
@@ -1033,15 +1025,15 @@ _ComposeMailMessage: ; 11e75 (mail?)
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, $10
+ ld hl, MAIL_LINE_LENGTH
add hl, de
- ld [hl], $4e
+ ld [hl], "<NEXT>"
ret
; 11ef4 (4:5ef4)
.MailIcon: ; 11ef4
-INCBIN "gfx/icon/mail2.2bpp"
+INCBIN "gfx/icons/mail2.2bpp"
; 11f74
.initwNamingScreenMaxNameLength ; 11f74 (4:5f74)
@@ -1051,7 +1043,7 @@ INCBIN "gfx/icon/mail2.2bpp"
; 11f7a (4:5f7a)
-.Dummy: ; dummied out
+.UnusedString11f7a:
db "メールを かいてね@"
; 11f84
@@ -1060,7 +1052,7 @@ INCBIN "gfx/icon/mail2.2bpp"
call WaitTop
hlcoord 0, 0
ld bc, 6 * SCREEN_WIDTH
- ld a, $60 ; border
+ ld a, NAMINGSCREEN_BORDER
call ByteFill
hlcoord 0, 6
ld bc, 12 * SCREEN_WIDTH
@@ -1190,13 +1182,13 @@ INCBIN "gfx/icon/mail2.2bpp"
jr c, .start
ld hl, wNamingScreenCurrNameLength
ld a, [hl]
- cp $10
+ cp MAIL_LINE_LENGTH
ret nz
inc [hl]
call NamingScreen_GetTextCursorPosition
- ld [hl], $f2
+ ld [hl], NAMINGSCREEN_UNDERLINE
dec hl
- ld [hl], $4e
+ ld [hl], "<NEXT>"
ret
.start
@@ -1216,13 +1208,13 @@ INCBIN "gfx/icon/mail2.2bpp"
call NamingScreen_DeleteCharacter
ld hl, wNamingScreenCurrNameLength
ld a, [hl]
- cp $10
+ cp MAIL_LINE_LENGTH
ret nz
dec [hl]
call NamingScreen_GetTextCursorPosition
- ld [hl], $f2
+ ld [hl], NAMINGSCREEN_UNDERLINE
inc hl
- ld [hl], $4e
+ ld [hl], "<NEXT>"
ret
.finished
@@ -1232,9 +1224,9 @@ INCBIN "gfx/icon/mail2.2bpp"
ret
.select
- ld hl, wcf64
+ ld hl, wNamingScreenLetterCase
ld a, [hl]
- xor $1
+ xor 1
ld [hl], a
jr nz, .switch_to_lowercase
ld de, MailEntry_Uppercase
@@ -1434,7 +1426,7 @@ MailComposition_TryAddLastCharacter: ; 121ac (4:61ac)
; 121b2 (4:61b2)
-; XXX
+; unused
ld a, [wNamingScreenCurrNameLength]
and a
ret z
diff --git a/engine/npc_movement.asm b/engine/npc_movement.asm
index a2508e0f6..71583408e 100755
--- a/engine/npc_movement.asm
+++ b/engine/npc_movement.asm
@@ -70,14 +70,14 @@ Function6f07: ; 6f07
ld e, [hl]
ld hl, OBJECT_PALETTE
add hl, bc
- bit 7, [hl]
+ bit OAM_PRIORITY, [hl]
jp nz, Function6fa1
ld hl, OBJECT_NEXT_TILE
add hl, bc
ld a, [hl]
ld d, a
call GetTileCollision
- and a ; land
+ and a ; LANDTILE
jr z, Function6f3e
scf
ret
@@ -106,7 +106,7 @@ Function6f3e: ; 6f3e
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
ld a, [hl]
- and 3
+ maskbits NUM_DIRECTIONS +- 1
ld e, a
ld d, 0
ld hl, .data_6f5b
@@ -131,7 +131,7 @@ Function6f5f: ; 6f5f
push af
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
- and 3
+ maskbits NUM_DIRECTIONS +- 1
ld e, a
ld d, 0
ld hl, .data_6f7b
@@ -178,49 +178,49 @@ Function6fa1: ; 6fa1
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
ld a, [hl]
- and 3
- jr z, .asm_6fb2
+ maskbits NUM_DIRECTIONS +- 1
+ jr z, .down
dec a
- jr z, .asm_6fb7
+ jr z, .up
dec a
- jr z, .asm_6fbb
- jr .asm_6fbf
+ jr z, .left
+ jr .right
-.asm_6fb2
+.down
inc e
push de
inc d
- jr .asm_6fc2
+ jr .continue
-.asm_6fb7
+.up
push de
inc d
- jr .asm_6fc2
+ jr .continue
-.asm_6fbb
+.left
push de
inc e
- jr .asm_6fc2
+ jr .continue
-.asm_6fbf
+.right
inc d
push de
inc e
-.asm_6fc2
+.continue
call GetCoordTile
call GetTileCollision
pop de
- and a ; land
- jr nz, .asm_6fd7
+ and a ; LANDTILE
+ jr nz, .not_land
call GetCoordTile
call GetTileCollision
- and a ; land
- jr nz, .asm_6fd7
+ and a ; LANDTILE
+ jr nz, .not_land
xor a
ret
-.asm_6fd7
+.not_land
scf
ret
; 6fd9
@@ -279,7 +279,7 @@ WillObjectBumpIntoSomeoneElse: ; 7009
jr IsNPCAtCoord
; 7015
-Function7015: ; unreferenced
+Unreferenced_Function7015:
ld a, [hMapObjectIndexBuffer]
call GetObjectStruct
call .CheckWillBeFacingNPC
@@ -482,7 +482,7 @@ IsObjectMovingOffEdgeOfScreen: ; 70ed
ret
; 7113
-Function7113: ; unreferenced
+Unreferenced_Function7113:
ld a, [PlayerStandingMapX]
ld d, a
ld a, [PlayerStandingMapY]
diff --git a/engine/npctrade.asm b/engine/npctrade.asm
index 1455dce62..7e3fa4683 100755
--- a/engine/npctrade.asm
+++ b/engine/npctrade.asm
@@ -1,11 +1,3 @@
-; Trade dialogs
- const_def
- const TRADE_INTRO
- const TRADE_CANCEL
- const TRADE_WRONG
- const TRADE_COMPLETE
- const TRADE_AFTER
-
NPCTrade:: ; fcba8
ld a, e
ld [wJumptableIndex], a
@@ -67,7 +59,7 @@ NPCTrade:: ; fcba8
push af
ld a, [wcf64]
push af
- predef TradeAnimation
+ predef Predef_TradeAnimation
pop af
ld [wcf64], a
pop af
@@ -83,17 +75,17 @@ CheckTradeGender: ; fcc23
ld e, TRADE_GENDER
call GetTradeAttribute
ld a, [hl]
- and a
+ and a ; TRADE_EITHER_GENDER
jr z, .matching
- cp 1
+ cp TRADE_MALE_ONLY
jr z, .check_male
- farcall GetGender
+ farcall Predef_GetGender
jr nz, .not_matching
jr .matching
.check_male
- farcall GetGender
+ farcall Predef_GetGender
jr z, .not_matching
.matching
@@ -109,7 +101,7 @@ TradeFlagAction: ; fcc4a
ld hl, wTradeFlags
ld a, [wJumptableIndex]
ld c, a
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
ret
@@ -178,10 +170,10 @@ DoNPCTrade: ; fcc63
ld e, TRADE_DIALOG
call GetTradeAttribute
ld a, [hl]
- cp 3
- ld a, 1
+ cp TRADE_DIALOG_GIRL
+ ld a, CAUGHT_BY_GIRL
jr c, .okay
- ld a, 2
+ ld a, CAUGHT_BY_BOY
.okay
ld [wOTTrademonCaughtData], a
@@ -196,7 +188,7 @@ DoNPCTrade: ; fcc63
ld [MonType], a
ld [wPokemonWithdrawDepositParameter], a
callfar RemoveMonFromPartyOrBox
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
ld e, TRADE_DIALOG
call GetTradeAttribute
@@ -332,8 +324,7 @@ CopyTradeName: ; fcdf4
ret
; fcdfb
-Functionfcdfb: ; fcdfb
-; unreferenced
+Unreferenced_Functionfcdfb: ; fcdfb
ld bc, 4
call CopyBytes
ld a, "@"
@@ -341,8 +332,7 @@ Functionfcdfb: ; fcdfb
ret
; fce05
-Functionfce05: ; fce05
-; unreferenced
+Unreferenced_Functionfce05: ; fce05
ld bc, 3
call CopyBytes
ld a, "@"
@@ -400,7 +390,7 @@ GetTradeMonNames: ; fce1b
and a
ret z
- cp 1
+ cp TRADE_MALE_ONLY
ld a, "♂"
jr z, .done
ld a, "♀"
@@ -433,31 +423,28 @@ PrintTradeText: ; fcf38
; fcf53
TradeTexts: ; fcf53
-; intro
+; entries correspond to TRADE_* × TRADE_DIALOG_* constants
+; TRADE_INTRO
dw TradeIntroText1
dw TradeIntroText2
dw TradeIntroText3
dw TradeIntroText4
-
-; cancel
+; TRADE_CANCEL
dw TradeCancelText1
dw TradeCancelText2
dw TradeCancelText3
dw TradeCancelText4
-
-; wrong mon
+; TRADE_WRONG
dw TradeWrongText1
dw TradeWrongText2
dw TradeWrongText3
dw TradeWrongText4
-
-; completed
+; TRADE_COMPLETE
dw TradeCompleteText1
dw TradeCompleteText2
dw TradeCompleteText3
dw TradeCompleteText4
-
-; after
+; TRADE_AFTER
dw TradeAfterText1
dw TradeAfterText2
dw TradeAfterText3
diff --git a/engine/overworld.asm b/engine/overworld.asm
index 68b8adaed..4c379711d 100755
--- a/engine/overworld.asm
+++ b/engine/overworld.asm
@@ -23,7 +23,7 @@ Function14146: ; mobile
push af
res 7, [hl]
set 6, [hl]
- call MapCallbackSprites_LoadUsedSpritesGFX
+ call Special_LoadUsedSpritesGFX
pop af
ld [wSpriteFlags], a
ret
@@ -35,15 +35,15 @@ Function14157: ; mobile
push af
set 7, [hl]
res 6, [hl]
- call MapCallbackSprites_LoadUsedSpritesGFX
+ call Special_LoadUsedSpritesGFX
pop af
ld [wSpriteFlags], a
ret
; 14168
-RefreshSprites:: ; 14168
+Special_RefreshSprites:: ; 14168
call .Refresh
- call MapCallbackSprites_LoadUsedSpritesGFX
+ call Special_LoadUsedSpritesGFX
ret
; 1416f
@@ -77,7 +77,7 @@ GetPlayerSprite: ; 14183
cp c
jr z, .good
inc hl
- cp $ff
+ cp -1
jr nz, .loop
; Any player state not in the array defaults to Chris's sprite.
@@ -100,14 +100,14 @@ GetPlayerSprite: ; 14183
db PLAYER_BIKE, SPRITE_CHRIS_BIKE
db PLAYER_SURF, SPRITE_SURF
db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
- db $ff
+ db -1 ; end
.Kris:
db PLAYER_NORMAL, SPRITE_KRIS
db PLAYER_BIKE, SPRITE_KRIS_BIKE
db PLAYER_SURF, SPRITE_SURF
db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
- db $ff
+ db -1 ; end
; 141c9
@@ -164,7 +164,7 @@ AddOutdoorSprites: ; 141ee
; 14209
-MapCallbackSprites_LoadUsedSpritesGFX: ; 14209
+Special_LoadUsedSpritesGFX: ; 14209
ld a, MAPCALLBACK_SPRITES
call RunMapCallback
call GetUsedSprites
@@ -719,10 +719,10 @@ LoadEmote:: ; 1442f
; 1444d
-INCLUDE "data/emotes.asm"
+INCLUDE "data/sprites/emotes.asm"
-INCLUDE "data/sprite_mons.asm"
+INCLUDE "data/sprites/sprite_mons.asm"
INCLUDE "data/maps/outdoor_sprites.asm"
-INCLUDE "data/sprites.asm"
+INCLUDE "data/sprites/sprites.asm"
diff --git a/engine/pack.asm b/engine/pack.asm
index 131af0736..e4d9eea4d 100644
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -1,3 +1,17 @@
+; Pack.Jumptable and BattlePack.Jumptable indexes
+ const_def
+ const PACKSTATE_INITGFX ; 0
+ const PACKSTATE_INITITEMSPOCKET ; 1
+ const PACKSTATE_ITEMSPOCKETMENU ; 2
+ const PACKSTATE_INITBALLSPOCKET ; 3
+ const PACKSTATE_BALLSPOCKETMENU ; 4
+ const PACKSTATE_INITKEYITEMSPOCKET ; 5
+ const PACKSTATE_KEYITEMSPOCKETMENU ; 6
+ const PACKSTATE_INITTMHMPOCKET ; 7
+ const PACKSTATE_TMHMPOCKETMENU ; 8
+ const PACKSTATE_QUITNOSCRIPT ; 9
+ const PACKSTATE_QUITRUNSCRIPT ; 10
+
Pack: ; 10000
ld hl, Options
set NO_TEXT_SCROLL, [hl]
@@ -28,6 +42,7 @@ Pack: ; 10000
; 10030
.Jumptable: ; 10030 (4:4030)
+; entries correspond to PACKSTATE_* constants
dw .InitGFX ; 0
dw .InitItemsPocket ; 1
dw .ItemsPocketMenu ; 2
@@ -44,13 +59,13 @@ Pack: ; 10000
xor a
ld [hBGMapMode], a
call Pack_InitGFX
- ld a, [wcf64]
+ ld a, [wPackJumptableIndex]
ld [wJumptableIndex], a
call Pack_InitColors
ret
.InitItemsPocket: ; 10056 (4:4056)
- xor a
+ xor a ; ITEM_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -70,15 +85,15 @@ Pack: ; 10000
ld [wItemsPocketScrollPosition], a
ld a, [wMenuCursorY]
ld [wItemsPocketCursor], a
- ld b, $7
- ld c, $3
+ ld b, PACKSTATE_INITTMHMPOCKET ; left
+ ld c, PACKSTATE_INITBALLSPOCKET ; right
call Pack_InterpretJoypad
ret c
call .ItemBallsKey_LoadSubmenu
ret
.InitKeyItemsPocket: ; 10094 (4:4094)
- ld a, $2
+ ld a, KEY_ITEM_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -98,15 +113,15 @@ Pack: ; 10000
ld [wKeyItemsPocketScrollPosition], a
ld a, [wMenuCursorY]
ld [wKeyItemsPocketCursor], a
- ld b, $3
- ld c, $7
+ ld b, PACKSTATE_INITBALLSPOCKET ; left
+ ld c, PACKSTATE_INITTMHMPOCKET ; right
call Pack_InterpretJoypad
ret c
call .ItemBallsKey_LoadSubmenu
ret
.InitTMHMPocket: ; 100d3 (4:40d3)
- ld a, $3
+ ld a, TM_HM_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -118,8 +133,8 @@ Pack: ; 10000
.TMHMPocketMenu: ; 100e8 (4:40e8)
farcall TMHMPocket
- ld b, $5
- ld c, $1
+ ld b, PACKSTATE_INITKEYITEMSPOCKET ; left
+ ld c, PACKSTATE_INITITEMSPOCKET ; right
call Pack_InterpretJoypad
ret c
farcall _CheckTossableItem
@@ -148,8 +163,7 @@ Pack: ; 10000
; 10124 (4:4124)
.MenuDataHeader1: ; 0x10124
db $40 ; flags
- db 07, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2_1
db 1 ; default option
; 0x1012c
@@ -162,7 +176,6 @@ Pack: ; 10000
; 0x10137
.Jumptable1: ; 10137
-
dw .UseItem
dw QuitItemSubmenu
@@ -170,8 +183,7 @@ Pack: ; 10000
.MenuDataHeader2: ; 0x1013b
db $40 ; flags
- db 05, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2_2
db 1 ; default option
; 0x10143
@@ -211,7 +223,7 @@ Pack: ; 10000
ret
.InitBallsPocket: ; 10186 (4:4186)
- ld a, $1
+ ld a, BALL_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -231,8 +243,8 @@ Pack: ; 10000
ld [wBallsPocketScrollPosition], a
ld a, [wMenuCursorY]
ld [wBallsPocketCursor], a
- ld b, $1
- ld c, $5
+ ld b, PACKSTATE_INITITEMSPOCKET ; left
+ ld c, PACKSTATE_INITKEYITEMSPOCKET ; right
call Pack_InterpretJoypad
ret c
call .ItemBallsKey_LoadSubmenu
@@ -310,8 +322,7 @@ Pack: ; 10000
; 10249 (4:4249)
MenuDataHeader_UsableKeyItem: ; 0x10249
db $40 ; flags
- db 01, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10251
@@ -327,7 +338,6 @@ MenuDataHeader_UsableKeyItem: ; 0x10249
; 0x1026a
Jumptable_UseGiveTossRegisterQuit: ; 1026a
-
dw UseItem
dw GiveItem
dw TossMenu
@@ -337,8 +347,7 @@ Jumptable_UseGiveTossRegisterQuit: ; 1026a
MenuDataHeader_UsableItem: ; 0x10274
db $40 ; flags
- db 03, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x1027c
@@ -353,7 +362,6 @@ MenuDataHeader_UsableItem: ; 0x10274
; 0x10291
Jumptable_UseGiveTossQuit: ; 10291
-
dw UseItem
dw GiveItem
dw TossMenu
@@ -362,8 +370,7 @@ Jumptable_UseGiveTossQuit: ; 10291
MenuDataHeader_UnusableItem: ; 0x10299
db %01000000 ; flags
- db 07, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x102a1
@@ -376,15 +383,13 @@ MenuDataHeader_UnusableItem: ; 0x10299
; 0x102ac
Jumptable_UseQuit: ; 102ac
-
dw UseItem
dw QuitItemSubmenu
; 102b0
MenuDataHeader_UnusableKeyItem: ; 0x102b0
db %01000000 ; flags
- db 05, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x102b8
@@ -398,7 +403,6 @@ MenuDataHeader_UnusableKeyItem: ; 0x102b0
; 0x102c7
Jumptable_UseRegisterQuit: ; 102c7
-
dw UseItem
dw RegisterItem
dw QuitItemSubmenu
@@ -406,8 +410,7 @@ Jumptable_UseRegisterQuit: ; 102c7
MenuDataHeader_HoldableKeyItem: ; 0x102cd
db $40 ; flags
- db 03, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x102d5
@@ -422,7 +425,6 @@ MenuDataHeader_HoldableKeyItem: ; 0x102cd
; 0x102ea
Jumptable_GiveTossRegisterQuit: ; 102ea
-
dw GiveItem
dw TossMenu
dw RegisterItem
@@ -431,8 +433,7 @@ Jumptable_GiveTossRegisterQuit: ; 102ea
MenuDataHeader_HoldableItem: ; 0x102f2
db $40 ; flags
- db 05, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x102fa
@@ -446,7 +447,6 @@ MenuDataHeader_HoldableItem: ; 0x102f2
; 0x1030b
Jumptable_GiveTossQuit: ; 1030b
-
dw GiveItem
dw TossMenu
dw QuitItemSubmenu
@@ -462,14 +462,14 @@ UseItem: ; 10311
; 1031f
.dw ; 1031f (4:431f)
-
+; entries correspond to ITEMMENU_* constants
+ dw .Oak ; ITEMMENU_NOUSE
dw .Oak
dw .Oak
dw .Oak
- dw .Oak
- dw .Current
- dw .Party
- dw .Field
+ dw .Current ; ITEMMENU_CURRENT
+ dw .Party ; ITEMMENU_PARTY
+ dw .Field ; ITEMMENU_CLOSE
; 1035c
.Oak: ; 1032d (4:432d)
@@ -503,7 +503,7 @@ UseItem: ; 10311
ld a, [wItemEffectSucceeded]
and a
jr z, .Oak
- ld a, $a
+ ld a, PACKSTATE_QUITRUNSCRIPT
ld [wJumptableIndex], a
ret
; 10364 (4:4364)
@@ -534,14 +534,13 @@ TossMenu: ; 10364
ret
; 1039d
-ResetPocketCursorPositions: ; 1039d
-; unreferenced
+Unreferenced_ResetPocketCursorPositions: ; 1039d
ld a, [wCurrPocket]
- and a
+ and a ; ITEM_POCKET
jr z, .items
- dec a
+ dec a ; BALL_POCKET
jr z, .balls
- dec a
+ dec a ; KEY_ITEM_POCKET
jr z, .key
ret
@@ -626,7 +625,7 @@ GiveItem: ; 103fd
.give
ld a, [wJumptableIndex]
push af
- ld a, [wcf64]
+ ld a, [wPackJumptableIndex]
push af
call GetCurNick
ld hl, StringBuffer1
@@ -635,7 +634,7 @@ GiveItem: ; 103fd
call CopyBytes
call TryGiveItemToPartymon
pop af
- ld [wcf64], a
+ ld [wPackJumptableIndex], a
pop af
ld [wJumptableIndex], a
.finish
@@ -693,6 +692,7 @@ BattlePack: ; 10493
; 104c3
.Jumptable: ; 104c3 (4:44c3)
+; entries correspond to PACKSTATE_* constants
dw .InitGFX ; 0
dw .InitItemsPocket ; 1
dw .ItemsPocketMenu ; 2
@@ -709,13 +709,13 @@ BattlePack: ; 10493
xor a
ld [hBGMapMode], a
call Pack_InitGFX
- ld a, [wcf64]
+ ld a, [wPackJumptableIndex]
ld [wJumptableIndex], a
call Pack_InitColors
ret
.InitItemsPocket: ; 104e9 (4:44e9)
- xor a
+ xor a ; ITEM_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -735,15 +735,15 @@ BattlePack: ; 10493
ld [wItemsPocketScrollPosition], a
ld a, [wMenuCursorY]
ld [wItemsPocketCursor], a
- ld b, $7
- ld c, $3
+ ld b, PACKSTATE_INITTMHMPOCKET ; left
+ ld c, PACKSTATE_INITBALLSPOCKET ; right
call Pack_InterpretJoypad
ret c
call ItemSubmenu
ret
.InitKeyItemsPocket: ; 10527 (4:4527)
- ld a, $2
+ ld a, KEY_ITEM_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -763,15 +763,15 @@ BattlePack: ; 10493
ld [wKeyItemsPocketScrollPosition], a
ld a, [wMenuCursorY]
ld [wKeyItemsPocketCursor], a
- ld b, $3
- ld c, $7
+ ld b, PACKSTATE_INITBALLSPOCKET ; left
+ ld c, PACKSTATE_INITTMHMPOCKET ; right
call Pack_InterpretJoypad
ret c
call ItemSubmenu
ret
.InitTMHMPocket: ; 10566 (4:4566)
- ld a, $3
+ ld a, TM_HM_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -785,8 +785,8 @@ BattlePack: ; 10493
.TMHMPocketMenu: ; 10581 (4:4581)
farcall TMHMPocket
- ld b, $5
- ld c, $1
+ ld b, PACKSTATE_INITKEYITEMSPOCKET ; left
+ ld c, PACKSTATE_INITITEMSPOCKET ; right
call Pack_InterpretJoypad
ret c
xor a
@@ -794,7 +794,7 @@ BattlePack: ; 10493
ret
.InitBallsPocket: ; 10594 (4:4594)
- ld a, $1
+ ld a, BALL_POCKET
ld [wCurrPocket], a
call ClearPocketList
call DrawPocketName
@@ -814,8 +814,8 @@ BattlePack: ; 10493
ld [wBallsPocketScrollPosition], a
ld a, [wMenuCursorY]
ld [wBallsPocketCursor], a
- ld b, $1
- ld c, $5
+ ld b, PACKSTATE_INITITEMSPOCKET ; left
+ ld c, PACKSTATE_INITKEYITEMSPOCKET ; right
call Pack_InterpretJoypad
ret c
call ItemSubmenu
@@ -849,8 +849,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
; 10601 (4:4601)
.UsableMenuDataHeader: ; 0x10601
db $40 ; flags
- db 07, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .UsableMenuData2
db 1 ; default option
; 0x10609
@@ -869,8 +868,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
.UnusableMenuDataHeader: ; 0x10618
db $40 ; flags
- db 09, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .UnusableMenuData2
db 1 ; default option
; 0x10620
@@ -893,13 +891,14 @@ TMHMSubmenu: ; 105dc (4:45dc)
ret
.ItemFunctionJumptable: ; 10637 (4:4637)
+; entries correspond to ITEMMENU_* constants
+ dw .Oak ; ITEMMENU_NOUSE
dw .Oak
dw .Oak
dw .Oak
- dw .Oak
- dw .Unused
- dw .BattleField
- dw .BattleOnly
+ dw .Unused ; ITEMMENU_CURRENT
+ dw .BattleField ; ITEMMENU_PARTY
+ dw .BattleOnly ; ITEMMENU_CLOSE
.Oak: ; 10645 (4:4645)
ld hl, Text_ThisIsntTheTime
@@ -937,7 +936,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
cp $2
jr z, .didnt_use_item
.quit_run_script ; 1067e (4:467e)
- ld a, 10
+ ld a, PACKSTATE_QUITRUNSCRIPT
ld [wJumptableIndex], a
ret
@@ -953,15 +952,16 @@ TMHMSubmenu: ; 105dc (4:45dc)
InitPackBuffers: ; 1068a
xor a
ld [wJumptableIndex], a
+ ; pocket id -> jumptable index
ld a, [wLastPocket]
- and $3
+ maskbits NUM_POCKETS +- 1
ld [wCurrPocket], a
inc a
add a
dec a
- ld [wcf64], a
- xor a
- ld [wcf66], a
+ ld [wPackJumptableIndex], a
+ xor a ; FALSE
+ ld [wPackUsedItem], a
xor a
ld [wSwitchItem], a
ret
@@ -970,10 +970,10 @@ InitPackBuffers: ; 1068a
DepositSellInitPackBuffers: ; 106a5
xor a
ld [hBGMapMode], a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wCurrPocket], a
- ld [wcf66], a
+ ld [wJumptableIndex], a ; PACKSTATE_INITGFX
+ ld [wPackJumptableIndex], a ; PACKSTATE_INITGFX
+ ld [wCurrPocket], a ; ITEM_POCKET
+ ld [wPackUsedItem], a
ld [wSwitchItem], a
call Pack_InitGFX
call Pack_InitColors
@@ -997,13 +997,14 @@ DepositSellPack: ; 106be
; 106d1
.Jumptable: ; 106d1 (4:46d1)
+; entries correspond to *_POCKET constants
dw .ItemsPocket
dw .BallsPocket
dw .KeyItemsPocket
dw .TMHMPocket
.ItemsPocket: ; 106d9 (4:46d9)
- xor a
+ xor a ; ITEM_POCKET
call InitPocket
ld hl, PC_Mart_ItemsPocketMenuDataHeader
call CopyMenuDataHeader
@@ -1019,7 +1020,7 @@ DepositSellPack: ; 106be
ret
.KeyItemsPocket: ; 106ff (4:46ff)
- ld a, 2
+ ld a, KEY_ITEM_POCKET
call InitPocket
ld hl, PC_Mart_KeyItemsPocketMenuDataHeader
call CopyMenuDataHeader
@@ -1035,7 +1036,7 @@ DepositSellPack: ; 106be
ret
.TMHMPocket: ; 10726 (4:4726)
- ld a, 3
+ ld a, TM_HM_POCKET
call InitPocket
call WaitBGMap_DrawPackGFX
farcall TMHMPocket
@@ -1044,7 +1045,7 @@ DepositSellPack: ; 106be
ret
.BallsPocket: ; 1073b (4:473b)
- ld a, 1
+ ld a, BALL_POCKET
call InitPocket
ld hl, PC_Mart_BallsPocketMenuDataHeader
call CopyMenuDataHeader
@@ -1085,20 +1086,20 @@ DepositSellTutorial_InterpretJoypad: ; 1076f
.a_button
ld a, TRUE
- ld [wcf66], a
+ ld [wPackUsedItem], a
and a
ret
.b_button
- xor a
- ld [wcf66], a
+ xor a ; FALSE
+ ld [wPackUsedItem], a
and a
ret
.d_left
ld a, [wJumptableIndex]
dec a
- and $3
+ maskbits NUM_POCKETS +- 1
ld [wJumptableIndex], a
push de
ld de, SFX_SWITCH_POCKETS
@@ -1110,7 +1111,7 @@ DepositSellTutorial_InterpretJoypad: ; 1076f
.d_right
ld a, [wJumptableIndex]
inc a
- and $3
+ maskbits NUM_POCKETS +- 1
ld [wJumptableIndex], a
push de
ld de, SFX_SWITCH_POCKETS
@@ -1130,8 +1131,8 @@ TutorialPack: ; 107bb
call .RunJumptable
call DepositSellTutorial_InterpretJoypad
jr c, .loop
- xor a
- ld [wcf66], a
+ xor a ; FALSE
+ ld [wPackUsedItem], a
ret
; 107d7
@@ -1144,22 +1145,21 @@ TutorialPack: ; 107bb
; 107e1
.dw ; 107e1 (4:47e1)
-
+; entries correspond to *_POCKET constants
dw .Items
dw .Balls
dw .KeyItems
dw .TMHM
.Items: ; 107e9 (4:47e9)
- xor a
+ xor a ; ITEM_POCKET
ld hl, .ItemsMenuDataHeader
jr .DisplayPocket
; 107ef (4:47ef)
.ItemsMenuDataHeader: ; 0x107ef
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .ItemsMenuData2
db 1 ; default option
; 0x107f7
@@ -1175,15 +1175,14 @@ TutorialPack: ; 107bb
; 10807
.KeyItems: ; 10807 (4:4807)
- ld a, 2
+ ld a, KEY_ITEM_POCKET
ld hl, .KeyItemsMenuDataHeader
jr .DisplayPocket
; 1080e (4:480e)
.KeyItemsMenuDataHeader: ; 0x1080e
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .KeyItemsMenuData2
db 1 ; default option
; 0x10816
@@ -1199,7 +1198,7 @@ TutorialPack: ; 107bb
; 10826
.TMHM: ; 10826 (4:4826)
- ld a, 3
+ ld a, TM_HM_POCKET
call InitPocket
call WaitBGMap_DrawPackGFX
farcall TMHMPocket
@@ -1208,15 +1207,14 @@ TutorialPack: ; 107bb
ret
.Balls: ; 1083b (4:483b)
- ld a, 1
+ ld a, BALL_POCKET
ld hl, .BallsMenuDataHeader
jr .DisplayPocket
; 10842 (4:4842)
.BallsMenuDataHeader: ; 0x10842
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .BallsMenuData2
db 1 ; default option
; 0x1084a
@@ -1258,15 +1256,15 @@ Pack_GetJumptablePointer: ; 1086b
Pack_QuitNoScript: ; 10874 (4:4874)
ld hl, wJumptableIndex
set 7, [hl]
- xor a
- ld [wcf66], a
+ xor a ; FALSE
+ ld [wPackUsedItem], a
ret
Pack_QuitRunScript: ; 1087e (4:487e)
ld hl, wJumptableIndex
set 7, [hl]
ld a, TRUE
- ld [wcf66], a
+ ld [wPackUsedItem], a
ret
Pack_PrintTextNoScroll: ; 10889 (4:4889)
@@ -1283,7 +1281,7 @@ WaitBGMap_DrawPackGFX: ; 1089a (4:489a)
call WaitBGMap
DrawPackGFX: ; 1089d
ld a, [wCurrPocket]
- and $3
+ maskbits NUM_POCKETS +- 1
ld e, a
ld d, $0
ld a, [BattleType]
@@ -1310,10 +1308,10 @@ DrawPackGFX: ; 1089d
; 108cc
PackGFXPointers: ; 108cc
- dw PackGFX + (15 tiles) * 1
- dw PackGFX + (15 tiles) * 3
- dw PackGFX + (15 tiles) * 0
- dw PackGFX + (15 tiles) * 2
+ dw PackGFX + (15 tiles) * 1 ; ITEM_POCKET
+ dw PackGFX + (15 tiles) * 3 ; BALL_POCKET
+ dw PackGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET
+ dw PackGFX + (15 tiles) * 2 ; TM_HM_POCKET
; 108d4
Pack_InterpretJoypad: ; 108d4 (4:48d4)
@@ -1344,7 +1342,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
ret
.b_button
- ld a, 9
+ ld a, PACKSTATE_QUITNOSCRIPT
ld [wJumptableIndex], a
scf
ret
@@ -1352,7 +1350,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
.d_left
ld a, b
ld [wJumptableIndex], a
- ld [wcf64], a
+ ld [wPackJumptableIndex], a
push de
ld de, SFX_SWITCH_POCKETS
call PlaySFX
@@ -1363,7 +1361,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
.d_right
ld a, c
ld [wJumptableIndex], a
- ld [wcf64], a
+ ld [wPackJumptableIndex], a
push de
ld de, SFX_SWITCH_POCKETS
call PlaySFX
@@ -1489,15 +1487,19 @@ DrawPocketName: ; 109bb
; 109e1
.tilemap ; 109e1
+; ITEM_POCKET
db $00, $04, $04, $04, $01 ; top border
db $06, $07, $08, $09, $0a ; Items
db $02, $05, $05, $05, $03 ; bottom border
+; BALL_POCKET
db $00, $04, $04, $04, $01 ; top border
db $15, $16, $17, $18, $19 ; Balls
db $02, $05, $05, $05, $03 ; bottom border
+; KEY_ITEM_POCKET
db $00, $04, $04, $04, $01 ; top border
db $0b, $0c, $0d, $0e, $0f ; Key Items
db $02, $05, $05, $05, $03 ; bottom border
+; TM_HM_POCKET
db $00, $04, $04, $04, $01 ; top border
db $10, $11, $12, $13, $14 ; TM/HM
db $02, $05, $05, $05, $03 ; bottom border
@@ -1511,8 +1513,7 @@ Pack_GetItemName: ; 10a1d
ret
; 10a2a
-Pack_ClearTilemap: ; 10a2a
-; unreferenced
+Unreferenced_Pack_ClearTilemap: ; 10a2a
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
@@ -1537,8 +1538,7 @@ Pack_InitColors: ; 10a40
ItemsPocketMenuDataHeader: ; 0x10a4f
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10a57
@@ -1555,8 +1555,7 @@ ItemsPocketMenuDataHeader: ; 0x10a4f
PC_Mart_ItemsPocketMenuDataHeader: ; 0x10a67
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10a6f
@@ -1573,8 +1572,7 @@ PC_Mart_ItemsPocketMenuDataHeader: ; 0x10a67
KeyItemsPocketMenuDataHeader: ; 0x10a7f
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10a87
@@ -1591,8 +1589,7 @@ KeyItemsPocketMenuDataHeader: ; 0x10a7f
PC_Mart_KeyItemsPocketMenuDataHeader: ; 0x10a97
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10a9f
@@ -1609,8 +1606,7 @@ PC_Mart_KeyItemsPocketMenuDataHeader: ; 0x10a97
BallsPocketMenuDataHeader: ; 0x10aaf
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10ab7
@@ -1627,8 +1623,7 @@ BallsPocketMenuDataHeader: ; 0x10aaf
PC_Mart_BallsPocketMenuDataHeader: ; 0x10ac7
db $40 ; flags
- db 01, 07 ; start coords
- db 11, 19 ; end coords
+ menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
; 0x10acf
diff --git a/engine/party_menu.asm b/engine/party_menu.asm
index 0415e29e4..1efcfe417 100644
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -50,23 +50,23 @@ WritePartyMenuTilemap: ; 0x5005f
ld hl, Options
ld a, [hl]
push af
- set 4, [hl] ; Disable text delay
+ set NO_TEXT_SCROLL, [hl]
xor a
ld [hBGMapMode], a
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill ; blank the tilemap
- call GetPartyMenuTilemapPointers ; This reads from a pointer table???
+ call GetPartyMenuQualityIndexes
.loop
ld a, [hli]
- cp $ff
- jr z, .end ; 0x5007a $8
+ cp -1
+ jr z, .end
push hl
ld hl, .Jumptable
rst JumpTable
pop hl
- jr .loop ; 0x50082 $f3
+ jr .loop
.end
pop af
ld [Options], a
@@ -74,6 +74,7 @@ WritePartyMenuTilemap: ; 0x5005f
; 0x50089
.Jumptable: ; 50089
+; entries correspond to PARTYMENUQUALITY_* constants
dw PlacePartyNicknames
dw PlacePartyHPBar
dw PlacePartyMenuHPDigits
@@ -188,7 +189,7 @@ PlacePartymonHPBar: ; 50117
ld d, a
ld a, [hli]
ld e, a
- predef ComputeHPBarPixels
+ predef Predef_ComputeHPBarPixels
ret
; 50138
@@ -297,7 +298,7 @@ PlacePartyMonStatus: ; 501b2
ld e, l
ld d, h
pop hl
- call PlaceStatusString
+ call Predef_PlaceStatusString
.next
pop hl
@@ -329,7 +330,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0
add hl, de
ld a, [hl]
ld [CurPartySpecies], a
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
pop hl
call .PlaceAbleNotAble
call PlaceString
@@ -468,7 +469,7 @@ PlacePartyMonGender: ; 502b1
ld [CurPartyMon], a
xor a
ld [MonType], a
- call GetGender
+ call Predef_GetGender
ld de, .unknown
jr c, .got_gender
ld de, .male
@@ -598,7 +599,7 @@ PartyMenuCheckEgg: ; 50389
ret
; 50396
-GetPartyMenuTilemapPointers: ; 50396
+GetPartyMenuQualityIndexes: ; 50396
ld a, [PartyMenuActionText]
and $f0
jr nz, .skip
@@ -606,7 +607,7 @@ GetPartyMenuTilemapPointers: ; 50396
and $f
ld e, a
ld d, 0
- ld hl, .Pointers
+ ld hl, PartyMenuQualityPointers
add hl, de
add hl, de
ld a, [hli]
@@ -615,29 +616,11 @@ GetPartyMenuTilemapPointers: ; 50396
ret
.skip
- ld hl, .Default
+ ld hl, PartyMenuQualityPointers.Default
ret
; 503b2
-.Pointers: ; 503b2
- dw .Default
- dw .Default
- dw .Default
- dw .TMHM
- dw .Default
- dw .EvoStone
- dw .Gender
- dw .Gender
- dw .Default
- dw .Mobile
-; 503c6
-
-.Default: db 0, 1, 2, 3, 4, $ff
-.TMHM: db 0, 5, 3, 4, $ff
-.EvoStone: db 0, 6, 3, 4, $ff
-.Gender: db 0, 7, 3, 4, $ff
-.Mobile: db 0, 8, 3, 4, $ff
-; 503e0
+INCLUDE "data/party_menu_qualities.asm"
InitPartyMenuGFX: ; 503e0
@@ -817,25 +800,33 @@ PartyMenuStrings: ; 0x504d2
ChooseAMonString: ; 0x504e4
db "Choose a #MON.@"
+
UseOnWhichPKMNString: ; 0x504f3
db "Use on which <PK><MN>?@"
+
WhichPKMNString: ; 0x50504
db "Which <PK><MN>?@"
+
TeachWhichPKMNString: ; 0x5050e
db "Teach which <PK><MN>?@"
+
MoveToWhereString: ; 0x5051e
db "Move to where?@"
-ChooseAFemalePKMNString: ; 0x5052d ; UNUSED
+
+ChooseAFemalePKMNString: ; 0x5052d
+; unused
db "Choose a ♀<PK><MN>.@"
-ChooseAMalePKMNString: ; 0x5053b ; UNUSED
+
+ChooseAMalePKMNString: ; 0x5053b
+; unused
db "Choose a ♂<PK><MN>.@"
+
ToWhichPKMNString: ; 0x50549
db "To which <PK><MN>?@"
YouHaveNoPKMNString: ; 0x50556
db "You have no <PK><MN>!@"
-
PrintPartyMenuActionText: ; 50566
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
diff --git a/engine/phone/buenas_password.asm b/engine/phone/buenas_password.asm
index 858ce5540..0d144afa6 100644
--- a/engine/phone/buenas_password.asm
+++ b/engine/phone/buenas_password.asm
@@ -167,4 +167,4 @@ BuenaPhoneScript_Random1:
end
; a0c28
-INCLUDE "text/phone/buena.asm"
+INCLUDE "data/phone/text/buena.asm"
diff --git a/engine/phone/generic_calls.asm b/engine/phone/generic_calls.asm
index e1b53a950..937fc67c0 100644
--- a/engine/phone/generic_calls.asm
+++ b/engine/phone/generic_calls.asm
@@ -1240,7 +1240,7 @@ PhoneScript_Generic_Female:
end
PhoneScript_MonFlavorText:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farscall PhoneScript_Random2
if_equal $0, .TooEnergetic
farwritetext UnknownText_0x1b518b
diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm
index 53bb519b3..be18c569e 100644
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -75,20 +75,20 @@ GetRemainingSpaceInPhoneList: ; 90040
cp -1
jr z, .done
cp c
- jr z, .elm_or_mom
+ jr z, .continue
+
push bc
push hl
ld c, a
call _CheckCellNum
- jr c, .elm_or_mom_in_list
+ jr c, .permanent
ld hl, Buffer1
inc [hl]
-
-.elm_or_mom_in_list
+.permanent
pop hl
pop bc
-.elm_or_mom
+.continue
jr .loop
.done
@@ -98,9 +98,7 @@ GetRemainingSpaceInPhoneList: ; 90040
ret
; 90066
-PermanentNumbers: ; 90066
- db PHONECONTACT_MOM, PHONECONTACT_ELM, -1
-; 90069
+INCLUDE "data/phone/permanent_numbers.asm"
FarPlaceString: ; 90069
@@ -439,7 +437,7 @@ WrongNumber: ; 90233
; 90241
Script_ReceivePhoneCall: ; 0x90241
- refreshscreen $0
+ refreshscreen
callasm RingTwice_StartCall
ptcall wPhoneScriptPointer
waitbutton
@@ -471,7 +469,7 @@ UnknownScript_0x90261: ; 0x90261
RingTwice_StartCall: ; 9026f
call .Ring
call .Ring
- farcall TrainerRankings_PhoneCalls
+ farcall StubbedTrainerRankings_PhoneCalls
ret
; 9027c
@@ -500,7 +498,7 @@ PhoneCall:: ; 9029a
ld [PhoneCaller + 1], a
call Phone_FirstOfTwoRings
call Phone_FirstOfTwoRings
- farcall TrainerRankings_PhoneCalls
+ farcall StubbedTrainerRankings_PhoneCalls
ret
; 902b3
@@ -761,9 +759,9 @@ GetCallerLocation: ; 90439
; 9045f
-INCLUDE "data/phone_contacts.asm"
+INCLUDE "data/phone/phone_contacts.asm"
-INCLUDE "data/phone_special.asm"
+INCLUDE "data/phone/special_calls.asm"
UnknownScript_0x90657: ; 0x90657
diff --git a/engine/phone/phone_callers.asm b/engine/phone/phone_callers.asm
index c90448d33..cb333ae8d 100644
--- a/engine/phone/phone_callers.asm
+++ b/engine/phone/phone_callers.asm
@@ -1,5 +1,5 @@
Phone_GenericCall_Male:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farscall PhoneScript_Random2
if_equal 0, .Bragging
farscall PhoneScript_Generic_Male
@@ -9,7 +9,7 @@ Phone_GenericCall_Male:
farjump Phone_BraggingCall_Male
Phone_GenericCall_Female:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farscall PhoneScript_Random2
if_equal 0, .Bragging
farscall PhoneScript_Generic_Female
@@ -27,7 +27,7 @@ Phone_BraggingCall_Female:
farjump Phone_FoundAMon_Female
Phone_FoundAMon_Male:
- special RandomPhoneWildMon
+ special Special_RandomPhoneWildMon
farscall PhoneScript_Random2
if_equal 0, .GotAway
farscall Phone_WhoDefeatedMon_Male
@@ -37,7 +37,7 @@ Phone_FoundAMon_Male:
farjump Phone_GotAwayCall_Male
Phone_FoundAMon_Female:
- special RandomPhoneWildMon
+ special Special_RandomPhoneWildMon
farscall PhoneScript_Random2
if_equal 0, .GotAway
farscall Phone_WhoDefeatedMon_Female
@@ -851,7 +851,7 @@ Phone_CheckIfUnseenRare_Female:
farjump PhoneScript_HangupText_Female
PhoneScriptRareWildMon:
- special RandomUnseenWildMon
+ special Special_RandomUnseenWildMon
end
PhoneScript_BugCatchingContest:
diff --git a/engine/phone/phone_scripts.asm b/engine/phone/phone_scripts.asm
index 62eb4ac87..646040641 100644
--- a/engine/phone/phone_scripts.asm
+++ b/engine/phone/phone_scripts.asm
@@ -20,10 +20,10 @@ MomPhoneScript: ; 0xbceaa
iftrue MomPhoneHangUpScript
farwritetext MomPhoneGreetingText
buttonsound
- mapnametotext $0
+ mapnametotext MEM_BUFFER_0
checkcode VAR_ROOFPALETTE
- if_equal $1, MomPhonePalette1
- if_equal $2, MomPhonePalette2
+ if_equal 1, MomPhonePalette1
+ if_equal 2, MomPhonePalette2
jump MomPhoneOther
MomPhoneLandmark: ; 0xbcedf
@@ -53,13 +53,13 @@ MomPhonePalette1: ; 0xbcee7
jump MomSavingMoney
.violet ; 0xbcf15
- landmarktotext SPROUT_TOWER, 1
+ landmarktotext SPROUT_TOWER, MEM_BUFFER_1
jump MomPhoneLandmark
.azalea ; 0xbcf1b
- landmarktotext SLOWPOKE_WELL, 1
+ landmarktotext SLOWPOKE_WELL, MEM_BUFFER_1
jump MomPhoneLandmark
.goldenrod ; 0xbcf21
- landmarktotext RADIO_TOWER, 1
+ landmarktotext RADIO_TOWER, MEM_BUFFER_1
jump MomPhoneLandmark
MomPhonePalette2: ; 0xbcf27
@@ -75,17 +75,17 @@ MomPhoneOther: ; 0xbcf2f
MomSavingMoney: ; 0xbcf37
checkflag ENGINE_MOM_SAVING_MONEY
iffalse MomIsNotSaving
- checkmoney $1, 0
- if_equal $0, MomSavingHasMoney
+ checkmoney MOMS_MONEY, 0
+ if_equal HAVE_MORE, MomSavingHasMoney
jump MomSavingButBroke
MomIsNotSaving: ; 0xbcf49
- checkmoney $1, 0
- if_equal $0, MomHasMoney
+ checkmoney MOMS_MONEY, 0
+ if_equal HAVE_MORE, MomHasMoney
jump MomHasNoMoney
MomSavingHasMoney: ; 0xbcf55
- readmoney $1, $0
+ readmoney MOMS_MONEY, MEM_BUFFER_0
farwritetext MomCheckBalanceText
yesorno
iftrue MomPhoneSaveMoneyScript
@@ -104,7 +104,7 @@ MomHasNoMoney: ; 0xbcf6e
jump MomPhoneWontSaveMoneyScript
MomHasMoney: ; 0xbcf79
- readmoney $1, $0
+ readmoney MOMS_MONEY, MEM_BUFFER_0
farwritetext MomYouveSavedText
yesorno
iftrue MomPhoneSaveMoneyScript
@@ -172,9 +172,9 @@ BillPhoneScript1: ; 0xbcfc5
farwritetext BillPhoneGeneriText
buttonsound
checkcode VAR_BOXSPACE
- RAM2MEM $0
- if_equal $0, .full
- if_less_than $6, .nearlyfull
+ vartomem MEM_BUFFER_0
+ if_equal 0, .full
+ if_less_than PARTY_LENGTH, .nearlyfull
farwritetext BillPhoneNotFullText
end
@@ -195,7 +195,7 @@ BillPhoneScript2: ; 0xbd007
ElmPhoneScript1: ; 0xbd00d
checkcode VAR_SPECIALPHONECALL
- if_equal $1, .pokerus
+ if_equal SPECIALCALL_POKERUS, .pokerus
checkevent EVENT_SHOWED_TOGEPI_TO_ELM
iftrue .discovery
checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
@@ -242,8 +242,8 @@ ElmPhoneScript1: ; 0xbd00d
end
.discovery ; 0xbd069
- random $2
- if_equal $0, .nextdiscovery
+ random 2
+ if_equal 0, .nextdiscovery
farwritetext ElmPhoneDiscovery1Text
end
@@ -258,11 +258,11 @@ ElmPhoneScript1: ; 0xbd00d
ElmPhoneScript2: ; 0xbd081
checkcode VAR_SPECIALPHONECALL
- if_equal $2, .disaster
- if_equal $3, .assistant
- if_equal $4, .rocket
- if_equal $5, .gift
- if_equal $8, .gift
+ if_equal SPECIALCALL_ROBBED, .disaster
+ if_equal SPECIALCALL_ASSISTANT, .assistant
+ if_equal SPECIALCALL_WEIRDBROADCAST, .rocket
+ if_equal SPECIALCALL_SSTICKET, .gift
+ if_equal SPECIALCALL_MASTERBALL, .gift
farwritetext ElmPhonePokerusText
specialphonecall SPECIALCALL_NONE
end
@@ -299,7 +299,7 @@ ElmPhoneScript2: ; 0xbd081
; Jack
JackPhoneScript1:
- trainertotext SCHOOLBOY, JACK1, $0
+ trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0
checkflag ENGINE_JACK
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -314,31 +314,31 @@ JackPhoneScript1:
farjump JackPhoneTips
.WantsBattle:
- landmarktotext NATIONAL_PARK, $2
+ landmarktotext NATIONAL_PARK, MEM_BUFFER_2
farjump JackWantsBattleScript
JackPhoneScript2:
- trainertotext SCHOOLBOY, JACK1, $0
+ trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
- if_equal $0, JackBattleTrivia
+ if_equal 0, JackBattleTrivia
checkflag ENGINE_JACK
iftrue .WaitingForBattle
checkflag ENGINE_JACK_MONDAY_MORNING
iftrue .WaitingForBattle
farscall PhoneScript_Random2
- if_equal $0, JackWantsToBattle
+ if_equal 0, JackWantsToBattle
.WaitingForBattle:
farscall PhoneScript_Random3
- if_equal $0, JackFindsRare
+ if_equal 0, JackFindsRare
farjump Phone_GenericCall_Male
JackMondayMorning:
setflag ENGINE_JACK_MONDAY_MORNING
JackWantsToBattle:
- landmarktotext NATIONAL_PARK, $2
+ landmarktotext NATIONAL_PARK, MEM_BUFFER_2
setflag ENGINE_JACK
farjump PhoneScript_WantsToBattle_Male
@@ -351,36 +351,36 @@ JackBattleTrivia:
; Beverly
BeverlyPhoneScript1:
- trainertotext POKEFANF, BEVERLY1, $0
+ trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0
farscall PhoneScript_AnswerPhone_Female
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue .HasNugget
farjump UnknownScript_0xa0900
.HasNugget:
- landmarktotext NATIONAL_PARK, $2
+ landmarktotext NATIONAL_PARK, MEM_BUFFER_2
farjump UnknownScript_0xa0aa5
BeverlyPhoneScript2:
- trainertotext POKEFANF, BEVERLY1, $0
+ trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue .HasNugget
farscall PhoneScript_Random4
- if_equal $0, .FoundNugget
+ if_equal 0, .FoundNugget
.HasNugget:
farjump Phone_GenericCall_Female
.FoundNugget:
setflag ENGINE_BEVERLY_HAS_NUGGET
- landmarktotext NATIONAL_PARK, $2
+ landmarktotext NATIONAL_PARK, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Female
; Huey
HueyPhoneScript1:
- trainertotext SAILOR, HUEY1, $0
+ trainertotext SAILOR, HUEY1, MEM_BUFFER_0
checkflag ENGINE_HUEY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -392,23 +392,23 @@ HueyPhoneScript1:
iftrue HueyWednesdayNight
.NotWednesday:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farjump UnknownScript_0xa0908
.WantsBattle:
- landmarktotext LIGHTHOUSE, $2
+ landmarktotext LIGHTHOUSE, MEM_BUFFER_2
farjump HueyWantsBattleScript
HueyPhoneScript2:
- trainertotext SAILOR, HUEY1, $0
+ trainertotext SAILOR, HUEY1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_HUEY
iftrue .Flavor
checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
iftrue .Flavor
farscall PhoneScript_Random3
- if_equal $0, HueyWantsBattle
- if_equal $1, HueyWantsBattle
+ if_equal 0, HueyWantsBattle
+ if_equal 1, HueyWantsBattle
.Flavor:
farjump PhoneScript_MonFlavorText
@@ -417,14 +417,14 @@ HueyWednesdayNight:
setflag ENGINE_HUEY_WEDNESDAY_NIGHT
HueyWantsBattle:
- landmarktotext LIGHTHOUSE, $2
+ landmarktotext LIGHTHOUSE, MEM_BUFFER_2
setflag ENGINE_HUEY
farjump PhoneScript_WantsToBattle_Male
; Gaven
GavenPhoneScript1:
- trainertotext COOLTRAINERM, GAVEN3, $0
+ trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0
checkflag ENGINE_GAVEN
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -439,29 +439,29 @@ GavenPhoneScript1:
farjump UnknownScript_0xa0910
.WantsBattle:
- landmarktotext ROUTE_26, $2
+ landmarktotext ROUTE_26, MEM_BUFFER_2
farjump UnknownScript_0xa0a37
GavenPhoneScript2:
- trainertotext COOLTRAINERM, GAVEN3, $0
+ trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_GAVEN
iftrue .WaitingForBattle
checkflag ENGINE_GAVEN_THURSDAY_MORNING
iftrue .WaitingForBattle
farscall PhoneScript_Random2
- if_equal $0, GavenWantsRematch
+ if_equal 0, GavenWantsRematch
.WaitingForBattle:
farscall PhoneScript_Random3
- if_equal $0, GavenFoundRare
+ if_equal 0, GavenFoundRare
farjump Phone_GenericCall_Male
GavenThursdayMorning:
setflag ENGINE_GAVEN_THURSDAY_MORNING
GavenWantsRematch:
- landmarktotext ROUTE_26, $2
+ landmarktotext ROUTE_26, MEM_BUFFER_2
setflag ENGINE_GAVEN
farjump PhoneScript_WantsToBattle_Male
@@ -471,7 +471,7 @@ GavenFoundRare:
; Beth
BethPhoneScript1:
- trainertotext COOLTRAINERF, BETH1, $0
+ trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
checkflag ENGINE_BETH
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -486,18 +486,18 @@ BethPhoneScript1:
farjump UnknownScript_0xa0918
.WantsBattle:
- landmarktotext ROUTE_26, $2
+ landmarktotext ROUTE_26, MEM_BUFFER_2
farjump BethBattleReminderScript
BethPhoneScript2:
- trainertotext COOLTRAINERF, BETH1, $0
+ trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_BETH
iftrue .Generic
checkflag ENGINE_BETH_FRIDAY_AFTERNOON
iftrue .Generic
farscall PhoneScript_Random2
- if_equal $0, BethWantsBattle
+ if_equal 0, BethWantsBattle
.Generic:
farjump Phone_GenericCall_Female
@@ -506,14 +506,14 @@ BethFridayAfternoon:
setflag ENGINE_BETH_FRIDAY_AFTERNOON
BethWantsBattle:
- landmarktotext ROUTE_26, $2
+ landmarktotext ROUTE_26, MEM_BUFFER_2
setflag ENGINE_BETH
farjump PhoneScript_WantsToBattle_Female
; Jose
JosePhoneScript1:
- trainertotext BIRD_KEEPER, JOSE2, $0
+ trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0
checkflag ENGINE_JOSE
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -530,15 +530,15 @@ JosePhoneScript1:
farjump UnknownScript_0xa0920
.WantsBattle:
- landmarktotext ROUTE_27, $2
+ landmarktotext ROUTE_27, MEM_BUFFER_2
farjump UnknownScript_0xa0a41
.HasItem:
- landmarktotext ROUTE_27, $2
+ landmarktotext ROUTE_27, MEM_BUFFER_2
farjump UnknownScript_0xa0a41
JosePhoneScript2:
- trainertotext BIRD_KEEPER, JOSE2, $0
+ trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_JOSE
iftrue .Generic
@@ -547,20 +547,20 @@ JosePhoneScript2:
checkflag ENGINE_JOSE_HAS_STAR_PIECE
iftrue .Generic
farscall PhoneScript_Random3
- if_equal $0, JoseWantsBattle
+ if_equal 0, JoseWantsBattle
farscall PhoneScript_Random3
- if_equal $0, JoseHasStarPiece
+ if_equal 0, JoseHasStarPiece
.Generic:
farscall PhoneScript_Random3
- if_equal $0, JoseFoundRare
+ if_equal 0, JoseFoundRare
farjump Phone_GenericCall_Male
JoseSaturdayNight:
setflag ENGINE_JOSE_SATURDAY_NIGHT
JoseWantsBattle:
- landmarktotext ROUTE_27, $2
+ landmarktotext ROUTE_27, MEM_BUFFER_2
setflag ENGINE_JOSE
farjump PhoneScript_WantsToBattle_Male
@@ -569,13 +569,13 @@ JoseFoundRare:
JoseHasStarPiece:
setflag ENGINE_JOSE_HAS_STAR_PIECE
- landmarktotext ROUTE_27, $2
+ landmarktotext ROUTE_27, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Male
; Reena
ReenaPhoneScript1:
- trainertotext COOLTRAINERF, REENA1, $0
+ trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0
checkflag ENGINE_REENA
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -590,18 +590,18 @@ ReenaPhoneScript1:
farjump UnknownScript_0xa0928
.WantsBattle:
- landmarktotext ROUTE_27, $2
+ landmarktotext ROUTE_27, MEM_BUFFER_2
farjump UnknownScript_0xa0a46
ReenaPhoneScript2:
- trainertotext COOLTRAINERF, REENA1, $0
+ trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_REENA
iftrue .Generic
checkflag ENGINE_REENA_SUNDAY_MORNING
iftrue .Generic
farscall PhoneScript_Random2
- if_equal $0, ReenaWantsBattle
+ if_equal 0, ReenaWantsBattle
.Generic:
farjump Phone_GenericCall_Female
@@ -610,14 +610,14 @@ ReenaSundayMorning:
setflag ENGINE_REENA_SUNDAY_MORNING
ReenaWantsBattle:
- landmarktotext ROUTE_27, $2
+ landmarktotext ROUTE_27, MEM_BUFFER_2
setflag ENGINE_REENA
farjump PhoneScript_WantsToBattle_Female
; Joey
JoeyPhoneScript1:
- trainertotext YOUNGSTER, JOEY1, $0
+ trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0
checkflag ENGINE_JOEY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -629,23 +629,23 @@ JoeyPhoneScript1:
iftrue JoeyMondayAfternoon
.NotMonday:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farjump UnknownScript_0xa0930
.WantsBattle:
- landmarktotext ROUTE_30, $2
+ landmarktotext ROUTE_30, MEM_BUFFER_2
farjump UnknownScript_0xa0a4b
JoeyPhoneScript2:
- trainertotext YOUNGSTER, JOEY1, $0
+ trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_JOEY
iftrue .Generic
checkflag ENGINE_JOEY_MONDAY_AFTERNOON
iftrue .Generic
farscall PhoneScript_Random3
- if_equal $0, JoeyWantsBattle
- if_equal $1, JoeyWantsBattle
+ if_equal 0, JoeyWantsBattle
+ if_equal 1, JoeyWantsBattle
.Generic:
farjump Phone_GenericCall_Male
@@ -654,14 +654,14 @@ JoeyMondayAfternoon:
setflag ENGINE_JOEY_MONDAY_AFTERNOON
JoeyWantsBattle:
- landmarktotext ROUTE_30, $2
+ landmarktotext ROUTE_30, MEM_BUFFER_2
setflag ENGINE_JOEY
farjump PhoneScript_WantsToBattle_Male
; Wade
WadePhoneScript1:
- trainertotext BUG_CATCHER, WADE1, $0
+ trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0
checkflag ENGINE_WADE
iftrue WadeWantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -676,7 +676,7 @@ WadePhoneScript1:
.NotTuesday:
farscall PhoneScript_Random2
- if_equal $0, .NoContest
+ if_equal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
checkcode VAR_WEEKDAY
@@ -691,18 +691,18 @@ WadeContestToday:
farjump PhoneScript_BugCatchingContest
WadeWantsBattle:
- landmarktotext ROUTE_31, $2
+ landmarktotext ROUTE_31, MEM_BUFFER_2
farjump UnknownScript_0xa0a50
WadeHasItem:
- landmarktotext ROUTE_31, $2
+ landmarktotext ROUTE_31, MEM_BUFFER_2
farjump UnknownScript_0xa0ab5
WadePhoneScript2:
- trainertotext BUG_CATCHER, WADE1, $0
+ trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
- if_equal $0, .NoContest
+ if_equal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
checkcode VAR_WEEKDAY
@@ -718,15 +718,15 @@ WadePhoneScript2:
checkflag ENGINE_WADE_HAS_ITEM
iftrue .next
farscall PhoneScript_Random2
- if_equal $0, WadeHasItem2
+ if_equal 0, WadeHasItem2
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse .next
farscall PhoneScript_Random2
- if_equal $0, WadeWantsBattle2
+ if_equal 0, WadeWantsBattle2
.next:
farscall PhoneScript_Random3
- if_equal $0, WadeFoundRare
+ if_equal 0, WadeFoundRare
farjump Phone_GenericCall_Male
Wade_ContestToday:
@@ -736,7 +736,7 @@ WadeTuesdayNight:
setflag ENGINE_WADE_TUESDAY_NIGHT
WadeWantsBattle2:
- landmarktotext ROUTE_31, $2
+ landmarktotext ROUTE_31, MEM_BUFFER_2
setflag ENGINE_WADE
farjump PhoneScript_WantsToBattle_Male
@@ -745,16 +745,16 @@ WadeFoundRare:
WadeHasItem2:
setflag ENGINE_WADE_HAS_ITEM
- landmarktotext ROUTE_31, $2
+ landmarktotext ROUTE_31, MEM_BUFFER_2
clearevent EVENT_WADE_HAS_BERRY
clearevent EVENT_WADE_HAS_PSNCUREBERRY
clearevent EVENT_WADE_HAS_PRZCUREBERRY
clearevent EVENT_WADE_HAS_BITTER_BERRY
- random $4
- if_equal $0, .Berry
- if_equal $1, .PsnCureBerry
- if_equal $2, .PrzCureBerry
- if_equal $3, .Bitterberry
+ random 4
+ if_equal 0, .Berry
+ if_equal 1, .PsnCureBerry
+ if_equal 2, .PrzCureBerry
+ if_equal 3, .Bitterberry
.Berry:
setevent EVENT_WADE_HAS_BERRY
@@ -777,7 +777,7 @@ WadeHasItem2:
; Ralph
RalphPhoneScript1:
- trainertotext FISHER, RALPH1, $0
+ trainertotext FISHER, RALPH1, MEM_BUFFER_0
checkflag ENGINE_RALPH
iftrue Ralph_Rematch
farscall PhoneScript_AnswerPhone_Male
@@ -793,15 +793,15 @@ Ralph_CheckSwarm:
farjump UnknownScript_0xa0940
Ralph_Rematch:
- landmarktotext ROUTE_32, $2
+ landmarktotext ROUTE_32, MEM_BUFFER_2
farjump UnknownScript_0xa0a55
Ralph_ReportSwarm:
- landmarktotext ROUTE_32, $2
+ landmarktotext ROUTE_32, MEM_BUFFER_2
farjump UnknownScript_0xa0af5
RalphPhoneScript2:
- trainertotext FISHER, RALPH1, $0
+ trainertotext FISHER, RALPH1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse Ralph_CheckSwarm2
@@ -810,16 +810,16 @@ RalphPhoneScript2:
checkflag ENGINE_RALPH_WEDNESDAY_MORNING
iftrue Ralph_CheckSwarm2
farscall PhoneScript_Random2
- if_equal $0, Ralph_FightMe
+ if_equal 0, Ralph_FightMe
Ralph_CheckSwarm2:
farscall PhoneScript_Random5
- if_equal $0, Ralph_SetUpSwarm
+ if_equal 0, Ralph_SetUpSwarm
farjump Phone_GenericCall_Male
Ralph_WednesdayMorning:
setflag ENGINE_RALPH_WEDNESDAY_MORNING
Ralph_FightMe:
- landmarktotext ROUTE_32, $2
+ landmarktotext ROUTE_32, MEM_BUFFER_2
setflag ENGINE_RALPH
farjump PhoneScript_WantsToBattle_Male
@@ -827,8 +827,8 @@ Ralph_SetUpSwarm:
checkflag ENGINE_SPECIAL_WILDDATA
iftrue .Generic
setflag ENGINE_SPECIAL_WILDDATA
- pokenamemem QWILFISH, $1
- landmarktotext ROUTE_32, $2
+ pokenamemem QWILFISH, MEM_BUFFER_1
+ landmarktotext ROUTE_32, MEM_BUFFER_2
writebyte FISHSWARM_QWILFISH
special Special_ActivateFishingSwarm
farjump UnknownScript_0xa05d6
@@ -839,7 +839,7 @@ Ralph_SetUpSwarm:
; Liz
LizPhoneScript1:
- trainertotext PICNICKER, LIZ1, $0
+ trainertotext PICNICKER, LIZ1, MEM_BUFFER_0
checkflag ENGINE_LIZ
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -851,17 +851,17 @@ LizPhoneScript1:
iftrue LizThursdayAfternoon
.NotThursday:
- special RandomPhoneMon
+ special Special_RandomPhoneMon
farjump UnknownScript_0xa0948
.WantsBattle:
- landmarktotext ROUTE_32, $2
+ landmarktotext ROUTE_32, MEM_BUFFER_2
farjump UnknownScript_0xa0a5a
LizPhoneScript2:
- trainertotext PICNICKER, LIZ1, $0
+ trainertotext PICNICKER, LIZ1, MEM_BUFFER_0
farscall PhoneScript_Random4
- if_equal $0, LizWrongNumber
+ if_equal 0, LizWrongNumber
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_LIZ
iftrue .next
@@ -870,11 +870,11 @@ LizPhoneScript2:
.next:
farscall PhoneScript_Random2
- if_equal $0, LizGossip
+ if_equal 0, LizGossip
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse .Generic
farscall PhoneScript_Random2
- if_equal $0, LizWantsBattle
+ if_equal 0, LizWantsBattle
.Generic:
farjump Phone_GenericCall_Female
@@ -883,7 +883,7 @@ LizThursdayAfternoon:
setflag ENGINE_LIZ_THURSDAY_AFTERNOON
LizWantsBattle:
- landmarktotext ROUTE_32, $2
+ landmarktotext ROUTE_32, MEM_BUFFER_2
setflag ENGINE_LIZ
farjump PhoneScript_WantsToBattle_Female
@@ -891,51 +891,51 @@ LizWrongNumber:
farjump LizWrongNumberScript
LizGossip:
- random $9
- if_equal $0, .CoolTrainerM
- if_equal $1, .Beauty
- if_equal $2, .Grunt
- if_equal $3, .Teacher
- if_equal $4, .SwimmerF
- if_equal $5, .KimonoGirl
- if_equal $6, .Skier
- if_equal $7, .Medium
- if_equal $8, .PokefanM
+ random 9
+ if_equal 0, .CoolTrainerM
+ if_equal 1, .Beauty
+ if_equal 2, .Grunt
+ if_equal 3, .Teacher
+ if_equal 4, .SwimmerF
+ if_equal 5, .KimonoGirl
+ if_equal 6, .Skier
+ if_equal 7, .Medium
+ if_equal 8, .PokefanM
.CoolTrainerM:
- trainerclassname COOLTRAINERM, $1
+ trainerclassname COOLTRAINERM, NICK
jump LizGossipScript
.Beauty:
- trainerclassname BEAUTY, $1
+ trainerclassname BEAUTY, VICTORIA
jump LizGossipScript
.Grunt:
- trainerclassname GRUNTM, $1
+ trainerclassname GRUNTM, GRUNTM_1
jump LizGossipScript
.Teacher:
- trainerclassname TEACHER, $1
+ trainerclassname TEACHER, COLETTE
jump LizGossipScript
.SwimmerF:
- trainerclassname SWIMMERF, $1
+ trainerclassname SWIMMERF, ELAINE
jump LizGossipScript
.KimonoGirl:
- trainerclassname KIMONO_GIRL, $1
+ trainerclassname KIMONO_GIRL, NAOKO1
jump LizGossipScript
.Skier:
- trainerclassname SKIER, $1
+ trainerclassname SKIER, ROXANNE
jump LizGossipScript
.Medium:
- trainerclassname MEDIUM, $1
+ trainerclassname MEDIUM, MARTHA
jump LizGossipScript
.PokefanM:
- trainerclassname POKEFANM, $1
+ trainerclassname POKEFANM, WILLIAM
jump LizGossipScript
LizGossipScript:
@@ -944,7 +944,7 @@ LizGossipScript:
; Anthony
AnthonyPhoneScript1:
- trainertotext HIKER, ANTHONY2, $0
+ trainertotext HIKER, ANTHONY2, MEM_BUFFER_0
checkflag ENGINE_ANTHONY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -961,15 +961,15 @@ AnthonyPhoneScript1:
farjump UnknownScript_0xa0950
.WantsBattle:
- landmarktotext ROUTE_33, $2
+ landmarktotext ROUTE_33, MEM_BUFFER_2
farjump UnknownScript_0xa0a5f
.AlreadySwarming:
- landmarktotext ROUTE_33, $2
+ landmarktotext ROUTE_33, MEM_BUFFER_2
farjump UnknownScript_0xa0afa
AnthonyPhoneScript2:
- trainertotext HIKER, ANTHONY2, $0
+ trainertotext HIKER, ANTHONY2, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse .TriesSwarm
@@ -978,18 +978,18 @@ AnthonyPhoneScript2:
checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
iftrue .TriesSwarm
farscall PhoneScript_Random2
- if_equal $0, AnthonyWantsBattle
+ if_equal 0, AnthonyWantsBattle
.TriesSwarm:
farscall PhoneScript_Random5
- if_equal $0, AnthonyTriesDunsparceSwarm
+ if_equal 0, AnthonyTriesDunsparceSwarm
farjump Phone_GenericCall_Male
AnthonyFridayNight:
setflag ENGINE_ANTHONY_FRIDAY_NIGHT
AnthonyWantsBattle:
- landmarktotext ROUTE_33, $2
+ landmarktotext ROUTE_33, MEM_BUFFER_2
setflag ENGINE_ANTHONY
farjump PhoneScript_WantsToBattle_Male
@@ -997,9 +997,9 @@ AnthonyTriesDunsparceSwarm:
checkflag ENGINE_DUNSPARCE_SWARM
iftrue .Generic
setflag ENGINE_DUNSPARCE_SWARM
- pokenamemem DUNSPARCE, $1
+ pokenamemem DUNSPARCE, MEM_BUFFER_1
swarm SWARM_DUNSPARCE, DARK_CAVE_VIOLET_ENTRANCE
- landmarktotext DARK_CAVE, $2
+ landmarktotext DARK_CAVE, MEM_BUFFER_2
farjump UnknownScript_0xa05de
.Generic:
@@ -1008,7 +1008,7 @@ AnthonyTriesDunsparceSwarm:
; Todd
ToddPhoneScript1:
- trainertotext CAMPER, TODD1, $0
+ trainertotext CAMPER, TODD1, MEM_BUFFER_0
checkflag ENGINE_TODD
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1025,14 +1025,14 @@ ToddPhoneScript1:
farjump UnknownScript_0xa0958
.WantsBattle:
- landmarktotext ROUTE_34, $2
+ landmarktotext ROUTE_34, MEM_BUFFER_2
farjump UnknownScript_0xa0a64
.SaleOn:
farjump UnknownScript_0xa0b04
ToddPhoneScript2:
- trainertotext CAMPER, TODD1, $0
+ trainertotext CAMPER, TODD1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_TODD
iftrue .TryForSale
@@ -1041,22 +1041,22 @@ ToddPhoneScript2:
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse ToddNoGoldenrod
farscall PhoneScript_Random2
- if_equal $0, ToddWantsBattle
+ if_equal 0, ToddWantsBattle
.TryForSale:
farscall PhoneScript_Random2
- if_equal $0, ToddDeptStoreSale
+ if_equal 0, ToddDeptStoreSale
ToddNoGoldenrod:
farscall PhoneScript_Random3
- if_equal $0, ToddFoundRare
+ if_equal 0, ToddFoundRare
farjump Phone_GenericCall_Male
ToddSaturdayMorning:
setflag ENGINE_TODD_SATURDAY_MORNING
ToddWantsBattle:
- landmarktotext ROUTE_34, $2
+ landmarktotext ROUTE_34, MEM_BUFFER_2
setflag ENGINE_TODD
farjump PhoneScript_WantsToBattle_Male
@@ -1070,7 +1070,7 @@ ToddDeptStoreSale:
; Gina
GinaPhoneScript1:
- trainertotext PICNICKER, GINA1, $0
+ trainertotext PICNICKER, GINA1, MEM_BUFFER_0
checkflag ENGINE_GINA
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -1092,15 +1092,15 @@ GinaPhoneScript1:
farjump UnknownScript_0xa05c6
.WantsBattle:
- landmarktotext ROUTE_34, $2
+ landmarktotext ROUTE_34, MEM_BUFFER_2
farjump UnknownScript_0xa0a69
.HasLeafStone:
- landmarktotext ROUTE_34, $2
+ landmarktotext ROUTE_34, MEM_BUFFER_2
farjump UnknownScript_0xa0abd
GinaPhoneScript2:
- trainertotext PICNICKER, GINA1, $0
+ trainertotext PICNICKER, GINA1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue GinaRockets
@@ -1113,15 +1113,15 @@ GinaPhoneScript2:
checkevent EVENT_GINA_GAVE_LEAF_STONE
iftrue .GaveLeafStone
farscall PhoneScript_Random2
- if_equal $0, GinaHasLeafStone
+ if_equal 0, GinaHasLeafStone
.GaveLeafStone:
farscall PhoneScript_Random11
- if_equal $0, GinaHasLeafStone
+ if_equal 0, GinaHasLeafStone
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse .Generic
farscall PhoneScript_Random3
- if_equal $0, GinaWantsBattle
+ if_equal 0, GinaWantsBattle
.Generic:
farjump Phone_GenericCall_Female
@@ -1130,7 +1130,7 @@ GinaSundayDay:
setflag ENGINE_GINA_SUNDAY_AFTERNOON
GinaWantsBattle:
- landmarktotext ROUTE_34, $2
+ landmarktotext ROUTE_34, MEM_BUFFER_2
setflag ENGINE_GINA
farjump PhoneScript_WantsToBattle_Female
@@ -1139,13 +1139,13 @@ GinaRockets:
GinaHasLeafStone:
setflag ENGINE_GINA_HAS_LEAF_STONE
- landmarktotext ROUTE_34, $2
+ landmarktotext ROUTE_34, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Female
; Irwin
IrwinPhoneScript1:
- trainertotext JUGGLER, IRWIN1, $0
+ trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue .Rockets
@@ -1155,7 +1155,7 @@ IrwinPhoneScript1:
farjump IrwinRocketRumor
IrwinPhoneScript2:
- trainertotext JUGGLER, IRWIN1, $0
+ trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue .Rockets
@@ -1167,7 +1167,7 @@ IrwinPhoneScript2:
; Arnie
ArniePhoneScript1:
- trainertotext BUG_CATCHER, ARNIE1, $0
+ trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0
checkflag ENGINE_ARNIE
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1184,35 +1184,35 @@ ArniePhoneScript1:
farjump UnknownScript_0xa0968
.WantsBattle:
- landmarktotext ROUTE_35, $2
+ landmarktotext ROUTE_35, MEM_BUFFER_2
farjump UnknownScript_0xa0a6e
.AlreadySwarming:
- landmarktotext ROUTE_35, $2
+ landmarktotext ROUTE_35, MEM_BUFFER_2
farjump UnknownScript_0xa0aff
ArniePhoneScript2:
- trainertotext BUG_CATCHER, ARNIE1, $0
+ trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_ARNIE
iftrue .Swarm
checkflag ENGINE_ARNIE_TUESDAY_MORNING
iftrue .Swarm
farscall PhoneScript_Random2
- if_equal $0, ArnieWantsBattle
+ if_equal 0, ArnieWantsBattle
.Swarm:
farscall PhoneScript_Random5
- if_equal $0, ArnieYanmaSwarm
+ if_equal 0, ArnieYanmaSwarm
farscall PhoneScript_Random3
- if_equal $0, ArnieFoundRare
+ if_equal 0, ArnieFoundRare
farjump Phone_GenericCall_Male
ArnieTuesdayMorning:
setflag ENGINE_ARNIE_TUESDAY_MORNING
ArnieWantsBattle:
- landmarktotext ROUTE_35, $2
+ landmarktotext ROUTE_35, MEM_BUFFER_2
setflag ENGINE_ARNIE
farjump PhoneScript_WantsToBattle_Male
@@ -1220,9 +1220,9 @@ ArnieYanmaSwarm: ; start swarm
checkflag ENGINE_YANMA_SWARM
iftrue ArnieYanmaAlreadySwarming
setflag ENGINE_YANMA_SWARM
- pokenamemem YANMA, $1
+ pokenamemem YANMA, MEM_BUFFER_1
swarm SWARM_YANMA, ROUTE_35
- landmarktotext ROUTE_35, $2
+ landmarktotext ROUTE_35, MEM_BUFFER_2
farjump UnknownScript_0xa05ce
ArnieFoundRare:
@@ -1234,7 +1234,7 @@ ArnieYanmaAlreadySwarming:
; Alan
AlanPhoneScript1:
- trainertotext SCHOOLBOY, ALAN1, $0
+ trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0
checkflag ENGINE_ALAN
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1251,15 +1251,15 @@ AlanPhoneScript1:
farjump UnknownScript_0xa0970
.WantsBattle:
- landmarktotext ROUTE_36, $2
+ landmarktotext ROUTE_36, MEM_BUFFER_2
farjump UnknownScript_0xa0a73
.FireStone:
- landmarktotext ROUTE_36, $2
+ landmarktotext ROUTE_36, MEM_BUFFER_2
farjump UnknownScript_0xa0ac5
AlanPhoneScript2:
- trainertotext SCHOOLBOY, ALAN1, $0
+ trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_ALAN
iftrue AlanGenericCall
@@ -1268,15 +1268,15 @@ AlanPhoneScript2:
checkflag ENGINE_ALAN_HAS_FIRE_STONE
iftrue AlanGenericCall
farscall PhoneScript_Random3
- if_equal $0, AlanWantsBattle
+ if_equal 0, AlanWantsBattle
checkevent EVENT_ALAN_GAVE_FIRE_STONE
iftrue .FireStone
farscall PhoneScript_Random2
- if_equal $0, AlanHasFireStone
+ if_equal 0, AlanHasFireStone
.FireStone:
farscall PhoneScript_Random11
- if_equal $0, AlanHasFireStone
+ if_equal 0, AlanHasFireStone
AlanGenericCall:
farjump Phone_GenericCall_Male
@@ -1285,19 +1285,19 @@ AlanWednesdayDay:
setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
AlanWantsBattle:
- landmarktotext ROUTE_36, $2
+ landmarktotext ROUTE_36, MEM_BUFFER_2
setflag ENGINE_ALAN
farjump PhoneScript_WantsToBattle_Male
AlanHasFireStone:
setflag ENGINE_ALAN_HAS_FIRE_STONE
- landmarktotext ROUTE_36, $2
+ landmarktotext ROUTE_36, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Male
; Dana
DanaPhoneScript1:
- trainertotext LASS, DANA1, $0
+ trainertotext LASS, DANA1, MEM_BUFFER_0
checkflag ENGINE_DANA
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -1314,15 +1314,15 @@ DanaPhoneScript1:
farjump UnknownScript_0xa0978
.WantsBattle:
- landmarktotext ROUTE_38, $2
+ landmarktotext ROUTE_38, MEM_BUFFER_2
farjump UnknownScript_0xa0a78
.HasThunderstone:
- landmarktotext ROUTE_38, $2
+ landmarktotext ROUTE_38, MEM_BUFFER_2
farjump UnknownScript_0xa0acd
DanaPhoneScript2:
- trainertotext LASS, DANA1, $0
+ trainertotext LASS, DANA1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_DANA
iftrue .Generic
@@ -1331,26 +1331,26 @@ DanaPhoneScript2:
checkflag ENGINE_DANA_HAS_THUNDERSTONE
iftrue .Generic
farscall PhoneScript_Random3
- if_equal $0, DanaWantsBattle
+ if_equal 0, DanaWantsBattle
checkevent EVENT_DANA_GAVE_THUNDERSTONE
iftrue .Thunderstone
farscall PhoneScript_Random2
- if_equal $0, DanaHasThunderstone
+ if_equal 0, DanaHasThunderstone
.Thunderstone:
farscall PhoneScript_Random11
- if_equal $0, DanaHasThunderstone
+ if_equal 0, DanaHasThunderstone
.Generic:
farscall PhoneScript_Random3
- if_equal $0, DanaFoundRare
+ if_equal 0, DanaFoundRare
farjump Phone_GenericCall_Female
DanaThursdayNight:
setflag ENGINE_DANA_THURSDAY_NIGHT
DanaWantsBattle:
- landmarktotext ROUTE_38, $2
+ landmarktotext ROUTE_38, MEM_BUFFER_2
setflag ENGINE_DANA
farjump PhoneScript_WantsToBattle_Female
@@ -1359,13 +1359,13 @@ DanaFoundRare:
DanaHasThunderstone:
setflag ENGINE_DANA_HAS_THUNDERSTONE
- landmarktotext ROUTE_38, $2
+ landmarktotext ROUTE_38, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Female
; Chad
ChadPhoneScript1:
- trainertotext SCHOOLBOY, CHAD1, $0
+ trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0
checkflag ENGINE_CHAD
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1380,31 +1380,31 @@ ChadPhoneScript1:
farjump UnknownScript_0xa0980
.WantsBattle:
- landmarktotext ROUTE_38, $2
+ landmarktotext ROUTE_38, MEM_BUFFER_2
farjump UnknownScript_0xa0a7d
ChadPhoneScript2:
- trainertotext SCHOOLBOY, CHAD1, $0
+ trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
- if_equal $0, ChadOakGossip
+ if_equal 0, ChadOakGossip
checkflag ENGINE_CHAD
iftrue .Generic
checkflag ENGINE_CHAD_FRIDAY_MORNING
iftrue .Generic
farscall PhoneScript_Random2
- if_equal $0, ChadWantsBattle
+ if_equal 0, ChadWantsBattle
.Generic:
farscall PhoneScript_Random3
- if_equal $0, ChadFoundRare
+ if_equal 0, ChadFoundRare
farjump Phone_GenericCall_Male
ChadFridayMorning:
setflag ENGINE_CHAD_FRIDAY_MORNING
ChadWantsBattle:
- landmarktotext ROUTE_38, $2
+ landmarktotext ROUTE_38, MEM_BUFFER_2
setflag ENGINE_CHAD
farjump PhoneScript_WantsToBattle_Male
@@ -1415,12 +1415,12 @@ ChadOakGossip:
farjump ChadOakGossipScript
DerekPhoneScript1:
- trainertotext POKEFANM, DEREK1, $0
+ trainertotext POKEFANM, DEREK1, MEM_BUFFER_0
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_DEREK_HAS_NUGGET
iftrue .Nugget
farscall PhoneScript_Random2
- if_equal $0, .NoContest
+ if_equal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
checkcode VAR_WEEKDAY
@@ -1435,14 +1435,14 @@ DerekPhoneScript1:
farjump PhoneScript_BugCatchingContest
.Nugget:
- landmarktotext ROUTE_39, $2
+ landmarktotext ROUTE_39, MEM_BUFFER_2
farjump UnknownScript_0xa0ad5
DerekPhoneScript2:
- trainertotext POKEFANM, DEREK1, $0
+ trainertotext POKEFANM, DEREK1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
- if_equal $0, .NoContest
+ if_equal 0, .NoContest
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue .NoContest
checkcode VAR_WEEKDAY
@@ -1452,7 +1452,7 @@ DerekPhoneScript2:
.NoContest:
farscall PhoneScript_Random4
- if_equal $0, .Nugget
+ if_equal 0, .Nugget
farjump Phone_GenericCall_Male
.ContestToday:
@@ -1460,11 +1460,11 @@ DerekPhoneScript2:
.Nugget:
setflag ENGINE_DEREK_HAS_NUGGET
- landmarktotext ROUTE_39, $2
+ landmarktotext ROUTE_39, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Male
TullyPhoneScript1:
- trainertotext FISHER, TULLY1, $0
+ trainertotext FISHER, TULLY1, MEM_BUFFER_0
checkflag ENGINE_TULLY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1481,15 +1481,15 @@ TullyPhoneScript1:
farjump UnknownScript_0xa0990
.WantsBattle:
- landmarktotext ROUTE_42, $2
+ landmarktotext ROUTE_42, MEM_BUFFER_2
farjump UnknownScript_0xa0a82
TullyHasWaterStone:
- landmarktotext ROUTE_42, $2
+ landmarktotext ROUTE_42, MEM_BUFFER_2
farjump UnknownScript_0xa0add
TullyPhoneScript2:
- trainertotext FISHER, TULLY1, $0
+ trainertotext FISHER, TULLY1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_TULLY
iftrue .Generic
@@ -1498,15 +1498,15 @@ TullyPhoneScript2:
checkflag ENGINE_TULLY_HAS_WATER_STONE
iftrue .Generic
farscall PhoneScript_Random3
- if_equal $0, TullyWantsBattle
+ if_equal 0, TullyWantsBattle
checkevent EVENT_TULLY_GAVE_WATER_STONE
iftrue .WaterStone
farscall PhoneScript_Random2
- if_equal $0, TullyFoundWaterStone
+ if_equal 0, TullyFoundWaterStone
.WaterStone:
farscall PhoneScript_Random11
- if_equal $0, TullyFoundWaterStone
+ if_equal 0, TullyFoundWaterStone
.Generic:
farjump Phone_GenericCall_Male
@@ -1515,17 +1515,17 @@ TullySundayNight:
setflag ENGINE_TULLY_SUNDAY_NIGHT
TullyWantsBattle:
- landmarktotext ROUTE_42, $2
+ landmarktotext ROUTE_42, MEM_BUFFER_2
setflag ENGINE_TULLY
farjump PhoneScript_WantsToBattle_Male
TullyFoundWaterStone:
setflag ENGINE_TULLY_HAS_WATER_STONE
- landmarktotext ROUTE_42, $2
+ landmarktotext ROUTE_42, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Male
BrentPhoneScript1:
- trainertotext POKEMANIAC, BRENT1, $0
+ trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0
checkflag ENGINE_BRENT
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1540,20 +1540,20 @@ BrentPhoneScript1:
farjump UnknownScript_0xa0998
.WantsBattle:
- landmarktotext ROUTE_43, $2
+ landmarktotext ROUTE_43, MEM_BUFFER_2
farjump UnknownScript_0xa0a87
BrentPhoneScript2:
- trainertotext POKEMANIAC, BRENT1, $0
+ trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
- if_equal $0, BrentBillTrivia
+ if_equal 0, BrentBillTrivia
checkflag ENGINE_BRENT
iftrue .Generic
checkflag ENGINE_BRENT_MONDAY_MORNING
iftrue .Generic
farscall PhoneScript_Random2
- if_equal $0, BrentWantsBattle
+ if_equal 0, BrentWantsBattle
.Generic:
farjump Phone_GenericCall_Male
@@ -1562,7 +1562,7 @@ BrentMondayMorning:
setflag ENGINE_BRENT_MONDAY_MORNING
BrentWantsBattle:
- landmarktotext ROUTE_43, $2
+ landmarktotext ROUTE_43, MEM_BUFFER_2
setflag ENGINE_BRENT
farjump PhoneScript_WantsToBattle_Male
@@ -1570,7 +1570,7 @@ BrentBillTrivia:
farjump BrentBillTriviaScript
TiffanyPhoneScript1:
- trainertotext PICNICKER, TIFFANY3, $0
+ trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0
checkflag ENGINE_TIFFANY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -1587,17 +1587,17 @@ TiffanyPhoneScript1:
farjump UnknownScript_0xa09a0
.WantsBattle:
- landmarktotext ROUTE_43, $2
+ landmarktotext ROUTE_43, MEM_BUFFER_2
farjump UnknownScript_0xa0a8c
.HasItem:
- landmarktotext ROUTE_43, $2
+ landmarktotext ROUTE_43, MEM_BUFFER_2
farjump UnknownScript_0xa0ae5
TiffanyPhoneScript2:
- trainertotext PICNICKER, TIFFANY3, $0
+ trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0
farscall PhoneScript_Random4
- if_equal $0, TiffanysFamilyMembers
+ if_equal 0, TiffanysFamilyMembers
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_TIFFANY
iftrue TiffanyGenericCall
@@ -1606,15 +1606,15 @@ TiffanyPhoneScript2:
checkflag ENGINE_TIFFANY_HAS_PINK_BOW
iftrue TiffanyGenericCall
farscall PhoneScript_Random3
- if_equal $0, TiffanyWantsBattle
+ if_equal 0, TiffanyWantsBattle
checkevent EVENT_TIFFANY_GAVE_PINK_BOW
iftrue .PinkBow
farscall PhoneScript_Random2
- if_equal $0, TiffanyHasPinkBow
+ if_equal 0, TiffanyHasPinkBow
.PinkBow:
farscall PhoneScript_Random11
- if_equal $0, TiffanyHasPinkBow
+ if_equal 0, TiffanyHasPinkBow
TiffanyGenericCall:
farjump Phone_GenericCall_Female
@@ -1623,41 +1623,41 @@ TiffanyTuesdayAfternoon:
setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
TiffanyWantsBattle:
- landmarktotext ROUTE_43, $2
+ landmarktotext ROUTE_43, MEM_BUFFER_2
setflag ENGINE_TIFFANY
farjump PhoneScript_WantsToBattle_Female
TiffanysFamilyMembers:
- random $6
- if_equal $0, .Grandma
- if_equal $1, .Grandpa
- if_equal $2, .Mom
- if_equal $3, .Dad
- if_equal $4, .Sister
- if_equal $5, .Brother
+ random 6
+ if_equal 0, .Grandma
+ if_equal 1, .Grandpa
+ if_equal 2, .Mom
+ if_equal 3, .Dad
+ if_equal 4, .Sister
+ if_equal 5, .Brother
.Grandma:
- stringtotext GrandmaString, $1
+ stringtotext GrandmaString, MEM_BUFFER_1
jump TiffanysPoorClefairy
.Grandpa:
- stringtotext GrandpaString, $1
+ stringtotext GrandpaString, MEM_BUFFER_1
jump TiffanysPoorClefairy
.Mom:
- stringtotext MomString, $1
+ stringtotext MomString, MEM_BUFFER_1
jump TiffanysPoorClefairy
.Dad:
- stringtotext DadString, $1
+ stringtotext DadString, MEM_BUFFER_1
jump TiffanysPoorClefairy
.Sister:
- stringtotext SisterString, $1
+ stringtotext SisterString, MEM_BUFFER_1
jump TiffanysPoorClefairy
.Brother:
- stringtotext BrotherString, $1
+ stringtotext BrotherString, MEM_BUFFER_1
jump TiffanysPoorClefairy
TiffanysPoorClefairy:
@@ -1665,13 +1665,13 @@ TiffanysPoorClefairy:
TiffanyHasPinkBow:
setflag ENGINE_TIFFANY_HAS_PINK_BOW
- landmarktotext ROUTE_43, $2
+ landmarktotext ROUTE_43, MEM_BUFFER_2
farjump PhoneScript_FoundItem_Female
; Vance
VancePhoneScript1:
- trainertotext BIRD_KEEPER, VANCE1, $0
+ trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0
checkflag ENGINE_VANCE
iftrue VanceWantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1686,19 +1686,19 @@ VancePhoneScript1:
farjump VanceLookingForward
VanceWantsBattle:
- landmarktotext ROUTE_44, $2
+ landmarktotext ROUTE_44, MEM_BUFFER_2
farjump VanceHurryHurry
VancePhoneScript2:
- trainertotext BIRD_KEEPER, VANCE1, $0
+ trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_VANCE
iftrue .WantsBattle
checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
iftrue .WantsBattle
farscall PhoneScript_Random3
- if_equal $0, VanceWantsRematch
- if_equal $1, VanceWantsRematch
+ if_equal 0, VanceWantsRematch
+ if_equal 1, VanceWantsRematch
.WantsBattle:
farjump Phone_GenericCall_Male
@@ -1707,12 +1707,12 @@ VanceWednesdayNight:
setflag ENGINE_VANCE_WEDNESDAY_NIGHT
VanceWantsRematch:
- landmarktotext ROUTE_44, $2
+ landmarktotext ROUTE_44, MEM_BUFFER_2
setflag ENGINE_VANCE
farjump PhoneScript_WantsToBattle_Male
WiltonPhoneScript1:
- trainertotext FISHER, WILTON1, $0
+ trainertotext FISHER, WILTON1, MEM_BUFFER_0
checkflag ENGINE_WILTON
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1729,15 +1729,15 @@ WiltonPhoneScript1:
farjump WiltonHaventFoundAnything
.WantsBattle:
- landmarktotext ROUTE_44, $2
+ landmarktotext ROUTE_44, MEM_BUFFER_2
farjump WiltonNotBiting
.HasItem:
- landmarktotext ROUTE_44, $2
+ landmarktotext ROUTE_44, MEM_BUFFER_2
farjump WiltonWantThis
WiltonPhoneScript2:
- trainertotext FISHER, WILTON1, $0
+ trainertotext FISHER, WILTON1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_WILTON
iftrue .GenericCall
@@ -1746,9 +1746,9 @@ WiltonPhoneScript2:
checkflag ENGINE_WILTON_HAS_ITEM
iftrue .GenericCall
farscall PhoneScript_Random2
- if_equal $0, WiltonWantsBattle
+ if_equal 0, WiltonWantsBattle
farscall PhoneScript_Random2
- if_equal $0, WiltonHasItem
+ if_equal 0, WiltonHasItem
.GenericCall:
farjump Phone_GenericCall_Male
@@ -1757,20 +1757,20 @@ WiltonThursdayMorning:
setflag ENGINE_WILTON_THURSDAY_MORNING
WiltonWantsBattle:
- landmarktotext ROUTE_44, $2
+ landmarktotext ROUTE_44, MEM_BUFFER_2
setflag ENGINE_WILTON
farjump PhoneScript_WantsToBattle_Male
WiltonHasItem:
setflag ENGINE_WILTON_HAS_ITEM
- landmarktotext ROUTE_44, $2
+ landmarktotext ROUTE_44, MEM_BUFFER_2
clearevent EVENT_WILTON_HAS_ULTRA_BALL
clearevent EVENT_WILTON_HAS_GREAT_BALL
clearevent EVENT_WILTON_HAS_POKE_BALL
- random $5
- if_equal $0, .UltraBall
- random $3
- if_equal $0, .GreatBall
+ random 5
+ if_equal 0, .UltraBall
+ random 3
+ if_equal 0, .GreatBall
jump .PokeBall
.UltraBall:
@@ -1790,19 +1790,19 @@ WiltonHasItem:
; Kenji
KenjiPhoneScript1:
- trainertotext BLACKBELT_T, KENJI3, $0
+ trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0
farscall PhoneScript_AnswerPhone_Male
farjump KenjiAnswerPhoneScript
KenjiPhoneScript2:
- trainertotext BLACKBELT_T, KENJI3, $0
+ trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
farjump KenjiCallingPhoneScript
; Parry
ParryPhoneScript1:
- trainertotext HIKER, PARRY1, $0
+ trainertotext HIKER, PARRY1, MEM_BUFFER_0
checkflag ENGINE_PARRY
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
@@ -1817,19 +1817,19 @@ ParryPhoneScript1:
farjump ParryBattleWithMe
.WantsBattle:
- landmarktotext ROUTE_45, $2
+ landmarktotext ROUTE_45, MEM_BUFFER_2
farjump ParryHaventYouGottenTo
ParryPhoneScript2:
- trainertotext HIKER, PARRY1, $0
+ trainertotext HIKER, PARRY1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Male
checkflag ENGINE_PARRY
iftrue .GenericCall
checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
iftrue .GenericCall
farscall PhoneScript_Random2
- if_equal $0, ParryWantsBattle
- if_equal $1, ParryWantsBattle
+ if_equal 0, ParryWantsBattle
+ if_equal 1, ParryWantsBattle
.GenericCall:
farjump Phone_GenericCall_Male
@@ -1838,14 +1838,14 @@ ParryFridayDay:
setflag ENGINE_PARRY_FRIDAY_AFTERNOON
ParryWantsBattle:
- landmarktotext ROUTE_45, $2
+ landmarktotext ROUTE_45, MEM_BUFFER_2
setflag ENGINE_PARRY
farjump PhoneScript_WantsToBattle_Male
; Erin
ErinPhoneScript1:
- trainertotext PICNICKER, ERIN1, $0
+ trainertotext PICNICKER, ERIN1, MEM_BUFFER_0
checkflag ENGINE_ERIN
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Female
@@ -1860,19 +1860,19 @@ ErinPhoneScript1:
farjump ErinWorkingHardScript
.WantsBattle:
- landmarktotext ROUTE_46, $2
+ landmarktotext ROUTE_46, MEM_BUFFER_2
farjump ErinComeBattleScript
ErinPhoneScript2:
- trainertotext PICNICKER, ERIN1, $0
+ trainertotext PICNICKER, ERIN1, MEM_BUFFER_0
farscall PhoneScript_GreetPhone_Female
checkflag ENGINE_ERIN
iftrue .GenericCall
checkflag ENGINE_ERIN_SATURDAY_NIGHT
iftrue .GenericCall
farscall PhoneScript_Random3
- if_equal $0, ErinWantsBattle
- if_equal $1, ErinWantsBattle
+ if_equal 0, ErinWantsBattle
+ if_equal 1, ErinWantsBattle
.GenericCall:
farjump Phone_GenericCall_Female
@@ -1881,6 +1881,6 @@ ErinSaturdayNight:
setflag ENGINE_ERIN_SATURDAY_NIGHT
ErinWantsBattle:
- landmarktotext ROUTE_46, $2
+ landmarktotext ROUTE_46, MEM_BUFFER_2
setflag ENGINE_ERIN
farjump PhoneScript_WantsToBattle_Female
diff --git a/engine/pic_animation.asm b/engine/pic_animation.asm
index 9a6ae4a75..062998e5f 100644
--- a/engine/pic_animation.asm
+++ b/engine/pic_animation.asm
@@ -1,54 +1,54 @@
; Pic animation arrangement.
-AnimateMon_Slow_Normal: ; d0000
+UnusedPredef_AnimateMon_Slow_Normal: ; d0000
hlcoord 12, 0
ld a, [wBattleMode]
cp WILD_BATTLE
jr z, .wild
ld e, ANIM_MON_SLOW
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
.wild
ld e, ANIM_MON_NORMAL
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d001a
AnimateMon_Menu: ; d001a
ld e, ANIM_MON_MENU
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d0022
AnimateMon_Trade: ; d0022
ld e, ANIM_MON_TRADE
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d002a
AnimateMon_Evolve: ; d002a
ld e, ANIM_MON_EVOLVE
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d0032
AnimateMon_Hatch: ; d0032
ld e, ANIM_MON_HATCH
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d003a
AnimateMon_Unused: ; d003a
ld e, ANIM_MON_UNUSED
ld d, $0
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
ret
; d0042
@@ -86,10 +86,10 @@ PokeAnims: ; d0042
.Egg2: pokeanim Idle, Play
-AnimateFrontpic: ; d008e
+Predef_AnimateFrontpic: ; d008e
call AnimateMon_CheckIfPokemon
ret c
- call LoadMonAnimation
+ call Predef_LoadMonAnimation
.loop
call SetUpPokeAnim
push af
@@ -99,7 +99,7 @@ AnimateFrontpic: ; d008e
ret
; d00a3
-LoadMonAnimation: ; d00a3
+Predef_LoadMonAnimation: ; d00a3
push hl
ld c, e
ld b, 0
@@ -695,7 +695,7 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b
ret
; d03f4
-; XXX
+; unused
db 6, 5, 4
.GetTilemap: ; d03f7
@@ -1024,7 +1024,7 @@ GetMonFramesPointer: ; d05ce
ld hl, UnownFramesPointers
jr z, .got_frames
ld a, [wPokeAnimSpecies]
- cp CHIKORITA
+ cp JOHTO_POKEMON
ld b, BANK(FramesPointers)
ld c, BANK(KantoFrames)
ld hl, FramesPointers
@@ -1110,10 +1110,11 @@ PokeAnim_GetSpeciesOrUnown: ; d065c
ret
; d0669
-Predef48: ; d0669 Predef 48
+UnusedPredef48: ; d0669 Predef 48
ld a, $1
ld [wBoxAlignment], a
-HOF_AnimateFrontpic: ; d066e Predef 49
+
+HOF_Predef_AnimateFrontpic: ; d066e Predef 49
call AnimateMon_CheckIfPokemon
jr c, .fail
ld h, d
@@ -1121,12 +1122,12 @@ HOF_AnimateFrontpic: ; d066e Predef 49
push bc
push hl
ld de, vTiles2
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
pop hl
pop bc
ld d, 0
ld e, c
- call AnimateFrontpic
+ call Predef_AnimateFrontpic
xor a
ld [wBoxAlignment], a
ret
diff --git a/engine/player_gfx.asm b/engine/player_gfx.asm
index 98a54684b..8da7ad564 100644
--- a/engine/player_gfx.asm
+++ b/engine/player_gfx.asm
@@ -1,5 +1,4 @@
-Function88248: ; 88248
-; XXX
+Unreferenced_Function88248: ; 88248
ld c, CAL
ld a, [wPlayerGender]
bit 0, a
@@ -31,7 +30,7 @@ MovePlayerPic: ; 88266
xor a
ld [hBGMapMode], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
xor a
ld [hBGMapThird], a
call WaitBGMap
@@ -71,7 +70,7 @@ ShowPlayerNamingChoices: ; 88297
call CloseWindow
ret
-INCLUDE "data/default_names.asm"
+INCLUDE "data/player_names.asm"
GetPlayerNameArray: ; 88318 This Function is never called
ld hl, PlayerName
@@ -142,7 +141,7 @@ GetChrisBackpic: ; 88830
ld b, BANK(ChrisBackpic)
ld de, vTiles2 tile $31
ld c, 7 * 7
- predef DecompressPredef
+ predef Predef_Decompress
ret
HOF_LoadTrainerFrontpic: ; 88840
@@ -204,7 +203,7 @@ DrawIntroPlayerPic: ; 88874
ld [hGraphicStartTile], a
hlcoord 6, 4
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
ChrisPic: ; 888a9
diff --git a/engine/player_movement.asm b/engine/player_movement.asm
index fa7cc84a5..e475bf6a4 100755
--- a/engine/player_movement.asm
+++ b/engine/player_movement.asm
@@ -140,7 +140,7 @@ DoPlayerMovement:: ; 80000
.water
ld a, c
- and 3
+ maskbits NUM_DIRECTIONS +- 1
ld c, a
ld b, 0
ld hl, .water_table
@@ -244,7 +244,7 @@ DoPlayerMovement:: ; 80000
ld a, [PlayerDirection]
rrca
rrca
- and 3
+ maskbits NUM_DIRECTIONS +- 1
cp e
jr z, .not_turning
@@ -316,7 +316,7 @@ DoPlayerMovement:: ; 80000
scf
ret
-; unused?
+; unused
xor a
ret
@@ -430,7 +430,7 @@ DoPlayerMovement:: ; 80000
ld a, [PlayerDirection]
rrca
rrca
- and 3
+ maskbits NUM_DIRECTIONS +- 1
cp e
jr nz, .not_warp
call WarpCheck
@@ -559,7 +559,7 @@ DoPlayerMovement:: ; 80000
cp 0
ret z
- and 3
+ maskbits NUM_DIRECTIONS +- 1
ld e, a
ld d, 0
ld hl, .forced_dpad
diff --git a/engine/player_object.asm b/engine/player_object.asm
index 6d5cb7e84..50cabadf6 100755
--- a/engine/player_object.asm
+++ b/engine/player_object.asm
@@ -589,7 +589,7 @@ Special_SurfStartStep: ; 8379
ld a, [PlayerDirection]
srl a
srl a
- and 3
+ maskbits NUM_DIRECTIONS +- 1
ld e, a
ld d, 0
ld hl, .movement_data
diff --git a/engine/player_step.asm b/engine/player_step.asm
index 996a9b422..3af41be59 100755
--- a/engine/player_step.asm
+++ b/engine/player_step.asm
@@ -76,7 +76,7 @@ HandlePlayerStep: ; d4e5 (3:54e5)
ret
.mobile ; d509 (3:5509)
- farcall TrainerRankings_StepCount
+ farcall StubbedTrainerRankings_StepCount
ret
.fail2 ; d510 (3:5510)
@@ -154,7 +154,7 @@ UpdateOverworldMap: ; d536 (3:5536)
jr nc, .not_overflowed
ld a, [wBGMapAnchor + 1]
inc a
- and $3
+ and %11
or HIGH(vBGMap0)
ld [wBGMapAnchor + 1], a
.not_overflowed
@@ -185,7 +185,7 @@ UpdateOverworldMap: ; d536 (3:5536)
jr nc, .not_underflowed
ld a, [wBGMapAnchor + 1]
dec a
- and $3
+ and %11
or HIGH(vBGMap0)
ld [wBGMapAnchor + 1], a
.not_underflowed
diff --git a/engine/pokedex.asm b/engine/pokedex.asm
index 5030fe5f1..fb16f83d1 100644
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -1,3 +1,4 @@
+; Pokedex_RunJumptable.Jumptable indexes
const_def
const DEXSTATE_MAIN_SCR
const DEXSTATE_UPDATE_MAIN_SCR
@@ -86,8 +87,8 @@ InitPokedex: ; 40063
xor a
ld [wJumptableIndex], a
- ld [wDexEntryPrevJumptableIndex], a
- ld [wcf65], a
+ ld [wPrevDexEntryJumptableIndex], a
+ ld [wPrevDexEntryBackup], a
ld [wcf66], a
call Pokedex_CheckUnlockedUnownMode
@@ -118,7 +119,7 @@ Pokedex_CheckUnlockedUnownMode: ; 400a2
Pokedex_InitCursorPosition: ; 400b4
ld hl, wPokedexOrder
- ld a, [wLastDexEntry]
+ ld a, [wPrevDexEntry]
and a
jr z, .done
cp NUM_POKEMON + 1
@@ -185,6 +186,7 @@ Pokedex_RunJumptable: ; 4010b
jp hl
.Jumptable: ; 40115 (10:4115)
+; entries correspond to DEXSTATE_* constants
dw Pokedex_InitMainScreen
dw Pokedex_UpdateMainScreen
dw Pokedex_InitDexEntryScreen
@@ -289,7 +291,7 @@ Pokedex_UpdateMainScreen: ; 401ae (10:41ae)
ld a, DEXSTATE_DEX_ENTRY_SCR
ld [wJumptableIndex], a
ld a, DEXSTATE_MAIN_SCR
- ld [wDexEntryPrevJumptableIndex], a
+ ld [wPrevDexEntryJumptableIndex], a
ret
.select
@@ -330,7 +332,7 @@ Pokedex_InitDexEntryScreen: ; 40217 (10:4217)
call Pokedex_DrawDexEntryScreenBG
call Pokedex_InitArrowCursor
call Pokedex_GetSelectedMon
- ld [wLastDexEntry], a
+ ld [wPrevDexEntry], a
farcall DisplayDexEntry
call Pokedex_DrawFootprint
call WaitBGMap
@@ -375,7 +377,7 @@ Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258)
.max_volume
call MaxVolume
- ld a, [wDexEntryPrevJumptableIndex]
+ ld a, [wPrevDexEntryJumptableIndex]
ld [wJumptableIndex], a
ret
@@ -384,7 +386,7 @@ Pokedex_Page: ; 40292
xor $1
ld [wPokedexStatus], a
call Pokedex_GetSelectedMon
- ld [wLastDexEntry], a
+ ld [wPrevDexEntry], a
farcall DisplayDexEntry
call WaitBGMap
ret
@@ -400,7 +402,7 @@ Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa)
call Pokedex_InitArrowCursor
call Pokedex_LoadCurrentFootprint
call Pokedex_GetSelectedMon
- ld [wLastDexEntry], a
+ ld [wPrevDexEntry], a
farcall DisplayDexEntry
call Pokedex_DrawFootprint
call Pokedex_LoadSelectedMonTiles
@@ -441,7 +443,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
call Pokedex_GetSelectedMon
ld a, [wDexCurrentLocation]
ld e, a
- predef _Area
+ predef Predef_Pokedex_GetArea
call Pokedex_BlackOutBG
call DelayFrame
xor a
@@ -473,9 +475,9 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
call Pokedex_ApplyPrintPals
xor a
ld [hSCX], a
- ld a, [wcf65]
+ ld a, [wPrevDexEntryBackup]
push af
- ld a, [wDexEntryPrevJumptableIndex]
+ ld a, [wPrevDexEntryJumptableIndex]
push af
ld a, [wJumptableIndex]
push af
@@ -483,9 +485,9 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
pop af
ld [wJumptableIndex], a
pop af
- ld [wDexEntryPrevJumptableIndex], a
+ ld [wPrevDexEntryJumptableIndex], a
pop af
- ld [wcf65], a
+ ld [wPrevDexEntryBackup], a
call ClearBGPalettes
call DisableLCD
call Pokedex_LoadInvertedFont
@@ -695,8 +697,8 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471)
ld [wDexListingScrollOffsetBackup], a
ld a, [wDexListingCursor]
ld [wDexListingCursorBackup], a
- ld a, [wLastDexEntry]
- ld [wcf65], a
+ ld a, [wPrevDexEntry]
+ ld [wPrevDexEntryBackup], a
xor a
ld [wDexListingScrollOffset], a
ld [wDexListingCursor], a
@@ -739,7 +741,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a)
farcall DrawPokedexSearchResultsWindow
call Pokedex_PlaceSearchResultsTypeStrings
call Pokedex_UpdateSearchResultsCursorOAM
- ld a, $ff
+ ld a, -1
ld [CurPartySpecies], a
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
@@ -771,7 +773,7 @@ Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562)
ld a, DEXSTATE_DEX_ENTRY_SCR
ld [wJumptableIndex], a
ld a, DEXSTATE_SEARCH_RESULTS_SCR
- ld [wDexEntryPrevJumptableIndex], a
+ ld [wPrevDexEntryJumptableIndex], a
ret
.return_to_search_screen
@@ -779,8 +781,8 @@ Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562)
ld [wDexListingScrollOffset], a
ld a, [wDexListingCursorBackup]
ld [wDexListingCursor], a
- ld a, [wcf65]
- ld [wLastDexEntry], a
+ ld a, [wPrevDexEntryBackup]
+ ld [wPrevDexEntry], a
call Pokedex_BlackOutBG
call ClearSprites
call Pokedex_OrderMonsByMode
@@ -827,7 +829,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df)
.decompress
ld hl, PokedexLZ
ld de, vTiles2 tile $31
- lb bc, BANK(PokedexLZ), $3a
+ lb bc, BANK(PokedexLZ), 58
call DecompressRequest2bpp
.done
@@ -1123,13 +1125,14 @@ Pokedex_DrawMainScreenBG: ; 4074c (10:474c)
ret
String_SEEN: ; 407e1
- db "SEEN", $ff
+ db "SEEN", -1
String_OWN: ; 407e6
- db "OWN", $ff
+ db "OWN", -1
String_SELECT_OPTION: ; 407ea
db $3b, $48, $49, $4a, $44, $45, $46, $47 ; SELECT > OPTION
+ ; fallthrough
String_START_SEARCH: ; 407f2
- db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, $ff ; START > SEARCH
+ db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, -1 ; START > SEARCH
Pokedex_DrawDexEntryScreenBG: ; 407fd
call Pokedex_FillBackgroundColor2
@@ -1164,13 +1167,13 @@ Pokedex_DrawDexEntryScreenBG: ; 407fd
ret
.Unused: ; 4084f
- db $5c, $5d, $ff ; No.
+ db $5c, $5d, -1 ; No.
.Height: ; 40852
- db "HT ?", $5e, "??", $5f, $ff ; HT ?'??"
+ db "HT ?", $5e, "??", $5f, -1 ; HT ?'??"
.Weight: ; 4085c
- db "WT ???lb", $ff ; WT ???lb
+ db "WT ???lb", -1 ; WT ???lb
.MenuItems: ; 40867
- db $3b, " PAGE AREA CRY PRNT", $ff
+ db $3b, " PAGE AREA CRY PRNT", -1
Pokedex_DrawOptionScreenBG: ; 4087c (10:487c)
call Pokedex_FillBackgroundColor2
@@ -1195,7 +1198,7 @@ Pokedex_DrawOptionScreenBG: ; 4087c (10:487c)
ret
.Title: ; 408b2
- db $3b, " OPTION ", $3c, $ff
+ db $3b, " OPTION ", $3c, -1
.Modes: ; 408bd
db "NEW #DEX MODE"
@@ -1229,10 +1232,10 @@ Pokedex_DrawSearchScreenBG: ; 408f0 (10:48f0)
ret
.Title: ; 4092a
- db $3b, " SEARCH ", $3c, $ff
+ db $3b, " SEARCH ", $3c, -1
.TypeLeftRightArrows: ; 40935
- db $3d, " ", $3e, $ff
+ db $3d, " ", $3e, -1
.Types: ; 40940
db "TYPE1"
@@ -1794,7 +1797,7 @@ Pokedex_PrevSearchMonType: ; 40f65
ld hl, wDexSearchMonType1
ld a, [hl]
- cp $1
+ cp 1
jr z, .wrap_around
dec [hl]
jr .done
@@ -1808,7 +1811,7 @@ Pokedex_PrevSearchMonType: ; 40f65
jr .done
.wrap_around
- ld [hl], $11
+ ld [hl], NUM_TYPES - 1
.done
scf
@@ -1821,18 +1824,18 @@ Pokedex_NextSearchMonType: ; 40f84
ld hl, wDexSearchMonType1
ld a, [hl]
- cp $11
+ cp NUM_TYPES - 1
jr nc, .type1_wrap_around
inc [hl]
jr .done
.type1_wrap_around
- ld [hl], $1
+ ld [hl], 1
jr .done
.type2
ld hl, wDexSearchMonType2
ld a, [hl]
- cp $11
+ cp NUM_TYPES - 1
jr nc, .type2_wrap_around
inc [hl]
jr .done
@@ -1864,7 +1867,7 @@ Pokedex_PlaceTypeString: ; 40fcd (10:4fcd)
push hl
ld e, a
ld d, 0
- ld hl, .TypeStrings
+ ld hl, PokedexTypeSearchStrings
rept 9
add hl, de
endr
@@ -1874,25 +1877,7 @@ endr
call PlaceString
ret
-.TypeStrings: ; 40fe4
- db " ---- @"
- db " NORMAL @"
- db " FIRE @"
- db " WATER @"
- db " GRASS @"
- db "ELECTRIC@"
- db " ICE @"
- db "FIGHTING@"
- db " POISON @"
- db " GROUND @"
- db " FLYING @"
- db "PSYCHIC @"
- db " BUG @"
- db " ROCK @"
- db " GHOST @"
- db " DRAGON @"
- db " DARK @"
- db " STEEL @"
+INCLUDE "data/types/search_strings.asm"
Pokedex_SearchForMons: ; 41086
ld a, [wDexSearchMonType2]
@@ -1907,7 +1892,7 @@ Pokedex_SearchForMons: ; 41086
dec a
ld e, a
ld d, 0
- ld hl, .TypeConversionTable
+ ld hl, PokedexTypeSearchConversionTable
add hl, de
ld a, [hl]
ld [wDexConvertedMonType], a
@@ -1969,24 +1954,7 @@ Pokedex_SearchForMons: ; 41086
.done
ret
-.TypeConversionTable: ; 410f6
- db NORMAL
- db FIRE
- db WATER
- db GRASS
- db ELECTRIC
- db ICE
- db FIGHTING
- db POISON
- db GROUND
- db FLYING
- db PSYCHIC
- db BUG
- db ROCK
- db GHOST
- db DRAGON
- db DARK
- db STEEL
+INCLUDE "data/types/search_types.asm"
Pokedex_DisplayTypeNotFoundMessage: ; 41107
xor a
@@ -2026,60 +1994,60 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157)
ret
.CursorOAM: ; 41167
- db $18, $47, $30, $07
- db $10, $47, $31, $07
- db $10, $4f, $32, $07
- db $10, $57, $32, $07
- db $10, $5f, $32, $07
- db $10, $67, $33, $07
- db $10, $7e, $33, $27
- db $10, $86, $32, $27
- db $10, $8e, $32, $27
- db $10, $96, $32, $27
- db $10, $9e, $31, $27
- db $18, $9e, $30, $27
- db $20, $47, $30, $47
- db $28, $47, $31, $47
- db $28, $4f, $32, $47
- db $28, $57, $32, $47
- db $28, $5f, $32, $47
- db $28, $67, $33, $47
- db $28, $7e, $33, $67
- db $28, $86, $32, $67
- db $28, $8e, $32, $67
- db $28, $96, $32, $67
- db $28, $9e, $31, $67
- db $20, $9e, $30, $67
- db $ff
+ dsprite 3, 0, 9, -1, $30, 7
+ dsprite 2, 0, 9, -1, $31, 7
+ dsprite 2, 0, 10, -1, $32, 7
+ dsprite 2, 0, 11, -1, $32, 7
+ dsprite 2, 0, 12, -1, $32, 7
+ dsprite 2, 0, 13, -1, $33, 7
+ dsprite 2, 0, 16, -2, $33, 7 | X_FLIP
+ dsprite 2, 0, 17, -2, $32, 7 | X_FLIP
+ dsprite 2, 0, 18, -2, $32, 7 | X_FLIP
+ dsprite 2, 0, 19, -2, $32, 7 | X_FLIP
+ dsprite 2, 0, 20, -2, $31, 7 | X_FLIP
+ dsprite 3, 0, 20, -2, $30, 7 | X_FLIP
+ dsprite 4, 0, 9, -1, $30, 7 | Y_FLIP
+ dsprite 5, 0, 9, -1, $31, 7 | Y_FLIP
+ dsprite 5, 0, 10, -1, $32, 7 | Y_FLIP
+ dsprite 5, 0, 11, -1, $32, 7 | Y_FLIP
+ dsprite 5, 0, 12, -1, $32, 7 | Y_FLIP
+ dsprite 5, 0, 13, -1, $33, 7 | Y_FLIP
+ dsprite 5, 0, 16, -2, $33, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 17, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 18, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 19, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 20, -2, $31, 7 | X_FLIP | Y_FLIP
+ dsprite 4, 0, 20, -2, $30, 7 | X_FLIP | Y_FLIP
+ db -1
.CursorAtTopOAM: ; 411c8
; OAM data for when the cursor is at the top of the list. The tiles at the top
; are cut off so they don't show up outside the list area.
- db $18, $47, $30, $07
- db $10, $47, $34, $07
- db $10, $4f, $35, $07
- db $10, $57, $35, $07
- db $10, $5f, $35, $07
- db $10, $67, $36, $07
- db $10, $7e, $36, $27
- db $10, $86, $35, $27
- db $10, $8e, $35, $27
- db $10, $96, $35, $27
- db $10, $9e, $34, $27
- db $18, $9e, $30, $27
- db $20, $47, $30, $47
- db $28, $47, $31, $47
- db $28, $4f, $32, $47
- db $28, $57, $32, $47
- db $28, $5f, $32, $47
- db $28, $67, $33, $47
- db $28, $7e, $33, $67
- db $28, $86, $32, $67
- db $28, $8e, $32, $67
- db $28, $96, $32, $67
- db $28, $9e, $31, $67
- db $20, $9e, $30, $67
- db $ff
+ dsprite 3, 0, 9, -1, $30, 7
+ dsprite 2, 0, 9, -1, $34, 7
+ dsprite 2, 0, 10, -1, $35, 7
+ dsprite 2, 0, 11, -1, $35, 7
+ dsprite 2, 0, 12, -1, $35, 7
+ dsprite 2, 0, 13, -1, $36, 7
+ dsprite 2, 0, 16, -2, $36, 7 | X_FLIP
+ dsprite 2, 0, 17, -2, $35, 7 | X_FLIP
+ dsprite 2, 0, 18, -2, $35, 7 | X_FLIP
+ dsprite 2, 0, 19, -2, $35, 7 | X_FLIP
+ dsprite 2, 0, 20, -2, $34, 7 | X_FLIP
+ dsprite 3, 0, 20, -2, $30, 7 | X_FLIP
+ dsprite 4, 0, 9, -1, $30, 7 | Y_FLIP
+ dsprite 5, 0, 9, -1, $31, 7 | Y_FLIP
+ dsprite 5, 0, 10, -1, $32, 7 | Y_FLIP
+ dsprite 5, 0, 11, -1, $32, 7 | Y_FLIP
+ dsprite 5, 0, 12, -1, $32, 7 | Y_FLIP
+ dsprite 5, 0, 13, -1, $33, 7 | Y_FLIP
+ dsprite 5, 0, 16, -2, $33, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 17, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 18, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 19, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 0, 20, -2, $31, 7 | X_FLIP | Y_FLIP
+ dsprite 4, 0, 20, -2, $30, 7 | X_FLIP | Y_FLIP
+ db -1
Pokedex_PutNewModeABCModeCursorOAM: ; 41229 (10:5229)
ld hl, .CursorOAM
@@ -2087,27 +2055,27 @@ Pokedex_PutNewModeABCModeCursorOAM: ; 41229 (10:5229)
ret
.CursorOAM: ; 41230
- db $1b, $47, $30, $07
- db $13, $47, $31, $07
- db $13, $4f, $32, $07
- db $13, $57, $32, $07
- db $13, $5f, $33, $07
- db $13, $80, $33, $27
- db $13, $88, $32, $27
- db $13, $90, $32, $27
- db $13, $98, $31, $27
- db $1b, $98, $30, $27
- db $23, $47, $30, $47
- db $2b, $47, $31, $47
- db $2b, $4f, $32, $47
- db $2b, $57, $32, $47
- db $2b, $5f, $33, $47
- db $2b, $80, $33, $67
- db $2b, $88, $32, $67
- db $2b, $90, $32, $67
- db $2b, $98, $31, $67
- db $23, $98, $30, $67
- db $ff
+ dsprite 3, 3, 9, -1, $30, 7
+ dsprite 2, 3, 9, -1, $31, 7
+ dsprite 2, 3, 10, -1, $32, 7
+ dsprite 2, 3, 11, -1, $32, 7
+ dsprite 2, 3, 12, -1, $33, 7
+ dsprite 2, 3, 16, 0, $33, 7 | X_FLIP
+ dsprite 2, 3, 17, 0, $32, 7 | X_FLIP
+ dsprite 2, 3, 18, 0, $32, 7 | X_FLIP
+ dsprite 2, 3, 19, 0, $31, 7 | X_FLIP
+ dsprite 3, 3, 19, 0, $30, 7 | X_FLIP
+ dsprite 4, 3, 9, -1, $30, 7 | Y_FLIP
+ dsprite 5, 3, 9, -1, $31, 7 | Y_FLIP
+ dsprite 5, 3, 10, -1, $32, 7 | Y_FLIP
+ dsprite 5, 3, 11, -1, $32, 7 | Y_FLIP
+ dsprite 5, 3, 12, -1, $33, 7 | Y_FLIP
+ dsprite 5, 3, 16, 0, $33, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 17, 0, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 18, 0, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 19, 0, $31, 7 | X_FLIP | Y_FLIP
+ dsprite 4, 3, 19, 0, $30, 7 | X_FLIP | Y_FLIP
+ db -1
Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281)
ld a, [wCurrentDexMode]
@@ -2118,52 +2086,52 @@ Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281)
ret
.CursorOAM: ; 41290
- db $1b, $47, $30, $07
- db $13, $47, $31, $07
- db $13, $4f, $32, $07
- db $13, $57, $32, $07
- db $13, $5f, $32, $07
- db $13, $67, $33, $07
- db $13, $7e, $33, $27
- db $13, $86, $32, $27
- db $13, $8e, $32, $27
- db $13, $96, $32, $27
- db $13, $9e, $31, $27
- db $1b, $9e, $30, $27
- db $23, $47, $30, $47
- db $2b, $47, $31, $47
- db $2b, $4f, $32, $47
- db $2b, $57, $32, $47
- db $2b, $5f, $32, $47
- db $2b, $67, $33, $47
- db $2b, $7e, $33, $67
- db $2b, $86, $32, $67
- db $2b, $8e, $32, $67
- db $2b, $96, $32, $67
- db $2b, $9e, $31, $67
- db $23, $9e, $30, $67
- db $ff
+ dsprite 3, 3, 9, -1, $30, 7
+ dsprite 2, 3, 9, -1, $31, 7
+ dsprite 2, 3, 10, -1, $32, 7
+ dsprite 2, 3, 11, -1, $32, 7
+ dsprite 2, 3, 12, -1, $32, 7
+ dsprite 2, 3, 13, -1, $33, 7
+ dsprite 2, 3, 16, -2, $33, 7 | X_FLIP
+ dsprite 2, 3, 17, -2, $32, 7 | X_FLIP
+ dsprite 2, 3, 18, -2, $32, 7 | X_FLIP
+ dsprite 2, 3, 19, -2, $32, 7 | X_FLIP
+ dsprite 2, 3, 20, -2, $31, 7 | X_FLIP
+ dsprite 3, 3, 20, -2, $30, 7 | X_FLIP
+ dsprite 4, 3, 9, -1, $30, 7 | Y_FLIP
+ dsprite 5, 3, 9, -1, $31, 7 | Y_FLIP
+ dsprite 5, 3, 10, -1, $32, 7 | Y_FLIP
+ dsprite 5, 3, 11, -1, $32, 7 | Y_FLIP
+ dsprite 5, 3, 12, -1, $32, 7 | Y_FLIP
+ dsprite 5, 3, 13, -1, $33, 7 | Y_FLIP
+ dsprite 5, 3, 16, -2, $33, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 17, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 18, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 19, -2, $32, 7 | X_FLIP | Y_FLIP
+ dsprite 5, 3, 20, -2, $31, 7 | X_FLIP | Y_FLIP
+ dsprite 4, 3, 20, -2, $30, 7 | X_FLIP | Y_FLIP
+ db -1
Pokedex_LoadCursorOAM: ; 412f1 (10:52f1)
- ld de, Sprites
+ ld de, Sprite01
.loop
ld a, [hl]
- cp $ff
+ cp -1
ret z
ld a, [wDexListingCursor]
and $7
swap a
- add [hl]
+ add [hl] ; y
inc hl
ld [de], a
inc de
- ld a, [hli]
+ ld a, [hli] ; x
ld [de], a
inc de
- ld a, [hli]
+ ld a, [hli] ; tile id
ld [de], a
inc de
- ld a, [hli]
+ ld a, [hli] ; attributes
ld [de], a
inc de
jr .loop
@@ -2399,7 +2367,7 @@ Pokedex_LoadSelectedMonTiles: ; 4143b
ld [CurPartySpecies], a
call GetBaseData
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ret
.QuestionMark:
@@ -2422,7 +2390,7 @@ Pokedex_LoadCurrentFootprint: ; 41478 (10:5478)
Pokedex_LoadAnyFootprint: ; 4147b
ld a, [wd265]
dec a
- and ($ff ^ $07) ; $f8 ; $1f << 3
+ and %11111000
srl a
srl a
srl a
@@ -2430,7 +2398,7 @@ Pokedex_LoadAnyFootprint: ; 4147b
ld d, a
ld a, [wd265]
dec a
- and 7
+ and %111
swap a ; * $10
ld l, a
ld h, 0
@@ -2552,7 +2520,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58)
ld [CurPartySpecies], a
call GetBaseData
ld de, vTiles2 tile $00
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
pop af
ld [UnownLetter], a
ret
@@ -2582,7 +2550,7 @@ _NewPokedexEntry: ; 41a7f
call WaitBGMap
call GetBaseData
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]
diff --git a/engine/pokedex_2.asm b/engine/pokedex_2.asm
index 83b366017..4a5a08803 100644
--- a/engine/pokedex_2.asm
+++ b/engine/pokedex_2.asm
@@ -40,16 +40,16 @@ AnimateDexSearchSlowpoke: ; 441cf
DoDexSearchSlowpokeFrame: ; 44207
ld a, [wDexSearchSlowpokeFrame]
- ld hl, .SpriteData
- ld de, Sprites
+ ld hl, .SlowpokeSpriteData
+ ld de, Sprite01
.loop
ld a, [hli]
cp -1
ret z
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; x
inc de
ld a, [wDexSearchSlowpokeFrame]
ld b, a
@@ -57,23 +57,23 @@ DoDexSearchSlowpokeFrame: ; 44207
add b
add [hl]
inc hl
- ld [de], a
+ ld [de], a ; tile id
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; attributes
inc de
jr .loop
-.SpriteData: ; 44228
- dsprite 11, 0, 9, 0, $00, $00
- dsprite 11, 0, 10, 0, $01, $00
- dsprite 11, 0, 11, 0, $02, $00
- dsprite 12, 0, 9, 0, $10, $00
- dsprite 12, 0, 10, 0, $11, $00
- dsprite 12, 0, 11, 0, $12, $00
- dsprite 13, 0, 9, 0, $20, $00
- dsprite 13, 0, 10, 0, $21, $00
- dsprite 13, 0, 11, 0, $22, $00
+.SlowpokeSpriteData: ; 44228
+ dsprite 11, 0, 9, 0, $00, 0
+ dsprite 11, 0, 10, 0, $01, 0
+ dsprite 11, 0, 11, 0, $02, 0
+ dsprite 12, 0, 9, 0, $10, 0
+ dsprite 12, 0, 10, 0, $11, 0
+ dsprite 12, 0, 11, 0, $12, 0
+ dsprite 13, 0, 9, 0, $20, 0
+ dsprite 13, 0, 10, 0, $21, 0
+ dsprite 13, 0, 11, 0, $22, 0
db -1
DisplayDexEntry: ; 4424d
@@ -230,7 +230,7 @@ GetDexEntryPointer: ; 44333
push de
rlca
rlca
- and $3
+ maskbits NUM_DEX_ENTRY_BANKS +- 1
ld hl, .PokedexEntryBanks
ld d, 0
ld e, a
@@ -241,12 +241,6 @@ GetDexEntryPointer: ; 44333
ret
.PokedexEntryBanks: ; 44351
-
-GLOBAL PokedexEntries1
-GLOBAL PokedexEntries2
-GLOBAL PokedexEntries3
-GLOBAL PokedexEntries4
-
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)
diff --git a/engine/pokedex_3.asm b/engine/pokedex_3.asm
index 482f55799..dc52f83d3 100644
--- a/engine/pokedex_3.asm
+++ b/engine/pokedex_3.asm
@@ -7,7 +7,7 @@ LoadSGBPokedexGFX: ; 1ddf1c
LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26)
ld hl, SGBPokedexGFX_LZ
ld de, vTiles2 tile $31
- lb bc, BANK(SGBPokedexGFX_LZ), $3a
+ lb bc, BANK(SGBPokedexGFX_LZ), 58
call DecompressRequest2bpp
ret
diff --git a/engine/pokegear.asm b/engine/pokegear.asm
index dba071b28..6f9192f19 100755
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -1,3 +1,27 @@
+; Pokégear cards
+ const_def
+ const POKEGEARCARD_CLOCK ; 0
+ const POKEGEARCARD_MAP ; 1
+ const POKEGEARCARD_PHONE ; 2
+ const POKEGEARCARD_RADIO ; 3
+NUM_POKEGEAR_CARDS EQU const_value
+
+; PokegearJumptable.Jumptable indexes
+ const_def
+ const POKEGEARSTATE_CLOCKINIT ; 0
+ const POKEGEARSTATE_CLOCKJOYPAD ; 1
+ const POKEGEARSTATE_MAPCHECKREGION ; 2
+ const POKEGEARSTATE_JOHTOMAPINIT ; 3
+ const POKEGEARSTATE_JOHTOMAPJOYPAD ; 4
+ const POKEGEARSTATE_KANTOMAPINIT ; 5
+ const POKEGEARSTATE_KANTOMAPJOYPAD ; 6
+ const POKEGEARSTATE_PHONEINIT ; 7
+ const POKEGEARSTATE_PHONEJOYPAD ; 8
+ const POKEGEARSTATE_MAKEPHONECALL ; 9
+ const POKEGEARSTATE_FINISHPHONECALL ; a
+ const POKEGEARSTATE_RADIOINIT ; b
+ const POKEGEARSTATE_RADIOJOYPAD ; c
+
PokeGear: ; 90b8d (24:4b8d)
ld hl, Options
ld a, [hl]
@@ -63,9 +87,9 @@ PokeGear: ; 90b8d (24:4b8d)
ld [rLCDC], a
call TownMap_InitCursorAndPlayerIconPositions
xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wcf65], a
+ ld [wJumptableIndex], a ; POKEGEARSTATE_CLOCKINIT
+ ld [wPokegearCard], a ; POKEGEARCARD_CLOCK
+ ld [wPokegearMapRegion], a ; JOHTO_REGION
ld [wcf66], a
ld [wPokegearPhoneScrollPosition], a
ld [wPokegearPhoneCursorPosition], a
@@ -92,7 +116,7 @@ Pokegear_LoadGFX: ; 90c4e
ld a, BANK(TownMapGFX)
call FarDecompress
ld hl, PokegearGFX
- ld de, vTiles2 + $30 tiles
+ ld de, vTiles2 tile $30
ld a, BANK(PokegearGFX)
call FarDecompress
ld hl, PokegearSpritesGFX
@@ -149,7 +173,7 @@ InitPokegearModeIndicatorArrow: ; 90d32 (24:4d32)
ret
AnimatePokegearModeIndicatorArrow: ; 90d41 (24:4d41)
- ld hl, wcf64
+ ld hl, wPokegearCard
ld e, [hl]
ld d, 0
ld hl, .XCoords
@@ -163,7 +187,10 @@ AnimatePokegearModeIndicatorArrow: ; 90d41 (24:4d41)
; 90d52 (24:4d52)
.XCoords: ; 90d52
- db $00, $10, $20, $30
+ db $00 ; POKEGEARCARD_CLOCK
+ db $10 ; POKEGEARCARD_MAP
+ db $20 ; POKEGEARCARD_PHONE
+ db $30 ; POKEGEARCARD_RADIO
; 90d56
TownMap_GetCurrentLandmark: ; 90d56
@@ -210,10 +237,10 @@ TownMap_InitCursorAndPlayerIconPositions: ; 90d70 (24:4d70)
ret
Pokegear_InitJumptableIndices: ; 90d9e (24:4d9e)
- ld a, $0
+ ld a, POKEGEARSTATE_CLOCKINIT
ld [wJumptableIndex], a
- xor a
- ld [wcf64], a
+ xor a ; POKEGEARCARD_CLOCK
+ ld [wPokegearCard], a
ret
InitPokegearTilemap: ; 90da8 (24:4da8)
@@ -223,8 +250,8 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
ld bc, TileMapEnd - TileMap
ld a, $4f
call ByteFill
- ld a, [wcf64]
- and $3
+ ld a, [wPokegearCard]
+ maskbits NUM_POKEGEAR_CARDS +- 1
add a
ld e, a
ld d, 0
@@ -240,7 +267,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
.return_from_jumptable
call Pokegear_FinishTilemap
farcall TownMapPals
- ld a, [wcf65]
+ ld a, [wPokegearMapRegion]
and a
jr nz, .kanto_0
xor a ; LOW(vBGMap0)
@@ -260,10 +287,11 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
xor a
.finish
ld [hWY], a
- ld a, [wcf65]
- and 1
+ ; swap region maps
+ ld a, [wPokegearMapRegion]
+ maskbits NUM_REGIONS +- 1
xor 1
- ld [wcf65], a
+ ld [wPokegearMapRegion], a
ret
.UpdateBGMap: ; 90e00 (24:4e00)
@@ -281,6 +309,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
; 90e12 (24:4e12)
.Jumptable: ; 90e12
+; entries correspond to POKEGEARCARD_* constants
dw .Clock
dw .Map
dw .Phone
@@ -319,12 +348,12 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
ld e, 1
.ok
farcall PokegearMap
- ld a, $7
+ ld a, $07
ld bc, $12
hlcoord 1, 2
call ByteFill
hlcoord 0, 2
- ld [hl], $6
+ ld [hl], $06
hlcoord 19, 2
ld [hl], $17
ld a, [wPokegearMapCursorLandmark]
@@ -382,13 +411,13 @@ Pokegear_FinishTilemap: ; 90eb0 (24:4eb0)
call ByteFill
ld de, wPokegearFlags
ld a, [de]
- bit 0, a
+ bit 0, a ; ENGINE_MAP_CARD
call nz, .PlaceMapIcon
ld a, [de]
- bit 2, a
+ bit 2, a ; ENGINE_PHONE_CARD
call nz, .PlacePhoneIcon
ld a, [de]
- bit 1, a
+ bit 1, a ; ENGINE_RADIO_CARD
call nz, .PlaceRadioIcon
hlcoord 0, 0
ld a, $46
@@ -433,6 +462,7 @@ PokegearJumptable: ; 90f04 (24:4f04)
jp hl
.Jumptable: ; 90f13 (24:4f13)
+; entries correspond to POKEGEARSTATE_* constants
dw PokegearClock_Init
dw PokegearClock_Joypad
dw PokegearMap_CheckRegion
@@ -460,32 +490,32 @@ PokegearClock_Joypad: ; 90f3e (24:4f3e)
call .UpdateClock
ld hl, hJoyLast
ld a, [hl]
- and A_BUTTON + B_BUTTON + START + SELECT
+ and A_BUTTON | B_BUTTON | START | SELECT
jr nz, .quit
ld a, [hl]
and D_RIGHT
ret z
ld a, [wPokegearFlags]
- bit 0, a
+ bit 0, a ; ENGINE_MAP_CARD
jr z, .no_map_card
- ld c, $2
- ld b, $1
+ ld c, POKEGEARSTATE_MAPCHECKREGION
+ ld b, POKEGEARCARD_MAP
jr .done
.no_map_card
ld a, [wPokegearFlags]
- bit 2, a
+ bit 2, a ; ENGINE_PHONE_CARD
jr z, .no_phone_card
- ld c, $7
- ld b, $2
+ ld c, POKEGEARSTATE_PHONEINIT
+ ld b, POKEGEARCARD_PHONE
jr .done
.no_phone_card
ld a, [wPokegearFlags]
- bit 1, a
+ bit 1, a ; ENGINE_RADIO_CARD
ret z
- ld c, $b
- ld b, $3
+ ld c, POKEGEARSTATE_RADIOINIT
+ ld b, POKEGEARCARD_RADIO
.done
call Pokegear_SwitchPage
ret
@@ -535,12 +565,12 @@ PokegearMap_CheckRegion: ; 90fb4 (24:4fb4)
cp KANTO_LANDMARK
jr nc, .kanto
.johto
- ld a, 3
+ ld a, POKEGEARSTATE_JOHTOMAPINIT
jr .done
ret
.kanto
- ld a, 5
+ ld a, POKEGEARSTATE_KANTOMAPINIT
.done
ld [wJumptableIndex], a
call ExitPokegearRadio_HandleMusic
@@ -583,23 +613,23 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2)
.right
ld a, [wPokegearFlags]
- bit 2, a
+ bit 2, a ; ENGINE_PHONE_CARD
jr z, .no_phone
- ld c, $7
- ld b, $2
+ ld c, POKEGEARSTATE_PHONEINIT
+ ld b, POKEGEARCARD_PHONE
jr .done
.no_phone
ld a, [wPokegearFlags]
- bit 1, a
+ bit 1, a ; ENGINE_RADIO_CARD
ret z
- ld c, $b
- ld b, $3
+ ld c, POKEGEARSTATE_RADIOINIT
+ ld b, POKEGEARCARD_RADIO
jr .done
.left
- ld c, $0
- ld b, $0
+ ld c, POKEGEARSTATE_CLOCKINIT
+ ld b, POKEGEARCARD_CLOCK
.done
call Pokegear_SwitchPage
ret
@@ -657,7 +687,7 @@ PokegearMap_InitPlayerIcon: ; 9106a
depixel 0, 0
ld b, SPRITE_ANIM_INDEX_RED_WALK
ld a, [wPlayerGender]
- bit 0, a
+ bit 0, a ; ENGINE_PLAYER_IS_FEMALE
jr z, .got_gender
ld b, SPRITE_ANIM_INDEX_BLUE_WALK
.got_gender
@@ -688,7 +718,7 @@ PokegearMap_InitCursor: ; 91098
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $4
+ ld [hl], $04
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_NULL
@@ -734,7 +764,7 @@ PokegearMap_UpdateCursorPosition: ; 910d4
TownMap_GetKantoLandmarkLimits: ; 910e8
ld a, [wStatusFlags]
- bit 6, a
+ bit 6, a ; ENGINE_CREDITS_SKIP
jr z, .not_hof
ld d, ROUTE_28
ld e, PALLET_TOWN
@@ -754,7 +784,7 @@ PokegearRadio_Init: ; 910f9 (24:50f9)
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $8
+ ld [hl], $08
call _UpdateRadioStation
ld hl, wJumptableIndex
inc [hl]
@@ -780,23 +810,23 @@ PokegearRadio_Joypad: ; 91112 (24:5112)
.left
ld a, [wPokegearFlags]
- bit 2, a
+ bit 2, a ; ENGINE_PHONE_CARD
jr z, .no_phone
- ld c, $7
- ld b, $2
+ ld c, POKEGEARSTATE_PHONEINIT
+ ld b, POKEGEARCARD_PHONE
jr .switch_page
.no_phone
ld a, [wPokegearFlags]
- bit 0, a
+ bit 0, a ; ENGINE_MAP_CARD
jr z, .no_map
- ld c, $2
- ld b, $1
+ ld c, POKEGEARSTATE_MAPCHECKREGION
+ ld b, POKEGEARCARD_MAP
jr .switch_page
.no_map
- ld c, $0
- ld b, $0
+ ld c, POKEGEARSTATE_CLOCKINIT
+ ld b, POKEGEARCARD_CLOCK
.switch_page
call Pokegear_SwitchPage
ret
@@ -839,23 +869,23 @@ PokegearPhone_Joypad: ; 91171 (24:5171)
.left
ld a, [wPokegearFlags]
- bit 0, a
+ bit 0, a ; ENGINE_MAP_CARD
jr z, .no_map
- ld c, $2
- ld b, $1
+ ld c, POKEGEARSTATE_MAPCHECKREGION
+ ld b, POKEGEARCARD_MAP
jr .switch_page
.no_map
- ld c, $0
- ld b, $0
+ ld c, POKEGEARSTATE_CLOCKINIT
+ ld b, POKEGEARCARD_CLOCK
jr .switch_page
.right
ld a, [wPokegearFlags]
- bit 1, a
+ bit 1, a ; ENGINE_RADIO_CARD
ret z
- ld c, $b
- ld b, $3
+ ld c, POKEGEARSTATE_RADIOINIT
+ ld b, POKEGEARCARD_RADIO
.switch_page
call Pokegear_SwitchPage
ret
@@ -891,7 +921,7 @@ PokegearPhone_Joypad: ; 91171 (24:5171)
ret
.quit_submenu
- ld a, $8
+ ld a, POKEGEARSTATE_PHONEJOYPAD
ld [wJumptableIndex], a
ret
@@ -931,7 +961,7 @@ PokegearPhone_MakePhoneCall: ; 911eb (24:51eb)
farcall Phone_NoSignal
ld hl, .OutOfServiceArea
call PrintText
- ld a, $8
+ ld a, POKEGEARSTATE_PHONEJOYPAD
ld [wJumptableIndex], a
ld hl, PokegearText_WhomToCall
call PrintText
@@ -958,7 +988,7 @@ PokegearPhone_FinishPhoneCall: ; 91256 (24:5256)
and A_BUTTON | B_BUTTON
ret z
farcall HangUp
- ld a, $8
+ ld a, POKEGEARSTATE_PHONEJOYPAD
ld [wJumptableIndex], a
ld hl, PokegearText_WhomToCall
call PrintText
@@ -993,7 +1023,7 @@ PokegearPhone_GetDPad: ; 9126d (24:526d)
.down
ld hl, wPokegearPhoneCursorPosition
ld a, [hl]
- cp $3
+ cp 3
jr nc, .scroll_page_down
inc [hl]
jr .done_joypad_same_page
@@ -1001,7 +1031,7 @@ PokegearPhone_GetDPad: ; 9126d (24:526d)
.scroll_page_down
ld hl, wPokegearPhoneScrollPosition
ld a, [hl]
- cp $6
+ cp 6
ret nc
inc [hl]
jr .done_joypad_update_page
@@ -1075,7 +1105,7 @@ PokegearPhone_UpdateDisplayList: ; 912d8 (24:52d8)
ld a, [wPokegearPhoneLoadNameBuffer]
inc a
ld [wPokegearPhoneLoadNameBuffer], a
- cp $4
+ cp 4
jr c, .loop
call PokegearPhone_UpdateCursor
ret
@@ -1309,7 +1339,7 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342)
; 9146e
-; XXX
+; unused
ld a, [hHours]
cp 12
jr c, .am
@@ -1331,15 +1361,15 @@ Pokegear_SwitchPage: ; 91480 (24:5480)
ld a, c
ld [wJumptableIndex], a
ld a, b
- ld [wcf64], a
+ ld [wPokegearCard], a
call DeleteSpriteAnimStruct2ToEnd
ret
ExitPokegearRadio_HandleMusic: ; 91492
ld a, [wPokegearRadioMusicPlaying]
- cp $fe
+ cp RESTART_MAP_MUSIC
jr z, .restart_map_music
- cp $ff
+ cp ENTER_MAP_MUSIC
call z, EnterMapMusic
xor a
ld [wPokegearRadioMusicPlaying], a
@@ -1364,11 +1394,11 @@ DeleteSpriteAnimStruct2ToEnd: ; 914ab (24:54ab)
Pokegear_LoadTilemapRLE: ; 914bb (24:54bb)
; Format: repeat count, tile ID
- ; Terminated with $FF
+ ; Terminated with -1
hlcoord 0, 0
.loop
ld a, [de]
- cp $ff
+ cp -1
ret z
ld b, a
inc de
@@ -1499,7 +1529,7 @@ UpdateRadioStation: ; 9166f (24:566f)
; 916a1 (24:56a1)
-; XXX
+; unused
ld [wPokegearRadioChannelBank], a
ld a, [hli]
ld [wPokegearRadioChannelAddr], a
@@ -1510,7 +1540,7 @@ UpdateRadioStation: ; 9166f (24:566f)
; 916ad
RadioChannels:
-; frequencies and the shows that play on them.
+; entries correspond to constants/radio_constants.asm
; frequency value given here = 4 × ingame_frequency − 2
dbw 16, .PkmnTalkAndPokedexShow
@@ -1560,7 +1590,7 @@ RadioChannels:
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
- bit 3, a
+ bit 3, a ; ENGINE_EXPN_CARD
jr z, .NoSignal
jp LoadStation_PlacesAndPeople
@@ -1568,7 +1598,7 @@ RadioChannels:
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
- bit 3, a
+ bit 3, a ; ENGINE_EXPN_CARD
jr z, .NoSignal
jp LoadStation_LetsAllSing
@@ -1576,14 +1606,14 @@ RadioChannels:
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
- bit 3, a
+ bit 3, a ; ENGINE_EXPN_CARD
jr z, .NoSignal
jp LoadStation_PokeFluteRadio
.EvolutionRadio:
; This station airs in the Lake of Rage area when Rocket are still in Mahogany.
ld a, [wStatusFlags]
- bit 4, a
+ bit 4, a ; ENGINE_ROCKET_SIGNAL_ON_CH20
jr z, .NoSignal
ld a, [wPokegearMapPlayerIconLandmark]
cp MAHOGANY_TOWN
@@ -1669,7 +1699,7 @@ LoadStation_BuenasPassword: ; 917a5 (24:57a5)
call Radio_BackUpFarCallParams
ld de, NotBuenasPasswordName
ld a, [wStatusFlags2]
- bit 0, a
+ bit 0, a ; ENGINE_ROCKETS_IN_RADIO_TOWER
ret z
ld de, BuenasPasswordName
ret
@@ -1751,7 +1781,7 @@ LoadStation_EvolutionRadio: ; 9183e (24:583e)
; 91853 (24:5853)
-LoadStation_Dummy: ; 91853
+Unreferenced_LoadStation: ; 91853
ret
RadioMusicRestartDE: ; 91854 (24:5854)
@@ -1768,7 +1798,7 @@ RadioMusicRestartDE: ; 91854 (24:5854)
RadioMusicRestartPokemonChannel: ; 91868 (24:5868)
push de
- ld a, $fe
+ ld a, RESTART_MAP_MUSIC
ld [wPokegearRadioMusicPlaying], a
ld de, MUSIC_NONE
call PlayMusic
@@ -1799,7 +1829,7 @@ NoRadioStation: ; 91888 (24:5888)
NoRadioMusic: ; 9189d (24:589d)
ld de, MUSIC_NONE
call PlayMusic
- ld a, $ff
+ ld a, ENTER_MAP_MUSIC
ld [wPokegearRadioMusicPlaying], a
ret
@@ -1810,7 +1840,7 @@ NoRadioName: ; 918a9 (24:58a9)
lb bc, 3, 18
call ClearBox
hlcoord 0, 12
- ld bc, $412
+ lb bc, 4, 18
call TextBox
ret
@@ -1966,26 +1996,26 @@ _TownMap: ; 9191c
ld a, [wTownMapPlayerIconLandmark]
cp KANTO_LANDMARK
jr nc, .kanto2
- ld e, $0
+ ld e, JOHTO_REGION
jr .okay_tilemap
.kanto2
- ld e, $1
+ ld e, KANTO_REGION
.okay_tilemap
farcall PokegearMap
- ld a, $7
+ ld a, $07
ld bc, 6
hlcoord 1, 0
call ByteFill
hlcoord 0, 0
- ld [hl], $6
+ ld [hl], $06
hlcoord 7, 0
ld [hl], $17
hlcoord 7, 1
ld [hl], $16
hlcoord 7, 2
ld [hl], $26
- ld a, $7
+ ld a, $07
ld bc, NAME_LENGTH
hlcoord 8, 2
call ByteFill
@@ -2001,7 +2031,7 @@ PlayRadio: ; 91a53
ld hl, Options
ld a, [hl]
push af
- set 4, [hl]
+ set NO_TEXT_SCROLL, [hl]
call .PlayStation
ld c, 100
call DelayFrames
@@ -2031,10 +2061,10 @@ PlayRadio: ; 91a53
; 91a87
.PlayStation: ; 91a87
- ld a, -1
- ld [EnemyTurnsTaken], a
+ ld a, ENTER_MAP_MUSIC
+ ld [wPokegearRadioMusicPlaying], a
ld hl, .StationPointers
- ld d, $0
+ ld d, 0
add hl, de
add hl, de
ld a, [hli]
@@ -2063,6 +2093,7 @@ PlayRadio: ; 91a53
; 91ab9
.StationPointers: ; 91ab9
+; entries correspond to radio station constants
dw .OakOrPnP
dw LoadStation_OaksPokemonTalk
dw LoadStation_PokedexShow
@@ -2286,7 +2317,7 @@ TownMapBubble: ; 91bb5
GetMapCursorCoordinates: ; 91c17
ld a, [wTownMapPlayerIconLandmark]
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
ld de, Flypoints
add hl, de
@@ -2296,10 +2327,10 @@ GetMapCursorCoordinates: ; 91c17
ld c, a
ld a, [wTownMapCursorCoordinates + 1]
ld b, a
- ld hl, $4
+ ld hl, 4
add hl, bc
ld [hl], e
- ld hl, $5
+ ld hl, 5
add hl, bc
ld [hl], d
ret
@@ -2331,7 +2362,7 @@ HasVisitedSpawn: ; 91c50
ld hl, wVisitedSpawns
ld b, CHECK_FLAG
ld d, 0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
ret
@@ -2440,7 +2471,7 @@ FlyMap: ; 91c90
; 91d11
-_Area: ; 91d11
+Predef_Pokedex_GetArea: ; 91d11
; e: Current landmark
ld a, [wTownMapPlayerIconLandmark]
push af
@@ -2477,7 +2508,7 @@ _Area: ; 91d11
call SetPalettes
xor a
ld [hBGMapMode], a
- xor a ; Johto
+ xor a ; JOHTO_REGION
call .GetAndPlaceNest
.loop
call JoyTextDelay
@@ -2524,13 +2555,13 @@ _Area: ; 91d11
call ClearSprites
ld a, $90
ld [hWY], a
- xor a ; Johto
+ xor a ; JOHTO_REGION
call .GetAndPlaceNest
ret
.right
ld a, [wStatusFlags]
- bit 6, a ; hall of fame
+ bit 6, a ; ENGINE_CREDITS_SKIP
ret z
ld a, [hWY]
and a
@@ -2538,7 +2569,7 @@ _Area: ; 91d11
call ClearSprites
xor a
ld [hWY], a
- ld a, 1 ; Kanto
+ ld a, KANTO_REGION
call .GetAndPlaceNest
ret
@@ -2596,7 +2627,7 @@ _Area: ; 91d11
ld e, a
farcall FindNest ; load nest landmarks into TileMap[0,0]
decoord 0, 0
- ld hl, Sprites
+ ld hl, Sprite01
.nestloop
ld a, [de]
and a
@@ -2609,14 +2640,14 @@ _Area: ; 91d11
; load into OAM
ld a, d
sub 4
- ld [hli], a
+ ld [hli], a ; y
ld a, e
sub 4
- ld [hli], a
- ld a, $7f ; nest icon in this context
- ld [hli], a
+ ld [hli], a ; x
+ ld a, $7f ; nest icon
+ ld [hli], a ; tile id
xor a
- ld [hli], a
+ ld [hli], a ; attributes
; next
pop de
inc de
@@ -2640,37 +2671,37 @@ _Area: ; 91d11
ld c, e
ld b, d
ld de, .PlayerOAM
- ld hl, Sprites
+ ld hl, Sprite01
.ShowPlayerLoop:
ld a, [de]
cp $80
jr z, .clear_oam
add b
- ld [hli], a
+ ld [hli], a ; y
inc de
ld a, [de]
add c
- ld [hli], a
+ ld [hli], a ; x
inc de
ld a, [de]
add $78 ; where the player's sprite is loaded
- ld [hli], a
+ ld [hli], a ; tile id
inc de
push bc
- ld c, 0 ; RED
+ ld c, PAL_OW_RED
ld a, [wPlayerGender]
bit 0, a
- jr z, .got_gender
- inc c ; BLUE
-.got_gender
+ jr z, .male
+ inc c ; PAL_OW_BLUE
+.male
ld a, c
- ld [hli], a
+ ld [hli], a ; attributes
pop bc
jr .ShowPlayerLoop
.clear_oam
- ld hl, Sprites + 4 * 4
- ld bc, SpritesEnd - (Sprites + 4 * 4)
+ ld hl, Sprite05
+ ld bc, SpritesEnd - Sprite05
xor a
call ByteFill
ret
@@ -2678,10 +2709,11 @@ _Area: ; 91d11
; 91e9c
.PlayerOAM: ; 91e9c
- db -1 * 8, -1 * 8, 0 ; top left
- db -1 * 8, 0 * 8, 1 ; top right
- db 0 * 8, -1 * 8, 2 ; bottom left
- db 0 * 8, 0 * 8, 3 ; bottom right
+ ; y pxl, x pxl, tile offset
+ db -1 * 8, -1 * 8, 0 ; top left
+ db -1 * 8, 0 * 8, 1 ; top right
+ db 0 * 8, -1 * 8, 2 ; bottom left
+ db 0 * 8, 0 * 8, 3 ; bottom right
db $80 ; terminator
; 91ea9
@@ -2790,12 +2822,11 @@ TownMapPals: ; 91f13
; Current tile
ld a, [hli]
push hl
-; HP/borders use palette 0
+; The palette map covers tiles $00 to $5f; $60 and above use palette 0
cp $60
jr nc, .pal0
-; The palette data is condensed to nybbles,
-; least-significant first.
+; The palette data is condensed to nybbles, least-significant first.
ld hl, .PalMap
srl a
jr c, .odd
@@ -2806,7 +2837,7 @@ TownMapPals: ; 91f13
adc 0
ld h, a
ld a, [hl]
- and %111
+ and PALETTE_MASK
jr .update
.odd
@@ -2818,7 +2849,7 @@ TownMapPals: ; 91f13
ld h, a
ld a, [hl]
swap a
- and %111
+ and PALETTE_MASK
jr .update
.pal0
@@ -2834,11 +2865,11 @@ TownMapPals: ; 91f13
ret
.PalMap:
-INCLUDE "data/palettes/town_map.asm"
+INCLUDE "gfx/pokegear/town_map_palette_map.asm"
; 91f7b
TownMapMon: ; 91f7b
-; Draw the FlyMon icon at town map location in
+; Draw the FlyMon icon at town map location
; Get FlyMon species
ld a, [CurPartyMon]
@@ -2849,7 +2880,7 @@ TownMapMon: ; 91f7b
ld a, [hl]
ld [wd265], a
; Get FlyMon icon
- ld e, 8 ; starting tile in VRAM
+ ld e, $08 ; starting tile in VRAM
farcall GetSpeciesIcon
; Animation/palette
depixel 0, 0
@@ -2857,7 +2888,7 @@ TownMapMon: ; 91f7b
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
- ld [hl], $8
+ ld [hl], $08
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld [hl], SPRITE_ANIM_SEQ_NULL
@@ -2913,7 +2944,7 @@ TownMapPlayerIcon: ; 91fa6
LoadTownMapGFX: ; 91ff2
ld hl, TownMapGFX
ld de, vTiles2
- lb bc, BANK(TownMapGFX), $30
+ lb bc, BANK(TownMapGFX), 48
call DecompressRequest2bpp
ret
@@ -2932,7 +2963,7 @@ INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp"
FlyMapLabelBorderGFX: ; 922e1
INCBIN "gfx/pokegear/flymap_label_border.1bpp"
-; XXX
+Unreferenced_Function92311:
xor a
ld [wTownMapPlayerIconLandmark], a
call ClearBGPalettes
diff --git a/engine/predef.asm b/engine/predef.asm
index 837f7b96b..62ca7b147 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -30,79 +30,79 @@ PredefPointers:: ; 856b
; $4b Predef pointers
; address, bank
- add_predef LearnMove ; $0
- add_predef Predef1
- add_predef HealParty
- add_predef FlagPredef
- add_predef ComputeHPBarPixels
- add_predef FillPP
- add_predef TryAddMonToParty
- add_predef AddTempmonToParty
- add_predef SentGetPkmnIntoFromBox
- add_predef SentPkmnIntoBox
- add_predef GiveEgg
- add_predef AnimateHPBar
- add_predef CalcPkmnStats
- add_predef CalcPkmnStatC
- add_predef CanLearnTMHMMove
- add_predef GetTMHMMove
+ add_predef Predef_LearnMove ; $0
+ add_predef DummyPredef1
+ add_predef HealParty ; this is both a special and a predef
+ add_predef Predef_SmallFarFlagAction
+ add_predef Predef_ComputeHPBarPixels
+ add_predef Predef_FillPP
+ add_predef Predef_TryAddMonToParty
+ add_predef Predef_AddTempmonToParty
+ add_predef Predef_SendGetPkmnIntoFromBox
+ add_predef Predef_SendPkmnIntoBox
+ add_predef Predef_GiveEgg
+ add_predef Predef_AnimateHPBar
+ add_predef Predef_CalcPkmnStats
+ add_predef Predef_CalcPkmnStatC
+ add_predef Predef_CanLearnTMHMMove
+ add_predef Predef_GetTMHMMove
add_predef Predef_LinkTextbox ; $ 10
- add_predef PrintMoveDesc
- add_predef UpdatePlayerHUD
- add_predef PlaceGraphic
- add_predef CheckPlayerPartyForFitPkmn
- add_predef UpdateEnemyHUD
- add_predef StartBattle
- add_predef FillInExpBar
- add_predef GetBattleMonBackpic ; $18
- add_predef GetEnemyMonFrontpic
- add_predef LearnLevelMoves
- add_predef FillMoves
- add_predef EvolveAfterBattle
- add_predef TradeAnimationPlayer2
- add_predef TradeAnimation
- add_predef CopyPkmnToTempMon
- add_predef ListMoves ; $20
- add_predef PlaceNonFaintStatus
- add_predef Predef22
- add_predef ListMovePP
- add_predef GetGender
- add_predef StatsScreenInit
- add_predef DrawPlayerHP
- add_predef DrawEnemyHP
- add_predef PrintTempMonStats ; $28
- add_predef GetTypeName
- add_predef PrintMoveType
- add_predef PrintType
- add_predef PrintMonTypes
- add_predef GetUnownLetter
- add_predef LoadPoisonBGPals
- add_predef Predef2F
- add_predef InitSGBBorder ; $30
- add_predef Predef_LoadSGBLayout
- add_predef _Area
- add_predef CheckContestMon
+ add_predef Predef_PrintMoveDesc
+ add_predef Predef_UpdatePlayerHUD
+ add_predef Predef_PlaceGraphic
+ add_predef Predef_CheckPlayerPartyForFitPkmn
+ add_predef Predef_UpdateEnemyHUD
add_predef Predef_StartBattle
- add_predef Predef35
- add_predef Predef36
- add_predef PlayBattleAnim
- add_predef Predef38 ; $38
- add_predef Predef39
- add_predef Predef3A
- add_predef PartyMonItemName
- add_predef GetMonFrontpic
- add_predef GetMonBackpic
- add_predef GetAnimatedFrontpicPredef
- add_predef GetTrainerPic
- add_predef DecompressPredef ; $40
- add_predef CheckTypeMatchup
- add_predef ConvertMon_1to2
- add_predef NewPokedexEntry
- add_predef AnimateMon_Slow_Normal
- add_predef PlaceStatusString
- add_predef LoadMonAnimation
- add_predef AnimateFrontpic
- add_predef Predef48 ; $48
- add_predef HOF_AnimateFrontpic
+ add_predef Predef_FillInExpBar
+ add_predef Predef_GetBattleMonBackpic ; $18
+ add_predef Predef_GetEnemyMonFrontpic
+ add_predef Predef_LearnLevelMoves
+ add_predef Predef_FillMoves
+ add_predef Predef_EvolveAfterBattle
+ add_predef Predef_TradeAnimationPlayer2
+ add_predef Predef_TradeAnimation
+ add_predef Predef_CopyPkmnToTempMon
+ add_predef Predef_ListMoves ; $20
+ add_predef Predef_PlaceNonFaintStatus
+ add_predef UnusedPredef22
+ add_predef Predef_ListMovePP
+ add_predef Predef_GetGender
+ add_predef Predef_StatsScreenInit
+ add_predef Predef_DrawPlayerHP
+ add_predef Predef_DrawEnemyHP
+ add_predef Predef_PrintTempMonStats ; $28
+ add_predef Predef_GetTypeName
+ add_predef Predef_PrintMoveType
+ add_predef Predef_PrintType
+ add_predef Predef_PrintMonTypes
+ add_predef Predef_GetUnownLetter
+ add_predef Predef_LoadPoisonBGPals
+ add_predef DummyPredef2F
+ add_predef Predef_InitSGBBorder ; $30
+ add_predef Predef_LoadSGBLayout
+ add_predef Predef_Pokedex_GetArea
+ add_predef UnusedPredef_CheckContestMon
+ add_predef Predef_DoBattleTransition
+ add_predef DummyPredef35
+ add_predef DummyPredef36
+ add_predef Predef_PlayBattleAnim
+ add_predef DummyPredef38 ; $38
+ add_predef DummyPredef39
+ add_predef DummyPredef3A
+ add_predef Predef_PartyMonItemName
+ add_predef Predef_GetMonFrontpic
+ add_predef Predef_GetMonBackpic
+ add_predef Predef_GetAnimatedFrontpic
+ add_predef Predef_GetTrainerPic
+ add_predef Predef_Decompress ; $40
+ add_predef Predef_CheckTypeMatchup
+ add_predef Predef_ConvertMon_1to2
+ add_predef Predef_NewPokedexEntry
+ add_predef UnusedPredef_AnimateMon_Slow_Normal
+ add_predef Predef_PlaceStatusString
+ add_predef Predef_LoadMonAnimation
+ add_predef Predef_AnimateFrontpic
+ add_predef UnusedPredef48 ; $48
+ add_predef HOF_Predef_AnimateFrontpic
dbw $ff, InexplicablyEmptyFunction ; ???
; 864c
diff --git a/engine/print_party.asm b/engine/print_party.asm
index f2420dfe8..28f7a7c53 100755
--- a/engine/print_party.asm
+++ b/engine/print_party.asm
@@ -1,3 +1,5 @@
+PRINTPARTY_HP EQUS "\"◀\"" ; $71
+
PrintPage1: ; 1dc1b0
hlcoord 0, 0
decoord 0, 0, wPrinterTileMapBuffer
@@ -141,23 +143,23 @@ PrintPartyMonPage1: ; 1dc381
call LoadFontsBattleExtra
ld de, GBPrinterHPIcon
- ld hl, vTiles2 tile $71
+ ld hl, vTiles2 tile PRINTPARTY_HP
lb bc, BANK(GBPrinterHPIcon), 1
call Request1bpp
ld de, GBPrinterLvIcon
- ld hl, vTiles2 tile $6e
+ ld hl, vTiles2 tile "<LV>"
lb bc, BANK(GBPrinterLvIcon), 1
call Request1bpp
- ld de, ShinyIconGFX
- ld hl, vTiles2 tile $3f
- lb bc, BANK(ShinyIconGFX), 1
+ ld de, StatsScreenPageTilesGFX + 14 tiles ; shiny icon
+ ld hl, vTiles2 tile "<SHINY>"
+ lb bc, BANK(StatsScreenPageTilesGFX), 1
call Get2bpp
xor a
ld [MonType], a
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
hlcoord 0, 7
ld b, 9
ld c, 18
@@ -166,7 +168,7 @@ PrintPartyMonPage1: ; 1dc381
ld a, [TempMonLevel]
call PrintLevel_Force3Digits
hlcoord 12, 2
- ld [hl], "◀" ; Filled left triangle
+ ld [hl], PRINTPARTY_HP
inc hl
ld de, TempMonMaxHP
lb bc, 2, 3
@@ -213,7 +215,7 @@ PrintPartyMonPage1: ; 1dc381
call Function1dc51a
call Function1dc52c
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
ld hl, wBoxAlignment
xor a
ld [hl], a
@@ -241,7 +243,7 @@ PrintPartyMonPage2: ; 1dc47b
call LoadFontsBattleExtra
xor a
ld [MonType], a
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
hlcoord 0, 0
ld b, 15
ld c, 18
@@ -316,7 +318,7 @@ Function1dc51a: ; 1dc51a
; 1dc52c
Function1dc52c: ; 1dc52c
- farcall GetGender
+ farcall Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
diff --git a/engine/printer.asm b/engine/printer.asm
index 68c3c6c9f..0e0696e2b 100755
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -596,8 +596,7 @@ PlacePrinterStatusString: ; 84785
ret
; 847bd
-Function847bd: ; 847bd
-; XXX
+Unreferenced_Function847bd: ; 847bd
ld a, [wPrinterStatus]
and a
ret z
@@ -861,7 +860,7 @@ Printer_GetMonGender: ; 8498a (21:498a)
ld [CurPartyMon], a
ld a, TEMPMON
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
diff --git a/engine/printnum.asm b/engine/printnum.asm
index d1d7e7ad3..fec798d5c 100755
--- a/engine/printnum.asm
+++ b/engine/printnum.asm
@@ -165,7 +165,7 @@ _PrintNum:: ; c4c7
dec e
jr nz, .money_leading_zero
inc hl
- ld [hl], $f2 ; XXX
+ ld [hl], "<DOT>"
.money_leading_zero
call .AdvancePointer
diff --git a/engine/radio.asm b/engine/radio.asm
index 42db63ab0..de19a289c 100644
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -28,6 +28,7 @@ PlayRadioShow:
jp hl
RadioJumptable:
+; entries correspond to constants/radio_constants.asm
dw OaksPkmnTalk1 ; $00
dw PokedexShow1 ; $01
dw BenMonMusic1 ; $02
@@ -203,11 +204,11 @@ OaksPkmnTalk4:
; Choose a random route, and a random Pokemon from that route.
.sample
call Random
- and $1f
- cp $f ; so wasteful
+ and %11111
+ cp (OaksPkmnTalkRoutesEnd - OaksPkmnTalkRoutes) / 2
jr nc, .sample
; We now have a number between 0 and 14.
- ld hl, .routes
+ ld hl, OaksPkmnTalkRoutes
ld c, a
ld b, 0
add hl, bc
@@ -239,14 +240,15 @@ OaksPkmnTalk4:
jr .loop
.done
+ ; Point hl to the list of morning Pokémon., skipping percentages
rept 4
inc hl
endr
; Generate a number, either 0, 1, or 2, to choose a time of day.
.loop2
call Random
- and 3
- cp 3
+ maskbits NUM_DAYTIMES +- 1
+ cp DARKNESS_F
jr z, .loop2
ld bc, 2 * NUM_GRASSMON
@@ -273,6 +275,7 @@ endr
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
call CopyBytes
+
; Now that we've chosen our wild Pokemon,
; let's recover the map index info and get its name.
pop bc
@@ -289,22 +292,7 @@ endr
ld a, OAKS_POKEMON_TALK
jp PrintRadioLine
-.routes
- map ROUTE_29
- map ROUTE_46
- map ROUTE_30
- map ROUTE_32
- map ROUTE_34
- map ROUTE_35
- map ROUTE_37
- map ROUTE_38
- map ROUTE_39
- map ROUTE_42
- map ROUTE_43
- map ROUTE_44
- map ROUTE_45
- map ROUTE_36
- map ROUTE_31
+INCLUDE "data/radio/oaks_pkmn_talk_routes.asm"
OaksPkmnTalk5:
ld hl, OPT_OakText2
@@ -360,11 +348,13 @@ OPT_MaryText1:
db "@"
OaksPkmnTalk8:
+ ; 0-15 are all valid indexes into .Adverbs,
+ ; so no need for a retry loop
call Random
- and $f
+ maskbits NUM_OAKS_MON_TALK_ADVERBS +- 1
ld e, a
ld d, 0
- ld hl, .Descriptors
+ ld hl, .Adverbs
add hl, de
add hl, de
ld a, [hli]
@@ -373,7 +363,8 @@ OaksPkmnTalk8:
ld a, OAKS_POKEMON_TALK_9
jp NextRadioLine
-.Descriptors:
+.Adverbs:
+; there are NUM_OAKS_MON_TALK_ADVERBS entries
dw .sweetadorably
dw .wigglyslickly
dw .aptlynamed
@@ -472,11 +463,13 @@ OaksPkmnTalk8:
db "@"
OaksPkmnTalk9:
+ ; 0-15 are all valid indexes into .Adjectives,
+ ; so no need for a retry loop
call Random
- and $f
+ maskbits NUM_OAKS_MON_TALK_ADJECTIVES +- 1
ld e, a
ld d, 0
- ld hl, .Descriptors
+ ld hl, .Adjectives
add hl, de
add hl, de
ld a, [hli]
@@ -493,7 +486,8 @@ OaksPkmnTalk9:
.ok
jp NextRadioLine
-.Descriptors:
+.Adjectives:
+; there are NUM_OAKS_MON_TALK_ADJECTIVES entries
dw .cute
dw .weird
dw .pleasant
@@ -652,7 +646,7 @@ OaksPkmnTalk14:
ld hl, wRadioTextDelay
dec [hl]
ret nz
- ld de, $1d
+ ld de, MUSIC_POKEMON_TALK
callfar RadioMusicRestartDE
ld hl, .terminator
call PrintText
@@ -698,8 +692,8 @@ PokedexShow_GetDexEntryBank:
dec a
rlca
rlca
- and 3
- ld hl, .pokedexbanks
+ maskbits NUM_DEX_ENTRY_BANKS +- 1
+ ld hl, .PokedexEntryBanks
ld d, 0
ld e, a
add hl, de
@@ -708,7 +702,7 @@ PokedexShow_GetDexEntryBank:
pop hl
ret
-.pokedexbanks
+.PokedexEntryBanks
db BANK(PokedexEntries1)
db BANK(PokedexEntries2)
db BANK(PokedexEntries3)
@@ -1146,7 +1140,7 @@ PeoplePlaces2:
PeoplePlaces3:
ld hl, PnP_Text3
call Random
- cp $7b ; 48 percent
+ cp 49 percent - 1
ld a, PLACES_AND_PEOPLE_4 ; People
jr c, .ok
ld a, PLACES_AND_PEOPLE_6 ; Places
@@ -1170,20 +1164,20 @@ PnP_Text3:
PeoplePlaces4: ; People
call Random
- and $7f
+ maskbits NUM_TRAINER_CLASSES +- 1
inc a
cp NUM_TRAINER_CLASSES - 1
jr nc, PeoplePlaces4
push af
- ld hl, .E4Names
+ ld hl, PnP_HiddenPeople
ld a, [wStatusFlags]
bit 6, a ; ENGINE_CREDITS_SKIP
jr z, .ok
- ld hl, .KantoLeaderNames
+ ld hl, PnP_HiddenPeople_BeatE4
ld a, [wKantoBadges]
- cp %11111111
+ cp %11111111 ; all badges
jr nz, .ok
- ld hl, .MiscNames
+ ld hl, PnP_HiddenPeople_BeatKanto
.ok
pop af
ld c, a
@@ -1203,10 +1197,7 @@ PeoplePlaces4: ; People
ld a, PLACES_AND_PEOPLE_5
jp NextRadioLine
-.E4Names: db WILL, BRUNO, KAREN, KOGA, CHAMPION
-.KantoLeaderNames: db BROCK, MISTY, LT_SURGE, ERIKA, JANINE, SABRINA, BLAINE, BLUE
-.MiscNames: db RIVAL1, POKEMON_PROF, CAL, RIVAL2, RED
- db -1
+INCLUDE "data/radio/pnp_hidden_people.asm"
PnP_Text4:
; @ @ @
@@ -1214,29 +1205,32 @@ PnP_Text4:
db "@"
PeoplePlaces5:
+ ; 0-15 are all valid indexes into .Adjectives,
+ ; so no need for a retry loop
call Random
- and $f
+ maskbits NUM_PNP_PEOPLE_ADJECTIVES +- 1
ld e, a
ld d, 0
- ld hl, .Descriptors
+ ld hl, .Adjectives
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
call Random
- cp $a ; 6.25 percent
+ cp 4 percent
ld a, PLACES_AND_PEOPLE
jr c, .ok
call Random
- cp $7b ; 48 percent
+ cp 49 percent - 1
ld a, PLACES_AND_PEOPLE_4 ; People
jr c, .ok
ld a, PLACES_AND_PEOPLE_6 ; Places
.ok
jp NextRadioLine
-.Descriptors:
+.Adjectives:
+; there are NUM_PNP_PEOPLE_ADJECTIVES entries
dw PnP_cute
dw PnP_lazy
dw PnP_happy
@@ -1336,9 +1330,9 @@ PnP_odd:
PeoplePlaces6: ; Places
call Random
- cp 9
+ cp (PnP_HiddenPlacesEnd - PnP_HiddenPlaces) / 2
jr nc, PeoplePlaces6
- ld hl, .Maps
+ ld hl, PnP_HiddenPlaces
ld c, a
ld b, 0
add hl, bc
@@ -1353,16 +1347,7 @@ PeoplePlaces6: ; Places
ld a, PLACES_AND_PEOPLE_7
jp NextRadioLine
-.Maps:
- map PALLET_TOWN
- map ROUTE_22
- map PEWTER_CITY
- map CERULEAN_POLICE_STATION
- map ROUTE_12
- map ROUTE_11
- map ROUTE_16
- map ROUTE_14
- map CINNABAR_POKECENTER_2F_BETA
+INCLUDE "data/radio/pnp_hidden_places.asm"
PnP_Text5:
; @ @
@@ -1370,11 +1355,13 @@ PnP_Text5:
db "@"
PeoplePlaces7:
+ ; 0-15 are all valid indexes into .Adjectives,
+ ; so no need for a retry loop
call Random
- and $f
+ maskbits NUM_PNP_PLACES_ADJECTIVES +- 1
ld e, a
ld d, 0
- ld hl, .Descriptors
+ ld hl, .Adjectives
add hl, de
add hl, de
ld a, [hli]
@@ -1386,14 +1373,15 @@ PeoplePlaces7:
ld a, PLACES_AND_PEOPLE
jr c, .ok
call Random
- cp 1 + 48 percent
+ cp 49 percent - 1
ld a, PLACES_AND_PEOPLE_4 ; People
jr c, .ok
ld a, PLACES_AND_PEOPLE_6 ; Places
.ok
jp PrintRadioLine
-.Descriptors:
+.Adjectives:
+; there are NUM_PNP_PLACES_ADJECTIVES entries
dw PnP_cute
dw PnP_lazy
dw PnP_happy
@@ -1572,12 +1560,12 @@ BuenasPassword4:
ld a, [wBuenasPassword]
; If we already generated the password today, we don't need to generate a new one.
ld hl, wWeeklyFlags
- bit 7, [hl]
+ bit 7, [hl] ; ENGINE_BUENAS_PASSWORD
jr nz, .AlreadyGotIt
; There are only 11 groups to choose from.
.greater_than_11
call Random
- maskbits NUM_PASSWORD_CATEGORIES
+ maskbits NUM_PASSWORD_CATEGORIES +- 1
cp NUM_PASSWORD_CATEGORIES
jr nc, .greater_than_11
; Store it in the high nybble of e.
@@ -1586,7 +1574,7 @@ BuenasPassword4:
; For each group, choose one of the three passwords.
.greater_than_three
call Random
- and $3
+ maskbits NUM_PASSWORDS_PER_CATEGORY +- 1
cp NUM_PASSWORDS_PER_CATEGORY
jr nc, .greater_than_three
; The high nybble of wBuenasPassword will now contain the password group index, and the low nybble contains the actual password.
@@ -1594,7 +1582,7 @@ BuenasPassword4:
ld [wBuenasPassword], a
; Set the flag so that we don't generate a new password this week.
ld hl, wWeeklyFlags
- set 7, [hl]
+ set 7, [hl] ; ENGINE_BUENAS_PASSWORD
.AlreadyGotIt:
ld c, a
call GetBuenasPassword
@@ -1608,7 +1596,7 @@ GetBuenasPassword:
ld a, c
swap a
and $f
- ld hl, PasswordTable
+ ld hl, BuenasPasswordTable
ld d, 0
ld e, a
add hl, de
@@ -1640,11 +1628,11 @@ GetBuenasPassword:
ret
.StringFunctionJumpTable:
- dw .Mon
- dw .Item
- dw .Move
- dw .RawString
-
+; entries correspond to BUENA_* constants
+ dw .Mon ; BUENA_MON
+ dw .Item ; BUENA_ITEM
+ dw .Move ; BUENA_MOVE
+ dw .RawString ; BUENA_STRING
.Mon:
call .GetTheIndex
@@ -1693,30 +1681,7 @@ GetBuenasPassword:
ld de, StringBuffer1
ret
-PasswordTable:
- dw .JohtoStarters
- dw .Beverages
- dw .HealingItems
- dw .Balls
- dw .Pokemon1
- dw .Pokemon2
- dw .JohtoTowns
- dw .Types
- dw .Moves
- dw .XItems
- dw .RadioStations
- ; string type, points, option 1, option 2, option 3
-.JohtoStarters: db BUENA_MON, 10, CYNDAQUIL, TOTODILE, CHIKORITA
-.Beverages: db BUENA_ITEM, 12, FRESH_WATER, SODA_POP, LEMONADE
-.HealingItems: db BUENA_ITEM, 12, POTION, ANTIDOTE, PARLYZ_HEAL
-.Balls: db BUENA_ITEM, 12, POKE_BALL, GREAT_BALL, ULTRA_BALL
-.Pokemon1: db BUENA_MON, 10, PIKACHU, RATTATA, GEODUDE
-.Pokemon2: db BUENA_MON, 10, HOOTHOOT, SPINARAK, DROWZEE
-.JohtoTowns: db BUENA_STRING, 16, "NEW BARK TOWN@", "CHERRYGROVE CITY@", "AZALEA TOWN@"
-.Types: db BUENA_STRING, 6, "FLYING@", "BUG@", "GRASS@"
-.Moves: db BUENA_MOVE, 12, TACKLE, GROWL, MUD_SLAP
-.XItems: db BUENA_ITEM, 12, X_ATTACK, X_DEFEND, X_SPEED
-.RadioStations: db BUENA_STRING, 13, "#MON Talk@", "#MON Music@", "Lucky Channel@"
+INCLUDE "data/radio/buenas_passwords.asm"
BuenasPassword5:
ld hl, BuenaRadioText5
@@ -1738,14 +1703,14 @@ BuenasPassword7:
BuenasPasswordAfterMidnight:
push hl
ld hl, wWeeklyFlags
- res 7, [hl]
+ res 7, [hl] ; ENGINE_BUENAS_PASSWORD
pop hl
ld a, BUENAS_PASSWORD_8
jp NextRadioLine
BuenasPassword8:
ld hl, wWeeklyFlags
- res 7, [hl]
+ res 7, [hl] ; ENGINE_BUENAS_PASSWORD
ld hl, BuenaRadioMidnightText10
ld a, BUENAS_PASSWORD_9
jp NextRadioLine
@@ -1958,18 +1923,7 @@ StartRadioStation:
callfar RadioMusicRestartDE
ret
-RadioChannelSongs:
- dw MUSIC_POKEMON_TALK
- dw MUSIC_POKEMON_CENTER
- dw MUSIC_TITLE
- dw MUSIC_GAME_CORNER
- dw MUSIC_BUENAS_PASSWORD
- dw MUSIC_VIRIDIAN_CITY
- dw MUSIC_BICYCLE
- dw MUSIC_ROCKET_OVERTURE
- dw MUSIC_POKE_FLUTE_CHANNEL
- dw MUSIC_RUINS_OF_ALPH_RADIO
- dw MUSIC_LAKE_OF_RAGE_ROCKET_RADIO
+INCLUDE "data/radio/channel_music.asm"
NextRadioLine:
push af
diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm
index 2fa98a545..fcc2f36af 100644
--- a/engine/routines/correcterrorsinplayerparty.asm
+++ b/engine/routines/correcterrorsinplayerparty.asm
@@ -1,4 +1,4 @@
-CorrectErrorsInPlayerParty: ; unreferenced
+Unreferenced_CorrectErrorsInPlayerParty:
ld hl, PartyCount
ld a, [hl]
and a
@@ -90,7 +90,7 @@ CorrectErrorsInPlayerParty: ; unreferenced
ld hl, MON_STAT_EXP - 1
add hl, bc
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop hl
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
diff --git a/engine/routines/drawkrispackgfx.asm b/engine/routines/drawkrispackgfx.asm
index 457dd7110..54a21e447 100644
--- a/engine/routines/drawkrispackgfx.asm
+++ b/engine/routines/drawkrispackgfx.asm
@@ -11,10 +11,10 @@ DrawKrisPackGFX: ; 48e81
ret
PackFGFXPointers: ; 48e93
- dw PackFGFX + (15 tiles) * 1
- dw PackFGFX + (15 tiles) * 3
- dw PackFGFX + (15 tiles) * 0
- dw PackFGFX + (15 tiles) * 2
+ dw PackFGFX + (15 tiles) * 1 ; ITEM_POCKET
+ dw PackFGFX + (15 tiles) * 3 ; BALL_POCKET
+ dw PackFGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET
+ dw PackFGFX + (15 tiles) * 2 ; TM_HM_POCKET
PackFGFX: ; 48e9b
INCBIN "gfx/pack/pack_f.2bpp"
diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm
index bd4f37882..676960c31 100644
--- a/engine/routines/flagpredef.asm
+++ b/engine/routines/flagpredef.asm
@@ -1,5 +1,5 @@
-FlagPredef: ; 4d7c1
-; Perform action b on flag c in flag array hl.
+Predef_SmallFarFlagAction: ; 4d7c1
+; Perform action b on bit c in flag array hl.
; If checking a flag, check flag array d:hl unless d is 0.
; For longer flag arrays, see FlagAction.
diff --git a/engine/routines/loadpushoam.asm b/engine/routines/loadpushoam.asm
index 6af0ddf6d..c07c06d0f 100644
--- a/engine/routines/loadpushoam.asm
+++ b/engine/routines/loadpushoam.asm
@@ -13,7 +13,7 @@ LoadPushOAM:: ; 4031
.PushOAM: ; 403f
ld a, HIGH(Sprites)
ld [rDMA], a
- ld a, (SpritesEnd - Sprites) / 4 ; 40
+ ld a, NUM_SPRITE_OAM_STRUCTS
.pushoam_loop
dec a
jr nz, .pushoam_loop
diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm
index acf9fca7b..c52188f6e 100644
--- a/engine/routines/newpokedexentry.asm
+++ b/engine/routines/newpokedexentry.asm
@@ -1,4 +1,4 @@
-NewPokedexEntry: ; fb877
+Predef_NewPokedexEntry: ; fb877
ld a, [hMapAnims]
push af
xor a
diff --git a/engine/routines/placegraphic.asm b/engine/routines/placegraphic.asm
index d72364776..28b69fc23 100644
--- a/engine/routines/placegraphic.asm
+++ b/engine/routines/placegraphic.asm
@@ -1,4 +1,4 @@
-PlaceGraphic: ; 2ef6e
+Predef_PlaceGraphic: ; 2ef6e
; Fill wBoxAlignment-aligned box width b height c
; with iterating tile starting from hGraphicStartTile at hl.
; Predef $13
diff --git a/engine/routines/playslowcry.asm b/engine/routines/playslowcry.asm
index 3cc347a55..636741bcf 100644
--- a/engine/routines/playslowcry.asm
+++ b/engine/routines/playslowcry.asm
@@ -1,4 +1,4 @@
-PlaySlowCry: ; fb841
+Special_PlaySlowCry: ; fb841
ld a, [ScriptVar]
call LoadCryHeader
jr c, .done
diff --git a/engine/routines/printhoursmins.asm b/engine/routines/printhoursmins.asm
index 50117188c..eb7dc1619 100644
--- a/engine/routines/printhoursmins.asm
+++ b/engine/routines/printhoursmins.asm
@@ -1,5 +1,4 @@
-Function1dd6a9: ; 1dd6a9
-; XXX
+Unreferenced_Function1dd6a9: ; 1dd6a9
ld a, b
ld b, c
ld c, a
diff --git a/engine/routines/printitemdescription.asm b/engine/routines/printitemdescription.asm
new file mode 100644
index 000000000..4da061fda
--- /dev/null
+++ b/engine/routines/printitemdescription.asm
@@ -0,0 +1,31 @@
+PrintItemDescription: ; 0x1c8955
+; Print the description for item [CurSpecies] at de.
+
+ ld a, [CurSpecies]
+ cp TM01
+ jr c, .not_a_tm
+
+ ld [CurItem], a
+ push de
+ farcall GetTMHMItemMove
+ pop hl
+ ld a, [wd265]
+ ld [CurSpecies], a
+ predef Predef_PrintMoveDesc
+ ret
+
+.not_a_tm
+ push de
+ ld hl, ItemDescriptions
+ ld a, [CurSpecies]
+ dec a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ pop hl
+ jp PlaceString
+; 0x1c8987
diff --git a/engine/routines/sine.asm b/engine/routines/sine.asm
index 89a905d2e..5f56a10a8 100755
--- a/engine/routines/sine.asm
+++ b/engine/routines/sine.asm
@@ -7,7 +7,6 @@ _Sine:: ; 84d9
and %111111
cp %100000
jr nc, .negative
-
call .ApplySineWave
ld a, h
ret
@@ -16,7 +15,7 @@ _Sine:: ; 84d9
and %011111
call .ApplySineWave
ld a, h
- xor -1
+ xor $ff
inc a
ret
@@ -31,7 +30,6 @@ _Sine:: ; 84d9
inc hl
ld d, [hl]
ld hl, 0
-
; Factor amplitude
.multiply
srl a
diff --git a/engine/routines/switchpartymons.asm b/engine/routines/switchpartymons.asm
index cde9c82b2..1379dff9c 100644
--- a/engine/routines/switchpartymons.asm
+++ b/engine/routines/switchpartymons.asm
@@ -25,13 +25,13 @@ _SwitchPartyMons:
ld a, " "
call ByteFill
pop af
- ld hl, Sprites
- ld bc, $10
+ ld hl, Sprite01
+ ld bc, 4 * SPRITEOAMSTRUCT_LENGTH
call AddNTimes
- ld de, $4
- ld c, $4
+ ld de, SPRITEOAMSTRUCT_LENGTH
+ ld c, 4
.gfx_loop
- ld [hl], $a0
+ ld [hl], SCREEN_WIDTH_PX ; y (off-screen)
add hl, de
dec c
jr nz, .gfx_loop
diff --git a/engine/routines/trademonfrontpic.asm b/engine/routines/trademonfrontpic.asm
index e312042ff..2d05a1c04 100644
--- a/engine/routines/trademonfrontpic.asm
+++ b/engine/routines/trademonfrontpic.asm
@@ -4,13 +4,13 @@ GetTrademonFrontpic: ; 4d7fd
ld de, vTiles2
push de
push af
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop af
ld [CurPartySpecies], a
ld [CurSpecies], a
call GetBaseData
pop de
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
ret
AnimateTrademonFrontpic: ; 4d81e
@@ -34,5 +34,5 @@ AnimateTrademonFrontpic: ; 4d81e
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_TRADE
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
ret
diff --git a/engine/rtc.asm b/engine/rtc.asm
index b44db1c7c..571de9284 100755
--- a/engine/rtc.asm
+++ b/engine/rtc.asm
@@ -1,4 +1,4 @@
-StopRTC: ; Unreferenced???
+Unreferenced_StopRTC:
ld a, SRAM_ENABLE
ld [MBC3SRamEnable], a
call LatchClock
@@ -58,7 +58,7 @@ TimesOfDay: ; 14044
db -1, MORN_F
; 1404e
-Unknown_1404e: ; unreferenced
+Unreferenced_1404e:
db 20, NITE_F
db 40, MORN_F
db 60, DAY_F
diff --git a/engine/save.asm b/engine/save.asm
index 12e5964b9..d9f48d62c 100644
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -415,8 +415,7 @@ EraseHallOfFame: ; 14d06
jp CloseSRAM
; 14d18
-Function14d18: ; 14d18
-; XXX
+Unreferenced_Function14d18: ; 14d18
; copy .Data to SRA4:a007
ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call GetSRAMBank
@@ -452,8 +451,7 @@ SaveData: ; 14d68
ret
; 14d6c
-Function14d6c: ; 14d6c
-; XXX
+Unreferenced_Function14d6c: ; 14d6c
ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call GetSRAMBank
ld a, [$a60b] ; address of MBC30 bank
@@ -469,8 +467,7 @@ Function14d6c: ; 14d6c
ret
; 14d83
-Function14d83: ; 14d83
-; XXX
+Unreferenced_Function14d83: ; 14d83
ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call GetSRAMBank
xor a
@@ -480,8 +477,7 @@ Function14d83: ; 14d83
ret
; 14d93
-Function14d93: ; 14d93
-; XXX
+Unreferenced_Function14d93: ; 14d93
ld a, 7 ; MBC30 bank used by JP Crystal; inaccessible by MBC3
call GetSRAMBank
xor a
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 9a89c375a..5e06c2ef8 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -128,7 +128,7 @@ ScriptCommandTable:
dw Script_warp ; 3c
dw Script_readmoney ; 3d
dw Script_readcoins ; 3e
- dw Script_RAM2MEM ; 3f
+ dw Script_vartomem ; 3f
dw Script_pokenamemem ; 40
dw Script_itemtotext ; 41
dw Script_mapnametotext ; 42
@@ -255,8 +255,7 @@ StopScript:
Script_callasm:
; script command 0xe
-; parameters:
-; asm (AsmPointerParam)
+; parameters: asm
call GetScriptByte
ld b, a
@@ -270,8 +269,7 @@ Script_callasm:
Script_special:
; script command 0xf
-; parameters:
-; predefined_script (MultiByteParam)
+; parameters: predefined_script
call GetScriptByte
ld e, a
@@ -282,8 +280,7 @@ Script_special:
Script_ptcallasm:
; script command 0x10
-; parameters:
-; asm (PointerToAsmPointerParam)
+; parameters: asm
call GetScriptByte
ld l, a
@@ -300,8 +297,7 @@ Script_ptcallasm:
Script_jumptextfaceplayer:
; script command 0x51
-; parameters:
-; text_pointer (RawTextPointerLabelParam)
+; parameters: text_pointer
ld a, [ScriptBank]
ld [wScriptTextBank], a
@@ -315,8 +311,7 @@ Script_jumptextfaceplayer:
Script_jumptext:
; script command 0x53
-; parameters:
-; text_pointer (RawTextPointerLabelParam)
+; parameters: text_pointer
ld a, [ScriptBank]
ld [wScriptTextBank], a
@@ -342,8 +337,7 @@ if _CRYSTAL
Script_farjumptext:
; script command 0x52
-; parameters:
-; text_pointer (PointerLabelBeforeBank)
+; parameters: text_pointer
call GetScriptByte
ld [wScriptTextBank], a
@@ -360,8 +354,7 @@ endc
Script_writetext:
; script command 0x4c
-; parameters:
-; text_pointer (RawTextPointerLabelParam)
+; parameters: text_pointer
call GetScriptByte
ld l, a
@@ -374,8 +367,7 @@ Script_writetext:
Script_farwritetext:
; script command 0x4b
-; parameters:
-; text_pointer (PointerLabelBeforeBank)
+; parameters: text_pointer
call GetScriptByte
ld b, a
@@ -388,9 +380,7 @@ Script_farwritetext:
Script_repeattext:
; script command 0x4d
-; parameters:
-; byte (SingleByteParam)
-; byte (SingleByteParam)
+; parameters: byte, byte
call GetScriptByte
ld l, a
@@ -444,8 +434,7 @@ Script_yesorno:
Script_loadmenudata:
; script command 0x4f
-; parameters:
-; data (MenuDataPointerParam)
+; parameters: data
call GetScriptByte
ld l, a
@@ -466,8 +455,7 @@ Script_closewindow:
Script_pokepic:
; script command 0x56
-; parameters:
-; pokemon (PokemonParam)
+; parameters: pokemon
call GetScriptByte
and a
@@ -512,9 +500,7 @@ Script__2dmenu:
Script_battletowertext:
; script command 0xa4
-; parameters:
-; pointer (PointerLabelBeforeBank)
-; memory (SingleByteParam)
+; parameters: pointer, memory
call SetUpTextBox
call GetScriptByte
@@ -524,9 +510,7 @@ Script_battletowertext:
Script_verbosegiveitem:
; script command 0x9e
-; parameters:
-; item (ItemLabelByte)
-; quantity (DecimalParam)
+; parameters: item, quantity
call Script_giveitem
call CurItemName
@@ -563,9 +547,7 @@ ReceivedItemText:
Script_verbosegiveitem2:
; script command 0x9f
-; parameters:
-; item (ItemLabelByte)
-; var (SingleByteParam)
+; parameters: item, var
call GetScriptByte
cp -1
@@ -632,7 +614,7 @@ GetPocketName:
ld a, [wItemAttributeParamBuffer]
dec a
ld hl, .Pockets
- and 3
+ maskbits NUM_POCKETS +- 1
add a
ld e, a
ld d, 0
@@ -677,9 +659,7 @@ PocketIsFullText:
Script_pokemart:
; script command 0x94
-; parameters:
-; dialog_id (SingleByteParam)
-; mart_id (MultiByteParam)
+; parameters: dialog_id, mart_id
call GetScriptByte
ld c, a
@@ -694,8 +674,7 @@ Script_pokemart:
Script_elevator:
; script command 0x95
-; parameters:
-; floor_list_pointer (PointerLabelParam)
+; parameters: floor_list_pointer
xor a
ld [ScriptVar], a
@@ -713,8 +692,7 @@ Script_elevator:
Script_trade:
; script command 0x96
-; parameters:
-; trade_id (SingleByteParam)
+; parameters: trade_id
call GetScriptByte
ld e, a
@@ -723,8 +701,7 @@ Script_trade:
Script_phonecall:
; script command 0x98
-; parameters:
-; caller_name (RawTextPointerLabelParam)
+; parameters: caller_name
call GetScriptByte
ld e, a
@@ -743,8 +720,7 @@ Script_hangup:
Script_askforphonenumber:
; script command 0x97
-; parameters:
-; number (SingleByteParam)
+; parameters: number
call YesNoBox
jr c, .refused
@@ -752,22 +728,21 @@ Script_askforphonenumber:
ld c, a
farcall AddPhoneNumber
jr c, .phonefull
- xor a
+ xor a ; PHONE_CONTACT_GOT
jr .done
.phonefull
- ld a, 1
+ ld a, PHONE_CONTACTS_FULL
jr .done
.refused
call GetScriptByte
- ld a, 2
+ ld a, PHONE_CONTACT_REFUSED
.done
ld [ScriptVar], a
ret
Script_describedecoration:
; script command 0x9a
-; parameters:
-; byte (SingleByteParam)
+; parameters: byte
call GetScriptByte
ld b, a
@@ -778,8 +753,7 @@ Script_describedecoration:
Script_fruittree:
; script command 0x9b
-; parameters:
-; tree_id (SingleByteParam)
+; parameters: tree_id
call GetScriptByte
ld [CurFruitTree], a
@@ -789,10 +763,7 @@ Script_fruittree:
Script_swarm:
; script command 0xa0
-; parameters:
-; flag (SingleByteParam)
-; map_group (MapGroupParam)
-; map_id (MapIdParam)
+; parameters: flag, map_group, map_id
call GetScriptByte
ld c, a
@@ -805,8 +776,7 @@ Script_swarm:
Script_trainertext:
; script command 0x62
-; parameters:
-; which_text (SingleByteParam)
+; parameters: which_text
call GetScriptByte
ld c, a
@@ -835,8 +805,7 @@ Script_scripttalkafter:
Script_trainerflagaction:
; script command 0x63
-; parameters:
-; action (SingleByteParam)
+; parameters: action
xor a
ld [ScriptVar], a
@@ -856,9 +825,7 @@ Script_trainerflagaction:
Script_winlosstext:
; script command 0x64
-; parameters:
-; win_text_pointer (TextPointerLabelParam)
-; loss_text_pointer (TextPointerLabelParam)
+; parameters: win_text_pointer, loss_text_pointer
ld hl, wWinTextPointer
call GetScriptByte
@@ -908,8 +875,7 @@ Script_playmapmusic:
Script_playmusic:
; script command 0x7f
-; parameters:
-; music_pointer (MultiByteParam)
+; parameters: music_pointer
ld de, MUSIC_NONE
call PlayMusic
@@ -925,23 +891,20 @@ Script_playmusic:
Script_musicfadeout:
; script command 0x81
-; parameters:
-; music (MultiByteParam)
-; fadetime (SingleByteParam)
+; parameters: music, fadetime
call GetScriptByte
ld [MusicFadeID], a
call GetScriptByte
ld [MusicFadeID + 1], a
call GetScriptByte
- and $7f
+ and $ff ^ (1 << MUSIC_FADE_IN_F)
ld [MusicFade], a
ret
Script_playsound:
; script command 0x85
-; parameters:
-; sound_pointer (MultiByteParam)
+; parameters: sound_pointer
call GetScriptByte
ld e, a
@@ -965,8 +928,7 @@ Script_warpsound:
Script_cry:
; script command 0x84
-; parameters:
-; cry_id (MultiByteParam)
+; parameters: cry_id
call GetScriptByte
push af
@@ -989,8 +951,7 @@ GetScriptObject:
Script_setlasttalked:
; script command 0x68
-; parameters:
-; object id (SingleByteParam)
+; parameters: object_id
call GetScriptByte
call GetScriptObject
@@ -999,9 +960,7 @@ Script_setlasttalked:
Script_applymovement:
; script command 0x69
-; parameters:
-; object id (SingleByteParam)
-; data (MovementPointerLabelParam)
+; parameters: object_id, data
call GetScriptByte
call GetScriptObject
@@ -1036,10 +995,9 @@ SetFlagsForMovement_2:
ret
Script_applymovement2:
-; apply movement to last talked
; script command 0x6a
-; parameters:
-; data (MovementPointerLabelParam)
+; parameters: data
+; apply movement to last talked
ld a, [hLastTalked]
ld c, a
@@ -1066,9 +1024,7 @@ Script_faceplayer:
Script_faceobject:
; script command 0x6c
-; parameters:
-; object1 (SingleByteParam)
-; object2 (SingleByteParam)
+; parameters: object1, object2
call GetScriptByte
call GetScriptObject
@@ -1098,9 +1054,7 @@ Script_faceobject:
Script_spriteface:
; script command 0x76
-; parameters:
-; object id (SingleByteParam)
-; facing (SingleByteParam)
+; parameters: object_id, facing
call GetScriptByte
call GetScriptObject
@@ -1163,9 +1117,7 @@ ApplyObjectFacing:
Script_variablesprite:
; script command 0x6d
-; parameters:
-; byte (SingleByteParam)
-; sprite (SingleByteParam)
+; parameters: byte, sprite
call GetScriptByte
ld e, a
@@ -1178,8 +1130,7 @@ Script_variablesprite:
Script_appear:
; script command 0x6f
-; parameters:
-; object id (SingleByteParam)
+; parameters: object_id
call GetScriptByte
call GetScriptObject
@@ -1191,8 +1142,7 @@ Script_appear:
Script_disappear:
; script command 0x6e
-; parameters:
-; object id (SingleByteParam)
+; parameters: object_id
call GetScriptByte
call GetScriptObject
@@ -1229,9 +1179,7 @@ ApplyEventActionAppearDisappear:
Script_follow:
; script command 0x70
-; parameters:
-; object2 (SingleByteParam)
-; object1 (SingleByteParam)
+; parameters: object2, object1
call GetScriptByte
call GetScriptObject
@@ -1250,10 +1198,7 @@ Script_stopfollow:
Script_moveobject:
; script command 0x72
-; parameters:
-; object id (SingleByteParam)
-; x (SingleByteParam)
-; y (SingleByteParam)
+; parameters: object id, x, y
call GetScriptByte
call GetScriptObject
@@ -1269,8 +1214,7 @@ Script_moveobject:
Script_writeobjectxy:
; script command 0x73
-; parameters:
-; object id (SingleByteParam)
+; parameters: object_id
call GetScriptByte
call GetScriptObject
@@ -1284,9 +1228,7 @@ Script_writeobjectxy:
Script_follownotexact:
; script command 0x77
-; parameters:
-; object2 (SingleByteParam)
-; object1 (SingleByteParam)
+; parameters: object2, object1
call GetScriptByte
call GetScriptObject
@@ -1299,8 +1241,7 @@ Script_follownotexact:
Script_loademote:
; script command 0x74
-; parameters:
-; bubble (SingleByteParam)
+; parameters: bubble
call GetScriptByte
cp -1
@@ -1313,10 +1254,7 @@ Script_loademote:
Script_showemote:
; script command 0x75
-; parameters:
-; bubble (SingleByteParam)
-; object id (SingleByteParam)
-; time (DecimalParam)
+; parameters: bubble, object_id, time
call GetScriptByte
ld [ScriptVar], a
@@ -1352,8 +1290,7 @@ ShowEmoteScript:
Script_earthquake:
; script command 0x78
-; parameters:
-; param (DecimalParam)
+; parameters: param
ld hl, EarthquakeMovement
ld de, wEarthquakeMovementDataBuffer
@@ -1407,9 +1344,7 @@ Script_loadmemtrainer:
Script_loadwildmon:
; script command 0x5d
-; parameters:
-; pokemon (PokemonParam)
-; level (DecimalParam)
+; parameters: pokemon, level
ld a, (1 << 7)
ld [wBattleScriptFlags], a
@@ -1421,9 +1356,7 @@ Script_loadwildmon:
Script_loadtrainer:
; script command 0x5e
-; parameters:
-; trainer_group (TrainerGroupParam)
-; trainer_id (TrainerIdParam)
+; parameters: trainer_group, trainer_id
ld a, (1 << 7) | 1
ld [wBattleScriptFlags], a
@@ -1437,7 +1370,7 @@ Script_startbattle:
; script command 0x5f
call BufferScreen
- predef StartBattle
+ predef Predef_StartBattle
ld a, [wBattleResult]
and $3f
ld [ScriptVar], a
@@ -1445,8 +1378,7 @@ Script_startbattle:
Script_catchtutorial:
; script command 0x61
-; parameters:
-; byte (SingleByteParam)
+; parameters: byte
call GetScriptByte
ld [BattleType], a
@@ -1498,8 +1430,7 @@ Script_reloadmap:
Script_scall:
; script command 0x0
-; parameters:
-; pointer (ScriptPointerLabelParam)
+; parameters: pointer
ld a, [ScriptBank]
ld b, a
@@ -1511,8 +1442,7 @@ Script_scall:
Script_farscall:
; script command 0x1
-; parameters:
-; pointer (ScriptPointerLabelBeforeBank)
+; parameters: pointer
call GetScriptByte
ld b, a
@@ -1524,8 +1454,7 @@ Script_farscall:
Script_ptcall:
; script command 0x2
-; parameters:
-; pointer (PointerLabelToScriptPointer)
+; parameters: pointer
call GetScriptByte
ld l, a
@@ -1577,8 +1506,7 @@ CallCallback::
Script_jump:
; script command 0x3
-; parameters:
-; pointer (ScriptPointerLabelParam)
+; parameters: pointer
call GetScriptByte
ld l, a
@@ -1590,8 +1518,7 @@ Script_jump:
Script_farjump:
; script command 0x4
-; parameters:
-; pointer (ScriptPointerLabelBeforeBank)
+; parameters: pointer
call GetScriptByte
ld b, a
@@ -1603,8 +1530,7 @@ Script_farjump:
Script_ptjump:
; script command 0x5
-; parameters:
-; pointer (PointerLabelToScriptPointer)
+; parameters: pointer
call GetScriptByte
ld l, a
@@ -1619,8 +1545,7 @@ Script_ptjump:
Script_iffalse:
; script command 0x8
-; parameters:
-; pointer (ScriptPointerLabelParam)
+; parameters: pointer
ld a, [ScriptVar]
and a
@@ -1629,8 +1554,7 @@ Script_iffalse:
Script_iftrue:
; script command 0x9
-; parameters:
-; pointer (ScriptPointerLabelParam)
+; parameters: pointer
ld a, [ScriptVar]
and a
@@ -1639,9 +1563,7 @@ Script_iftrue:
Script_if_equal:
; script command 0x6
-; parameters:
-; byte (SingleByteParam)
-; pointer (ScriptPointerLabelParam)
+; parameters: byte, pointer
call GetScriptByte
ld hl, ScriptVar
@@ -1651,9 +1573,7 @@ Script_if_equal:
Script_if_not_equal:
; script command 0x7
-; parameters:
-; byte (SingleByteParam)
-; pointer (ScriptPointerLabelParam)
+; parameters: byte, pointer
call GetScriptByte
ld hl, ScriptVar
@@ -1663,9 +1583,7 @@ Script_if_not_equal:
Script_if_greater_than:
; script command 0xa
-; parameters:
-; byte (SingleByteParam)
-; pointer (ScriptPointerLabelParam)
+; parameters: byte, pointer
ld a, [ScriptVar]
ld b, a
@@ -1676,9 +1594,7 @@ Script_if_greater_than:
Script_if_less_than:
; script command 0xb
-; parameters:
-; byte (SingleByteParam)
-; pointer (ScriptPointerLabelParam)
+; parameters: byte, pointer
call GetScriptByte
ld b, a
@@ -1689,16 +1605,14 @@ Script_if_less_than:
Script_jumpstd:
; script command 0xc
-; parameters:
-; predefined_script (MultiByteParam)
+; parameters: predefined_script
call StdScript
jr ScriptJump
Script_callstd:
; script command 0xd
-; parameters:
-; predefined_script (MultiByteParam)
+; parameters: predefined_script
call StdScript
ld d, h
@@ -1738,8 +1652,7 @@ ScriptJump:
Script_priorityjump:
; script command 0x8d
-; parameters:
-; pointer (ScriptPointerLabelParam)
+; parameters: pointer
ld a, [ScriptBank]
ld [wPriorityScriptBank], a
@@ -1766,9 +1679,7 @@ Script_checkscene:
Script_checkmapscene:
; script command 0x11
-; parameters:
-; map_group (SingleByteParam)
-; map_id (SingleByteParam)
+; parameters: map_group, map_id
call GetScriptByte
ld b, a
@@ -1789,8 +1700,7 @@ Script_checkmapscene:
Script_setscene:
; script command 0x14
-; parameters:
-; scene_id (SingleByteParam)
+; parameters: scene_id
ld a, [MapGroup]
ld b, a
@@ -1800,10 +1710,7 @@ Script_setscene:
Script_setmapscene:
; script command 0x12
-; parameters:
-; map_group (MapGroupParam)
-; map_id (MapIdParam)
-; scene_id (SingleByteParam)
+; parameters: map_group, map_id, scene_id
call GetScriptByte
ld b, a
@@ -1821,8 +1728,7 @@ DoScene:
Script_copybytetovar:
; script command 0x19
-; parameters:
-; address (RAMAddressParam)
+; parameters: address
call GetScriptByte
ld l, a
@@ -1834,8 +1740,7 @@ Script_copybytetovar:
Script_copyvartobyte:
; script command 0x1a
-; parameters:
-; address (RAMAddressParam)
+; parameters: address
call GetScriptByte
ld l, a
@@ -1847,9 +1752,7 @@ Script_copyvartobyte:
Script_loadvar:
; script command 0x1b
-; parameters:
-; address (RAMAddressParam)
-; value (SingleByteParam)
+; parameters: address, value
call GetScriptByte
ld l, a
@@ -1861,8 +1764,7 @@ Script_loadvar:
Script_writebyte:
; script command 0x15
-; parameters:
-; value (SingleByteParam)
+; parameters: value
call GetScriptByte
ld [ScriptVar], a
@@ -1870,8 +1772,7 @@ Script_writebyte:
Script_addvar:
; script command 0x16
-; parameters:
-; value (SingleByteParam)
+; parameters: value
call GetScriptByte
ld hl, ScriptVar
@@ -1881,8 +1782,7 @@ Script_addvar:
Script_random:
; script command 0x17
-; parameters:
-; input (SingleByteParam)
+; parameters: input
call GetScriptByte
ld [ScriptVar], a
@@ -1935,8 +1835,7 @@ Script_random:
Script_checkcode:
; script command 0x1c
-; parameters:
-; variable_id (SingleByteParam)
+; parameters: variable_id
call GetScriptByte
call GetVarAction
@@ -1946,8 +1845,7 @@ Script_checkcode:
Script_writevarcode:
; script command 0x1d
-; parameters:
-; variable_id (SingleByteParam)
+; parameters: variable_id
call GetScriptByte
call GetVarAction
@@ -1957,9 +1855,7 @@ Script_writevarcode:
Script_writecode:
; script command 0x1e
-; parameters:
-; variable_id (SingleByteParam)
-; value (SingleByteParam)
+; parameters: variable_id, value
call GetScriptByte
call GetVarAction
@@ -1975,18 +1871,16 @@ GetVarAction:
Script_checkver:
; script command 0x18
- ld a, [Version]
+ ld a, [.gs_version]
ld [ScriptVar], a
ret
-Version:
- db VERSION
+.gs_version:
+ db GS_VERSION
Script_pokenamemem:
; script command 0x40
-; parameters:
-; pokemon (PokemonParam); leave $0 to draw from script var
-; memory (SingleByteParam)
+; parameters: pokemon (0 aka USE_SCRIPT_VAR to use ScriptVar), memory
call GetScriptByte
and a
@@ -1999,7 +1893,7 @@ Script_pokenamemem:
ConvertMemToText:
call GetScriptByte
- cp 3
+ cp NUM_MEM_BUFFERS
jr c, .ok
xor a
.ok
@@ -2013,12 +1907,10 @@ CopyConvertedText:
Script_itemtotext:
; script command 0x41
-; parameters:
-; item (ItemLabelByte); use 0 to draw from ScriptVar
-; memory (SingleByteParam)
+; parameters: item (0 aka USE_SCRIPT_VAR to use ScriptVar), memory
call GetScriptByte
- and a
+ and a ; USE_SCRIPT_VAR
jr nz, .ok
ld a, [ScriptVar]
.ok
@@ -2029,8 +1921,7 @@ Script_itemtotext:
Script_mapnametotext:
; script command 0x42
-; parameters:
-; memory (SingleByteParam)
+; parameters: memory
ld a, [MapGroup]
ld b, a
@@ -2046,19 +1937,14 @@ ConvertLandmarkToText:
Script_landmarktotext:
; script command 0xa5
-; parameters:
-; id (SingleByteParam)
-; memory (SingleByteParam)
+; parameters: id, memory
call GetScriptByte
jr ConvertLandmarkToText
Script_trainertotext:
; script command 0x43
-; parameters:
-; trainer_id (TrainerGroupParam)
-; trainer_group (TrainerIdParam)
-; memory (SingleByteParam)
+; parameters: trainer_id, trainer_group, memory
call GetScriptByte
ld c, a
@@ -2069,10 +1955,7 @@ Script_trainertotext:
Script_name:
; script command 0xa7
-; parameters:
-; type (SingleByteParam)
-; id (SingleByteParam)
-; memory (SingleByteParam)
+; parameters: type, id, memory
call GetScriptByte
ld [wNamedObjectTypeBuffer], a
@@ -2086,9 +1969,7 @@ ContinueToGetName:
Script_trainerclassname:
; script command 0xa6
-; parameters:
-; id (SingleByteParam)
-; memory (SingleByteParam)
+; parameters: id, memory
ld a, TRAINER_NAME
ld [wNamedObjectTypeBuffer], a
@@ -2096,9 +1977,7 @@ Script_trainerclassname:
Script_readmoney:
; script command 0x3d
-; parameters:
-; account (SingleByteParam)
-; memory (SingleByteParam)
+; parameters: account, memory
call ResetStringBuffer1
call GetMoneyAccount
@@ -2110,8 +1989,7 @@ Script_readmoney:
Script_readcoins:
; script command 0x3e
-; parameters:
-; memory (SingleByteParam)
+; parameters: memory
call ResetStringBuffer1
ld hl, StringBuffer1
@@ -2121,10 +1999,9 @@ Script_readcoins:
ld de, StringBuffer1
jp ConvertMemToText
-Script_RAM2MEM:
+Script_vartomem:
; script command 0x3f
-; parameters:
-; memory (SingleByteParam)
+; parameters: memory
call ResetStringBuffer1
ld de, ScriptVar
@@ -2143,9 +2020,7 @@ ResetStringBuffer1:
Script_stringtotext:
; script command 0x44
-; parameters:
-; text_pointer (EncodedTextLabelParam)
-; memory (SingleByteParam)
+; parameters: text_pointer, memory
call GetScriptByte
ld e, a
@@ -2159,8 +2034,7 @@ Script_stringtotext:
Script_givepokeitem:
; script command 0x2f
-; parameters:
-; pointer (PointerParamToItemAndLetter)
+; parameters: pointer
call GetScriptByte
ld l, a
@@ -2181,8 +2055,7 @@ Script_givepokeitem:
Script_checkpokeitem:
; script command 0x30
-; parameters:
-; pointer (PointerParamToItemAndLetter)
+; parameters: pointer
call GetScriptByte
ld e, a
@@ -2195,9 +2068,7 @@ Script_checkpokeitem:
Script_giveitem:
; script command 0x1f
-; parameters:
-; item (ItemLabelByte)
-; quantity (SingleByteParam)
+; parameters: item, quantity
call GetScriptByte
cp ITEM_FROM_MEM
@@ -2220,9 +2091,7 @@ Script_giveitem:
Script_takeitem:
; script command 0x20
-; parameters:
-; item (ItemLabelByte)
-; quantity (DecimalParam)
+; parameters: item, quantity
xor a
ld [ScriptVar], a
@@ -2241,8 +2110,7 @@ Script_takeitem:
Script_checkitem:
; script command 0x21
-; parameters:
-; item (ItemLabelByte)
+; parameters: item
xor a
ld [ScriptVar], a
@@ -2257,9 +2125,7 @@ Script_checkitem:
Script_givemoney:
; script command 0x22
-; parameters:
-; account (SingleByteParam)
-; money (MoneyByteParam)
+; parameters: account, money
call GetMoneyAccount
call LoadMoneyAmountToMem
@@ -2268,9 +2134,7 @@ Script_givemoney:
Script_takemoney:
; script command 0x23
-; parameters:
-; account (SingleByteParam)
-; money (MoneyByteParam)
+; parameters: account, money
call GetMoneyAccount
call LoadMoneyAmountToMem
@@ -2279,24 +2143,22 @@ Script_takemoney:
Script_checkmoney:
; script command 0x24
-; parameters:
-; account (SingleByteParam)
-; money (MoneyByteParam)
+; parameters: account, money
call GetMoneyAccount
call LoadMoneyAmountToMem
farcall CompareMoney
CompareMoneyAction:
- jr c, .two
- jr z, .one
- ld a, 0
+ jr c, .less
+ jr z, .exact
+ ld a, HAVE_MORE
jr .done
-.one
- ld a, 1
+.exact
+ ld a, HAVE_AMOUNT
jr .done
-.two
- ld a, 2
+.less
+ ld a, HAVE_LESS
.done
ld [ScriptVar], a
ret
@@ -2304,9 +2166,9 @@ CompareMoneyAction:
GetMoneyAccount:
call GetScriptByte
and a
- ld de, Money
+ ld de, Money ; YOUR_MONEY
ret z
- ld de, wMomsMoney
+ ld de, wMomsMoney ; MOMS_MONEY
ret
LoadMoneyAmountToMem:
@@ -2325,8 +2187,7 @@ LoadMoneyAmountToMem:
Script_givecoins:
; script command 0x25
-; parameters:
-; coins (CoinByteParam)
+; parameters: coins
call LoadCoinAmountToMem
farcall GiveCoins
@@ -2334,8 +2195,7 @@ Script_givecoins:
Script_takecoins:
; script command 0x26
-; parameters:
-; coins (CoinByteParam)
+; parameters: coins
call LoadCoinAmountToMem
farcall TakeCoins
@@ -2343,8 +2203,7 @@ Script_takecoins:
Script_checkcoins:
; script command 0x27
-; parameters:
-; coins (CoinByteParam)
+; parameters: coins
call LoadCoinAmountToMem
farcall CheckCoins
@@ -2360,8 +2219,7 @@ LoadCoinAmountToMem:
Script_checktime:
; script command 0x2b
-; parameters:
-; time (SingleByteParam)
+; parameters: time
xor a
ld [ScriptVar], a
@@ -2375,8 +2233,7 @@ Script_checktime:
Script_checkpoke:
; script command 0x2c
-; parameters:
-; pkmn (PokemonParam)
+; parameters: pokemon
xor a
ld [ScriptVar], a
@@ -2391,8 +2248,7 @@ Script_checkpoke:
Script_addcellnum:
; script command 0x28
-; parameters:
-; person (SingleByteParam)
+; parameters: person
xor a
ld [ScriptVar], a
@@ -2406,8 +2262,7 @@ Script_addcellnum:
Script_delcellnum:
; script command 0x29
-; parameters:
-; person (SingleByteParam)
+; parameters: person
xor a
ld [ScriptVar], a
@@ -2421,8 +2276,7 @@ Script_delcellnum:
Script_checkcellnum:
; script command 0x2a
-; parameters:
-; person (SingleByteParam)
+; parameters: person
; returns false if the cell number is not in your phone
xor a
@@ -2437,8 +2291,7 @@ Script_checkcellnum:
Script_specialphonecall:
; script command 0x9c
-; parameters:
-; call_id (MultiByteParam)
+; parameters: call_id
call GetScriptByte
ld [wSpecialPhoneCallID], a
@@ -2460,13 +2313,7 @@ Script_checkphonecall:
Script_givepoke:
; script command 0x2d
-; parameters:
-; pokemon (PokemonParam)
-; level (DecimalParam)
-; item (ItemLabelByte)
-; trainer (DecimalParam)
-; trainer_name_pointer (MultiByteParam)
-; pkmn_nickname (MultiByteParam)
+; parameters: pokemon, level, item, trainer, trainer_name_pointer, pkmn_nickname
call GetScriptByte
ld [CurPartySpecies], a
@@ -2494,9 +2341,7 @@ Script_givepoke:
Script_giveegg:
; script command 0x2e
-; parameters:
-; pkmn (PokemonParam)
-; level (DecimalParam)
+; parameters: pokemon, level
; if no room in the party, return 0 in ScriptVar; else, return 2
xor a ; PARTYMON
@@ -2506,7 +2351,7 @@ Script_giveegg:
ld [CurPartySpecies], a
call GetScriptByte
ld [CurPartyLevel], a
- farcall GiveEgg
+ farcall Predef_GiveEgg
ret nc
ld a, 2
ld [ScriptVar], a
@@ -2514,8 +2359,7 @@ Script_giveegg:
Script_setevent:
; script command 0x33
-; parameters:
-; bit_number (MultiByteParam)
+; parameters: bit_number
call GetScriptByte
ld e, a
@@ -2527,8 +2371,7 @@ Script_setevent:
Script_clearevent:
; script command 0x32
-; parameters:
-; bit_number (MultiByteParam)
+; parameters: bit_number
call GetScriptByte
ld e, a
@@ -2540,8 +2383,7 @@ Script_clearevent:
Script_checkevent:
; script command 0x31
-; parameters:
-; bit_number (MultiByteParam)
+; parameters: bit_number
call GetScriptByte
ld e, a
@@ -2559,8 +2401,7 @@ Script_checkevent:
Script_setflag:
; script command 0x36
-; parameters:
-; bit_number (MultiByteParam)
+; parameters: bit_number
call GetScriptByte
ld e, a
@@ -2572,8 +2413,7 @@ Script_setflag:
Script_clearflag:
; script command 0x35
-; parameters:
-; bit_number (MultiByteParam)
+; parameters: bit_number
call GetScriptByte
ld e, a
@@ -2585,14 +2425,13 @@ Script_clearflag:
Script_checkflag:
; script command 0x34
-; parameters:
-; bit_number (MultiByteParam)
+; parameters: bit_number
call GetScriptByte
ld e, a
call GetScriptByte
ld d, a
- ld b, 2 ; check
+ ld b, CHECK_FLAG
call _EngineFlagAction
ld a, c
and a
@@ -2622,8 +2461,7 @@ Script_wildon:
Script_xycompare:
; script command 0x39
-; parameters:
-; pointer (MultiByteParam)
+; parameters: pointer
call GetScriptByte
ld [wXYComparePointer], a
@@ -2633,15 +2471,10 @@ Script_xycompare:
Script_warpfacing:
; script command 0xa3
-; parameters:
-; facing (SingleByteParam)
-; map_group (MapGroupParam)
-; map_id (MapIdParam)
-; x (SingleByteParam)
-; y (SingleByteParam)
+; parameters: facing, map_group, map_id, x, y
call GetScriptByte
- and $3
+ maskbits NUM_DIRECTIONS +- 1
ld c, a
ld a, [wPlayerSpriteSetupFlags]
set 5, a
@@ -2651,11 +2484,7 @@ Script_warpfacing:
Script_warp:
; script command 0x3c
-; parameters:
-; map_group (MapGroupParam)
-; map_id (MapIdParam)
-; x (SingleByteParam)
-; y (SingleByteParam)
+; parameters: map_group, map_id, x, y
; This seems to be some sort of error handling case.
call GetScriptByte
@@ -2692,10 +2521,7 @@ Script_warp:
Script_warpmod:
; script command 0x3a
-; parameters:
-; warp_id (SingleByteParam)
-; map_group (MapGroupParam)
-; map_id (MapIdParam)
+; parameters: warp_id, map_group, map_id
call GetScriptByte
ld [BackupWarpNumber], a
@@ -2707,9 +2533,7 @@ Script_warpmod:
Script_blackoutmod:
; script command 0x3b
-; parameters:
-; map_group (MapGroupParam)
-; map_id (MapIdParam)
+; parameters: map_group, map_id
call GetScriptByte
ld [wLastSpawnMapGroup], a
@@ -2726,8 +2550,7 @@ Script_dontrestartmapmusic:
Script_writecmdqueue:
; script command 0x7d
-; parameters:
-; queue_pointer (MultiByteParam)
+; parameters: queue_pointer
call GetScriptByte
ld e, a
@@ -2740,8 +2563,7 @@ Script_writecmdqueue:
Script_delcmdqueue:
; script command 0x7e
-; parameters:
-; byte (SingleByteParam)
+; parameters: byte
xor a
ld [ScriptVar], a
@@ -2755,8 +2577,7 @@ Script_delcmdqueue:
Script_changemap:
; script command 0x79
-; parameters:
-; map_data_pointer (MapDataPointerParam)
+; parameters: map_data_pointer
call GetScriptByte
ld [MapBlockDataBank], a
@@ -2770,10 +2591,7 @@ Script_changemap:
Script_changeblock:
; script command 0x7a
-; parameters:
-; x (SingleByteParam)
-; y (SingleByteParam)
-; block (SingleByteParam)
+; parameters: x, y, block
call GetScriptByte
add 4
@@ -2806,14 +2624,14 @@ Script_warpcheck:
farcall EnableEvents
ret
-Script_enableevents: ; unreferenced
+Script_enableevents:
+; unused
farcall EnableEvents
ret
Script_newloadmap:
; script command 0x8a
-; parameters:
-; which_method (SingleByteParam)
+; parameters: which_method
call GetScriptByte
ld [hMapEntryMethod], a
@@ -2836,8 +2654,7 @@ Script_textbox:
Script_refreshscreen:
; script command 0x48
-; parameters:
-; dummy (SingleByteParam)
+; parameters: dummy
call RefreshScreen
call GetScriptByte
@@ -2845,14 +2662,13 @@ Script_refreshscreen:
Script_loadbytec2cf:
; script command 0x4a
-; parameters:
-; byte (SingleByteParam)
+; parameters: byte
call GetScriptByte
ld [wc2cf], a
ret
- ld c, c ; XXX
+ db closetext_command ; unused
Script_closetext:
; script command 0x49
@@ -2864,8 +2680,7 @@ Script_closetext:
Script_passtoengine:
; script command 0x89
-; parameters:
-; data_pointer (PointerLabelBeforeBank)
+; parameters: data_pointer
call GetScriptByte
push af
@@ -2879,8 +2694,7 @@ Script_passtoengine:
Script_pause:
; script command 0x8b
-; parameters:
-; length (DecimalParam)
+; parameters: length
call GetScriptByte
and a
@@ -2896,8 +2710,7 @@ Script_pause:
Script_deactivatefacing:
; script command 0x8c
-; parameters:
-; time (SingleByteParam)
+; parameters: time
call GetScriptByte
and a
@@ -2911,8 +2724,7 @@ Script_deactivatefacing:
Script_ptpriorityjump:
; script command 0x8f
-; parameters:
-; pointer (ScriptPointerLabelParam)
+; parameters: pointer
call StopScript
jp Script_jump
@@ -2993,8 +2805,8 @@ Script_halloffame:
ld hl, wGameTimerPause
res 0, [hl]
- farcall TrainerRankings_HallOfFame
- farcall TrainerRankings_HallOfFame2
+ farcall StubbedTrainerRankings_HallOfFame
+ farcall StubbedTrainerRankings_HallOfFame2
farcall HallOfFame
ld hl, wGameTimerPause
set 0, [hl]
@@ -3013,8 +2825,7 @@ ReturnFromCredits:
Script_wait:
; script command 0xa8
-; parameters:
-; unknown (SingleByteParam)
+; parameters: unknown
push bc
call GetScriptByte
@@ -3037,7 +2848,7 @@ Script_check_save:
ret
-; unreferenced
+; unused
ld a, [.byte]
ld [ScriptVar], a
ret
diff --git a/engine/scrolling_menu.asm b/engine/scrolling_menu.asm
index 32f22188a..32acf2def 100755
--- a/engine/scrolling_menu.asm
+++ b/engine/scrolling_menu.asm
@@ -84,7 +84,7 @@ ScrollingMenuJoyAction: ; 24609
jr .loop
; 24640
-.unreferenced ; unreferenced
+.unreferenced ; unused
ld a, -1
and a
ret
diff --git a/engine/search.asm b/engine/search.asm
index 76be0e159..495d4cc5e 100755
--- a/engine/search.asm
+++ b/engine/search.asm
@@ -1,4 +1,4 @@
-SpecialBeastsCheck: ; 0x4a6e8
+Special_BeastsCheck: ; 0x4a6e8
; Check if the player owns all three legendary beasts.
; They must exist in either party or PC, and have the player's OT and ID.
; Return the result in ScriptVar.
@@ -29,7 +29,7 @@ SpecialBeastsCheck: ; 0x4a6e8
ret
-SpecialMonCheck: ; 0x4a711
+Special_MonCheck: ; 0x4a711
; Check if the player owns any monsters of the species in ScriptVar.
; Return the result in ScriptVar.
diff --git a/engine/sgb_layouts.asm b/engine/sgb_layouts.asm
index 36dbde84c..02055377a 100644
--- a/engine/sgb_layouts.asm
+++ b/engine/sgb_layouts.asm
@@ -1,7 +1,6 @@
Predef_LoadSGBLayout: ; 864c
-; LoadSGBLayout
call CheckCGB
- jp nz, Predef_LoadSGBLayoutCGB
+ jp nz, LoadSGBLayoutCGB
ld a, b
cp SCGB_RAM
@@ -18,7 +17,7 @@ Predef_LoadSGBLayout: ; 864c
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, .Finish
+ ld de, _LoadSGBLayout_ReturnFromJumpTable
push de
jp hl
; 866f
@@ -389,15 +388,13 @@ endr
jr z, .partymon
; Egg
ld hl, wSGBPals + 3
- ; RGB 7, 7, 7
- ld [hl], $e7
+ ld [hl], LOW(palred 7 + palgreen 7 + palblue 7)
inc hl
- ld [hl], $1c
+ ld [hl], HIGH(palred 7 + palgreen 7 + palblue 7)
inc hl
- ; RGB 2, 3, 3
- ld [hl], $62
+ ld [hl], LOW(palred 2 + palgreen 3 + palblue 3)
inc hl
- ld [hl], $c
+ ld [hl], HIGH(palred 2 + palgreen 3 + palblue 3)
jr .done
.partymon
@@ -576,7 +573,7 @@ endr
ld a, [MapGroup]
ld e, a
ld d, 0
- ld hl, .SGBRoofPalInds
+ ld hl, MapGroupRoofSGBPalInds
add hl, de
ld a, [hl]
ret
@@ -598,37 +595,9 @@ endr
ret
; 8a45
-.SGBRoofPalInds: ; 8a45
- db $00 ; Unused
- db $12 ; Olivine
- db $14 ; Mahogany
- db $18 ; Various Dungeons
- db $11 ; Ecruteak
- db $15 ; Blackthorn
- db $09 ; Cinnabar
- db $04 ; Cerulean
- db $0f ; Azalea
- db $16 ; Lake Of Rage
- db $0e ; Violet
- db $10 ; Goldenrod
- db $06 ; Vermilion
- db $01 ; Palette
- db $03 ; Pewter
- db $06 ; Fast Ship
- db $0b ; Indigo Plateau
- db $08 ; Fuchsia
- db $05 ; Lavender
- db $17 ; Silver Cave Outside
- db $08 ; Pokemon Center 2F
- db $07 ; Celadon
- db $13 ; Cianwood
- db $02 ; Viridian
- db $0c ; New Bark
- db $0a ; Saffron
- db $0d ; Cherrygrove
-; 8a60
-
-.Finish: ; 8a60
+INCLUDE "gfx/sgb/roof_pal_inds.asm"
+
+_LoadSGBLayout_ReturnFromJumpTable: ; 8a60
push de
call PushSGBPals_
pop hl
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index aea08f16a..98f8dd21d 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -1,11 +1,13 @@
-SLOTS_NOBIAS EQU -1
-SLOTS_NOMATCH EQU -1
-SLOTS_SEVEN EQU $00
+SLOTS_NO_BIAS EQU -1
+SLOTS_NO_MATCH EQU -1
+
+SLOTS_SEVEN EQU $00
SLOTS_POKEBALL EQU $04
-SLOTS_CHERRY EQU $08
-SLOTS_PIKACHU EQU $0c
+SLOTS_CHERRY EQU $08
+SLOTS_PIKACHU EQU $0c
SLOTS_SQUIRTLE EQU $10
-SLOTS_STARYU EQU $14
+SLOTS_STARYU EQU $14
+
REEL_SIZE EQU 15
; Constants for slot_reel offsets (see macros/wram.asm)
@@ -85,7 +87,7 @@ _SlotMachine:
call PlaySFX
call WaitSFX
call ClearBGPalettes
- farcall TrainerRankings_EndSlotsWinStreak
+ farcall StubbedTrainerRankings_EndSlotsWinStreak
ld hl, Options
res NO_TEXT_SCROLL, [hl]
ld hl, rLCDC
@@ -148,7 +150,7 @@ _SlotMachine:
ld [hl], $40
xor a ; SLOTS_INIT
ld [wJumptableIndex], a
- ld a, SLOTS_NOBIAS
+ ld a, SLOTS_NO_BIAS
ld [wSlotBias], a
ld de, MUSIC_GAME_CORNER
call PlayMusic
@@ -183,7 +185,7 @@ SlotsLoop: ; 927af (24:67af)
ld [wCurrSpriteOAMAddr], a
callfar DoNextFrameForFirst16Sprites
call .PrintCoinsAndPayout
- call .DummyFunc
+ call .Stubbed_Function927d3
call DelayFrame
and a
ret
@@ -192,7 +194,7 @@ SlotsLoop: ; 927af (24:67af)
scf
ret
-.DummyFunc: ; 927d3 (24:67d3)
+.Stubbed_Function927d3: ; 927d3 (24:67d3)
; dummied out
ret
ld a, [wReel1ReelAction]
@@ -232,8 +234,8 @@ SlotsLoop: ; 927af (24:67af)
; 92811 (24:6811)
-Function92811: ; 92811
-; unreferenced - debug function?
+Unreferenced_Function92811: ; 92811
+; debug function?
ld a, [wSlotBias]
add 0
daa
@@ -252,23 +254,22 @@ Function92811: ; 92811
; 9282c
-Function9282c: ; 9282c
-; unreferenced
+Unreferenced_Function9282c: ; 9282c
; animate OAM tiles?
ld hl, wcf66
ld a, [hl]
inc [hl]
and $7
ret nz
- ld hl, Sprites + 16 * 4 + 2
- ld c, 40 - 16
+ ld hl, Sprite17TileID
+ ld c, NUM_SPRITE_OAM_STRUCTS - 16
.loop
ld a, [hl]
- xor $20
- ld [hli], a
- inc hl
- inc hl
+ xor %00100000
+ ld [hli], a ; tile id
+rept SPRITEOAMSTRUCT_LENGTH +- 1
inc hl
+endr
dec c
jr nz, .loop
ret
@@ -309,7 +310,7 @@ SlotsAction_Init: ; 9287e (24:687e)
xor a
ld [wFirstTwoReelsMatching], a
ld [wFirstTwoReelsMatchingSevens], a
- ld a, SLOTS_NOMATCH
+ ld a, SLOTS_NO_MATCH
ld [wSlotMatched], a
ret
@@ -417,7 +418,7 @@ SlotsAction_WaitStopReel3: ; 9293a (24:693a)
SlotsAction_FlashIfWin: ; 92955 (24:6955)
ld a, [wSlotMatched]
- cp SLOTS_NOMATCH
+ cp SLOTS_NO_MATCH
jr nz, .GotIt
call SlotsAction_Next
call SlotsAction_Next
@@ -587,7 +588,7 @@ Slots_StopReel2: ; 92a2e (24:6a2e)
ld a, [wSlotBias]
and a
jr z, .skip
- cp SLOTS_NOBIAS
+ cp SLOTS_NO_BIAS
jr nz, .dont_jump
.skip
call .CheckReel1ForASeven
@@ -670,7 +671,7 @@ Slots_InitReelTiles: ; 92a98 (24:6a98)
ld bc, wReel1
ld hl, REEL_OAM_ADDR
add hl, bc
- ld de, Sprites + 16 * 4
+ ld de, Sprite17
ld [hl], e
inc hl
ld [hl], d
@@ -688,7 +689,7 @@ Slots_InitReelTiles: ; 92a98 (24:6a98)
ld bc, wReel2
ld hl, REEL_OAM_ADDR
add hl, bc
- ld de, Sprites + 24 * 4
+ ld de, Sprite25
ld [hl], e
inc hl
ld [hl], d
@@ -706,7 +707,7 @@ Slots_InitReelTiles: ; 92a98 (24:6a98)
ld bc, wReel3
ld hl, REEL_OAM_ADDR
add hl, bc
- ld de, Sprites + 32 * 4
+ ld de, Sprite33
ld [hl], e
inc hl
ld [hl], d
@@ -821,41 +822,40 @@ Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
ld l, a
.loop
ld a, [wCurrReelYCoord]
- ld [hli], a
+ ld [hli], a ; y
ld a, [wCurrReelXCoord]
- ld [hli], a
+ ld [hli], a ; x
ld a, [de]
- ld [hli], a
+ ld [hli], a ; tile id
srl a
srl a
- set 7, a
- ld [hli], a
+ set OAM_PRIORITY, a
+ ld [hli], a ; attributes
ld a, [wCurrReelYCoord]
- ld [hli], a
+ ld [hli], a ; y
ld a, [wCurrReelXCoord]
- add 1 * 8
- ld [hli], a
+ add 1 * TILE_WIDTH
+ ld [hli], a ; x
ld a, [de]
inc a
inc a
- ld [hli], a
+ ld [hli], a ; tile id
srl a
srl a
- set 7, a
- ld [hli], a
+ set OAM_PRIORITY, a
+ ld [hli], a ; attributes
inc de
ld a, [wCurrReelYCoord]
- sub 2 * 8
+ sub 2 * TILE_WIDTH
ld [wCurrReelYCoord], a
- cp 2 * 8
+ cp 2 * TILE_WIDTH
jr nz, .loop
ret
; 92bbe (24:6bbe)
-; unreferenced
-Function92bbe: ; 92bbe
+Unreferenced_Function92bbe: ; 92bbe
push hl
srl a
srl a
@@ -997,7 +997,7 @@ ReelAction_StopReel1: ; 92c5e
; even if the current bet won't allow lining it up.
ld a, [wSlotBias]
- cp SLOTS_NOBIAS
+ cp SLOTS_NO_BIAS
jr z, .NoBias
ld hl, REEL_MANIP_COUNTER
add hl, bc
@@ -1043,7 +1043,7 @@ ReelAction_StopReel2: ; 92c86
jr z, .NoBias
.nope
ld a, [wSlotBias]
- cp SLOTS_NOBIAS
+ cp SLOTS_NO_BIAS
jr z, .NoBias
ld hl, REEL_MANIP_COUNTER
add hl, bc
@@ -1079,7 +1079,7 @@ ReelAction_StopReel3: ; 92ca9
.NoMatch:
ld a, [wSlotBias]
- cp SLOTS_NOBIAS
+ cp SLOTS_NO_BIAS
jr z, .NoBias
ld hl, REEL_MANIP_COUNTER
add hl, bc
@@ -1532,7 +1532,7 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94
; 92f1d
Slots_CheckMatchedAllThreeReels: ; 92f1d
- ld a, SLOTS_NOMATCH
+ ld a, SLOTS_NO_MATCH
ld [wSlotMatched], a
call Slots_GetCurrentReelState
call Slots_CopyReelState
@@ -1552,7 +1552,7 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d
.return
ld a, [wSlotMatched]
- cp SLOTS_NOMATCH
+ cp SLOTS_NO_MATCH
jr nz, .matched_nontrivial
and a
ret
@@ -1753,7 +1753,7 @@ Slots_InitBias: ; 93002 (24:7002)
db $14, SLOTS_SQUIRTLE ; 5/128
db $28, SLOTS_PIKACHU ; 5/64
db $30, SLOTS_CHERRY ; 1/32
- db $ff, SLOTS_NOBIAS ; everything else
+ db $ff, SLOTS_NO_BIAS ; everything else
; 93031
.Lucky: ; 93031
@@ -1763,7 +1763,7 @@ Slots_InitBias: ; 93002 (24:7002)
db $10, SLOTS_SQUIRTLE ; 1/32
db $1e, SLOTS_PIKACHU ; 7/128
db $50, SLOTS_CHERRY ; 25/128
- db $ff, SLOTS_NOBIAS ; everything else
+ db $ff, SLOTS_NO_BIAS ; everything else
; 9303f
Slots_IlluminateBetLights: ; 9303f (24:703f)
@@ -1869,8 +1869,7 @@ Slots_AskBet: ; 9307c (24:707c)
.MenuDataHeader: ; 0x930d6
db $40 ; flags
- db 10, 14 ; start coords
- db 17, 19 ; end coords
+ menu_coords 14, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData2
db 1 ; default option
; 0x930de
@@ -1924,7 +1923,7 @@ Slots_AskPlayAgain: ; 930e9 (24:70e9)
Slots_GetPayout: ; 93124 (24:7124)
ld a, [wSlotMatched]
- cp SLOTS_NOMATCH
+ cp SLOTS_NO_MATCH
jr z, .no_win
srl a
ld e, a
@@ -1937,7 +1936,7 @@ Slots_GetPayout: ; 93124 (24:7124)
ld a, [hl]
ld [wPayout], a
ld d, a
- farcall TrainerRankings_AddToSlotsPayouts
+ farcall StubbedTrainerRankings_AddToSlotsPayouts
ret
.PayoutTable:
@@ -1957,11 +1956,11 @@ Slots_GetPayout: ; 93124 (24:7124)
Slots_PayoutText: ; 93158 (24:7158)
ld a, [wSlotMatched]
- cp SLOTS_NOMATCH
+ cp SLOTS_NO_MATCH
jr nz, .MatchedSomething
ld hl, .Text_Darn
call PrintText
- farcall TrainerRankings_EndSlotsWinStreak
+ farcall StubbedTrainerRankings_EndSlotsWinStreak
ret
.MatchedSomething:
@@ -1985,7 +1984,7 @@ Slots_PayoutText: ; 93158 (24:7158)
.return
ld hl, .Text_PrintPayout
call PrintText
- farcall TrainerRankings_AddToSlotsWinStreak
+ farcall StubbedTrainerRankings_AddToSlotsWinStreak
ret
; 93195 (24:7195)
@@ -2047,7 +2046,7 @@ endr
call Random
and %0010100
ret z ; 25% chance to stick with seven symbol bias
- ld a, SLOTS_NOBIAS
+ ld a, SLOTS_NO_BIAS
ld [wSlotBias], a
ret
@@ -2055,7 +2054,7 @@ endr
call Random
and %0011100
ret z ; 12.5% chance to stick with seven symbol bias
- ld a, SLOTS_NOBIAS
+ ld a, SLOTS_NO_BIAS
ld [wSlotBias], a
ret
diff --git a/engine/specials.asm b/engine/specials.asm
index cd2394b96..cb8eb3a6b 100644
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -15,7 +15,7 @@ Special:: ; c01b
; c029
SpecialsPointers:: ; c029
- add_special WarpToSpawnPoint
+ add_special Special_WarpToSpawnPoint
; Communications
add_special Special_SetBitsForLinkTradeRequest
@@ -25,7 +25,7 @@ SpecialsPointers:: ; c029
add_special Special_CheckBothSelectedSameRoom
add_special Special_FailedLinkToPast
add_special Special_CloseLink
- add_special WaitForOtherPlayerToExit
+ add_special Special_WaitForOtherPlayerToExit
add_special Special_SetBitsForBattleRequest
add_special Special_SetBitsForTimeCapsuleRequest
add_special Special_CheckTimeCapsuleCompatibility
@@ -39,160 +39,160 @@ SpecialsPointers:: ; c029
add_special Special_UnlockMysteryGift
; Map Events
- add_special BugContestJudging
- add_special CheckPartyFullAfterContest
- add_special ContestDropOffMons
- add_special ContestReturnMons
+ add_special Special_BugContestJudging
+ add_special Special_CheckPartyFullAfterContest
+ add_special Special_ContestDropOffMons
+ add_special Special_ContestReturnMons
add_special Special_GiveParkBalls
add_special Special_CheckMagikarpLength
add_special Special_MagikarpHouseSign
- add_special HealParty
- add_special PokemonCenterPC
+ add_special HealParty ; this is both a special and a predef
+ add_special Special_PokemonCenterPC
add_special Special_KrissHousePC
add_special Special_DayCareMan
add_special Special_DayCareLady
add_special Special_DayCareManOutside
- add_special MoveDeletion
+ add_special Special_MoveDeletion
add_special Special_BankOfMom
add_special Special_MagnetTrain
- add_special SpecialNameRival
+ add_special Special_NameRival
add_special Special_SetDayOfWeek
add_special Special_TownMap
add_special Special_UnownPrinter
- add_special MapRadio
+ add_special Special_MapRadio
add_special Special_UnownPuzzle
add_special Special_SlotMachine
add_special Special_CardFlip
add_special Special_DummyNonfunctionalGameCornerGame
add_special Special_ClearBGPalettesBufferScreen
- add_special FadeOutPalettes
+ add_special Special_FadeOutPalettes
add_special Special_BattleTowerFade
add_special Special_FadeBlackQuickly
- add_special FadeInPalettes
+ add_special Special_FadeInPalettes
add_special Special_FadeInQuickly
- add_special Special_ReloadSpritesNoPalettes
- add_special ClearBGPalettes
- add_special UpdateTimePals
- add_special ClearTileMap
- add_special UpdateSprites
- add_special ReplaceKrisSprite
+ add_special ReloadSpritesNoPalettes ; bank 0
+ add_special ClearBGPalettes ; bank 0
+ add_special UpdateTimePals ; bank 0
+ add_special ClearTileMap ; bank 0
+ add_special UpdateSprites ; bank 0
+ add_special ReplaceKrisSprite ; bank 0
add_special Special_GameCornerPrizeMonCheckDex
- add_special SpecialSeenMon
- add_special WaitSFX
- add_special PlayMapMusic
- add_special RestartMapMusic
- add_special HealMachineAnim
+ add_special UnusedSpecial_SeenMon
+ add_special WaitSFX ; bank 0
+ add_special PlayMapMusic ; bank 0
+ add_special RestartMapMusic ; bank 0
+ add_special Special_HealMachineAnim
add_special Special_SurfStartStep
add_special Special_FindGreaterThanThatLevel
add_special Special_FindAtLeastThatHappy
add_special Special_FindThatSpecies
add_special Special_FindThatSpeciesYourTrainerID
- add_special Special_CheckUnusedTwoDayTimer ; unreferenced
+ add_special UnusedSpecial_CheckUnusedTwoDayTimer
add_special Special_DayCareMon1
add_special Special_DayCareMon2
add_special Special_SelectRandomBugContestContestants
add_special Special_ActivateFishingSwarm
- add_special ToggleMaptileDecorations
- add_special ToggleDecorationsVisibility
- add_special SpecialGiveShuckle
- add_special SpecialReturnShuckle
+ add_special Special_ToggleMaptileDecorations
+ add_special Special_ToggleDecorationsVisibility
+ add_special Special_GiveShuckle
+ add_special Special_ReturnShuckle
add_special Special_BillsGrandfather
- add_special SpecialCheckPokerus
+ add_special Special_CheckPokerus
add_special Special_DisplayCoinCaseBalance
add_special Special_DisplayMoneyAndCoinBalance
- add_special PlaceMoneyTopRight
+ add_special Special_PlaceMoneyTopRight
add_special Special_CheckForLuckyNumberWinners
add_special Special_CheckLuckyNumberShowFlag
add_special Special_ResetLuckyNumberShowFlag
add_special Special_PrintTodaysLuckyNumber
add_special Special_SelectApricornForKurt
- add_special SpecialNameRater
+ add_special Special_NameRater
add_special Special_DisplayLinkRecord
- add_special GetFirstPokemonHappiness
- add_special CheckFirstMonIsEgg
- add_special RandomUnseenWildMon
- add_special RandomPhoneWildMon
- add_special RandomPhoneMon
- add_special MapCallbackSprites_LoadUsedSpritesGFX
- add_special PlaySlowCry
- add_special SpecialSnorlaxAwake
+ add_special Special_GetFirstPokemonHappiness
+ add_special Special_CheckFirstMonIsEgg
+ add_special Special_RandomUnseenWildMon
+ add_special Special_RandomPhoneWildMon
+ add_special Special_RandomPhoneMon
+ add_special Special_LoadUsedSpritesGFX
+ add_special Special_PlaySlowCry
+ add_special Special_SnorlaxAwake
add_special Special_YoungerHaircutBrother
add_special Special_OlderHaircutBrother
add_special Special_DaisyMassage
- add_special PlayCurMonCry
- add_special ProfOaksPCBoot
- add_special SpecialGameboyCheck
- add_special SpecialTrainerHouse
- add_special PhotoStudio
- add_special InitRoamMons
+ add_special Special_PlayCurMonCry
+ add_special Special_ProfOaksPCBoot
+ add_special Special_GameboyCheck
+ add_special Special_TrainerHouse
+ add_special Special_PhotoStudio
+ add_special Special_InitRoamMons
add_special Special_FadeOutMusic
- add_special Diploma
- add_special PrintDiploma
+ add_special Special_Diploma
+ add_special Special_PrintDiploma
; Crystal
- add_special Function11ac3e
- add_special Function11b444
- add_special Function11b5e8
- add_special Function11b7e5
- add_special Function11b879
- add_special Function11b920
- add_special Function11b93b
- add_special BattleTowerRoomMenu
- add_special Function1700ba
- add_special Function170114
- add_special BattleTowerBattle
- add_special Function1704e1
- add_special EmptySpecial_17021d
- add_special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
- add_special Function11ba38
- add_special SpecialCheckForBattleTowerRules
+ add_special Special_Function11ac3e
+ add_special Special_Function11b444
+ add_special Special_Function11b5e8
+ add_special Special_Function11b7e5
+ add_special Special_Function11b879
+ add_special Special_Function11b920
+ add_special Special_Function11b93b
+ add_special Special_BattleTowerRoomMenu
+ add_special Special_Function1700ba
+ add_special Special_Function170114
+ add_special Special_BattleTowerBattle
+ add_special UnusedSpecial_Function1704e1
+ add_special DummySpecial_17021d
+ add_special Special_LoadOpponentTrainerAndPokemonWithOTSprite
+ add_special Special_Function11ba38
+ add_special Special_CheckForBattleTowerRules
add_special Special_GiveOddEgg
- add_special Reset
- add_special Function1011f1
- add_special Function101220
- add_special Function101225
- add_special Function101231
+ add_special Reset ; bank 0
+ add_special Special_Function1011f1
+ add_special Special_Function101220
+ add_special Special_Function101225
+ add_special Special_Function101231
add_special Special_MoveTutor
- add_special SpecialOmanyteChamber
- add_special Function11c1ab
- add_special BattleTowerAction
+ add_special Special_OmanyteChamber
+ add_special Special_Function11c1ab
+ add_special Special_BattleTowerAction
add_special Special_DisplayUnownWords
add_special Special_Menu_ChallengeExplanationCancel
- add_special Function17d2b6
- add_special Function17d2ce
- add_special BattleTowerMobileError
- add_special AskMobileOrCable
- add_special SpecialHoOhChamber
- add_special Function102142
+ add_special Special_Function17d2b6
+ add_special Special_Function17d2ce
+ add_special Special_BattleTowerMobileError
+ add_special Special_AskMobileOrCable
+ add_special Special_HoOhChamber
+ add_special Special_Function102142
add_special Special_CelebiShrineEvent
- add_special CheckCaughtCelebi
- add_special SpecialPokeSeer
- add_special SpecialBuenasPassword
- add_special SpecialBuenaPrize
- add_special SpecialDratini
+ add_special Special_CheckCaughtCelebi
+ add_special Special_PokeSeer
+ add_special Special_BuenasPassword
+ add_special Special_BuenaPrize
+ add_special Special_Dratini
add_special Special_SampleKenjiBreakCountdown
- add_special SpecialBeastsCheck
- add_special SpecialMonCheck
+ add_special Special_BeastsCheck
+ add_special Special_MonCheck
add_special Special_SetPlayerPalette
- add_special ret_170bd2
- add_special Mobile_SelectThreeMons
- add_special Function1037eb
- add_special Function10383c
- add_special TrainerRankings_Healings
- add_special RefreshSprites
- add_special Function1037c2
- add_special Mobile_DummyReturnFalse
- add_special Function103780
- add_special Function10387b
- add_special AskRememberPassword
- add_special LoadMapPalettes
- add_special FindItemInPCOrBag
+ add_special DummySpecial_170bd2
+ add_special Special_Mobile_SelectThreeMons
+ add_special Special_Function1037eb
+ add_special Special_Function10383c
+ add_special Special_StubbedTrainerRankings_Healings
+ add_special Special_RefreshSprites
+ add_special Special_Function1037c2
+ add_special Special_Mobile_DummyReturnFalse
+ add_special Special_Function103780
+ add_special Special_Function10387b
+ add_special Special_AskRememberPassword
+ add_special Special_LoadMapPalettes
+ add_special UnusedSpecial_FindItemInPCOrBag
add_special Special_InitialSetDSTFlag
add_special Special_InitialClearDSTFlag
- add_special SpecialNone
+ add_special DummySpecial_c224
; c224
-SpecialNone: ; c224
+DummySpecial_c224: ; c224
ret
; c225
@@ -214,12 +214,12 @@ Special_GameCornerPrizeMonCheckDex: ; c230
call FadeToMenu
ld a, [ScriptVar]
ld [wd265], a
- farcall NewPokedexEntry
+ farcall Predef_NewPokedexEntry
call ExitAllMenus
ret
; c252
-SpecialSeenMon: ; c252
+UnusedSpecial_SeenMon: ; c252
ld a, [ScriptVar]
dec a
call SetSeenMon
@@ -265,7 +265,7 @@ FoundNone: ; c298
ret
; c29d
-SpecialNameRival: ; 0xc29d
+Special_NameRival: ; 0xc29d
ld b, $2 ; rival
ld de, RivalName
farcall _NamingScreen
@@ -279,7 +279,7 @@ SpecialNameRival: ; 0xc29d
DefaultRivalName: ; 0xc2b2
db "SILVER@"
-SpecialNameRater: ; c2b9
+Special_NameRater: ; c2b9
farcall NameRater
ret
; c2c0
@@ -363,14 +363,14 @@ Special_GetMysteryGiftItem: ; c309
db "@"
; 0xc34a
-BugContestJudging: ; c34a
- farcall _BugContestJudging
+Special_BugContestJudging: ; c34a
+ farcall _Special_BugContestJudging
ld a, b
ld [ScriptVar], a
ret
; c355
-MapRadio: ; c355
+Special_MapRadio: ; c355
ld a, [ScriptVar]
ld e, a
farcall PlayRadio
@@ -483,7 +483,7 @@ ScriptReturnCarry: ; c3e2
ret
; c3ef
-Special_CheckUnusedTwoDayTimer: ; c3ef
+UnusedSpecial_CheckUnusedTwoDayTimer: ; c3ef
farcall CheckUnusedTwoDayTimer
ld a, [wUnusedTwoDayTimer]
ld [ScriptVar], a
@@ -517,7 +517,7 @@ StoreSwarmMapIndices:: ; c403
; c419
-SpecialCheckPokerus: ; c419
+Special_CheckPokerus: ; c419
; Check if a monster in your party has Pokerus
farcall CheckPokerus
jp ScriptReturnCarry
@@ -536,7 +536,7 @@ Special_CheckLuckyNumberShowFlag: ; c434
jp ScriptReturnCarry
; c43d
-SpecialSnorlaxAwake: ; 0xc43d
+Special_SnorlaxAwake: ; 0xc43d
; Check if the Poké Flute channel is playing, and if the player is standing
; next to Snorlax.
@@ -587,13 +587,13 @@ SpecialSnorlaxAwake: ; 0xc43d
db -1
-PlayCurMonCry: ; c472
+Special_PlayCurMonCry: ; c472
ld a, [CurPartySpecies]
jp PlayCry
; c478
-SpecialGameboyCheck: ; c478
+Special_GameboyCheck: ; c478
ld a, [hCGB]
and a
jr nz, .cgb
@@ -603,13 +603,13 @@ SpecialGameboyCheck: ; c478
jr nz, .sgb
.gb
- xor a
+ xor a ; GBCHECK_GB
jr .done
.sgb
- ld a, 1
+ ld a, GBCHECK_SGB
jr .done
.cgb
- ld a, 2
+ ld a, GBCHECK_CGB
.done
ld [ScriptVar], a
ret
@@ -625,21 +625,21 @@ Special_FadeOutMusic: ; c48f
ret
; c49f
-Diploma: ; c49f
+Special_Diploma: ; c49f
call FadeToMenu
farcall _Diploma
call ExitAllMenus
ret
; c4ac
-PrintDiploma: ; c4ac
+Special_PrintDiploma: ; c4ac
call FadeToMenu
farcall _PrintDiploma
call ExitAllMenus
ret
; c4b9
-SpecialTrainerHouse: ; 0xc4b9
+Special_TrainerHouse: ; 0xc4b9
ld a, BANK(sMysteryGiftTrainerHouseFlag)
call GetSRAMBank
ld a, [sMysteryGiftTrainerHouseFlag]
diff --git a/engine/sprite_anims.asm b/engine/sprite_anims.asm
index 9fb78a5d7..29af03d89 100755
--- a/engine/sprite_anims.asm
+++ b/engine/sprite_anims.asm
@@ -27,7 +27,7 @@ DoAnimFrame: ; 8d24b
dw .SlotsChansey
dw .SlotsChanseyEgg
dw .MailCursor
- dw .ForUnusedCursor
+ dw .UnusedCursor
dw .DummyGameCursor
dw .PokegearArrow
dw .TradePokeBall
@@ -39,11 +39,11 @@ DoAnimFrame: ; 8d24b
dw .FlyFrom
dw .FlyLeaf
dw .FlyTo
- dw .sprite_anim_seq_19
- dw .sprite_anim_seq_1A
- dw .sprite_anim_seq_1B
- dw .sprite_anim_seq_1C
- dw .IntroSuicune
+ dw .GSIntroHoOh
+ dw .EZChatCursor
+ dw .MobileTradeSentPulse
+ dw .MobileTradeOTPulse
+ dw .IntroSuicune
dw .IntroPichuWooper
dw .Celebi
dw .IntroUnown
@@ -202,7 +202,7 @@ DoAnimFrame: ; 8d24b
ret
; 8d35a
-.sprite_anim_seq_19 ; 8d35a (23:535a)
+.GSIntroHoOh ; 8d35a (23:535a)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -403,7 +403,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.ForUnusedCursor ; 8d46e (23:546e)
+.UnusedCursor ; 8d46e (23:546e)
callfar ret_e00ed
ret
@@ -430,7 +430,7 @@ DoAnimFrame: ; 8d24b
; 8d493
.TradePokeBall_zero ; 8d493
- ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_0
+ ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WIGGLE
call _ReinitSpriteAnimFrame
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
@@ -748,11 +748,11 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.sprite_anim_seq_1B ; 8d630 (23:5630)
+.MobileTradeSentPulse ; 8d630 (23:5630)
farcall Function108bc7
ret
-.sprite_anim_seq_1C ; 8d637 (23:5637)
+.MobileTradeOTPulse ; 8d637 (23:5637)
farcall Function108be0
ret
@@ -845,7 +845,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.sprite_anim_seq_1A ; 8d6b7 (23:56b7)
+.EZChatCursor ; 8d6b7 (23:56b7)
farcall AnimateEZChatCursor
ret
diff --git a/engine/sprites.asm b/engine/sprites.asm
index e1aad4832..7928fe1f0 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -36,7 +36,7 @@ PlaySpriteAnimations: ; 8cf69
DoNextFrameForAllSprites: ; 8cf7a
ld hl, wSpriteAnimationStructs
- ld e, 10 ; There are 10 structs here.
+ ld e, NUM_SPRITE_ANIM_STRUCTS
.loop
ld a, [hl]
@@ -53,7 +53,7 @@ DoNextFrameForAllSprites: ; 8cf7a
jr c, .done
.next
- ld bc, $10
+ ld bc, SPRITEANIMSTRUCT_LENGTH
add hl, bc
dec e
jr nz, .loop
@@ -76,7 +76,7 @@ DoNextFrameForAllSprites: ; 8cf7a
DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
ld hl, wSpriteAnimationStructs
- ld e, 10
+ ld e, NUM_SPRITE_ANIM_STRUCTS
.loop
ld a, [hl]
@@ -93,18 +93,18 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
jr c, .done
.next
- ld bc, $10
+ ld bc, SPRITEANIMSTRUCT_LENGTH
add hl, bc
dec e
jr nz, .loop
ld a, [wCurrSpriteOAMAddr]
ld l, a
- ld h, HIGH(Sprites + 16 * 4)
+ ld h, HIGH(Sprite17)
.loop2 ; Clear (Sprites + [wCurrSpriteOAMAddr] --> Sprites + $40)
ld a, l
- cp LOW(Sprites + 16 * 4)
+ cp LOW(Sprite17)
jr nc, .done
xor a
ld [hli], a
@@ -119,12 +119,12 @@ InitSpriteAnimStruct:: ; 8cfd6
push de
push af
ld hl, wSpriteAnimationStructs
- ld e, 10
+ ld e, NUM_SPRITE_ANIM_STRUCTS
.loop
ld a, [hl]
and a
jr z, .found
- ld bc, $10
+ ld bc, SPRITEANIMSTRUCT_LENGTH
add hl, bc
dec e
jr nz, .loop
@@ -222,8 +222,8 @@ DeinitializeSprite: ; 8d036
DeinitializeAllSprites: ; 8d03d (23:503d)
; Clear the index field of every struct in the wSpriteAnimationStructs array.
ld hl, wSpriteAnimationStructs
- ld bc, $10
- ld e, 10
+ ld bc, SPRITEANIMSTRUCT_LENGTH
+ ld e, NUM_SPRITE_ANIM_STRUCTS
xor a
.loop
ld [hl], a
@@ -391,7 +391,7 @@ GetSpriteAnimVTile: ; 8d109
push bc
ld hl, wSpriteAnimDict
ld b, a
- ld c, 10
+ ld c, NUM_SPRITE_ANIM_STRUCTS
.loop
ld a, [hli]
cp b
@@ -527,8 +527,7 @@ GetFrameOAMPointer: ; 8d1a2
ret
; 8d1ac
-BrokenGetStdGraphics: ; 8d1ac
-; dummied out
+Unreferenced_BrokenGetStdGraphics: ; 8d1ac
push hl
ld l, a
ld h, 0
@@ -576,21 +575,22 @@ BrokenStdGFXPointers: ; Broken 2bpp pointers
Sprites_Cosine: ; 8e72a
- add $10
+; a = d * cos(a * pi/32)
+ add %010000
Sprites_Sine: ; 8e72c
-; floor(d * sin(a * pi/32))
- and $3f
- cp $20
+; a = d * sin(a * pi/32)
+ and %111111
+ cp %100000
jr nc, .negative
call .ApplySineWave
ld a, h
ret
.negative
- and $1f
+ and %011111
call .ApplySineWave
ld a, h
- xor $ff ; cpl
+ xor $ff
inc a
ret
; 8e741
@@ -610,7 +610,6 @@ Sprites_Sine: ; 8e72c
srl a
jr nc, .even
add hl, de
-
.even
sla e
rl d
@@ -650,8 +649,8 @@ AnimateEndOfExpBar: ; 8e79d
; 8e7c6
.AnimateFrame: ; 8e7c6
- ld hl, Sprites
- ld c, $8
+ ld hl, Sprite01
+ ld c, 8 ; number of animated circles
.anim_loop
ld a, c
and a
@@ -669,8 +668,8 @@ AnimateEndOfExpBar: ; 8e79d
call Sprites_Sine
pop hl
pop de
- add 13 * 8
- ld [hli], a
+ add 13 * TILE_WIDTH
+ ld [hli], a ; y
pop af
push de
@@ -678,13 +677,13 @@ AnimateEndOfExpBar: ; 8e79d
call Sprites_Cosine
pop hl
pop de
- add 10 * 8 + 4
- ld [hli], a
+ add 10 * TILE_WIDTH + 4
+ ld [hli], a ; x
ld a, $0
- ld [hli], a
+ ld [hli], a ; tile id
ld a, PAL_BATTLE_OB_BLUE
- ld [hli], a
+ ld [hli], a ; attributes
jr .anim_loop
; 8e7f4
diff --git a/engine/start_menu.asm b/engine/start_menu.asm
index 913bf3780..e5d69cbb4 100755
--- a/engine/start_menu.asm
+++ b/engine/start_menu.asm
@@ -153,15 +153,13 @@ StartMenu:: ; 125cd
.MenuDataHeader:
db $40 ; tile backup
- db 0, 10 ; start coords
- db 17, 19 ; end coords
+ menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData
db 1 ; default selection
.ContestMenuDataHeader:
db $40 ; tile backup
- db 2, 10 ; start coords
- db 17, 19 ; end coords
+ menu_coords 10, 2, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData
db 1 ; default selection
@@ -503,7 +501,7 @@ StartMenu_Pack: ; 1295b
call FadeToMenu
farcall Pack
- ld a, [wcf66]
+ ld a, [wPackUsedItem]
and a
jr nz, .used_item
call CloseSubmenu
@@ -593,7 +591,7 @@ HasNoItems: ; 129d5
TossItemFromPC: ; 129f4
push de
- call PartyMonItemName
+ call Predef_PartyMonItemName
farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
@@ -616,7 +614,7 @@ TossItemFromPC: ; 129f4
pop hl
ld a, [CurItemQuantity]
call TossItem
- call PartyMonItemName
+ call Predef_PartyMonItemName
ld hl, .TossedThisMany
call MenuTextBox
call ExitMenu
@@ -668,7 +666,7 @@ CantUseItemText: ; 12a67
; 12a6c
-PartyMonItemName: ; 12a6c
+Predef_PartyMonItemName: ; 12a6c
ld a, [CurItem]
ld [wd265], a
call GetItemName
@@ -862,7 +860,7 @@ GiveTakePartyMonItem: ; 12b60
TryGiveItemToPartymon: ; 12bd9
call SpeechTextBox
- call PartyMonItemName
+ call Predef_PartyMonItemName
call GetPartyItemLocation
ld a, [hl]
and a
@@ -977,8 +975,7 @@ TakePartyItem: ; 12c60
GiveTakeItemMenuData: ; 12c9b
db %01010000
- db 12, 12 ; start coords
- db 17, 19 ; end coords
+ menu_coords 12, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .Items
db 1 ; default option
@@ -1166,8 +1163,7 @@ MonMailAction: ; 12d45
.MenuDataHeader:
db $40 ; flags
- db 10, 12 ; start coords
- db 17, 19 ; end coords
+ menu_coords 12, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData2
db 1 ; default option
; 0x12dd1
@@ -1225,7 +1221,7 @@ OpenPartyStats: ; 12e00
xor a
ld [MonType], a
call LowVolume
- predef StatsScreenInit
+ predef Predef_StatsScreenInit
call MaxVolume
call Call_ExitMenu
ld a, 0
@@ -1255,7 +1251,7 @@ MonMenu_Fly: ; 12e30
jr z, .Fail
cp $0
jr z, .Error
- farcall TrainerRankings_Fly
+ farcall StubbedTrainerRankings_Fly
ld b, $4
ld a, $2
ret
@@ -1268,7 +1264,7 @@ MonMenu_Fly: ; 12e30
ld a, $0
ret
-.Unused:
+.Unreferenced:
ld a, $1
ret
; 12e55
@@ -1792,7 +1788,7 @@ SetUpMoveScreenBG: ; 13172
hlcoord 5, 1
call PlaceString
push bc
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
pop hl
call PrintLevel
ld hl, PlayerHPPal
@@ -1809,7 +1805,7 @@ SetUpMoveList: ; 131ef
ld [hBGMapMode], a
ld [wMoveSwapBuffer], a
ld [MonType], a
- predef CopyPkmnToTempMon
+ predef Predef_CopyPkmnToTempMon
ld hl, TempMonMoves
ld de, wListMoves_MoveIndicesBuffer
ld bc, NUM_MOVES
@@ -1817,9 +1813,9 @@ SetUpMoveList: ; 131ef
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
hlcoord 2, 3
- predef ListMoves
+ predef Predef_ListMoves
hlcoord 10, 4
- predef ListMovePP
+ predef Predef_ListMovePP
call WaitBGMap
call SetPalettes
ld a, [wNumMoves]
@@ -1863,7 +1859,7 @@ PlaceMoveData: ; 13256
ld a, [CurMove]
ld b, a
hlcoord 2, 12
- predef PrintMoveType
+ predef Predef_PrintMoveType
ld a, [CurMove]
dec a
ld hl, Moves + MOVE_POWER
@@ -1886,7 +1882,7 @@ PlaceMoveData: ; 13256
.description
hlcoord 1, 14
- predef PrintMoveDesc
+ predef Predef_PrintMoveDesc
ld a, $1
ld [hBGMapMode], a
ret
diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm
index 9f632f388..6bceaa1e9 100755
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -1,14 +1,20 @@
+const_value set 1
+ const PINK_PAGE ; 1
+ const GREEN_PAGE ; 2
+ const BLUE_PAGE ; 3
+NUM_STAT_PAGES EQU const_value +- 1
+
BattleStatsScreenInit: ; 4dc7b (13:5c7b)
ld a, [wLinkMode]
cp LINK_MOBILE
- jr nz, StatsScreenInit
+ jr nz, Predef_StatsScreenInit
ld a, [wBattleMode]
and a
- jr z, StatsScreenInit
+ jr z, Predef_StatsScreenInit
jr _MobileStatsScreenInit
-StatsScreenInit: ; 4dc8a
+Predef_StatsScreenInit: ; 4dc8a
ld hl, StatsScreenMain
jr StatsScreenInit_gotaddress
@@ -58,12 +64,12 @@ StatsScreenMain: ; 0x4dcd2
; stupid interns
ld [wcf64], a
ld a, [wcf64]
- and $fc
- or $1
+ and %11111100
+ or 1
ld [wcf64], a
.loop ; 4dce3
ld a, [wJumptableIndex]
- and $7f
+ and $ff ^ (1 << 7)
ld hl, StatsScreenPointerTable
rst JumpTable
call StatsScreen_WaitAnim ; check for keys?
@@ -79,13 +85,13 @@ StatsScreenMobile: ; 4dcf7
; stupid interns
ld [wcf64], a
ld a, [wcf64]
- and $fc
- or $1
+ and %11111100
+ or 1
ld [wcf64], a
.loop
farcall Mobile_SetOverworldDelay
ld a, [wJumptableIndex]
- and $7f
+ and $ff ^ (1 << 7)
ld hl, StatsScreenPointerTable
rst JumpTable
call StatsScreen_WaitAnim
@@ -234,7 +240,7 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2)
jr .done
.breedmon
- farcall CopyPkmnToTempMon
+ farcall Predef_CopyPkmnToTempMon
ld a, [CurPartySpecies]
cp EGG
jr z, .done
@@ -277,7 +283,7 @@ StatsScreen_GetJoypad: ; 4de2c (13:5e2c)
StatsScreen_JoypadAction: ; 4de54 (13:5e54)
push af
ld a, [wcf64]
- and $3
+ maskbits NUM_STAT_PAGES +- 1
ld c, a
pop af
bit B_BUTTON_F, a
@@ -335,20 +341,20 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
.a_button
ld a, c
- cp $3
+ cp BLUE_PAGE ; last page
jr z, .b_button
.d_right
inc c
- ld a, $3
+ ld a, BLUE_PAGE ; last page
cp c
jr nc, .set_page
- ld c, $1
+ ld c, PINK_PAGE ; first page
jr .set_page
.d_left
dec c
jr nz, .set_page
- ld c, $3
+ ld c, BLUE_PAGE ; last page
jr .set_page
.done
@@ -419,7 +425,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
ld a, [hli]
ld d, a
ld e, [hl]
- farcall ComputeHPBarPixels
+ farcall Predef_ComputeHPBarPixels
ld hl, wCurHPPal
call SetHPPal
ld b, SCGB_STATS_SCREEN_HP_PALS
@@ -429,7 +435,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
.PlaceGenderChar: ; 4df66 (13:5f66)
push hl
- farcall GetGender
+ farcall Predef_GetGender
pop hl
ret c
ld a, "♂"
@@ -447,13 +453,12 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
dw wBufferMonNick
; 4df7f
-Function4df7f: ; 4df7f
-; unreferenced
+Unreferenced_Function4df7f: ; 4df7f
hlcoord 7, 0
ld bc, SCREEN_WIDTH
ld d, SCREEN_HEIGHT
.loop
- ld a, "|"
+ ld a, $31 ; vertical divider
ld [hl], a
add hl, bc
dec d
@@ -464,7 +469,7 @@ Function4df7f: ; 4df7f
StatsScreen_PlaceHorizontalDivider: ; 4df8f (13:5f8f)
hlcoord 0, 7
ld b, SCREEN_WIDTH
- ld a, "_"
+ ld a, $62 ; horizontal divider (empty HP/exp bar)
.loop
ld [hli], a
dec b
@@ -507,7 +512,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
.ClearBox: ; 4dfda (13:5fda)
ld a, [wcf64]
- and $3
+ maskbits NUM_STAT_PAGES +- 1
ld c, a
call StatsScreen_LoadPageIndicators
hlcoord 0, 8
@@ -517,7 +522,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
.LoadPals: ; 4dfed (13:5fed)
ld a, [wcf64]
- and $3
+ maskbits NUM_STAT_PAGES +- 1
ld c, a
farcall LoadStatsScreenPals
call DelayFrame
@@ -527,13 +532,14 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
.PageTilemap: ; 4e002 (13:6002)
ld a, [wcf64]
- and $3
+ maskbits NUM_STAT_PAGES +- 1
dec a
ld hl, .Jumptable
rst JumpTable
ret
.Jumptable: ; 4e00d (13:600d)
+; entries correspond to *_PAGE constants
dw .PinkPage
dw .GreenPage
dw .BluePage
@@ -541,9 +547,9 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
.PinkPage: ; 4e013 (13:6013)
hlcoord 0, 9
ld b, $0
- predef DrawPlayerHP
+ predef Predef_DrawPlayerHP
hlcoord 8, 9
- ld [hl], $41
+ ld [hl], $41 ; right HP/exp bar end cap
ld de, .Status_Type
hlcoord 0, 12
call PlaceString
@@ -555,7 +561,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
and $f0
jr z, .NotImmuneToPkrs
hlcoord 8, 8
- ld [hl], "."
+ ld [hl], "." ; Pokérus immunity dot
.NotImmuneToPkrs:
ld a, [MonType]
cp BOXMON
@@ -563,7 +569,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 6, 13
push hl
ld de, TempMonStatus
- predef PlaceStatusString
+ predef Predef_PlaceStatusString
pop hl
jr nz, .done_status
jr .StatusOK
@@ -577,11 +583,11 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
call PlaceString
.done_status
hlcoord 1, 15
- predef PrintMonTypes
+ predef Predef_PrintMonTypes
hlcoord 9, 8
ld de, SCREEN_WIDTH
ld b, 10
- ld a, "|"
+ ld a, $31 ; vertical divider
.vertical_divider
ld [hl], a
add hl, de
@@ -611,11 +617,11 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld a, [TempMonLevel]
ld b, a
ld de, TempMonExp + 2
- predef FillInExpBar
+ predef Predef_FillInExpBar
hlcoord 10, 16
- ld [hl], $40
+ ld [hl], $40 ; left exp bar end cap
hlcoord 19, 16
- ld [hl], $41
+ ld [hl], $41 ; right exp bar end cap
ret
.PrintNextLevel: ; 4e0d3 (13:60d3)
@@ -704,11 +710,11 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 8, 10
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
- predef ListMoves
+ predef Predef_ListMoves
hlcoord 12, 11
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
- predef ListMovePP
+ predef Predef_ListMovePP
ret
.GetItemName: ; 4e189 (13:6189)
@@ -741,7 +747,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 10, 8
ld de, SCREEN_WIDTH
ld b, 10
- ld a, "|"
+ ld a, $31 ; vertical divider
.BluePageVerticalDivider:
ld [hl], a
add hl, de
@@ -749,7 +755,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
jr nz, .BluePageVerticalDivider
hlcoord 11, 8
ld bc, 6
- predef PrintTempMonStats
+ predef Predef_PrintTempMonStats
ret
.PlaceOTInfo: ; 4e1cc (13:61cc)
@@ -802,7 +808,7 @@ OTString: ; 4e222
StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
ld hl, TempMonDVs
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
call StatsScreen_GetAnimationParam
jr c, .egg
and a
@@ -864,11 +870,11 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
ret c
call StatsScreen_LoadTextBoxSpaceGFX
ld de, vTiles2 tile $00
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
hlcoord 0, 0
ld d, $0
ld e, ANIM_MON_MENU
- predef LoadMonAnimation
+ predef Predef_LoadMonAnimation
ld hl, wcf64
set 6, [hl]
ret
@@ -951,7 +957,7 @@ StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
ld [rVBK], a
ld de, TextBoxSpaceGFX
lb bc, BANK(TextBoxSpaceGFX), 1
- ld hl, vTiles2 tile $7f
+ ld hl, vTiles2 tile " "
call Get2bpp
pop af
ld [rVBK], a
@@ -962,9 +968,8 @@ StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
ret
; 4e32a (13:632a)
-; unreferenced
-Unknown_4e32a: ; 4e32a
-; A blank tile?
+Unreferenced_4e32a: ; 4e32a
+; A blank space tile?
ds 16
; 4e33a
@@ -1069,33 +1074,33 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497)
ld [wBoxAlignment], a
call StatsScreen_LoadTextBoxSpaceGFX
ld de, vTiles2 tile $00
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
pop de
hlcoord 0, 0
ld d, $0
- predef LoadMonAnimation
+ predef Predef_LoadMonAnimation
ld hl, wcf64
set 6, [hl]
ret
StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd)
hlcoord 13, 5
- ld a, $36
+ ld a, $36 ; first of 4 small square tiles
call .load_square
hlcoord 15, 5
- ld a, $36
+ ld a, $36 ; """
call .load_square
hlcoord 17, 5
- ld a, $36
+ ld a, $36 ; """
call .load_square
ld a, c
- cp $2
- ld a, $3a
- hlcoord 13, 5
+ cp GREEN_PAGE
+ ld a, $3a ; first of 4 large square tiles
+ hlcoord 13, 5 ; PINK_PAGE (< GREEN_PAGE)
jr c, .load_square
- hlcoord 15, 5
+ hlcoord 15, 5 ; GREEN_PAGE (= GREEN_PAGE)
jr z, .load_square
- hlcoord 17, 5
+ hlcoord 17, 5 ; BLUE_PAGE (> GREEN_PAGE)
.load_square ; 4e4f7 (13:64f7)
push bc
ld [hli], a
@@ -1113,7 +1118,7 @@ StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd)
CopyNickname: ; 4e505 (13:6505)
ld de, StringBuffer1
ld bc, PKMN_NAME_LENGTH
- jr .okay ; uuterly pointless
+ jr .okay ; utterly pointless
.okay
ld a, [MonType]
cp BOXMON
@@ -1157,7 +1162,7 @@ CheckFaintedFrzSlp: ; 4e53f
ld hl, MON_STATUS
add hl, bc
ld a, [hl]
- and (1 << FRZ) | SLP
+ and 1 << FRZ | SLP
jr nz, .fainted_frz_slp
and a
ret
diff --git a/engine/tempmon.asm b/engine/tempmon.asm
index be989d14b..abd85a9ec 100644
--- a/engine/tempmon.asm
+++ b/engine/tempmon.asm
@@ -1,4 +1,4 @@
-CopyPkmnToTempMon: ; 5084a
+Predef_CopyPkmnToTempMon: ; 5084a
; gets the BaseData of a Pkmn
; and copys the PkmnStructure to TempMon
@@ -51,7 +51,7 @@ _TempMonStatsCalculation: ; 50893
add hl, bc
push bc
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop bc
ld hl, MON_HP
add hl, bc
diff --git a/tilesets/animations.asm b/engine/tileset_anims.asm
index d500a24b8..74679b1ee 100644
--- a/tilesets/animations.asm
+++ b/engine/tileset_anims.asm
@@ -95,7 +95,7 @@ TilesetJohto1Anim: ; 0xfc0a3
dw NULL, DoneTileAnimation
; 0xfc0d7
-TilesetAnimfc0d7: ; 0xfc0d7
+UnusedTilesetAnim_fc0d7: ; 0xfc0d7
dw vTiles2 tile $03, WriteTileToBuffer
dw wTileAnimBuffer, ScrollTileRightLeft
dw vTiles2 tile $03, WriteTileFromBuffer
@@ -109,7 +109,7 @@ TilesetAnimfc0d7: ; 0xfc0d7
dw NULL, DoneTileAnimation
; 0xfc103
-TilesetAnimfc103: ; 0xfc103
+UnusedTilesetAnim_fc103: ; 0xfc103
dw vTiles2 tile $14, WriteTileToBuffer
dw wTileAnimBuffer, ScrollTileRightLeft
dw vTiles2 tile $14, WriteTileFromBuffer
@@ -139,17 +139,17 @@ TilesetPortAnim: ; 0xfc12f
; 0xfc15f
TilesetGym1Anim: ; 0xfc15f
- dw NULL, SafariFountainAnim2
+ dw NULL, LavaBubbleAnim2
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
- dw NULL, SafariFountainAnim1
+ dw NULL, LavaBubbleAnim1
dw NULL, WaitTileAnimation
dw NULL, StandingTileFrame8
dw NULL, DoneTileAnimation
; 0xfc17f
-TilesetAnimfc17f: ; 0xfc17f
+UnusedTilesetAnim_fc17f: ; 0xfc17f
dw vTiles2 tile $53, WriteTileToBuffer
dw wTileAnimBuffer, ScrollTileDown
dw wTileAnimBuffer, ScrollTileDown
@@ -164,7 +164,7 @@ TilesetAnimfc17f: ; 0xfc17f
dw NULL, DoneTileAnimation
; 0xfc1af
-TilesetAnimfc1af: ; 0xfc1af
+UnusedTilesetAnim_fc1af: ; 0xfc1af
dw vTiles2 tile $54, WriteTileToBuffer
dw wTileAnimBuffer, ScrollTileDown
dw wTileAnimBuffer, ScrollTileDown
@@ -245,7 +245,7 @@ TilesetSproutTowerAnim: ; 0xfc27f
dw NULL, DoneTileAnimation
; 0xfc2bf
-TilesetAnimfc2bf: ; 0xfc2bf
+UnusedTilesetAnim_fc2bf: ; 0xfc2bf
dw vTiles2 tile $4f, WriteTileToBuffer
dw wTileAnimBuffer, ScrollTileRightLeft
dw vTiles2 tile $4f, WriteTileFromBuffer
@@ -303,7 +303,7 @@ WaitTileAnimation: ; fc2fe
StandingTileFrame8: ; fc2ff
ld a, [TileAnimationTimer]
inc a
- and 7
+ and %111
ld [TileAnimationTimer], a
ret
; fc309
@@ -313,9 +313,9 @@ ScrollTileRightLeft: ; fc309
; Scroll right for 4 ticks, then left for 4 ticks.
ld a, [TileAnimationTimer]
inc a
- and 7
+ and %111
ld [TileAnimationTimer], a
- and 4
+ and %100
jr nz, ScrollTileLeft
jr ScrollTileRight
; fc318
@@ -324,9 +324,9 @@ ScrollTileUpDown: ; fc318
; Scroll up for 4 ticks, then down for 4 ticks.
ld a, [TileAnimationTimer]
inc a
- and 7
+ and %111
ld [TileAnimationTimer], a
- and 4
+ and %100
jr nz, ScrollTileDown
jr ScrollTileUp
; fc327
@@ -336,11 +336,11 @@ ScrollTileLeft: ; fc327
ld l, e
ld c, 4
.loop
- rept 4
+rept 4
ld a, [hl]
rlca
ld [hli], a
- endr
+endr
dec c
jr nz, .loop
ret
@@ -351,11 +351,11 @@ ScrollTileRight: ; fc33b
ld l, e
ld c, 4
.loop
- rept 4
+rept 4
ld a, [hl]
rrca
ld [hli], a
- endr
+endr
dec c
jr nz, .loop
ret
@@ -367,9 +367,9 @@ ScrollTileUp: ; fc34f
ld d, [hl]
inc hl
ld e, [hl]
- ld bc, $e
+ ld bc, TILE_WIDTH * 2 - 2
add hl, bc
- ld a, 4
+ ld a, TILE_WIDTH / 2
.loop
ld c, [hl]
ld [hl], e
@@ -391,14 +391,14 @@ ScrollTileUp: ; fc34f
ScrollTileDown: ; fc36a
ld h, d
ld l, e
- ld de, $e
+ ld de, TILE_WIDTH * 2 - 2
push hl
add hl, de
ld d, [hl]
inc hl
ld e, [hl]
pop hl
- ld a, 4
+ ld a, TILE_WIDTH / 2
.loop
ld b, [hl]
ld [hl], d
@@ -424,7 +424,7 @@ AnimateFountain: ; fc387
ld c, l
ld hl, .frames
ld a, [TileAnimationTimer]
- and 7
+ and %111
add a
add l
ld l, a
@@ -468,7 +468,7 @@ AnimateWaterTile: ; fc402
ld a, [TileAnimationTimer]
; 4 tile graphics, updated every other frame.
- and 3 << 1
+ and %110
; 2 x 8 = 16 bytes per tile
add a
@@ -676,7 +676,7 @@ AnimateFlowerTile: ; fc56d
; Alternate tile graphic every other frame
ld a, [TileAnimationTimer]
- and 1 << 1
+ and %10
ld e, a
; CGB has different color mappings for flowers.
@@ -684,14 +684,14 @@ AnimateFlowerTile: ; fc56d
and 1
add e
- swap a ; << 4 (16 bytes)
+ swap a
ld e, a
ld d, 0
ld hl, FlowerTileFrames
add hl, de
ld sp, hl
- ld hl, vTiles2 + $30 ; tile 4
+ ld hl, vTiles2 tile $03
jp WriteTile
; fc58c
@@ -704,21 +704,21 @@ FlowerTileFrames: ; fc58c
; fc5cc
-SafariFountainAnim1: ; fc5cc
+LavaBubbleAnim1: ; fc5cc
; Splash in the bottom-right corner of the fountain.
ld hl, sp+0
ld b, h
ld c, l
ld a, [TileAnimationTimer]
- and 6
+ and %110
srl a
inc a
inc a
- and 3
+ and %011
swap a
ld e, a
ld d, 0
- ld hl, SafariFountainFrames
+ ld hl, LavaBubbleFrames
add hl, de
ld sp, hl
ld hl, vTiles2 tile $5b
@@ -726,19 +726,19 @@ SafariFountainAnim1: ; fc5cc
; fc5eb
-SafariFountainAnim2: ; fc5eb
+LavaBubbleAnim2: ; fc5eb
; Splash in the top-left corner of the fountain.
ld hl, sp+0
ld b, h
ld c, l
ld a, [TileAnimationTimer]
- and 6
+ and %110
add a
add a
add a
ld e, a
ld d, 0
- ld hl, SafariFountainFrames
+ ld hl, LavaBubbleFrames
add hl, de
ld sp, hl
ld hl, vTiles2 tile $38
@@ -746,11 +746,11 @@ SafariFountainAnim2: ; fc5eb
; fc605
-SafariFountainFrames: ; fc605
- INCBIN "gfx/tilesets/safari/1.2bpp"
- INCBIN "gfx/tilesets/safari/2.2bpp"
- INCBIN "gfx/tilesets/safari/3.2bpp"
- INCBIN "gfx/tilesets/safari/4.2bpp"
+LavaBubbleFrames: ; fc605
+ INCBIN "gfx/tilesets/lava/1.2bpp"
+ INCBIN "gfx/tilesets/lava/2.2bpp"
+ INCBIN "gfx/tilesets/lava/3.2bpp"
+ INCBIN "gfx/tilesets/lava/4.2bpp"
; fc645
@@ -764,7 +764,7 @@ AnimateSproutPillarTile: ; fc645
ld c, l
ld a, [TileAnimationTimer]
- and 7
+ and %111
; Get frame index a
ld hl, .frames
@@ -948,7 +948,7 @@ TileAnimationPalette: ; fc6d7
ld a, l
and %110 ; frames 0 2 4 6
jr z, .color0
- cp 4
+ cp %100 ; frame 4
jr z, .color2
.color1
@@ -992,7 +992,7 @@ FlickeringCaveEntrancePalette: ; fc71e
ret nz
; We only want to be here if we're in a dark cave.
ld a, [wTimeOfDayPalset]
- cp $ff ; 3,3,3,3
+ cp %11111111 ; 3,3,3,3
ret nz
ld a, [rSVBK]
@@ -1003,7 +1003,7 @@ FlickeringCaveEntrancePalette: ; fc71e
ld a, (1 << rBGPI_AUTO_INCREMENT) palette PAL_BG_YELLOW
ld [rBGPI], a
ld a, [hVBlankCounter]
- and 1 << 1
+ and %10
jr nz, .bit1set
ld hl, wBGPals1 palette PAL_BG_YELLOW
jr .okay
diff --git a/tilesets/special_palettes.asm b/engine/tileset_palettes.asm
index 761b15348..9aba2f20e 100644
--- a/tilesets/special_palettes.asm
+++ b/engine/tileset_palettes.asm
@@ -63,7 +63,7 @@ LoadPokeComPalette: ; 494f2
; 49501
PokeComPalette: ; 49501
-INCLUDE "data/palettes/tilesets/pokecom_center.pal"
+INCLUDE "gfx/tilesets/pokecom_center.pal"
; 49541
LoadBattleTowerPalette: ; 49541
@@ -76,7 +76,7 @@ LoadBattleTowerPalette: ; 49541
; 49550
BattleTowerPalette: ; 49550
-INCLUDE "data/palettes/tilesets/battle_tower.pal"
+INCLUDE "gfx/tilesets/battle_tower.pal"
; 49590
LoadIcePathPalette: ; 49590
@@ -89,7 +89,7 @@ LoadIcePathPalette: ; 49590
; 4959f
IcePathPalette: ; 4959f
-INCLUDE "data/palettes/tilesets/ice_path.pal"
+INCLUDE "gfx/tilesets/ice_path.pal"
; 495df
LoadHousePalette: ; 495df
@@ -102,7 +102,7 @@ LoadHousePalette: ; 495df
; 495ee
HousePalette: ; 495ee
-INCLUDE "data/palettes/tilesets/house_1.pal"
+INCLUDE "gfx/tilesets/house_1.pal"
; 4962e
LoadRadioTowerPalette: ; 4962e
@@ -115,57 +115,11 @@ LoadRadioTowerPalette: ; 4962e
; 4963d
RadioTowerPalette: ; 4963d
-INCLUDE "data/palettes/tilesets/radio_tower.pal"
+INCLUDE "gfx/tilesets/radio_tower.pal"
; 4967d
MansionPalette1: ; 4967d
- RGB 30, 28, 26
- RGB 19, 19, 19
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 18, 24, 09
- RGB 15, 20, 01
- RGB 09, 13, 00
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 15, 16, 31
- RGB 09, 09, 31
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 26, 24, 17
- RGB 21, 17, 07
- RGB 16, 13, 03
- RGB 07, 07, 07
-
-MansionPalette3: ; 496ad
- RGB 30, 28, 26
- RGB 17, 19, 31
- RGB 14, 16, 31
- RGB 07, 07, 07
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-; 496bd
-
-MansionPalette4: ; 496bd
- RGB 05, 05, 16
- RGB 08, 19, 28
- RGB 00, 00, 00
- RGB 31, 31, 31
+INCLUDE "gfx/tilesets/celadon_mansion_1.pal"
; 496c5
LoadMansionPalette: ; 496c5
@@ -181,20 +135,17 @@ LoadMansionPalette: ; 496c5
call FarCopyWRAM
ld a, BANK(wBGPals1)
ld de, wBGPals1 palette PAL_BG_WATER
- ld hl, MansionPalette3
+ ld hl, MansionPalette1 + 6 palettes
ld bc, 1 palettes
call FarCopyWRAM
ld a, BANK(wBGPals1)
ld de, wBGPals1 palette PAL_BG_ROOF
- ld hl, MansionPalette4
+ ld hl, MansionPalette1 + 8 palettes
ld bc, 1 palettes
call FarCopyWRAM
ret
; 496fe
MansionPalette2: ; 496fe
- RGB 25, 24, 23
- RGB 20, 19, 19
- RGB 14, 16, 31
- RGB 07, 07, 07
+INCLUDE "gfx/tilesets/celadon_mansion_2.pal"
; 49706
diff --git a/engine/time.asm b/engine/time.asm
index 799a24f49..29c811810 100755
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -133,16 +133,16 @@ endr
Special_SampleKenjiBreakCountdown: ; 11485
; Generate a random number between 3 and 6
call Random
- and 3
+ and %11
add 3
ld [wKenjiBreakTimer], a
ret
; 11490
StartBugContestTimer: ; 11490
- ld a, 20
+ ld a, BUG_CONTEST_MINUTES
ld [wBugContestMinsRemaining], a
- ld a, 0
+ ld a, BUG_CONTEST_SECONDS
ld [wBugContestSecsRemaining], a
call UpdateTime
ld hl, wBugContestStartTime
@@ -225,13 +225,13 @@ CheckUnusedTwoDayTimer: ; 1150c
ret
; 1151c
-; XXX
+; unused
ld hl, wDailyFlags
set 2, [hl]
ret
; 11522
-; XXX
+; unused
and a
ld hl, wDailyFlags
bit 2, [hl]
@@ -252,7 +252,7 @@ RestartLuckyNumberCountdown: ; 1152b
ld a, FRIDAY
sub c
jr z, .friday_saturday
- jr nc, .earlier ; should've done "ret nc"
+ jr nc, .earlier ; could have done "ret nc"
.friday_saturday
add 7
diff --git a/engine/time_capsule.asm b/engine/time_capsule.asm
index 577b2dce8..96f61833b 100755
--- a/engine/time_capsule.asm
+++ b/engine/time_capsule.asm
@@ -144,4 +144,4 @@ PlaceTradePartnerNamesAndParty: ; fb60d
jr .loop
; fb656
-INCLUDE "data/time_capsule/special_stats.asm"
+INCLUDE "data/pokemon/rby_base_special.asm"
diff --git a/engine/time_capsule_2.asm b/engine/time_capsule_2.asm
index 5da72e7c8..c114e6952 100644
--- a/engine/time_capsule_2.asm
+++ b/engine/time_capsule_2.asm
@@ -18,7 +18,7 @@ ConvertMon_2to1: ; fb8f1
ret
; fb908
-ConvertMon_1to2: ; fb908
+Predef_ConvertMon_1to2: ; fb908
; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
push bc
push hl
@@ -36,4 +36,4 @@ ConvertMon_1to2: ; fb908
; fb91c
-INCLUDE "data/time_capsule/mon_order.asm"
+INCLUDE "data/pokemon/rby_order.asm"
diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm
index defa9e96d..2f24dcb95 100644
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -1,5 +1,5 @@
-Predef35: ; 8c000
-Predef36:
+DummyPredef35: ; 8c000
+DummyPredef36:
ret
UpdateTimeOfDayPal:: ; 8c001
@@ -119,7 +119,7 @@ _UpdateTimePals:: ; 8c070
ret
; 8c079
-FadeInPalettes:: ; 8c079
+Special_FadeInPalettes:: ; 8c079
ld c, $12
call GetTimePalFade
ld b, $4
@@ -127,7 +127,7 @@ FadeInPalettes:: ; 8c079
ret
; 8c084
-FadeOutPalettes:: ; 8c084
+Special_FadeOutPalettes:: ; 8c084
call FillWhiteBGColor
ld c, $9
call GetTimePalFade
diff --git a/engine/timeset.asm b/engine/timeset.asm
index f05e31ab5..b97103ed1 100755
--- a/engine/timeset.asm
+++ b/engine/timeset.asm
@@ -1,3 +1,6 @@
+TIMESET_UP_ARROW EQUS "\"♂\"" ; $ef
+TIMESET_DOWN_ARROW EQUS "\"♀\"" ; $f5
+
InitClock: ; 90672 (24:4672)
; Ask the player to set the time.
ld a, [hInMenu]
@@ -410,11 +413,11 @@ Special_SetDayOfWeek: ; 90913
ld a, $1
ld [hInMenu], a
ld de, TimeSetUpArrowGFX
- ld hl, vTiles1 tile $6f
+ ld hl, vTiles0 tile TIMESET_UP_ARROW
lb bc, BANK(TimeSetUpArrowGFX), 1
call Request1bpp
ld de, TimeSetDownArrowGFX
- ld hl, vTiles1 tile $75
+ ld hl, vTiles0 tile TIMESET_DOWN_ARROW
lb bc, BANK(TimeSetDownArrowGFX), 1
call Request1bpp
xor a
@@ -431,9 +434,9 @@ Special_SetDayOfWeek: ; 90913
ld c, 9
call TextBox
hlcoord 14, 3
- ld [hl], "♂" ; gets overwritten with special up arrow
+ ld [hl], TIMESET_UP_ARROW
hlcoord 14, 6
- ld [hl], "♀" ; gets overwritten with special down arrow
+ ld [hl], TIMESET_DOWN_ARROW
hlcoord 10, 5
call .PlaceWeekdayString
call ApplyTilemap
diff --git a/engine/title.asm b/engine/title.asm
index 1b7ae66e0..55ba145bf 100644
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -167,8 +167,8 @@ _TitleScreen: ; 10ed67
; Make alternating lines come in from opposite sides
-; ( This part is actually totally pointless, you can't
-; see anything until these values are overwritten! )
+; (This part is actually totally pointless, you can't
+; see anything until these values are overwritten!)
ld b, 80 / 2 ; alternate for 80 lines
ld hl, LYOverrides
@@ -237,11 +237,11 @@ SuicuneFrameIterator: ; 10eea7
inc [hl]
; Only do this once every eight frames
- and (1 << 3) - 1
+ and %111
ret nz
ld a, c
- and 3 << 3
+ and %11000
sla a
swap a
ld e, a
@@ -323,7 +323,7 @@ DrawTitleGraphic: ; 10eeef
; 10ef06
InitializeBackground: ; 10ef06
- ld hl, Sprites
+ ld hl, Sprite01
ld d, -$22
ld e, $0
ld c, 5
@@ -344,17 +344,17 @@ InitializeBackground: ; 10ef06
ld b, $40
.loop2
ld a, d
- ld [hli], a
+ ld [hli], a ; y
ld a, b
- ld [hli], a
+ ld [hli], a ; x
add $8
ld b, a
ld a, e
- ld [hli], a
+ ld [hli], a ; tile id
inc e
inc e
- ld a, $80
- ld [hli], a
+ ld a, 0 | PRIORITY
+ ld [hli], a ; attributes
dec c
jr nz, .loop2
ret
@@ -366,9 +366,9 @@ AnimateTitleCrystal: ; 10ef32
; Stop at y=6
; y is really from the bottom of the sprite, which is two tiles high
- ld hl, Sprites
+ ld hl, Sprite01YCoord
ld a, [hl]
- cp 6 + $10
+ cp 6 + 2 * TILE_WIDTH
ret z
; Move all 30 parts of the crystal down by 2
@@ -376,10 +376,10 @@ AnimateTitleCrystal: ; 10ef32
.loop
ld a, [hl]
add 2
- ld [hli], a
- inc hl
- inc hl
+ ld [hli], a ; y
+rept SPRITEOAMSTRUCT_LENGTH +- 1
inc hl
+endr
dec c
jr nz, .loop
@@ -399,4 +399,4 @@ INCBIN "gfx/title/crystal.2bpp.lz"
; 10fede
TitleScreenPalettes:
-INCLUDE "data/palettes/title.pal"
+INCLUDE "gfx/title/title.pal"
diff --git a/engine/tmhm.asm b/engine/tmhm.asm
index 6a9c76f00..11f692cb6 100755
--- a/engine/tmhm.asm
+++ b/engine/tmhm.asm
@@ -1,4 +1,4 @@
-CanLearnTMHMMove: ; 11639
+Predef_CanLearnTMHMMove: ; 11639
ld a, [CurPartySpecies]
ld [CurSpecies], a
call GetBaseData
@@ -23,7 +23,7 @@ CanLearnTMHMMove: ; 11639
ld b, CHECK_FLAG
push de
ld d, 0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
pop de
ret
@@ -33,7 +33,7 @@ CanLearnTMHMMove: ; 11639
ret
; 1166a
-GetTMHMMove: ; 1166a
+Predef_GetTMHMMove: ; 1166a
ld a, [wd265]
dec a
ld hl, TMHMMoves
diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm
index c111fa7f9..ddc27da07 100755
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -38,7 +38,7 @@ ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
GetTMHMItemMove: ; 2c7b6 (b:47b6)
call ConvertCurItemIntoCurTMHM
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ret
AskTeachTMHM: ; 2c7bf (b:47bf)
@@ -118,7 +118,7 @@ ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
; 2c867
TeachTMHM: ; 2c867
- predef CanLearnTMHMMove
+ predef Predef_CanLearnTMHMMove
push bc
ld a, [CurPartyMon]
@@ -141,12 +141,12 @@ TeachTMHM: ; 2c867
callfar KnowsMove
jr c, .nope
- predef LearnMove
+ predef Predef_LearnMove
ld a, b
and a
jr z, .nope
- farcall TrainerRankings_TMsHMsTaught
+ farcall StubbedTrainerRankings_TMsHMsTaught
ld a, [CurItem]
call IsHM
ret c
@@ -258,11 +258,11 @@ TMHM_ShowTMMoveDescription: ; 2c946 (b:4946)
cp NUM_TMS + NUM_HMS + 1
jr nc, TMHM_JoypadLoop
ld [wd265], a
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [CurSpecies], a
hlcoord 1, 14
- call PrintMoveDesc
+ call Predef_PrintMoveDesc
jp TMHM_JoypadLoop
TMHM_ChooseTMorHM: ; 2c974 (b:4974)
@@ -386,7 +386,7 @@ TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2)
pop af
ld [wd265], a
.okay
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [wPutativeTMHMMove], a
call GetMoveName
@@ -447,12 +447,11 @@ TMHMPocket_GetCurrentLineCoord: ; 2ca86 (b:4a86)
ret
; 2ca95 (b:4a95)
-Function2ca95: ; 2ca95
-; unreferenced
+Unreferenced_Function2ca95: ; 2ca95
pop hl
ld bc, 3
add hl, bc
- predef GetTMHMMove
+ predef Predef_GetTMHMMove
ld a, [wd265]
ld [wPutativeTMHMMove], a
call GetMoveName
@@ -499,8 +498,7 @@ TMHM_PlaySFX_ReadText2: ; 2cad6 (b:4ad6)
ret
; 2cadf (b:4adf)
-Function2cadf: ; 2cadf
-; unreferenced
+Unreferenced_Function2cadf: ; 2cadf
call ConvertCurItemIntoCurTMHM
call .CheckHaveRoomForTMHM
ld hl, .NoRoomText
@@ -574,7 +572,7 @@ CountTMsHMs: ; 2cb2a (b:4b2a)
ld [wd265], a
ret
-PrintMoveDesc: ; 2cb3e
+Predef_PrintMoveDesc: ; 2cb3e
push hl
ld hl, MoveDescriptions
ld a, [CurSpecies]
diff --git a/engine/trade_animation.asm b/engine/trade_animation.asm
index d5b97d563..2ded0807a 100755
--- a/engine/trade_animation.asm
+++ b/engine/trade_animation.asm
@@ -1,4 +1,15 @@
-TradeAnimation: ; 28f24
+TRADEANIM_RIGHT_ARROW EQU $ed
+TRADEANIM_LEFT_ARROW EQU $ee
+
+; TradeAnim_TubeAnimJumptable.Jumptable indexes
+ const_def
+ const TRADEANIMSTATE_0 ; 0
+ const TRADEANIMSTATE_1 ; 1
+ const TRADEANIMSTATE_2 ; 2
+ const TRADEANIMSTATE_3 ; 3
+TRADEANIMJUMPTABLE_LENGTH EQU const_value
+
+Predef_TradeAnimation: ; 28f24
xor a
ld [wcf66], a
ld hl, wPlayerTrademonSenderName
@@ -49,7 +60,7 @@ TradeAnimation: ; 28f24
tradeanim_scroll_out_right
tradeanim_end
-TradeAnimationPlayer2: ; 28f63
+Predef_TradeAnimationPlayer2: ; 28f63
xor a
ld [wcf66], a
ld hl, wOTTrademonSenderName
@@ -165,13 +176,13 @@ RunTradeAnimScript: ; 28fa1
ld de, vTiles2 tile $31
call Decompress
ld hl, TradeArrowGFX
- ld de, vTiles1 tile $6d
- ld bc, $10
+ ld de, vTiles0 tile TRADEANIM_RIGHT_ARROW
+ ld bc, 1 tiles
ld a, BANK(TradeArrowGFX)
call FarCopyBytes
- ld hl, TradeArrowGFX + $10
- ld de, vTiles1 tile $6e
- ld bc, $10
+ ld hl, TradeArrowGFX + 1 tiles
+ ld de, vTiles0 tile TRADEANIM_LEFT_ARROW
+ ld bc, 1 tiles
ld a, BANK(TradeArrowGFX)
call FarCopyBytes
xor a
@@ -317,7 +328,7 @@ TradeAnim_End: ; 29123
; 29129
TradeAnim_TubeToOT1: ; 29129
- ld a, $ed ; >>>>>>>>
+ ld a, TRADEANIM_RIGHT_ARROW
call TradeAnim_PlaceTrademonStatsOnTubeAnim
ld a, [wLinkTradeSendmonSpecies]
ld [wd265], a
@@ -327,11 +338,11 @@ TradeAnim_TubeToOT1: ; 29129
jr TradeAnim_InitTubeAnim
TradeAnim_TubeToPlayer1: ; 2913c
- ld a, $ee ; <<<<<<<<
+ ld a, TRADEANIM_LEFT_ARROW
call TradeAnim_PlaceTrademonStatsOnTubeAnim
ld a, [wLinkTradeGetmonSpecies]
ld [wd265], a
- ld a, $2
+ ld a, TRADEANIMSTATE_2
depixel 9, 18, 4, 4
ld b, $4
TradeAnim_InitTubeAnim: ; 2914e
@@ -387,8 +398,8 @@ TradeAnim_InitTubeAnim: ; 2914e
call DmgToCgbObjPal0
call TradeAnim_IncrementJumptableIndex
- ld a, $5c
- ld [wcf64], a
+ ld a, 92
+ ld [wFrameCounter], a
ret
; 291af
@@ -400,7 +411,7 @@ TradeAnim_TubeToOT2: ; 291af
ld [hSCX], a
cp $50
ret nz
- ld a, $1
+ ld a, TRADEANIMSTATE_1
call TradeAnim_TubeAnimJumptable
call TradeAnim_IncrementJumptableIndex
ret
@@ -414,7 +425,7 @@ TradeAnim_TubeToOT3: ; 291c4
ld [hSCX], a
cp $a0
ret nz
- ld a, $2
+ ld a, TRADEANIMSTATE_2
call TradeAnim_TubeAnimJumptable
call TradeAnim_IncrementJumptableIndex
ret
@@ -440,7 +451,7 @@ TradeAnim_TubeToPlayer3: ; 291e8
ld [hSCX], a
cp $b0
ret nz
- ld a, $1
+ ld a, TRADEANIMSTATE_1
call TradeAnim_TubeAnimJumptable
call TradeAnim_IncrementJumptableIndex
ret
@@ -454,7 +465,7 @@ TradeAnim_TubeToPlayer4: ; 291fd
ld [hSCX], a
cp $60
ret nz
- xor a
+ xor a ; TRADEANIMSTATE_0
call TradeAnim_TubeAnimJumptable
call TradeAnim_IncrementJumptableIndex
ret
@@ -475,8 +486,8 @@ TradeAnim_TubeToPlayer5: ; 29211
TradeAnim_TubeToOT6:
TradeAnim_TubeToPlayer6: ; 29220
- ld a, $80
- ld [wcf64], a
+ ld a, 128
+ ld [wFrameCounter], a
call TradeAnim_IncrementJumptableIndex
ret
@@ -511,7 +522,7 @@ TradeAnim_TubeToOT7:
TradeAnim_TubeToPlayer2:
TradeAnim_TubeToPlayer7: ; 2925d
call TradeAnim_FlashBGPals
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .done
@@ -541,7 +552,7 @@ TradeAnim_GetTrademonSFX: ; 29277
; 29281
TradeAnim_TubeAnimJumptable: ; 29281
- and 3
+ maskbits TRADEANIMJUMPTABLE_LENGTH +- 1
ld e, a
ld d, 0
ld hl, .Jumptable
@@ -554,6 +565,7 @@ TradeAnim_TubeAnimJumptable: ; 29281
; 2928f
.Jumptable: ; 2928f
+; entries correspond to TRADEANIMSTATE_* constants
dw .Zero
dw .One
dw .Two
@@ -871,13 +883,13 @@ TradeAnim_AnimateFrontpic: ; 29487
TradeAnim_GetFrontpic: ; 29491
push de
push af
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop af
ld [CurPartySpecies], a
ld [CurSpecies], a
call GetBaseData
pop de
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ret
; 294a9
@@ -911,7 +923,7 @@ TradeAnim_ShowFrontpic: ; 294c3
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call WaitBGMap
ret
@@ -1114,8 +1126,8 @@ TradeAnim_RockingBall: ; 2961b
ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL
call _InitSpriteAnimStruct
call TradeAnim_AdvanceScriptPointer
- ld a, $20
- ld [wcf64], a
+ ld a, 32
+ ld [wFrameCounter], a
ret
; 2962c
@@ -1131,8 +1143,8 @@ TradeAnim_DropBall: ; 2962c
add hl, bc
ld [hl], $dc
call TradeAnim_AdvanceScriptPointer
- ld a, $38
- ld [wcf64], a
+ ld a, 56
+ ld [wFrameCounter], a
ret
; 29649
@@ -1142,8 +1154,8 @@ TradeAnim_Poof: ; 29649
ld a, SPRITE_ANIM_INDEX_TRADE_POOF
call _InitSpriteAnimStruct
call TradeAnim_AdvanceScriptPointer
- ld a, $10
- ld [wcf64], a
+ ld a, 16
+ ld [wFrameCounter], a
ld de, SFX_BALL_POOF
call PlaySFX
ret
@@ -1157,8 +1169,8 @@ TradeAnim_BulgeThroughTube: ; 29660
ld a, SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE
call _InitSpriteAnimStruct
call TradeAnim_AdvanceScriptPointer
- ld a, $40
- ld [wcf64], a
+ ld a, 64
+ ld [wFrameCounter], a
ret
; 29676
@@ -1500,15 +1512,15 @@ LoadTradeBallAndCableGFX: ; 2982b
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0 tile $62
- lb bc, BANK(TradeBallGFX), $6
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $68
- lb bc, BANK(TradePoofGFX), $c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
ld de, TradeCableGFX
ld hl, vTiles0 tile $74
- lb bc, BANK(TradeCableGFX), $4
+ lb bc, BANK(TradeCableGFX), 4
call Request2bpp
xor a
ld hl, wSpriteAnimDict
@@ -1524,7 +1536,7 @@ LoadTradeBubbleGFX: ; 2985a
callfar LoadMenuMonIcon
ld de, TradeBubbleGFX
ld hl, vTiles0 tile $72
- lb bc, BANK(TradeBubbleGFX), $4
+ lb bc, BANK(TradeBubbleGFX), 4
call Request2bpp
xor a
ld hl, wSpriteAnimDict
@@ -1535,7 +1547,7 @@ LoadTradeBubbleGFX: ; 2985a
; 29879
TradeAnim_WaitAnim: ; 29879
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .done
@@ -1549,7 +1561,7 @@ TradeAnim_WaitAnim: ; 29879
; 29886
TradeAnim_WaitAnim2: ; 29886
- ld hl, wcf64
+ ld hl, wFrameCounter
ld a, [hl]
and a
jr z, .done
@@ -1563,8 +1575,8 @@ TradeAnim_WaitAnim2: ; 29886
; 29893
-DebugTrade: ; 29893
-; This function is unreferenced.
+Unreferenced_DebugTrade: ; 29893
+; This function is not referenced.
; It was meant for use in Japanese versions, so the
; constant used for copy length was changed by accident.
diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm
index 87cab0103..c80553ecd 100755
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -1,3 +1,13 @@
+; TrainerCard.Jumptable indexes
+ const_def
+ const TRAINERCARDSTATE_PAGE1_LOADGFX ; 0
+ const TRAINERCARDSTATE_PAGE1_JOYPAD ; 1
+ const TRAINERCARDSTATE_PAGE2_LOADGFX ; 2
+ const TRAINERCARDSTATE_PAGE2_JOYPAD ; 3
+ const TRAINERCARDSTATE_PAGE3_LOADGFX ; 4
+ const TRAINERCARDSTATE_PAGE3_JOYPAD ; 5
+ const TRAINERCARDSTATE_QUIT ; 6
+
TrainerCard: ; 25105
ld a, [VramState]
push af
@@ -6,7 +16,7 @@ TrainerCard: ; 25105
ld hl, Options
ld a, [hl]
push af
- set 4, [hl]
+ set NO_TEXT_SCROLL, [hl]
call .InitRAM
.loop
call UpdateTime
@@ -61,17 +71,18 @@ TrainerCard: ; 25105
call SetPalettes
call WaitBGMap
ld hl, wJumptableIndex
- xor a
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
+ xor a ; TRAINERCARDSTATE_PAGE1_LOADGFX
+ ld [hli], a ; wJumptableIndex
+ ld [hli], a ; wTrainerCardBadgeFrameCounter
+ ld [hli], a ; wTrainerCardBadgeTileID
+ ld [hl], a ; wTrainerCardBadgeAttributes
ret
.RunJumptable: ; 2518e (9:518e)
jumptable .Jumptable, wJumptableIndex
.Jumptable: ; 2519d (9:519d)
+; entries correspond to TRAINERCARDSTATE_* constants
dw TrainerCard_Page1_LoadGFX
dw TrainerCard_Page1_Joypad
dw TrainerCard_Page2_LoadGFX
@@ -113,16 +124,15 @@ TrainerCard_Page1_Joypad: ; 251d7 (9:51d7)
ret
.pressed_right_a
- ld a, $2
+ ld a, TRAINERCARDSTATE_PAGE2_LOADGFX
ld [wJumptableIndex], a
ret
-.KantoCheck:
-; unreferenced
+.Unreferenced_KantoCheck:
ld a, [wKantoBadges]
and a
ret z
- ld a, $4
+ ld a, TRAINERCARDSTATE_PAGE3_LOADGFX
ld [wJumptableIndex], a
ret
@@ -136,11 +146,11 @@ TrainerCard_Page2_LoadGFX: ; 251f4 (9:51f4)
call WaitBGMap
ld de, LeaderGFX
ld hl, vTiles2 tile $29
- lb bc, BANK(LeaderGFX), $56
+ lb bc, BANK(LeaderGFX), 86
call Request2bpp
ld de, BadgeGFX
ld hl, vTiles0 tile $00
- lb bc, BANK(BadgeGFX), $2c
+ lb bc, BANK(BadgeGFX), 44
call Request2bpp
call TrainerCard_Page2_3_InitObjectsAndStrings
call TrainerCard_IncrementJumptable
@@ -159,21 +169,20 @@ TrainerCard_Page2_Joypad: ; 25221 (9:5221)
ret
.d_left
- ld a, $0
+ ld a, TRAINERCARDSTATE_PAGE1_LOADGFX
ld [wJumptableIndex], a
ret
-.KantoCheck:
-; unreferenced
+.Unreferenced_KantoCheck:
ld a, [wKantoBadges]
and a
ret z
- ld a, $4
+ ld a, TRAINERCARDSTATE_PAGE3_LOADGFX
ld [wJumptableIndex], a
ret
.Quit:
- ld a, $6
+ ld a, TRAINERCARDSTATE_QUIT
ld [wJumptableIndex], a
ret
@@ -185,11 +194,11 @@ TrainerCard_Page3_LoadGFX: ; 2524c (9:524c)
call WaitBGMap
ld de, LeaderGFX2
ld hl, vTiles2 tile $29
- lb bc, BANK(LeaderGFX2), $56
+ lb bc, BANK(LeaderGFX2), 86
call Request2bpp
ld de, BadgeGFX2
ld hl, vTiles0 tile $00
- lb bc, BANK(BadgeGFX2), $2c
+ lb bc, BANK(BadgeGFX2), 44
call Request2bpp
call TrainerCard_Page2_3_InitObjectsAndStrings
call TrainerCard_IncrementJumptable
@@ -208,12 +217,12 @@ TrainerCard_Page3_Joypad: ; 25279 (9:5279)
ret
.left
- ld a, $2
+ ld a, TRAINERCARDSTATE_PAGE2_LOADGFX
ld [wJumptableIndex], a
ret
.right
- ld a, $0
+ ld a, TRAINERCARDSTATE_PAGE1_LOADGFX
ld [wJumptableIndex], a
ret
@@ -245,7 +254,7 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299)
lb bc, 5, 7
xor a
ld [hGraphicStartTile], a
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
ret
; 252ec (9:52ec)
@@ -256,10 +265,10 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299)
next "MONEY@"
.ID_No: ; 252f9
- db $27, $28, $ff ; ID NO
+ db $27, $28, -1 ; ID NO
.HorizontalDivider: ; 252fc
- db $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $26, $ff ; ____________>
+ db $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $26, -1 ; ____________>
; 2530a
TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a)
@@ -281,7 +290,7 @@ TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a)
ld de, .StatusTilemap
call TrainerCardSetup_PlaceTilemapString
ld a, [wStatusFlags]
- bit 0, a
+ bit 0, a ; ENGINE_POKEDEX
ret nz
hlcoord 1, 9
lb bc, 2, 17
@@ -296,7 +305,7 @@ TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a)
db " BADGES▶@"
.StatusTilemap: ; 25366
- db $29, $2a, $2b, $2c, $2d, $ff
+ db $29, $2a, $2b, $2c, $2d, -1
; 2536c
TrainerCard_Page2_3_InitObjectsAndStrings: ; 2536c (9:536c)
@@ -324,7 +333,7 @@ endr
dec c
jr nz, .loop2
xor a
- ld [wcf64], a
+ ld [wTrainerCardBadgeFrameCounter], a
ld hl, TrainerCard_JohtoBadgesOAM
call TrainerCard_Page2_3_OAMUpdate
ret
@@ -332,20 +341,20 @@ endr
; 253a2 (9:53a2)
.BadgesTilemap: ; 253a2
- db $79, $7a, $7b, $7c, $7d, $ff ; "BADGES"
+ db $79, $7a, $7b, $7c, $7d, -1 ; "BADGES"
; 253a8
TrainerCardSetup_PlaceTilemapString: ; 253a8 (9:53a8)
.loop
ld a, [de]
- cp $ff
+ cp -1
ret z
ld [hli], a
inc de
jr .loop
TrainerCard_InitBorder: ; 253b0 (9:53b0)
- ld e, 20
+ ld e, SCREEN_WIDTH
.loop1
ld a, $23
ld [hli], a
@@ -354,7 +363,7 @@ TrainerCard_InitBorder: ; 253b0 (9:53b0)
ld a, $23
ld [hli], a
- ld e, 17
+ ld e, SCREEN_HEIGHT - 1
ld a, " "
.loop2
ld [hli], a
@@ -369,7 +378,7 @@ TrainerCard_InitBorder: ; 253b0 (9:53b0)
ld a, $23
ld [hli], a
- ld e, 18
+ ld e, SCREEN_HEIGHT
ld a, " "
.loop4
ld [hli], a
@@ -386,7 +395,7 @@ TrainerCard_InitBorder: ; 253b0 (9:53b0)
ld a, $24
ld [hli], a
- ld e, 17
+ ld e, SCREEN_HEIGHT - 1
ld a, " "
.loop5
ld [hli], a
@@ -394,7 +403,7 @@ TrainerCard_InitBorder: ; 253b0 (9:53b0)
jr nz, .loop5
ld a, $23
ld [hli], a
- ld e, 20
+ ld e, SCREEN_WIDTH
.loop6
ld a, $23
ld [hli], a
@@ -453,12 +462,12 @@ TrainerCard_Page1_PrintGameTime: ; 25415 (9:5415)
TrainerCard_Page2_3_AnimateBadges: ; 25438 (9:5438)
ld a, [hVBlankCounter]
- and $7
+ and %111
ret nz
- ld a, [wcf64]
+ ld a, [wTrainerCardBadgeFrameCounter]
inc a
- and $7
- ld [wcf64], a
+ and %111
+ ld [wTrainerCardBadgeFrameCounter], a
jr TrainerCard_Page2_3_OAMUpdate
TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448)
@@ -470,8 +479,8 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448)
ld d, a
ld a, [de]
ld c, a
- ld de, Sprites
- ld b, 8
+ ld de, Sprite01
+ ld b, NUM_JOHTO_BADGES
.loop
srl c
push bc
@@ -482,15 +491,15 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448)
ld a, [hli] ; x
ld c, a
ld a, [hli] ; pal
- ld [wcf66], a
- ld a, [wcf64]
+ ld [wTrainerCardBadgeAttributes], a
+ ld a, [wTrainerCardBadgeFrameCounter]
add l
ld l, a
ld a, 0
adc h
ld h, a
ld a, [hl]
- ld [wcf65], a
+ ld [wTrainerCardBadgeTileID], a
call .PrepOAM
pop hl
.skip_badge
@@ -502,8 +511,8 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448)
ret
.PrepOAM: ; 2547b (9:547b)
- ld a, [wcf65]
- and $80
+ ld a, [wTrainerCardBadgeTileID]
+ and 1 << 7
jr nz, .xflip
ld hl, .facing1
jr .loop2
@@ -512,27 +521,27 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448)
ld hl, .facing2
.loop2
ld a, [hli]
- cp $ff
+ cp -1
ret z
add b
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add c
- ld [de], a
+ ld [de], a ; x
inc de
- ld a, [wcf65]
- and $7f
+ ld a, [wTrainerCardBadgeTileID]
+ and $ff ^ (1 << 7)
add [hl]
- ld [de], a
+ ld [de], a ; tile id
inc hl
inc de
- ld a, [wcf66]
+ ld a, [wTrainerCardBadgeAttributes]
add [hl]
- ld [de], a
+ ld [de], a ; attributes
inc hl
inc de
jr .loop2
@@ -540,18 +549,17 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448)
; 254a7 (9:54a7)
.facing1 ; 254a7
- ; y, x, tile, OAM attributes
- db 0, 0, 0, 0
- db 0, 8, 1, 0
- db 8, 0, 2, 0
- db 8, 8, 3, 0
+ dsprite 0, 0, 0, 0, $00, 0
+ dsprite 0, 0, 1, 0, $01, 0
+ dsprite 1, 0, 0, 0, $02, 0
+ dsprite 1, 0, 1, 0, $03, 0
db -1
.facing2 ; 254b8
- db 0, 0, 1, X_FLIP
- db 0, 8, 0, X_FLIP
- db 8, 0, 3, X_FLIP
- db 8, 8, 2, X_FLIP
+ dsprite 0, 0, 0, 0, $01, 0 | X_FLIP
+ dsprite 0, 0, 1, 0, $00, 0 | X_FLIP
+ dsprite 1, 0, 0, 0, $03, 0 | X_FLIP
+ dsprite 1, 0, 1, 0, $02, 0 | X_FLIP
db -1
TrainerCard_JohtoBadgesOAM: ; 254c9
@@ -565,44 +573,44 @@ TrainerCard_JohtoBadgesOAM: ; 254c9
; Zephyrbadge
db $68, $18, 0
- db $00, $20, $24, $20 | $80
- db $00, $20, $24, $20 | $80
+ db $00, $20, $24, $20 | (1 << 7)
+ db $00, $20, $24, $20 | (1 << 7)
; Hivebadge
db $68, $38, 0
- db $04, $20, $24, $20 | $80
- db $04, $20, $24, $20 | $80
+ db $04, $20, $24, $20 | (1 << 7)
+ db $04, $20, $24, $20 | (1 << 7)
; Plainbadge
db $68, $58, 0
- db $08, $20, $24, $20 | $80
- db $08, $20, $24, $20 | $80
+ db $08, $20, $24, $20 | (1 << 7)
+ db $08, $20, $24, $20 | (1 << 7)
; Fogbadge
db $68, $78, 0
- db $0c, $20, $24, $20 | $80
- db $0c, $20, $24, $20 | $80
+ db $0c, $20, $24, $20 | (1 << 7)
+ db $0c, $20, $24, $20 | (1 << 7)
; Mineralbadge
db $80, $38, 0
- db $10, $20, $24, $20 | $80
- db $10, $20, $24, $20 | $80
+ db $10, $20, $24, $20 | (1 << 7)
+ db $10, $20, $24, $20 | (1 << 7)
; Stormbadge
db $80, $18, 0
- db $14, $20, $24, $20 | $80
- db $14, $20, $24, $20 | $80
+ db $14, $20, $24, $20 | (1 << 7)
+ db $14, $20, $24, $20 | (1 << 7)
; Glacierbadge
db $80, $58, 0
- db $18, $20, $24, $20 | $80
- db $18, $20, $24, $20 | $80
+ db $18, $20, $24, $20 | (1 << 7)
+ db $18, $20, $24, $20 | (1 << 7)
; Risingbadge
; X-flips on alternate cycles.
db $80, $78, 0
- db $1c, $20, $24, $20 | $80
- db $1c | $80, $20, $24, $20 | $80
+ db $1c, $20, $24, $20 | (1 << 7)
+ db $1c | (1 << 7), $20, $24, $20 | (1 << 7)
; 25523
CardStatusGFX: INCBIN "gfx/trainer_card/card_status.2bpp"
diff --git a/engine/types.asm b/engine/types.asm
index 375bfe434..0cd52eda7 100644
--- a/engine/types.asm
+++ b/engine/types.asm
@@ -1,4 +1,4 @@
-PrintMonTypes: ; 5090d
+Predef_PrintMonTypes: ; 5090d
; Print one or both types of [CurSpecies]
; on the stats screen at hl.
@@ -24,7 +24,7 @@ PrintMonTypes: ; 5090d
.Print:
ld b, a
- jr PrintType
+ jr Predef_PrintType
.hide_type_2
; Erase any type name that was here before.
@@ -40,7 +40,7 @@ PrintMonTypes: ; 5090d
; 5093a
-PrintMoveType: ; 5093a
+Predef_PrintMoveType: ; 5093a
; Print the type of move b at hl.
push hl
@@ -58,7 +58,7 @@ PrintMoveType: ; 5093a
ld b, a
-PrintType: ; 50953
+Predef_PrintType: ; 50953
; Print type b at hl.
ld a, b
@@ -78,7 +78,7 @@ PrintType: ; 50953
; 50964
-GetTypeName: ; 50964
+Predef_GetTypeName: ; 50964
; Copy the name of type [wd265] to StringBuffer1.
ld a, [wd265]
@@ -96,6 +96,4 @@ GetTypeName: ; 50964
; 5097b
-INCLUDE "data/type_names.asm"
-
-; 50a28
+INCLUDE "data/types/names.asm"
diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm
index ee76f817c..429bfaefd 100755
--- a/engine/unown_puzzle.asm
+++ b/engine/unown_puzzle.asm
@@ -157,7 +157,7 @@ PlaceStartCancelBoxBorder: ; e128d
ld a, $f3
ld [hli], a
ld bc, 10
- ld a, $ef
+ ld a, PUZZLE_VOID
call ByteFill
hlcoord 15, 16
ld a, $f3
@@ -218,7 +218,7 @@ UnownPuzzleJumptable: ; e12ca
ld a, [hl]
cp 1 puzcoord 0
ret c
- sub $6
+ sub 6
ld [hl], a
jr .done_joypad
@@ -235,7 +235,7 @@ UnownPuzzleJumptable: ; e12ca
ret z
cp 5 puzcoord 0
ret nc
- add $6
+ add 6
ld [hl], a
jr .done_joypad
@@ -549,51 +549,51 @@ RedrawUnownPuzzlePieces: ; e14d9
ld hl, .OAM_NotHoldingPiece
.load
- ld de, Sprites
+ ld de, Sprite01
.loop
ld a, [hli]
cp -1
ret z
add b
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add c
- ld [de], a
+ ld [de], a ; x
inc de
ld a, [wd002]
add [hl]
- ld [de], a
+ ld [de], a ; tile id
inc hl
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; attributes
inc de
jr .loop
; e150f
.OAM_HoldingPiece: ; e150f
- dsprite -1, -4, -1, -4, $00, $00
- dsprite -1, -4, 0, -4, $01, $00
- dsprite -1, -4, 0, 4, $02, $00
- dsprite 0, -4, -1, -4, $0c, $00
- dsprite 0, -4, 0, -4, $0d, $00
- dsprite 0, -4, 0, 4, $0e, $00
- dsprite 0, 4, -1, -4, $18, $00
- dsprite 0, 4, 0, -4, $19, $00
- dsprite 0, 4, 0, 4, $1a, $00
+ dsprite -1, -4, -1, -4, $00, 0
+ dsprite -1, -4, 0, -4, $01, 0
+ dsprite -1, -4, 0, 4, $02, 0
+ dsprite 0, -4, -1, -4, $0c, 0
+ dsprite 0, -4, 0, -4, $0d, 0
+ dsprite 0, -4, 0, 4, $0e, 0
+ dsprite 0, 4, -1, -4, $18, 0
+ dsprite 0, 4, 0, -4, $19, 0
+ dsprite 0, 4, 0, 4, $1a, 0
db -1
.OAM_NotHoldingPiece: ; e1534
- dsprite -1, -4, -1, -4, $00, $00
- dsprite -1, -4, 0, -4, $01, $00
- dsprite -1, -4, 0, 4, $00, $20 ; xflip
- dsprite 0, -4, -1, -4, $02, $00
- dsprite 0, -4, 0, -4, $03, $00
- dsprite 0, -4, 0, 4, $02, $20 ; xflip
- dsprite 0, 4, -1, -4, $00, $40 ; yflip
- dsprite 0, 4, 0, -4, $01, $40 ; yflip
- dsprite 0, 4, 0, 4, $00, $60 ; xflip, yflip
+ dsprite -1, -4, -1, -4, $00, 0
+ dsprite -1, -4, 0, -4, $01, 0
+ dsprite -1, -4, 0, 4, $00, 0 | X_FLIP
+ dsprite 0, -4, -1, -4, $02, 0
+ dsprite 0, -4, 0, -4, $03, 0
+ dsprite 0, -4, 0, 4, $02, 0 | X_FLIP
+ dsprite 0, 4, -1, -4, $00, 0 | Y_FLIP
+ dsprite 0, 4, 0, -4, $01, 0 | Y_FLIP
+ dsprite 0, 4, 0, 4, $00, 0 | X_FLIP | Y_FLIP
db -1
UnownPuzzleCoordData: ; e1559
@@ -835,7 +835,7 @@ INCBIN "gfx/unown_puzzle/tile_borders.2bpp"
LoadUnownPuzzlePiecesGFX: ; e17a3
ld a, [ScriptVar]
- and 3
+ maskbits NUM_UNOWN_PUZZLES +- 1
ld e, a
ld d, 0
ld hl, .LZPointers
@@ -851,6 +851,7 @@ LoadUnownPuzzlePiecesGFX: ; e17a3
; e17bd
.LZPointers: ; e17bd
+; entries correspond to UNOWNPUZZLE_* constants
dw KabutoPuzzleLZ
dw OmanytePuzzleLZ
dw AerodactylPuzzleLZ
diff --git a/engine/unused_title.asm b/engine/unused_title.asm
index 5af468e2a..516fc902e 100644
--- a/engine/unused_title.asm
+++ b/engine/unused_title.asm
@@ -32,7 +32,7 @@ UnusedTitleScreen: ; 10c000
ld hl, UnusedTitleBG_Tilemap
debgcoord 0, 0
- ld bc, 32 * 32
+ ld bc, BG_MAP_WIDTH * BG_MAP_HEIGHT
.copy
ld a, 0
ld [rVBK], a
@@ -49,8 +49,8 @@ UnusedTitleScreen: ; 10c000
jr nz, .copy
ld hl, UnusedTitleFG_OAM
- ld de, Sprites
- ld bc, $a0
+ ld de, Sprite01
+ ld bc, SPRITEOAMSTRUCT_LENGTH * NUM_SPRITE_OAM_STRUCTS
call CopyBytes
call EnableLCD
@@ -103,60 +103,12 @@ INCBIN "gfx/title/old_bg.2bpp"
; 10d0b1
UnusedTitleBG_Tilemap: ; 10d0b1
-; 32x32 (tile, attributes)
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $01,$00, $02,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $03,$00, $04,$00, $05,$01, $06,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $07,$05, $08,$05, $09,$05, $0a,$05, $0b,$00, $0c,$00, $0d,$00, $0e,$00, $0f,$01, $10,$01, $11,$01, $12,$01, $13,$05, $14,$05, $15,$05, $16,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $17,$04, $18,$04, $19,$04, $1a,$04, $1b,$00, $1c,$00, $1d,$02, $1e,$02, $1f,$07, $20,$07, $21,$01, $22,$01, $23,$04, $24,$04, $25,$04, $26,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $27,$04, $28,$04, $29,$04, $2a,$04, $2b,$00, $2c,$00, $2d,$03, $2e,$01, $2f,$01, $30,$01, $31,$01, $32,$01, $33,$04, $34,$04, $35,$04, $36,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $37,$04, $38,$04, $39,$04, $3a,$04, $3b,$00, $3c,$00, $3d,$01, $00,$00, $00,$00, $3e,$07, $3f,$01, $40,$01, $41,$04, $42,$04, $43,$04, $44,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $45,$04, $46,$04, $47,$04, $48,$04, $49,$00, $3c,$00, $4a,$01, $00,$00, $00,$00, $4b,$07, $3f,$01, $4c,$01, $4d,$06, $4e,$06, $4f,$06, $50,$06, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $51,$04, $52,$06, $53,$06, $54,$06, $55,$00, $3c,$00, $56,$01, $00,$00, $00,$00, $57,$07, $58,$01, $59,$01, $5a,$06, $5b,$06, $5c,$06, $5d,$06, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $5e,$06, $5f,$06, $60,$06, $61,$06, $62,$00, $63,$00, $64,$03, $65,$01, $66,$01, $67,$07, $68,$01, $69,$01, $26,$04, $6a,$06, $26,$04, $26,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $6b,$00, $6c,$05, $6d,$05, $6e,$05, $6f,$00, $70,$02, $71,$02, $72,$01, $73,$00, $74,$02, $75,$01, $76,$01, $77,$05, $78,$05, $79,$05, $6b,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $7a,$00, $7b,$00, $7c,$00, $7d,$00, $0f,$01, $7e,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $a2,$00, $80,$00, $81,$00, $82,$00, $83,$00, $84,$07, $85,$01, $86,$01, $87,$01, $88,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $89,$00, $8a,$00, $8b,$00, $8c,$07, $8d,$01, $8e,$01, $8f,$01, $90,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $91,$01, $92,$01, $93,$01, $94,$01, $95,$01, $00,$00, $00,$00, $00,$00, $96,$05, $97,$05, $98,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $99,$05, $9a,$05, $9b,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $9c,$05, $9d,$05, $9e,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $9f,$05, $a0,$05, $a1,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $6b,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+; 32x32 (alternating tiles and attributes)
+INCBIN "gfx/title/old_bg.tilemap"
; 10d8b1
UnusedTitleBG_Palettes: ; 10d8b1
-INCLUDE "data/palettes/unused_title/bg.pal"
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 20, 04, 20
- RGB 16, 08, 16
- RGB 24, 00, 24
-
-rept 54
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-endr
+INCLUDE "gfx/title/old_bg.pal"
; 10dab1
UnusedTitleFG_GFX: ; 10dab1
@@ -164,27 +116,52 @@ INCBIN "gfx/title/old_fg.2bpp"
; 10eab1
UnusedTitleFG_Palettes: ; 10eab1
-INCLUDE "data/palettes/unused_title/ob.pal"
+INCLUDE "gfx/title/old_fg.pal"
; 10ecb1
UnusedTitleFG_OAM: ; 10ecb1
- db $18, $38, $00, $01, $18, $40, $02, $01, $18, $48, $04, $01, $18, $50, $06, $01
- db $18, $58, $08, $01, $18, $60, $0a, $01, $18, $68, $0c, $01, $18, $70, $0e, $01
-
- db $28, $38, $10, $00, $28, $40, $12, $00, $28, $48, $14, $00, $28, $50, $16, $00
- db $28, $58, $18, $00, $28, $60, $1a, $00, $28, $68, $1c, $00, $28, $70, $1e, $00
-
- db $38, $38, $20, $00, $38, $40, $22, $00, $38, $48, $24, $00, $38, $50, $26, $00
- db $38, $58, $28, $00, $38, $60, $2a, $00, $38, $68, $2c, $00, $38, $70, $2e, $00
-
- db $48, $38, $30, $02, $48, $40, $32, $02, $48, $48, $34, $02, $48, $50, $36, $02
- db $48, $58, $38, $02, $48, $60, $3a, $02, $48, $68, $3c, $02, $48, $70, $3e, $02
-
- db $58, $38, $40, $01, $58, $40, $42, $01, $58, $48, $44, $01, $58, $50, $46, $01
- db $58, $58, $48, $01, $58, $60, $4a, $01, $58, $68, $4c, $01, $58, $70, $4e, $01
+ dsprite 3, 0, 7, 0, $00, 1
+ dsprite 3, 0, 8, 0, $02, 1
+ dsprite 3, 0, 9, 0, $04, 1
+ dsprite 3, 0, 10, 0, $06, 1
+ dsprite 3, 0, 11, 0, $08, 1
+ dsprite 3, 0, 12, 0, $0a, 1
+ dsprite 3, 0, 13, 0, $0c, 1
+ dsprite 3, 0, 14, 0, $0e, 1
+ dsprite 5, 0, 7, 0, $10, 0
+ dsprite 5, 0, 8, 0, $12, 0
+ dsprite 5, 0, 9, 0, $14, 0
+ dsprite 5, 0, 10, 0, $16, 0
+ dsprite 5, 0, 11, 0, $18, 0
+ dsprite 5, 0, 12, 0, $1a, 0
+ dsprite 5, 0, 13, 0, $1c, 0
+ dsprite 5, 0, 14, 0, $1e, 0
+ dsprite 7, 0, 7, 0, $20, 0
+ dsprite 7, 0, 8, 0, $22, 0
+ dsprite 7, 0, 9, 0, $24, 0
+ dsprite 7, 0, 10, 0, $26, 0
+ dsprite 7, 0, 11, 0, $28, 0
+ dsprite 7, 0, 12, 0, $2a, 0
+ dsprite 7, 0, 13, 0, $2c, 0
+ dsprite 7, 0, 14, 0, $2e, 0
+ dsprite 9, 0, 7, 0, $30, 2
+ dsprite 9, 0, 8, 0, $32, 2
+ dsprite 9, 0, 9, 0, $34, 2
+ dsprite 9, 0, 10, 0, $36, 2
+ dsprite 9, 0, 11, 0, $38, 2
+ dsprite 9, 0, 12, 0, $3a, 2
+ dsprite 9, 0, 13, 0, $3c, 2
+ dsprite 9, 0, 14, 0, $3e, 2
+ dsprite 11, 0, 7, 0, $40, 1
+ dsprite 11, 0, 8, 0, $42, 1
+ dsprite 11, 0, 9, 0, $44, 1
+ dsprite 11, 0, 10, 0, $46, 1
+ dsprite 11, 0, 11, 0, $48, 1
+ dsprite 11, 0, 12, 0, $4a, 1
+ dsprite 11, 0, 13, 0, $4c, 1
+ dsprite 11, 0, 14, 0, $4e, 1
; 10ed51
-
Function10ed51: ; 10ed51
call _TitleScreen
.loop
diff --git a/engine/variables.asm b/engine/variables.asm
index 1b418ea3c..56c49f085 100755
--- a/engine/variables.asm
+++ b/engine/variables.asm
@@ -35,9 +35,10 @@ _GetVarAction:: ; 80648 (20:4648)
; 80671 (20:4671)
.VarActionTable: ; 80671
-; RETVAR_STRBUF2: copy [de] to StringBuffer2
-; RETVAR_ADDR_DE: return address in de
-; RETVAR_EXECUTE: call function
+; entries correspond to VAR_* constants
+ ; RETVAR_STRBUF2: copy [de] to StringBuffer2
+ ; RETVAR_ADDR_DE: return address in de
+ ; RETVAR_EXECUTE: call function
dwb StringBuffer2, RETVAR_STRBUF2
dwb PartyCount, RETVAR_STRBUF2
dwb .BattleResult, RETVAR_EXECUTE
@@ -125,7 +126,7 @@ _GetVarAction:: ; 80648 (20:4648)
ret z
inc b
ld a, b
- cp 26
+ cp NUM_UNOWN
jr c, .loop
ret
; 80715
diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm
index a0784caac..28908e793 100755
--- a/engine/warp_connection.asm
+++ b/engine/warp_connection.asm
@@ -174,8 +174,11 @@ LoadWarpData: ; 1046c6
call GetAnyMapEnvironment
call CheckIndoorMap
ret nz
+
+; MOUNT_MOON_SQUARE and TIN_TOWER_ROOF are outdoor maps within indoor maps.
+; Dig and Escape Rope should not take you to them.
ld a, [wPrevMapGroup]
- cp GROUP_MOUNT_MOON_SQUARE
+ cp GROUP_MOUNT_MOON_SQUARE ; GROUP_TIN_TOWER_ROOF
jr nz, .not_mt_moon_or_tin_tower
ld a, [wPrevMapNumber]
cp MAP_MOUNT_MOON_SQUARE
@@ -183,6 +186,7 @@ LoadWarpData: ; 1046c6
cp MAP_TIN_TOWER_ROOF
ret z
.not_mt_moon_or_tin_tower
+
ld a, [wPrevWarp]
ld [wDigWarpNumber], a
ld a, [wPrevMapGroup]
@@ -206,6 +210,8 @@ LoadWarpData: ; 1046c6
ld b, a
ld a, [wNextMapNumber]
ld c, a
+
+; Respawn in Pokémon Centers.
call GetAnyMapTileset
ld a, c
cp TILESET_POKECENTER
@@ -214,6 +220,7 @@ LoadWarpData: ; 1046c6
jr z, .pokecenter_pokecom
ret
.pokecenter_pokecom
+
ld a, [wPrevMapGroup]
ld [wLastSpawnMapGroup], a
ld a, [wPrevMapNumber]
@@ -298,12 +305,12 @@ LoadGraphics: ; 1047cf
ld [hMapAnims], a
xor a
ld [hTileAnimFrame], a
- farcall RefreshSprites
+ farcall Special_RefreshSprites
call LoadFontsExtra
farcall LoadOverworldFont
ret
-LoadMapPalettes: ; 1047eb
+Special_LoadMapPalettes: ; 1047eb
ld b, SCGB_MAPPALS
jp GetSGBLayout
; 1047f0
diff --git a/engine/wildmons.asm b/engine/wildmons.asm
index dc62093b8..287ffe6ac 100755
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -508,7 +508,7 @@ LookUpWildmonsForMapDE: ; 2a288
; 2a2a0
-InitRoamMons: ; 2a2a0
+Special_InitRoamMons: ; 2a2a0
; initialize wRoamMon structs
; species
@@ -678,9 +678,9 @@ UpdateRoamMons: ; 2a30d
ld l, e
; Choose which map to warp to.
call Random
- and $1f ; 1/8n chance it moves to a completely random map, where n is the number of roaming connections from the current map.
+ and %00011111 ; 1/8n chance it moves to a completely random map, where n is the number of roaming connections from the current map.
jr z, JumpRoamMon
- and 3
+ and %11
cp [hl]
jr nc, .update_loop ; invalid index, try again
inc hl
@@ -739,10 +739,10 @@ JumpRoamMons: ; 2a394
JumpRoamMon: ; 2a3cd
.loop
ld hl, RoamMaps
-.innerloop1 ; This loop is completely unnecessary.
- call Random ; Choose a random number
- and $f ; Take the lower nybble only. This gives a number between 0 and 15.
- cp $10 ; If the number is greater than or equal to 16, loop back and try again.
+.innerloop1 ; This loop is completely unnecessary.
+ call Random ; Choose a random number.
+ maskbits $10 - 1 ; Mask the number to limit it between 0 and 15.
+ cp $10 ; If the number is not less than 16, try again.
jr nc, .innerloop1 ; I'm sure you can guess why this check is bogus.
inc a
ld b, a
@@ -804,7 +804,7 @@ ValidateTempWildMonSpecies: ; 2a4a0
; Finds a rare wild Pokemon in the route of the trainer calling, then checks if it's been Seen already.
; The trainer will then tell you about the Pokemon if you haven't seen it.
-RandomUnseenWildMon: ; 2a4ab
+Special_RandomUnseenWildMon: ; 2a4ab
farcall GetCallerLocation
ld d, b
ld e, c
@@ -825,7 +825,7 @@ RandomUnseenWildMon: ; 2a4ab
call AddNTimes
.randloop1
call Random
- and $3
+ and %11
jr z, .randloop1
dec a
ld c, a
@@ -877,7 +877,7 @@ RandomUnseenWildMon: ; 2a4ab
db "@"
; 0x2a51f
-RandomPhoneWildMon: ; 2a51f
+Special_RandomPhoneWildMon: ; 2a51f
farcall GetCallerLocation
ld d, b
ld e, c
@@ -902,7 +902,7 @@ RandomPhoneWildMon: ; 2a51f
.done
call Random
- and $3
+ and %11
ld c, a
ld b, $0
add hl, bc
@@ -917,7 +917,7 @@ RandomPhoneWildMon: ; 2a51f
jp CopyBytes
; 2a567
-RandomPhoneMon: ; 2a567
+Special_RandomPhoneMon: ; 2a567
; Get a random monster owned by the trainer who's calling.
farcall GetCallerLocation
ld hl, TrainerGroups
diff --git a/data/palettes/exp_bar.pal b/gfx/battle/exp_bar.pal
index 831bbda95..831bbda95 100644
--- a/data/palettes/exp_bar.pal
+++ b/gfx/battle/exp_bar.pal
diff --git a/data/palettes/hp_bar.pal b/gfx/battle/hp_bar.pal
index 909be8efd..909be8efd 100644
--- a/data/palettes/hp_bar.pal
+++ b/gfx/battle/hp_bar.pal
diff --git a/data/palettes/battle_objects.pal b/gfx/battle_anims/battle_anims.pal
index d2ebb6cef..d2ebb6cef 100644
--- a/data/palettes/battle_objects.pal
+++ b/gfx/battle_anims/battle_anims.pal
diff --git a/data/palettes/card_flip.pal b/gfx/card_flip/card_flip.pal
index 24c5566f8..24c5566f8 100644
--- a/data/palettes/card_flip.pal
+++ b/gfx/card_flip/card_flip.pal
diff --git a/data/palettes/credits.pal b/gfx/credits/credits.pal
index c473f0414..c473f0414 100644
--- a/data/palettes/credits.pal
+++ b/gfx/credits/credits.pal
diff --git a/gfx/credits/pichu.png b/gfx/credits/pichu.png
index 529973d29..1d46ea807 100644
--- a/gfx/credits/pichu.png
+++ b/gfx/credits/pichu.png
Binary files differ
diff --git a/gfx/credits/theend.png b/gfx/credits/theend.png
index 1f10e16df..eaaf393b7 100644
--- a/gfx/credits/theend.png
+++ b/gfx/credits/theend.png
Binary files differ
diff --git a/data/palettes/debug/bg.pal b/gfx/debug/bg.pal
index d0b573598..d0b573598 100644
--- a/data/palettes/debug/bg.pal
+++ b/gfx/debug/bg.pal
diff --git a/data/palettes/debug/ob.pal b/gfx/debug/ob.pal
index 2a03f4e8f..2a03f4e8f 100644
--- a/data/palettes/debug/ob.pal
+++ b/gfx/debug/ob.pal
diff --git a/data/palettes/diploma.pal b/gfx/diploma/diploma.pal
index 2c9ec6453..2c9ec6453 100644
--- a/data/palettes/diploma.pal
+++ b/gfx/diploma/diploma.pal
diff --git a/gfx/fishing.asm b/gfx/fishing.asm
new file mode 100644
index 000000000..f67c51d8b
--- /dev/null
+++ b/gfx/fishing.asm
@@ -0,0 +1,46 @@
+LoadFishingGFX: ; b84b3
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+
+ ld de, FishingGFX
+ ld a, [wPlayerGender]
+ bit 0, a
+ jr z, .got_gender
+ ld de, KrisFishingGFX
+.got_gender
+
+ ld hl, vTiles0 tile $02
+ call .LoadGFX
+ ld hl, vTiles0 tile $06
+ call .LoadGFX
+ ld hl, vTiles0 tile $0a
+ call .LoadGFX
+ ld hl, vTiles1 tile $7c
+ call .LoadGFX
+
+ pop af
+ ld [rVBK], a
+ ret
+; b84e3
+
+.LoadGFX: ; b84e3
+ lb bc, BANK(FishingGFX), 2
+ push de
+ call Get2bpp
+ pop de
+ ld hl, 2 tiles
+ add hl, de
+ ld d, h
+ ld e, l
+ ret
+; b84f2
+
+FishingGFX: ; b84f2
+INCBIN "gfx/overworld/chris_fish.2bpp"
+; b8582
+
+KrisFishingGFX: ; b8582
+INCBIN "gfx/overworld/kris_fish.2bpp"
+; b8612
diff --git a/gfx/font.asm b/gfx/font.asm
index 9da7eaafc..e525df85b 100755
--- a/gfx/font.asm
+++ b/gfx/font.asm
@@ -23,15 +23,6 @@ INCBIN "gfx/frames/9.1bpp"
StatsScreenPageTilesGFX: ; f89b0
INCBIN "gfx/stats/stats_tiles.2bpp"
-; f8a90
-
-ShinyIconGFX: ; f8a90
-; also part of StatsScreenPageTilesGFX
-INCBIN "gfx/stats/shiny.2bpp"
-
-ExpBarEndsGFX: ; f8aa0
-; not referenced on its own, but part of StatsScreenPageTilesGFX
-INCBIN "gfx/stats/exp_bar_ends.2bpp"
; f8ac0
EnemyHPBarBorderGFX: ; f8ac0
@@ -54,8 +45,8 @@ UnusedWeekdayKanjiGFX: ; unused kanji
INCBIN "gfx/font/unused_weekday_kanji.2bpp"
; f8f24
-OverworldPhoneIconGFX: ; f8f24
-INCBIN "gfx/font/overworld_phone_icon.2bpp"
+PokegearPhoneIconGFX: ; f8f24
+INCBIN "gfx/font/phone_icon.2bpp"
; f8f34
UnusedBoldFontGFX: ; unused bold letters + unown chars
@@ -66,7 +57,15 @@ TextBoxSpaceGFX: ; f9204
INCBIN "gfx/frames/space.1bpp"
; f9214
-MobilePhoneTilesGFX: ; f9214
+FontsExtra_SolidBlackGFX: ; f9214
+INCBIN "gfx/font/black.1bpp"
+; f921c
+
+UnusedUpArrowGFX: ; unused up arrow + whitespace
+INCBIN "gfx/font/unused_arrow.1bpp"
+; f9234
+
+MobilePhoneTilesGFX: ; f9234
INCBIN "gfx/mobile/phone_tiles.2bpp"
; f9344
@@ -84,18 +83,18 @@ INCLUDE "gfx/footprints.asm"
; This and the following two functions are unreferenced.
; Debug, perhaps?
-Unknown_fb434:
+Unreferenced_fb434:
db 0
-Functionfb435: ; 4b435
- ld a, [Unknown_fb434]
+Unreferenced_Functionfb435: ; 4b435
+ ld a, [Unreferenced_fb434]
and a
jp nz, Get1bpp_2
jp Get1bpp
; fb43f
-Functionfb43f: ; fb43f
- ld a, [Unknown_fb434]
+Unreferenced_Functionfb43f: ; fb43f
+ ld a, [Unreferenced_fb434]
and a
jp nz, Get2bpp_2
jp Get2bpp
@@ -105,42 +104,42 @@ Functionfb43f: ; fb43f
_LoadStandardFont:: ; fb449
ld de, Font
ld hl, vTiles1
- lb bc, BANK(Font), $80
+ lb bc, BANK(Font), 128 ; "A" to "9"
ld a, [rLCDC]
bit rLCDC_ENABLE, a
jp z, Copy1bpp
ld de, Font
ld hl, vTiles1
- lb bc, BANK(Font), $20
+ lb bc, BANK(Font), 32 ; "A" to "]"
call Get1bpp_2
- ld de, Font + $20 * LEN_1BPP_TILE
+ ld de, Font + 32 * LEN_1BPP_TILE
ld hl, vTiles1 tile $20
- lb bc, BANK(Font), $20
+ lb bc, BANK(Font), 32 ; "a" to $bf
call Get1bpp_2
- ld de, Font + $40 * LEN_1BPP_TILE
+ ld de, Font + 64 * LEN_1BPP_TILE
ld hl, vTiles1 tile $40
- lb bc, BANK(Font), $20
+ lb bc, BANK(Font), 32 ; "Ä" to "←"
call Get1bpp_2
- ld de, Font + $60 * LEN_1BPP_TILE
+ ld de, Font + 96 * LEN_1BPP_TILE
ld hl, vTiles1 tile $60
- lb bc, BANK(Font), $20
+ lb bc, BANK(Font), 32 ; "'" to "9"
call Get1bpp_2
ret
; fb48a
_LoadFontsExtra1:: ; fb48a
- ld de, MobilePhoneTilesGFX
+ ld de, FontsExtra_SolidBlackGFX
ld hl, vTiles2 tile "<BLACK>" ; $60
- lb bc, BANK(MobilePhoneTilesGFX), 1
+ lb bc, BANK(FontsExtra_SolidBlackGFX), 1
call Get1bpp_2
- ld de, OverworldPhoneIconGFX
+ ld de, PokegearPhoneIconGFX
ld hl, vTiles2 tile "<PHONE>" ; $62
- lb bc, BANK(OverworldPhoneIconGFX), 1
+ lb bc, BANK(PokegearPhoneIconGFX), 1
call Get2bpp_2
- ld de, FontExtra + 3 * LEN_2BPP_TILE
- ld hl, vTiles2 tile $63
- lb bc, BANK(FontExtra), $16
+ ld de, FontExtra tile 3
+ ld hl, vTiles2 tile "<BOLD_D>"
+ lb bc, BANK(FontExtra), 22 ; "<BOLD_D>" to "ぉ"
call Get2bpp_2
jr LoadFrame
; fb4b0
@@ -157,21 +156,21 @@ _LoadFontsExtra2:: ; fb4b0
_LoadFontsBattleExtra:: ; fb4be
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
- lb bc, BANK(FontBattleExtra), $19
+ lb bc, BANK(FontBattleExtra), 25
call Get2bpp_2
jr LoadFrame
; fb4cc
LoadFrame: ; fb4cc
ld a, [TextBoxFrame]
- and 7
- ld bc, LEN_1BPP_TILE * 6
+ maskbits NUM_FRAMES +- 1
+ ld bc, 6 * LEN_1BPP_TILE
ld hl, Frames
call AddNTimes
ld d, h
ld e, l
ld hl, vTiles2 tile "┌" ; $79
- lb bc, BANK(Frames), 6
+ lb bc, BANK(Frames), 6 ; "┌" to "┘"
call Get1bpp_2
ld hl, vTiles2 tile " " ; $7f
ld de, TextBoxSpaceGFX
@@ -183,11 +182,11 @@ LoadFrame: ; fb4cc
LoadBattleFontsHPBar: ; fb4f2
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
- lb bc, BANK(FontBattleExtra), $c
+ lb bc, BANK(FontBattleExtra), 12
call Get2bpp_2
ld hl, vTiles2 tile $70
- ld de, FontBattleExtra tile $10
- lb bc, BANK(FontBattleExtra), 3
+ ld de, FontBattleExtra tile 16
+ lb bc, BANK(FontBattleExtra), 3 ; "<ど>" to "『"
call Get2bpp_2
call LoadFrame
@@ -204,7 +203,7 @@ LoadHPBar: ; fb50d
ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 9
call Get2bpp_2
- ld de, MobilePhoneTilesGFX + 9 * LEN_2BPP_TILE
+ ld de, MobilePhoneTilesGFX tile 7 ; mobile phone icon
ld hl, vTiles2 tile $5e
lb bc, BANK(MobilePhoneTilesGFX), 2
call Get2bpp_2
@@ -232,7 +231,7 @@ StatsScreen_LoadFont: ; fb53e
LoadStatsScreenPageTilesGFX: ; fb571
ld de, StatsScreenPageTilesGFX
ld hl, vTiles2 tile $31
- lb bc, BANK(StatsScreenPageTilesGFX), $11
+ lb bc, BANK(StatsScreenPageTilesGFX), 17
call Get2bpp_2
ret
; fb57e
diff --git a/data/palettes/overworld/bg_text.pal b/gfx/font/bg_text.pal
index 39a4a194c..39a4a194c 100644
--- a/data/palettes/overworld/bg_text.pal
+++ b/gfx/font/bg_text.pal
diff --git a/gfx/font/black.png b/gfx/font/black.png
new file mode 100644
index 000000000..e2bd6299c
--- /dev/null
+++ b/gfx/font/black.png
Binary files differ
diff --git a/gfx/font/font_battle_extra.png b/gfx/font/font_battle_extra.png
index 15e25a40c..2472048d9 100644
--- a/gfx/font/font_battle_extra.png
+++ b/gfx/font/font_battle_extra.png
Binary files differ
diff --git a/gfx/font/font_extra.png b/gfx/font/font_extra.png
index 7ca840c3a..b9fbf811e 100644
--- a/gfx/font/font_extra.png
+++ b/gfx/font/font_extra.png
Binary files differ
diff --git a/gfx/font/space.png b/gfx/font/overworld_space.png
index 726178132..726178132 100644
--- a/gfx/font/space.png
+++ b/gfx/font/overworld_space.png
Binary files differ
diff --git a/gfx/font/overworld_phone_icon.png b/gfx/font/phone_icon.png
index 9e13a121b..9e13a121b 100644
--- a/gfx/font/overworld_phone_icon.png
+++ b/gfx/font/phone_icon.png
Binary files differ
diff --git a/gfx/font/unused_arrow.png b/gfx/font/unused_arrow.png
new file mode 100644
index 000000000..24a5a5c41
--- /dev/null
+++ b/gfx/font/unused_arrow.png
Binary files differ
diff --git a/gfx/icons.asm b/gfx/icons.asm
index 5b28a99cd..0733c26f6 100644
--- a/gfx/icons.asm
+++ b/gfx/icons.asm
@@ -1,40 +1,40 @@
Icons:
NullIcon:
-PoliwagIcon: INCBIN "gfx/icon/poliwag.2bpp" ; 0x8ec0d
-JigglypuffIcon: INCBIN "gfx/icon/jigglypuff.2bpp" ; 0x8ec8d
-DiglettIcon: INCBIN "gfx/icon/diglett.2bpp" ; 0x8ed0d
-PikachuIcon: INCBIN "gfx/icon/pikachu.2bpp" ; 0x8ed8d
-StaryuIcon: INCBIN "gfx/icon/staryu.2bpp" ; 0x8ee0d
-FishIcon: INCBIN "gfx/icon/fish.2bpp" ; 0x8ee8d
-BirdIcon: INCBIN "gfx/icon/bird.2bpp" ; 0x8ef0d
-MonsterIcon: INCBIN "gfx/icon/monster.2bpp" ; 0x8ef8d
-ClefairyIcon: INCBIN "gfx/icon/clefairy.2bpp" ; 0x8f00d
-OddishIcon: INCBIN "gfx/icon/oddish.2bpp" ; 0x8f08d
-BugIcon: INCBIN "gfx/icon/bug.2bpp" ; 0x8f10d
-GhostIcon: INCBIN "gfx/icon/ghost.2bpp" ; 0x8f18d
-LaprasIcon: INCBIN "gfx/icon/lapras.2bpp" ; 0x8f20d
-HumanshapeIcon: INCBIN "gfx/icon/humanshape.2bpp" ; 0x8f28d
-FoxIcon: INCBIN "gfx/icon/fox.2bpp" ; 0x8f30d
-EquineIcon: INCBIN "gfx/icon/equine.2bpp" ; 0x8f38d
-ShellIcon: INCBIN "gfx/icon/shell.2bpp" ; 0x8f40d
-BlobIcon: INCBIN "gfx/icon/blob.2bpp" ; 0x8f48d
-SerpentIcon: INCBIN "gfx/icon/serpent.2bpp" ; 0x8f50d
-VoltorbIcon: INCBIN "gfx/icon/voltorb.2bpp" ; 0x8f58d
-SquirtleIcon: INCBIN "gfx/icon/squirtle.2bpp" ; 0x8f60d
-BulbasaurIcon: INCBIN "gfx/icon/bulbasaur.2bpp" ; 0x8f68d
-CharmanderIcon: INCBIN "gfx/icon/charmander.2bpp" ; 0x8f70d
-CaterpillarIcon: INCBIN "gfx/icon/caterpillar.2bpp" ; 0x8f78d
-UnownIcon: INCBIN "gfx/icon/unown.2bpp" ; 0x8f80d
-GeodudeIcon: INCBIN "gfx/icon/geodude.2bpp" ; 0x8f88d
-FighterIcon: INCBIN "gfx/icon/fighter.2bpp" ; 0x8f90d
-EggIcon: INCBIN "gfx/icon/egg.2bpp" ; 0x8f98d
-JellyfishIcon: INCBIN "gfx/icon/jellyfish.2bpp" ; 0x8fa0d
-MothIcon: INCBIN "gfx/icon/moth.2bpp" ; 0x8fa8d
-BatIcon: INCBIN "gfx/icon/bat.2bpp" ; 0x8fb0d
-SnorlaxIcon: INCBIN "gfx/icon/snorlax.2bpp" ; 0x8fb8d
-HoOhIcon: INCBIN "gfx/icon/ho_oh.2bpp" ; 0x8fc0d
-LugiaIcon: INCBIN "gfx/icon/lugia.2bpp" ; 0x8fc8d
-GyaradosIcon: INCBIN "gfx/icon/gyarados.2bpp" ; 0x8fd0d
-SlowpokeIcon: INCBIN "gfx/icon/slowpoke.2bpp" ; 0x8fd8d
-SudowoodoIcon: INCBIN "gfx/icon/sudowoodo.2bpp" ; 0x8fe0d
-BigmonIcon: INCBIN "gfx/icon/bigmon.2bpp" ; 0x8fe8d
+PoliwagIcon: INCBIN "gfx/icons/poliwag.2bpp" ; 0x8ec0d
+JigglypuffIcon: INCBIN "gfx/icons/jigglypuff.2bpp" ; 0x8ec8d
+DiglettIcon: INCBIN "gfx/icons/diglett.2bpp" ; 0x8ed0d
+PikachuIcon: INCBIN "gfx/icons/pikachu.2bpp" ; 0x8ed8d
+StaryuIcon: INCBIN "gfx/icons/staryu.2bpp" ; 0x8ee0d
+FishIcon: INCBIN "gfx/icons/fish.2bpp" ; 0x8ee8d
+BirdIcon: INCBIN "gfx/icons/bird.2bpp" ; 0x8ef0d
+MonsterIcon: INCBIN "gfx/icons/monster.2bpp" ; 0x8ef8d
+ClefairyIcon: INCBIN "gfx/icons/clefairy.2bpp" ; 0x8f00d
+OddishIcon: INCBIN "gfx/icons/oddish.2bpp" ; 0x8f08d
+BugIcon: INCBIN "gfx/icons/bug.2bpp" ; 0x8f10d
+GhostIcon: INCBIN "gfx/icons/ghost.2bpp" ; 0x8f18d
+LaprasIcon: INCBIN "gfx/icons/lapras.2bpp" ; 0x8f20d
+HumanshapeIcon: INCBIN "gfx/icons/humanshape.2bpp" ; 0x8f28d
+FoxIcon: INCBIN "gfx/icons/fox.2bpp" ; 0x8f30d
+EquineIcon: INCBIN "gfx/icons/equine.2bpp" ; 0x8f38d
+ShellIcon: INCBIN "gfx/icons/shell.2bpp" ; 0x8f40d
+BlobIcon: INCBIN "gfx/icons/blob.2bpp" ; 0x8f48d
+SerpentIcon: INCBIN "gfx/icons/serpent.2bpp" ; 0x8f50d
+VoltorbIcon: INCBIN "gfx/icons/voltorb.2bpp" ; 0x8f58d
+SquirtleIcon: INCBIN "gfx/icons/squirtle.2bpp" ; 0x8f60d
+BulbasaurIcon: INCBIN "gfx/icons/bulbasaur.2bpp" ; 0x8f68d
+CharmanderIcon: INCBIN "gfx/icons/charmander.2bpp" ; 0x8f70d
+CaterpillarIcon: INCBIN "gfx/icons/caterpillar.2bpp" ; 0x8f78d
+UnownIcon: INCBIN "gfx/icons/unown.2bpp" ; 0x8f80d
+GeodudeIcon: INCBIN "gfx/icons/geodude.2bpp" ; 0x8f88d
+FighterIcon: INCBIN "gfx/icons/fighter.2bpp" ; 0x8f90d
+EggIcon: INCBIN "gfx/icons/egg.2bpp" ; 0x8f98d
+JellyfishIcon: INCBIN "gfx/icons/jellyfish.2bpp" ; 0x8fa0d
+MothIcon: INCBIN "gfx/icons/moth.2bpp" ; 0x8fa8d
+BatIcon: INCBIN "gfx/icons/bat.2bpp" ; 0x8fb0d
+SnorlaxIcon: INCBIN "gfx/icons/snorlax.2bpp" ; 0x8fb8d
+HoOhIcon: INCBIN "gfx/icons/ho_oh.2bpp" ; 0x8fc0d
+LugiaIcon: INCBIN "gfx/icons/lugia.2bpp" ; 0x8fc8d
+GyaradosIcon: INCBIN "gfx/icons/gyarados.2bpp" ; 0x8fd0d
+SlowpokeIcon: INCBIN "gfx/icons/slowpoke.2bpp" ; 0x8fd8d
+SudowoodoIcon: INCBIN "gfx/icons/sudowoodo.2bpp" ; 0x8fe0d
+BigmonIcon: INCBIN "gfx/icons/bigmon.2bpp" ; 0x8fe8d
diff --git a/gfx/icon/bat.png b/gfx/icons/bat.png
index 3ea2ea832..3ea2ea832 100644
--- a/gfx/icon/bat.png
+++ b/gfx/icons/bat.png
Binary files differ
diff --git a/gfx/icon/bigmon.png b/gfx/icons/bigmon.png
index 4a77f1ece..4a77f1ece 100644
--- a/gfx/icon/bigmon.png
+++ b/gfx/icons/bigmon.png
Binary files differ
diff --git a/gfx/icon/bird.png b/gfx/icons/bird.png
index e13bc6cba..e13bc6cba 100644
--- a/gfx/icon/bird.png
+++ b/gfx/icons/bird.png
Binary files differ
diff --git a/gfx/icon/blob.png b/gfx/icons/blob.png
index aef74ae64..aef74ae64 100644
--- a/gfx/icon/blob.png
+++ b/gfx/icons/blob.png
Binary files differ
diff --git a/gfx/icon/bug.png b/gfx/icons/bug.png
index 97504f721..97504f721 100644
--- a/gfx/icon/bug.png
+++ b/gfx/icons/bug.png
Binary files differ
diff --git a/gfx/icon/bulbasaur.png b/gfx/icons/bulbasaur.png
index 1de6636f8..1de6636f8 100644
--- a/gfx/icon/bulbasaur.png
+++ b/gfx/icons/bulbasaur.png
Binary files differ
diff --git a/gfx/icon/caterpillar.png b/gfx/icons/caterpillar.png
index 85558104b..85558104b 100644
--- a/gfx/icon/caterpillar.png
+++ b/gfx/icons/caterpillar.png
Binary files differ
diff --git a/gfx/icon/charmander.png b/gfx/icons/charmander.png
index 3d85f1316..3d85f1316 100644
--- a/gfx/icon/charmander.png
+++ b/gfx/icons/charmander.png
Binary files differ
diff --git a/gfx/icon/clefairy.png b/gfx/icons/clefairy.png
index 0017d9ddb..0017d9ddb 100644
--- a/gfx/icon/clefairy.png
+++ b/gfx/icons/clefairy.png
Binary files differ
diff --git a/gfx/icon/diglett.png b/gfx/icons/diglett.png
index 307181f71..307181f71 100644
--- a/gfx/icon/diglett.png
+++ b/gfx/icons/diglett.png
Binary files differ
diff --git a/gfx/icon/egg.png b/gfx/icons/egg.png
index 129346fd9..129346fd9 100644
--- a/gfx/icon/egg.png
+++ b/gfx/icons/egg.png
Binary files differ
diff --git a/gfx/icon/equine.png b/gfx/icons/equine.png
index b3da7181b..b3da7181b 100644
--- a/gfx/icon/equine.png
+++ b/gfx/icons/equine.png
Binary files differ
diff --git a/gfx/icon/fighter.png b/gfx/icons/fighter.png
index 9deab976f..9deab976f 100644
--- a/gfx/icon/fighter.png
+++ b/gfx/icons/fighter.png
Binary files differ
diff --git a/gfx/icon/fish.png b/gfx/icons/fish.png
index 35dbb1d2f..35dbb1d2f 100644
--- a/gfx/icon/fish.png
+++ b/gfx/icons/fish.png
Binary files differ
diff --git a/gfx/icon/fox.png b/gfx/icons/fox.png
index 0419c87c7..0419c87c7 100644
--- a/gfx/icon/fox.png
+++ b/gfx/icons/fox.png
Binary files differ
diff --git a/gfx/icon/geodude.png b/gfx/icons/geodude.png
index 02db8771d..02db8771d 100644
--- a/gfx/icon/geodude.png
+++ b/gfx/icons/geodude.png
Binary files differ
diff --git a/gfx/icon/ghost.png b/gfx/icons/ghost.png
index 7ecf8ed0f..7ecf8ed0f 100644
--- a/gfx/icon/ghost.png
+++ b/gfx/icons/ghost.png
Binary files differ
diff --git a/gfx/icon/gyarados.png b/gfx/icons/gyarados.png
index fad5d8ae3..fad5d8ae3 100644
--- a/gfx/icon/gyarados.png
+++ b/gfx/icons/gyarados.png
Binary files differ
diff --git a/gfx/icon/ho_oh.png b/gfx/icons/ho_oh.png
index 6ee91781e..6ee91781e 100644
--- a/gfx/icon/ho_oh.png
+++ b/gfx/icons/ho_oh.png
Binary files differ
diff --git a/gfx/icon/humanshape.png b/gfx/icons/humanshape.png
index f5d0b9290..f5d0b9290 100644
--- a/gfx/icon/humanshape.png
+++ b/gfx/icons/humanshape.png
Binary files differ
diff --git a/gfx/icon/item.png b/gfx/icons/item.png
index a47d55009..a47d55009 100644
--- a/gfx/icon/item.png
+++ b/gfx/icons/item.png
Binary files differ
diff --git a/gfx/icon/jellyfish.png b/gfx/icons/jellyfish.png
index 8583d5cdc..8583d5cdc 100644
--- a/gfx/icon/jellyfish.png
+++ b/gfx/icons/jellyfish.png
Binary files differ
diff --git a/gfx/icon/jigglypuff.png b/gfx/icons/jigglypuff.png
index 70f87b0df..70f87b0df 100644
--- a/gfx/icon/jigglypuff.png
+++ b/gfx/icons/jigglypuff.png
Binary files differ
diff --git a/gfx/icon/lapras.png b/gfx/icons/lapras.png
index 89ad063d0..89ad063d0 100644
--- a/gfx/icon/lapras.png
+++ b/gfx/icons/lapras.png
Binary files differ
diff --git a/gfx/icon/lugia.png b/gfx/icons/lugia.png
index 56dbf283b..56dbf283b 100644
--- a/gfx/icon/lugia.png
+++ b/gfx/icons/lugia.png
Binary files differ
diff --git a/gfx/icon/mail.png b/gfx/icons/mail.png
index 53db461e5..53db461e5 100644
--- a/gfx/icon/mail.png
+++ b/gfx/icons/mail.png
Binary files differ
diff --git a/gfx/icon/mail2.png b/gfx/icons/mail2.png
index 7ad25edbf..7ad25edbf 100644
--- a/gfx/icon/mail2.png
+++ b/gfx/icons/mail2.png
Binary files differ
diff --git a/gfx/icon/monster.png b/gfx/icons/monster.png
index f97c67b64..f97c67b64 100644
--- a/gfx/icon/monster.png
+++ b/gfx/icons/monster.png
Binary files differ
diff --git a/gfx/icon/moth.png b/gfx/icons/moth.png
index f44440f5c..f44440f5c 100644
--- a/gfx/icon/moth.png
+++ b/gfx/icons/moth.png
Binary files differ
diff --git a/gfx/icon/oddish.png b/gfx/icons/oddish.png
index c069bd444..c069bd444 100644
--- a/gfx/icon/oddish.png
+++ b/gfx/icons/oddish.png
Binary files differ
diff --git a/data/palettes/party_menu.pal b/gfx/icons/party_menu.pal
index 70af517be..70af517be 100644
--- a/data/palettes/party_menu.pal
+++ b/gfx/icons/party_menu.pal
diff --git a/gfx/icon/pikachu.png b/gfx/icons/pikachu.png
index 7b7d23dbd..7b7d23dbd 100644
--- a/gfx/icon/pikachu.png
+++ b/gfx/icons/pikachu.png
Binary files differ
diff --git a/gfx/icon/poliwag.png b/gfx/icons/poliwag.png
index b6b63a81e..b6b63a81e 100644
--- a/gfx/icon/poliwag.png
+++ b/gfx/icons/poliwag.png
Binary files differ
diff --git a/gfx/icon/serpent.png b/gfx/icons/serpent.png
index de575f088..de575f088 100644
--- a/gfx/icon/serpent.png
+++ b/gfx/icons/serpent.png
Binary files differ
diff --git a/gfx/icon/shell.png b/gfx/icons/shell.png
index 4daf27634..4daf27634 100644
--- a/gfx/icon/shell.png
+++ b/gfx/icons/shell.png
Binary files differ
diff --git a/gfx/icon/slowpoke.png b/gfx/icons/slowpoke.png
index 221f3f7a5..221f3f7a5 100644
--- a/gfx/icon/slowpoke.png
+++ b/gfx/icons/slowpoke.png
Binary files differ
diff --git a/gfx/icon/snorlax.png b/gfx/icons/snorlax.png
index f2c1b0b74..f2c1b0b74 100644
--- a/gfx/icon/snorlax.png
+++ b/gfx/icons/snorlax.png
Binary files differ
diff --git a/gfx/icon/squirtle.png b/gfx/icons/squirtle.png
index 614aa21b2..614aa21b2 100644
--- a/gfx/icon/squirtle.png
+++ b/gfx/icons/squirtle.png
Binary files differ
diff --git a/gfx/icon/staryu.png b/gfx/icons/staryu.png
index 52361c780..52361c780 100644
--- a/gfx/icon/staryu.png
+++ b/gfx/icons/staryu.png
Binary files differ
diff --git a/gfx/icon/sudowoodo.png b/gfx/icons/sudowoodo.png
index d115356bb..d115356bb 100644
--- a/gfx/icon/sudowoodo.png
+++ b/gfx/icons/sudowoodo.png
Binary files differ
diff --git a/gfx/icon/unown.png b/gfx/icons/unown.png
index 0a4d0e426..0a4d0e426 100644
--- a/gfx/icon/unown.png
+++ b/gfx/icons/unown.png
Binary files differ
diff --git a/gfx/icon/voltorb.png b/gfx/icons/voltorb.png
index ef289541a..ef289541a 100644
--- a/gfx/icon/voltorb.png
+++ b/gfx/icons/voltorb.png
Binary files differ
diff --git a/data/palettes/crystal_intro/fade.pal b/gfx/intro/fade.pal
index 8e03cbc43..8e03cbc43 100644
--- a/data/palettes/crystal_intro/fade.pal
+++ b/gfx/intro/fade.pal
diff --git a/data/palettes/crystal_intro/gamefreak_logo.pal b/gfx/intro/gamefreak_logo.pal
index c3a526b82..c3a526b82 100644
--- a/data/palettes/crystal_intro/gamefreak_logo.pal
+++ b/gfx/intro/gamefreak_logo.pal
diff --git a/gfx/intro/gender_screen.pal b/gfx/intro/gender_screen.pal
new file mode 100644
index 000000000..ca8ae04aa
--- /dev/null
+++ b/gfx/intro/gender_screen.pal
@@ -0,0 +1,4 @@
+ RGB 31, 31, 31
+ RGB 09, 30, 31
+ RGB 01, 11, 31
+ RGB 00, 00, 00
diff --git a/data/palettes/crystal_intro/intro_1.pal b/gfx/intro/intro_1.pal
index ae0faadac..ae0faadac 100644
--- a/data/palettes/crystal_intro/intro_1.pal
+++ b/gfx/intro/intro_1.pal
diff --git a/data/palettes/crystal_intro/intro_2.pal b/gfx/intro/intro_2.pal
index 5f83df020..5f83df020 100644
--- a/data/palettes/crystal_intro/intro_2.pal
+++ b/gfx/intro/intro_2.pal
diff --git a/data/palettes/crystal_intro/intro_3.pal b/gfx/intro/intro_3.pal
index 95f3e052a..95f3e052a 100644
--- a/data/palettes/crystal_intro/intro_3.pal
+++ b/gfx/intro/intro_3.pal
diff --git a/data/palettes/crystal_intro/intro_4.pal b/gfx/intro/intro_4.pal
index fdcf058de..fdcf058de 100644
--- a/data/palettes/crystal_intro/intro_4.pal
+++ b/gfx/intro/intro_4.pal
diff --git a/data/palettes/crystal_intro/intro_5.pal b/gfx/intro/intro_5.pal
index 5b1be1a5f..5b1be1a5f 100644
--- a/data/palettes/crystal_intro/intro_5.pal
+++ b/gfx/intro/intro_5.pal
diff --git a/gfx/load_pics.asm b/gfx/load_pics.asm
index 2cd169508..e58ecb615 100755
--- a/gfx/load_pics.asm
+++ b/gfx/load_pics.asm
@@ -1,4 +1,4 @@
-GetUnownLetter: ; 51040
+Predef_GetUnownLetter: ; 51040
; Return Unown letter in UnownLetter based on DVs at hl
; Take the middle 2 bits of each DV and place them in order:
@@ -48,7 +48,7 @@ GetUnownLetter: ; 51040
ld [UnownLetter], a
ret
-GetMonFrontpic: ; 51077
+Predef_GetMonFrontpic: ; 51077
ld a, [CurPartySpecies]
ld [CurSpecies], a
call IsAPokemon
@@ -60,7 +60,7 @@ GetMonFrontpic: ; 51077
ld [rSVBK], a
ret
-GetAnimatedFrontpicPredef: ; 5108b
+Predef_GetAnimatedFrontpic: ; 5108b
ld a, [CurPartySpecies]
ld [CurSpecies], a
call IsAPokemon
@@ -188,14 +188,14 @@ LoadFrontpicTiles: ; 5114f
pop bc
.loop
push bc
- ld c, $0
+ ld c, 0
call LoadFrontpic
pop bc
dec b
jr nz, .loop
ret
-GetMonBackpic: ; 5116c
+Predef_GetMonBackpic: ; 5116c
ld a, [CurPartySpecies]
call IsAPokemon
ret c
@@ -311,7 +311,7 @@ Function511ec: ; 511ec
call FarDecompress
ret
-GetTrainerPic: ; 5120d
+Predef_GetTrainerPic: ; 5120d
ld a, [TrainerClass]
and a
ret z
@@ -353,7 +353,7 @@ GetTrainerPic: ; 5120d
ld [hBGMapMode], a
ret
-DecompressPredef: ; 5125d
+Predef_Decompress: ; 5125d
; Decompress lz data from b:hl to scratch space at 6:d000, then copy it to address de.
ld a, [rSVBK]
diff --git a/data/palettes/mail.pal b/gfx/mail/mail.pal
index 4096ffae1..4096ffae1 100644
--- a/data/palettes/mail.pal
+++ b/gfx/mail/mail.pal
diff --git a/gfx/mobile/phone_tiles.png b/gfx/mobile/phone_tiles.png
index 5450c15f8..3aa8a68ef 100644
--- a/gfx/mobile/phone_tiles.png
+++ b/gfx/mobile/phone_tiles.png
Binary files differ
diff --git a/data/palettes/mg_mobile.pal b/gfx/mystery_gift/mg_mobile.pal
index c77e8c63f..c77e8c63f 100644
--- a/data/palettes/mg_mobile.pal
+++ b/gfx/mystery_gift/mg_mobile.pal
diff --git a/gfx/mystery_gift/mystery_gift.pal b/gfx/mystery_gift/mystery_gift.pal
new file mode 100644
index 000000000..caa44f734
--- /dev/null
+++ b/gfx/mystery_gift/mystery_gift.pal
@@ -0,0 +1,9 @@
+ RGB 31, 31, 31
+ RGB 16, 31, 14
+ RGB 05, 14, 21
+ RGB 05, 13, 10
+
+ RGB 31, 31, 31
+ RGB 11, 21, 25
+ RGB 05, 14, 21
+ RGB 00, 03, 19
diff --git a/gfx/mystery_gift/mystery_gift.png b/gfx/mystery_gift/mystery_gift.png
index 0fd458dec..83908847a 100644
--- a/gfx/mystery_gift/mystery_gift.png
+++ b/gfx/mystery_gift/mystery_gift.png
Binary files differ
diff --git a/gfx/overworld/chris_fish.png b/gfx/overworld/chris_fish.png
index ea0730151..81e05279a 100644
--- a/gfx/overworld/chris_fish.png
+++ b/gfx/overworld/chris_fish.png
Binary files differ
diff --git a/gfx/overworld/heal_machine.pal b/gfx/overworld/heal_machine.pal
new file mode 100644
index 000000000..28a76de40
--- /dev/null
+++ b/gfx/overworld/heal_machine.pal
@@ -0,0 +1,4 @@
+ RGB 31, 31, 31
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
diff --git a/gfx/overworld/kris_fish.png b/gfx/overworld/kris_fish.png
index a47b89042..c0fe37544 100644
--- a/gfx/overworld/kris_fish.png
+++ b/gfx/overworld/kris_fish.png
Binary files differ
diff --git a/data/palettes/overworld/map_objects.pal b/gfx/overworld/npc_sprites.pal
index b0f33479a..b0f33479a 100644
--- a/data/palettes/overworld/map_objects.pal
+++ b/gfx/overworld/npc_sprites.pal
diff --git a/gfx/overworld/trainer_battle_day.pal b/gfx/overworld/trainer_battle_day.pal
new file mode 100644
index 000000000..b7d67891e
--- /dev/null
+++ b/gfx/overworld/trainer_battle_day.pal
@@ -0,0 +1,4 @@
+ RGB 31, 18, 29
+ RGB 31, 11, 15
+ RGB 31, 05, 05
+ RGB 07, 07, 07
diff --git a/gfx/overworld/trainer_battle_nite.pal b/gfx/overworld/trainer_battle_nite.pal
new file mode 100644
index 000000000..d1a35f33b
--- /dev/null
+++ b/gfx/overworld/trainer_battle_nite.pal
@@ -0,0 +1,4 @@
+ RGB 31, 18, 29
+ RGB 31, 05, 05
+ RGB 31, 05, 05
+ RGB 31, 05, 05
diff --git a/gfx/overworld_font.asm b/gfx/overworld_font.asm
index 43dd08c66..f23f01c4e 100644
--- a/gfx/overworld_font.asm
+++ b/gfx/overworld_font.asm
@@ -1,17 +1,17 @@
LoadOverworldFont:: ; 106594
- ld de, .font
+ ld de, .OverworldFontGFX
ld hl, vTiles1
- lb bc, BANK(.font), $80
+ lb bc, BANK(.OverworldFontGFX), $80
call Get2bpp
- ld de, .space
- ld hl, vTiles2 tile $7f
- lb bc, BANK(.space), 1
+ ld de, .OverworldFontSpaceGFX
+ ld hl, vTiles2 tile " "
+ lb bc, BANK(.OverworldFontSpaceGFX), 1
call Get2bpp
ret
; 1065ad
-.font
+.OverworldFontGFX:
INCBIN "gfx/font/overworld.2bpp"
-.space
-INCBIN "gfx/font/space.2bpp"
+.OverworldFontSpaceGFX:
+INCBIN "gfx/font/overworld_space.2bpp"
diff --git a/data/palettes/pack.pal b/gfx/pack/pack.pal
index e8b4979bb..e8b4979bb 100644
--- a/data/palettes/pack.pal
+++ b/gfx/pack/pack.pal
diff --git a/data/palettes/pack_f.pal b/gfx/pack/pack_f.pal
index a962d97d1..a962d97d1 100644
--- a/data/palettes/pack_f.pal
+++ b/gfx/pack/pack_f.pal
diff --git a/gfx/pc/orange.pal b/gfx/pc/orange.pal
new file mode 100644
index 000000000..299c6b221
--- /dev/null
+++ b/gfx/pc/orange.pal
@@ -0,0 +1,4 @@
+ RGB 31, 15, 00
+ RGB 23, 12, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
diff --git a/gfx/pics.asm b/gfx/pics.asm
index fc2d46a77..198569a76 100644
--- a/gfx/pics.asm
+++ b/gfx/pics.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
; PokemonPicPointers and UnownPicPointers are assumed to start at the same
diff --git a/gfx/pokedex/cursor.pal b/gfx/pokedex/cursor.pal
new file mode 100644
index 000000000..5b202a1bf
--- /dev/null
+++ b/gfx/pokedex/cursor.pal
@@ -0,0 +1,4 @@
+ RGB 00, 00, 00
+ RGB 11, 23, 00
+ RGB 07, 17, 00
+ RGB 00, 00, 00
diff --git a/gfx/pokedex/question_mark.pal b/gfx/pokedex/question_mark.pal
new file mode 100644
index 000000000..76519ba22
--- /dev/null
+++ b/gfx/pokedex/question_mark.pal
@@ -0,0 +1,4 @@
+ RGB 11, 23, 00
+ RGB 07, 17, 00
+ RGB 06, 16, 03
+ RGB 05, 12, 01
diff --git a/data/palettes/pokegear.pal b/gfx/pokegear/pokegear.pal
index 397986dec..75cf2cf2d 100644
--- a/data/palettes/pokegear.pal
+++ b/gfx/pokegear/pokegear.pal
@@ -1,28 +1,29 @@
+; border
RGB 28, 31, 20
RGB 21, 21, 21
RGB 13, 13, 13
RGB 00, 00, 00
-
+; earth
RGB 28, 31, 20
RGB 00, 31, 00
RGB 00, 00, 31
RGB 00, 00, 00
-
+; mountain
RGB 28, 31, 20
RGB 00, 31, 00
RGB 15, 07, 00
RGB 00, 00, 00
-
+; city (boy)
RGB 28, 31, 20
RGB 31, 15, 00
RGB 15, 07, 00
RGB 00, 00, 00
-
+; point of interest
RGB 28, 31, 20
RGB 00, 31, 00
RGB 00, 00, 31
RGB 31, 00, 00
-
+; mountain point of interest
RGB 28, 31, 20
RGB 00, 31, 00
RGB 15, 07, 00
diff --git a/data/palettes/pokegear_f.pal b/gfx/pokegear/pokegear_f.pal
index 3f797c866..78f48fb0c 100644
--- a/data/palettes/pokegear_f.pal
+++ b/gfx/pokegear/pokegear_f.pal
@@ -1,28 +1,29 @@
+; border
RGB 28, 31, 20
RGB 21, 21, 21
RGB 13, 13, 13
RGB 00, 00, 00
-
+; earth
RGB 28, 31, 20
RGB 00, 31, 00
RGB 00, 00, 31
RGB 00, 00, 00
-
+; mountain
RGB 28, 31, 20
RGB 00, 31, 00
RGB 15, 07, 00
RGB 00, 00, 00
-
+; city (girl)
RGB 28, 31, 20
RGB 10, 18, 31
RGB 13, 06, 31
RGB 00, 00, 00
-
+; point of interest
RGB 28, 31, 20
RGB 00, 31, 00
RGB 00, 00, 31
RGB 31, 00, 00
-
+; mountain point of interest
RGB 28, 31, 20
RGB 00, 31, 00
RGB 15, 07, 00
diff --git a/gfx/pokegear/town_map.png b/gfx/pokegear/town_map.png
index 6e7af59d0..899379826 100644
--- a/gfx/pokegear/town_map.png
+++ b/gfx/pokegear/town_map.png
Binary files differ
diff --git a/data/palettes/town_map.asm b/gfx/pokegear/town_map_palette_map.asm
index 696863e85..67ca7fbdd 100644
--- a/data/palettes/town_map.asm
+++ b/gfx/pokegear/town_map_palette_map.asm
@@ -15,20 +15,16 @@ endr
ENDM
; gfx/pokegear/town_map.png
- townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN
- townmappals BORDER, BORDER, EARTH, EARTH, CITY, EARTH
- townmappals POI, POI_MTN, POI, POI_MTN, EARTH, EARTH
- townmappals EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
- townmappals EARTH, EARTH, BORDER, EARTH, EARTH, BORDER
- townmappals BORDER, BORDER, EARTH, EARTH, EARTH, MOUNTAIN
- townmappals MOUNTAIN, MOUNTAIN, BORDER, BORDER, BORDER, BORDER
- townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
+ townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
+ townmappals EARTH, EARTH, CITY, EARTH, POI, POI_MTN, POI, POI_MTN
+ townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
+ townmappals EARTH, EARTH, BORDER, EARTH, EARTH, BORDER, BORDER, BORDER
+ townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
+ townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
; gfx/pokegear/pokegear.png
- townmappals BORDER, BORDER, BORDER, BORDER, POI, POI
- townmappals POI, BORDER, BORDER, BORDER, BORDER, BORDER
- townmappals BORDER, BORDER, BORDER, BORDER, CITY, CITY
- townmappals CITY, CITY, CITY, CITY, CITY, CITY
- townmappals CITY, CITY, CITY, CITY, CITY, CITY
- townmappals CITY, BORDER, CITY, CITY, CITY, CITY
- townmappals CITY, CITY, CITY, CITY, BORDER, BORDER
- townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
+ townmappals BORDER, BORDER, BORDER, BORDER, POI, POI, POI, BORDER
+ townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
+ townmappals CITY, CITY, CITY, CITY, CITY, CITY, CITY, CITY
+ townmappals CITY, CITY, CITY, CITY, CITY, CITY, CITY, BORDER
+ townmappals CITY, CITY, CITY, CITY, CITY, CITY, CITY, CITY
+ townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
diff --git a/gfx/pokemon/egg/front.png b/gfx/pokemon/egg/front.png
index be8e9d4a4..a2d8d4cc3 100644
--- a/gfx/pokemon/egg/front.png
+++ b/gfx/pokemon/egg/front.png
Binary files differ
diff --git a/gfx/pokemon/egg/shiny.pal b/gfx/pokemon/egg/shiny.pal
new file mode 100644
index 000000000..6c9c075f7
--- /dev/null
+++ b/gfx/pokemon/egg/shiny.pal
@@ -0,0 +1,4 @@
+
+ RGB 30, 26, 11
+ RGB 23, 16, 00
+
diff --git a/data/palettes/blk_packets.asm b/gfx/sgb/blk_packets.asm
index 38f68ad1d..38f68ad1d 100644
--- a/data/palettes/blk_packets.asm
+++ b/gfx/sgb/blk_packets.asm
diff --git a/data/palettes/pal_packets.asm b/gfx/sgb/pal_packets.asm
index 57cd9e492..7ab27d359 100644
--- a/data/palettes/pal_packets.asm
+++ b/gfx/sgb/pal_packets.asm
@@ -1,3 +1,5 @@
+; indexes correspond to PredefPals palettes (see gfx/sgb/predef.pal)
+
PalPacket_9b96:
db $51, $48, $00, $49, $00, $4a, $00, $4b, $00, $00, $00, $00, $00, $00, $00, $00
diff --git a/data/palettes/predef.pal b/gfx/sgb/predef.pal
index 15d9000fb..15d9000fb 100644
--- a/data/palettes/predef.pal
+++ b/gfx/sgb/predef.pal
diff --git a/gfx/sgb/roof_pal_inds.asm b/gfx/sgb/roof_pal_inds.asm
new file mode 100644
index 000000000..5692c880a
--- /dev/null
+++ b/gfx/sgb/roof_pal_inds.asm
@@ -0,0 +1,32 @@
+; Crystal does not support SGB, so this is unused.
+
+MapGroupRoofSGBPalInds: ; 8a45
+; entries correspond to map groups
+ db $00 ; group 0 (unused)
+ db $12 ; group 1 (Olivine)
+ db $14 ; group 2 (Mahogany)
+ db $18 ; group 3 (dungeons)
+ db $11 ; group 4 (Ecruteak)
+ db $15 ; group 5 (Blackthorn)
+ db $09 ; group 6 (Cinnabar)
+ db $04 ; group 7 (Cerulean)
+ db $0f ; group 8 (Azalea)
+ db $16 ; group 9 (Lake of Rage)
+ db $0e ; group 10 (Violet)
+ db $10 ; group 11 (Goldenrod)
+ db $06 ; group 12 (Vermilion)
+ db $01 ; group 13 (Pallet)
+ db $03 ; group 14 (Pewter)
+ db $06 ; group 15 (Mount Moon Square)
+ db $0b ; group 16 (Indigo)
+ db $08 ; group 17 (Fuchsia)
+ db $05 ; group 18 (Lavender)
+ db $17 ; group 19 (Silver Cave)
+ db $08 ; group 20 (Cable Club)
+ db $07 ; group 21 (Celadon)
+ db $13 ; group 22 (Cianwood)
+ db $02 ; group 23 (Viridian)
+ db $0c ; group 24 (New Bark)
+ db $0a ; group 25 (Saffron)
+ db $0d ; group 26 (Cherrygrove)
+; 8a60
diff --git a/data/palettes/sgb_border.pal b/gfx/sgb/sgb_border.pal
index fd5aec402..fd5aec402 100644
--- a/data/palettes/sgb_border.pal
+++ b/gfx/sgb/sgb_border.pal
diff --git a/gfx/sgb/sgb_border.png b/gfx/sgb/sgb_border.png
index 867c36b10..054ab4880 100644
--- a/gfx/sgb/sgb_border.png
+++ b/gfx/sgb/sgb_border.png
Binary files differ
diff --git a/gfx/sgb/sgb_border.tilemap b/gfx/sgb/sgb_border.tilemap
new file mode 100644
index 000000000..362eae929
--- /dev/null
+++ b/gfx/sgb/sgb_border.tilemap
@@ -0,0 +1,2 @@
+TTTTTTT$%&T&T%T$TTTTTTTTT$455T4T3TTTT!"##T"T!T T 
+      ) !"##T"T!T122T688888888888888888888'2TT2T1TTT7TTTTT7TTT%&T&T7&T&T%T3455T4T7455T4T3T7TTT7TTT7"T!T T7 !"2T1T0T7012TTT7TTT7&T%T$T7$%&4T3TT7347TT7TTTTT7TTT!"##T"T7"##T"T!T122T72TT2T1TTT.////////////////////-TTTTTTT9 ( )*+,9TTT%&T&T%T$TTTT$%&T&T%T3455T4T$TTTTTT$455T4T3T !"##T"T!T T \ No newline at end of file
diff --git a/data/palettes/slot_machine.pal b/gfx/slots/slots.pal
index 0eec479f2..0eec479f2 100644
--- a/data/palettes/slot_machine.pal
+++ b/gfx/slots/slots.pal
diff --git a/gfx/splash/logo.pal b/gfx/splash/logo.pal
new file mode 100644
index 000000000..b1712efc1
--- /dev/null
+++ b/gfx/splash/logo.pal
@@ -0,0 +1,4 @@
+ RGB 31, 31, 31
+ RGB 13, 11, 00
+ RGB 23, 12, 28
+ RGB 00, 00, 00
diff --git a/gfx/stats/exp_bar_ends.png b/gfx/stats/exp_bar_ends.png
deleted file mode 100644
index 252bdd990..000000000
--- a/gfx/stats/exp_bar_ends.png
+++ /dev/null
Binary files differ
diff --git a/gfx/stats/pages.pal b/gfx/stats/pages.pal
new file mode 100644
index 000000000..837e10cb0
--- /dev/null
+++ b/gfx/stats/pages.pal
@@ -0,0 +1,15 @@
+; pink
+ RGB 31, 31, 31
+ RGB 31, 19, 31
+ RGB 31, 15, 31
+ RGB 00, 00, 00
+; green
+ RGB 31, 31, 31
+ RGB 21, 31, 14
+ RGB 17, 31, 00
+ RGB 00, 00, 00
+; blue
+ RGB 31, 31, 31
+ RGB 17, 31, 31
+ RGB 17, 31, 31
+ RGB 00, 00, 00
diff --git a/gfx/stats/shiny.png b/gfx/stats/shiny.png
deleted file mode 100644
index 010aeafbf..000000000
--- a/gfx/stats/shiny.png
+++ /dev/null
Binary files differ
diff --git a/gfx/stats/stats.pal b/gfx/stats/stats.pal
new file mode 100644
index 000000000..5b12e02b9
--- /dev/null
+++ b/gfx/stats/stats.pal
@@ -0,0 +1,6 @@
+; pink
+ RGB 31, 19, 31
+; green
+ RGB 21, 31, 14
+; blue
+ RGB 17, 31, 31
diff --git a/gfx/stats/stats_tiles.png b/gfx/stats/stats_tiles.png
index 151704af5..5da4a008e 100644
--- a/gfx/stats/stats_tiles.png
+++ b/gfx/stats/stats_tiles.png
Binary files differ
diff --git a/tilesets/data.asm b/gfx/tilesets.asm
index c26b7d3d1..0f4dcbb34 100644
--- a/tilesets/data.asm
+++ b/gfx/tilesets.asm
@@ -1,3 +1,9 @@
+tilecoll: MACRO
+; used in data/tilesets/*_collision.asm
+ db COLL_\1, COLL_\2, COLL_\3, COLL_\4
+ENDM
+
+
SECTION "Tileset Data 1", ROMX
TilesetKantoGFX: ; 0x18000
@@ -5,11 +11,11 @@ INCBIN "gfx/tilesets/kanto.2bpp.lz"
; 0x18606
TilesetKantoMeta: ; 0x18606
-INCBIN "tilesets/kanto_metatiles.bin"
+INCBIN "data/tilesets/kanto_metatiles.bin"
; 0x18e06
TilesetKantoColl: ; 0x18e06
-INCLUDE "tilesets/kanto_collision.asm"
+INCLUDE "data/tilesets/kanto_collision.asm"
; 0x19006
Tileset0GFX: ; 0x19006
@@ -19,12 +25,12 @@ INCBIN "gfx/tilesets/johto_1.2bpp.lz"
Tileset0Meta: ; 0x19c0e
TilesetJohto1Meta: ; 0x19c0e
-INCBIN "tilesets/johto_1_metatiles.bin"
+INCBIN "data/tilesets/johto_1_metatiles.bin"
; 0x1a40e
Tileset0Coll: ; 0x1a40e
TilesetJohto1Coll: ; 0x1a40e
-INCLUDE "tilesets/johto_1_collision.asm"
+INCLUDE "data/tilesets/johto_1_collision.asm"
; 0x1a60e
TilesetIcePathGFX: ; 0x1a60e
@@ -32,11 +38,11 @@ INCBIN "gfx/tilesets/ice_path.2bpp.lz"
; 0x1af3e
TilesetIcePathMeta: ; 0x1af3e
-INCBIN "tilesets/ice_path_metatiles.bin"
+INCBIN "data/tilesets/ice_path_metatiles.bin"
; 0x1b33e
TilesetIcePathColl: ; 0x1b33e
-INCLUDE "tilesets/ice_path_collision.asm"
+INCLUDE "data/tilesets/ice_path_collision.asm"
; 0x1b43e
TilesetPlayersHouse2FGFX: ; 0x1b43e
@@ -44,11 +50,11 @@ INCBIN "gfx/tilesets/players_house_2f.2bpp.lz"
; 0x1b8fe
TilesetPlayersHouse2FMeta: ; 0x1b8fe
-INCBIN "tilesets/players_house_2f_metatiles.bin"
+INCBIN "data/tilesets/players_house_2f_metatiles.bin"
; 0x1bcfe
TilesetPlayersHouse2FColl: ; 0x1bcfe
-INCLUDE "tilesets/players_house_2f_collision.asm"
+INCLUDE "data/tilesets/players_house_2f_collision.asm"
; 0x1bdfe
@@ -59,11 +65,11 @@ INCBIN "gfx/tilesets/pokecenter.2bpp.lz"
; 0x1c73c
TilesetPokecenterMeta: ; 0x1c73c
-INCBIN "tilesets/pokecenter_metatiles.bin"
+INCBIN "data/tilesets/pokecenter_metatiles.bin"
; 0x1cb3c
TilesetPokecenterColl: ; 0x1cb3c
-INCLUDE "tilesets/pokecenter_collision.asm"
+INCLUDE "data/tilesets/pokecenter_collision.asm"
; 0x1cc3c
TilesetPortGFX: ; 0x1cc3c
@@ -71,11 +77,11 @@ INCBIN "gfx/tilesets/port.2bpp.lz"
; 0x1d04c
TilesetPortMeta: ; 0x1d04c
-INCBIN "tilesets/port_metatiles.bin"
+INCBIN "data/tilesets/port_metatiles.bin"
; 0x1d44c
TilesetPortColl: ; 0x1d44c
-INCLUDE "tilesets/port_collision.asm"
+INCLUDE "data/tilesets/port_collision.asm"
; 0x1d54c
TilesetPlayersHouseGFX: ; 0x1d54c
@@ -83,11 +89,11 @@ INCBIN "gfx/tilesets/players_house.2bpp.lz"
; 0x1d92c
TilesetPlayersHouseMeta: ; 0x1d92c
-INCBIN "tilesets/players_house_metatiles.bin"
+INCBIN "data/tilesets/players_house_metatiles.bin"
; 0x1dd2c
TilesetPlayersHouseColl: ; 0x1dd2c
-INCLUDE "tilesets/players_house_collision.asm"
+INCLUDE "data/tilesets/players_house_collision.asm"
; 0x1de2c
TilesetCeladonMansionGFX: ; 0x1de2c
@@ -95,11 +101,11 @@ INCBIN "gfx/tilesets/celadon_mansion.2bpp.lz"
; 0x1e58c
TilesetCeladonMansionMeta: ; 0x1e58c
-INCBIN "tilesets/celadon_mansion_metatiles.bin"
+INCBIN "data/tilesets/celadon_mansion_metatiles.bin"
; 0x1e98c
TilesetCeladonMansionColl: ; 0x1e98c
-INCLUDE "tilesets/celadon_mansion_collision.asm"
+INCLUDE "data/tilesets/celadon_mansion_collision.asm"
; 0x1ea8c
TilesetCaveGFX: ; 0x1ea8c
@@ -108,12 +114,12 @@ INCBIN "gfx/tilesets/cave.2bpp.lz"
TilesetCaveMeta: ; 0x1ee1c
TilesetWhirlIslandsMeta: ; 0x1ee1c
-INCBIN "tilesets/cave_metatiles.bin"
+INCBIN "data/tilesets/cave_metatiles.bin"
; 0x1f21c
TilesetCaveColl: ; 0x1f21c
TilesetWhirlIslandsColl: ; 0x1f21c
-INCLUDE "tilesets/cave_collision.asm"
+INCLUDE "data/tilesets/cave_collision.asm"
; 0x1f31c
@@ -124,11 +130,11 @@ INCBIN "gfx/tilesets/sprout_tower.2bpp.lz"
; 0x206e1
TilesetSproutTowerMeta: ; 0x206e1
-INCBIN "tilesets/sprout_tower_metatiles.bin"
+INCBIN "data/tilesets/sprout_tower_metatiles.bin"
; 0x20ae1
TilesetSproutTowerColl: ; 0x20ae1
-INCLUDE "tilesets/sprout_tower_collision.asm"
+INCLUDE "data/tilesets/sprout_tower_collision.asm"
; 0x20be1
TilesetLabGFX: ; 0x20be1
@@ -136,11 +142,11 @@ INCBIN "gfx/tilesets/lab.2bpp.lz"
; 0x213e1
TilesetLabMeta: ; 0x213e1
-INCBIN "tilesets/lab_metatiles.bin"
+INCBIN "data/tilesets/lab_metatiles.bin"
; 0x217e1
TilesetLabColl: ; 0x217e1
-INCLUDE "tilesets/lab_collision.asm"
+INCLUDE "data/tilesets/lab_collision.asm"
; 0x218e1
TilesetMartGFX: ; 0x218e1
@@ -148,11 +154,11 @@ INCBIN "gfx/tilesets/mart.2bpp.lz"
; 0x22031
TilesetMartMeta: ; 0x22031
-INCBIN "tilesets/mart_metatiles.bin"
+INCBIN "data/tilesets/mart_metatiles.bin"
; 0x22431
TilesetMartColl: ; 0x22431
-INCLUDE "tilesets/mart_collision.asm"
+INCLUDE "data/tilesets/mart_collision.asm"
; 0x22531
TilesetGameCornerGFX: ; 0x22531
@@ -160,11 +166,11 @@ INCBIN "gfx/tilesets/game_corner.2bpp.lz"
; 0x22af1
TilesetGameCornerMeta: ; 0x22af1
-INCBIN "tilesets/game_corner_metatiles.bin"
+INCBIN "data/tilesets/game_corner_metatiles.bin"
; 0x22ef1
TilesetGameCornerColl: ; 0x22ef1
-INCLUDE "tilesets/game_corner_collision.asm"
+INCLUDE "data/tilesets/game_corner_collision.asm"
; 0x22ff1
TilesetTrainStationGFX: ; 0x22ff1
@@ -172,15 +178,15 @@ INCBIN "gfx/tilesets/train_station.2bpp.lz"
; 0x23391
TilesetTrainStationMeta: ; 0x23391
-INCBIN "tilesets/train_station_metatiles.bin"
+INCBIN "data/tilesets/train_station_metatiles.bin"
; 0x23791
TilesetTrainStationColl: ; 0x23791
-INCLUDE "tilesets/train_station_collision.asm"
+INCLUDE "data/tilesets/train_station_collision.asm"
; 0x23891
TilesetIlexForestMeta: ; 0x23891
-INCBIN "tilesets/ilex_forest_metatiles.bin"
+INCBIN "data/tilesets/ilex_forest_metatiles.bin"
; 0x23b11
@@ -191,11 +197,11 @@ INCBIN "gfx/tilesets/gym_1.2bpp.lz"
; 0x304e0
TilesetGym1Meta: ; 0x304e0
-INCBIN "tilesets/gym_1_metatiles.bin"
+INCBIN "data/tilesets/gym_1_metatiles.bin"
; 0x308e0
TilesetGym1Coll: ; 0x308e0
-INCLUDE "tilesets/gym_1_collision.asm"
+INCLUDE "data/tilesets/gym_1_collision.asm"
; 0x309e0
TilesetParkGFX: ; 0x309e0
@@ -203,11 +209,11 @@ INCBIN "gfx/tilesets/park.2bpp.lz"
; 0x30e80
TilesetParkMeta: ; 0x30e80
-INCBIN "tilesets/park_metatiles.bin"
+INCBIN "data/tilesets/park_metatiles.bin"
; 0x31280
TilesetParkColl: ; 0x31280
-INCLUDE "tilesets/park_collision.asm"
+INCLUDE "data/tilesets/park_collision.asm"
; 0x31380
TilesetRadioTowerGFX: ; 0x31380
@@ -215,11 +221,11 @@ INCBIN "gfx/tilesets/radio_tower.2bpp.lz"
; 0x318e0
TilesetRadioTowerMeta: ; 0x318e0
-INCBIN "tilesets/radio_tower_metatiles.bin"
+INCBIN "data/tilesets/radio_tower_metatiles.bin"
; 0x31ce0
TilesetRadioTowerColl: ; 0x31ce0
-INCLUDE "tilesets/radio_tower_collision.asm"
+INCLUDE "data/tilesets/radio_tower_collision.asm"
; 0x31de0
TilesetUndergroundGFX: ; 0x31de0
@@ -227,11 +233,11 @@ INCBIN "gfx/tilesets/underground.2bpp.lz"
; 0x321b0
TilesetUndergroundMeta: ; 0x321b0
-INCBIN "tilesets/underground_metatiles.bin"
+INCBIN "data/tilesets/underground_metatiles.bin"
; 0x325b0
TilesetUndergroundColl: ; 0x325b0
-INCLUDE "tilesets/underground_collision.asm"
+INCLUDE "data/tilesets/underground_collision.asm"
; 0x326b0
TilesetWhirlIslandsGFX: ; 0x326b0
@@ -239,11 +245,11 @@ INCBIN "gfx/tilesets/whirl_islands.2bpp.lz"
; 0x329f0
UnusedTilesetWhirlIslandsMeta: ; 0x329f0
-INCBIN "tilesets/unused_whirl_islands_metatiles.bin"
+INCBIN "data/tilesets/unused_whirl_islands_metatiles.bin"
; 0x331f0
UnusedTilesetWhirlIslandsColl: ; 0x331f0
-INCLUDE "tilesets/unused_whirl_islands_collision.asm"
+INCLUDE "data/tilesets/unused_whirl_islands_collision.asm"
; 0x333f0
@@ -254,11 +260,11 @@ INCBIN "gfx/tilesets/pokecom_center.2bpp.lz"
; 0xb48a0
TilesetPokeComCenterMeta: ; 0xb48a0
-INCBIN "tilesets/pokecom_center_metatiles.bin"
+INCBIN "data/tilesets/pokecom_center_metatiles.bin"
; 0xb4ca0
TilesetPokeComCenterColl: ; 0xb4ca0
-INCLUDE "tilesets/pokecom_center_collision.asm"
+INCLUDE "data/tilesets/pokecom_center_collision.asm"
; 0xb4da0
TilesetBattleTowerGFX: ; 0xb4da0
@@ -266,11 +272,11 @@ INCBIN "gfx/tilesets/battle_tower.2bpp.lz"
; 0xb50e0
TilesetBattleTowerMeta: ; 0xb50e0
-INCBIN "tilesets/battle_tower_metatiles.bin"
+INCBIN "data/tilesets/battle_tower_metatiles.bin"
; 0xb54e0
TilesetBattleTowerColl: ; 0xb54e0
-INCLUDE "tilesets/battle_tower_collision.asm"
+INCLUDE "data/tilesets/battle_tower_collision.asm"
; 0xb55e0
TilesetGateGFX: ; 0xb55e0
@@ -278,11 +284,11 @@ INCBIN "gfx/tilesets/gate.2bpp.lz"
; 0xb59e0
TilesetGateMeta: ; 0xb59e0
-INCBIN "tilesets/gate_metatiles.bin"
+INCBIN "data/tilesets/gate_metatiles.bin"
; 0xb5de0
TilesetGateColl: ; 0xb5de0
-INCLUDE "tilesets/gate_collision.asm"
+INCLUDE "data/tilesets/gate_collision.asm"
; 0xb5ee0
TilesetJohto2GFX: ; 0xb5ee0
@@ -291,11 +297,11 @@ INCBIN "gfx/tilesets/johto_2.2bpp.lz"
; 0xb6ae8
TilesetJohto2Meta: ; 0xb6ae8
-INCBIN "tilesets/johto_2_metatiles.bin"
+INCBIN "data/tilesets/johto_2_metatiles.bin"
; 0xb72e8
TilesetJohto2Coll: ; 0xb72e8
-INCLUDE "tilesets/johto_2_collision.asm"
+INCLUDE "data/tilesets/johto_2_collision.asm"
; 0xb74e8
TilesetKurtsHouseGFX: ; 0xb74e8
@@ -303,11 +309,11 @@ INCBIN "gfx/tilesets/kurts_house.2bpp.lz"
; 0xb79a8
TilesetKurtsHouseMeta: ; 0xb79a8
-INCBIN "tilesets/kurts_house_metatiles.bin"
+INCBIN "data/tilesets/kurts_house_metatiles.bin"
; 0xb7da8
TilesetKurtsHouseColl: ; 0xb7da8
-INCLUDE "tilesets/kurts_house_collision.asm"
+INCLUDE "data/tilesets/kurts_house_collision.asm"
; 0xb7ea8
@@ -322,11 +328,11 @@ INCBIN "gfx/tilesets/olivine_gym.2bpp.lz"
; 0xdcc50
TilesetOlivineGymMeta: ; 0xdcc50
-INCBIN "tilesets/olivine_gym_metatiles.bin"
+INCBIN "data/tilesets/olivine_gym_metatiles.bin"
; 0xdd050
TilesetOlivineGymColl: ; 0xdd050
-INCLUDE "tilesets/olivine_gym_collision.asm"
+INCLUDE "data/tilesets/olivine_gym_collision.asm"
; 0xdd150
TilesetHouse1GFX: ; 0xdd150
@@ -334,11 +340,11 @@ INCBIN "gfx/tilesets/house_1.2bpp.lz"
; 0xdd600
TilesetHouse1Meta: ; 0xdd600
-INCBIN "tilesets/house_1_metatiles.bin"
+INCBIN "data/tilesets/house_1_metatiles.bin"
; 0xdda00
TilesetHouse1Coll: ; 0xdda00
-INCLUDE "tilesets/house_1_collision.asm"
+INCLUDE "data/tilesets/house_1_collision.asm"
; 0xddb00
TilesetLighthouseGFX: ; 0xddb00
@@ -346,15 +352,15 @@ INCBIN "gfx/tilesets/lighthouse.2bpp.lz"
; 0xddf70
TilesetLighthouseMeta: ; 0xddf70
-INCBIN "tilesets/lighthouse_metatiles.bin"
+INCBIN "data/tilesets/lighthouse_metatiles.bin"
; 0xde370
TilesetLighthouseColl: ; 0xde370
-INCLUDE "tilesets/lighthouse_collision.asm"
+INCLUDE "data/tilesets/lighthouse_collision.asm"
; 0xde470
TilesetIlexForestColl: ; 0xde470
-INCLUDE "tilesets/ilex_forest_collision.asm"
+INCLUDE "data/tilesets/ilex_forest_collision.asm"
; 0xde570
TilesetPowerPlantGFX: ; 0xde570
@@ -362,23 +368,23 @@ INCBIN "gfx/tilesets/power_plant.2bpp.lz"
; 0xde990
TilesetPowerPlantMeta: ; 0xde990
-INCBIN "tilesets/power_plant_metatiles.bin"
+INCBIN "data/tilesets/power_plant_metatiles.bin"
; 0xded90
TilesetPowerPlantColl: ; 0xded90
-INCLUDE "tilesets/power_plant_collision.asm"
+INCLUDE "data/tilesets/power_plant_collision.asm"
; 0xdee90
TilesetBattleTowerOutsideMeta: ; 0xdee90
-INCBIN "tilesets/battle_tower_outside_metatiles.bin"
+INCBIN "data/tilesets/battle_tower_outside_metatiles.bin"
; 0xdf690
TilesetBattleTowerOutsideColl: ; 0xdf690
-INCLUDE "tilesets/battle_tower_outside_collision.asm"
+INCLUDE "data/tilesets/battle_tower_outside_collision.asm"
; 0xdf890
TilesetBetaWordRoomMeta: ; 0xdf890
-INCBIN "tilesets/beta_word_room_metatiles.bin"
+INCBIN "data/tilesets/beta_word_room_metatiles.bin"
; 0xdfc90
TilesetBetaWordRoomColl: ; 0xdfc90
@@ -386,7 +392,7 @@ TilesetHoOhWordRoomColl: ; 0xdfc90
TilesetKabutoWordRoomColl: ; 0xdfc90
TilesetOmanyteWordRoomColl: ; 0xdfc90
TilesetAerodactylWordRoomColl: ; 0xdfc90
-INCLUDE "tilesets/beta_word_room_collision.asm"
+INCLUDE "data/tilesets/beta_word_room_collision.asm"
; 0xdfd90
@@ -402,28 +408,28 @@ INCBIN "gfx/tilesets/ruins_of_alph.2bpp.lz"
; 0x1dd1a9
TilesetRuinsOfAlphMeta: ; 0x1dd1a9
-INCBIN "tilesets/ruins_of_alph_metatiles.bin"
+INCBIN "data/tilesets/ruins_of_alph_metatiles.bin"
; 0x1dd5a9
TilesetRuinsOfAlphColl: ; 0x1dd5a9
-INCLUDE "tilesets/ruins_of_alph_collision.asm"
+INCLUDE "data/tilesets/ruins_of_alph_collision.asm"
; 0x1dd6a9
SECTION "Tileset Data 8", ROMX
TilesetHoOhWordRoomMeta: ; 0x1e0000
-INCBIN "tilesets/ho_oh_word_room_metatiles.bin"
+INCBIN "data/tilesets/ho_oh_word_room_metatiles.bin"
; 0x1e0400
TilesetKabutoWordRoomMeta: ; 0x1e0400
-INCBIN "tilesets/kabuto_word_room_metatiles.bin"
+INCBIN "data/tilesets/kabuto_word_room_metatiles.bin"
; 0x1e0800
TilesetOmanyteWordRoomMeta: ; 0x1e0800
-INCBIN "tilesets/omanyte_word_room_metatiles.bin"
+INCBIN "data/tilesets/omanyte_word_room_metatiles.bin"
; 0x1e0c00
TilesetAerodactylWordRoomMeta: ; 0x1e0c00
-INCBIN "tilesets/aerodactyl_word_room_metatiles.bin"
+INCBIN "data/tilesets/aerodactyl_word_room_metatiles.bin"
; 0x1e1000
diff --git a/gfx/tilesets/aerodactyl_word_room.png b/gfx/tilesets/aerodactyl_word_room.png
index f41866c58..7ae272358 100644
--- a/gfx/tilesets/aerodactyl_word_room.png
+++ b/gfx/tilesets/aerodactyl_word_room.png
Binary files differ
diff --git a/tilesets/aerodactyl_word_room_palette_map.asm b/gfx/tilesets/aerodactyl_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/aerodactyl_word_room_palette_map.asm
+++ b/gfx/tilesets/aerodactyl_word_room_palette_map.asm
diff --git a/data/palettes/tilesets/battle_tower.pal b/gfx/tilesets/battle_tower.pal
index 4e71a5575..4e71a5575 100644
--- a/data/palettes/tilesets/battle_tower.pal
+++ b/gfx/tilesets/battle_tower.pal
diff --git a/gfx/tilesets/battle_tower.png b/gfx/tilesets/battle_tower.png
index 1cd57402d..cf9e12d53 100644
--- a/gfx/tilesets/battle_tower.png
+++ b/gfx/tilesets/battle_tower.png
Binary files differ
diff --git a/gfx/tilesets/battle_tower_outside.png b/gfx/tilesets/battle_tower_outside.png
index 126573b7b..1c080ff45 100644
--- a/gfx/tilesets/battle_tower_outside.png
+++ b/gfx/tilesets/battle_tower_outside.png
Binary files differ
diff --git a/tilesets/battle_tower_outside_palette_map.asm b/gfx/tilesets/battle_tower_outside_palette_map.asm
index dfc74a9c0..dfc74a9c0 100644
--- a/tilesets/battle_tower_outside_palette_map.asm
+++ b/gfx/tilesets/battle_tower_outside_palette_map.asm
diff --git a/tilesets/battle_tower_palette_map.asm b/gfx/tilesets/battle_tower_palette_map.asm
index 1abce2a16..1abce2a16 100644
--- a/tilesets/battle_tower_palette_map.asm
+++ b/gfx/tilesets/battle_tower_palette_map.asm
diff --git a/gfx/tilesets/beta_word_room.png b/gfx/tilesets/beta_word_room.png
index f41866c58..7ae272358 100644
--- a/gfx/tilesets/beta_word_room.png
+++ b/gfx/tilesets/beta_word_room.png
Binary files differ
diff --git a/tilesets/beta_word_room_palette_map.asm b/gfx/tilesets/beta_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/beta_word_room_palette_map.asm
+++ b/gfx/tilesets/beta_word_room_palette_map.asm
diff --git a/data/palettes/overworld/tileset_bg.pal b/gfx/tilesets/bg_tiles.pal
index e56746536..e21561c74 100644
--- a/data/palettes/overworld/tileset_bg.pal
+++ b/gfx/tilesets/bg_tiles.pal
@@ -58,4 +58,4 @@
RGB 15, 13, 27
RGB 10, 09, 20
RGB 04, 03, 18
- RGB 00, 00, 00 \ No newline at end of file
+ RGB 00, 00, 00
diff --git a/gfx/tilesets/cave.png b/gfx/tilesets/cave.png
index 0e5bdee7e..fe15a740e 100644
--- a/gfx/tilesets/cave.png
+++ b/gfx/tilesets/cave.png
Binary files differ
diff --git a/tilesets/cave_palette_map.asm b/gfx/tilesets/cave_palette_map.asm
index 73c09ebe5..73c09ebe5 100644
--- a/tilesets/cave_palette_map.asm
+++ b/gfx/tilesets/cave_palette_map.asm
diff --git a/gfx/tilesets/celadon_mansion.png b/gfx/tilesets/celadon_mansion.png
index 7dde8574e..44e697a1b 100644
--- a/gfx/tilesets/celadon_mansion.png
+++ b/gfx/tilesets/celadon_mansion.png
Binary files differ
diff --git a/gfx/tilesets/celadon_mansion_1.pal b/gfx/tilesets/celadon_mansion_1.pal
new file mode 100644
index 000000000..1ed1de75f
--- /dev/null
+++ b/gfx/tilesets/celadon_mansion_1.pal
@@ -0,0 +1,44 @@
+ RGB 30, 28, 26
+ RGB 19, 19, 19
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+
+ RGB 18, 24, 09
+ RGB 15, 20, 01
+ RGB 09, 13, 00
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 15, 16, 31
+ RGB 09, 09, 31
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+
+ RGB 26, 24, 17
+ RGB 21, 17, 07
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 17, 19, 31
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+ RGB 05, 05, 16
+ RGB 08, 19, 28
+ RGB 00, 00, 00
+ RGB 31, 31, 31
diff --git a/gfx/tilesets/celadon_mansion_2.pal b/gfx/tilesets/celadon_mansion_2.pal
new file mode 100644
index 000000000..ad5c5e4db
--- /dev/null
+++ b/gfx/tilesets/celadon_mansion_2.pal
@@ -0,0 +1,4 @@
+ RGB 25, 24, 23
+ RGB 20, 19, 19
+ RGB 14, 16, 31
+ RGB 07, 07, 07
diff --git a/tilesets/celadon_mansion_palette_map.asm b/gfx/tilesets/celadon_mansion_palette_map.asm
index 2bd27ad22..2bd27ad22 100644
--- a/tilesets/celadon_mansion_palette_map.asm
+++ b/gfx/tilesets/celadon_mansion_palette_map.asm
diff --git a/gfx/tilesets/game_corner.png b/gfx/tilesets/game_corner.png
index 776900638..d519dd636 100644
--- a/gfx/tilesets/game_corner.png
+++ b/gfx/tilesets/game_corner.png
Binary files differ
diff --git a/tilesets/game_corner_palette_map.asm b/gfx/tilesets/game_corner_palette_map.asm
index 34bb9f6f0..34bb9f6f0 100644
--- a/tilesets/game_corner_palette_map.asm
+++ b/gfx/tilesets/game_corner_palette_map.asm
diff --git a/gfx/tilesets/gate.png b/gfx/tilesets/gate.png
index b8f2db2d2..5036f9066 100644
--- a/gfx/tilesets/gate.png
+++ b/gfx/tilesets/gate.png
Binary files differ
diff --git a/tilesets/gate_palette_map.asm b/gfx/tilesets/gate_palette_map.asm
index 7854d3a81..7854d3a81 100644
--- a/tilesets/gate_palette_map.asm
+++ b/gfx/tilesets/gate_palette_map.asm
diff --git a/gfx/tilesets/gym_1.png b/gfx/tilesets/gym_1.png
index 582b9365d..27f64afa2 100644
--- a/gfx/tilesets/gym_1.png
+++ b/gfx/tilesets/gym_1.png
Binary files differ
diff --git a/tilesets/gym_1_palette_map.asm b/gfx/tilesets/gym_1_palette_map.asm
index b20f49195..b20f49195 100644
--- a/tilesets/gym_1_palette_map.asm
+++ b/gfx/tilesets/gym_1_palette_map.asm
diff --git a/gfx/tilesets/ho_oh_word_room.png b/gfx/tilesets/ho_oh_word_room.png
index f41866c58..7ae272358 100644
--- a/gfx/tilesets/ho_oh_word_room.png
+++ b/gfx/tilesets/ho_oh_word_room.png
Binary files differ
diff --git a/tilesets/ho_oh_word_room_palette_map.asm b/gfx/tilesets/ho_oh_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/ho_oh_word_room_palette_map.asm
+++ b/gfx/tilesets/ho_oh_word_room_palette_map.asm
diff --git a/data/palettes/tilesets/house_1.pal b/gfx/tilesets/house_1.pal
index a9f8b74b6..a9f8b74b6 100644
--- a/data/palettes/tilesets/house_1.pal
+++ b/gfx/tilesets/house_1.pal
diff --git a/gfx/tilesets/house_1.png b/gfx/tilesets/house_1.png
index 3ab7b5ce8..ce3547bb8 100644
--- a/gfx/tilesets/house_1.png
+++ b/gfx/tilesets/house_1.png
Binary files differ
diff --git a/tilesets/house_1_palette_map.asm b/gfx/tilesets/house_1_palette_map.asm
index ce7b988b7..ce7b988b7 100644
--- a/tilesets/house_1_palette_map.asm
+++ b/gfx/tilesets/house_1_palette_map.asm
diff --git a/data/palettes/tilesets/ice_path.pal b/gfx/tilesets/ice_path.pal
index cb7659f50..cb7659f50 100644
--- a/data/palettes/tilesets/ice_path.pal
+++ b/gfx/tilesets/ice_path.pal
diff --git a/gfx/tilesets/ice_path.png b/gfx/tilesets/ice_path.png
index d70eb53be..70dea39f5 100644
--- a/gfx/tilesets/ice_path.png
+++ b/gfx/tilesets/ice_path.png
Binary files differ
diff --git a/tilesets/ice_path_palette_map.asm b/gfx/tilesets/ice_path_palette_map.asm
index 985844071..985844071 100644
--- a/tilesets/ice_path_palette_map.asm
+++ b/gfx/tilesets/ice_path_palette_map.asm
diff --git a/gfx/tilesets/ilex_forest.png b/gfx/tilesets/ilex_forest.png
index a85cc0394..853625944 100644
--- a/gfx/tilesets/ilex_forest.png
+++ b/gfx/tilesets/ilex_forest.png
Binary files differ
diff --git a/tilesets/ilex_forest_palette_map.asm b/gfx/tilesets/ilex_forest_palette_map.asm
index 696788084..696788084 100644
--- a/tilesets/ilex_forest_palette_map.asm
+++ b/gfx/tilesets/ilex_forest_palette_map.asm
diff --git a/gfx/tilesets/johto_1.png b/gfx/tilesets/johto_1.png
index 0fc2db12f..62ceb23a0 100644
--- a/gfx/tilesets/johto_1.png
+++ b/gfx/tilesets/johto_1.png
Binary files differ
diff --git a/tilesets/johto_1_palette_map.asm b/gfx/tilesets/johto_1_palette_map.asm
index 62fbd2d00..62fbd2d00 100644
--- a/tilesets/johto_1_palette_map.asm
+++ b/gfx/tilesets/johto_1_palette_map.asm
diff --git a/gfx/tilesets/johto_2.png b/gfx/tilesets/johto_2.png
index 126573b7b..1c080ff45 100644
--- a/gfx/tilesets/johto_2.png
+++ b/gfx/tilesets/johto_2.png
Binary files differ
diff --git a/tilesets/johto_2_palette_map.asm b/gfx/tilesets/johto_2_palette_map.asm
index f2af7a92d..f2af7a92d 100644
--- a/tilesets/johto_2_palette_map.asm
+++ b/gfx/tilesets/johto_2_palette_map.asm
diff --git a/gfx/tilesets/kabuto_word_room.png b/gfx/tilesets/kabuto_word_room.png
index f41866c58..7ae272358 100644
--- a/gfx/tilesets/kabuto_word_room.png
+++ b/gfx/tilesets/kabuto_word_room.png
Binary files differ
diff --git a/tilesets/kabuto_word_room_palette_map.asm b/gfx/tilesets/kabuto_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/kabuto_word_room_palette_map.asm
+++ b/gfx/tilesets/kabuto_word_room_palette_map.asm
diff --git a/gfx/tilesets/kanto.png b/gfx/tilesets/kanto.png
index 08b2cbeea..a3036406e 100644
--- a/gfx/tilesets/kanto.png
+++ b/gfx/tilesets/kanto.png
Binary files differ
diff --git a/tilesets/kanto_palette_map.asm b/gfx/tilesets/kanto_palette_map.asm
index e3e497fb9..e3e497fb9 100644
--- a/tilesets/kanto_palette_map.asm
+++ b/gfx/tilesets/kanto_palette_map.asm
diff --git a/gfx/tilesets/kurts_house.png b/gfx/tilesets/kurts_house.png
index 3d6f1b511..bda1f7983 100644
--- a/gfx/tilesets/kurts_house.png
+++ b/gfx/tilesets/kurts_house.png
Binary files differ
diff --git a/tilesets/kurts_house_palette_map.asm b/gfx/tilesets/kurts_house_palette_map.asm
index 5daa0da6b..5daa0da6b 100644
--- a/tilesets/kurts_house_palette_map.asm
+++ b/gfx/tilesets/kurts_house_palette_map.asm
diff --git a/gfx/tilesets/lab.png b/gfx/tilesets/lab.png
index 418a068fa..75301c7e2 100644
--- a/gfx/tilesets/lab.png
+++ b/gfx/tilesets/lab.png
Binary files differ
diff --git a/tilesets/lab_palette_map.asm b/gfx/tilesets/lab_palette_map.asm
index 24399c6ea..24399c6ea 100644
--- a/tilesets/lab_palette_map.asm
+++ b/gfx/tilesets/lab_palette_map.asm
diff --git a/gfx/tilesets/safari/1.png b/gfx/tilesets/lava/1.png
index c5b500ccc..c5b500ccc 100644
--- a/gfx/tilesets/safari/1.png
+++ b/gfx/tilesets/lava/1.png
Binary files differ
diff --git a/gfx/tilesets/safari/2.png b/gfx/tilesets/lava/2.png
index 1512e35ad..1512e35ad 100644
--- a/gfx/tilesets/safari/2.png
+++ b/gfx/tilesets/lava/2.png
Binary files differ
diff --git a/gfx/tilesets/safari/3.png b/gfx/tilesets/lava/3.png
index 449c2a317..449c2a317 100644
--- a/gfx/tilesets/safari/3.png
+++ b/gfx/tilesets/lava/3.png
Binary files differ
diff --git a/gfx/tilesets/safari/4.png b/gfx/tilesets/lava/4.png
index 8e4c8e0e5..8e4c8e0e5 100644
--- a/gfx/tilesets/safari/4.png
+++ b/gfx/tilesets/lava/4.png
Binary files differ
diff --git a/gfx/tilesets/lighthouse.png b/gfx/tilesets/lighthouse.png
index 920ee30ec..0da4b3919 100644
--- a/gfx/tilesets/lighthouse.png
+++ b/gfx/tilesets/lighthouse.png
Binary files differ
diff --git a/tilesets/lighthouse_palette_map.asm b/gfx/tilesets/lighthouse_palette_map.asm
index 5f80e3a4d..5f80e3a4d 100644
--- a/tilesets/lighthouse_palette_map.asm
+++ b/gfx/tilesets/lighthouse_palette_map.asm
diff --git a/gfx/tilesets/mart.png b/gfx/tilesets/mart.png
index 4053283bc..d4ef69d2a 100644
--- a/gfx/tilesets/mart.png
+++ b/gfx/tilesets/mart.png
Binary files differ
diff --git a/tilesets/mart_palette_map.asm b/gfx/tilesets/mart_palette_map.asm
index 991510d12..991510d12 100644
--- a/tilesets/mart_palette_map.asm
+++ b/gfx/tilesets/mart_palette_map.asm
diff --git a/gfx/tilesets/olivine_gym.png b/gfx/tilesets/olivine_gym.png
index 350c04932..e32c2fb28 100644
--- a/gfx/tilesets/olivine_gym.png
+++ b/gfx/tilesets/olivine_gym.png
Binary files differ
diff --git a/tilesets/olivine_gym_palette_map.asm b/gfx/tilesets/olivine_gym_palette_map.asm
index 551a09351..551a09351 100644
--- a/tilesets/olivine_gym_palette_map.asm
+++ b/gfx/tilesets/olivine_gym_palette_map.asm
diff --git a/gfx/tilesets/omanyte_word_room.png b/gfx/tilesets/omanyte_word_room.png
index f41866c58..7ae272358 100644
--- a/gfx/tilesets/omanyte_word_room.png
+++ b/gfx/tilesets/omanyte_word_room.png
Binary files differ
diff --git a/tilesets/omanyte_word_room_palette_map.asm b/gfx/tilesets/omanyte_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/omanyte_word_room_palette_map.asm
+++ b/gfx/tilesets/omanyte_word_room_palette_map.asm
diff --git a/gfx/tilesets/palette_maps.asm b/gfx/tilesets/palette_maps.asm
new file mode 100644
index 000000000..b67daeb8d
--- /dev/null
+++ b/gfx/tilesets/palette_maps.asm
@@ -0,0 +1,149 @@
+tilepal: MACRO
+; used in gfx/tilesets/*_palette_map.asm
+; vram bank, pals
+x = \1 << OAM_TILE_BANK
+rept (_NARG +- 1) / 2
+ dn (x | PAL_BG_\3), (x | PAL_BG_\2)
+ shift
+ shift
+endr
+ENDM
+
+
+TilesetKantoPalMap: ; 0x4c075
+INCLUDE "gfx/tilesets/kanto_palette_map.asm"
+; 0x4c0e5
+
+Tileset0PalMap: ; 0x4c0e5
+TilesetJohto1PalMap: ; 0x4c0e5
+INCLUDE "gfx/tilesets/johto_1_palette_map.asm"
+; 0x4c155
+
+TilesetJohto2PalMap: ; 0x4c155
+INCLUDE "gfx/tilesets/johto_2_palette_map.asm"
+; 0x4c1c5
+
+TilesetHouse1PalMap: ; 0x4c1c5
+INCLUDE "gfx/tilesets/house_1_palette_map.asm"
+; 0x4c235
+
+TilesetPlayersHousePalMap: ; 0x4c235
+INCLUDE "gfx/tilesets/players_house_palette_map.asm"
+; 0x4c2a5
+
+TilesetPokecenterPalMap: ; 0x4c2a5
+INCLUDE "gfx/tilesets/pokecenter_palette_map.asm"
+; 0x4c315
+
+TilesetGatePalMap: ; 0x4c315
+INCLUDE "gfx/tilesets/gate_palette_map.asm"
+; 0x4c385
+
+TilesetPortPalMap: ; 0x4c385
+INCLUDE "gfx/tilesets/port_palette_map.asm"
+; 0x4c3f5
+
+TilesetLabPalMap: ; 0x4c3f5
+INCLUDE "gfx/tilesets/lab_palette_map.asm"
+; 0x4c465
+
+TilesetPowerPlantPalMap: ; 0x4c465
+INCLUDE "gfx/tilesets/power_plant_palette_map.asm"
+; 0x4c4d5
+
+TilesetMartPalMap: ; 0x4c4d5
+INCLUDE "gfx/tilesets/mart_palette_map.asm"
+; 0x4c545
+
+TilesetCeladonMansionPalMap: ; 0x4c545
+INCLUDE "gfx/tilesets/celadon_mansion_palette_map.asm"
+; 0x4c5b5
+
+TilesetGameCornerPalMap: ; 0x4c5b5
+INCLUDE "gfx/tilesets/game_corner_palette_map.asm"
+; 0x4c625
+
+TilesetGym1PalMap: ; 0x4c625
+INCLUDE "gfx/tilesets/gym_1_palette_map.asm"
+; 0x4c695
+
+TilesetKurtsHousePalMap: ; 0x4c695
+INCLUDE "gfx/tilesets/kurts_house_palette_map.asm"
+; 0x4c705
+
+TilesetSproutTowerPalMap: ; 0x4c705
+INCLUDE "gfx/tilesets/sprout_tower_palette_map.asm"
+; 0x4c775
+
+TilesetCavePalMap: ; 0x4c775
+TilesetWhirlIslandsPalMap: ; 0x4c775
+INCLUDE "gfx/tilesets/cave_palette_map.asm"
+; 0x4c7e5
+
+TilesetParkPalMap: ; 0x4c7e5
+INCLUDE "gfx/tilesets/park_palette_map.asm"
+; 0x4c855
+
+TilesetRuinsOfAlphPalMap: ; 0x4c855
+TilesetBetaWordRoomPalMap: ; 0x4c855
+TilesetHoOhWordRoomPalMap: ; 0x4c855
+TilesetKabutoWordRoomPalMap: ; 0x4c855
+TilesetOmanyteWordRoomPalMap: ; 0x4c855
+TilesetAerodactylWordRoomPalMap: ; 0x4c855
+INCLUDE "gfx/tilesets/ruins_of_alph_palette_map.asm"
+; 0x4c8c5
+
+TilesetRadioTowerPalMap: ; 0x4c8c5
+INCLUDE "gfx/tilesets/radio_tower_palette_map.asm"
+; 0x4c935
+
+TilesetTrainStationPalMap: ; 0x4c935
+INCLUDE "gfx/tilesets/train_station_palette_map.asm"
+; 0x4c9a5
+
+TilesetUndergroundPalMap: ; 0x4c9a5
+INCLUDE "gfx/tilesets/underground_palette_map.asm"
+; 0x4ca15
+
+TilesetOlivineGymPalMap: ; 0x4ca15
+INCLUDE "gfx/tilesets/olivine_gym_palette_map.asm"
+; 0x4ca85
+
+TilesetLighthousePalMap: ; 0x4ca85
+INCLUDE "gfx/tilesets/lighthouse_palette_map.asm"
+; 0x4caf5
+
+TilesetPlayersHouse2FPalMap: ; 0x4caf5
+INCLUDE "gfx/tilesets/players_house_2f_palette_map.asm"
+; 0x4cb65
+
+UnusedMuseumPalMap: ; 0x4cb65
+INCLUDE "gfx/tilesets/unused_museum_palette_map.asm"
+; 4cbd5
+
+TilesetIcePathPalMap: ; 0x4cbd5
+INCLUDE "gfx/tilesets/ice_path_palette_map.asm"
+; 0x4cc45
+
+TilesetIlexForestPalMap: ; 0x4cc45
+INCLUDE "gfx/tilesets/ilex_forest_palette_map.asm"
+; 0x4ccb5
+
+TilesetPokeComCenterPalMap: ; 0x4ccb5
+INCLUDE "gfx/tilesets/pokecom_center_palette_map.asm"
+; 0x4cd25
+
+TilesetBattleTowerPalMap: ; 0x4cd25
+INCLUDE "gfx/tilesets/battle_tower_palette_map.asm"
+; 0x4cd95
+
+TilesetBattleTowerOutsidePalMap: ; 0x4cd95
+INCLUDE "gfx/tilesets/battle_tower_outside_palette_map.asm"
+; 0x4ce05
+
+; unused
+; 0x4ce05
+rept 26
+ db $06
+endr
+; 0x4ce1f
diff --git a/gfx/tilesets/park.png b/gfx/tilesets/park.png
index 7a4a5f8eb..830affef7 100644
--- a/gfx/tilesets/park.png
+++ b/gfx/tilesets/park.png
Binary files differ
diff --git a/tilesets/park_palette_map.asm b/gfx/tilesets/park_palette_map.asm
index f9c65ef89..f9c65ef89 100644
--- a/tilesets/park_palette_map.asm
+++ b/gfx/tilesets/park_palette_map.asm
diff --git a/gfx/tilesets/players_house.png b/gfx/tilesets/players_house.png
index b49f799d8..76e470781 100644
--- a/gfx/tilesets/players_house.png
+++ b/gfx/tilesets/players_house.png
Binary files differ
diff --git a/gfx/tilesets/players_house_2f.png b/gfx/tilesets/players_house_2f.png
index e46a847b9..a0f268eb5 100644
--- a/gfx/tilesets/players_house_2f.png
+++ b/gfx/tilesets/players_house_2f.png
Binary files differ
diff --git a/tilesets/players_house_2f_palette_map.asm b/gfx/tilesets/players_house_2f_palette_map.asm
index 1c0cb1f08..1c0cb1f08 100644
--- a/tilesets/players_house_2f_palette_map.asm
+++ b/gfx/tilesets/players_house_2f_palette_map.asm
diff --git a/tilesets/players_house_palette_map.asm b/gfx/tilesets/players_house_palette_map.asm
index 5d089835b..5d089835b 100644
--- a/tilesets/players_house_palette_map.asm
+++ b/gfx/tilesets/players_house_palette_map.asm
diff --git a/gfx/tilesets/pokecenter.png b/gfx/tilesets/pokecenter.png
index d4084ebd4..69cacdb7b 100644
--- a/gfx/tilesets/pokecenter.png
+++ b/gfx/tilesets/pokecenter.png
Binary files differ
diff --git a/tilesets/pokecenter_palette_map.asm b/gfx/tilesets/pokecenter_palette_map.asm
index 78508b59e..78508b59e 100644
--- a/tilesets/pokecenter_palette_map.asm
+++ b/gfx/tilesets/pokecenter_palette_map.asm
diff --git a/data/palettes/tilesets/pokecom_center.pal b/gfx/tilesets/pokecom_center.pal
index 9fe7b765a..9fe7b765a 100644
--- a/data/palettes/tilesets/pokecom_center.pal
+++ b/gfx/tilesets/pokecom_center.pal
diff --git a/gfx/tilesets/pokecom_center.png b/gfx/tilesets/pokecom_center.png
index 889b02727..fbbf270b3 100644
--- a/gfx/tilesets/pokecom_center.png
+++ b/gfx/tilesets/pokecom_center.png
Binary files differ
diff --git a/tilesets/pokecom_center_palette_map.asm b/gfx/tilesets/pokecom_center_palette_map.asm
index 75ee649f9..75ee649f9 100644
--- a/tilesets/pokecom_center_palette_map.asm
+++ b/gfx/tilesets/pokecom_center_palette_map.asm
diff --git a/gfx/tilesets/port.png b/gfx/tilesets/port.png
index 6990a7d7b..3e05e0da7 100644
--- a/gfx/tilesets/port.png
+++ b/gfx/tilesets/port.png
Binary files differ
diff --git a/tilesets/port_palette_map.asm b/gfx/tilesets/port_palette_map.asm
index 6bfdf4686..6bfdf4686 100644
--- a/tilesets/port_palette_map.asm
+++ b/gfx/tilesets/port_palette_map.asm
diff --git a/gfx/tilesets/power_plant.png b/gfx/tilesets/power_plant.png
index b72e3f401..e2e501077 100644
--- a/gfx/tilesets/power_plant.png
+++ b/gfx/tilesets/power_plant.png
Binary files differ
diff --git a/tilesets/power_plant_palette_map.asm b/gfx/tilesets/power_plant_palette_map.asm
index f79f9c01b..f79f9c01b 100644
--- a/tilesets/power_plant_palette_map.asm
+++ b/gfx/tilesets/power_plant_palette_map.asm
diff --git a/data/palettes/tilesets/radio_tower.pal b/gfx/tilesets/radio_tower.pal
index 5799b6f77..5799b6f77 100644
--- a/data/palettes/tilesets/radio_tower.pal
+++ b/gfx/tilesets/radio_tower.pal
diff --git a/gfx/tilesets/radio_tower.png b/gfx/tilesets/radio_tower.png
index 8d2d32e1f..4f823f756 100644
--- a/gfx/tilesets/radio_tower.png
+++ b/gfx/tilesets/radio_tower.png
Binary files differ
diff --git a/tilesets/radio_tower_palette_map.asm b/gfx/tilesets/radio_tower_palette_map.asm
index 3530f7479..3530f7479 100644
--- a/tilesets/radio_tower_palette_map.asm
+++ b/gfx/tilesets/radio_tower_palette_map.asm
diff --git a/gfx/tilesets/roofs.pal b/gfx/tilesets/roofs.pal
new file mode 100644
index 000000000..6daf87cb6
--- /dev/null
+++ b/gfx/tilesets/roofs.pal
@@ -0,0 +1,107 @@
+; group 0 (unused)
+ RGB 21,21,21, 11,11,11 ; morn/day
+ RGB 21,21,21, 11,11,11; nite
+
+; group 1 (Olivine)
+ RGB 14,17,31, 07,11,15 ; morn/day
+ RGB 09,09,17, 05,07,13; nite
+
+; group 2 (Mahogany)
+ RGB 12,19,00, 06,10,00 ; morn/day
+ RGB 06,09,07, 04,05,06; nite
+
+; group 3 (dungeons)
+ RGB 21,21,21, 11,11,11 ; morn/day
+ RGB 21,21,21, 17,08,07; nite
+
+; group 4 (Ecruteak)
+ RGB 31,19,00, 27,10,05 ; morn/day
+ RGB 15,07,02, 11,04,02; nite
+
+; group 5 (Blackthorn)
+ RGB 11,10,16, 05,06,07 ; morn/day
+ RGB 03,04,08, 00,00,00; nite
+
+; group 6 (Cinnabar)
+ RGB 31,10,00, 18,06,00 ; morn/day
+ RGB 18,05,09, 17,08,07; nite
+
+; group 7 (Cerulean)
+ RGB 17,27,31, 05,15,31 ; morn/day
+ RGB 07,08,22, 07,07,16; nite
+
+; group 8 (Azalea)
+ RGB 22,20,10, 17,14,03 ; morn/day
+ RGB 11,11,05, 10,09,07; nite
+
+; group 9 (Lake of Rage)
+ RGB 31,08,04, 09,09,08 ; morn/day
+ RGB 18,05,09, 09,09,08; nite
+
+; group 10 (Violet)
+ RGB 24,14,31, 13,07,21 ; morn/day
+ RGB 12,03,18, 09,03,15; nite
+
+; group 11 (Goldenrod)
+ RGB 25,25,00, 20,17,08 ; morn/day
+ RGB 12,12,00, 10,09,05; nite
+
+; group 12 (Vermilion)
+ RGB 27,23,01, 23,11,00 ; morn/day
+ RGB 15,11,01, 11,10,01; nite
+
+; group 13 (Pallet)
+ RGB 27,28,31, 17,19,22 ; morn/day
+ RGB 14,14,18, 10,09,13; nite
+
+; group 14 (Pewter)
+ RGB 19,19,16, 10,12,15 ; morn/day
+ RGB 09,09,11, 04,05,07; nite
+
+; group 15 (Mount Moon Square)
+ RGB 14,17,31, 07,11,15 ; morn/day
+ RGB 09,13,19, 07,07,16; nite
+
+; group 16 (Indigo)
+ RGB 21,21,21, 13,13,13 ; morn/day
+ RGB 11,11,19, 07,07,12; nite
+
+; group 17 (Fuchsia)
+ RGB 31,18,29, 17,13,20 ; morn/day
+ RGB 14,06,12, 11,03,10; nite
+
+; group 18 (Lavender)
+ RGB 23,15,31, 16,05,31 ; morn/day
+ RGB 12,07,17, 08,06,10; nite
+
+; group 19 (Silver Cave)
+ RGB 21,21,25, 16,16,16 ; morn/day
+ RGB 13,13,13, 07,07,07; nite
+
+; group 20 (Cable Club)
+ RGB 21,21,21, 11,11,11 ; morn/day
+ RGB 21,21,21, 11,11,11; nite
+
+; group 21 (Celadon)
+ RGB 19,31,15, 31,22,02 ; morn/day
+ RGB 12,13,09, 09,12,03; nite
+
+; group 22 (Cianwood)
+ RGB 15,10,31, 07,05,15 ; morn/day
+ RGB 06,05,17, 02,02,08; nite
+
+; group 23 (Viridian)
+ RGB 21,31,07, 13,25,04 ; morn/day
+ RGB 09,14,08, 06,10,04; nite
+
+; group 24 (New Bark)
+ RGB 20,31,14, 11,23,05 ; morn/day
+ RGB 09,13,08, 06,09,04; nite
+
+; group 25 (Saffron)
+ RGB 31,26,00, 31,15,00 ; morn/day
+ RGB 13,13,01, 08,08,01; nite
+
+; group 26 (Cherrygrove)
+ RGB 31,14,28, 31,05,21 ; morn/day
+ RGB 14,07,17, 13,00,08; nite
diff --git a/gfx/tilesets/ruins_of_alph.png b/gfx/tilesets/ruins_of_alph.png
index f41866c58..7ae272358 100644
--- a/gfx/tilesets/ruins_of_alph.png
+++ b/gfx/tilesets/ruins_of_alph.png
Binary files differ
diff --git a/tilesets/ruins_of_alph_palette_map.asm b/gfx/tilesets/ruins_of_alph_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/ruins_of_alph_palette_map.asm
+++ b/gfx/tilesets/ruins_of_alph_palette_map.asm
diff --git a/gfx/tilesets/sprout_tower.png b/gfx/tilesets/sprout_tower.png
index 268fc998f..05484b5d9 100644
--- a/gfx/tilesets/sprout_tower.png
+++ b/gfx/tilesets/sprout_tower.png
Binary files differ
diff --git a/tilesets/sprout_tower_palette_map.asm b/gfx/tilesets/sprout_tower_palette_map.asm
index 6e3c10115..6e3c10115 100644
--- a/tilesets/sprout_tower_palette_map.asm
+++ b/gfx/tilesets/sprout_tower_palette_map.asm
diff --git a/gfx/tilesets/train_station.png b/gfx/tilesets/train_station.png
index 0c148f95d..b0704b9df 100644
--- a/gfx/tilesets/train_station.png
+++ b/gfx/tilesets/train_station.png
Binary files differ
diff --git a/tilesets/train_station_palette_map.asm b/gfx/tilesets/train_station_palette_map.asm
index f52f5bbe7..f52f5bbe7 100644
--- a/tilesets/train_station_palette_map.asm
+++ b/gfx/tilesets/train_station_palette_map.asm
diff --git a/gfx/tilesets/underground.png b/gfx/tilesets/underground.png
index 0a83d2043..c33c3fd5b 100644
--- a/gfx/tilesets/underground.png
+++ b/gfx/tilesets/underground.png
Binary files differ
diff --git a/tilesets/underground_palette_map.asm b/gfx/tilesets/underground_palette_map.asm
index 6b9b5546d..6b9b5546d 100644
--- a/tilesets/underground_palette_map.asm
+++ b/gfx/tilesets/underground_palette_map.asm
diff --git a/tilesets/unused_museum_palette_map.asm b/gfx/tilesets/unused_museum_palette_map.asm
index cfbe6dbcd..cfbe6dbcd 100644
--- a/tilesets/unused_museum_palette_map.asm
+++ b/gfx/tilesets/unused_museum_palette_map.asm
diff --git a/gfx/tilesets/whirl_islands.png b/gfx/tilesets/whirl_islands.png
index 9dc74c45b..1d0a91e5e 100644
--- a/gfx/tilesets/whirl_islands.png
+++ b/gfx/tilesets/whirl_islands.png
Binary files differ
diff --git a/tilesets/whirl_islands_palette_map.asm b/gfx/tilesets/whirl_islands_palette_map.asm
index 73c09ebe5..73c09ebe5 100644
--- a/tilesets/whirl_islands_palette_map.asm
+++ b/gfx/tilesets/whirl_islands_palette_map.asm
diff --git a/data/palettes/unused_title/bg.pal b/gfx/title/old_bg.pal
index f0604a261..307eb76a1 100644
--- a/data/palettes/unused_title/bg.pal
+++ b/gfx/title/old_bg.pal
@@ -37,3 +37,20 @@
RGB 22, 10, 31
RGB 19, 08, 26
RGB 17, 07, 22
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 20, 04, 20
+ RGB 16, 08, 16
+ RGB 24, 00, 24
+
+rept 54
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+endr
diff --git a/gfx/title/old_bg.tilemap b/gfx/title/old_bg.tilemap
new file mode 100644
index 000000000..58f448c38
--- /dev/null
+++ b/gfx/title/old_bg.tilemap
Binary files differ
diff --git a/data/palettes/unused_title/ob.pal b/gfx/title/old_fg.pal
index 80e7d9896..80e7d9896 100644
--- a/data/palettes/unused_title/ob.pal
+++ b/gfx/title/old_fg.pal
diff --git a/data/palettes/title.pal b/gfx/title/title.pal
index 95bc2a394..95bc2a394 100644
--- a/data/palettes/title.pal
+++ b/gfx/title/title.pal
diff --git a/data/palettes/trade_room.pal b/gfx/trade/border.pal
index b5615248e..b5615248e 100644
--- a/data/palettes/trade_room.pal
+++ b/gfx/trade/border.pal
diff --git a/data/palettes/unknown/49757.pal b/gfx/unknown/49757.pal
index 93e884046..93e884046 100644
--- a/data/palettes/unknown/49757.pal
+++ b/gfx/unknown/49757.pal
diff --git a/gfx/unknown/4985a.asm b/gfx/unknown/4985a.asm
new file mode 100644
index 000000000..8449d6a1a
--- /dev/null
+++ b/gfx/unknown/4985a.asm
@@ -0,0 +1,8 @@
+ db $ab,$03, $57,$24, $ac,$0e, $13,$32
+ db $be,$30, $5b,$4c, $47,$60, $ed,$f2
+ db $ab,$03, $55,$26, $aa,$0a, $13,$3a
+ db $be,$28, $33,$24, $6e,$71, $df,$b0
+ db $a8,$00, $e5,$e0, $9a,$fc, $f4,$2c
+ db $fe,$4c, $a3,$5e, $c6,$3a, $ab,$4d
+ db $a8,$00, $b5,$b0, $de,$e8, $fc,$1c
+ db $ba,$66, $f7,$0e, $ba,$5e, $43,$bd
diff --git a/data/palettes/unknown/b6f1.pal b/gfx/unknown/b6f1.pal
index 1dd56f50f..1dd56f50f 100644
--- a/data/palettes/unknown/b6f1.pal
+++ b/gfx/unknown/b6f1.pal
diff --git a/data/palettes/unknown/b719.pal b/gfx/unknown/b719.pal
index 09dd9a364..09dd9a364 100644
--- a/data/palettes/unknown/b719.pal
+++ b/gfx/unknown/b719.pal
diff --git a/data/palettes/unknown/b789.pal b/gfx/unknown/b789.pal
index cce760662..cce760662 100644
--- a/data/palettes/unknown/b789.pal
+++ b/gfx/unknown/b789.pal
diff --git a/home.asm b/home.asm
index 8e4b3b171..a5a5d0f6b 100644
--- a/home.asm
+++ b/home.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "NULL", ROM0
@@ -44,6 +44,7 @@ INCLUDE "home/game_time.asm"
INCLUDE "home/map.asm"
InexplicablyEmptyFunction:: ; 2d43
+; unused
; Inexplicably empty.
; Seen in PredefPointers.
rept 16
@@ -57,8 +58,7 @@ INCLUDE "home/predef.asm"
INCLUDE "home/window.asm"
INCLUDE "home/flag.asm"
-Function2ebb:: ; 2ebb
-; unreferenced
+Unreferenced_Function2ebb:: ; 2ebb
ld a, [wMonStatusFlags]
bit 1, a
ret z
@@ -79,8 +79,7 @@ xor_a_dec_a:: ; 2ec8
ret
; 2ecb
-Function2ecb:: ; 2ecb
-; unreferenced
+Unreferenced_Function2ecb:: ; 2ecb
push hl
ld hl, wMonStatusFlags
bit 1, [hl]
@@ -182,12 +181,12 @@ ClearSprites:: ; 300b
HideSprites:: ; 3016
; Set all OAM y-positions to 160 to hide them offscreen
- ld hl, Sprites
- ld de, 4 ; length of an OAM struct
- ld b, (SpritesEnd - Sprites) / 4 ; number of OAM structs
- ld a, 160 ; y
+ ld hl, Sprite01YCoord
+ ld de, SPRITEOAMSTRUCT_LENGTH
+ ld b, NUM_SPRITE_OAM_STRUCTS
+ ld a, SCREEN_WIDTH_PX
.loop
- ld [hl], a
+ ld [hl], a ; y
add hl, de
dec b
jr nz, .loop
@@ -552,7 +551,7 @@ CopyTilemapAtOnce:: ; 323d
jr .CopyTilemapAtOnce
; 323f
-; XXX
+; unused
farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
; 3246
@@ -712,7 +711,7 @@ GetSGBLayout:: ; 3340
ret z
.sgb
- predef_jump Predef_LoadSGBLayout ; LoadSGBLayout
+ predef_jump Predef_LoadSGBLayout
; 334e
SetHPPal:: ; 334e
@@ -1075,12 +1074,12 @@ _PrepMonFrontpic:: ; 378b
push hl
ld de, vTiles2
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
pop hl
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
xor a
ld [wBoxAlignment], a
ret
@@ -1127,8 +1126,7 @@ Print8BitNumRightAlign:: ; 3842
jp PrintNum
; 384d
-Function384d:: ; 384d
-; XXX
+Unreferenced_Function384d:: ; 384d
; GetNthMove
ld hl, wListMoves_MoveIndicesBuffer
ld c, a
@@ -1321,8 +1319,7 @@ GetPartyLocation:: ; 3927
jp AddNTimes
; 392d
-Function392d:: ; 392d
-; XXX
+Unreferenced_Function392d:: ; 392d
; GetDexNumber
; Probably used in gen 1 to convert index number to dex number
; Not required in gen 2 because index number == dex number
diff --git a/home/audio.asm b/home/audio.asm
index 35f98af4d..f904e9599 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -319,7 +319,7 @@ Unused_FadeOutMusic:: ; 3ca8
; 3cae
FadeInMusic:: ; 3cae
- ld a, 4 | 1 << 7
+ ld a, 4 | (1 << MUSIC_FADE_IN_F)
ld [MusicFade], a
ret
; 3cb4
@@ -502,20 +502,19 @@ GetMapMusic:: ; 3d97
ret
; 3d9f
-Function3d9f:: ; 3d9f
+Unreferenced_Function3d9f:: ; 3d9f
; Places a BCD number at the
; upper center of the screen.
-; Unreferenced.
- ld a, 4 * 8
- ld [Sprites + 38 * 4], a
- ld [Sprites + 39 * 4], a
- ld a, 10 * 8
- ld [Sprites + 38 * 4 + 1], a
- ld a, 11 * 8
- ld [Sprites + 39 * 4 + 1], a
+ ld a, 4 * TILE_WIDTH
+ ld [Sprite39YCoord], a
+ ld [Sprite40YCoord], a
+ ld a, 10 * TILE_WIDTH
+ ld [Sprite39XCoord], a
+ ld a, 11 * TILE_WIDTH
+ ld [Sprite40XCoord], a
xor a
- ld [Sprites + 38 * 4 + 3], a
- ld [Sprites + 39 * 4 + 3], a
+ ld [Sprite39Attributes], a
+ ld [Sprite40Attributes], a
ld a, [wc296]
cp 100
jr nc, .max
@@ -525,17 +524,17 @@ Function3d9f:: ; 3d9f
swap a
and $f
add "0"
- ld [Sprites + 38 * 4 + 2], a
+ ld [Sprite39TileID], a
ld a, b
and $f
add "0"
- ld [Sprites + 39 * 4 + 2], a
+ ld [Sprite40TileID], a
ret
.max
ld a, "9"
- ld [Sprites + 38 * 4 + 2], a
- ld [Sprites + 39 * 4 + 2], a
+ ld [Sprite39TileID], a
+ ld [Sprite40TileID], a
ret
; 3dde
diff --git a/home/battle.asm b/home/battle.asm
index 30096fd4a..b44fa5d97 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -130,8 +130,8 @@ RefreshBattleHuds:: ; 39c9
; 39d4
UpdateBattleHuds:: ; 39d4
- farcall UpdatePlayerHUD
- farcall UpdateEnemyHUD
+ farcall Predef_UpdatePlayerHUD
+ farcall Predef_UpdateEnemyHUD
ret
; 39e1
diff --git a/home/fade.asm b/home/fade.asm
index c5eb2c2eb..d81a49c6c 100644
--- a/home/fade.asm
+++ b/home/fade.asm
@@ -1,8 +1,7 @@
; Functions to fade the screen in and out.
-Function48c:: ; 48c
-; XXX
+Unreferenced_Function48c:: ; 48c
; TimeOfDayFade
ld a, [TimeOfDayPal]
ld b, a
diff --git a/home/init.asm b/home/init.asm
index dbdbccf3d..26fb17313 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -166,7 +166,7 @@ Init:: ; 17d
call DelayFrame
- predef InitSGBBorder ; SGB init
+ predef Predef_InitSGBBorder ; SGB init
call MapSetup_Sound_Off
xor a
diff --git a/home/lcd.asm b/home/lcd.asm
index dfb174ee1..e2fb4c5a9 100644
--- a/home/lcd.asm
+++ b/home/lcd.asm
@@ -1,8 +1,7 @@
; LCD handling
-Function547:: ; 547
-; Unreferenced
+Unreferenced_Function547:: ; 547
ld a, [hLCDCPointer]
cp rSCX - $ff00
ret nz
diff --git a/home/map.asm b/home/map.asm
index b48f01ce1..4d16ff7b3 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -384,7 +384,7 @@ CheckIndoorMap:: ; 22f4
ret
; 2300
-; XXX
+; unused
cp INDOOR
ret z
cp GATE
@@ -1371,7 +1371,7 @@ UpdateBGMapColumn:: ; 27f8
inc d
; cap d at HIGH(vBGMap0)
ld a, d
- and $3
+ and %11
or HIGH(vBGMap0)
ld d, a
@@ -1383,7 +1383,7 @@ UpdateBGMapColumn:: ; 27f8
ret
; 2816
-; unreferenced
+Unreferenced_Function2816::
ld hl, BGMapBuffer
ld bc, BGMapBufferEnd - BGMapBuffer
xor a
@@ -1429,6 +1429,7 @@ LoadTilesetGFX:: ; 2821
pop af
ld [rSVBK], a
+; These tilesets support dynamic per-mapgroup roof tiles.
ld a, [wTileset]
cp TILESET_JOHTO_1
jr z, .load_roof
@@ -1983,7 +1984,7 @@ FadeToMenu:: ; 2b29
xor a
ld [hBGMapMode], a
call LoadStandardMenuDataHeader
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
call ClearSprites
call DisableSpriteUpdates
ret
@@ -2009,7 +2010,7 @@ FinishExitMenu:: ; 2b5c
call GetSGBLayout
farcall LoadOW_BGPal7
call WaitBGMap2
- farcall FadeInPalettes
+ farcall Special_FadeInPalettes
call EnableSpriteUpdates
ret
; 2b74
@@ -2042,7 +2043,7 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74
ReloadTilesetAndPalettes:: ; 2bae
call DisableLCD
call ClearSprites
- farcall RefreshSprites
+ farcall Special_RefreshSprites
call LoadStandardFont
call LoadFontsExtra
ld a, [hROMBank]
@@ -2075,7 +2076,6 @@ GetAnyMapHeaderPointer:: ; 0x2bed
; inputs:
; b = map group, c = map number
-; XXX de = ???
; outputs:
; hl points to the map header
@@ -2106,11 +2106,11 @@ GetMapHeaderMember:: ; 0x2c04
; Extract data from the current map's header.
; inputs:
-; de = offset of desired data within the mapheader
+; de = offset of desired data within the mapheader (a MAPHEADER_* constant)
; outputs:
; bc = data from the current map's header
-; (e.g., de = $0003 would return a pointer to the secondary map header)
+; (e.g., de = MAPHEADER_MAPHEADER2 would return a pointer to the secondary map header)
ld a, [MapGroup]
ld b, a
@@ -2247,7 +2247,7 @@ GetMapEnvironment:: ; 2c8a
ret
; 2c98
- ret ; XXX
+ ret ; unused
; 2c99
GetAnyMapEnvironment:: ; 2c99
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 3857bef0c..1db2bb3ba 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -316,7 +316,7 @@ CheckObjectTime:: ; 18f5
ret
; 194d
-; XXX
+; unused
ld [hMapObjectIndexBuffer], a
call GetMapObject
call CopyObjectStruct
@@ -383,7 +383,7 @@ CopyPlayerObjectTemplate:: ; 19a6
ret
; 19b8
-; XXX
+Unreferenced_Function19b8:
call GetMapObject
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
add hl, bc
diff --git a/home/menu.asm b/home/menu.asm
index 2be46120d..b2ab0feb0 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -28,8 +28,7 @@ MenuTextBox:: ; 1d4f
jp PrintText
; 1d57
-ret_1d57:: ; 1d57
-; unreferenced
+; unused
ret
; 1d58
@@ -41,8 +40,7 @@ LoadMenuTextBox:: ; 1d58
.MenuDataHeader: ; 1d5f
db $40 ; tile backup
- db 12, 0 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw vTiles0
db 0 ; default option
; 1d67
@@ -61,8 +59,7 @@ LoadStandardMenuDataHeader:: ; 1d6e
.MenuDataHeader: ; 1d75
db $40 ; tile backup
- db 0, 0 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw 0
db 1 ; default option
; 1d7d
@@ -184,8 +181,7 @@ InterpretTwoOptionMenu:: ; 1dfe
YesNoMenuDataHeader:: ; 1e1d
db $40 ; tile backup
- db 5, 10 ; start coords
- db 9, 15 ; end coords
+ menu_coords 10, 5, 15, 9
dw .MenuData2
db 1 ; default option
; 1e25
@@ -453,8 +449,7 @@ PlaceNthMenuStrings:: ; 1f8d
ret
; 1f9e
-Function1f9e:: ; 1f9e
-; unreferenced
+Unreferenced_Function1f9e:: ; 1f9e
call GetMenuDataPointerTableEntry
inc hl
inc hl
@@ -517,7 +512,7 @@ ClearWindowData:: ; 1fbf
; 1ff0
.bytefill ; 1ff0
- ld bc, $0010
+ ld bc, $10
xor a
call ByteFill
ret
diff --git a/home/mobile.asm b/home/mobile.asm
index f50571ff4..1248c3f7e 100644
--- a/home/mobile.asm
+++ b/home/mobile.asm
@@ -127,8 +127,7 @@ Timer:: ; 3e93
reti
; 3ed7
-Function3ed7:: ; 3ed7
-; unreferenced
+Unreferenced_Function3ed7:: ; 3ed7
ld [$dc02], a
ld a, [hROMBank]
push af
@@ -160,8 +159,7 @@ Function3eea:: ; 3eea
ret
; 3efd
-Function3efd:: ; 3efd
-; unreferenced
+Unreferenced_Function3efd:: ; 3efd
push hl
hlcoord 0, 12
ld b, 4
diff --git a/home/palettes.asm b/home/palettes.asm
index 79ff71887..9f10da118 100644
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -319,7 +319,7 @@ ret_d90:: ; d90
; d91
-Special_ReloadSpritesNoPalettes:: ; d91
+ReloadSpritesNoPalettes:: ; d91
ld a, [hCGB]
and a
ret z
diff --git a/home/pokedex_flags.asm b/home/pokedex_flags.asm
index 7aacd4981..ace3d6802 100644
--- a/home/pokedex_flags.asm
+++ b/home/pokedex_flags.asm
@@ -31,7 +31,7 @@ CheckSeenMon:: ; 339b
PokedexFlagAction:: ; 33a1
ld d, 0
- predef FlagPredef
+ predef Predef_SmallFarFlagAction
ld a, c
and a
ret
diff --git a/home/serial.asm b/home/serial.asm
index b0151eae2..1d6f11bd1 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -398,8 +398,7 @@ LinkDataReceived:: ; 908
ret
; 919
-Function919:: ; 919
-; XXX
+Unreferenced_Function919:: ; 919
ld a, [wLinkMode]
and a
ret nz
diff --git a/home/sine.asm b/home/sine.asm
index 810845860..eff5ed299 100644
--- a/home/sine.asm
+++ b/home/sine.asm
@@ -1,6 +1,6 @@
Cosine:: ; 1b0f
; Return d * cos(a) in hl
- add $10 ; 90 degrees
+ add %010000 ; 90 degrees
Sine:: ; 1b11
; Return d * sin(a) in hl
diff --git a/home/text.asm b/home/text.asm
index 191c96172..a89f39eb2 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -47,10 +47,8 @@ ClearScreen:: ; fdb
TextBox:: ; fe8
-; Draw a text box at hl with room for
-; b lines of c characters each.
-; Places a border around the textbox,
-; then switches the palette to the
+; Draw a text box at hl with room for b lines of c characters each.
+; Places a border around the textbox, then switches the palette to the
; text black-and-white scheme.
push bc
push hl
@@ -1015,8 +1013,7 @@ Text_PlaySound:: ; 1500
ret
; 1522
-Function1522:: ; 1522
-; XXX
+Unreferenced_Function1522:: ; 1522
; TX_CRY
push de
ld e, [hl]
diff --git a/home/time.asm b/home/time.asm
index 9ed703686..be141a066 100644
--- a/home/time.asm
+++ b/home/time.asm
@@ -48,17 +48,17 @@ GetClock:: ; 5b7
ld [hl], RTC_S
ld a, [de]
- maskbits 60
+ maskbits 60 - 1
ld [hRTCSeconds], a
ld [hl], RTC_M
ld a, [de]
- maskbits 60
+ maskbits 60 - 1
ld [hRTCMinutes], a
ld [hl], RTC_H
ld a, [de]
- maskbits 24
+ maskbits 24 - 1
ld [hRTCHours], a
ld [hl], RTC_DL
diff --git a/home/trainers.asm b/home/trainers.asm
index 857a95629..44093bfc1 100644
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -240,7 +240,7 @@ PrintWinLossText:: ; 3718
cp BATTLETYPE_CANLOSE
jr .canlose ; ??????????
-; unreferenced
+; unused
ld hl, wWinTextPointer
jr .ok
diff --git a/home/vblank.asm b/home/vblank.asm
index cb8c5ba56..5afecdad0 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -190,7 +190,7 @@ VBlank1:: ; 337
jr c, .done
call UpdateBGMap
- call Serve2bppRequest@VBlank
+ call Serve2bppRequest_VBlank
call hPushOAM
.done
@@ -280,7 +280,7 @@ VBlank3:: ; 396
jr c, .done
call UpdateBGMap
- call Serve2bppRequest@VBlank
+ call Serve2bppRequest_VBlank
call hPushOAM
.done
diff --git a/home/video.asm b/home/video.asm
index a533a4b77..ae4d6031e 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -379,7 +379,7 @@ Serve2bppRequest:: ; 1769
jr _Serve2bppRequest
-Serve2bppRequest@VBlank:: ; 1778
+Serve2bppRequest_VBlank:: ; 1778
ld a, [Requested2bpp]
and a
diff --git a/home/window.asm b/home/window.asm
index 0570bbb01..67debe5d3 100644
--- a/home/window.asm
+++ b/home/window.asm
@@ -99,7 +99,7 @@ SafeUpdateSprites:: ; 2e31
ld [hOAMUpdate], a
ret
-; XXX
+; unused
scf
ret
; 2e50
diff --git a/hram.asm b/hram.asm
index 3f84d19ca..15d4cc76d 100644
--- a/hram.asm
+++ b/hram.asm
@@ -1,3 +1,7 @@
+; HRAM uses constants instead of labels so that
+; "ld a, [hAddress]" and "ld [hAddress], a" will
+; use the more efficient "ldh" instruction.
+
hPushOAM EQU $ff80 ; 10 bytes
hROMBankBackup EQU $ff8a
@@ -33,7 +37,7 @@ hJoyLast EQU $ffa9
hInMenu EQU $ffaa
hPrinter EQU $ffac
-hGraphicStartTile EQU $ffad
+hGraphicStartTile EQU $ffad
hMoveMon EQU $ffae
hMapObjectIndexBuffer EQU $ffaf
hObjectStructIndexBuffer EQU $ffb0
@@ -81,7 +85,7 @@ hMoneyTemp EQU $ffc3
hMGJoypadPressed EQU $ffc3
hMGJoypadReleased EQU $ffc4
-hLCDCPointer EQU $ffc6
+hLCDCPointer EQU $ffc6
hLYOverrideStart EQU $ffc7
hLYOverrideEnd EQU $ffc8
hMobileReceive EQU $ffc9
diff --git a/includes.asm b/includes.asm
deleted file mode 100644
index a97cda944..000000000
--- a/includes.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-INCLUDE "version.asm"
-INCLUDE "constants.asm"
diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm
index c2a03fbc0..fc4ae2883 100644
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -6908,7 +6908,7 @@ Function112d33: ; 112d33
dec a
jp .asm_112e46
-; XXX
+; unused
ret
.asm_112d4d
@@ -8611,7 +8611,7 @@ endr
ld [$cc0d], a
ld a, l
ld [$cc0c], a
- cp $8e ; XXX ; LOW(Unknown_113b8e + $100) ???
+ cp $8e ; XXX LOW(Unknown_113b8e + $100) ???
jp nz, .asm_113751
ld de, $cc18
ld hl, $cbe7
@@ -9515,8 +9515,7 @@ Function113eb8: ; 113eb8
jp Function111f97
; 113ec7
-Function113ec7: ; 113ec7
-; Unreferenced
+Unreferenced_Function113ec7: ; 113ec7
ld hl, $c822
ld a, [hl]
push af
diff --git a/macros.asm b/macros.asm
index b6598c933..7036b6419 100644
--- a/macros.asm
+++ b/macros.asm
@@ -1,13 +1,10 @@
INCLUDE "macros/enum.asm"
-INCLUDE "macros/charmap.asm"
INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm"
INCLUDE "macros/data.asm"
INCLUDE "macros/code.asm"
INCLUDE "macros/coords.asm"
INCLUDE "macros/color.asm"
-INCLUDE "macros/base_stats.asm"
-INCLUDE "macros/tilesets.asm"
INCLUDE "macros/scripts/audio.asm"
INCLUDE "macros/scripts/maps.asm"
diff --git a/macros/base_stats.asm b/macros/base_stats.asm
deleted file mode 100644
index 1a2ce8529..000000000
--- a/macros/base_stats.asm
+++ /dev/null
@@ -1,67 +0,0 @@
-; Used in data/pokemon/base_stats/*.asm
-
-define: MACRO
-if !DEF(\1)
-\1 EQUS \2
-endc
-ENDM
-
-const_value = 0
-
-add_tm: MACRO
-if !DEF(TM01)
-TM01 = const_value
- enum_start 1
-endc
- define _\@_1, "TM_\1"
- const _\@_1
- 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
-
-; N TMs/HMs need (N+7)/8 bytes for their bit flags.
-; The rgbasm integers tms1, tms2, tms3 each hold 3 bytes, or 24 bits.
-tmhm: MACRO
-tms1 = 0
-tms2 = 0
-tms3 = 0
-rept _NARG
- if DEF(\1_TMNUM)
- if \1_TMNUM < 24 + 1
-tms1 = tms1 | (1 << ((\1_TMNUM) - 1))
- elif \1_TMNUM < 48 + 1
-tms2 = tms2 | (1 << ((\1_TMNUM) - 1 - 24))
- else
-tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48))
- endc
- else
- fail "\1 is not a TM, HM, or move tutor move"
- endc
- shift
-endr
-
-rept 3
- db tms1 & $ff
-tms1 = tms1 >> 8
-endr
-rept 3
- db tms2 & $ff
-tms2 = tms2 >> 8
-endr
-rept 2
- db tms3 & $ff
-tms3 = tms3 >> 8
-endr
-ENDM
diff --git a/macros/code.asm b/macros/code.asm
index 5ec214d50..6e9c378e3 100644
--- a/macros/code.asm
+++ b/macros/code.asm
@@ -35,19 +35,18 @@ jumptable: MACRO
jp hl
ENDM
-; Many mobile functions were dummied out in localization.
-mobile EQUS "ret"
-
maskbits: MACRO
+; masks just enough bits to cover the argument
+; e.g. "maskbits %00010100" becomes "and %00011111"
; example usage in rejection sampling:
; .loop
; call Random
-; maskbits 30
+; maskbits 30 +- 1
; cp 30
; jr nc, .loop
x = 1
rept 8
-if \1 > x
+if x < (\1)
x = (x + 1) * 2 +- 1
endc
endr
diff --git a/macros/color.asm b/macros/color.asm
index 35d69fe6f..5ebaae218 100644
--- a/macros/color.asm
+++ b/macros/color.asm
@@ -1,15 +1,15 @@
RGB: MACRO
rept _NARG / 3
- dw ((\3) << 10) + ((\2) << 5) + (\1)
+ dw palred (\1) + palgreen (\2) + palblue (\3)
shift
shift
shift
endr
ENDM
+palred EQUS "(1 << 0) *"
+palgreen EQUS "(1 << 5) *"
+palblue EQUS "(1 << 10) *"
+
palettes EQUS "* 8"
palette EQUS "+ 8 *"
-
-palred EQUS "$0001 *"
-palgreen EQUS "$0020 *"
-palblue EQUS "$0400 *"
diff --git a/macros/data.asm b/macros/data.asm
index 55f41a204..8345a2523 100644
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -85,20 +85,24 @@ ENDM
dbpixel: MACRO
if _NARG >= 4
+; x tile, x pxl, y tile, y pxl
db \1 * 8 + \3, \2 * 8 + \4
else
+; x, y
db \1 * 8, \2 * 8
endc
ENDM
dsprite: MACRO
-; conditional segment is there because not every instance of
-; this macro is directly OAM
-if _NARG >= 7 ; y tile, y pxl, x tile, x pxl, vtile offset, flags, palette
- db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, (\6 << 3) + (\7 & PALETTE_MASK)
-else
+; y tile, y pxl, x tile, x pxl, vtile offset, flags, attributes
db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6
-endc
+ENDM
+
+
+menu_coords: MACRO
+; x1, y1, x2, y2
+ db \2, \1 ; start coords
+ db \4, \3 ; end coords
ENDM
diff --git a/macros/enum.asm b/macros/enum.asm
index 0c1d4a064..c1321a636 100644
--- a/macros/enum.asm
+++ b/macros/enum.asm
@@ -38,3 +38,12 @@ shift_const: MACRO
\1 EQU (1 << const_value)
const_value = const_value + 1
ENDM
+
+
+; Enumerate strings
+
+define: MACRO
+if !DEF(\1)
+\1 EQUS \2
+endc
+ENDM
diff --git a/macros/scripts/battle_commands.asm b/macros/scripts/battle_commands.asm
index 5933740f0..4ae8dbaf4 100644
--- a/macros/scripts/battle_commands.asm
+++ b/macros/scripts/battle_commands.asm
@@ -3,7 +3,7 @@ command: MACRO
\1 EQUS "db \1_command"
ENDM
-; BattleCommandPointers indexes (see data/battle_command_pointers.asm)
+; BattleCommandPointers indexes (see data/battle/effect_command_pointers.asm)
enum_start 1
command checkturn ; 01
command checkobedience ; 02
diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm
index 694a7cd12..40a5bbf46 100644
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -424,9 +424,9 @@ readcoins: MACRO
db \1 ; memory
ENDM
- enum RAM2MEM_command ; $3f
-RAM2MEM: MACRO
- db RAM2MEM_command
+ enum vartomem_command ; $3f
+vartomem: MACRO
+ db vartomem_command
db \1 ; memory
ENDM
@@ -483,7 +483,11 @@ ENDM
enum refreshscreen_command ; $48
refreshscreen: MACRO
db refreshscreen_command
+if _NARG == 1
db \1 ; dummy
+else
+ db 0
+endc
ENDM
enum closetext_command ; $49
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
index e9703531d..31a1f16d9 100644
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -9,6 +9,12 @@ scene_script: MACRO
dw \1, 0
ENDM
+callback: MACRO
+;\1: type: a MAPCALLBACK_* constant
+;\2: script pointer
+ dbw \1, \2
+ENDM
+
warp_def: MACRO
;\1: x: left to right, starts at 0
;\2: y: top to bottom, starts at 0
@@ -23,9 +29,10 @@ coord_event: MACRO
;\2: y: top to bottom, starts at 0
;\3: scene id: controlled by setscene/setmapscene
;\4: script pointer
- db \3, \2, \1, $0
+ db \3, \2, \1
+ db 0 ; filler
dw \4
- db $0, $0
+ db 0, 0 ; filler
ENDM
bg_event: MACRO
@@ -91,6 +98,12 @@ else
endc
ENDM
+hiddenitem: MACRO
+;\1: flag: an EVENT_* constant
+;\2: item: from constants/item_constants.asm
+ dwb \1, \2
+ENDM
+
elevfloor: MACRO
;\1: floor: a FLOOR_* constant
;\2: warp destination: starts at 1
@@ -99,10 +112,22 @@ elevfloor: MACRO
map \3
ENDM
+conditional_event: MACRO
+;\1: flag: an EVENT_* constant
+;\2: script pointer
+ dw \1, \2
+ENDM
+
+cmdqueue: MACRO
+;\1: type: a CMDQUEUE_* constant
+;\2: data pointer
+ dbw \1, \2
+ dw 0 ; filler
+ENDM
+
stonetable: MACRO
;\1: warp id
;\2: object_event id
;\3: script pointer
- db \1, \2
- dw \3
+ dbbw \1, \2, \3
ENDM
diff --git a/macros/tilesets.asm b/macros/tilesets.asm
deleted file mode 100755
index 4aeb38dc5..000000000
--- a/macros/tilesets.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-; Used in tilesets/*.asm
-
-tilepal: MACRO
-; vram bank, pals
-x = \1 << OAM_TILE_BANK
-rept (_NARG +- 1) / 2
- dn (x | PAL_BG_\3), (x | PAL_BG_\2)
- shift
- shift
-endr
-ENDM
-
-tilecoll: MACRO
- db COLL_\1, COLL_\2, COLL_\3, COLL_\4
-ENDM
diff --git a/macros/wram.asm b/macros/wram.asm
index d30114fc8..a889193d4 100755
--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -339,6 +339,19 @@ map_object: MACRO
ds 2
ENDM
+sprite_oam_struct: MACRO
+\1YCoord:: db
+\1XCoord:: db
+\1TileID:: db
+\1Attributes:: db
+; bit 7: priority
+; bit 6: y flip
+; bit 5: x flip
+; bit 4: pal # (non-cgb)
+; bit 3: vram bank (cgb only)
+; bit 2-0: pal # (cgb only)
+ENDM
+
sprite_anim_struct: MACRO
\1Index:: db
\1FramesetID:: db
diff --git a/main.asm b/main.asm
index 5c036e3d8..f13481e2c 100644
--- a/main.asm
+++ b/main.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "bank1", ROMX
@@ -85,14 +85,12 @@ INCLUDE "engine/events/daycare.asm"
INCLUDE "engine/events/print_unown.asm"
INCLUDE "engine/events/print_photo.asm"
INCLUDE "engine/breeding.asm"
-
-
-INCLUDE "tilesets/data.asm"
+INCLUDE "gfx/tilesets.asm"
SECTION "Roofs", ROMX
-INCLUDE "tilesets/roofs.asm"
+INCLUDE "engine/mapgroup_roofs.asm"
SECTION "Clock Reset", ROMX
@@ -172,7 +170,7 @@ INCLUDE "data/trainers/parties.asm"
SECTION "Battle Core", ROMX
INCLUDE "engine/battle/core.asm"
-INCLUDE "data/battle_command_pointers.asm"
+INCLUDE "data/battle/effect_command_pointers.asm"
SECTION "bank10", ROMX
@@ -208,15 +206,7 @@ INCLUDE "engine/events/buena_menu.asm"
SECTION "bank13", ROMX
INCLUDE "engine/map_palettes.asm"
-INCLUDE "tilesets/palette_maps.asm"
-
-; unreferenced
-; 0x4ce05
-rept 26
- db $06
-endr
-; 0x4ce1f
-
+INCLUDE "gfx/tilesets/palette_maps.asm"
INCLUDE "data/collision_permissions.asm"
INCLUDE "engine/routines/emptyallsrambanks.asm"
INCLUDE "engine/routines/savemenu_copytilemapatonce.asm"
@@ -233,7 +223,7 @@ INCBIN "gfx/shrink/shrink2.2bpp.lz"
INCLUDE "engine/link_2.asm"
INCLUDE "engine/delete_save_change_clock.asm"
-INCLUDE "tilesets/tilesets.asm"
+INCLUDE "data/tilesets.asm"
INCLUDE "engine/routines/flagpredef.asm"
INCLUDE "engine/routines/trademonfrontpic.asm"
INCLUDE "engine/events/pokerus/check_pokerus.asm"
@@ -244,7 +234,7 @@ INCLUDE "engine/stats_screen.asm"
INCLUDE "engine/events/catch_tutorial.asm"
INCLUDE "engine/evolution_animation.asm"
INCLUDE "engine/init_hof_credits.asm"
-INCLUDE "mobile/get_trainer_class.asm"
+INCLUDE "engine/events/battle_tower/get_trainer_class.asm"
INCLUDE "engine/battle/sliding_intro.asm"
INCLUDE "mobile/print_opp_message.asm"
INCLUDE "engine/battle/checkbattlescene.asm"
@@ -263,7 +253,7 @@ INCLUDE "engine/events/basement_key.asm"
INCLUDE "engine/events/sacred_ash.asm"
INCLUDE "engine/tempmon.asm"
INCLUDE "engine/types.asm"
-INCLUDE "text/unused_gen_1_trainers.asm"
+INCLUDE "data/unused_text/gen_1_trainers.asm"
INCLUDE "engine/mon_stats.asm"
INCLUDE "engine/routines/initlist.asm"
INCLUDE "engine/experience.asm"
@@ -272,20 +262,7 @@ INCLUDE "gfx/load_pics.asm"
INCLUDE "engine/move_mon_wo_mail.asm"
INCLUDE "data/pokemon/base_stats.asm"
INCLUDE "data/pokemon/names.asm"
-
-Unknown_53d84: ; unreferenced
- db $1a, $15
- db $33, $16
- db $4b, $17
- db $62, $18
- db $79, $19
- db $90, $1a
- db $a8, $1b
- db $c4, $1c
- db $e0, $1d
- db $f6, $1e
- db $ff, $1f
- db $ff, $20
+INCLUDE "data/unknown_table.asm"
UnknownEggPic:: ; 53d9c
; Another egg pic. This is shifted up a few pixels.
@@ -294,7 +271,7 @@ INCBIN "gfx/unknown/unknown_egg.2bpp.lz"
SECTION "Crystal Phone Text", ROMX
-INCLUDE "text/phone/extra.asm"
+INCLUDE "data/phone/text/extra.asm"
SECTION "bank20", ROMX
@@ -302,7 +279,7 @@ SECTION "bank20", ROMX
INCLUDE "engine/player_movement.asm"
INCLUDE "engine/engine_flags.asm"
INCLUDE "engine/variables.asm"
-INCLUDE "text/battle.asm"
+INCLUDE "data/battle/battle_text.asm"
INCLUDE "engine/debug.asm"
@@ -318,10 +295,10 @@ SECTION "Crystal Features 2", ROMX
INCLUDE "engine/events/kurt.asm"
INCLUDE "engine/player_gfx.asm"
INCLUDE "mobile/mobile_22.asm"
-INCLUDE "engine/events/crystal_unown.asm"
+INCLUDE "engine/events/unown_walls.asm"
INCLUDE "engine/events/buena.asm"
INCLUDE "engine/events/dratini.asm"
-INCLUDE "engine/events/battle_tower_rules.asm"
+INCLUDE "engine/events/battle_tower/rules.asm"
INCLUDE "mobile/mobile_22_2.asm"
@@ -354,28 +331,31 @@ INCLUDE "engine/phone/buenas_password.asm"
SECTION "Phone Text", ROMX
-INCLUDE "text/phone/anthony_overworld.asm"
-INCLUDE "text/phone/todd_overworld.asm"
-INCLUDE "text/phone/gina_overworld.asm"
-INCLUDE "text/phone/irwin_overworld.asm"
-INCLUDE "text/phone/arnie_overworld.asm"
-INCLUDE "text/phone/alan_overworld.asm"
-INCLUDE "text/phone/dana_overworld.asm"
-INCLUDE "text/phone/chad_overworld.asm"
-INCLUDE "text/phone/derek_overworld.asm"
-INCLUDE "text/phone/tully_overworld.asm"
-INCLUDE "text/phone/brent_overworld.asm"
-INCLUDE "text/phone/tiffany_overworld.asm"
-INCLUDE "text/phone/vance_overworld.asm"
-INCLUDE "text/phone/wilton_overworld.asm"
-INCLUDE "text/phone/kenji_overworld.asm"
-INCLUDE "text/phone/parry_overworld.asm"
-INCLUDE "text/phone/erin_overworld.asm"
+INCLUDE "data/phone/text/anthony_overworld.asm"
+INCLUDE "data/phone/text/todd_overworld.asm"
+INCLUDE "data/phone/text/gina_overworld.asm"
+INCLUDE "data/phone/text/irwin_overworld.asm"
+INCLUDE "data/phone/text/arnie_overworld.asm"
+INCLUDE "data/phone/text/alan_overworld.asm"
+INCLUDE "data/phone/text/dana_overworld.asm"
+INCLUDE "data/phone/text/chad_overworld.asm"
+INCLUDE "data/phone/text/derek_overworld.asm"
+INCLUDE "data/phone/text/tully_overworld.asm"
+INCLUDE "data/phone/text/brent_overworld.asm"
+INCLUDE "data/phone/text/tiffany_overworld.asm"
+INCLUDE "data/phone/text/vance_overworld.asm"
+INCLUDE "data/phone/text/wilton_overworld.asm"
+INCLUDE "data/phone/text/kenji_overworld.asm"
+INCLUDE "data/phone/text/parry_overworld.asm"
+INCLUDE "data/phone/text/erin_overworld.asm"
SECTION "bank2E", ROMX
-INCLUDE "engine/events_3.asm"
+INCLUDE "engine/events/map_name_sign.asm"
+INCLUDE "engine/events/checkforhiddenitems.asm"
+INCLUDE "engine/events/treemons.asm"
+INCLUDE "gfx/fishing.asm"
INCLUDE "engine/radio.asm"
INCLUDE "engine/mail_2.asm"
@@ -402,7 +382,7 @@ SECTION "Move Animations", ROMX
INCLUDE "engine/events/bug_contest/display_stats.asm"
INCLUDE "engine/battle_anims/anim_commands.asm"
-INCLUDE "engine/battle_anims/engine.asm"
+INCLUDE "engine/battle_anims/core.asm"
INCLUDE "data/battle_anims/objects.asm"
INCLUDE "engine/battle_anims/functions.asm"
INCLUDE "engine/battle_anims/helpers.asm"
@@ -450,15 +430,6 @@ INCLUDE "gfx/pokemon/unown_frames.asm"
SECTION "bank38", ROMX
INCLUDE "engine/events/print_unown_2.asm"
-
-Unknown_e00ed:
-; Graphics for an unused Game Corner
-; game were meant to be here.
-
-ret_e00ed: ; e00ed (38:40ed)
-; How many coins?
- ret
-
INCLUDE "engine/card_flip.asm"
INCLUDE "engine/unown_puzzle.asm"
INCLUDE "engine/dummy_game.asm"
@@ -490,7 +461,7 @@ INCLUDE "engine/battle/misc.asm"
SECTION "bank3F", ROMX
-INCLUDE "tilesets/animations.asm"
+INCLUDE "engine/tileset_anims.asm"
INCLUDE "engine/npctrade.asm"
INCLUDE "engine/events/mom_phone.asm"
@@ -534,7 +505,7 @@ INCLUDE "mobile/mobile_46.asm"
SECTION "Battle Tower", ROMX
-INCLUDE "mobile/battle_tower_47.asm"
+INCLUDE "engine/events/battle_tower/trainer_text.asm"
SECTION "bank5B", ROMX
@@ -550,7 +521,7 @@ INCLUDE "mobile/mobile_5c.asm"
SECTION "Crystal Phone Text 2", ROMX
-INCLUDE "text/phone/extra2.asm"
+INCLUDE "data/phone/text/extra2.asm"
SECTION "UpdateBattleHUDs", ROMX
@@ -570,31 +541,32 @@ INCLUDE "mobile/mobile_5f.asm"
SECTION "Common Text 1", ROMX
-INCLUDE "text/stdtext.asm"
-INCLUDE "text/phone/jack_overworld.asm"
-INCLUDE "text/phone/beverly_overworld.asm"
-INCLUDE "text/phone/huey_overworld.asm"
-INCLUDE "text/phone/gaven_overworld.asm"
-INCLUDE "text/phone/beth_overworld.asm"
-INCLUDE "text/phone/jose_overworld.asm"
-INCLUDE "text/phone/reena_overworld.asm"
-INCLUDE "text/phone/joey_overworld.asm"
-INCLUDE "text/phone/wade_overworld.asm"
-INCLUDE "text/phone/ralph_overworld.asm"
-INCLUDE "text/phone/liz_overworld.asm"
+INCLUDE "data/std_text.asm"
+INCLUDE "data/phone/text/jack_overworld.asm"
+INCLUDE "data/phone/text/beverly_overworld.asm"
+INCLUDE "data/phone/text/huey_overworld.asm"
+INCLUDE "data/phone/text/gaven_overworld.asm"
+INCLUDE "data/phone/text/beth_overworld.asm"
+INCLUDE "data/phone/text/jose_overworld.asm"
+INCLUDE "data/phone/text/reena_overworld.asm"
+INCLUDE "data/phone/text/joey_overworld.asm"
+INCLUDE "data/phone/text/wade_overworld.asm"
+INCLUDE "data/phone/text/ralph_overworld.asm"
+INCLUDE "data/phone/text/liz_overworld.asm"
SECTION "Special Phone Text", ROMX
-INCLUDE "text/phone/mom.asm"
-INCLUDE "text/phone/bill.asm"
-INCLUDE "text/phone/elm.asm"
-INCLUDE "text/phone/trainers1.asm"
+INCLUDE "data/phone/text/mom.asm"
+INCLUDE "data/phone/text/bill.asm"
+INCLUDE "data/phone/text/elm.asm"
+INCLUDE "data/phone/text/trainers1.asm"
SECTION "Miscellaneous Text", ROMX
INCLUDE "data/items/names.asm"
+INCLUDE "engine/routines/printitemdescription.asm"
INCLUDE "data/items/descriptions.asm"
INCLUDE "data/moves/names.asm"
INCLUDE "engine/landmarks.asm"
@@ -624,12 +596,12 @@ INCLUDE "engine/european_mail.asm"
SECTION "Battle Tower Text", ROMX
-INCLUDE "text/battle_tower.asm"
+INCLUDE "data/battle_tower/trainer_text.asm"
SECTION "Battle Tower Trainer Data", ROMX
-INCLUDE "data/battle_tower_2.asm"
+INCLUDE "data/battle_tower/unknown.asm"
SECTION "Mobile News Data", ROMX
@@ -639,13 +611,13 @@ INCLUDE "mobile/news/news.asm"
SECTION "Crystal Events", ROMX
-INCLUDE "engine/events/battle_tower.asm"
+INCLUDE "engine/events/battle_tower/load_trainer.asm"
INCLUDE "engine/events/odd_egg.asm"
SECTION "Mobile Stadium 2", ROMX
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
INCBIN "mobile/stadium/stadium2_2.bin"
else
INCBIN "mobile/stadium/stadium2_1.bin"
diff --git a/maps.asm b/maps.asm
index 4f08ab0fd..7056957b8 100644
--- a/maps.asm
+++ b/maps.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
SECTION "Map Headers", ROMX
@@ -132,7 +132,7 @@ INCLUDE "maps/CeladonCafe.asm"
INCLUDE "maps/Route16FuchsiaSpeechHouse.asm"
INCLUDE "maps/Route16Gate.asm"
INCLUDE "maps/Route7SaffronGate.asm"
-INCLUDE "maps/Route1718Gate.asm"
+INCLUDE "maps/Route17Route18Gate.asm"
SECTION "Map Scripts 8", ROMX
@@ -170,7 +170,7 @@ INCLUDE "maps/ElmsHouse.asm"
INCLUDE "maps/Route26HealSpeechHouse.asm"
INCLUDE "maps/Route26DayofWeekSiblingsHouse.asm"
INCLUDE "maps/Route27SandstormHouse.asm"
-INCLUDE "maps/Route2946Gate.asm"
+INCLUDE "maps/Route29Route46Gate.asm"
SECTION "Map Scripts 10", ROMX
@@ -192,7 +192,7 @@ INCLUDE "maps/IcePathB3F.asm"
INCLUDE "maps/LavenderPokecenter1F.asm"
INCLUDE "maps/LavenderPokecenter2FBeta.asm"
INCLUDE "maps/MrFujisHouse.asm"
-INCLUDE "maps/LavenderTownSpeechHouse.asm"
+INCLUDE "maps/LavenderSpeechHouse.asm"
INCLUDE "maps/LavenderNameRater.asm"
INCLUDE "maps/LavenderMart.asm"
INCLUDE "maps/SoulHouse.asm"
@@ -240,7 +240,7 @@ INCLUDE "maps/ManiasHouse.asm"
INCLUDE "maps/CianwoodGym.asm"
INCLUDE "maps/CianwoodPokecenter1F.asm"
INCLUDE "maps/CianwoodPharmacy.asm"
-INCLUDE "maps/CianwoodCityPhotoStudio.asm"
+INCLUDE "maps/CianwoodPhotoStudio.asm"
INCLUDE "maps/CianwoodLugiaSpeechHouse.asm"
INCLUDE "maps/PokeSeersHouse.asm"
INCLUDE "maps/BattleTower1F.asm"
@@ -300,12 +300,12 @@ INCLUDE "maps/SaffronMart.asm"
INCLUDE "maps/SaffronPokecenter1F.asm"
INCLUDE "maps/SaffronPokecenter2FBeta.asm"
INCLUDE "maps/MrPsychicsHouse.asm"
-INCLUDE "maps/SaffronTrainStation.asm"
+INCLUDE "maps/SaffronMagnetTrainStation.asm"
INCLUDE "maps/SilphCo1F.asm"
INCLUDE "maps/CopycatsHouse1F.asm"
INCLUDE "maps/CopycatsHouse2F.asm"
INCLUDE "maps/Route5UndergroundPathEntrance.asm"
-INCLUDE "maps/Route5SaffronCityGate.asm"
+INCLUDE "maps/Route5SaffronGate.asm"
INCLUDE "maps/Route5CleanseTagSpeechHouse.asm"
diff --git a/maps/AzaleaGym.asm b/maps/AzaleaGym.asm
index 1e36df96f..c10add3c4 100644
--- a/maps/AzaleaGym.asm
+++ b/maps/AzaleaGym.asm
@@ -23,7 +23,7 @@ AzaleaGymBugsyScript:
waitbutton
closetext
winlosstext BugsyText_ResearchIncomplete, 0
- loadtrainer BUGSY, 1
+ loadtrainer BUGSY, BUGSY1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_BUGSY
@@ -146,7 +146,7 @@ AzaleaGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext BUGSY, 1, $1
+ trainertotext BUGSY, BUGSY1, MEM_BUFFER_1
jumpstd gymstatue2
BugsyText_INeverLose:
diff --git a/maps/AzaleaTown.asm b/maps/AzaleaTown.asm
index ba1ee1a2c..a345898f0 100644
--- a/maps/AzaleaTown.asm
+++ b/maps/AzaleaTown.asm
@@ -21,7 +21,7 @@ AzaleaTown_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .Flypoint
+ callback MAPCALLBACK_NEWMAP, .Flypoint
.DummyScene0:
end
@@ -37,7 +37,7 @@ AzaleaTown_MapScriptHeader:
return
AzaleaTownRivalBattleScene1:
- moveobject AZALEATOWN_SILVER, $b, $b
+ moveobject AZALEATOWN_SILVER, 11, 11
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
special Special_FadeOutMusic
@@ -102,7 +102,7 @@ AzaleaTownRivalBattleScript:
applymovement AZALEATOWN_SILVER, AzaleaTownRivalBattleExitMovement
playsound SFX_EXIT_BUILDING
disappear AZALEATOWN_SILVER
- setscene $0
+ setscene 0
waitsfx
playmapmusic
end
@@ -170,7 +170,7 @@ AzaleaTownCelebiScene:
setflag ENGINE_HAVE_EXAMINED_GS_BALL
clearevent EVENT_ILEX_FOREST_LASS
setevent EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS
- setscene $0
+ setscene 0
closetext
end
@@ -211,7 +211,7 @@ WhiteApricornTree:
fruittree FRUITTREE_AZALEA_TOWN
AzaleaTownHiddenFullHeal:
- dwb EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL, FULL_HEAL
+ hiddenitem EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL, FULL_HEAL
AzaleaTownRivalBattleApproachMovement1:
step LEFT
diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm
index 0e44eab3a..637f5c292 100644
--- a/maps/BattleTower1F.asm
+++ b/maps/BattleTower1F.asm
@@ -16,10 +16,10 @@ BattleTower1F_MapScriptHeader:
.Scene0:
writebyte BATTLETOWERACTION_CHECKSAVEFILEISYOURS
- special BattleTowerAction
+ special Special_BattleTowerAction
iffalse .SkipEverything
writebyte BATTLETOWERACTION_GET_CHALLENGE_STATE ; copybytetovar sBattleTowerChallengeState
- special BattleTowerAction
+ special Special_BattleTowerAction
if_equal $0, .SkipEverything
if_equal $2, .priorityjump1
if_equal $3, .SkipEverything
@@ -34,11 +34,11 @@ BattleTower1F_MapScriptHeader:
.priorityjump1
priorityjump BattleTower_LeftWithoutSaving
writebyte BATTLETOWERACTION_CHALLENGECANCELED
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_06
- special BattleTowerAction
+ special Special_BattleTowerAction
.SkipEverything:
- setscene $1
+ setscene 1
.Scene1:
end
@@ -55,63 +55,63 @@ UnknownScript_0x9e3e0:
ReceptionistScript_0x9e3e2:
writebyte BATTLETOWERACTION_GET_CHALLENGE_STATE ; copybytetovar sBattleTowerChallengeState
- special BattleTowerAction
+ special Special_BattleTowerAction
if_equal $3, Script_BeatenAllTrainers2 ; maps/BattleTowerBattleRoom.asm
opentext
writetext Text_BattleTowerWelcomesYou
buttonsound
writebyte BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [sBattleTowerSaveFileFlags]
- special BattleTowerAction
+ special Special_BattleTowerAction
if_not_equal $0, Script_Menu_ChallengeExplanationCancel
jump Script_BattleTowerIntroductionYesNo
Script_Menu_ChallengeExplanationCancel: ; 0x9e3fc
writetext Text_WantToGoIntoABattleRoom
- writebyte $1
+ writebyte TRUE
special Special_Menu_ChallengeExplanationCancel
- if_equal $1, Script_ChooseChallenge
- if_equal $2, Script_BattleTowerExplanation
+ if_equal 1, Script_ChooseChallenge
+ if_equal 2, Script_BattleTowerExplanation
jump Script_BattleTowerHopeToServeYouAgain
Script_ChooseChallenge: ; 0x9e40f
writebyte BATTLETOWERACTION_RESETDATA ; ResetBattleTowerTrainerSRAM
- special BattleTowerAction
- special SpecialCheckForBattleTowerRules
- if_not_equal $0, Script_WaitButton
+ special Special_BattleTowerAction
+ special Special_CheckForBattleTowerRules
+ if_not_equal FALSE, Script_WaitButton
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
- setscene $0
+ setscene 0
special Special_TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
- setscene $1
+ setscene 1
writebyte BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [sBattleTowerSaveFileFlags]
- special BattleTowerAction
- special BattleTowerRoomMenu
+ special Special_BattleTowerAction
+ special Special_BattleTowerRoomMenu
if_equal $a, Script_Menu_ChallengeExplanationCancel
if_not_equal $0, Script_MobileError
writebyte BATTLETOWERACTION_11
- special BattleTowerAction
+ special Special_BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
closetext
writebyte BATTLETOWERACTION_CHOOSEREWARD
- special BattleTowerAction
+ special Special_BattleTowerAction
jump Script_WalkToBattleTowerElevator
Script_ResumeBattleTowerChallenge:
closetext
writebyte BATTLETOWERACTION_LOADLEVELGROUP ; load choice of level group
- special BattleTowerAction
+ special Special_BattleTowerAction
Script_WalkToBattleTowerElevator:
musicfadeout MUSIC_NONE, 8
- setmapscene BATTLE_TOWER_BATTLE_ROOM, $0
- setmapscene BATTLE_TOWER_ELEVATOR, $0
- setmapscene BATTLE_TOWER_HALLWAY, $0
+ setmapscene BATTLE_TOWER_BATTLE_ROOM, 0
+ setmapscene BATTLE_TOWER_ELEVATOR, 0
+ setmapscene BATTLE_TOWER_HALLWAY, 0
follow BATTLETOWER1F_RECEPTIONIST, PLAYER
applymovement BATTLETOWER1F_RECEPTIONIST, MovementData_BattleTower1FWalkToElevator
writebyte BATTLETOWERACTION_0A
- special BattleTowerAction
+ special Special_BattleTowerAction
warpsound
disappear BATTLETOWER1F_RECEPTIONIST
stopfollow
@@ -121,15 +121,15 @@ Script_WalkToBattleTowerElevator:
Script_GivePlayerHisPrize: ; 0x9e47a
writebyte BATTLETOWERACTION_1C
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_GIVEREWARD
- special BattleTowerAction
+ special Special_BattleTowerAction
if_equal POTION, Script_YourPackIsStuffedFull
- itemtotext $0, $1
+ itemtotext USE_SCRIPT_VAR, MEM_BUFFER_1
giveitem ITEM_FROM_MEM, 5
writetext Text_PlayerGotFive
writebyte BATTLETOWERACTION_1D
- special BattleTowerAction
+ special Special_BattleTowerAction
closetext
end
@@ -147,7 +147,7 @@ Script_BattleTowerExplanation: ; 0x9e4a5
writetext Text_BattleTowerIntroduction_2
Script_BattleTowerSkipExplanation:
writebyte BATTLETOWERACTION_SET_EXPLANATION_READ
- special BattleTowerAction
+ special Special_BattleTowerAction
jump Script_Menu_ChallengeExplanationCancel
Script_BattleTowerHopeToServeYouAgain:
@@ -157,7 +157,7 @@ Script_BattleTowerHopeToServeYouAgain:
end
UnreferencedScript_0x9e4b6:
- special BattleTowerMobileError
+ special Special_BattleTowerMobileError
closetext
end
@@ -173,8 +173,8 @@ UnreferencedScript_0x9e4be:
special Special_TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
writebyte BATTLETOWERACTION_SET_EXPLANATION_READ
- special BattleTowerAction
- special Function1700ba
+ special Special_BattleTowerAction
+ special Special_Function1700ba
if_equal $a, Script_Menu_ChallengeExplanationCancel
if_not_equal $0, Script_MobileError
writetext Text_ReceivedAListOfLeadersOnTheHonorRoll
@@ -187,15 +187,15 @@ UnreferencedScript_0x9e4be:
UnreferencedScript_0x9e4ea:
writebyte BATTLETOWERACTION_LEVEL_CHECK
- special BattleTowerAction
+ special Special_BattleTowerAction
if_not_equal $0, Script_APkmnLevelExceeds
writebyte BATTLETOWERACTION_UBERS_CHECK
- special BattleTowerAction
+ special Special_BattleTowerAction
if_not_equal $0, Script_MayNotEnterABattleRoomUnderL70
- special SpecialCheckForBattleTowerRules
- if_not_equal $0, Script_WaitButton
+ special Special_CheckForBattleTowerRules
+ if_not_equal FALSE, Script_WaitButton
writebyte BATTLETOWERACTION_05
- special BattleTowerAction
+ special Special_BattleTowerAction
if_equal $0, .zero
writetext Text_CantBeRegistered_PreviousRecordDeleted
jump continue
@@ -208,14 +208,14 @@ continue:
writetext Text_SaveBeforeReentry
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
- setscene $0
+ setscene 0
special Special_TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
- setscene $1
+ setscene 1
writebyte BATTLETOWERACTION_06
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_12
- special BattleTowerAction
+ special Special_BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
jump Script_ResumeBattleTowerChallenge
@@ -236,7 +236,7 @@ Script_MayNotEnterABattleRoomUnderL70: ; 0x9e549
jump Script_Menu_ChallengeExplanationCancel
Script_MobileError:
- special BattleTowerMobileError
+ special Special_BattleTowerMobileError
closetext
end
diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm
index acd8bfa66..22cbdef3f 100644
--- a/maps/BattleTowerBattleRoom.asm
+++ b/maps/BattleTowerBattleRoom.asm
@@ -14,7 +14,7 @@ BattleTowerBattleRoom_MapScriptHeader:
.EnterBattleRoom: ; 0x9f419
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
priorityjump Script_BattleRoom
- setscene $1
+ setscene 1
.DummyScene:
end
@@ -23,17 +23,17 @@ Script_BattleRoom: ; 0x9f421
; beat all 7 opponents in a row
Script_BattleRoomLoop: ; 0x9f425
writebyte BATTLETOWERBATTLEROOM_YOUNGSTER
- special Function_LoadOpponentTrainerAndPokemonsWithOTSprite
+ special Special_LoadOpponentTrainerAndPokemonWithOTSprite
appear BATTLETOWERBATTLEROOM_YOUNGSTER
warpsound
waitsfx
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn
opentext
- battletowertext 1
+ battletowertext BATTLETOWERTEXT_INTRO
buttonsound
closetext
- special BattleTowerBattle ; calls predef startbattle
- special FadeOutPalettes
+ special Special_BattleTowerBattle ; calls predef startbattle
+ special Special_FadeOutPalettes
reloadmap
if_not_equal $0, Script_FailedBattleTowerChallenge
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
@@ -48,10 +48,10 @@ Script_BattleRoomLoop: ; 0x9f425
waitbutton
closetext
playmusic MUSIC_HEAL
- special FadeOutPalettes
- special LoadMapPalettes
+ special Special_FadeOutPalettes
+ special Special_LoadMapPalettes
pause 60
- special FadeInPalettes
+ special Special_FadeInPalettes
special RestartMapMusic
opentext
writetext Text_NextUpOpponentNo
@@ -68,35 +68,35 @@ Script_DontBattleNextOpponent: ; 0x9f483
yesorno
iffalse Script_DontSaveAndEndTheSession
writebyte BATTLETOWERACTION_SAVELEVELGROUP ; save level group
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_SAVEOPTIONS ; choose reward
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave
- special BattleTowerAction
+ special Special_BattleTowerAction
playsound SFX_SAVE
waitsfx
- special FadeOutPalettes
+ special Special_FadeOutPalettes
special Reset
Script_DontSaveAndEndTheSession: ; 0x9f4a3
writetext Text_CancelYourBattleRoomChallenge
yesorno
iffalse Script_ContinueAndBattleNextOpponent
writebyte BATTLETOWERACTION_CHALLENGECANCELED
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_06
- special BattleTowerAction
+ special Special_BattleTowerAction
closetext
- special FadeOutPalettes
- warpfacing UP, BATTLE_TOWER_1F, $7, $7
+ special Special_FadeOutPalettes
+ warpfacing UP, BATTLE_TOWER_1F, 7, 7
opentext
jump Script_BattleTowerHopeToServeYouAgain
Script_FailedBattleTowerChallenge:
pause 60
special Special_BattleTowerFade
- warpfacing UP, BATTLE_TOWER_1F, $7, $7
+ warpfacing UP, BATTLE_TOWER_1F, 7, 7
writebyte BATTLETOWERACTION_CHALLENGECANCELED
- special BattleTowerAction
+ special Special_BattleTowerAction
opentext
writetext Text_ThanksForVisiting
waitbutton
@@ -106,7 +106,7 @@ Script_FailedBattleTowerChallenge:
Script_BeatenAllTrainers: ; 0x9f4d9
pause 60
special Special_BattleTowerFade
- warpfacing UP, BATTLE_TOWER_1F, $7, $7
+ warpfacing UP, BATTLE_TOWER_1F, 7, 7
Script_BeatenAllTrainers2:
opentext
writetext Text_CongratulationsYouveBeatenAllTheTrainers
@@ -114,7 +114,7 @@ Script_BeatenAllTrainers2:
UnreferencedScript_0x9f4eb:
writebyte BATTLETOWERACTION_CHALLENGECANCELED
- special BattleTowerAction
+ special Special_BattleTowerAction
opentext
writetext Text_TooMuchTimeElapsedNoRegister
waitbutton
@@ -123,9 +123,9 @@ UnreferencedScript_0x9f4eb:
UnreferencedScript_0x9f4f7:
writebyte BATTLETOWERACTION_CHALLENGECANCELED
- special BattleTowerAction
+ special Special_BattleTowerAction
writebyte BATTLETOWERACTION_06
- special BattleTowerAction
+ special Special_BattleTowerAction
opentext
writetext Text_ThanksForVisiting
writetext Text_WeHopeToServeYouAgain
@@ -133,13 +133,11 @@ UnreferencedScript_0x9f4f7:
closetext
end
-
Text_ReturnedAfterSave_Mobile:
text "You'll be returned"
line "after you SAVE."
done
-
BattleTowerBattleRoom_MapEventHeader:
; filler
db 0, 0
diff --git a/maps/BattleTowerElevator.asm b/maps/BattleTowerElevator.asm
index 2327b31fa..e7b70acdc 100644
--- a/maps/BattleTowerElevator.asm
+++ b/maps/BattleTowerElevator.asm
@@ -12,7 +12,7 @@ BattleTowerElevator_MapScriptHeader:
.Scene0:
priorityjump .RideElevator
- setscene $1
+ setscene 1
.Scene1:
end
@@ -22,7 +22,7 @@ BattleTowerElevator_MapScriptHeader:
applymovement BATTLETOWERELEVATOR_RECEPTIONIST, MovementData_BattleTowerElevatorReceptionistWalksIn
applymovement PLAYER, MovementData_BattleTowerElevatorPlayerWalksIn
writebyte BATTLETOWERACTION_0A
- special BattleTowerAction
+ special Special_BattleTowerAction
playsound SFX_ELEVATOR
earthquake 60
waitsfx
diff --git a/maps/BattleTowerHallway.asm b/maps/BattleTowerHallway.asm
index 41a3beb83..c12091582 100644
--- a/maps/BattleTowerHallway.asm
+++ b/maps/BattleTowerHallway.asm
@@ -12,7 +12,7 @@ BattleTowerHallway_MapScriptHeader:
.Scene0:
priorityjump .ChooseBattleRoom
- setscene $1
+ setscene 1
.Scene1:
end
@@ -21,7 +21,6 @@ BattleTowerHallway_MapScriptHeader:
callasm .asm_load_battle_room
jump .WalkToChosenBattleRoom
-
.asm_load_battle_room
ld a, [rSVBK]
push af
@@ -35,7 +34,6 @@ BattleTowerHallway_MapScriptHeader:
ld [rSVBK], a
ret
-
; enter different rooms for different levels to battle against
; at least it should look like that
; because all warps lead to the same room
diff --git a/maps/BattleTowerOutside.asm b/maps/BattleTowerOutside.asm
index 6ed01da6f..adb0c5f21 100644
--- a/maps/BattleTowerOutside.asm
+++ b/maps/BattleTowerOutside.asm
@@ -10,8 +10,8 @@ BattleTowerOutside_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_TILES, .Callback1
- dbw MAPCALLBACK_OBJECTS, .Callback2
+ callback MAPCALLBACK_TILES, .Callback1
+ callback MAPCALLBACK_OBJECTS, .Callback2
.Callback1:
return
diff --git a/maps/BetaCinnabarIslandPokemonLabHallway.blk b/maps/BetaCinnabarPokemonLabHallway.blk
index 7a6502a26..7a6502a26 100644
--- a/maps/BetaCinnabarIslandPokemonLabHallway.blk
+++ b/maps/BetaCinnabarPokemonLabHallway.blk
diff --git a/maps/BetaCinnabarIslandPokemonLabRoom1.blk b/maps/BetaCinnabarPokemonLabRoom1.blk
index ef77b6561..ef77b6561 100644
--- a/maps/BetaCinnabarIslandPokemonLabRoom1.blk
+++ b/maps/BetaCinnabarPokemonLabRoom1.blk
diff --git a/maps/BetaCinnabarIslandPokemonLabRoom2.blk b/maps/BetaCinnabarPokemonLabRoom2.blk
index 822db175b..822db175b 100644
--- a/maps/BetaCinnabarIslandPokemonLabRoom2.blk
+++ b/maps/BetaCinnabarPokemonLabRoom2.blk
diff --git a/maps/BetaCinnabarIslandPokemonLabRoom3.blk b/maps/BetaCinnabarPokemonLabRoom3.blk
index d9a64a5da..d9a64a5da 100644
--- a/maps/BetaCinnabarIslandPokemonLabRoom3.blk
+++ b/maps/BetaCinnabarPokemonLabRoom3.blk
diff --git a/maps/BetaTeakCity.blk b/maps/BetaEcruteakCity.blk
index ce448c2ef..ce448c2ef 100644
--- a/maps/BetaTeakCity.blk
+++ b/maps/BetaEcruteakCity.blk
diff --git a/maps/BetaSSAquaInsideCutOut.blk b/maps/BetaFastShipInsideCutOut.blk
index b385b0198..b385b0198 100644
--- a/maps/BetaSSAquaInsideCutOut.blk
+++ b/maps/BetaFastShipInsideCutOut.blk
diff --git a/maps/BlackthornCity.asm b/maps/BlackthornCity.asm
index c5cd10235..178e986bd 100644
--- a/maps/BlackthornCity.asm
+++ b/maps/BlackthornCity.asm
@@ -15,8 +15,8 @@ BlackthornCity_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
- dbw MAPCALLBACK_OBJECTS, .Santos
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_OBJECTS, .Santos
.FlyPoint:
setflag ENGINE_FLYPOINT_BLACKTHORN
diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm
index c640c2c06..8e997132a 100644
--- a/maps/BlackthornGym1F.asm
+++ b/maps/BlackthornGym1F.asm
@@ -11,20 +11,20 @@ BlackthornGym1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .Boulders
+ callback MAPCALLBACK_TILES, .Boulders
.Boulders:
checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_1
iffalse .skip1
- changeblock $8, $2, $3b
+ changeblock 8, 2, $3b
.skip1
checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_2
iffalse .skip2
- changeblock $2, $4, $3a
+ changeblock 2, 4, $3a
.skip2
checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_3
iffalse .skip3
- changeblock $8, $6, $3b
+ changeblock 8, 6, $3b
.skip3
return
@@ -39,7 +39,7 @@ BlackthornGymClairScript:
waitbutton
closetext
winlosstext ClairWinText, 0
- loadtrainer CLAIR, 1
+ loadtrainer CLAIR, CLAIR1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_CLAIR
@@ -70,7 +70,7 @@ BlackthornGymClairScript:
buttonsound
giveitem TM_DRAGONBREATH
iffalse .BagFull
- itemtotext TM_DRAGONBREATH, $0
+ itemtotext TM_DRAGONBREATH, MEM_BUFFER_0
writetext BlackthornGymText_ReceivedTM24
playsound SFX_ITEM
waitsfx
@@ -146,7 +146,7 @@ BlackthornGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext CLAIR, 1, $1
+ trainertotext CLAIR, CLAIR1, MEM_BUFFER_1
jumpstd gymstatue2
ClairIntroText:
diff --git a/maps/BlackthornGym2F.asm b/maps/BlackthornGym2F.asm
index 6aa55a0e5..2f23f7c9e 100644
--- a/maps/BlackthornGym2F.asm
+++ b/maps/BlackthornGym2F.asm
@@ -14,31 +14,30 @@ BlackthornGym2F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_CMDQUEUE, .Boulders
+ callback MAPCALLBACK_CMDQUEUE, .SetUpStoneTable
-.Boulders:
- writecmdqueue .BoulderCmdQueue
+.SetUpStoneTable:
+ writecmdqueue .CommandQueue
return
-.BoulderCmdQueue:
- dbw CMDQUEUE_STONETABLE, .BoulderTable ; check if any stones are sitting on a warp
- dw 0 ; filler
+.CommandQueue:
+ cmdqueue CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp
-.BoulderTable:
- stonetable 5, BLACKTHORNGYM2F_BOULDER1, .Disappear4
- stonetable 3, BLACKTHORNGYM2F_BOULDER2, .Disappear5
- stonetable 4, BLACKTHORNGYM2F_BOULDER3, .Disappear6
+.StoneTable:
+ stonetable 5, BLACKTHORNGYM2F_BOULDER1, .Boulder1
+ stonetable 3, BLACKTHORNGYM2F_BOULDER2, .Boulder2
+ stonetable 4, BLACKTHORNGYM2F_BOULDER3, .Boulder3
db -1 ; end
-.Disappear4:
+.Boulder1:
disappear BLACKTHORNGYM2F_BOULDER1
jump .Fall
-.Disappear5:
+.Boulder2:
disappear BLACKTHORNGYM2F_BOULDER2
jump .Fall
-.Disappear6:
+.Boulder3:
disappear BLACKTHORNGYM2F_BOULDER3
jump .Fall
@@ -56,7 +55,6 @@ BlackthornGym2F_MapScriptHeader:
earthquake 80
end
-
BlackthornGymBoulder:
jumpstd strengthboulder
diff --git a/maps/BluesHouse.asm b/maps/BluesHouse.asm
index 9a40a68f6..ba1871480 100644
--- a/maps/BluesHouse.asm
+++ b/maps/BluesHouse.asm
@@ -27,20 +27,20 @@ DaisyScript:
writetext DaisyWhichMonText
waitbutton
special Special_DaisyMassage
- if_equal 0, .Refused
- if_equal 1, .CantGroomEgg
+ if_equal $0, .Refused
+ if_equal $1, .CantGroomEgg
setflag ENGINE_TEA_IN_BLUES_HOUSE
writetext DaisyAlrightText
waitbutton
closetext
- special FadeOutPalettes
+ special Special_FadeOutPalettes
playmusic MUSIC_HEAL
pause 60
- special FadeInPalettes
+ special Special_FadeInPalettes
special RestartMapMusic
opentext
writetext GroomedMonLooksContentText
- special PlayCurMonCry
+ special Special_PlayCurMonCry
buttonsound
writetext DaisyAllDoneText
waitbutton
diff --git a/maps/BrunosRoom.asm b/maps/BrunosRoom.asm
index 784f06185..568ca0476 100644
--- a/maps/BrunosRoom.asm
+++ b/maps/BrunosRoom.asm
@@ -9,7 +9,7 @@ BrunosRoom_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .BrunosRoomDoors
+ callback MAPCALLBACK_TILES, .BrunosRoomDoors
.LockDoor:
priorityjump .BrunosDoorLocksBehindYou
@@ -21,11 +21,11 @@ BrunosRoom_MapScriptHeader:
.BrunosRoomDoors:
checkevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
iffalse .KeepDoorClosed
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
.KeepDoorClosed:
checkevent EVENT_BRUNOS_ROOM_EXIT_OPEN
iffalse .OpenDoor
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
.OpenDoor:
return
@@ -34,10 +34,10 @@ BrunosRoom_MapScriptHeader:
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
reloadmappart
closetext
- setscene $1
+ setscene 1
setevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -51,7 +51,7 @@ BrunoScript_Battle:
waitbutton
closetext
winlosstext BrunoScript_BrunoBeatenText, 0
- loadtrainer BRUNO, 1
+ loadtrainer BRUNO, BRUNO1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_ELITE_4_BRUNO
@@ -60,7 +60,7 @@ BrunoScript_Battle:
waitbutton
closetext
playsound SFX_ENTER_DOOR
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
reloadmappart
closetext
setevent EVENT_BRUNOS_ROOM_EXIT_OPEN
diff --git a/maps/BurnedTower1F.asm b/maps/BurnedTower1F.asm
index 69b71d9e3..d35fd0a00 100644
--- a/maps/BurnedTower1F.asm
+++ b/maps/BurnedTower1F.asm
@@ -14,7 +14,7 @@ BurnedTower1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .HoleAndLadder
+ callback MAPCALLBACK_TILES, .HoleAndLadder
.EusineScene:
priorityjump .MeetEusine
@@ -29,11 +29,11 @@ BurnedTower1F_MapScriptHeader:
.HoleAndLadder:
checkevent EVENT_HOLE_IN_BURNED_TOWER
iftrue .Next
- changeblock $a, $8, $32 ; hole
+ changeblock 10, 8, $32 ; hole
.Next:
checkevent EVENT_RELEASED_THE_BEASTS
iftrue .Done
- changeblock $6, $e, $9 ; ladder
+ changeblock 6, 14, $09 ; ladder
.Done:
return
@@ -45,8 +45,8 @@ BurnedTower1F_MapScriptHeader:
writetext BurnedTower1FEusineIntroText
waitbutton
closetext
- moveobject BURNEDTOWER1F_EUSINE, $9, $e
- setscene $1
+ moveobject BURNEDTOWER1F_EUSINE, 9, 14
+ setscene 1
end
BurnedTowerRivalBattleScript:
@@ -98,7 +98,7 @@ BurnedTowerRivalBattleScript:
writetext BurnedTowerSilver_AfterText1
waitbutton
closetext
- setscene $2
+ setscene 2
setevent EVENT_RIVAL_BURNED_TOWER
special Special_FadeOutMusic
pause 15
@@ -106,7 +106,7 @@ BurnedTowerRivalBattleScript:
showemote EMOTE_SHOCK, PLAYER, 15
playsound SFX_ENTER_DOOR
waitsfx
- changeblock $a, $8, $25
+ changeblock 10, 8, $25
reloadmappart
pause 15
applymovement PLAYER, BurnedTower1FMovement_PlayerStartsToFall
@@ -131,12 +131,10 @@ BurnedTower1FRock:
jumpstd smashrock
BurnedTower1FHiddenEther:
- dwb EVENT_BURNED_TOWER_1F_HIDDEN_ETHER, ETHER
-
+ hiddenitem EVENT_BURNED_TOWER_1F_HIDDEN_ETHER, ETHER
BurnedTower1FHiddenUltraBall:
- dwb EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+ hiddenitem EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
BurnedTower1FHPUp:
itemball HP_UP
diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm
index 07f5c3d6e..d8f1516e5 100644
--- a/maps/BurnedTowerB1F.asm
+++ b/maps/BurnedTowerB1F.asm
@@ -17,7 +17,7 @@ BurnedTowerB1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .LadderCallback
+ callback MAPCALLBACK_TILES, .LadderCallback
.DummyScene0:
end
@@ -28,7 +28,7 @@ BurnedTowerB1F_MapScriptHeader:
.LadderCallback:
checkevent EVENT_RELEASED_THE_BEASTS
iftrue .NoChange
- changeblock $6, $e, $2
+ changeblock 6, 14, $02
.NoChange:
return
@@ -81,22 +81,22 @@ ReleaseTheBeasts:
disappear BURNEDTOWERB1F_SUICUNE1
waitsfx
special RestartMapMusic
- setscene $1
+ setscene 1
setevent EVENT_RELEASED_THE_BEASTS
- special InitRoamMons
- setmapscene ECRUTEAK_GYM, $1
- setmapscene CIANWOOD_CITY, $1
+ special Special_InitRoamMons
+ setmapscene ECRUTEAK_GYM, 1
+ setmapscene CIANWOOD_CITY, 1
clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
setevent EVENT_ECRUTEAK_GYM_GRAMPS
clearevent EVENT_ECRUTEAK_CITY_GRAMPS
setevent EVENT_BURNED_TOWER_MORTY
setevent EVENT_BURNED_TOWER_1F_EUSINE
appear BURNEDTOWERB1F_EUSINE
- refreshscreen $0
- changeblock $6, $e, $1b
+ refreshscreen
+ changeblock 6, 14, $1b
reloadmappart
closetext
- setscene $1
+ setscene 1
end
BurnedTowerB1FEusine:
@@ -106,7 +106,7 @@ BurnedTowerB1FEusine:
waitbutton
closetext
checkcode VAR_FACING
- if_equal $1, .Movement
+ if_equal UP, .Movement
applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement1
jump UnknownScript_0x18622a
diff --git a/maps/CeladonCafe.asm b/maps/CeladonCafe.asm
index de89b1953..9a1b58799 100644
--- a/maps/CeladonCafe.asm
+++ b/maps/CeladonCafe.asm
@@ -96,7 +96,7 @@ CeladonCafeTrashcan:
giveitem LEFTOVERS
iffalse .PackFull
opentext
- itemtotext LEFTOVERS, $0
+ itemtotext LEFTOVERS, MEM_BUFFER_0
writetext FoundLeftoversText
playsound SFX_ITEM
waitsfx
@@ -107,7 +107,7 @@ CeladonCafeTrashcan:
.PackFull:
opentext
- itemtotext LEFTOVERS, $0
+ itemtotext LEFTOVERS, MEM_BUFFER_0
writetext FoundLeftoversText
buttonsound
writetext NoRoomForLeftoversText
diff --git a/maps/CeladonCity.asm b/maps/CeladonCity.asm
index bfc5265ea..bcd254a2f 100644
--- a/maps/CeladonCity.asm
+++ b/maps/CeladonCity.asm
@@ -15,7 +15,7 @@ CeladonCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_CELADON
@@ -75,7 +75,7 @@ CeladonCityPokecenterSign:
jumpstd pokecentersign
CeladonCityHiddenPpUp:
- dwb EVENT_CELADON_CITY_HIDDEN_PP_UP, PP_UP
+ hiddenitem EVENT_CELADON_CITY_HIDDEN_PP_UP, PP_UP
CeladonCityFisherText:
text "This POLIWRATH is"
diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm
index c94ef993e..c5474c9b5 100644
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -8,10 +8,10 @@ CeladonDeptStore6F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .Callback
+ callback MAPCALLBACK_TILES, .Callback
.Callback:
- changeblock $c, $0, $3
+ changeblock 12, 0, $03
return
CeladonDeptStore6FSuperNerdScript:
@@ -24,41 +24,41 @@ CeladonDeptStore6FVendingMachine:
opentext
writetext CeladonVendingText
.Start:
- special PlaceMoneyTopRight
+ special Special_PlaceMoneyTopRight
loadmenudata .MenuData
verticalmenu
closewindow
- if_equal $1, .FreshWater
- if_equal $2, .SodaPop
- if_equal $3, .Lemonade
+ if_equal 1, .FreshWater
+ if_equal 2, .SodaPop
+ if_equal 3, .Lemonade
closetext
end
.FreshWater:
- checkmoney $0, 200
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 200
+ if_equal HAVE_LESS, .NotEnoughMoney
giveitem FRESH_WATER
iffalse .NotEnoughSpace
- takemoney $0, 200
- itemtotext FRESH_WATER, $0
+ takemoney YOUR_MONEY, 200
+ itemtotext FRESH_WATER, MEM_BUFFER_0
jump .VendItem
.SodaPop:
- checkmoney $0, 300
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 300
+ if_equal HAVE_LESS, .NotEnoughMoney
giveitem SODA_POP
iffalse .NotEnoughSpace
- takemoney $0, 300
- itemtotext SODA_POP, $0
+ takemoney YOUR_MONEY, 300
+ itemtotext SODA_POP, MEM_BUFFER_0
jump .VendItem
.Lemonade:
- checkmoney $0, 350
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 350
+ if_equal HAVE_LESS, .NotEnoughMoney
giveitem LEMONADE
iffalse .NotEnoughSpace
- takemoney $0, 350
- itemtotext LEMONADE, $0
+ takemoney YOUR_MONEY, 350
+ itemtotext LEMONADE, MEM_BUFFER_0
jump .VendItem
.VendItem:
@@ -81,8 +81,7 @@ CeladonDeptStore6FVendingMachine:
.MenuData:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 19 ; end coords
+ menu_coords 0, 2, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -94,7 +93,6 @@ CeladonDeptStore6FVendingMachine:
db "LEMONADE ¥350@"
db "CANCEL@"
-
CeladonDeptStore6FDirectory:
jumptext CeladonDeptStore6FDirectoryText
diff --git a/maps/CeladonDeptStoreElevator.asm b/maps/CeladonDeptStoreElevator.asm
index d199bb734..13317c02a 100644
--- a/maps/CeladonDeptStoreElevator.asm
+++ b/maps/CeladonDeptStoreElevator.asm
@@ -25,7 +25,7 @@ CeladonDeptStoreElevatorData:
elevfloor FLOOR_4F, 3, CELADON_DEPT_STORE_4F
elevfloor FLOOR_5F, 3, CELADON_DEPT_STORE_5F
elevfloor FLOOR_6F, 2, CELADON_DEPT_STORE_6F
- db $ff ; end
+ db -1 ; end
CeladonDeptStoreElevator_MapEventHeader:
; filler
diff --git a/maps/CeladonGameCorner.asm b/maps/CeladonGameCorner.asm
index d35b1a45b..7310e2e35 100644
--- a/maps/CeladonGameCorner.asm
+++ b/maps/CeladonGameCorner.asm
@@ -59,8 +59,8 @@ CeladonGameCornerFisherScript:
checkitem COIN_CASE
iffalse .NoCoinCase
checkcoins MAX_COINS - 1
- if_equal $0, .FullCoinCase
- stringtotext .coinname, $1
+ if_equal HAVE_MORE, .FullCoinCase
+ stringtotext .coinname, MEM_BUFFER_1
scall .GiveCoins
givecoins 18
setevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON
@@ -111,23 +111,23 @@ CeladonGameCornerPoster2Script:
jumptext CeladonGameCornerPoster2Text
CeladonGameCornerLuckySlotMachineScript:
- random $6
- if_equal $0, CeladonGameCornerSlotMachineScript
- refreshscreen $0
- writebyte $0
+ random 6
+ if_equal 0, CeladonGameCornerSlotMachineScript
+ refreshscreen
+ writebyte FALSE
special Special_SlotMachine
closetext
end
CeladonGameCornerSlotMachineScript:
- refreshscreen $0
- writebyte $1
+ refreshscreen
+ writebyte TRUE
special Special_SlotMachine
closetext
end
CeladonGameCornerCardFlipScript:
- refreshscreen $0
+ refreshscreen
special Special_CardFlip
closetext
end
@@ -144,7 +144,7 @@ MapCeladonGameCornerSignpost9Script:
end
MovementData_0x721cd:
-; Unreferenced.
+; unused
step RIGHT
turn_head LEFT
step_end
diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm
index 7f74c684f..07728ca97 100644
--- a/maps/CeladonGameCornerPrizeRoom.asm
+++ b/maps/CeladonGameCornerPrizeRoom.asm
@@ -15,7 +15,7 @@ CeladonGameCornerPrizeRoomGentlemanScript:
CeladonGameCornerPrizeRoomPharmacistScript:
jumptextfaceplayer CeladonGameCornerPrizeRoomPharmacistText
-GoldenrodGameCornerTMVendor:
+CeladonGameCornerPrizeRoomTMVendor:
faceplayer
opentext
writetext CeladonPrizeRoom_PrizeVendorIntroText
@@ -28,15 +28,15 @@ CeladonPrizeRoom_tmcounterloop:
loadmenudata CeladonPrizeRoom_TMMenuDataHeader
verticalmenu
closewindow
- if_equal $1, .doubleteam
- if_equal $2, .psychic
- if_equal $3, .hyperbeam
+ if_equal 1, .doubleteam
+ if_equal 2, .psychic
+ if_equal 3, .hyperbeam
jump CeladonPrizeRoom_cancel
.doubleteam
checkcoins 1500
- if_equal $2, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_DOUBLE_TEAM, $0
+ if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
+ itemtotext TM_DOUBLE_TEAM, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
giveitem TM_DOUBLE_TEAM
@@ -46,8 +46,8 @@ CeladonPrizeRoom_tmcounterloop:
.psychic
checkcoins 3500
- if_equal $2, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_PSYCHIC_M, $0
+ if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
+ itemtotext TM_PSYCHIC_M, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
giveitem TM_PSYCHIC_M
@@ -57,8 +57,8 @@ CeladonPrizeRoom_tmcounterloop:
.hyperbeam
checkcoins 7500
- if_equal $2, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_HYPER_BEAM, $0
+ if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
+ itemtotext TM_HYPER_BEAM, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
giveitem TM_HYPER_BEAM
@@ -102,11 +102,9 @@ CeladonPrizeRoom_NoCoinCase:
closetext
end
-
CeladonPrizeRoom_TMMenuDataHeader:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 15 ; end coords
+ menu_coords 0, 2, 15, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -118,8 +116,7 @@ CeladonPrizeRoom_TMMenuDataHeader:
db "TM15 7500@"
db "CANCEL@"
-
-GoldenrodGameCornerPokemonVendor:
+CeladonGameCornerPrizeRoomPokemonVendor:
faceplayer
opentext
writetext CeladonPrizeRoom_PrizeVendorIntroText
@@ -132,17 +129,17 @@ GoldenrodGameCornerPokemonVendor:
loadmenudata .MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .pikachu
- if_equal $2, .porygon
- if_equal $3, .larvitar
+ if_equal 1, .pikachu
+ if_equal 2, .porygon
+ if_equal 3, .larvitar
jump CeladonPrizeRoom_cancel
.pikachu
checkcoins 2222
- if_equal $2, CeladonPrizeRoom_notenoughcoins
+ if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
- if_equal $6, CeladonPrizeRoom_notenoughroom
- pokenamemem PIKACHU, $0
+ if_equal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
+ pokenamemem PIKACHU, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
waitsfx
@@ -157,10 +154,10 @@ GoldenrodGameCornerPokemonVendor:
.porygon
checkcoins 5555
- if_equal $2, CeladonPrizeRoom_notenoughcoins
+ if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
- if_equal $6, CeladonPrizeRoom_notenoughroom
- pokenamemem PORYGON, $0
+ if_equal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
+ pokenamemem PORYGON, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
waitsfx
@@ -175,10 +172,10 @@ GoldenrodGameCornerPokemonVendor:
.larvitar
checkcoins 8888
- if_equal $2, CeladonPrizeRoom_notenoughcoins
+ if_equal HAVE_LESS, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
- if_equal $6, CeladonPrizeRoom_notenoughroom
- pokenamemem LARVITAR, $0
+ if_equal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom
+ pokenamemem LARVITAR, MEM_BUFFER_0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
waitsfx
@@ -191,11 +188,9 @@ GoldenrodGameCornerPokemonVendor:
takecoins 8888
jump .loop
-
.MenuDataHeader:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 17 ; end coords
+ menu_coords 0, 2, 17, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -207,7 +202,6 @@ GoldenrodGameCornerPokemonVendor:
db "LARVITAR 8888@"
db "CANCEL@"
-
CeladonGameCornerPrizeRoomGentlemanText:
text "I wanted PORYGON,"
line "but I was short by"
@@ -283,8 +277,8 @@ CeladonGameCornerPrizeRoom_MapEventHeader:
.BGEvents:
db 2
- bg_event 2, 1, BGEVENT_READ, GoldenrodGameCornerTMVendor
- bg_event 4, 1, BGEVENT_READ, GoldenrodGameCornerPokemonVendor
+ bg_event 2, 1, BGEVENT_READ, CeladonGameCornerPrizeRoomTMVendor
+ bg_event 4, 1, BGEVENT_READ, CeladonGameCornerPrizeRoomPokemonVendor
.ObjectEvents:
db 2
diff --git a/maps/CeladonGym.asm b/maps/CeladonGym.asm
index cabb2d45c..2cd4d74ad 100644
--- a/maps/CeladonGym.asm
+++ b/maps/CeladonGym.asm
@@ -22,7 +22,7 @@ ErikaScript_0x72a6a:
waitbutton
closetext
winlosstext UnknownText_0x72c3e, 0
- loadtrainer ERIKA, 1
+ loadtrainer ERIKA, ERIKA1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_ERIKA
@@ -109,7 +109,7 @@ CeladonGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext ERIKA, 1, $1
+ trainertotext ERIKA, ERIKA1, MEM_BUFFER_1
jumpstd gymstatue2
UnknownText_0x72b28:
diff --git a/maps/CeladonMansion3F.asm b/maps/CeladonMansion3F.asm
index 5274b5b38..895e73e14 100644
--- a/maps/CeladonMansion3F.asm
+++ b/maps/CeladonMansion3F.asm
@@ -16,7 +16,7 @@ CooltrainerMScript_0x71670:
opentext
writetext UnknownText_0x716ce
checkcode VAR_DEXCAUGHT
- if_greater_than 248, UnknownScript_0x7167e
+ if_greater_than NUM_POKEMON - 2 - 1, UnknownScript_0x7167e ; ignore Mew and Celebi
waitbutton
closetext
end
@@ -28,7 +28,7 @@ UnknownScript_0x7167e:
waitsfx
writetext UnknownText_0x71760
buttonsound
- special Diploma
+ special Special_Diploma
writetext UnknownText_0x71763
waitbutton
closetext
@@ -49,7 +49,7 @@ UnknownScript_0x716a4:
writetext UnknownText_0x717d8
yesorno
iffalse UnknownScript_0x716b0
- special PrintDiploma
+ special Special_PrintDiploma
closetext
end
diff --git a/maps/CeladonPokecenter1F.asm b/maps/CeladonPokecenter1F.asm
index 2c2a594e6..252d14b89 100644
--- a/maps/CeladonPokecenter1F.asm
+++ b/maps/CeladonPokecenter1F.asm
@@ -30,9 +30,9 @@ CeladonEusine:
writetext CeladonEusineText1
buttonsound
writebyte SUICUNE
- special SpecialMonCheck
+ special Special_MonCheck
iffalse .NoSuicune
- special SpecialBeastsCheck
+ special Special_BeastsCheck
iftrue .HoOh
writetext NoBeastsText
waitbutton
@@ -45,7 +45,7 @@ CeladonEusine:
waitbutton
closetext
checkcode VAR_FACING
- if_equal $1, .Location1
+ if_equal UP, .Location1
applymovement CELADONPOKECENTER1F_EUSINE, .Movement1
jump .Continue
@@ -133,7 +133,7 @@ NoBeastsText:
para "#MON RAIKOU and"
line "ENTEI?"
- para $56, $56, $56
+ para "<......><......><......>"
para "Okay…"
diff --git a/maps/CeruleanCity.asm b/maps/CeruleanCity.asm
index 47a991d21..23dd9444a 100644
--- a/maps/CeruleanCity.asm
+++ b/maps/CeruleanCity.asm
@@ -12,7 +12,7 @@ CeruleanCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_CERULEAN
@@ -147,7 +147,7 @@ CeruleanCityMartSign:
jumpstd martsign
CeruleanCityHiddenBerserkGene:
- dwb EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY, BERSERK_GENE
+ hiddenitem EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY, BERSERK_GENE
CeruleanCityCooltrainerMText1:
text "KANTO's POWER"
diff --git a/maps/CeruleanGym.asm b/maps/CeruleanGym.asm
index 59a1b72b9..144b690b1 100644
--- a/maps/CeruleanGym.asm
+++ b/maps/CeruleanGym.asm
@@ -48,9 +48,9 @@ CeruleanGym_MapScriptHeader:
setevent EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM
clearevent EVENT_ROUTE_24_ROCKET
clearevent EVENT_ROUTE_25_MISTY_BOYFRIEND
- setscene $0
- setmapscene ROUTE_25, $1
- setmapscene POWER_PLANT, $0
+ setscene 0
+ setmapscene ROUTE_25, 1
+ setmapscene POWER_PLANT, 0
waitsfx
special RestartMapMusic
pause 15
@@ -67,7 +67,7 @@ MistyScript_0x188432:
waitbutton
closetext
winlosstext UnknownText_0x18870c, 0
- loadtrainer MISTY, 1
+ loadtrainer MISTY, MISTY1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_MISTY
@@ -135,8 +135,7 @@ CeruleanGymGuyScript:
end
CeruleanGymHiddenMachinePart:
- dwb EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM, MACHINE_PART
-
+ hiddenitem EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM, MACHINE_PART
CeruleanGymStatue1:
checkevent EVENT_TRAINERS_IN_CERULEAN_GYM
@@ -161,7 +160,7 @@ CeruleanGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext MISTY, 1, $1
+ trainertotext MISTY, MISTY1, MEM_BUFFER_1
jumpstd gymstatue2
MovementData_0x1884e3:
@@ -178,9 +177,9 @@ MovementData_0x1884e8:
MovementData_0x1884eb:
fix_facing
- db $39 ; movement
+ set_sliding
jump_step UP
- db $38 ; movement
+ remove_sliding
remove_fixed_facing
step_sleep 8
step_sleep 8
diff --git a/maps/CeruleanPokecenter1F.asm b/maps/CeruleanPokecenter1F.asm
index 2e03275d4..74b5b2bbb 100644
--- a/maps/CeruleanPokecenter1F.asm
+++ b/maps/CeruleanPokecenter1F.asm
@@ -14,7 +14,7 @@ NurseScript_0x18820f:
jumpstd pokecenternurse
SuperNerdScript_0x188212:
- special Mobile_DummyReturnFalse
+ special Special_Mobile_DummyReturnFalse
iftrue .mobile
jumptextfaceplayer UnknownText_0x188221
diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm
index d87d52165..37464afd5 100644
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -13,7 +13,7 @@ CherrygroveCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.DummyScene0:
end
@@ -69,7 +69,7 @@ CherrygroveCityGuideGent:
opentext
writetext GuideGentGiftText
buttonsound
- stringtotext .mapcardname, $1
+ stringtotext .mapcardname, MEM_BUFFER_1
scall .JumpstdReceiveItem
setflag ENGINE_MAP_CARD
writetext GotMapCardText
@@ -101,7 +101,7 @@ CherrygroveCityGuideGent:
end
CherrygroveSilverSceneSouth:
- moveobject CHERRYGROVECITY_SILVER, $27, $7
+ moveobject CHERRYGROVECITY_SILVER, 39, 7
CherrygroveSilverSceneNorth:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
@@ -171,7 +171,7 @@ CherrygroveSilverSceneNorth:
spriteface PLAYER, LEFT
applymovement CHERRYGROVECITY_SILVER, CherrygroveCity_RivalExitsStageLeft
disappear CHERRYGROVECITY_SILVER
- setscene $0
+ setscene 0
special HealParty
playmapmusic
end
diff --git a/maps/CianwoodCity.asm b/maps/CianwoodCity.asm
index 86c958205..44d61317a 100644
--- a/maps/CianwoodCity.asm
+++ b/maps/CianwoodCity.asm
@@ -20,7 +20,7 @@ CianwoodCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPointAndSuicune
+ callback MAPCALLBACK_NEWMAP, .FlyPointAndSuicune
.DummyScene0:
end
@@ -49,9 +49,9 @@ CianwoodCitySuicuneAndEusine:
applymovement CIANWOODCITY_SUICUNE, MovementData_0x1a00e0
disappear CIANWOODCITY_SUICUNE
pause 10
- setscene $0
+ setscene 0
clearevent EVENT_SAW_SUICUNE_ON_ROUTE_42
- setmapscene ROUTE_42, $1
+ setmapscene ROUTE_42, 1
checkevent EVENT_FOUGHT_EUSINE
iftrue .Done
setevent EVENT_FOUGHT_EUSINE
@@ -145,26 +145,26 @@ CianwoodCityRock:
jumpstd smashrock
CianwoodCityHiddenRevive:
- dwb EVENT_CIANWOOD_CITY_HIDDEN_REVIVE, REVIVE
+ hiddenitem EVENT_CIANWOOD_CITY_HIDDEN_REVIVE, REVIVE
CianwoodCityHiddenMaxEther:
- dwb EVENT_CIANWOOD_CITY_HIDDEN_MAX_ETHER, MAX_ETHER
+ hiddenitem EVENT_CIANWOOD_CITY_HIDDEN_MAX_ETHER, MAX_ETHER
MovementData_0x1a00da:
- db $39 ; movement
+ set_sliding
fast_jump_step DOWN
fast_jump_step DOWN
fast_jump_step RIGHT
- db $38 ; movement
+ remove_sliding
step_end
MovementData_0x1a00e0:
- db $39 ; movement
+ set_sliding
fast_jump_step RIGHT
fast_jump_step UP
fast_jump_step RIGHT
fast_jump_step RIGHT
- db $38 ; movement
+ remove_sliding
step_end
MovementData_0x1a00e7:
@@ -390,7 +390,7 @@ CianwoodCity_MapEventHeader:
warp_def 8, 43, 1, CIANWOOD_GYM
warp_def 23, 43, 1, CIANWOOD_POKECENTER_1F
warp_def 15, 47, 1, CIANWOOD_PHARMACY
- warp_def 9, 31, 1, CIANWOOD_CITY_PHOTO_STUDIO
+ warp_def 9, 31, 1, CIANWOOD_PHOTO_STUDIO
warp_def 15, 37, 1, CIANWOOD_LUGIA_SPEECH_HOUSE
warp_def 5, 17, 1, POKE_SEERS_HOUSE
diff --git a/maps/CianwoodGym.asm b/maps/CianwoodGym.asm
index 0323fc0eb..95aa6aaf0 100644
--- a/maps/CianwoodGym.asm
+++ b/maps/CianwoodGym.asm
@@ -40,7 +40,7 @@ ChuckScript_0x9d60f:
waitbutton
closetext
winlosstext ChuckLossText, 0
- loadtrainer CHUCK, 1
+ loadtrainer CHUCK, CHUCK1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_CHUCK
@@ -138,7 +138,7 @@ CianwoodGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext CHUCK, 1, $1
+ trainertotext CHUCK, CHUCK1, MEM_BUFFER_1
jumpstd gymstatue2
CianwoodGymMovement_ChuckChucksBoulder:
diff --git a/maps/CianwoodCityPhotoStudio.asm b/maps/CianwoodPhotoStudio.asm
index 3a20c63e6..5b7f63206 100644
--- a/maps/CianwoodCityPhotoStudio.asm
+++ b/maps/CianwoodPhotoStudio.asm
@@ -1,7 +1,7 @@
const_value set 2
- const CIANWOODCITYPHOTOSTUDIO_FISHING_GURU
+ const CIANWOODPHOTOSTUDIO_FISHING_GURU
-CianwoodCityPhotoStudio_MapScriptHeader:
+CianwoodPhotoStudio_MapScriptHeader:
.SceneScripts:
db 0
@@ -16,7 +16,7 @@ FishingGuruScript_0x9e0e0:
iffalse UnknownScript_0x9e0f3
writetext UnknownText_0x9e142
waitbutton
- special PhotoStudio
+ special Special_PhotoStudio
waitbutton
closetext
end
@@ -48,7 +48,7 @@ UnknownText_0x9e156:
line "memento…"
done
-CianwoodCityPhotoStudio_MapEventHeader:
+CianwoodPhotoStudio_MapEventHeader:
; filler
db 0, 0
diff --git a/maps/CinnabarIsland.asm b/maps/CinnabarIsland.asm
index 50b26a8f5..36d25a127 100644
--- a/maps/CinnabarIsland.asm
+++ b/maps/CinnabarIsland.asm
@@ -7,7 +7,7 @@ CinnabarIsland_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_CINNABAR
@@ -35,7 +35,7 @@ CinnabarIslandPokecenterSign:
jumpstd pokecentersign
CinnabarIslandHiddenRareCandy:
- dwb EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY, RARE_CANDY
+ hiddenitem EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY, RARE_CANDY
CinnabarIslandBlueTeleport:
teleport_from
diff --git a/maps/Colosseum.asm b/maps/Colosseum.asm
index 647e16541..eba9d42fc 100644
--- a/maps/Colosseum.asm
+++ b/maps/Colosseum.asm
@@ -11,8 +11,8 @@ Colosseum_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_OBJECTS, .SetWhichChris
- dbw MAPCALLBACK_NEWMAP, .PreparePokecenter2F
+ callback MAPCALLBACK_OBJECTS, .SetWhichChris
+ callback MAPCALLBACK_NEWMAP, .PreparePokecenter2F
.InitializeColosseum:
priorityjump .InitializeAndPreparePokecenter2F
@@ -37,12 +37,12 @@ Colosseum_MapScriptHeader:
return
.PreparePokecenter2F:
- setmapscene POKECENTER_2F, $2
+ setmapscene POKECENTER_2F, 2
return
.InitializeAndPreparePokecenter2F:
- setscene $1
- setmapscene POKECENTER_2F, $2
+ setscene 1
+ setmapscene POKECENTER_2F, 2
end
MapColosseumSignpost1Script:
diff --git a/maps/CopycatsHouse2F.asm b/maps/CopycatsHouse2F.asm
index 5456973dc..78890e37c 100644
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -12,7 +12,7 @@ CopycatsHouse2F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Callback
+ callback MAPCALLBACK_OBJECTS, .Callback
.Callback:
checkflag ENGINE_PLAYER_IS_FEMALE
@@ -46,7 +46,7 @@ Copycat:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_KRIS
.Default_Merge_1:
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
checkevent EVENT_RETURNED_MACHINE_PART
iftrue .TalkAboutLostItem
opentext
@@ -70,7 +70,7 @@ Copycat:
.Default_Merge_3a:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
opentext
writetext CopycatText_QuickMimicking
waitbutton
@@ -99,7 +99,7 @@ Copycat:
.Default_Merge_3b:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
opentext
writetext CopycatText_Worried
waitbutton
@@ -142,7 +142,7 @@ Copycat:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_KRIS
.GotPass_Merge_1:
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
opentext
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .GotPass_Female_2
@@ -164,7 +164,7 @@ Copycat:
.GotPass_Merge_3:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
opentext
writetext CopycatText_ItsAScream
waitbutton
diff --git a/maps/DarkCaveVioletEntrance.asm b/maps/DarkCaveVioletEntrance.asm
index b1e629a54..b7806dcef 100644
--- a/maps/DarkCaveVioletEntrance.asm
+++ b/maps/DarkCaveVioletEntrance.asm
@@ -31,8 +31,7 @@ DarkCaveVioletEntranceRock:
jumpstd smashrock
DarkCaveVioletEntranceHiddenElixer:
- dwb EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER, ELIXER
-
+ hiddenitem EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER, ELIXER
DarkCaveVioletEntrance_MapEventHeader:
; filler
diff --git a/maps/DayCare.asm b/maps/DayCare.asm
index 0d06cea93..447f52971 100644
--- a/maps/DayCare.asm
+++ b/maps/DayCare.asm
@@ -8,7 +8,7 @@ DayCare_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
+ callback MAPCALLBACK_OBJECTS, .EggCheckCallback
.EggCheckCallback:
checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
diff --git a/maps/DiglettsCave.asm b/maps/DiglettsCave.asm
index 04277b792..92e39d7b4 100644
--- a/maps/DiglettsCave.asm
+++ b/maps/DiglettsCave.asm
@@ -12,8 +12,7 @@ DiglettsCavePokefanMScript:
jumptextfaceplayer DiglettsCavePokefanMText
DiglettsCaveHiddenMaxRevive:
- dwb EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE, MAX_REVIVE
-
+ hiddenitem EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE, MAX_REVIVE
DiglettsCavePokefanMText:
text "A bunch of DIGLETT"
diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm
index 1df424ca1..29da128d4 100644
--- a/maps/DragonShrine.asm
+++ b/maps/DragonShrine.asm
@@ -21,67 +21,67 @@ DragonShrine_MapScriptHeader:
end
.DragonShrineTestScript:
- applymovement PLAYER, MovementData_0x18d2bf
- applymovement DRAGONSHRINE_ELDER1, MovementData_0x18d2c7
+ applymovement PLAYER, DragonShrinePlayerWalkInMovement
+ applymovement DRAGONSHRINE_ELDER1, DragonShrineElderStepDownMovement
opentext
- writetext UnknownText_0x18d2ea
+ writetext DragonShrineElderGreetingText
buttonsound
.Question1:
setevent EVENT_RECEIVED_BALLS_FROM_KURT
- writetext UnknownText_0x18d3bc
+ writetext DragonShrineQuestion1Text
buttonsound
- loadmenudata MenuDataHeader_0x18d215
+ loadmenudata DragonShrineQuestion1_MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .RightAnswer
- if_equal $2, .WrongAnswer
- if_equal $3, .RightAnswer
+ if_equal 1, .RightAnswer
+ if_equal 2, .WrongAnswer
+ if_equal 3, .RightAnswer
end
.Question2:
setevent EVENT_DRAGON_SHRINE_QUESTION_2
- writetext UnknownText_0x18d3d3
+ writetext DragonShrineQuestion2Text
buttonsound
- loadmenudata MenuDataHeader_0x18d234
+ loadmenudata DragonShrineQuestion2_MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .RightAnswer
- if_equal $2, .RightAnswer
- if_equal $3, .WrongAnswer
+ if_equal 1, .RightAnswer
+ if_equal 2, .RightAnswer
+ if_equal 3, .WrongAnswer
.Question3:
setevent EVENT_DRAGON_SHRINE_QUESTION_3
- writetext UnknownText_0x18d3f3
+ writetext DragonShrineQuestion3Text
buttonsound
- loadmenudata MenuDataHeader_0x18d258
+ loadmenudata DragonShrineQuestion3_MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .WrongAnswer
- if_equal $2, .RightAnswer
- if_equal $3, .RightAnswer
+ if_equal 1, .WrongAnswer
+ if_equal 2, .RightAnswer
+ if_equal 3, .RightAnswer
.Question4:
setevent EVENT_DRAGON_SHRINE_QUESTION_4
- writetext UnknownText_0x18d420
+ writetext DragonShrineQuestion4Text
buttonsound
- loadmenudata MenuDataHeader_0x18d283
+ loadmenudata DragonShrineQuestion4_MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .RightAnswer
- if_equal $2, .WrongAnswer
- if_equal $3, .RightAnswer
+ if_equal 1, .RightAnswer
+ if_equal 2, .WrongAnswer
+ if_equal 3, .RightAnswer
.Question5:
setevent EVENT_DRAGON_SHRINE_QUESTION_5
- writetext UnknownText_0x18d44a
+ writetext DragonShrineQuestion5Text
buttonsound
- loadmenudata MenuDataHeader_0x18d2a5
+ loadmenudata DragonShrineQuestion5_MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .WrongAnswer
- if_equal $2, .RightAnswer
- if_equal $3, .WrongAnswer
+ if_equal 1, .WrongAnswer
+ if_equal 2, .RightAnswer
+ if_equal 3, .WrongAnswer
.RightAnswer:
checkevent EVENT_DRAGON_SHRINE_QUESTION_5
iftrue .PassedTheTest
- writetext UnknownText_0x18d82d
+ writetext DragonShrineRightAnswerText
buttonsound
checkevent EVENT_DRAGON_SHRINE_QUESTION_4
iftrue .Question5
@@ -95,12 +95,12 @@ DragonShrine_MapScriptHeader:
closetext
spriteface DRAGONSHRINE_ELDER1, LEFT
opentext
- writetext UnknownText_0x18d7f6
+ writetext DragonShrineWrongAnswerText1
waitbutton
closetext
spriteface DRAGONSHRINE_ELDER1, DOWN
opentext
- writetext UnknownText_0x18d816
+ writetext DragonShrineWrongAnswerText2
waitbutton
closetext
setevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG
@@ -116,7 +116,7 @@ DragonShrine_MapScriptHeader:
checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue .Question1
.PassedTheTest:
- writetext UnknownText_0x18d47c
+ writetext DragonShrinePassedTestText
waitbutton
closetext
playsound SFX_ENTER_DOOR
@@ -126,50 +126,50 @@ DragonShrine_MapScriptHeader:
waitsfx
spriteface PLAYER, DOWN
pause 30
- applymovement DRAGONSHRINE_CLAIR, MovementData_0x18d2d4
+ applymovement DRAGONSHRINE_CLAIR, DragonShrineClairWalkInMovement
spriteface DRAGONSHRINE_CLAIR, RIGHT
spriteface PLAYER, LEFT
spriteface DRAGONSHRINE_ELDER1, LEFT
opentext
- writetext UnknownText_0x18d916
+ writetext DragonShrineClairYouPassedText
waitbutton
closetext
special Special_FadeOutMusic
- applymovement DRAGONSHRINE_CLAIR, MovementData_0x18d2da
+ applymovement DRAGONSHRINE_CLAIR, DragonShrineClairBigStepLeftMovement
opentext
- writetext UnknownText_0x18d974
+ writetext DragonShrineClairThatCantBeText
waitbutton
closetext
- applymovement DRAGONSHRINE_CLAIR, MovementData_0x18d2dd
+ applymovement DRAGONSHRINE_CLAIR, DragonShrineClairSlowStepLeftMovement
opentext
- writetext UnknownText_0x18d983
+ writetext DragonShrineClairYoureLyingText
waitbutton
closetext
- applymovement DRAGONSHRINE_ELDER1, MovementData_0x18d2c9
+ applymovement DRAGONSHRINE_ELDER1, DragonShrineElderWalkToClairMovement
spriteface DRAGONSHRINE_CLAIR, UP
opentext
- writetext UnknownText_0x18d520
+ writetext DragonShrineMustIInformLanceText
waitbutton
closetext
showemote EMOTE_SHOCK, DRAGONSHRINE_CLAIR, 15
opentext
- writetext UnknownText_0x18d9ae
+ writetext DragonShrineIUnderstandText
waitbutton
closetext
applymovement DRAGONSHRINE_CLAIR, MovementData_0x18d2e0
opentext
- writetext UnknownText_0x18d9bf
+ writetext DragonShrineHereRisingBadgeText
waitbutton
setflag ENGINE_RISINGBADGE
playsound SFX_GET_BADGE
waitsfx
special RestartMapMusic
specialphonecall SPECIALCALL_MASTERBALL
- setscene $1
- setmapscene DRAGONS_DEN_B1F, $1
- writetext UnknownText_0x18d9f2
+ setscene 1
+ setmapscene DRAGONS_DEN_B1F, 1
+ writetext DragonShrinePlayerReceivedRisingBadgeText
buttonsound
- writetext UnknownText_0x18da0b
+ writetext DragonShrineRisingBadgeExplanationText
waitbutton
closetext
applymovement DRAGONSHRINE_ELDER1, MovementData_0x18d2ce
@@ -177,11 +177,11 @@ DragonShrine_MapScriptHeader:
applymovement DRAGONSHRINE_ELDER1, MovementData_0x18d2d1
spriteface PLAYER, UP
opentext
- writetext UnknownText_0x18d5a3
+ writetext DragonShrineElderScoldsClairText
waitbutton
closetext
opentext
- writetext UnknownText_0x18dab4
+ writetext DragonShrineSpeechlessText
waitbutton
closetext
applymovement DRAGONSHRINE_CLAIR, MovementData_0x18d2e3
@@ -191,7 +191,7 @@ DragonShrine_MapScriptHeader:
setevent EVENT_GAVE_KURT_APRICORNS
end
-ElderScript_0x18d1a5:
+DragonShrineElder1Script:
faceplayer
opentext
checkevent EVENT_GAVE_KURT_APRICORNS
@@ -202,74 +202,72 @@ ElderScript_0x18d1a5:
iffalse .GiveDratini
checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
iftrue .BeatRivalInMtMoon
- writetext UnknownText_0x18d724
+ writetext DragonShrineClairsGrandfatherText
waitbutton
closetext
end
.GiveDratini:
- writetext UnknownText_0x18d604
+ writetext DragonShrineTakeThisDratiniText
waitbutton
checkcode VAR_PARTYCOUNT
if_equal 6, .PartyFull
- writetext UnknownText_0x18d697
+ writetext DragonShrinePlayerReceivedDratiniText
playsound SFX_CAUGHT_MON
waitsfx
givepoke DRATINI, 15
checkevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG
- special SpecialDratini
+ special Special_Dratini
setevent EVENT_GOT_DRATINI
setevent EVENT_JUST_RECEIVED_DRATINI
- writetext UnknownText_0x18d6ca
+ writetext DragonShrineSymbolicDragonText
waitbutton
closetext
end
.PartyFull:
- writetext UnknownText_0x18d6ac
+ writetext DragonShrinePartyFullText
waitbutton
closetext
end
.BeatRivalInMtMoon:
- writetext UnknownText_0x18d782
+ writetext DragonShrineSilverIsInTrainingText
waitbutton
closetext
end
.DontGiveDratiniYet:
- writetext UnknownText_0x18d5e5
+ writetext DragonShrineComeAgainText
waitbutton
closetext
end
.ReceivedDratini:
- writetext UnknownText_0x18d6ca
+ writetext DragonShrineSymbolicDragonText
waitbutton
closetext
end
-ElderScript_0x18d205:
+DragonShrineElder2Script:
faceplayer
opentext
- writetext UnknownText_0x18d840
+ writetext DragonShrineElder2Text
waitbutton
closetext
end
-ElderScript_0x18d20d:
+DragonShrineElder3Script:
faceplayer
opentext
- writetext UnknownText_0x18d8b1
+ writetext DragonShrineElder3Text
waitbutton
closetext
end
-
-MenuDataHeader_0x18d215:
+DragonShrineQuestion1_MenuDataHeader:
db $40 ; flags
- db 04, 08 ; start coords
- db 11, 19 ; end coords
+ menu_coords 8, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -280,11 +278,9 @@ MenuDataHeader_0x18d215:
db "Underling@"
db "Friend@"
-
-MenuDataHeader_0x18d234:
+DragonShrineQuestion2_MenuDataHeader:
db $40 ; flags
- db 04, 09 ; start coords
- db 11, 19 ; end coords
+ menu_coords 9, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -295,11 +291,9 @@ MenuDataHeader_0x18d234:
db "Raising@"
db "Cheating@"
-
-MenuDataHeader_0x18d258:
+DragonShrineQuestion3_MenuDataHeader:
db $40 ; flags
- db 04, 05 ; start coords
- db 11, 19 ; end coords
+ menu_coords 5, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -310,11 +304,9 @@ MenuDataHeader_0x18d258:
db "Tough person@"
db "Anybody@"
-
-MenuDataHeader_0x18d283:
+DragonShrineQuestion4_MenuDataHeader:
db $40 ; flags
- db 04, 08 ; start coords
- db 11, 19 ; end coords
+ menu_coords 8, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -325,11 +317,9 @@ MenuDataHeader_0x18d283:
db "Violence@"
db "Knowledge@"
-
-MenuDataHeader_0x18d2a5:
+DragonShrineQuestion5_MenuDataHeader:
db $40 ; flags
- db 04, 12 ; start coords
- db 11, 19 ; end coords
+ menu_coords 12, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -340,8 +330,7 @@ MenuDataHeader_0x18d2a5:
db "Both@"
db "Weak@"
-
-MovementData_0x18d2bf:
+DragonShrinePlayerWalkInMovement:
slow_step UP
slow_step UP
slow_step UP
@@ -351,11 +340,11 @@ MovementData_0x18d2bf:
slow_step UP
step_end
-MovementData_0x18d2c7:
+DragonShrineElderStepDownMovement:
slow_step DOWN
step_end
-MovementData_0x18d2c9:
+DragonShrineElderWalkToClairMovement:
slow_step LEFT
slow_step LEFT
slow_step LEFT
@@ -372,7 +361,7 @@ MovementData_0x18d2d1:
turn_head DOWN
step_end
-MovementData_0x18d2d4:
+DragonShrineClairWalkInMovement:
slow_step UP
slow_step UP
slow_step UP
@@ -380,12 +369,12 @@ MovementData_0x18d2d4:
slow_step UP
step_end
-MovementData_0x18d2da:
+DragonShrineClairBigStepLeftMovement:
fix_facing
big_step LEFT
step_end
-MovementData_0x18d2dd:
+DragonShrineClairSlowStepLeftMovement:
slow_step LEFT
remove_fixed_facing
step_end
@@ -404,7 +393,7 @@ MovementData_0x18d2e3:
step DOWN
step_end
-UnknownText_0x18d2ea:
+DragonShrineElderGreetingText:
text "Hm… Good to see"
line "you here."
@@ -427,29 +416,29 @@ UnknownText_0x18d2ea:
para "Ready?"
done
-UnknownText_0x18d3bc:
+DragonShrineQuestion1Text:
text "What are #MON"
line "to you?"
done
-UnknownText_0x18d3d3:
+DragonShrineQuestion2Text:
text "What helps you to"
line "win battles?"
done
-UnknownText_0x18d3f3:
+DragonShrineQuestion3Text:
text "What kind of"
line "trainer do you"
cont "wish to battle?"
done
-UnknownText_0x18d420:
+DragonShrineQuestion4Text:
text "What is most"
line "important for"
cont "raising #MON?"
done
-UnknownText_0x18d44a:
+DragonShrineQuestion5Text:
text "Strong #MON."
line "Weak #MON."
@@ -457,7 +446,7 @@ UnknownText_0x18d44a:
line "important?"
done
-UnknownText_0x18d47c:
+DragonShrinePassedTestText:
text "Hm… I see…"
para "You care deeply"
@@ -476,7 +465,7 @@ UnknownText_0x18d47c:
cont "#MON LEAGUE."
done
-UnknownText_0x18d520:
+DragonShrineMustIInformLanceText:
text "CLAIR!"
para "This child is"
@@ -491,7 +480,7 @@ UnknownText_0x18d520:
line "LANCE of this?"
done
-UnknownText_0x18d5a3:
+DragonShrineElderScoldsClairText:
text "CLAIR…"
para "Reflect upon what"
@@ -501,12 +490,12 @@ UnknownText_0x18d5a3:
line "child has."
done
-UnknownText_0x18d5e5:
+DragonShrineComeAgainText:
text "Come again, if you"
line "so desire."
done
-UnknownText_0x18d604:
+DragonShrineTakeThisDratiniText:
text "Hm… Good to see"
line "you here."
@@ -523,17 +512,17 @@ UnknownText_0x18d604:
line "your worth."
done
-UnknownText_0x18d697:
+DragonShrinePlayerReceivedDratiniText:
text "<PLAYER> received"
line "DRATINI!"
done
-UnknownText_0x18d6ac:
+DragonShrinePartyFullText:
text "Hm? Your #MON"
line "party is full."
done
-UnknownText_0x18d6ca:
+DragonShrineSymbolicDragonText:
text "Dragon #MON are"
line "symbolic of our"
cont "clan."
@@ -545,7 +534,7 @@ UnknownText_0x18d6ca:
line "one."
done
-UnknownText_0x18d724:
+DragonShrineClairsGrandfatherText:
text "CLAIR appears to"
line "have learned an"
@@ -556,7 +545,7 @@ UnknownText_0x18d724:
line "grandfather."
done
-UnknownText_0x18d782:
+DragonShrineSilverIsInTrainingText:
text "A boy close to"
line "your age is in"
cont "training here."
@@ -568,21 +557,21 @@ UnknownText_0x18d782:
line "little worrisome…"
done
-UnknownText_0x18d7f6:
+DragonShrineWrongAnswerText1:
text "Hah? I didn't"
line "quite catch that…"
done
-UnknownText_0x18d816:
+DragonShrineWrongAnswerText2:
text "What was it you"
line "said?"
done
-UnknownText_0x18d82d:
+DragonShrineRightAnswerText:
text "Oh, I understand…"
done
-UnknownText_0x18d840:
+DragonShrineElder2Text:
text "It's been quite"
line "some time since a"
@@ -594,7 +583,7 @@ UnknownText_0x18d840:
line "Master LANCE."
done
-UnknownText_0x18d8b1:
+DragonShrineElder3Text:
text "You know young"
line "Master LANCE?"
@@ -606,7 +595,7 @@ UnknownText_0x18d8b1:
line "blood."
done
-UnknownText_0x18d916:
+DragonShrineClairYouPassedText:
text "So how did it go?"
para "I guess there's no"
@@ -614,39 +603,39 @@ UnknownText_0x18d916:
para "You did fail?"
- para $56, $56, $56, $56, $56, $56
+ para "<......><......><......><......><......><......>"
para "…What? You passed?"
done
-UnknownText_0x18d974:
+DragonShrineClairThatCantBeText:
text "That can't be!"
done
-UnknownText_0x18d983:
+DragonShrineClairYoureLyingText:
text "You're lying!"
para "Even I haven't"
line "been approved!"
done
-UnknownText_0x18d9ae:
+DragonShrineIUnderstandText:
text "I-I understand…"
done
-UnknownText_0x18d9bf:
+DragonShrineHereRisingBadgeText:
text "Here, this is the"
line "RISINGBADGE…"
para "Hurry up! Take it!"
done
-UnknownText_0x18d9f2:
+DragonShrinePlayerReceivedRisingBadgeText:
text "<PLAYER> received"
line "RISINGBADGE."
done
-UnknownText_0x18da0b:
+DragonShrineRisingBadgeExplanationText:
text "RISINGBADGE will"
line "enable your"
@@ -664,8 +653,8 @@ UnknownText_0x18da0b:
line "question."
done
-UnknownText_0x18dab4:
- text $56, $56, $56, $56, $56, $56
+DragonShrineSpeechlessText:
+ text "<......><......><......><......><......><......>"
done
DragonShrine_MapEventHeader:
@@ -685,7 +674,7 @@ DragonShrine_MapEventHeader:
.ObjectEvents:
db 4
- object_event 5, 1, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElderScript_0x18d1a5, EVENT_GAVE_KURT_APRICORNS
- object_event 2, 4, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElderScript_0x18d205, EVENT_GAVE_KURT_APRICORNS
- object_event 7, 4, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElderScript_0x18d20d, EVENT_GAVE_KURT_APRICORNS
+ object_event 5, 1, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonShrineElder1Script, EVENT_GAVE_KURT_APRICORNS
+ object_event 2, 4, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonShrineElder2Script, EVENT_GAVE_KURT_APRICORNS
+ object_event 7, 4, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonShrineElder3Script, EVENT_GAVE_KURT_APRICORNS
object_event 4, 8, SPRITE_CLAIR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGON_SHRINE_CLAIR
diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm
index 8f87735db..678678c07 100644
--- a/maps/DragonsDenB1F.asm
+++ b/maps/DragonsDenB1F.asm
@@ -17,7 +17,7 @@ DragonsDenB1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .CheckSilver
+ callback MAPCALLBACK_NEWMAP, .CheckSilver
.DummyScene0:
end
@@ -57,7 +57,7 @@ DragonsDenB1F_ClairScene:
buttonsound
giveitem TM_DRAGONBREATH
iffalse .BagFull
- itemtotext TM_DRAGONBREATH, $0
+ itemtotext TM_DRAGONBREATH, MEM_BUFFER_0
writetext NotifyReceiveDragonbreath
playsound SFX_ITEM
waitsfx
@@ -80,7 +80,7 @@ DragonsDenB1F_ClairScene:
pause 30
special RestartMapMusic
disappear DRAGONSDENB1F_CLAIR
- setscene $0
+ setscene 0
end
TrainerCooltrainermDarin:
@@ -135,7 +135,7 @@ PokeBallScript_0x18c95a:
iffalse .BagFull
disappear DRAGONSDENB1F_POKE_BALL1
opentext
- itemtotext DRAGON_FANG, $0
+ itemtotext DRAGON_FANG, MEM_BUFFER_0
writetext Text_FoundDragonFang
playsound SFX_ITEM
waitsfx
@@ -145,7 +145,7 @@ PokeBallScript_0x18c95a:
.BagFull:
opentext
- itemtotext DRAGON_FANG, $0
+ itemtotext DRAGON_FANG, MEM_BUFFER_0
writetext Text_FoundDragonFang
buttonsound
writetext Text_NoRoomForDragonFang
@@ -183,13 +183,13 @@ DragonsDenB1FMaxElixer:
itemball MAX_ELIXER
DragonsDenB1FHiddenRevive:
- dwb EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE, REVIVE
+ hiddenitem EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE, REVIVE
DragonsDenB1FHiddenMaxPotion:
- dwb EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION, MAX_POTION
+ hiddenitem EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION, MAX_POTION
DragonsDenB1FHiddenMaxElixer:
- dwb EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER, MAX_ELIXER
+ hiddenitem EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER, MAX_ELIXER
MovementDragonsDen_ClairWalksToYou:
slow_step RIGHT
diff --git a/maps/EarlsPokemonAcademy.asm b/maps/EarlsPokemonAcademy.asm
index 3ed66a713..cad836b6d 100644
--- a/maps/EarlsPokemonAcademy.asm
+++ b/maps/EarlsPokemonAcademy.asm
@@ -69,11 +69,11 @@ AcademyBlackboard:
loadmenudata .BlackboardMenuData
_2dmenu
closewindow
- if_equal $1, .Poison
- if_equal $2, .Paralysis
- if_equal $3, .Sleep
- if_equal $4, .Burn
- if_equal $5, .Freeze
+ if_equal 1, .Poison
+ if_equal 2, .Paralysis
+ if_equal 3, .Sleep
+ if_equal 4, .Burn
+ if_equal 5, .Freeze
closetext
end
@@ -104,8 +104,7 @@ AcademyBlackboard:
.BlackboardMenuData:
db $40 ; flags
- db 00, 00 ; start coords
- db 08, 11 ; end coords
+ menu_coords 0, 0, 11, 8
dw .MenuData2
db 1 ; default option
diff --git a/maps/EcruteakCity.asm b/maps/EcruteakCity.asm
index 322b403f6..a81a466e2 100644
--- a/maps/EcruteakCity.asm
+++ b/maps/EcruteakCity.asm
@@ -13,7 +13,7 @@ EcruteakCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_ECRUTEAK
@@ -88,7 +88,7 @@ EcruteakCityMartSign:
jumpstd martsign
EcruteakCityHiddenHyperPotion:
- dwb EVENT_ECRUTEAK_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
+ hiddenitem EVENT_ECRUTEAK_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
UnusedMissingDaughterText:
; This text is neither used nor referenced in the final game.
diff --git a/maps/EcruteakGym.asm b/maps/EcruteakGym.asm
index 491aaff7b..7b1fa9e1c 100644
--- a/maps/EcruteakGym.asm
+++ b/maps/EcruteakGym.asm
@@ -32,7 +32,7 @@ MortyScript_0x99d58:
waitbutton
closetext
winlosstext UnknownText_0x9a00a, 0
- loadtrainer MORTY, 1
+ loadtrainer MORTY, MORTY1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_MORTY
@@ -43,7 +43,7 @@ MortyScript_0x99d58:
setflag ENGINE_FOGBADGE
checkcode VAR_BADGES
scall EcruteakGymActivateRockets
- setmapscene ECRUTEAK_HOUSE, $1
+ setmapscene ECRUTEAK_HOUSE, 1
setevent EVENT_RANG_CLEAR_BELL_1
setevent EVENT_RANG_CLEAR_BELL_2
.FightDone:
@@ -91,10 +91,10 @@ EcruteakGymClosed:
follow PLAYER, ECRUTEAKGYM_GRAMPS
applymovement PLAYER, MovementData_0x99e5f
stopfollow
- special FadeOutPalettes
+ special Special_FadeOutPalettes
playsound SFX_ENTER_DOOR
waitsfx
- warp ECRUTEAK_CITY, $6, $1b
+ warp ECRUTEAK_CITY, 6, 27
end
TrainerSageJeffrey:
@@ -162,7 +162,7 @@ EcruteakGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext MORTY, 1, $1
+ trainertotext MORTY, MORTY1, MEM_BUFFER_1
jumpstd gymstatue2
MovementData_0x99e5d:
diff --git a/maps/EcruteakHouse.asm b/maps/EcruteakHouse.asm
index 274cc99e3..57c040d43 100644
--- a/maps/EcruteakHouse.asm
+++ b/maps/EcruteakHouse.asm
@@ -12,7 +12,7 @@ EcruteakHouse_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .InitializeSages
+ callback MAPCALLBACK_OBJECTS, .InitializeSages
.DummyScene0:
end
@@ -35,7 +35,7 @@ EcruteakHouse_MapScriptHeader:
setevent EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
checkitem CLEAR_BELL
iftrue .NoClearBell
- setscene $0
+ setscene 0
.NoClearBell:
return
@@ -47,7 +47,7 @@ EcruteakHouse_CoordEvent1:
checkevent EVENT_RANG_CLEAR_BELL_2
iftrue EcruteakHouse_CoordEvent_DontMove
applymovement ECRUTEAKHOUSE_SAGE2, MovementData_0x980c7
- moveobject ECRUTEAKHOUSE_SAGE1, $4, $6
+ moveobject ECRUTEAKHOUSE_SAGE1, 4, 6
appear ECRUTEAKHOUSE_SAGE1
pause 5
disappear ECRUTEAKHOUSE_SAGE2
@@ -57,7 +57,7 @@ EcruteakHouse_CoordEvent2:
checkevent EVENT_RANG_CLEAR_BELL_1
iftrue EcruteakHouse_CoordEvent_DontMove
applymovement ECRUTEAKHOUSE_SAGE1, MovementData_0x980cc
- moveobject ECRUTEAKHOUSE_SAGE2, $5, $6
+ moveobject ECRUTEAKHOUSE_SAGE2, 5, 6
appear ECRUTEAKHOUSE_SAGE2
pause 5
disappear ECRUTEAKHOUSE_SAGE1
@@ -100,7 +100,7 @@ SageScript_0x98062:
writetext UnknownText_0x98250
waitbutton
closetext
- setscene $1
+ setscene 1
setevent EVENT_RANG_CLEAR_BELL_2
clearevent EVENT_RANG_CLEAR_BELL_1
setevent EVENT_GAVE_KURT_APRICORNS
@@ -202,7 +202,7 @@ UnknownText_0x98250:
line "but I must ask you"
cont "to leave."
- para $56, $56, $56
+ para "<......><......><......>"
para "Ah!"
diff --git a/maps/EcruteakPokecenter1F.asm b/maps/EcruteakPokecenter1F.asm
index da661209f..100009393 100644
--- a/maps/EcruteakPokecenter1F.asm
+++ b/maps/EcruteakPokecenter1F.asm
@@ -53,7 +53,7 @@ EcruteakPokecenter1F_MapScriptHeader:
disappear ECRUTEAKPOKECENTER1F_BILL
clearevent EVENT_MET_BILL
setflag ENGINE_TIME_CAPSULE
- setscene $1
+ setscene 1
waitsfx
end
@@ -61,7 +61,7 @@ EcruteakPokecenter1FNurseScript:
jumpstd pokecenternurse
EcruteakPokecenter1FPokefanMScript:
- special Mobile_DummyReturnFalse
+ special Special_Mobile_DummyReturnFalse
iftrue .mobile
jumptextfaceplayer EcruteakPokecenter1FPokefanMText
diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm
index 13c8b367e..d1c0824e9 100644
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -18,7 +18,7 @@ ElmsLab_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .MoveElmCallback
+ callback MAPCALLBACK_OBJECTS, .MoveElmCallback
.MeetElm:
priorityjump .WalkUpToElm
@@ -42,7 +42,7 @@ ElmsLab_MapScriptHeader:
.MoveElmCallback:
checkscene
iftrue .Skip
- moveobject ELMSLAB_ELM, $3, $4
+ moveobject ELMSLAB_ELM, 3, 4
.Skip:
return
@@ -84,7 +84,7 @@ ElmsLab_MapScriptHeader:
opentext
writetext ElmText_ChooseAPokemon
waitbutton
- setscene $1
+ setscene 1
closetext
end
@@ -161,7 +161,7 @@ CyndaquilPokeBallScript:
checkevent EVENT_GOT_A_POKEMON_FROM_ELM
iftrue LookAtElmPokeBallScript
spriteface ELMSLAB_ELM, DOWN
- refreshscreen $0
+ refreshscreen
pokepic CYNDAQUIL
cry CYNDAQUIL
waitbutton
@@ -175,7 +175,7 @@ CyndaquilPokeBallScript:
writetext ChoseStarterText
buttonsound
waitsfx
- pokenamemem CYNDAQUIL, $0
+ pokenamemem CYNDAQUIL, MEM_BUFFER_0
writetext ReceivedStarterText
playsound SFX_CAUGHT_MON
waitsfx
@@ -191,7 +191,7 @@ TotodilePokeBallScript:
checkevent EVENT_GOT_A_POKEMON_FROM_ELM
iftrue LookAtElmPokeBallScript
spriteface ELMSLAB_ELM, DOWN
- refreshscreen $0
+ refreshscreen
pokepic TOTODILE
cry TOTODILE
waitbutton
@@ -205,7 +205,7 @@ TotodilePokeBallScript:
writetext ChoseStarterText
buttonsound
waitsfx
- pokenamemem TOTODILE, $0
+ pokenamemem TOTODILE, MEM_BUFFER_0
writetext ReceivedStarterText
playsound SFX_CAUGHT_MON
waitsfx
@@ -219,7 +219,7 @@ ChikoritaPokeBallScript:
checkevent EVENT_GOT_A_POKEMON_FROM_ELM
iftrue LookAtElmPokeBallScript
spriteface ELMSLAB_ELM, DOWN
- refreshscreen $0
+ refreshscreen
pokepic CHIKORITA
cry CHIKORITA
waitbutton
@@ -233,7 +233,7 @@ ChikoritaPokeBallScript:
writetext ChoseStarterText
buttonsound
waitsfx
- pokenamemem CHIKORITA, $0
+ pokenamemem CHIKORITA, MEM_BUFFER_0
writetext ReceivedStarterText
playsound SFX_CAUGHT_MON
waitsfx
@@ -274,8 +274,8 @@ ElmDirectionsScript:
closetext
setevent EVENT_GOT_A_POKEMON_FROM_ELM
setevent EVENT_RIVAL_CHERRYGROVE_CITY
- setscene $5
- setmapscene NEW_BARK_TOWN, $1
+ setscene 5
+ setmapscene NEW_BARK_TOWN, 1
end
ElmDescribesMrPokemonScript:
@@ -308,11 +308,11 @@ ElmsLabHealingMachine:
end
ElmsLabHealingMachine_HealParty:
- special TrainerRankings_Healings
+ special Special_StubbedTrainerRankings_Healings
special HealParty
playmusic MUSIC_NONE
- writebyte 1 ; Machine is in Elm's Lab
- special HealMachineAnim
+ writebyte HEALMACHINE_ELMS_LAB
+ special Special_HealMachineAnim
pause 30
special RestartMapMusic
closetext
@@ -341,13 +341,13 @@ ElmAfterTheftScript:
buttonsound
setevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
setflag ENGINE_BUG_CONTEST_ON
- setmapscene ROUTE_29, $1
+ setmapscene ROUTE_29, 1
clearevent EVENT_ROUTE_30_YOUNGSTER_JOEY
setevent EVENT_ROUTE_30_BATTLE
writetext ElmAfterTheftText6
waitbutton
closetext
- setscene $6
+ setscene 6
end
ElmStudyingEggScript:
@@ -479,7 +479,7 @@ AideScript_GivePotions:
writetext AideText_AlwaysBusy
waitbutton
closetext
- setscene $2
+ setscene 2
end
AideScript_WalkBalls1:
@@ -500,14 +500,14 @@ AideScript_GiveYouBalls:
opentext
writetext AideText_GiveYouBalls
buttonsound
- itemtotext POKE_BALL, $1
+ itemtotext POKE_BALL, MEM_BUFFER_1
scall AideScript_ReceiveTheBalls
giveitem POKE_BALL, 5
writetext AideText_ExplainBalls
buttonsound
itemnotify
closetext
- setscene $2
+ setscene 2
end
AideScript_ReceiveTheBalls:
@@ -556,13 +556,13 @@ CopScript:
opentext
writetext ElmsLabOfficerText1
buttonsound
- special SpecialNameRival
+ special Special_NameRival
writetext ElmsLabOfficerText2
waitbutton
closetext
applymovement ELMSLAB_OFFICER, OfficerLeavesMovement
disappear ELMSLAB_OFFICER
- setscene $2
+ setscene 2
end
ElmsLabWindow:
@@ -794,7 +794,7 @@ ElmText_GotAnEmail:
text "Oh, hey! I got an"
line "e-mail!"
- para $56, $56, $56
+ para "<......><......><......>"
line "Hm… Uh-huh…"
para "Okay…"
diff --git a/maps/FastShip1F.asm b/maps/FastShip1F.asm
index 869cb147c..844810350 100644
--- a/maps/FastShip1F.asm
+++ b/maps/FastShip1F.asm
@@ -35,11 +35,11 @@ FastShip1F_MapScriptHeader:
clearevent EVENT_FAST_SHIP_HAS_ARRIVED
checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue .SkipGrandpa
- setscene $2
+ setscene 2
end
.SkipGrandpa:
- setscene $0
+ setscene 0
end
SailorScript_0x75160:
@@ -68,11 +68,11 @@ SailorScript_0x75160:
closetext
scall .LetThePlayerOut
playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
- setmapscene VERMILION_PORT, $1
- warp VERMILION_PORT, $7, $11
+ setmapscene VERMILION_PORT, 1
+ warp VERMILION_PORT, 7, 17
end
._Olivine:
@@ -81,11 +81,11 @@ SailorScript_0x75160:
closetext
scall .LetThePlayerOut
playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
setevent EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
- setmapscene OLIVINE_PORT, $1
- warp OLIVINE_PORT, $7, $17
+ setmapscene OLIVINE_PORT, 1
+ warp OLIVINE_PORT, 7, 23
end
.LetThePlayerOut:
@@ -120,7 +120,7 @@ FastShip1FSailorScript:
jumptextfaceplayer FastShip1FSailorText
WorriedGrandpaSceneRight:
- moveobject FASTSHIP1F_GENTLEMAN, $14, $6
+ moveobject FASTSHIP1F_GENTLEMAN, 20, 6
WorriedGrandpaSceneLeft:
appear FASTSHIP1F_GENTLEMAN
@@ -135,7 +135,7 @@ WorriedGrandpaSceneLeft:
spriteface PLAYER, RIGHT
applymovement FASTSHIP1F_GENTLEMAN, MovementData_0x75222
disappear FASTSHIP1F_GENTLEMAN
- setscene $0
+ setscene 0
end
MovementData_0x7520e:
diff --git a/maps/FastShipB1F.asm b/maps/FastShipB1F.asm
index 498e65f70..988ab724e 100644
--- a/maps/FastShipB1F.asm
+++ b/maps/FastShipB1F.asm
@@ -31,7 +31,7 @@ UnknownScript_0x7673c:
checkevent EVENT_FAST_SHIP_B1F_SAILOR_RIGHT
iftrue UnknownScript_0x76766
applymovement FASTSHIPB1F_SAILOR2, MovementData_0x76876
- moveobject FASTSHIPB1F_SAILOR1, $1e, $6
+ moveobject FASTSHIPB1F_SAILOR1, 30, 6
appear FASTSHIPB1F_SAILOR1
pause 5
disappear FASTSHIPB1F_SAILOR2
@@ -41,7 +41,7 @@ UnknownScript_0x76751:
checkevent EVENT_FAST_SHIP_B1F_SAILOR_LEFT
iftrue UnknownScript_0x76766
applymovement FASTSHIPB1F_SAILOR1, MovementData_0x76871
- moveobject FASTSHIPB1F_SAILOR2, $1f, $6
+ moveobject FASTSHIPB1F_SAILOR2, 31, 6
appear FASTSHIPB1F_SAILOR2
pause 5
disappear FASTSHIPB1F_SAILOR1
diff --git a/maps/FastShipCabins_NNW_NNE_NE.asm b/maps/FastShipCabins_NNW_NNE_NE.asm
index 1bd1c91f1..f9145bcf7 100644
--- a/maps/FastShipCabins_NNW_NNE_NE.asm
+++ b/maps/FastShipCabins_NNW_NNE_NE.asm
@@ -98,9 +98,9 @@ SailorScript_0x755f1:
waitbutton
closetext
setevent EVENT_FAST_SHIP_LAZY_SAILOR
- setmapscene FAST_SHIP_B1F, $1
+ setmapscene FAST_SHIP_B1F, 1
checkcode VAR_FACING
- if_equal $3, UnknownScript_0x75629
+ if_equal RIGHT, UnknownScript_0x75629
applymovement FASTSHIPCABINS_NNW_NNE_NE_SAILOR, MovementData_0x75637
playsound SFX_EXIT_BUILDING
disappear FASTSHIPCABINS_NNW_NNE_NE_SAILOR
diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
index efccd7d92..c4c192865 100644
--- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
+++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
@@ -18,7 +18,7 @@ FastShipCabins_SE_SSE_CaptainsCabin_MapScriptHeader:
.MapCallbacks:
db 0
-Unused_0x75ea6:
+Unreferenced_0x75ea6:
end
SSAquaCaptain:
@@ -49,10 +49,10 @@ SSAquaGranddaughterBefore:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2
applymovement PLAYER, MovementData_0x76004
- moveobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, $3, $13
+ moveobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, 3, 19
appear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1
spriteface PLAYER, UP
spriteface FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, UP
@@ -81,7 +81,7 @@ SSAquaGranddaughterBefore:
writetext SSAquaEntertainedGranddaughterText
buttonsound
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
- setmapscene FAST_SHIP_1F, $0
+ setmapscene FAST_SHIP_1F, 0
jump SSAquaMetalCoatAndDocking
SSAquaGrandpa:
@@ -94,7 +94,7 @@ SSAquaGrandpa:
writetext SSAquaCantFindGranddaughterText
waitbutton
closetext
- setmapscene FAST_SHIP_1F, $0
+ setmapscene FAST_SHIP_1F, 0
end
SSAquaMetalCoatAndDocking:
diff --git a/maps/FastShipCabins_SW_SSW_NW.asm b/maps/FastShipCabins_SW_SSW_NW.asm
index 8af9a2e3f..a7f5b69e8 100644
--- a/maps/FastShipCabins_SW_SSW_NW.asm
+++ b/maps/FastShipCabins_SW_SSW_NW.asm
@@ -49,7 +49,7 @@ TrainerGuitaristClyde:
.Script:
end_if_just_battled
- special Mobile_DummyReturnFalse
+ special Special_Mobile_DummyReturnFalse
iftrue .mobile
opentext
writetext UnknownText_0x75d65
@@ -70,8 +70,8 @@ FastShipBed:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
- special TrainerRankings_Healings
+ special ReloadSpritesNoPalettes
+ special Special_StubbedTrainerRankings_Healings
special HealParty
playmusic MUSIC_HEAL
pause 60
diff --git a/maps/FuchsiaCity.asm b/maps/FuchsiaCity.asm
index 79824c76d..8010d3beb 100644
--- a/maps/FuchsiaCity.asm
+++ b/maps/FuchsiaCity.asm
@@ -10,7 +10,7 @@ FuchsiaCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_FUCHSIA
diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm
index 8aaf6e364..1d5e50368 100644
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -23,7 +23,7 @@ FuchsiaGymJanineScript:
waitbutton
closetext
winlosstext JanineText_ToughOne, 0
- loadtrainer JANINE, 1
+ loadtrainer JANINE, JANINE1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_JANINE
@@ -35,7 +35,7 @@ FuchsiaGymJanineScript:
variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS
variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS
variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
opentext
writetext Text_ReceivedSoulBadge
playsound SFX_GET_BADGE
@@ -65,7 +65,7 @@ LassAliceScript:
applymovement FUCHSIAGYM_FUCHSIA_GYM_1, Movement_NinjaSpin
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
.AliceUnmasked:
faceplayer
opentext
@@ -99,7 +99,7 @@ LassLindaScript:
applymovement FUCHSIAGYM_FUCHSIA_GYM_2, Movement_NinjaSpin
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
.LindaUnmasked:
faceplayer
opentext
@@ -133,7 +133,7 @@ PicnickerCindyScript:
applymovement FUCHSIAGYM_FUCHSIA_GYM_3, Movement_NinjaSpin
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
.CindyUnmasked:
faceplayer
opentext
@@ -167,7 +167,7 @@ CamperBarryScript:
applymovement FUCHSIAGYM_FUCHSIA_GYM_4, Movement_NinjaSpin
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
.BarryUnmasked:
faceplayer
opentext
@@ -216,7 +216,7 @@ FuchsiaGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext JANINE, 1, $1
+ trainertotext JANINE, JANINE1, MEM_BUFFER_1
jumpstd gymstatue2
Movement_NinjaSpin:
diff --git a/maps/FuchsiaPokecenter1F.asm b/maps/FuchsiaPokecenter1F.asm
index eca4aa8e0..1e7b32c9e 100644
--- a/maps/FuchsiaPokecenter1F.asm
+++ b/maps/FuchsiaPokecenter1F.asm
@@ -33,7 +33,7 @@ JanineImpersonatorScript_0x196462:
applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, MovementData_0x196486
faceplayer
variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_JANINE
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
opentext
writetext UnknownText_0x19654e
waitbutton
@@ -41,7 +41,7 @@ JanineImpersonatorScript_0x196462:
applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, MovementData_0x196486
faceplayer
variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
end
MovementData_0x196486:
diff --git a/maps/GoldenrodBillsHouse.asm b/maps/GoldenrodBillsHouse.asm
index 2032c5b1e..e2b286848 100644
--- a/maps/GoldenrodBillsHouse.asm
+++ b/maps/GoldenrodBillsHouse.asm
@@ -22,7 +22,7 @@ BillsHouseBill:
buttonsound
waitsfx
checkcode VAR_PARTYCOUNT
- if_equal $6, UnknownScript_0x54c13
+ if_equal PARTY_LENGTH, UnknownScript_0x54c13
writetext UnknownText_0x54dae
playsound SFX_CAUGHT_MON
waitsfx
@@ -74,8 +74,8 @@ BillsSister:
iftrue UnknownScript_0x54c58
writetext UnknownText_0x54f9e
askforphonenumber PHONE_BILL
- if_equal $1, UnknownScript_0x54c64
- if_equal $2, UnknownScript_0x54c5e
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x54c64
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x54c5e
waitsfx
addcellnum PHONE_BILL
writetext UnknownText_0x54fd9
diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm
index 8e324a9bb..8d3a91f2d 100644
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -21,8 +21,8 @@ GoldenrodCity_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .FlyPointAndFloria
- dbw MAPCALLBACK_OBJECTS, .MoveTutor
+ callback MAPCALLBACK_NEWMAP, .FlyPointAndFloria
+ callback MAPCALLBACK_OBJECTS, .MoveTutor
.FlyPointAndFloria:
setflag ENGINE_FLYPOINT_GOLDENROD
@@ -63,42 +63,40 @@ MoveTutor:
yesorno
iffalse .Refused2
checkcoins 4000
- if_equal $2, .NotEnoughMoney
+ if_equal HAVE_LESS, .NotEnoughMoney
writetext UnknownText_0x1990ce
loadmenudata .MoveMenuDataHeader
verticalmenu
closewindow
- if_equal $1, .Flamethrower
- if_equal $2, .Thunderbolt
- if_equal $3, .IceBeam
+ if_equal MOVETUTOR_FLAMETHROWER, .Flamethrower
+ if_equal MOVETUTOR_THUNDERBOLT, .Thunderbolt
+ if_equal MOVETUTOR_ICE_BEAM, .IceBeam
jump .Incompatible
.Flamethrower:
- writebyte $1
+ writebyte MOVETUTOR_FLAMETHROWER
writetext UnknownText_0x1991cf
special Special_MoveTutor
- if_equal $0, .TeachMove
+ if_equal FALSE, .TeachMove
jump .Incompatible
.Thunderbolt:
- writebyte $2
+ writebyte MOVETUTOR_THUNDERBOLT
writetext UnknownText_0x1991cf
special Special_MoveTutor
- if_equal $0, .TeachMove
+ if_equal FALSE, .TeachMove
jump .Incompatible
.IceBeam:
- writebyte $3
+ writebyte MOVETUTOR_ICE_BEAM
writetext UnknownText_0x1991cf
special Special_MoveTutor
- if_equal $0, .TeachMove
+ if_equal FALSE, .TeachMove
jump .Incompatible
-
.MoveMenuDataHeader:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 15 ; end coords
+ menu_coords 0, 2, 15, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -110,7 +108,6 @@ MoveTutor:
db "ICE BEAM@"
db "CANCEL@"
-
.Refused:
writetext UnknownText_0x1990b4
waitbutton
diff --git a/maps/GoldenrodDeptStore2F.asm b/maps/GoldenrodDeptStore2F.asm
index b22e89026..ae78a5fe9 100644
--- a/maps/GoldenrodDeptStore2F.asm
+++ b/maps/GoldenrodDeptStore2F.asm
@@ -41,8 +41,8 @@ GoldenrodDeptStore2FDirectory:
GoldenrodDeptStore2FElevatorButton:
jumpstd elevatorbutton
-; possibly unused
-UnknownText_0x55b7c:
+; unused
+UnusedText_0x55b7c:
text "We intend to sell"
line "items for #MON"
cont "to hold."
@@ -52,8 +52,8 @@ UnknownText_0x55b7c:
cont "MON hold it."
done
-; possibly unused
-UnknownText_0x55bd3:
+; unused
+UnusedText_0x55bd3:
text "By giving #MON"
line "items to hold, I"
diff --git a/maps/GoldenrodDeptStore5F.asm b/maps/GoldenrodDeptStore5F.asm
index 70e7ab046..00a2ff11e 100644
--- a/maps/GoldenrodDeptStore5F.asm
+++ b/maps/GoldenrodDeptStore5F.asm
@@ -12,7 +12,7 @@ GoldenrodDeptStore5F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .CheckIfSunday
+ callback MAPCALLBACK_OBJECTS, .CheckIfSunday
.CheckIfSunday:
checkcode VAR_WEEKDAY
@@ -65,11 +65,11 @@ ReceptionistScript_0x560ce:
if_not_equal SUNDAY, .EventIsOver
checkflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT
iftrue .EventIsOver
- special GetFirstPokemonHappiness
+ special Special_GetFirstPokemonHappiness
writetext UnknownText_0x56143
buttonsound
- if_greater_than $95, .VeryHappy
- if_greater_than $31, .SomewhatHappy
+ if_greater_than 150 - 1, .VeryHappy
+ if_greater_than 50 - 1, .SomewhatHappy
jump .NotVeryHappy
.VeryHappy:
@@ -106,8 +106,8 @@ ReceptionistScript_0x560ce:
Carrie:
faceplayer
opentext
- special SpecialGameboyCheck
- if_not_equal $2, .NotGBC ; This is a dummy check from Gold and Silver. In normal gameplay, this would not be checked.
+ special Special_GameboyCheck
+ if_not_equal GBCHECK_CGB, .NotGBC ; This is a dummy check from Gold/Silver
writetext UnknownText_0x56241
waitbutton
closetext
diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm
index 82d04ccc8..d26c539d1 100644
--- a/maps/GoldenrodDeptStore6F.asm
+++ b/maps/GoldenrodDeptStore6F.asm
@@ -13,41 +13,41 @@ GoldenrodVendingMachine:
opentext
writetext GoldenrodVendingText
.Start:
- special PlaceMoneyTopRight
+ special Special_PlaceMoneyTopRight
loadmenudata .MenuData
verticalmenu
closewindow
- if_equal $1, .FreshWater
- if_equal $2, .SodaPop
- if_equal $3, .Lemonade
+ if_equal 1, .FreshWater
+ if_equal 2, .SodaPop
+ if_equal 3, .Lemonade
closetext
end
.FreshWater:
- checkmoney $0, 200
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 200
+ if_equal HAVE_LESS, .NotEnoughMoney
giveitem FRESH_WATER
iffalse .NotEnoughSpace
- takemoney $0, 200
- itemtotext FRESH_WATER, $0
+ takemoney YOUR_MONEY, 200
+ itemtotext FRESH_WATER, MEM_BUFFER_0
jump .VendItem
.SodaPop:
- checkmoney $0, 300
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 300
+ if_equal HAVE_LESS, .NotEnoughMoney
giveitem SODA_POP
iffalse .NotEnoughSpace
- takemoney $0, 300
- itemtotext SODA_POP, $0
+ takemoney YOUR_MONEY, 300
+ itemtotext SODA_POP, MEM_BUFFER_0
jump .VendItem
.Lemonade:
- checkmoney $0, 350
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 350
+ if_equal HAVE_LESS, .NotEnoughMoney
giveitem LEMONADE
iffalse .NotEnoughSpace
- takemoney $0, 350
- itemtotext LEMONADE, $0
+ takemoney YOUR_MONEY, 350
+ itemtotext LEMONADE, MEM_BUFFER_0
jump .VendItem
.VendItem:
@@ -70,8 +70,7 @@ GoldenrodVendingMachine:
.MenuData:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 19 ; end coords
+ menu_coords 0, 2, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -83,7 +82,6 @@ GoldenrodVendingMachine:
db "LEMONADE ¥350@"
db "CANCEL@"
-
GoldenrodDeptStore6FLassScript:
jumptextfaceplayer GoldenrodDeptStore6FLassText
@@ -105,8 +103,8 @@ GoldenrodClangText:
text "Clang! A can of"
line "@"
text_from_ram StringBuffer3
- text $55
- db "popped out!"
+ text ""
+ cont "popped out!"
done
GoldenrodVendingNoMoneyText:
diff --git a/maps/GoldenrodDeptStoreB1F.asm b/maps/GoldenrodDeptStoreB1F.asm
index da3dd0765..7922e4185 100644
--- a/maps/GoldenrodDeptStoreB1F.asm
+++ b/maps/GoldenrodDeptStoreB1F.asm
@@ -14,8 +14,8 @@ GoldenrodDeptStoreB1F_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_TILES, UnknownScript_0x7d781
- dbw MAPCALLBACK_NEWMAP, UnknownScript_0x7d7ac
+ callback MAPCALLBACK_TILES, UnknownScript_0x7d781
+ callback MAPCALLBACK_NEWMAP, UnknownScript_0x7d7ac
UnknownScript_0x7d781:
checkevent EVENT_RECEIVED_CARD_KEY
@@ -23,7 +23,7 @@ UnknownScript_0x7d781:
jump UnknownScript_0x7d791
UnknownScript_0x7d78a:
- changeblock $10, $4, $d
+ changeblock 16, 4, $0d
jump UnknownScript_0x7d791
UnknownScript_0x7d791:
@@ -31,15 +31,15 @@ UnknownScript_0x7d791:
iftrue .Layout2
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .Layout3
- changeblock $a, $8, $d
+ changeblock 10, 8, $0d
return
.Layout2:
- changeblock $4, $a, $d
+ changeblock 4, 10, $0d
return
.Layout3:
- changeblock $a, $c, $d
+ changeblock 10, 12, $0d
return
UnknownScript_0x7d7ac:
diff --git a/maps/GoldenrodDeptStoreElevator.asm b/maps/GoldenrodDeptStoreElevator.asm
index 9b6a2158b..7d921dd57 100644
--- a/maps/GoldenrodDeptStoreElevator.asm
+++ b/maps/GoldenrodDeptStoreElevator.asm
@@ -43,7 +43,6 @@ MapGoldenrodDeptStoreElevatorSignpost0Script:
.Done:
end
-
Elevator_0x566e0:
db 7 ; floors
elevfloor FLOOR_B1F, 2, GOLDENROD_DEPT_STORE_B1F
@@ -55,7 +54,6 @@ Elevator_0x566e0:
elevfloor FLOOR_6F, 2, GOLDENROD_DEPT_STORE_6F
db -1 ; end
-
GoldenrodDeptStoreElevator_MapEventHeader:
; filler
db 0, 0
diff --git a/maps/GoldenrodDeptStoreRoof.asm b/maps/GoldenrodDeptStoreRoof.asm
index b384d43f1..8fcadbb3f 100644
--- a/maps/GoldenrodDeptStoreRoof.asm
+++ b/maps/GoldenrodDeptStoreRoof.asm
@@ -14,8 +14,8 @@ GoldenrodDeptStoreRoof_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_TILES, .CheckSaleChangeBlock
- dbw MAPCALLBACK_OBJECTS, .CheckSaleChangeClerk
+ callback MAPCALLBACK_TILES, .CheckSaleChangeBlock
+ callback MAPCALLBACK_OBJECTS, .CheckSaleChangeClerk
.CheckSaleChangeBlock:
checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
@@ -23,8 +23,8 @@ GoldenrodDeptStoreRoof_MapScriptHeader:
return
.ChangeBlock:
- changeblock $0, $2, $3f
- changeblock $0, $4, $f
+ changeblock 0, 2, $3f
+ changeblock 0, 4, $0f
return
.CheckSaleChangeClerk:
diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm
index fc0216504..b1a911a85 100644
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -18,7 +18,7 @@ GoldenrodGameCorner_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Callback
+ callback MAPCALLBACK_OBJECTS, .Callback
.Callback:
checkevent EVENT_BEAT_ELITE_FOUR
@@ -64,15 +64,15 @@ GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36
loadmenudata GoldenrodGameCornerTMVendorMenuData
verticalmenu
closewindow
- if_equal $1, .Thunder
- if_equal $2, .Blizzard
- if_equal $3, .FireBlast
+ if_equal 1, .Thunder
+ if_equal 2, .Blizzard
+ if_equal 3, .FireBlast
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
.Thunder:
checkcoins 5500
- if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- itemtotext TM_THUNDER, $0
+ if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
+ itemtotext TM_THUNDER, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_THUNDER
@@ -82,8 +82,8 @@ GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36
.Blizzard:
checkcoins 5500
- if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- itemtotext TM_BLIZZARD, $0
+ if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
+ itemtotext TM_BLIZZARD, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_BLIZZARD
@@ -93,8 +93,8 @@ GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36
.FireBlast:
checkcoins 5500
- if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
- itemtotext TM_FIRE_BLAST, $0
+ if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
+ itemtotext TM_FIRE_BLAST, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_FIRE_BLAST
@@ -138,11 +138,9 @@ GoldenrodGameCornerPrizeVendor_NoCoinCaseScript:
closetext
end
-
GoldenrodGameCornerTMVendorMenuData:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 15 ; end coords
+ menu_coords 0, 2, 15, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -154,7 +152,6 @@ GoldenrodGameCornerTMVendorMenuData:
db "TM38 5500@"
db "CANCEL@"
-
GoldenrodGameCornerPrizeMonVendorScript:
faceplayer
opentext
@@ -168,17 +165,17 @@ GoldenrodGameCornerPrizeMonVendorScript:
loadmenudata .MenuDataHeader
verticalmenu
closewindow
- if_equal $1, .abra
- if_equal $2, .cubone
- if_equal $3, .wobbuffet
+ if_equal 1, .abra
+ if_equal 2, .cubone
+ if_equal 3, .wobbuffet
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
.abra
checkcoins 100
- if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
+ if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
- if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- pokenamemem ABRA, $0
+ if_equal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
+ pokenamemem ABRA, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx
@@ -193,10 +190,10 @@ GoldenrodGameCornerPrizeMonVendorScript:
.cubone
checkcoins 800
- if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
+ if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
- if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- pokenamemem CUBONE, $0
+ if_equal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
+ pokenamemem CUBONE, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx
@@ -211,10 +208,10 @@ GoldenrodGameCornerPrizeMonVendorScript:
.wobbuffet
checkcoins 1500
- if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
+ if_equal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
- if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
- pokenamemem WOBBUFFET, $0
+ if_equal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
+ pokenamemem WOBBUFFET, MEM_BUFFER_0
scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx
@@ -227,11 +224,9 @@ GoldenrodGameCornerPrizeMonVendorScript:
takecoins 1500
jump .loop
-
.MenuDataHeader:
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 17 ; end coords
+ menu_coords 0, 2, 17, TEXTBOX_Y - 1
dw .MenuData2
db 1 ; default option
@@ -243,7 +238,6 @@ GoldenrodGameCornerPrizeMonVendorScript:
db "WOBBUFFET 1500@"
db "CANCEL@"
-
GoldenrodGameCornerPharmacistScript:
faceplayer
opentext
@@ -301,21 +295,21 @@ GoldenrodGameCornerLeftTheirDrinkScript:
GoldenrodGameCornerSlotsMachineScript:
random 6
if_equal 0, GoldenrodGameCornerLuckySlotsMachineScript
- refreshscreen $0
+ refreshscreen
writebyte FALSE
special Special_SlotMachine
closetext
end
GoldenrodGameCornerLuckySlotsMachineScript:
- refreshscreen $0
+ refreshscreen
writebyte TRUE
special Special_SlotMachine
closetext
end
GoldenrodGameCornerCardFlipMachineScript:
- refreshscreen $0
+ refreshscreen
special Special_CardFlip
closetext
end
diff --git a/maps/GoldenrodGym.asm b/maps/GoldenrodGym.asm
index 4446e653a..598fa8673 100644
--- a/maps/GoldenrodGym.asm
+++ b/maps/GoldenrodGym.asm
@@ -30,12 +30,12 @@ WhitneyScript_0x5400c:
waitbutton
closetext
winlosstext UnknownText_0x541a5, 0
- loadtrainer WHITNEY, 1
+ loadtrainer WHITNEY, WHITNEY1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_WHITNEY
setevent EVENT_MADE_WHITNEY_CRY
- setscene $1
+ setscene 1
setevent EVENT_BEAT_BEAUTY_VICTORIA
setevent EVENT_BEAT_BEAUTY_SAMANTHA
setevent EVENT_BEAT_LASS_CARRIE
@@ -112,7 +112,7 @@ WhitneyCriesScript:
waitbutton
closetext
applymovement GOLDENRODGYM_LASS2, BridgetWalksAwayMovement
- setscene $0
+ setscene 0
clearevent EVENT_MADE_WHITNEY_CRY
end
@@ -171,7 +171,7 @@ GoldenrodGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext WHITNEY, 1, $1
+ trainertotext WHITNEY, WHITNEY1, MEM_BUFFER_1
jumpstd gymstatue2
BridgetWalksUpMovement:
diff --git a/maps/GoldenrodHappinessRater.asm b/maps/GoldenrodHappinessRater.asm
index 667698662..f6eaad339 100644
--- a/maps/GoldenrodHappinessRater.asm
+++ b/maps/GoldenrodHappinessRater.asm
@@ -13,14 +13,14 @@ GoldenrodHappinessRater_MapScriptHeader:
TeacherScript_0x54953:
faceplayer
opentext
- special GetFirstPokemonHappiness
+ special Special_GetFirstPokemonHappiness
writetext UnknownText_0x549a3
buttonsound
- if_greater_than $f9, UnknownScript_0x54973
- if_greater_than $c7, UnknownScript_0x54979
- if_greater_than $95, UnknownScript_0x5497f
- if_greater_than $63, UnknownScript_0x54985
- if_greater_than $31, UnknownScript_0x5498b
+ if_greater_than 250 - 1, UnknownScript_0x54973
+ if_greater_than 200 - 1, UnknownScript_0x54979
+ if_greater_than 150 - 1, UnknownScript_0x5497f
+ if_greater_than 100 - 1, UnknownScript_0x54985
+ if_greater_than 50 - 1, UnknownScript_0x5498b
jump UnknownScript_0x54991
UnknownScript_0x54973:
diff --git a/maps/GoldenrodMagnetTrainStation.asm b/maps/GoldenrodMagnetTrainStation.asm
index 8b114fd1c..f92d2e3da 100644
--- a/maps/GoldenrodMagnetTrainStation.asm
+++ b/maps/GoldenrodMagnetTrainStation.asm
@@ -34,12 +34,12 @@ OfficerScript_0x550ec:
closetext
applymovement GOLDENRODMAGNETTRAINSTATION_OFFICER, MovementData_0x55146
applymovement PLAYER, MovementData_0x5514f
- writebyte $0
+ writebyte FALSE
special Special_MagnetTrain
warpcheck
newloadmap MAPSETUP_TRAIN
applymovement PLAYER, .MovementBoardTheTrain
- wait $14
+ wait 20
end
.MovementBoardTheTrain:
@@ -172,8 +172,8 @@ GoldenrodMagnetTrainStation_MapEventHeader:
db 4
warp_def 8, 17, 5, GOLDENROD_CITY
warp_def 9, 17, 5, GOLDENROD_CITY
- warp_def 6, 5, 4, SAFFRON_TRAIN_STATION
- warp_def 11, 5, 3, SAFFRON_TRAIN_STATION
+ warp_def 6, 5, 4, SAFFRON_MAGNET_TRAIN_STATION
+ warp_def 11, 5, 3, SAFFRON_MAGNET_TRAIN_STATION
.CoordEvents:
db 1
diff --git a/maps/GoldenrodNameRater.asm b/maps/GoldenrodNameRater.asm
index 259e0fbb7..65873f94c 100644
--- a/maps/GoldenrodNameRater.asm
+++ b/maps/GoldenrodNameRater.asm
@@ -11,7 +11,7 @@ GoldenrodNameRater_MapScriptHeader:
GoldenrodNameRater:
faceplayer
opentext
- special SpecialNameRater
+ special Special_NameRater
waitbutton
closetext
end
@@ -22,7 +22,7 @@ GoldenrodNameRaterBookshelf:
GoldenrodNameRaterRadio:
jumpstd radio2
-INCLUDE "text/unused_sweet_honey.asm"
+INCLUDE "data/unused_text/sweet_honey.asm"
GoldenrodNameRater_MapEventHeader:
; filler
diff --git a/maps/GoldenrodPokeComCenter2FMobile.asm b/maps/GoldenrodPokeComCenter2FMobile.asm
index a3e639409..1042bf28e 100644
--- a/maps/GoldenrodPokeComCenter2FMobile.asm
+++ b/maps/GoldenrodPokeComCenter2FMobile.asm
@@ -28,8 +28,8 @@ UnknownScript_0x625df:
loadmenudata MenuDataHeader_0x62602
verticalmenu
closewindow
- if_equal $1, UnknownScript_0x625f0
- if_equal $2, UnknownScript_0x625f8
+ if_equal 1, UnknownScript_0x625f0
+ if_equal 2, UnknownScript_0x625f8
jump UnknownScript_0x62600
UnknownScript_0x625f0:
@@ -48,11 +48,9 @@ UnknownScript_0x62600:
closetext
end
-
MenuDataHeader_0x62602:
db $40 ; flags
- db 00, 00 ; start coords
- db 08, 15 ; end coords
+ menu_coords 0, 0, 15, 8
dw .MenuData2
db 1 ; default option
@@ -63,7 +61,6 @@ MenuDataHeader_0x62602:
db "モバイルセンター@" ; MOBILE CENTER
db "やめる@" ; QUIT
-
MapGoldenrodPokeComCenter2FMobileSignpost1Script:
opentext
writetext UnknownText_0x62989
@@ -73,8 +70,8 @@ UnknownScript_0x62629:
loadmenudata MenuDataHeader_0x6264c
verticalmenu
closewindow
- if_equal $1, UnknownScript_0x6263a
- if_equal $2, UnknownScript_0x62642
+ if_equal 1, UnknownScript_0x6263a
+ if_equal 2, UnknownScript_0x62642
jump UnknownScript_0x6264a
UnknownScript_0x6263a:
@@ -93,11 +90,9 @@ UnknownScript_0x6264a:
closetext
end
-
MenuDataHeader_0x6264c:
db $40 ; flags
- db 00, 00 ; start coords
- db 08, 15 ; end coords
+ menu_coords 0, 0, 15, 8
dw .MenuData2
db 1 ; default option
@@ -108,7 +103,6 @@ MenuDataHeader_0x6264c:
db "でんわ", $4a,"つながらないとき@" ; Don't use phone
db "やめる@" ; QUIT
-
MapGoldenrodPokeComCenter2FMobileSignpost2Script:
jumptext UnknownText_0x62b26
diff --git a/maps/GoldenrodPokecenter1F.asm b/maps/GoldenrodPokecenter1F.asm
index 617d54327..6e48e20dc 100644
--- a/maps/GoldenrodPokecenter1F.asm
+++ b/maps/GoldenrodPokecenter1F.asm
@@ -17,7 +17,7 @@ NurseScript_0x60f91:
GoldenrodPokecenter1F_GSBallSceneLeft:
writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
- special BattleTowerAction
+ special Special_BattleTowerAction
if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
end
@@ -25,7 +25,7 @@ GoldenrodPokecenter1F_GSBallSceneLeft:
checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
iftrue .cancel
playsound SFX_EXIT_BUILDING
- moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, $0, $7
+ moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, 0, 7
disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
playmusic MUSIC_SHOW_ME_AROUND
@@ -49,7 +49,7 @@ GoldenrodPokecenter1F_GSBallSceneLeft:
GoldenrodPokecenter1F_GSBallSceneRight:
writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
- special BattleTowerAction
+ special Special_BattleTowerAction
if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
end
@@ -57,7 +57,7 @@ GoldenrodPokecenter1F_GSBallSceneRight:
checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
iftrue .cancel
playsound SFX_EXIT_BUILDING
- moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, $0, $7
+ moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, 0, 7
disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
playmusic MUSIC_SHOW_ME_AROUND
diff --git a/maps/GoldenrodUnderground.asm b/maps/GoldenrodUnderground.asm
index debf98bfa..6727d9d52 100644
--- a/maps/GoldenrodUnderground.asm
+++ b/maps/GoldenrodUnderground.asm
@@ -15,9 +15,9 @@ GoldenrodUnderground_MapScriptHeader:
.MapCallbacks:
db 3
- dbw MAPCALLBACK_NEWMAP, .ResetSwitches
- dbw MAPCALLBACK_TILES, .CheckBasementKey
- dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek
+ callback MAPCALLBACK_NEWMAP, .ResetSwitches
+ callback MAPCALLBACK_TILES, .CheckBasementKey
+ callback MAPCALLBACK_OBJECTS, .CheckDayOfWeek
.ResetSwitches:
clearevent EVENT_SWITCH_1
@@ -35,7 +35,7 @@ GoldenrodUnderground_MapScriptHeader:
clearevent EVENT_SWITCH_12
clearevent EVENT_SWITCH_13
clearevent EVENT_SWITCH_14
- writebyte $0
+ writebyte 0
copyvartobyte UndergroundSwitchPositions
return
@@ -45,7 +45,7 @@ GoldenrodUnderground_MapScriptHeader:
return
.LockBasementDoor:
- changeblock $12, $6, $3d
+ changeblock 18, 6, $3d
return
.CheckDayOfWeek:
@@ -192,12 +192,12 @@ OlderHaircutBrotherScript:
.DoHaircut:
checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
iftrue .AlreadyGotHaircut
- special PlaceMoneyTopRight
+ special Special_PlaceMoneyTopRight
writetext UnknownText_0x7c5f9
yesorno
iffalse .Refused
- checkmoney $0, 500
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 500
+ if_equal HAVE_LESS, .NotEnoughMoney
writetext UnknownText_0x7c69a
buttonsound
special Special_YoungerHaircutBrother
@@ -227,15 +227,15 @@ OlderHaircutBrotherScript:
jump .then
.then
- takemoney $0, 500
- special PlaceMoneyTopRight
+ takemoney YOUR_MONEY, 500
+ special Special_PlaceMoneyTopRight
writetext UnknownText_0x7c6b8
waitbutton
closetext
- special FadeOutPalettes
+ special Special_FadeOutPalettes
playmusic MUSIC_HEAL
pause 60
- special FadeInPalettes
+ special Special_FadeInPalettes
special RestartMapMusic
opentext
writetext UnknownText_0x7c6d8
@@ -275,12 +275,12 @@ YoungerHaircutBrotherScript:
.DoHaircut:
checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
iftrue .AlreadyGotHaircut
- special PlaceMoneyTopRight
+ special Special_PlaceMoneyTopRight
writetext UnknownText_0x7c75c
yesorno
iffalse .Refused
- checkmoney $0, 300
- if_equal $2, .NotEnoughMoney
+ checkmoney YOUR_MONEY, 300
+ if_equal HAVE_LESS, .NotEnoughMoney
writetext UnknownText_0x7c7f1
buttonsound
special Special_OlderHaircutBrother
@@ -310,15 +310,15 @@ YoungerHaircutBrotherScript:
jump .then
.then
- takemoney $0, 300
- special PlaceMoneyTopRight
+ takemoney YOUR_MONEY, 300
+ special Special_PlaceMoneyTopRight
writetext UnknownText_0x7c80e
waitbutton
closetext
- special FadeOutPalettes
+ special Special_FadeOutPalettes
playmusic MUSIC_HEAL
pause 60
- special FadeInPalettes
+ special Special_FadeInPalettes
special RestartMapMusic
opentext
writetext UnknownText_0x7c82a
@@ -349,21 +349,21 @@ YoungerHaircutBrotherScript:
UnknownScript_0x7c2bb:
writetext HaircutBrosText_SlightlyHappier
- special PlayCurMonCry
+ special Special_PlayCurMonCry
waitbutton
closetext
end
UnknownScript_0x7c2c4:
writetext HaircutBrosText_Happier
- special PlayCurMonCry
+ special Special_PlayCurMonCry
waitbutton
closetext
end
UnknownScript_0x7c2cd:
writetext HaircutBrosText_MuchHappier
- special PlayCurMonCry
+ special Special_PlayCurMonCry
waitbutton
closetext
end
@@ -384,7 +384,7 @@ BasementDoorScript::
writetext UnknownText_0x7c5d6
waitbutton
closetext
- changeblock $12, $6, $2e
+ changeblock 18, 6, $2e
reloadmappart
closetext
setevent EVENT_USED_BASEMENT_KEY
@@ -409,13 +409,13 @@ MapGoldenrodUndergroundSignpost1Script:
jumptext UnknownText_0x7c91a
GoldenrodUndergroundHiddenParlyzHeal:
- dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
+ hiddenitem EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
GoldenrodUndergroundHiddenSuperPotion:
- dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
+ hiddenitem EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
GoldenrodUndergroundHiddenAntidote:
- dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
+ hiddenitem EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
SupernerdEricSeenText:
text "I got booted out"
diff --git a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
index f3b7f4946..85eb1bc1b 100644
--- a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
@@ -51,7 +51,7 @@ GoldenrodUndergroundSwitchRoomEntrances_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .UpdateDoorPositions
+ callback MAPCALLBACK_TILES, .UpdateDoorPositions
.DummyScene0:
end
@@ -630,10 +630,10 @@ GoldenrodUndergroundSwitchRoomEntrancesFullHeal:
itemball FULL_HEAL
GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion:
- dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
+ hiddenitem EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive:
- dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
+ hiddenitem EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
UndergroundSilverApproachMovement1:
step DOWN
diff --git a/maps/GoldenrodUndergroundWarehouse.asm b/maps/GoldenrodUndergroundWarehouse.asm
index 03841736b..e87f3ab1b 100644
--- a/maps/GoldenrodUndergroundWarehouse.asm
+++ b/maps/GoldenrodUndergroundWarehouse.asm
@@ -13,7 +13,7 @@ GoldenrodUndergroundWarehouse_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .ResetSwitches
+ callback MAPCALLBACK_NEWMAP, .ResetSwitches
.ResetSwitches:
clearevent EVENT_SWITCH_1
@@ -31,7 +31,7 @@ GoldenrodUndergroundWarehouse_MapScriptHeader:
clearevent EVENT_SWITCH_12
clearevent EVENT_SWITCH_13
clearevent EVENT_SWITCH_14
- writebyte $0
+ writebyte 0
copyvartobyte UndergroundSwitchPositions
return
diff --git a/maps/HallOfFame.asm b/maps/HallOfFame.asm
index c9bfdac9d..4ee1734a5 100644
--- a/maps/HallOfFame.asm
+++ b/maps/HallOfFame.asm
@@ -28,17 +28,17 @@ HallOfFame_MapScriptHeader:
closetext
spriteface HALLOFFAME_LANCE, UP
applymovement PLAYER, HallOfFame_SlowlyApproachMachine
- setscene $1
+ setscene 1
pause 15
- writebyte 2 ; Machine is in the Hall of Fame
- special HealMachineAnim
+ writebyte HEALMACHINE_HALL_OF_FAME
+ special Special_HealMachineAnim
setevent EVENT_BEAT_ELITE_FOUR
setevent EVENT_TELEPORT_GUY
setevent EVENT_RIVAL_SPROUT_TOWER
clearevent EVENT_RED_IN_MT_SILVER
setevent EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
clearevent EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
- setmapscene SPROUT_TOWER_3F, $1
+ setmapscene SPROUT_TOWER_3F, 1
special HealParty
checkevent EVENT_GOT_SS_TICKET_FROM_ELM
iftrue .SkipPhoneCall
diff --git a/maps/IcePathB1F.asm b/maps/IcePathB1F.asm
index 78c5dc659..2d1bd1aad 100644
--- a/maps/IcePathB1F.asm
+++ b/maps/IcePathB1F.asm
@@ -11,22 +11,21 @@ IcePathB1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_CMDQUEUE, .SetUpStoneTable
+ callback MAPCALLBACK_CMDQUEUE, .SetUpStoneTable
.SetUpStoneTable:
writecmdqueue .CommandQueue
return
.CommandQueue:
- dbw CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp
- dw 0 ; filler
+ cmdqueue CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp
.StoneTable:
stonetable 3, ICEPATHB1F_BOULDER1, .Boulder1
stonetable 4, ICEPATHB1F_BOULDER2, .Boulder2
stonetable 5, ICEPATHB1F_BOULDER3, .Boulder3
stonetable 6, ICEPATHB1F_BOULDER4, .Boulder4
- db -1
+ db -1 ; end
.Boulder1:
disappear ICEPATHB1F_BOULDER1
@@ -62,7 +61,6 @@ IcePathB1F_MapScriptHeader:
earthquake 80
end
-
IcePathB1FBoulder:
jumpstd strengthboulder
@@ -70,15 +68,13 @@ IcePathB1FIron:
itemball IRON
IcePathB1FHiddenMaxPotion:
- dwb EVENT_ICE_PATH_B1F_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_ICE_PATH_B1F_HIDDEN_MAX_POTION, MAX_POTION
IcePathBoulderFellThroughText:
text "The boulder fell"
line "through."
done
-
IcePathB1F_MapEventHeader:
; filler
db 0, 0
diff --git a/maps/IcePathB2FBlackthornSide.asm b/maps/IcePathB2FBlackthornSide.asm
index c171147cd..544d7d600 100644
--- a/maps/IcePathB2FBlackthornSide.asm
+++ b/maps/IcePathB2FBlackthornSide.asm
@@ -12,8 +12,7 @@ IcePathB2FBlackthornSideTMRest:
itemball TM_REST
IcePathB2FBlackthornSideHiddenIceHeal:
- dwb EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL, ICE_HEAL
-
+ hiddenitem EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL, ICE_HEAL
IcePathB2FBlackthornSide_MapEventHeader:
; filler
diff --git a/maps/IcePathB2FMahoganySide.asm b/maps/IcePathB2FMahoganySide.asm
index 80ae7f938..915794dec 100644
--- a/maps/IcePathB2FMahoganySide.asm
+++ b/maps/IcePathB2FMahoganySide.asm
@@ -13,8 +13,8 @@ IcePathB2FMahoganySide_MapScriptHeader:
.MapCallbacks:
db 0
-BoulderScript_0x7e5a3:
- jumptext UnknownText_0x7e5ad
+IcePathB2FMahoganySideBoulder:
+ jumptext IcePathB2FMahoganySideBoulderText
IcePathB2FMahoganySideFullHeal:
itemball FULL_HEAL
@@ -23,10 +23,9 @@ IcePathB2FMahoganySideMaxPotion:
itemball MAX_POTION
IcePathB2FMahoganySideHiddenCarbos:
- dwb EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS, CARBOS
+ hiddenitem EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS, CARBOS
-
-UnknownText_0x7e5ad:
+IcePathB2FMahoganySideBoulderText:
text "It's immovably"
line "imbedded in ice."
done
@@ -53,9 +52,9 @@ IcePathB2FMahoganySide_MapEventHeader:
.ObjectEvents:
db 6
- object_event 11, 3, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_1A
- object_event 4, 7, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_2A
- object_event 3, 12, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_3A
- object_event 12, 13, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_4A
+ object_event 11, 3, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_1A
+ object_event 4, 7, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_2A
+ object_event 3, 12, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_3A
+ object_event 12, 13, SPRITE_BOULDER, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_4A
object_event 8, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FMahoganySideFullHeal, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_FULL_HEAL
object_event 0, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FMahoganySideMaxPotion, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_MAX_POTION
diff --git a/maps/IlexForest.asm b/maps/IlexForest.asm
index 7bbba6562..4eae83fac 100644
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -17,7 +17,7 @@ IlexForest_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .FarfetchdCallback
+ callback MAPCALLBACK_OBJECTS, .FarfetchdCallback
.FarfetchdCallback:
checkevent EVENT_GOT_HM01_CUT
@@ -37,52 +37,52 @@ IlexForest_MapScriptHeader:
return
.PositionOne:
- moveobject ILEXFOREST_FARFETCHD, $e, $1f
+ moveobject ILEXFOREST_FARFETCHD, 14, 31
appear ILEXFOREST_FARFETCHD
return
.PositionTwo:
- moveobject ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, 15, 25
appear ILEXFOREST_FARFETCHD
return
.PositionThree:
- moveobject ILEXFOREST_FARFETCHD, $14, $18
+ moveobject ILEXFOREST_FARFETCHD, 20, 24
appear ILEXFOREST_FARFETCHD
return
.PositionFour:
- moveobject ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, 29, 22
appear ILEXFOREST_FARFETCHD
return
.PositionFive:
- moveobject ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, 28, 31
appear ILEXFOREST_FARFETCHD
return
.PositionSix:
- moveobject ILEXFOREST_FARFETCHD, $18, $23
+ moveobject ILEXFOREST_FARFETCHD, 24, 35
appear ILEXFOREST_FARFETCHD
return
.PositionSeven:
- moveobject ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, 22, 31
appear ILEXFOREST_FARFETCHD
return
.PositionEight:
- moveobject ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, 15, 29
appear ILEXFOREST_FARFETCHD
return
.PositionNine:
- moveobject ILEXFOREST_FARFETCHD, $a, $23
+ moveobject ILEXFOREST_FARFETCHD, 10, 35
appear ILEXFOREST_FARFETCHD
return
.PositionTen:
- moveobject ILEXFOREST_FARFETCHD, $6, $1c
+ moveobject ILEXFOREST_FARFETCHD, 6, 28
appear ILEXFOREST_FARFETCHD
return
@@ -125,7 +125,7 @@ IlexForestFarfetchdScript:
waitbutton
closetext
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos1_Pos2
- moveobject ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 2
@@ -135,7 +135,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal DOWN, .Position2_Down
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos3
- moveobject ILEXFOREST_FARFETCHD, $14, $18
+ moveobject ILEXFOREST_FARFETCHD, 20, 24
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 3
@@ -143,7 +143,7 @@ IlexForestFarfetchdScript:
.Position2_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos8
- moveobject ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -153,7 +153,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal LEFT, .Position3_Left
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos4
- moveobject ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 4
@@ -161,7 +161,7 @@ IlexForestFarfetchdScript:
.Position3_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos2
- moveobject ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 2
@@ -171,7 +171,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal UP, .Position4_Up
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos5
- moveobject ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 5
@@ -179,7 +179,7 @@ IlexForestFarfetchdScript:
.Position4_Up:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos3
- moveobject ILEXFOREST_FARFETCHD, $14, $18
+ moveobject ILEXFOREST_FARFETCHD, 20, 24
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 3
@@ -191,7 +191,7 @@ IlexForestFarfetchdScript:
if_equal LEFT, .Position5_Left
if_equal RIGHT, .Position5_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos6
- moveobject ILEXFOREST_FARFETCHD, $18, $23
+ moveobject ILEXFOREST_FARFETCHD, 24, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 6
@@ -199,7 +199,7 @@ IlexForestFarfetchdScript:
.Position5_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos7
- moveobject ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 7
@@ -207,7 +207,7 @@ IlexForestFarfetchdScript:
.Position5_Up:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Up
- moveobject ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 4
@@ -215,7 +215,7 @@ IlexForestFarfetchdScript:
.Position5_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Right
- moveobject ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, 29, 22
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 4
@@ -225,7 +225,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal RIGHT, .Position6_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos7
- moveobject ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 7
@@ -233,7 +233,7 @@ IlexForestFarfetchdScript:
.Position6_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos5
- moveobject ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 5
@@ -244,7 +244,7 @@ IlexForestFarfetchdScript:
if_equal DOWN, .Position7_Down
if_equal LEFT, .Position7_Left
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos8
- moveobject ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -252,7 +252,7 @@ IlexForestFarfetchdScript:
.Position7_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos6
- moveobject ILEXFOREST_FARFETCHD, $18, $23
+ moveobject ILEXFOREST_FARFETCHD, 24, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 6
@@ -260,7 +260,7 @@ IlexForestFarfetchdScript:
.Position7_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos5
- moveobject ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, 28, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 5
@@ -272,7 +272,7 @@ IlexForestFarfetchdScript:
if_equal LEFT, .Position8_Left
if_equal RIGHT, .Position8_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos9
- moveobject ILEXFOREST_FARFETCHD, $a, $23
+ moveobject ILEXFOREST_FARFETCHD, 10, 35
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 9
@@ -280,7 +280,7 @@ IlexForestFarfetchdScript:
.Position8_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos7
- moveobject ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, 22, 31
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 7
@@ -289,7 +289,7 @@ IlexForestFarfetchdScript:
.Position8_Up:
.Position8_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos2
- moveobject ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, 15, 25
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 2
@@ -300,7 +300,7 @@ IlexForestFarfetchdScript:
if_equal DOWN, .Position9_Down
if_equal RIGHT, .Position9_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos10
- moveobject ILEXFOREST_FARFETCHD, $6, $1c
+ moveobject ILEXFOREST_FARFETCHD, 6, 28
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 10
@@ -311,7 +311,7 @@ IlexForestFarfetchdScript:
.Position9_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Right
- moveobject ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -319,7 +319,7 @@ IlexForestFarfetchdScript:
.Position9_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Down
- moveobject ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, 15, 29
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -414,15 +414,13 @@ IlexForestEther:
itemball ETHER
IlexForestHiddenEther:
- dwb EVENT_ILEX_FOREST_HIDDEN_ETHER, ETHER
-
+ hiddenitem EVENT_ILEX_FOREST_HIDDEN_ETHER, ETHER
IlexForestHiddenSuperPotion:
- dwb EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION, SUPER_POTION
-
+ hiddenitem EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION, SUPER_POTION
IlexForestHiddenFullHeal:
- dwb EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL, FULL_HEAL
+ hiddenitem EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL, FULL_HEAL
IlexForestBoulder:
; unused
@@ -472,7 +470,7 @@ MapIlexForestSignpost4Script:
startbattle
reloadmapafterbattle
pause 20
- special CheckCaughtCelebi
+ special Special_CheckCaughtCelebi
iffalse .DidntCatchCelebi
appear ILEXFOREST_KURT
applymovement ILEXFOREST_KURT, MovementData_0x6ef4e
diff --git a/maps/IndigoPlateauPokecenter1F.asm b/maps/IndigoPlateauPokecenter1F.asm
index 879e1dd8b..f3f79d99f 100644
--- a/maps/IndigoPlateauPokecenter1F.asm
+++ b/maps/IndigoPlateauPokecenter1F.asm
@@ -13,18 +13,18 @@ IndigoPlateauPokecenter1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .PrepareElite4
+ callback MAPCALLBACK_NEWMAP, .PrepareElite4
.DummyScene:
end
.PrepareElite4:
- setmapscene WILLS_ROOM, $0
- setmapscene KOGAS_ROOM, $0
- setmapscene BRUNOS_ROOM, $0
- setmapscene KARENS_ROOM, $0
- setmapscene LANCES_ROOM, $0
- setmapscene HALL_OF_FAME, $0
+ setmapscene WILLS_ROOM, 0
+ setmapscene KOGAS_ROOM, 0
+ setmapscene BRUNOS_ROOM, 0
+ setmapscene KARENS_ROOM, 0
+ setmapscene LANCES_ROOM, 0
+ setmapscene HALL_OF_FAME, 0
clearevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
clearevent EVENT_WILLS_ROOM_EXIT_OPEN
clearevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED
@@ -54,7 +54,7 @@ PlateauRivalBattle1:
if_equal THURSDAY, PlateauRivalScriptDone
if_equal FRIDAY, PlateauRivalScriptDone
if_equal SATURDAY, PlateauRivalScriptDone
- moveobject INDIGOPLATEAUPOKECENTER1F_SILVER, $11, $9
+ moveobject INDIGOPLATEAUPOKECENTER1F_SILVER, 17, 9
appear INDIGOPLATEAUPOKECENTER1F_SILVER
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
@@ -130,7 +130,7 @@ PlateauRivalPostBattle:
spriteface PLAYER, DOWN
applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalLeavesMovement
disappear INDIGOPLATEAUPOKECENTER1F_SILVER
- setscene $0
+ setscene 0
playmapmusic
setflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
PlateauRivalScriptDone:
@@ -158,9 +158,9 @@ TeleportGuyScript:
waitbutton
closetext
playsound SFX_WARP_TO
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
- warp NEW_BARK_TOWN, $d, $6
+ warp NEW_BARK_TOWN, 13, 6
end
.No:
diff --git a/maps/KarensRoom.asm b/maps/KarensRoom.asm
index cba4aed9a..6eccbad60 100644
--- a/maps/KarensRoom.asm
+++ b/maps/KarensRoom.asm
@@ -9,7 +9,7 @@ KarensRoom_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .KarensRoomDoors
+ callback MAPCALLBACK_TILES, .KarensRoomDoors
.LockDoor:
priorityjump .KarensDoorLocksBehindYou
@@ -21,11 +21,11 @@ KarensRoom_MapScriptHeader:
.KarensRoomDoors:
checkevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED
iffalse .KeepDoorsClosed
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
.KeepDoorsClosed:
checkevent EVENT_KARENS_ROOM_EXIT_OPEN
iffalse .OpenDoors
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
.OpenDoors:
return
@@ -34,10 +34,10 @@ KarensRoom_MapScriptHeader:
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
reloadmappart
closetext
- setscene $1
+ setscene 1
setevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -51,7 +51,7 @@ KarenScript_Battle:
waitbutton
closetext
winlosstext KarenScript_KarenBeatenText, 0
- loadtrainer KAREN, 1
+ loadtrainer KAREN, KAREN1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_ELITE_4_KAREN
@@ -60,7 +60,7 @@ KarenScript_Battle:
waitbutton
closetext
playsound SFX_ENTER_DOOR
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
reloadmappart
closetext
setevent EVENT_KARENS_ROOM_EXIT_OPEN
diff --git a/maps/KogasRoom.asm b/maps/KogasRoom.asm
index d621ed342..04580cdbb 100644
--- a/maps/KogasRoom.asm
+++ b/maps/KogasRoom.asm
@@ -9,7 +9,7 @@ KogasRoom_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .KogasRoomDoors
+ callback MAPCALLBACK_TILES, .KogasRoomDoors
.LockDoor:
priorityjump .KogasDoorLocksBehindYou
@@ -21,11 +21,11 @@ KogasRoom_MapScriptHeader:
.KogasRoomDoors:
checkevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED
iffalse .KeepDoorsClosed
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
.KeepDoorsClosed:
checkevent EVENT_KOGAS_ROOM_EXIT_OPEN
iffalse .OpenDoors
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
.OpenDoors:
return
@@ -34,10 +34,10 @@ KogasRoom_MapScriptHeader:
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
reloadmappart
closetext
- setscene $1
+ setscene 1
setevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -51,7 +51,7 @@ KogaScript_Battle:
waitbutton
closetext
winlosstext KogaScript_KogaBeatenText, 0
- loadtrainer KOGA, 1
+ loadtrainer KOGA, KOGA1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_ELITE_4_KOGA
@@ -60,7 +60,7 @@ KogaScript_Battle:
waitbutton
closetext
playsound SFX_ENTER_DOOR
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
reloadmappart
closetext
setevent EVENT_KOGAS_ROOM_EXIT_OPEN
diff --git a/maps/KrissHouse1F.asm b/maps/KrissHouse1F.asm
index 24092cc4f..e6bc721aa 100644
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -38,12 +38,12 @@ UnknownScript_0x7a4f6:
opentext
writetext UnknownText_0x7a604
buttonsound
- stringtotext GearName, $1
+ stringtotext GearName, MEM_BUFFER_1
scall UnknownScript_0x7a57e
setflag ENGINE_POKEGEAR
setflag ENGINE_PHONE_CARD
addcellnum PHONE_MOM
- setscene $1
+ setscene 1
setevent EVENT_KRISS_HOUSE_MOM_1
clearevent EVENT_KRISS_HOUSE_MOM_2
writetext UnknownText_0x7a6bd
diff --git a/maps/KrissHouse2F.asm b/maps/KrissHouse2F.asm
index 65d5fdaee..9d59396ac 100644
--- a/maps/KrissHouse2F.asm
+++ b/maps/KrissHouse2F.asm
@@ -10,48 +10,47 @@ KrissHouse2F_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .InitializeRoom
- dbw MAPCALLBACK_TILES, .SetSpawn
+ callback MAPCALLBACK_NEWMAP, .InitializeRoom
+ callback MAPCALLBACK_TILES, .SetSpawn
+; unused
.Null:
end
.InitializeRoom:
- special ToggleDecorationsVisibility
+ special Special_ToggleDecorationsVisibility
setevent EVENT_IN_YOUR_ROOM
checkevent EVENT_INITIALIZED_EVENTS
- iftrue .SkipInizialization
+ iftrue .SkipInitialization
jumpstd initializeevents
return
-.SkipInizialization:
+.SkipInitialization:
return
.SetSpawn:
- special ToggleMaptileDecorations
+ special Special_ToggleMaptileDecorations
return
-
db 0, 0, 0 ; filler
-
Doll1:
- describedecoration 1
+ describedecoration DECODESC_LEFT_DOLL
Doll2:
- describedecoration 2
+ describedecoration DECODESC_RIGHT_DOLL
BigDoll:
- describedecoration 3
+ describedecoration DECODESC_BIG_DOLL
GameConsole:
- describedecoration 4
+ describedecoration DECODESC_CONSOLE
KrissHousePoster:
- dw EVENT_KRISS_ROOM_POSTER, .Script
+ conditional_event EVENT_KRISS_ROOM_POSTER, .Script
.Script:
- describedecoration 0
+ describedecoration DECODESC_POSTER
KrissHouseRadio:
checkevent EVENT_GOT_A_POKEMON_FROM_ELM
@@ -93,7 +92,7 @@ KrissHousePC:
closetext
end
.Warp:
- warp NONE, $0, $0
+ warp NONE, 0, 0
end
KrisRadioText1:
diff --git a/maps/KrissNeighborsHouse.asm b/maps/KrissNeighborsHouse.asm
index 0cd9f77dc..4c3b2a2b6 100644
--- a/maps/KrissNeighborsHouse.asm
+++ b/maps/KrissNeighborsHouse.asm
@@ -31,7 +31,7 @@ KrissNeighborsHouseRadio:
pause 45
writetext KrisNeighborRadioText3
pause 45
- musicfadeout MUSIC_NEW_BARK_TOWN, $10
+ musicfadeout MUSIC_NEW_BARK_TOWN, 16
writetext KrisNeighborRadioText4
pause 45
closetext
diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm
index 6c1d6a9eb..478e94e5c 100644
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -11,7 +11,7 @@ KurtsHouse_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .KurtCallback
+ callback MAPCALLBACK_OBJECTS, .KurtCallback
.KurtCallback:
checkevent EVENT_CLEARED_SLOWPOKE_WELL
@@ -132,7 +132,7 @@ KurtScript_0x18e178:
buttonsound
setevent EVENT_DRAGON_SHRINE_QUESTION_2
special Special_SelectApricornForKurt
- if_equal $0, .Cancel
+ if_equal FALSE, .Cancel
if_equal BLU_APRICORN, .Blu
if_equal YLW_APRICORN, .Ylw
if_equal GRN_APRICORN, .Grn
@@ -311,7 +311,7 @@ KurtScript_0x18e178:
clearevent EVENT_AZALEA_TOWN_KURT
waitsfx
special RestartMapMusic
- setmapscene AZALEA_TOWN, $2
+ setmapscene AZALEA_TOWN, 2
end
KurtScript_0x18e3bd:
diff --git a/maps/LakeOfRage.asm b/maps/LakeOfRage.asm
index 50e7f05d0..882e42b22 100644
--- a/maps/LakeOfRage.asm
+++ b/maps/LakeOfRage.asm
@@ -20,8 +20,8 @@ LakeOfRage_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
- dbw MAPCALLBACK_OBJECTS, .Wesley
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_OBJECTS, .Wesley
.DummyScene0:
end
@@ -62,7 +62,7 @@ UnknownScript_0x70035:
disappear LAKEOFRAGE_LANCE
clearevent EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
setevent EVENT_DECIDED_TO_HELP_LANCE
- setmapscene MAHOGANY_MART_1F, $1
+ setmapscene MAHOGANY_MART_1F, 1
end
UnknownScript_0x7004e:
@@ -101,7 +101,7 @@ UnknownScript_0x7007a:
waitsfx
itemnotify
closetext
- setscene $0
+ setscene 0
appear LAKEOFRAGE_LANCE
end
@@ -232,16 +232,13 @@ LakeOfRageTMDetect:
itemball TM_DETECT
LakeOfRageHiddenFullRestore:
- dwb EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+ hiddenitem EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
LakeOfRageHiddenRareCandy:
- dwb EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
-
+ hiddenitem EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
LakeOfRageHiddenMaxPotion:
- dwb EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
MovementData_0x70155:
teleport_from
diff --git a/maps/LakeOfRageMagikarpHouse.asm b/maps/LakeOfRageMagikarpHouse.asm
index cc494c8c5..8e164b6f9 100644
--- a/maps/LakeOfRageMagikarpHouse.asm
+++ b/maps/LakeOfRageMagikarpHouse.asm
@@ -45,9 +45,10 @@ UnknownScript_0x19a6e0:
writetext UnknownText_0x19a93e
waitbutton
special Special_CheckMagikarpLength
- if_equal $0, UnknownScript_0x19a71c
- if_equal $1, UnknownScript_0x19a722
- if_equal $2, UnknownScript_0x19a716
+ if_equal MAGIKARPLENGTH_NOT_MAGIKARP, UnknownScript_0x19a71c
+ if_equal MAGIKARPLENGTH_REFUSED, UnknownScript_0x19a722
+ if_equal MAGIKARPLENGTH_TOO_SHORT, UnknownScript_0x19a716
+ ; MAGIKARPLENGTH_BEAT_RECORD
jump UnknownScript_0x19a6fe
UnknownScript_0x19a6fe:
diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm
index f185af0dc..545457982 100644
--- a/maps/LancesRoom.asm
+++ b/maps/LancesRoom.asm
@@ -11,7 +11,7 @@ LancesRoom_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .LancesRoomDoors
+ callback MAPCALLBACK_TILES, .LancesRoomDoors
.LockDoor:
priorityjump .LancesDoorLocksBehindYou
@@ -23,11 +23,11 @@ LancesRoom_MapScriptHeader:
.LancesRoomDoors:
checkevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
iffalse .KeepDoorsClosed
- changeblock $4, $16, $34
+ changeblock 4, 22, $34
.KeepDoorsClosed:
checkevent EVENT_LANCES_ROOM_EXIT_OPEN
iffalse .OpenDoors
- changeblock $4, $0, $b
+ changeblock 4, 0, $0b
.OpenDoors:
return
@@ -36,10 +36,10 @@ LancesRoom_MapScriptHeader:
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
- changeblock $4, $16, $34
+ changeblock 4, 22, $34
reloadmappart
closetext
- setscene $1
+ setscene 1
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
end
@@ -69,11 +69,11 @@ LanceScript_0x180e7b:
waitbutton
closetext
playsound SFX_ENTER_DOOR
- changeblock $4, $0, $b
+ changeblock 4, 0, $0b
reloadmappart
closetext
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
- musicfadeout MUSIC_BEAUTY_ENCOUNTER, $10
+ musicfadeout MUSIC_BEAUTY_ENCOUNTER, 16
pause 30
showemote EMOTE_SHOCK, LANCESROOM_LANCE, 15
spriteface LANCESROOM_LANCE, DOWN
@@ -125,9 +125,9 @@ LanceScript_0x180e7b:
pause 30
closetext
applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRunsBackAndForth
- special FadeOutPalettes
+ special Special_FadeOutPalettes
pause 15
- warpfacing UP, HALL_OF_FAME, $4, $d
+ warpfacing UP, HALL_OF_FAME, 4, 13
end
LancesRoom_PlayerWalksInMovementData:
diff --git a/maps/LavRadioTower1F.asm b/maps/LavRadioTower1F.asm
index 424a802c9..4ab8c6f48 100644
--- a/maps/LavRadioTower1F.asm
+++ b/maps/LavRadioTower1F.asm
@@ -36,7 +36,7 @@ GentlemanScript_0x7ee6c:
.UnknownScript_0x7ee80:
writetext UnknownText_0x7f0a1
buttonsound
- stringtotext .expncardname, $1
+ stringtotext .expncardname, MEM_BUFFER_1
scall .UnknownScript_0x7ee94
setflag ENGINE_EXPN_CARD
.UnknownScript_0x7ee8e:
diff --git a/maps/LavenderNameRater.asm b/maps/LavenderNameRater.asm
index d41354143..9b7435312 100644
--- a/maps/LavenderNameRater.asm
+++ b/maps/LavenderNameRater.asm
@@ -15,7 +15,7 @@ LavenderNameRater_MapScriptHeader:
LavenderNameRater:
faceplayer
opentext
- special SpecialNameRater
+ special Special_NameRater
waitbutton
closetext
end
diff --git a/maps/LavenderTownSpeechHouse.asm b/maps/LavenderSpeechHouse.asm
index 1cb093dda..ac9decf52 100644
--- a/maps/LavenderTownSpeechHouse.asm
+++ b/maps/LavenderSpeechHouse.asm
@@ -1,20 +1,20 @@
const_value set 2
- const LAVENDERTOWNSPEECHHOUSE_POKEFAN_F
+ const LAVENDERSPEECHHOUSE_POKEFAN_F
-LavenderTownSpeechHouse_MapScriptHeader:
+LavenderSpeechHouse_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
-LavenderTownSpeechHousePokefanFScript:
- jumptextfaceplayer LavenderTownSpeechHousePokefanFText
+LavenderSpeechHousePokefanFScript:
+ jumptextfaceplayer LavenderSpeechHousePokefanFText
-LavenderTownSpeechHouseBookshelf:
+LavenderSpeechHouseBookshelf:
jumpstd picturebookshelf
-LavenderTownSpeechHousePokefanFText:
+LavenderSpeechHousePokefanFText:
text "LAVENDER is a"
line "tiny, quiet town"
@@ -28,7 +28,7 @@ LavenderTownSpeechHousePokefanFText:
line "built."
done
-LavenderTownSpeechHouse_MapEventHeader:
+LavenderSpeechHouse_MapEventHeader:
; filler
db 0, 0
@@ -42,9 +42,9 @@ LavenderTownSpeechHouse_MapEventHeader:
.BGEvents:
db 2
- bg_event 0, 1, BGEVENT_READ, LavenderTownSpeechHouseBookshelf
- bg_event 1, 1, BGEVENT_READ, LavenderTownSpeechHouseBookshelf
+ bg_event 0, 1, BGEVENT_READ, LavenderSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, LavenderSpeechHouseBookshelf
.ObjectEvents:
db 1
- object_event 2, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LavenderTownSpeechHousePokefanFScript, -1
+ object_event 2, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LavenderSpeechHousePokefanFScript, -1
diff --git a/maps/LavenderTown.asm b/maps/LavenderTown.asm
index e75726abd..57806ef41 100644
--- a/maps/LavenderTown.asm
+++ b/maps/LavenderTown.asm
@@ -10,7 +10,7 @@ LavenderTown_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_LAVENDER
@@ -113,7 +113,7 @@ LavenderTown_MapEventHeader:
db 7
warp_def 5, 5, 1, LAVENDER_POKECENTER_1F
warp_def 5, 9, 1, MR_FUJIS_HOUSE
- warp_def 3, 13, 1, LAVENDER_TOWN_SPEECH_HOUSE
+ warp_def 3, 13, 1, LAVENDER_SPEECH_HOUSE
warp_def 7, 13, 1, LAVENDER_NAME_RATER
warp_def 1, 5, 2, LAVENDER_MART
warp_def 13, 11, 1, SOUL_HOUSE
diff --git a/maps/MahoganyGym.asm b/maps/MahoganyGym.asm
index a8de6e987..3c403a735 100644
--- a/maps/MahoganyGym.asm
+++ b/maps/MahoganyGym.asm
@@ -23,7 +23,7 @@ PryceScript_0x199a9e:
waitbutton
closetext
winlosstext PryceText_Impressed, 0
- loadtrainer PRYCE, 1
+ loadtrainer PRYCE, PRYCE1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_PRYCE
@@ -146,7 +146,7 @@ MahoganyGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext PRYCE, 1, $1
+ trainertotext PRYCE, PRYCE1, MEM_BUFFER_1
jumpstd gymstatue2
PryceText_Intro:
diff --git a/maps/MahoganyMart1F.asm b/maps/MahoganyMart1F.asm
index a25277fd9..e0c610f71 100644
--- a/maps/MahoganyMart1F.asm
+++ b/maps/MahoganyMart1F.asm
@@ -13,7 +13,7 @@ MahoganyMart1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .MahoganyMart1FStaircase
+ callback MAPCALLBACK_TILES, .MahoganyMart1FStaircase
.DummyScene0:
end
@@ -28,7 +28,7 @@ MahoganyMart1F_MapScriptHeader:
return
.ShowStairs:
- changeblock $6, $2, $1e
+ changeblock 6, 2, $1e
return
PharmacistScript_0x6c367:
@@ -89,7 +89,7 @@ UnknownScript_0x6c38f:
waitbutton
showemote EMOTE_SHOCK, MAHOGANYMART1F_PHARMACIST, 10
playsound SFX_FAINT
- changeblock $6, $2, $1e
+ changeblock 6, 2, $1e
reloadmappart
closetext
setevent EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART
@@ -101,7 +101,7 @@ UnknownScript_0x6c38f:
applymovement MAHOGANYMART1F_LANCE, MovementData_0x6c412
playsound SFX_EXIT_BUILDING
disappear MAHOGANYMART1F_LANCE
- setscene $0
+ setscene 0
waitsfx
end
diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm
index ba907383d..fcb24323b 100644
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -12,7 +12,7 @@ MahoganyTown_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.DummyScene0:
end
@@ -53,17 +53,17 @@ UnknownScript_0x190039:
UnknownScript_0x190040:
opentext
writetext UnknownText_0x1900b0
- special PlaceMoneyTopRight
+ special Special_PlaceMoneyTopRight
yesorno
iffalse UnknownScript_0x190072
- checkmoney $0, 300
- if_equal $2, UnknownScript_0x19006c
+ checkmoney YOUR_MONEY, 300
+ if_equal HAVE_LESS, UnknownScript_0x19006c
giveitem RAGECANDYBAR
iffalse UnknownScript_0x190078
waitsfx
playsound SFX_TRANSACTION
- takemoney $0, 300
- special PlaceMoneyTopRight
+ takemoney YOUR_MONEY, 300
+ special Special_PlaceMoneyTopRight
writetext UnknownText_0x19014a
waitbutton
closetext
diff --git a/maps/ManiasHouse.asm b/maps/ManiasHouse.asm
index d60d1081d..0bcc5e5d1 100644
--- a/maps/ManiasHouse.asm
+++ b/maps/ManiasHouse.asm
@@ -18,7 +18,7 @@ ManiaScript:
writetext ManiaText_AskLookAfterShuckle
yesorno
iffalse .refusetotakeshuckie
- special SpecialGiveShuckle
+ special Special_GiveShuckle
iffalse .partyfull
writetext ManiaText_TakeCareOfShuckle
buttonsound
@@ -54,11 +54,12 @@ ManiaScript:
writetext ManiaText_CanIHaveMyMonBack
yesorno
iffalse .refused
- special SpecialReturnShuckle
- if_equal $0, .wrong
- if_equal $1, .refused
- if_equal $3, .superhappy
- if_equal $4, .default_postevent
+ special Special_ReturnShuckle
+ if_equal SHUCKIE_WRONG_MON, .wrong
+ if_equal SHUCKIE_REFUSED, .refused
+ if_equal SHUCKIE_HAPPY, .superhappy
+ if_equal SHUCKIE_FAINTED, .default_postevent
+ ; SHUCKIE_RETURNED
writetext ManiaText_ThankYou
waitbutton
closetext
diff --git a/maps/MobileBattleRoom.asm b/maps/MobileBattleRoom.asm
index 870321f3d..0af2068f8 100644
--- a/maps/MobileBattleRoom.asm
+++ b/maps/MobileBattleRoom.asm
@@ -15,15 +15,15 @@ MobileBattleRoom_MapScriptHeader:
end
.InitializeAndPreparePokecenter2F:
- setscene $1
- setmapscene POKECENTER_2F, $5
+ setscene 1
+ setmapscene POKECENTER_2F, 5
end
MapMobileBattleRoomSignpost0Script:
- refreshscreen $0
- special Function1037c2
+ refreshscreen
+ special Special_Function1037c2
if_equal $1, .one
- special Function1037eb
+ special Special_Function1037eb
iffalse .false
if_equal $1, .one_
if_equal $2, .two_
@@ -33,24 +33,24 @@ MapMobileBattleRoomSignpost0Script:
writetext MobileBattleRoom_HealText
pause 20
closetext
- special FadeOutPalettes
+ special Special_FadeOutPalettes
playmusic MUSIC_HEAL
- special LoadMapPalettes
+ special Special_LoadMapPalettes
pause 60
- special FadeInPalettes
+ special Special_FadeInPalettes
special RestartMapMusic
- refreshscreen $0
+ refreshscreen
.two_
- special TrainerRankings_Healings
+ special Special_StubbedTrainerRankings_Healings
special HealParty
- special Function10383c
+ special Special_Function10383c
iftrue .false
.one
- special Function10387b
+ special Special_Function10387b
writetext MobileBattleRoom_EstablishingCommsText
waitbutton
reloadmappart
- special Function101225
+ special Special_Function101225
.false
closetext
end
diff --git a/maps/MobileTradeRoomMobile.asm b/maps/MobileTradeRoomMobile.asm
index 1003d4ea5..e7c4c7b09 100644
--- a/maps/MobileTradeRoomMobile.asm
+++ b/maps/MobileTradeRoomMobile.asm
@@ -15,17 +15,17 @@ MobileTradeRoomMobile_MapScriptHeader:
end
.InitializeAndPreparePokecenter2F:
- setscene $1
- setmapscene POKECENTER_2F, $4
+ setscene 1
+ setmapscene POKECENTER_2F, 4
end
MapMobileTradeRoomMobileSignpost0Script:
- refreshscreen $0
- special Function1037c2
+ refreshscreen
+ special Special_Function1037c2
writetext MobileTradeRoomMobile_EstablishingCommsText
waitbutton
reloadmappart
- special Function101231
+ special Special_Function101231
closetext
end
diff --git a/maps/MountMoon.asm b/maps/MountMoon.asm
index 73306f424..531c8a327 100644
--- a/maps/MountMoon.asm
+++ b/maps/MountMoon.asm
@@ -66,7 +66,7 @@ MountMoon_MapScriptHeader:
closetext
applymovement MOUNTMOON_SILVER, MountMoonSilverMovementAfter
disappear MOUNTMOON_SILVER
- setscene $1
+ setscene 1
setevent EVENT_BEAT_RIVAL_IN_MT_MOON
playmapmusic
end
diff --git a/maps/MountMoonSquare.asm b/maps/MountMoonSquare.asm
index 3e13b58ea..c914e669f 100644
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -10,8 +10,8 @@ MountMoonSquare_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .DisappearMoonStone
- dbw MAPCALLBACK_OBJECTS, .DisappearRock
+ callback MAPCALLBACK_NEWMAP, .DisappearMoonStone
+ callback MAPCALLBACK_OBJECTS, .DisappearRock
.DummyScene:
end
@@ -75,8 +75,7 @@ ClefairyDance:
end
MountMoonSquareHiddenMoonStone:
- dwb EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE, MOON_STONE
-
+ hiddenitem EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE, MOON_STONE
DontLitterSign:
jumptext DontLitterSignText
diff --git a/maps/MountMortar1FInside.asm b/maps/MountMortar1FInside.asm
index 659d7a54d..983fd9839 100644
--- a/maps/MountMortar1FInside.asm
+++ b/maps/MountMortar1FInside.asm
@@ -64,8 +64,7 @@ MountMortar1FInsideUltraBall:
itemball ULTRA_BALL
MountMortar1FInsideHiddenMaxRepel:
- dwb EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL, MAX_REPEL
-
+ hiddenitem EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL, MAX_REPEL
PokemaniacMillerSeenText:
text "I'm not losing"
diff --git a/maps/MountMortar1FOutside.asm b/maps/MountMortar1FOutside.asm
index faa9930d2..4e8dcf331 100644
--- a/maps/MountMortar1FOutside.asm
+++ b/maps/MountMortar1FOutside.asm
@@ -16,8 +16,7 @@ MountMortar1FOutsideRevive:
itemball REVIVE
MountMortar1FOutsideHiddenHyperPotion:
- dwb EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION, HYPER_POTION
-
+ hiddenitem EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION, HYPER_POTION
MountMortar1FOutside_MapEventHeader:
; filler
diff --git a/maps/MountMortar2FInside.asm b/maps/MountMortar2FInside.asm
index 106e51f5a..4d401da9c 100644
--- a/maps/MountMortar2FInside.asm
+++ b/maps/MountMortar2FInside.asm
@@ -44,8 +44,7 @@ MountMortar2FInsideEscapeRope:
itemball ESCAPE_ROPE
MountMortar2FInsideHiddenFullRestore:
- dwb EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+ hiddenitem EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
SupernerdHughSeenText:
text "Yo! MARKUS!"
diff --git a/maps/MountMortarB1F.asm b/maps/MountMortarB1F.asm
index ad00662f8..2bfea9fec 100644
--- a/maps/MountMortarB1F.asm
+++ b/maps/MountMortarB1F.asm
@@ -35,7 +35,7 @@ UnknownScript_0x7e217:
buttonsound
waitsfx
checkcode VAR_PARTYCOUNT
- if_equal $6, UnknownScript_0x7e237
+ if_equal PARTY_LENGTH, UnknownScript_0x7e237
writetext UnknownText_0x7e355
playsound SFX_CAUGHT_MON
waitsfx
@@ -72,8 +72,7 @@ MountMortarB1FPPUp:
itemball PP_UP
MountMortarB1FHiddenMaxRevive:
- dwb EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE, MAX_REVIVE
-
+ hiddenitem EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE, MAX_REVIVE
UnknownText_0x7e24d:
text "Hey!"
diff --git a/maps/MoveDeletersHouse.asm b/maps/MoveDeletersHouse.asm
index a6a50d2dd..c51f0a9e1 100644
--- a/maps/MoveDeletersHouse.asm
+++ b/maps/MoveDeletersHouse.asm
@@ -11,7 +11,7 @@ MoveDeletersHouse_MapScriptHeader:
MoveDeleter:
faceplayer
opentext
- special MoveDeletion
+ special Special_MoveDeletion
waitbutton
closetext
end
diff --git a/maps/MrPokemonsHouse.asm b/maps/MrPokemonsHouse.asm
index f808d44c8..d0bb13037 100644
--- a/maps/MrPokemonsHouse.asm
+++ b/maps/MrPokemonsHouse.asm
@@ -111,9 +111,9 @@ MrPokemonsHouse_OakScript:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
playmusic MUSIC_HEAL
- special TrainerRankings_Healings
+ special Special_StubbedTrainerRankings_Healings
special HealParty
pause 60
special Special_FadeInQuickly
@@ -125,9 +125,9 @@ MrPokemonsHouse_OakScript:
setevent EVENT_RIVAL_NEW_BARK_TOWN
setevent EVENT_KRISS_HOUSE_1F_NEIGHBOR
clearevent EVENT_KRISS_NEIGHBORS_HOUSE_NEIGHBOR
- setscene $1
- setmapscene CHERRYGROVE_CITY, $1
- setmapscene ELMS_LAB, $3
+ setscene 1
+ setmapscene CHERRYGROVE_CITY, 1
+ setmapscene ELMS_LAB, 3
specialphonecall SPECIALCALL_ROBBED
clearevent EVENT_COP_IN_ELMS_LAB
checkevent EVENT_GOT_TOTODILE_FROM_ELM
@@ -169,7 +169,7 @@ MrPokemonsHouse_OakExits:
step DOWN
step LEFT
turn_head DOWN
- db $3f ; movement
+ step_sleep 2
step_end
MrPokemonIntroText1:
diff --git a/maps/NationalPark.asm b/maps/NationalPark.asm
index fe1547ea5..56f861384 100644
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -94,9 +94,9 @@ UnknownScript_0x5c071:
scall UnknownScript_0x5c100
UnknownScript_0x5c074:
askforphonenumber PHONE_SCHOOLBOY_JACK
- if_equal $1, UnknownScript_0x5c110
- if_equal $2, UnknownScript_0x5c10c
- trainertotext SCHOOLBOY, JACK1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5c110
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5c10c
+ trainertotext SCHOOLBOY, JACK1, MEM_BUFFER_0
scall UnknownScript_0x5c104
jump UnknownScript_0x5c108
@@ -224,9 +224,9 @@ UnknownScript_0x5c160:
scall UnknownScript_0x5c193
UnknownScript_0x5c163:
askforphonenumber PHONE_POKEFAN_BEVERLY
- if_equal $1, UnknownScript_0x5c1a3
- if_equal $2, UnknownScript_0x5c19f
- trainertotext POKEFANF, BEVERLY1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5c1a3
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5c19f
+ trainertotext POKEFANF, BEVERLY1, MEM_BUFFER_0
scall UnknownScript_0x5c197
jump UnknownScript_0x5c19b
@@ -305,8 +305,7 @@ NationalParkTMDig:
itemball TM_DIG
NationalParkHiddenFullHeal:
- dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
-
+ hiddenitem EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
NationalParkLassText:
text "Look! Check out my"
diff --git a/maps/NationalParkBugContest.asm b/maps/NationalParkBugContest.asm
index 5d7831529..07e6455ac 100644
--- a/maps/NationalParkBugContest.asm
+++ b/maps/NationalParkBugContest.asm
@@ -115,8 +115,7 @@ NationalParkBugContestTMDig:
itemball TM_DIG
NationalParkBugContestHiddenFullHeal:
- dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
-
+ hiddenitem EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
UnknownText_0x5c94c:
text "DON: I'm going to"
diff --git a/maps/NewBarkTown.asm b/maps/NewBarkTown.asm
index 56b5f14db..dee94a7c9 100644
--- a/maps/NewBarkTown.asm
+++ b/maps/NewBarkTown.asm
@@ -11,7 +11,7 @@ NewBarkTown_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.DummyScene0:
end
diff --git a/maps/OaksLab.asm b/maps/OaksLab.asm
index 17da0485d..6021bc980 100644
--- a/maps/OaksLab.asm
+++ b/maps/OaksLab.asm
@@ -26,14 +26,14 @@ Oak:
setevent EVENT_TALKED_TO_OAK_IN_KANTO
.CheckBadges:
checkcode VAR_BADGES
- if_equal 16, .OpenMtSilver
- if_equal 8, .Complain
+ if_equal NUM_BADGES, .OpenMtSilver
+ if_equal NUM_JOHTO_BADGES, .Complain
jump .AhGood
.CheckPokedex:
writetext OakLabDexCheckText
waitbutton
- special ProfOaksPCBoot
+ special Special_ProfOaksPCBoot
writetext OakLabGoodbyeText
waitbutton
closetext
diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm
index 2e5129bc5..fce28ceaa 100644
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -12,7 +12,7 @@ OlivineCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.DummyScene0:
end
@@ -41,11 +41,11 @@ UnknownScript_0x1a8833:
applymovement PLAYER, MovementData_0x1a88f4
spriteface PLAYER, RIGHT
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88db
- setscene $1
+ setscene 1
disappear OLIVINECITY_OLIVINE_RIVAL
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
end
UnknownScript_0x1a886b:
@@ -66,10 +66,10 @@ UnknownScript_0x1a886b:
spriteface PLAYER, RIGHT
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88e8
disappear OLIVINECITY_OLIVINE_RIVAL
- setscene $1
+ setscene 1
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
- special MapCallbackSprites_LoadUsedSpritesGFX
+ special Special_LoadUsedSpritesGFX
end
OlivineCitySailor1Script:
@@ -78,8 +78,8 @@ OlivineCitySailor1Script:
StandingYoungsterScript_0x1a88a6:
faceplayer
opentext
- random $2
- if_equal $0, UnknownScript_0x1a88b4
+ random 2
+ if_equal 0, UnknownScript_0x1a88b4
writetext UnknownText_0x1a8b04
waitbutton
closetext
diff --git a/maps/OlivineGym.asm b/maps/OlivineGym.asm
index cb87bdd85..514b8e89a 100644
--- a/maps/OlivineGym.asm
+++ b/maps/OlivineGym.asm
@@ -18,7 +18,7 @@ JasmineScript_0x9c12f:
waitbutton
closetext
winlosstext Jasmine_BetterTrainer, 0
- loadtrainer JASMINE, 1
+ loadtrainer JASMINE, JASMINE1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_JASMINE
@@ -91,7 +91,7 @@ OlivineGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext JASMINE, 1, $1
+ trainertotext JASMINE, JASMINE1, MEM_BUFFER_1
jumpstd gymstatue2
Jasmine_SteelTypeIntro:
diff --git a/maps/OlivineLighthouse2F.asm b/maps/OlivineLighthouse2F.asm
index 0961a4427..e078bba2b 100644
--- a/maps/OlivineLighthouse2F.asm
+++ b/maps/OlivineLighthouse2F.asm
@@ -41,9 +41,9 @@ UnknownScript_0x5afb0:
scall UnknownScript_0x5b057
UnknownScript_0x5afb3:
askforphonenumber PHONE_SAILOR_HUEY
- if_equal $1, UnknownScript_0x5b067
- if_equal $2, UnknownScript_0x5b063
- trainertotext SAILOR, HUEY1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5b067
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5b063
+ trainertotext SAILOR, HUEY1, MEM_BUFFER_0
scall UnknownScript_0x5b05b
jump UnknownScript_0x5b05f
@@ -164,8 +164,8 @@ SailorHuey1BeatenText:
line "I lose!"
done
-; possibly unused
-UnknownText_0x5b0be:
+; unused
+UnusedText_0x5b0be:
text "What power!"
line "How would you like"
diff --git a/maps/OlivineLighthouse5F.asm b/maps/OlivineLighthouse5F.asm
index e7c4a7884..fdd32455c 100644
--- a/maps/OlivineLighthouse5F.asm
+++ b/maps/OlivineLighthouse5F.asm
@@ -44,8 +44,7 @@ OlivineLighthouse5FTMSwagger:
itemball TM_SWAGGER
OlivineLighthouse5FHiddenHyperPotion:
- dwb EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION, HYPER_POTION
-
+ hiddenitem EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION, HYPER_POTION
SailorErnestSeenText:
text "I wanted to battle"
diff --git a/maps/OlivineLighthouse6F.asm b/maps/OlivineLighthouse6F.asm
index 686764bfd..e0bd4febf 100644
--- a/maps/OlivineLighthouse6F.asm
+++ b/maps/OlivineLighthouse6F.asm
@@ -47,9 +47,9 @@ UnknownScript_0x60bab:
closetext
special RestartMapMusic
cry AMPHAROS
- special FadeOutPalettes
+ special Special_FadeOutPalettes
pause 10
- special FadeInPalettes
+ special Special_FadeInPalettes
opentext
writetext UnknownText_0x60f3d
waitbutton
@@ -109,7 +109,7 @@ MonsterScript_0x60c3a:
iftrue UnknownScript_0x60c51
writetext UnknownText_0x60f03
writebyte AMPHAROS
- special PlaySlowCry
+ special Special_PlaySlowCry
buttonsound
writetext UnknownText_0x60f19
waitbutton
@@ -121,10 +121,10 @@ UnknownScript_0x60c51:
cry AMPHAROS
waitbutton
closetext
- special FadeOutPalettes
- special FadeInPalettes
- special FadeOutPalettes
- special FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
+ special Special_FadeOutPalettes
+ special Special_FadeInPalettes
end
OlivineLighthouse6FSuperPotion:
diff --git a/maps/OlivinePort.asm b/maps/OlivinePort.asm
index f34281e43..063f7db28 100644
--- a/maps/OlivinePort.asm
+++ b/maps/OlivinePort.asm
@@ -26,7 +26,7 @@ OlivinePort_MapScriptHeader:
.LeaveFastShipScript:
applymovement PLAYER, MovementData_0x74a32
appear OLIVINEPORT_SAILOR1
- setscene $0
+ setscene 0
setevent EVENT_GAVE_KURT_APRICORNS
blackoutmod OLIVINE_CITY
end
@@ -46,7 +46,7 @@ SailorScript_0x748c0:
waitsfx
applymovement PLAYER, MovementData_0x74a30
playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse UnknownScript_0x7490a
@@ -64,8 +64,8 @@ SailorScript_0x748c0:
UnknownScript_0x7490a:
clearevent EVENT_FAST_SHIP_DESTINATION_OLIVINE
appear OLIVINEPORT_SAILOR1
- setmapscene FAST_SHIP_1F, $1
- warp FAST_SHIP_1F, $19, $1
+ setmapscene FAST_SHIP_1F, 1
+ warp FAST_SHIP_1F, 25, 1
end
UnknownScript_0x74919:
@@ -234,8 +234,7 @@ CooltrainerFScript_0x74a22:
end
OlivinePortHiddenProtein:
- dwb EVENT_OLIVINE_PORT_HIDDEN_PROTEIN, PROTEIN
-
+ hiddenitem EVENT_OLIVINE_PORT_HIDDEN_PROTEIN, PROTEIN
MovementData_0x74a30:
step DOWN
diff --git a/maps/PalletTown.asm b/maps/PalletTown.asm
index f11cf6d65..e1e6006c9 100644
--- a/maps/PalletTown.asm
+++ b/maps/PalletTown.asm
@@ -8,7 +8,7 @@ PalletTown_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_PALLET
diff --git a/maps/PewterCity.asm b/maps/PewterCity.asm
index 44ea440a7..876bacfb0 100644
--- a/maps/PewterCity.asm
+++ b/maps/PewterCity.asm
@@ -11,7 +11,7 @@ PewterCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_PEWTER
diff --git a/maps/PewterGym.asm b/maps/PewterGym.asm
index ca94d9e9f..305baf7fa 100644
--- a/maps/PewterGym.asm
+++ b/maps/PewterGym.asm
@@ -19,7 +19,7 @@ BrockScript_0x1a2864:
waitbutton
closetext
winlosstext UnknownText_0x1a29bb, 0
- loadtrainer BROCK, 1
+ loadtrainer BROCK, BROCK1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_BROCK
@@ -72,7 +72,7 @@ PewterGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext BROCK, 1, $1
+ trainertotext BROCK, BROCK1, MEM_BUFFER_1
jumpstd gymstatue2
UnknownText_0x1a28d0:
diff --git a/maps/PokeSeersHouse.asm b/maps/PokeSeersHouse.asm
index 9b9052ee8..7f105c02e 100644
--- a/maps/PokeSeersHouse.asm
+++ b/maps/PokeSeersHouse.asm
@@ -11,7 +11,7 @@ PokeSeersHouse_MapScriptHeader:
SeerScript:
faceplayer
opentext
- special SpecialPokeSeer
+ special Special_PokeSeer
waitbutton
closetext
end
diff --git a/maps/Pokecenter2F.asm b/maps/Pokecenter2F.asm
index ece34605d..946bceaf7 100644
--- a/maps/Pokecenter2F.asm
+++ b/maps/Pokecenter2F.asm
@@ -76,10 +76,10 @@ LinkReceptionistScript_Trade:
writetext Text_TradeReceptionistIntro
yesorno
iffalse .Cancel
- special Mobile_DummyReturnFalse ; always returns false
+ special Special_Mobile_DummyReturnFalse ; always returns false
iffalse .NoMobile
writetext Text_TradeReceptionistMobile
- special AskMobileOrCable
+ special Special_AskMobileOrCable
iffalse .Cancel
if_equal $1, .Mobile
.NoMobile:
@@ -107,7 +107,7 @@ LinkReceptionistScript_Trade:
end
.FriendNotReady:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
writetext Text_FriendNotReady
closetext
end
@@ -132,7 +132,7 @@ LinkReceptionistScript_Trade:
.DidNotSave:
writetext Text_PleaseComeAgain
.AbortLink:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
.Cancel:
closetext
end
@@ -153,17 +153,17 @@ LinkReceptionistScript_Trade:
iffalse .Mobile_DidNotSave
special Special_TryQuickSave
iffalse .Mobile_DidNotSave
- special Function1011f1
+ special Special_Function1011f1
writetext Text_PleaseComeIn2
waitbutton
closetext
- writebyte $0
+ writebyte FALSE
end
.Mobile_DidNotSave:
writetext Text_PleaseComeAgain
closetext
- writebyte $1
+ writebyte TRUE
end
BattleTradeMobile_WalkIn:
@@ -178,10 +178,10 @@ LinkReceptionistScript_Battle:
writetext Text_BattleReceptionistIntro
yesorno
iffalse .Cancel
- special Mobile_DummyReturnFalse ; always returns false
+ special Special_Mobile_DummyReturnFalse ; always returns false
iffalse .NoMobile
writetext Text_BattleReceptionistMobile
- special AskMobileOrCable
+ special Special_AskMobileOrCable
iffalse .Cancel
if_equal $1, .Mobile
.NoMobile:
@@ -209,7 +209,7 @@ LinkReceptionistScript_Battle:
end
.FriendNotReady:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
writetext Text_FriendNotReady
closetext
end
@@ -234,7 +234,7 @@ LinkReceptionistScript_Battle:
.DidNotSave:
writetext Text_PleaseComeAgain
.AbortLink:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
.Cancel:
closetext
end
@@ -255,23 +255,23 @@ LinkReceptionistScript_Battle:
writetext Text_MustSaveGame
yesorno
iffalse .Mobile_DidNotSave
- special Function103780
+ special Special_Function103780
iffalse .Mobile_DidNotSave
- special Function1011f1
+ special Special_Function1011f1
writetext Text_PleaseComeIn2
waitbutton
closetext
- writebyte $0
+ writebyte FALSE
end
.Mobile_DidNotSave:
writetext Text_PleaseComeAgain
closetext
- writebyte $1
+ writebyte TRUE
end
.SelectThreeMons:
- special Mobile_SelectThreeMons
+ special Special_Mobile_SelectThreeMons
iffalse .Mobile_DidNotSelect
if_equal $1, .Mobile_OK
if_equal $2, .Mobile_OK
@@ -283,11 +283,11 @@ LinkReceptionistScript_Battle:
waitbutton
.Mobile_DidNotSelect:
closetext
- writebyte $0
+ writebyte FALSE
end
.Mobile_OK:
- writebyte $1
+ writebyte TRUE
end
Script_TimeCapsuleClosed:
@@ -342,7 +342,7 @@ LinkReceptionistScript_TimeCapsule:
end
.FriendNotReady:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
writetext Text_FriendNotReady
closetext
end
@@ -354,7 +354,7 @@ LinkReceptionistScript_TimeCapsule:
.DidNotSave:
writetext Text_PleaseComeAgain
.Cancel:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
closetext
end
@@ -374,17 +374,17 @@ LinkReceptionistScript_TimeCapsule:
end
Script_LeftCableTradeCenter:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
scall Script_WalkOutOfLinkTradeRoom
- setscene $0
- setmapscene TRADE_CENTER, $0
+ setscene 0
+ setmapscene TRADE_CENTER, 0
end
Script_LeftMobileTradeRoom:
- special Function101220
+ special Special_Function101220
scall Script_WalkOutOfMobileTradeRoom
- setscene $0
- setmapscene MOBILE_TRADE_ROOM_MOBILE, $0
+ setscene 0
+ setmapscene MOBILE_TRADE_ROOM_MOBILE, 0
end
Script_WalkOutOfMobileTradeRoom:
@@ -394,17 +394,17 @@ Script_WalkOutOfMobileTradeRoom:
end
Script_LeftCableColosseum:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
scall Script_WalkOutOfLinkBattleRoom
- setscene $0
- setmapscene COLOSSEUM, $0
+ setscene 0
+ setmapscene COLOSSEUM, 0
end
Script_LeftMobileBattleRoom:
- special Function101220
+ special Special_Function101220
scall Script_WalkOutOfMobileBattleRoom
- setscene $0
- setmapscene MOBILE_BATTLE_ROOM, $0
+ setscene 0
+ setmapscene MOBILE_BATTLE_ROOM, 0
end
Script_WalkOutOfMobileBattleRoom:
@@ -558,7 +558,7 @@ TimeCapsuleScript_CheckPlayerGender:
end
Script_LeftTimeCapsule:
- special WaitForOtherPlayerToExit
+ special Special_WaitForOtherPlayerToExit
checkflag ENGINE_KRIS_IN_CABLE_CLUB
iftrue .Female
applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight
@@ -579,12 +579,12 @@ Script_LeftTimeCapsule:
applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown
applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2
.Done:
- setscene $0
- setmapscene TIME_CAPSULE, $0
+ setscene 0
+ setmapscene TIME_CAPSULE, 0
end
MapPokecenter2FSignpost0Script:
- refreshscreen $0
+ refreshscreen
special Special_DisplayLinkRecord
closetext
end
diff --git a/maps/PowerPlant.asm b/maps/PowerPlant.asm
index 371ef6c58..f3b02fe44 100644
--- a/maps/PowerPlant.asm
+++ b/maps/PowerPlant.asm
@@ -42,7 +42,7 @@ PowerPlantGuardPhoneScript:
closetext
spriteface PLAYER, DOWN
applymovement POWERPLANT_OFFICER1, MovementData_0x188eda
- setscene $0
+ setscene 0
end
OfficerScript_0x188df5:
@@ -148,8 +148,8 @@ PowerPlantManager:
setevent EVENT_MET_MANAGER_AT_POWER_PLANT
clearevent EVENT_CERULEAN_GYM_ROCKET
clearevent EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM
- setmapscene CERULEAN_GYM, $1
- setscene $1
+ setmapscene CERULEAN_GYM, 1
+ setscene 1
end
UnknownScript_0x188e8d:
diff --git a/maps/RadioTower1F.asm b/maps/RadioTower1F.asm
index febce1a36..05a2a8cb8 100644
--- a/maps/RadioTower1F.asm
+++ b/maps/RadioTower1F.asm
@@ -148,7 +148,7 @@ CooltrainerFScript_0x5cdd5:
waitsfx
writetext UnknownText_0x5d37b
buttonsound
- stringtotext RadioCardText, $1
+ stringtotext RadioCardText, MEM_BUFFER_1
scall UnknownScript_0x5ce3e
writetext UnknownText_0x5d3c0
buttonsound
@@ -249,8 +249,8 @@ UnknownText_0x5cf5a:
done
UnknownText_0x5cf79:
- text $56
- line $56
+ text "<......>"
+ line "<......>"
done
UnknownText_0x5cf7e:
diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm
index 7942063f9..358bf14a7 100644
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -117,7 +117,7 @@ Buena:
if_equal 30, UnknownScript_0x5d87f
playmusic MUSIC_BUENAS_PASSWORD
writetext UnknownText_0x5de35
- special AskRememberPassword
+ special Special_AskRememberPassword
iffalse UnknownScript_0x5d81e
writetext UnknownText_0x5de84
waitbutton
@@ -133,8 +133,8 @@ UnknownScript_0x5d7be:
waitbutton
closetext
spriteface RADIOTOWER2F_BUENA, DOWN
- refreshscreen $0
- special SpecialBuenasPassword
+ refreshscreen
+ special Special_BuenasPassword
closetext
iffalse UnknownScript_0x5d845
opentext
@@ -142,7 +142,7 @@ UnknownScript_0x5d7be:
waitbutton
closetext
checkcode VAR_BLUECARDBALANCE
- addvar $1
+ addvar 1
writevarcode VAR_BLUECARDBALANCE
waitsfx
playsound SFX_TRANSACTION
@@ -157,7 +157,7 @@ UnknownScript_0x5d7be:
pause 20
special RestartMapMusic
checkcode VAR_BLUECARDBALANCE
- if_equal $1e, UnknownScript_0x5d8a4
+ if_equal 30, UnknownScript_0x5d8a4
end
UnknownScript_0x5d800:
@@ -281,8 +281,8 @@ UnknownScript_0x5d8cc:
writetext UnknownText_0x5e2bf
UnknownScript_0x5d8d0:
askforphonenumber PHONE_BUENA
- if_equal $1, UnknownScript_0x5d8f6
- if_equal $2, UnknownScript_0x5d8ed
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x5d8f6
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x5d8ed
writetext UnknownText_0x5e2f3
playsound SFX_REGISTER_PHONE_NUMBER
waitsfx
@@ -316,7 +316,7 @@ ReceptionistScript_0x5d8ff:
iffalse UnknownScript_0x5d90f
writetext UnknownText_0x5e392
buttonsound
- special SpecialBuenaPrize
+ special Special_BuenaPrize
closetext
end
diff --git a/maps/RadioTower3F.asm b/maps/RadioTower3F.asm
index 5a0e360c5..7c2862e80 100644
--- a/maps/RadioTower3F.asm
+++ b/maps/RadioTower3F.asm
@@ -13,7 +13,7 @@ RadioTower3F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .CardKeyShutterCallback
+ callback MAPCALLBACK_TILES, .CardKeyShutterCallback
.CardKeyShutterCallback:
checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
@@ -21,8 +21,8 @@ RadioTower3F_MapScriptHeader:
return
.Change:
- changeblock $e, $2, $2a
- changeblock $e, $4, $1
+ changeblock 14, 2, $2a
+ changeblock 14, 4, $01
return
RadioTower3FSuperNerdScript:
@@ -143,8 +143,8 @@ UnknownScript_0x5e605:
waitbutton
setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
playsound SFX_ENTER_DOOR
- changeblock $e, $2, $2a
- changeblock $e, $4, $1
+ changeblock 14, 2, $2a
+ changeblock 14, 4, $01
reloadmappart
closetext
waitsfx
diff --git a/maps/RadioTower5F.asm b/maps/RadioTower5F.asm
index c73d53de2..615365caf 100644
--- a/maps/RadioTower5F.asm
+++ b/maps/RadioTower5F.asm
@@ -47,7 +47,7 @@ FakeDirectorScript:
buttonsound
verbosegiveitem BASEMENT_KEY
closetext
- setscene $1
+ setscene 1
setevent EVENT_BEAT_ROCKET_EXECUTIVEM_3
end
@@ -96,7 +96,7 @@ RadioTower5FRocketBossScene:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear RADIOTOWER5F_ROCKET
disappear RADIOTOWER5F_ROCKET_GIRL
pause 15
@@ -115,7 +115,7 @@ RadioTower5FRocketBossScene:
clearevent EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
special PlayMapMusic
disappear RADIOTOWER5F_DIRECTOR
- moveobject RADIOTOWER5F_DIRECTOR, $c, $0
+ moveobject RADIOTOWER5F_DIRECTOR, 12, 0
appear RADIOTOWER5F_DIRECTOR
applymovement RADIOTOWER5F_DIRECTOR, RadioTower5FDirectorWalksIn
spriteface PLAYER, RIGHT
@@ -126,8 +126,8 @@ RadioTower5FRocketBossScene:
writetext RadioTower5FDirectorDescribeClearBellText
waitbutton
closetext
- setscene $2
- setmapscene ECRUTEAK_HOUSE, $0
+ setscene 2
+ setmapscene ECRUTEAK_HOUSE, 0
setevent EVENT_GOT_CLEAR_BELL
setevent EVENT_TEAM_ROCKET_DISBANDED
jump .UselessJump
diff --git a/maps/RockTunnel1F.asm b/maps/RockTunnel1F.asm
index 3f2f57f20..6288f23f3 100644
--- a/maps/RockTunnel1F.asm
+++ b/maps/RockTunnel1F.asm
@@ -16,12 +16,10 @@ RockTunnel1FTMSteelWing:
itemball TM_STEEL_WING
RockTunnel1FHiddenXAccuracy:
- dwb EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY, X_ACCURACY
-
+ hiddenitem EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY, X_ACCURACY
RockTunnel1FHiddenXDefend:
- dwb EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND, X_DEFEND
-
+ hiddenitem EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND, X_DEFEND
RockTunnel1F_MapEventHeader:
; filler
diff --git a/maps/RockTunnelB1F.asm b/maps/RockTunnelB1F.asm
index 6d20a92f2..26b465c11 100644
--- a/maps/RockTunnelB1F.asm
+++ b/maps/RockTunnelB1F.asm
@@ -20,8 +20,7 @@ RockTunnelB1FRevive:
itemball REVIVE
RockTunnelB1FHiddenMaxPotion:
- dwb EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION, MAX_POTION
RockTunnelB1F_MapEventHeader:
; filler
diff --git a/maps/Route11.asm b/maps/Route11.asm
index 903cf1009..ecb1003a7 100644
--- a/maps/Route11.asm
+++ b/maps/Route11.asm
@@ -63,8 +63,7 @@ FruitTreeScript_0x68055:
fruittree FRUITTREE_ROUTE_11
Route11HiddenRevive:
- dwb EVENT_ROUTE_11_HIDDEN_REVIVE, REVIVE
-
+ hiddenitem EVENT_ROUTE_11_HIDDEN_REVIVE, REVIVE
YoungsterOwenSeenText:
text "There's no cheat-"
diff --git a/maps/Route12.asm b/maps/Route12.asm
index 240ff0bb5..ac585f51b 100644
--- a/maps/Route12.asm
+++ b/maps/Route12.asm
@@ -70,8 +70,7 @@ Route12Nugget:
itemball NUGGET
Route12HiddenElixer:
- dwb EVENT_ROUTE_12_HIDDEN_ELIXER, ELIXER
-
+ hiddenitem EVENT_ROUTE_12_HIDDEN_ELIXER, ELIXER
FisherMartinSeenText:
text "Patience is the"
diff --git a/maps/Route13.asm b/maps/Route13.asm
index 59107f67f..014bd4c70 100644
--- a/maps/Route13.asm
+++ b/maps/Route13.asm
@@ -77,8 +77,7 @@ Route13DirectionsSign:
jumptext Route13DirectionsSignText
Route13HiddenCalcium:
- dwb EVENT_ROUTE_13_HIDDEN_CALCIUM, CALCIUM
-
+ hiddenitem EVENT_ROUTE_13_HIDDEN_CALCIUM, CALCIUM
PokefanmAlexSeenText:
text "Bow down before my"
diff --git a/maps/Route16.asm b/maps/Route16.asm
index e08bf0a25..8d7141f57 100644
--- a/maps/Route16.asm
+++ b/maps/Route16.asm
@@ -4,13 +4,13 @@ Route16_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .AlwaysOnBike
+ callback MAPCALLBACK_NEWMAP, .AlwaysOnBike
.AlwaysOnBike:
checkcode VAR_YCOORD
- if_less_than $5, .CanWalk
+ if_less_than 5, .CanWalk
checkcode VAR_XCOORD
- if_greater_than $d, .CanWalk
+ if_greater_than 13, .CanWalk
setflag ENGINE_ALWAYS_ON_BIKE
return
diff --git a/maps/Route17.asm b/maps/Route17.asm
index c8be61da2..9ed64340e 100644
--- a/maps/Route17.asm
+++ b/maps/Route17.asm
@@ -10,7 +10,7 @@ Route17_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .AlwaysOnBike
+ callback MAPCALLBACK_NEWMAP, .AlwaysOnBike
.AlwaysOnBike:
setflag ENGINE_ALWAYS_ON_BIKE
@@ -62,12 +62,10 @@ TrainerBikerGlenn:
end
Route17HiddenMaxEther:
- dwb EVENT_ROUTE_17_HIDDEN_MAX_ETHER, MAX_ETHER
-
+ hiddenitem EVENT_ROUTE_17_HIDDEN_MAX_ETHER, MAX_ETHER
Route17HiddenMaxElixer:
- dwb EVENT_ROUTE_17_HIDDEN_MAX_ELIXER, MAX_ELIXER
-
+ hiddenitem EVENT_ROUTE_17_HIDDEN_MAX_ELIXER, MAX_ELIXER
BikerRileySeenText:
text "Hey, you! You're"
@@ -140,8 +138,8 @@ Route17_MapEventHeader:
.Warps:
db 2
- warp_def 17, 82, 1, ROUTE_17_18_GATE
- warp_def 17, 83, 2, ROUTE_17_18_GATE
+ warp_def 17, 82, 1, ROUTE_17_ROUTE_18_GATE
+ warp_def 17, 83, 2, ROUTE_17_ROUTE_18_GATE
.CoordEvents:
db 0
diff --git a/maps/Route1718Gate.asm b/maps/Route17Route18Gate.asm
index 9a8a076dd..6596d3809 100644
--- a/maps/Route1718Gate.asm
+++ b/maps/Route17Route18Gate.asm
@@ -1,7 +1,7 @@
const_value set 2
- const ROUTE1718GATE_OFFICER
+ const ROUTE17ROUTE18GATE_OFFICER
-Route1718Gate_MapScriptHeader:
+Route17Route18Gate_MapScriptHeader:
.SceneScripts:
db 1
scene_script .DummyScene
@@ -12,8 +12,8 @@ Route1718Gate_MapScriptHeader:
.DummyScene:
end
-Route1718GateOfficerScript:
- jumptextfaceplayer Route1718GateOfficerText
+Route17Route18GateOfficerScript:
+ jumptextfaceplayer Route17Route18GateOfficerText
UnknownScript_0x73611:
checkitem BICYCLE
@@ -21,7 +21,7 @@ UnknownScript_0x73611:
end
UnknownScript_0x73617:
- showemote EMOTE_SHOCK, ROUTE1718GATE_OFFICER, 15
+ showemote EMOTE_SHOCK, ROUTE17ROUTE18GATE_OFFICER, 15
spriteface PLAYER, UP
opentext
writetext UnknownText_0x7364d
@@ -35,7 +35,7 @@ MovementData_0x73629:
turn_head LEFT
step_end
-Route1718GateOfficerText:
+Route17Route18GateOfficerText:
text "CYCLING ROAD"
line "Uphill Starts Here"
done
@@ -51,7 +51,7 @@ UnknownText_0x7364d:
line "BICYCLE to go on."
done
-Route1718Gate_MapEventHeader:
+Route17Route18Gate_MapEventHeader:
; filler
db 0, 0
@@ -72,4 +72,4 @@ Route1718Gate_MapEventHeader:
.ObjectEvents:
db 1
- object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route1718GateOfficerScript, -1
+ object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route17Route18GateOfficerScript, -1
diff --git a/maps/Route18.asm b/maps/Route18.asm
index 04a0cc843..0487cc797 100644
--- a/maps/Route18.asm
+++ b/maps/Route18.asm
@@ -83,8 +83,8 @@ Route18_MapEventHeader:
.Warps:
db 2
- warp_def 2, 6, 3, ROUTE_17_18_GATE
- warp_def 2, 7, 4, ROUTE_17_18_GATE
+ warp_def 2, 6, 3, ROUTE_17_ROUTE_18_GATE
+ warp_def 2, 7, 4, ROUTE_17_ROUTE_18_GATE
.CoordEvents:
db 0
diff --git a/maps/Route19.asm b/maps/Route19.asm
index 7681b39c2..5309598b6 100644
--- a/maps/Route19.asm
+++ b/maps/Route19.asm
@@ -12,17 +12,17 @@ Route19_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .ClearRocks
+ callback MAPCALLBACK_TILES, .ClearRocks
.ClearRocks:
checkevent EVENT_CINNABAR_ROCKS_CLEARED
iftrue .Done
- changeblock $6, $6, $7a
- changeblock $8, $6, $7a
- changeblock $a, $6, $7a
- changeblock $c, $8, $7a
- changeblock $4, $8, $7a
- changeblock $a, $a, $7a
+ changeblock 6, 6, $7a
+ changeblock 8, 6, $7a
+ changeblock 10, 6, $7a
+ changeblock 12, 8, $7a
+ changeblock 4, 8, $7a
+ changeblock 10, 10, $7a
.Done:
return
diff --git a/maps/Route2.asm b/maps/Route2.asm
index 47abdc9f5..508758448 100644
--- a/maps/Route2.asm
+++ b/maps/Route2.asm
@@ -70,16 +70,16 @@ FruitTreeScript_0x1ac306:
fruittree FRUITTREE_ROUTE_2
Route2HiddenMaxEther:
- dwb EVENT_ROUTE_2_HIDDEN_MAX_ETHER, MAX_ETHER
+ hiddenitem EVENT_ROUTE_2_HIDDEN_MAX_ETHER, MAX_ETHER
Route2HiddenFullHeal:
- dwb EVENT_ROUTE_2_HIDDEN_FULL_HEAL, FULL_HEAL
+ hiddenitem EVENT_ROUTE_2_HIDDEN_FULL_HEAL, FULL_HEAL
Route2HiddenFullRestore:
- dwb EVENT_ROUTE_2_HIDDEN_FULL_RESTORE, FULL_RESTORE
+ hiddenitem EVENT_ROUTE_2_HIDDEN_FULL_RESTORE, FULL_RESTORE
Route2HiddenRevive:
- dwb EVENT_ROUTE_2_HIDDEN_REVIVE, REVIVE
+ hiddenitem EVENT_ROUTE_2_HIDDEN_REVIVE, REVIVE
BugCatcherRobSeenText:
text "My bug #MON are"
diff --git a/maps/Route20.asm b/maps/Route20.asm
index 7137999fe..67118d5cb 100644
--- a/maps/Route20.asm
+++ b/maps/Route20.asm
@@ -9,7 +9,7 @@ Route20_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .ClearRocks
+ callback MAPCALLBACK_NEWMAP, .ClearRocks
.ClearRocks:
setevent EVENT_CINNABAR_ROCKS_CLEARED
diff --git a/maps/Route23.asm b/maps/Route23.asm
index 87ba72d9c..c82ae6462 100644
--- a/maps/Route23.asm
+++ b/maps/Route23.asm
@@ -4,7 +4,7 @@ Route23_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_INDIGO_PLATEAU
diff --git a/maps/Route24.asm b/maps/Route24.asm
index 07740a467..e598c01a1 100644
--- a/maps/Route24.asm
+++ b/maps/Route24.asm
@@ -29,7 +29,7 @@ RocketScript_0x1adbfa:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear ROUTE24_ROCKET
pause 25
special Special_FadeInQuickly
diff --git a/maps/Route25.asm b/maps/Route25.asm
index ce37fe894..15a2ded4e 100644
--- a/maps/Route25.asm
+++ b/maps/Route25.asm
@@ -48,7 +48,7 @@ UnknownScript_0x19eea0:
applymovement ROUTE25_MISTY, MovementData_0x19f000
disappear ROUTE25_MISTY
clearevent EVENT_TRAINERS_IN_CERULEAN_GYM
- setscene $0
+ setscene 0
special RestartMapMusic
end
@@ -74,7 +74,7 @@ UnknownScript_0x19eee0:
applymovement ROUTE25_MISTY, MovementData_0x19f000
disappear ROUTE25_MISTY
clearevent EVENT_TRAINERS_IN_CERULEAN_GYM
- setscene $0
+ setscene 0
special RestartMapMusic
end
@@ -191,8 +191,7 @@ Route25Protein:
itemball PROTEIN
Route25HiddenPotion:
- dwb EVENT_ROUTE_25_HIDDEN_POTION, POTION
-
+ hiddenitem EVENT_ROUTE_25_HIDDEN_POTION, POTION
MovementData_0x19efe8:
big_step DOWN
diff --git a/maps/Route26.asm b/maps/Route26.asm
index 4af45fe1f..148d5e96c 100644
--- a/maps/Route26.asm
+++ b/maps/Route26.asm
@@ -49,9 +49,9 @@ UnknownScript_0x1a4d62:
scall UnknownScript_0x1a4dc3
UnknownScript_0x1a4d65:
askforphonenumber PHONE_COOLTRAINERM_GAVEN
- if_equal $1, UnknownScript_0x1a4dd3
- if_equal $2, UnknownScript_0x1a4dcf
- trainertotext COOLTRAINERM, GAVEN3, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a4dd3
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a4dcf
+ trainertotext COOLTRAINERM, GAVEN3, MEM_BUFFER_0
scall UnknownScript_0x1a4dc7
jump UnknownScript_0x1a4dcb
@@ -153,9 +153,9 @@ UnknownScript_0x1a4e1e:
scall UnknownScript_0x1a4e7f
UnknownScript_0x1a4e21:
askforphonenumber PHONE_COOLTRAINERF_BETH
- if_equal $1, UnknownScript_0x1a4e8f
- if_equal $2, UnknownScript_0x1a4e8b
- trainertotext COOLTRAINERF, BETH1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a4e8f
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a4e8b
+ trainertotext COOLTRAINERF, BETH1, MEM_BUFFER_0
scall UnknownScript_0x1a4e83
jump UnknownScript_0x1a4e87
diff --git a/maps/Route26HealSpeechHouse.asm b/maps/Route26HealSpeechHouse.asm
index 15f888fb6..e60b83ce4 100644
--- a/maps/Route26HealSpeechHouse.asm
+++ b/maps/Route26HealSpeechHouse.asm
@@ -15,8 +15,8 @@ TeacherScript_0x7b125:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
- special TrainerRankings_Healings
+ special ReloadSpritesNoPalettes
+ special Special_StubbedTrainerRankings_Healings
playmusic MUSIC_HEAL
special HealParty
pause 60
diff --git a/maps/Route27.asm b/maps/Route27.asm
index 3afac9155..a21606768 100644
--- a/maps/Route27.asm
+++ b/maps/Route27.asm
@@ -42,7 +42,7 @@ UnknownScript_0x1a088c:
writetext Route27FisherText
waitbutton
closetext
- setscene $1
+ setscene 1
end
Route27FisherScript:
@@ -84,9 +84,9 @@ UnknownScript_0x1a08e8:
scall UnknownScript_0x1a095b
UnknownScript_0x1a08eb:
askforphonenumber PHONE_BIRDKEEPER_JOSE
- if_equal $1, UnknownScript_0x1a096b
- if_equal $2, UnknownScript_0x1a0967
- trainertotext BIRD_KEEPER, JOSE2, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a096b
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a0967
+ trainertotext BIRD_KEEPER, JOSE2, MEM_BUFFER_0
scall UnknownScript_0x1a095f
jump UnknownScript_0x1a0963
@@ -217,9 +217,9 @@ UnknownScript_0x1a09d2:
scall UnknownScript_0x1a0a33
UnknownScript_0x1a09d5:
askforphonenumber PHONE_COOLTRAINERF_REENA
- if_equal $1, UnknownScript_0x1a0a43
- if_equal $2, UnknownScript_0x1a0a3f
- trainertotext COOLTRAINERF, REENA1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a0a43
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a0a3f
+ trainertotext COOLTRAINERF, REENA1, MEM_BUFFER_0
scall UnknownScript_0x1a0a37
jump UnknownScript_0x1a0a3b
diff --git a/maps/Route27SandstormHouse.asm b/maps/Route27SandstormHouse.asm
index e66f41f4e..a892e22e3 100644
--- a/maps/Route27SandstormHouse.asm
+++ b/maps/Route27SandstormHouse.asm
@@ -13,10 +13,10 @@ SandstormHouseWoman:
opentext
checkevent EVENT_GOT_TM37_SANDSTORM
iftrue .AlreadyGotItem
- special GetFirstPokemonHappiness
+ special Special_GetFirstPokemonHappiness
writetext SandstormHouseWomanText1
buttonsound
- if_greater_than $95, .Loyal
+ if_greater_than 150 - 1, .Loyal
jump .Disloyal
.Loyal:
diff --git a/maps/Route28.asm b/maps/Route28.asm
index 8b76bc407..225039518 100644
--- a/maps/Route28.asm
+++ b/maps/Route28.asm
@@ -9,8 +9,7 @@ Route28Sign:
jumptext Route28SignText
Route28HiddenRareCandy:
- dwb EVENT_ROUTE_28_HIDDEN_RARE_CANDY, RARE_CANDY
-
+ hiddenitem EVENT_ROUTE_28_HIDDEN_RARE_CANDY, RARE_CANDY
Route28SignText:
text "ROUTE 28"
diff --git a/maps/Route29.asm b/maps/Route29.asm
index cd91a1f3e..8cd26f84b 100644
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -16,7 +16,7 @@ Route29_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Tuscany
+ callback MAPCALLBACK_OBJECTS, .Tuscany
.DummyScene0:
end
@@ -59,7 +59,7 @@ Route29Tutorial1:
writetext CatchingTutorialDebriefText
waitbutton
closetext
- setscene $0
+ setscene 0
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
@@ -84,7 +84,7 @@ Route29Tutorial2:
writetext CatchingTutorialDebriefText
waitbutton
closetext
- setscene $0
+ setscene 0
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
@@ -93,7 +93,7 @@ Script_RefusedTutorial1:
waitbutton
closetext
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1b
- setscene $0
+ setscene 0
end
Script_RefusedTutorial2:
@@ -101,14 +101,14 @@ Script_RefusedTutorial2:
waitbutton
closetext
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2b
- setscene $0
+ setscene 0
end
CatchingTutorialDudeScript:
faceplayer
opentext
checkcode VAR_BOXSPACE
- if_equal $0, .BoxFull
+ if_equal 0, .BoxFull
checkevent EVENT_LEARNED_TO_CATCH_POKEMON
iftrue .BoxFull
checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
@@ -324,7 +324,7 @@ Route29FisherText:
line "progress."
done
-; possibly unused
+; unused
Text_WaitingForDay:
text "I'm waiting for"
line "#MON that"
@@ -421,7 +421,7 @@ Route29_MapEventHeader:
.Warps:
db 1
- warp_def 27, 1, 3, ROUTE_29_46_GATE
+ warp_def 27, 1, 3, ROUTE_29_ROUTE_46_GATE
.CoordEvents:
db 2
diff --git a/maps/Route2946Gate.asm b/maps/Route29Route46Gate.asm
index c90aa3150..e3366fae7 100644
--- a/maps/Route2946Gate.asm
+++ b/maps/Route29Route46Gate.asm
@@ -1,21 +1,21 @@
const_value set 2
- const ROUTE2946GATE_OFFICER
- const ROUTE2946GATE_YOUNGSTER
+ const ROUTE29ROUTE46GATE_OFFICER
+ const ROUTE29ROUTE46GATE_YOUNGSTER
-Route2946Gate_MapScriptHeader:
+Route29Route46Gate_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
-Route2946GateOfficerScript:
- jumptextfaceplayer Route2946GateOfficerText
+Route29Route46GateOfficerScript:
+ jumptextfaceplayer Route29Route46GateOfficerText
-Route2946GateYoungsterScript:
- jumptextfaceplayer Route2946GateYoungsterText
+Route29Route46GateYoungsterScript:
+ jumptextfaceplayer Route29Route46GateYoungsterText
-Route2946GateOfficerText:
+Route29Route46GateOfficerText:
text "You can't climb"
line "ledges."
@@ -24,7 +24,7 @@ Route2946GateOfficerText:
cont "take a shortcut."
done
-Route2946GateYoungsterText:
+Route29Route46GateYoungsterText:
text "Different kinds of"
line "#MON appear"
cont "past here."
@@ -36,7 +36,7 @@ Route2946GateYoungsterText:
line "everywhere."
done
-Route2946Gate_MapEventHeader:
+Route29Route46Gate_MapEventHeader:
; filler
db 0, 0
@@ -55,5 +55,5 @@ Route2946Gate_MapEventHeader:
.ObjectEvents:
db 2
- object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route2946GateOfficerScript, -1
- object_event 6, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route2946GateYoungsterScript, -1
+ object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route29Route46GateOfficerScript, -1
+ object_event 6, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29Route46GateYoungsterScript, -1
diff --git a/maps/Route30.asm b/maps/Route30.asm
index 74db65a31..4884beeee 100644
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -61,9 +61,9 @@ TrainerYoungsterJoey:
scall .AskNumber2
.RequestNumber:
askforphonenumber PHONE_YOUNGSTER_JOEY
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext YOUNGSTER, JOEY1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext YOUNGSTER, JOEY1, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
@@ -248,8 +248,7 @@ Route30FruitTree2:
fruittree FRUITTREE_ROUTE_30_2
Route30HiddenPotion:
- dwb EVENT_ROUTE_30_HIDDEN_POTION, POTION
-
+ hiddenitem EVENT_ROUTE_30_HIDDEN_POTION, POTION
Route30_JoeysRattataAttacksMovement:
fix_facing
diff --git a/maps/Route31.asm b/maps/Route31.asm
index e5498917f..15a76a3cf 100644
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -13,7 +13,7 @@ Route31_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .CheckMomCall
+ callback MAPCALLBACK_NEWMAP, .CheckMomCall
.CheckMomCall:
checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
@@ -49,9 +49,9 @@ TrainerBugCatcherWade1:
scall .AskAgainSTD
.Continue:
askforphonenumber PHONE_BUG_CATCHER_WADE
- if_equal $1, .PhoneFullSTD
- if_equal $2, .DeclinedNumberSTD
- trainertotext BUG_CATCHER, WADE1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFullSTD
+ if_equal PHONE_CONTACT_REFUSED, .DeclinedNumberSTD
+ trainertotext BUG_CATCHER, WADE1, MEM_BUFFER_0
scall .RegisterNumberSTD
jump .AcceptedNumberSTD
@@ -198,10 +198,11 @@ Route31MailRecipientScript:
writetext Text_Route31SleepyManGotMail
buttonsound
checkpokeitem ReceivedSpearowMailText
- if_equal $0, .WrongMail
- if_equal $2, .Refused
- if_equal $3, .NoMail
- if_equal $4, .LastMon
+ if_equal POKEMAIL_WRONG_MAIL, .WrongMail
+ if_equal POKEMAIL_REFUSED, .Refused
+ if_equal POKEMAIL_NO_MAIL, .NoMail
+ if_equal POKEMAIL_LAST_MON, .LastMon
+ ; POKEMAIL_CORRECT
writetext Text_Route31HandOverMailMon
buttonsound
writetext Text_Route31ReadingMail
diff --git a/maps/Route32.asm b/maps/Route32.asm
index 659ea40db..369dac494 100644
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -23,7 +23,7 @@ Route32_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Frieda
+ callback MAPCALLBACK_OBJECTS, .Frieda
.DummyScene0:
end
@@ -59,7 +59,7 @@ Route32CooltrainerMContinueScene:
closetext
end
-.Unused:
+.Unreferenced:
writetext Route32CooltrainerMText_UnusedSproutTower
waitbutton
closetext
@@ -127,7 +127,7 @@ Route32WannaBuyASlowpokeTailScript:
SlowpokeTailSalesmanScript:
faceplayer
_OfferToSellSlowpokeTail:
- setscene $2
+ setscene 2
opentext
writetext Text_MillionDollarSlowpokeTail
yesorno
@@ -190,9 +190,9 @@ TrainerFisherRalph1:
scall .AskNumber2
.AskForNumber:
askforphonenumber PHONE_FISHER_RALPH
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext FISHER, RALPH1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext FISHER, RALPH1, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
@@ -324,9 +324,9 @@ TrainerPicnickerLiz1:
scall .AskNumber2
.AskForNumber:
askforphonenumber PHONE_PICNICKER_LIZ
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext PICNICKER, LIZ1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext PICNICKER, LIZ1, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
@@ -506,12 +506,10 @@ Route32PokecenterSign:
jumpstd pokecentersign
Route32HiddenGreatBall:
- dwb EVENT_ROUTE_32_HIDDEN_GREAT_BALL, GREAT_BALL
-
+ hiddenitem EVENT_ROUTE_32_HIDDEN_GREAT_BALL, GREAT_BALL
Route32HiddenSuperPotion:
- dwb EVENT_ROUTE_32_HIDDEN_SUPER_POTION, SUPER_POTION
-
+ hiddenitem EVENT_ROUTE_32_HIDDEN_SUPER_POTION, SUPER_POTION
Movement_Route32CooltrainerMPushesYouBackToViolet:
step UP
@@ -839,7 +837,7 @@ BirdKeeperPeterAfterText:
cont "in VIOLET CITY."
done
-; possibly unused
+; unused
Route32UnusedText:
text "The fishermen"
line "yelled at me for"
diff --git a/maps/Route33.asm b/maps/Route33.asm
index fbc7b3190..5ab8610d7 100644
--- a/maps/Route33.asm
+++ b/maps/Route33.asm
@@ -38,9 +38,9 @@ TrainerHikerAnthony:
scall .AskNumber2
.AskForPhoneNumber:
askforphonenumber PHONE_HIKER_ANTHONY
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext HIKER, ANTHONY2, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext HIKER, ANTHONY2, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
diff --git a/maps/Route34.asm b/maps/Route34.asm
index 144973036..04ea74ab7 100644
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -19,7 +19,7 @@ Route34_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
+ callback MAPCALLBACK_OBJECTS, .EggCheckCallback
.EggCheckCallback:
checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
@@ -59,7 +59,7 @@ DayCareManScript_Outside:
special Special_DayCareManOutside
waitbutton
closetext
- if_equal $1, .end_fail
+ if_equal TRUE, .end_fail
clearflag ENGINE_DAY_CARE_MAN_HAS_EGG
checkcode VAR_FACING
if_equal RIGHT, .walk_around_player
@@ -112,9 +112,9 @@ TrainerCamperTodd1:
scall .AskNumber2
.FinishAsk:
askforphonenumber PHONE_CAMPER_TODD
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext CAMPER, TODD1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext CAMPER, TODD1, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
@@ -237,9 +237,9 @@ TrainerPicnickerGina1:
scall .AskNumber2
.FinishAsk:
askforphonenumber PHONE_PICNICKER_GINA
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext PICNICKER, GINA1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext PICNICKER, GINA1, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
@@ -488,12 +488,10 @@ Route34Nugget:
itemball NUGGET
Route34HiddenRareCandy:
- dwb EVENT_ROUTE_34_HIDDEN_RARE_CANDY, RARE_CANDY
-
+ hiddenitem EVENT_ROUTE_34_HIDDEN_RARE_CANDY, RARE_CANDY
Route34HiddenSuperPotion:
- dwb EVENT_ROUTE_34_HIDDEN_SUPER_POTION, SUPER_POTION
-
+ hiddenitem EVENT_ROUTE_34_HIDDEN_SUPER_POTION, SUPER_POTION
Route34MovementData_DayCareManWalksBackInside:
slow_step LEFT
diff --git a/maps/Route34IlexForestGate.asm b/maps/Route34IlexForestGate.asm
index 18b010bff..db9f31f39 100644
--- a/maps/Route34IlexForestGate.asm
+++ b/maps/Route34IlexForestGate.asm
@@ -10,7 +10,7 @@ Route34IlexForestGate_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .IsForestRestless
+ callback MAPCALLBACK_OBJECTS, .IsForestRestless
.IsForestRestless:
checkevent EVENT_FOREST_IS_RESTLESS
diff --git a/maps/Route35.asm b/maps/Route35.asm
index becb45ad0..a8a8bfe46 100644
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -50,9 +50,9 @@ UnknownScript_0x19c8ec:
scall UnknownScript_0x19c907
UnknownScript_0x19c8ef:
askforphonenumber PHONE_JUGGLER_IRWIN
- if_equal $1, UnknownScript_0x19c917
- if_equal $2, UnknownScript_0x19c913
- trainertotext JUGGLER, IRWIN1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19c917
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19c913
+ trainertotext JUGGLER, IRWIN1, MEM_BUFFER_0
scall UnknownScript_0x19c90b
jump UnknownScript_0x19c90f
@@ -153,9 +153,9 @@ UnknownScript_0x19c9a4:
scall UnknownScript_0x19c907
UnknownScript_0x19c9a7:
askforphonenumber PHONE_BUG_CATCHER_ARNIE
- if_equal $1, UnknownScript_0x19c917
- if_equal $2, UnknownScript_0x19c913
- trainertotext BUG_CATCHER, ARNIE1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19c917
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19c913
+ trainertotext BUG_CATCHER, ARNIE1, MEM_BUFFER_0
scall UnknownScript_0x19c90b
jump UnknownScript_0x19c90f
diff --git a/maps/Route35NationalParkGate.asm b/maps/Route35NationalParkGate.asm
index cf68bbcc2..c5d9b6c34 100644
--- a/maps/Route35NationalParkGate.asm
+++ b/maps/Route35NationalParkGate.asm
@@ -12,8 +12,8 @@ Route35NationalParkGate_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
- dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
+ callback MAPCALLBACK_NEWMAP, .CheckIfContestRunning
+ callback MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
.DummyScene0:
end
@@ -28,11 +28,11 @@ Route35NationalParkGate_MapScriptHeader:
.CheckIfContestRunning:
checkflag ENGINE_BUG_CONTEST_TIMER
iftrue .BugContestIsRunning
- setscene $0
+ setscene 0
return
.BugContestIsRunning:
- setscene $2
+ setscene 2
return
.CheckIfContestAvailable:
@@ -58,8 +58,8 @@ Route35NationalParkGate_MapScriptHeader:
spriteface ROUTE35NATIONALPARKGATE_OFFICER1, RIGHT
opentext
checkcode VAR_CONTESTMINUTES
- addvar $1
- RAM2MEM $0
+ addvar 1
+ vartomem MEM_BUFFER_0
writetext UnknownText_0x6a79a
yesorno
iffalse .GoBackToContest
@@ -74,9 +74,9 @@ Route35NationalParkGate_MapScriptHeader:
closetext
scall Route35NationalParkGate_EnterContest
playsound SFX_ENTER_DOOR
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
- warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
+ warpfacing UP, NATIONAL_PARK_BUG_CONTEST, 10, 47
end
OfficerScript_0x6a204:
@@ -94,8 +94,8 @@ OfficerScript_0x6a204:
yesorno
iffalse Route35NationalParkGate_DeclinedToParticipate
checkcode VAR_PARTYCOUNT
- if_greater_than $1, Route35NationalParkGate_LeaveTheRestBehind
- special ContestDropOffMons
+ if_greater_than 1, Route35NationalParkGate_LeaveTheRestBehind
+ special Special_ContestDropOffMons
clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
Route35NationalParkGate_OkayToProceed:
setflag ENGINE_BUG_CONTEST_TIMER
@@ -111,10 +111,10 @@ Route35NationalParkGate_OkayToProceed:
special Special_GiveParkBalls
scall Route35NationalParkGate_EnterContest
playsound SFX_ENTER_DOOR
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
special Special_SelectRandomBugContestContestants
- warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
+ warpfacing UP, NATIONAL_PARK_BUG_CONTEST, 10, 47
end
Route35NationalParkGate_EnterContest:
@@ -129,17 +129,17 @@ Route35NationalParkGate_FacingLeft:
Route35NationalParkGate_LeaveTheRestBehind:
checkcode VAR_PARTYCOUNT
- if_less_than 6, Route35NationalParkGate_LessThanFullParty
+ if_less_than PARTY_LENGTH, Route35NationalParkGate_LessThanFullParty
checkcode VAR_BOXSPACE
if_equal 0, Route35NationalParkGate_NoRoomInBox
Route35NationalParkGate_LessThanFullParty: ; 6a27d
- special CheckFirstMonIsEgg
- if_equal $1, Route35NationalParkGate_FirstMonIsEgg
+ special Special_CheckFirstMonIsEgg
+ if_equal TRUE, Route35NationalParkGate_FirstMonIsEgg
writetext UnknownText_0x6a4c6
yesorno
iffalse Route35NationalParkGate_DeclinedToLeaveMonsBehind
- special ContestDropOffMons
+ special Special_ContestDropOffMons
iftrue Route35NationalParkGate_FirstMonIsFainted
setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
writetext UnknownText_0x6a537
diff --git a/maps/Route36.asm b/maps/Route36.asm
index 4076725b4..bc94bf2b2 100644
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -17,7 +17,7 @@ Route36_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .ArthurCallback
+ callback MAPCALLBACK_OBJECTS, .ArthurCallback
.DummyScene0:
end
@@ -44,9 +44,9 @@ Route36SuicuneScript:
disappear ROUTE36_SUICUNE
spriteface PLAYER, DOWN
pause 10
- setscene $0
+ setscene 0
clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
- setmapscene CIANWOOD_CITY, $1
+ setmapscene CIANWOOD_CITY, 1
end
SudowoodoScript:
@@ -94,8 +94,8 @@ DidntCatchSudowoodo:
applymovement ROUTE36_WEIRD_TREE, WeirdTreeMovement_Flee
disappear ROUTE36_WEIRD_TREE
variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN
- special MapCallbackSprites_LoadUsedSpritesGFX
- special RefreshSprites
+ special Special_LoadUsedSpritesGFX
+ special Special_RefreshSprites
end
Route36FloriaScript:
@@ -191,9 +191,9 @@ TrainerSchoolboyAlan1:
scall .AskNumber2
.ContinueAskForPhoneNumber:
askforphonenumber PHONE_SCHOOLBOY_ALAN
- if_equal $1, .PhoneFull
- if_equal $2, .NumberDeclined
- trainertotext SCHOOLBOY, ALAN1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .NumberDeclined
+ trainertotext SCHOOLBOY, ALAN1, MEM_BUFFER_0
scall .RegisteredNumber
jump .NumberAccepted
diff --git a/maps/Route36NationalParkGate.asm b/maps/Route36NationalParkGate.asm
index 88d7abb14..24854b9e3 100644
--- a/maps/Route36NationalParkGate.asm
+++ b/maps/Route36NationalParkGate.asm
@@ -21,8 +21,8 @@ Route36NationalParkGate_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
- dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
+ callback MAPCALLBACK_NEWMAP, .CheckIfContestRunning
+ callback MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
.DummyScene0:
end
@@ -37,11 +37,11 @@ Route36NationalParkGate_MapScriptHeader:
.CheckIfContestRunning:
checkflag ENGINE_BUG_CONTEST_TIMER
iftrue .BugContestIsRunning
- setscene $0
+ setscene 0
return
.BugContestIsRunning:
- setscene $2
+ setscene 2
return
.CheckIfContestAvailable:
@@ -67,8 +67,8 @@ Route36NationalParkGate_MapScriptHeader:
spriteface PLAYER, UP
opentext
checkcode VAR_CONTESTMINUTES
- addvar $1
- RAM2MEM $0
+ addvar 1
+ vartomem MEM_BUFFER_0
writetext UnknownText_0x6b284
yesorno
iffalse .GoBackToContest
@@ -76,7 +76,7 @@ Route36NationalParkGate_MapScriptHeader:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
scall .CopyContestants
disappear ROUTE36NATIONALPARKGATE_OFFICER1
appear ROUTE36NATIONALPARKGATE_OFFICER2
@@ -91,9 +91,9 @@ Route36NationalParkGate_MapScriptHeader:
closetext
spriteface PLAYER, LEFT
playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
- warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
+ warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, 33, 18
end
.CopyContestants:
@@ -155,8 +155,8 @@ Route36OfficerScriptContest:
yesorno
iffalse .DecidedNotToJoinContest
checkcode VAR_PARTYCOUNT
- if_greater_than $1, .LeaveMonsWithOfficer
- special ContestDropOffMons
+ if_greater_than 1, .LeaveMonsWithOfficer
+ special Special_ContestDropOffMons
clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
.ResumeStartingContest:
setflag ENGINE_BUG_CONTEST_TIMER
@@ -174,24 +174,24 @@ Route36OfficerScriptContest:
special Special_GiveParkBalls
spriteface PLAYER, LEFT
playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
special Special_SelectRandomBugContestContestants
- warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
+ warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, 33, 18
end
.LeaveMonsWithOfficer:
checkcode VAR_PARTYCOUNT
- if_less_than $6, .ContinueLeavingMons
+ if_less_than PARTY_LENGTH, .ContinueLeavingMons
checkcode VAR_BOXSPACE
- if_equal $0, .BoxFull
+ if_equal 0, .BoxFull
.ContinueLeavingMons:
- special CheckFirstMonIsEgg
- if_equal $1, .FirstMonIsEgg
+ special Special_CheckFirstMonIsEgg
+ if_equal TRUE, .FirstMonIsEgg
writetext UnknownText_0x6afb0
yesorno
iffalse .RefusedToLeaveMons
- special ContestDropOffMons
+ special Special_ContestDropOffMons
iftrue .FirstMonIsFainted
setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
writetext UnknownText_0x6b021
@@ -799,7 +799,6 @@ UnknownText_0x6b7af:
; This text is unused and unreferenced in the final game.
; The tree Pokémon is Sudowoodo.
; The Silph Scope 2 was later reworked into the Squirtbottle.
-
UnusedSudowoodoText:
text "I hear there's a"
line "#MON that looks"
diff --git a/maps/Route37.asm b/maps/Route37.asm
index 190656869..233a299b9 100644
--- a/maps/Route37.asm
+++ b/maps/Route37.asm
@@ -13,7 +13,7 @@ Route37_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Sunny
+ callback MAPCALLBACK_OBJECTS, .Sunny
.Sunny:
checkcode VAR_WEEKDAY
@@ -114,8 +114,7 @@ FruitTreeScript_0x1a8e0d:
fruittree FRUITTREE_ROUTE_37_3
Route37HiddenEther:
- dwb EVENT_ROUTE_37_HIDDEN_ETHER, ETHER
-
+ hiddenitem EVENT_ROUTE_37_HIDDEN_ETHER, ETHER
TwinsAnnandanne1SeenText:
text "ANN: ANNE and I"
diff --git a/maps/Route38.asm b/maps/Route38.asm
index 526bf3e36..c91ad06c1 100644
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -61,9 +61,9 @@ TrainerLassDana1:
scall .AskNumber2F
.AskForPhoneNumber:
askforphonenumber PHONE_LASS_DANA
- if_equal $1, .PhoneFull
- if_equal $2, .DeclinedPhoneNumber
- trainertotext LASS, DANA1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .DeclinedPhoneNumber
+ trainertotext LASS, DANA1, MEM_BUFFER_0
scall .RegisteredPhoneNumber
jump .NumberAccepted
@@ -197,9 +197,9 @@ TrainerSchoolboyChad1:
scall .AskPhoneNumber2
.AskToRegisterNumber:
askforphonenumber PHONE_SCHOOLBOY_CHAD
- if_equal $1, .PhoneFull
- if_equal $2, .SaidNo
- trainertotext SCHOOLBOY, CHAD1, $0
+ if_equal PHONE_CONTACTS_FULL, .PhoneFull
+ if_equal PHONE_CONTACT_REFUSED, .SaidNo
+ trainertotext SCHOOLBOY, CHAD1, MEM_BUFFER_0
scall .RegisteredChad
jump .HaveChadsNumber
diff --git a/maps/Route39.asm b/maps/Route39.asm
index 6545dd77d..6038df139 100644
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -50,9 +50,9 @@ PokefanMDerekWantsYourNumber:
scall PokefanMDerekAsksNumber2
PokefanMDerekAsksForPhoneNumber:
askforphonenumber PHONE_POKEFANM_DEREK
- if_equal $1, PokefanMDerekPhoneFull
- if_equal $2, PokefanMDerekDeclined
- trainertotext POKEFANM, DEREK1, $0
+ if_equal PHONE_CONTACTS_FULL, PokefanMDerekPhoneFull
+ if_equal PHONE_CONTACT_REFUSED, PokefanMDerekDeclined
+ trainertotext POKEFANM, DEREK1, MEM_BUFFER_0
scall PokefanMDerekRegistered
jump PokefanMDerekAccepted
@@ -180,8 +180,7 @@ FruitTreeScript_0x1a5bf4:
fruittree FRUITTREE_ROUTE_39
Route39HiddenNugget:
- dwb EVENT_ROUTE_39_HIDDEN_NUGGET, NUGGET
-
+ hiddenitem EVENT_ROUTE_39_HIDDEN_NUGGET, NUGGET
Route39MiltankText:
text "MILTANK: Mooo!"
diff --git a/maps/Route39Barn.asm b/maps/Route39Barn.asm
index a7cfe5405..6234a9cf4 100644
--- a/maps/Route39Barn.asm
+++ b/maps/Route39Barn.asm
@@ -52,7 +52,7 @@ MooMoo:
iftrue .HappyCow
writetext Text_WeakMoo
writebyte MILTANK
- special PlaySlowCry
+ special Special_PlaySlowCry
buttonsound
writetext Text_ItsCryIsWeak
checkevent EVENT_TALKED_TO_FARMER_ABOUT_MOOMOO
diff --git a/maps/Route39Farmhouse.asm b/maps/Route39Farmhouse.asm
index 77531a70d..15f8c2a6d 100644
--- a/maps/Route39Farmhouse.asm
+++ b/maps/Route39Farmhouse.asm
@@ -24,15 +24,15 @@ FarmerMScript_SellMilk:
checkitem MOOMOO_MILK
iftrue FarmerMScript_Milking
writetext FarmerMText_BuyMilk
- special PlaceMoneyTopRight
+ special Special_PlaceMoneyTopRight
yesorno
iffalse FarmerMScript_NoSale
- checkmoney $0, 500
- if_equal $2, FarmerMScript_NoMoney
+ checkmoney YOUR_MONEY, 500
+ if_equal HAVE_LESS, FarmerMScript_NoMoney
giveitem MOOMOO_MILK
iffalse FarmerMScript_NoRoom
- takemoney $0, 500
- special PlaceMoneyTopRight
+ takemoney YOUR_MONEY, 500
+ special Special_PlaceMoneyTopRight
waitsfx
playsound SFX_TRANSACTION
writetext FarmerMText_GotMilk
diff --git a/maps/Route4.asm b/maps/Route4.asm
index bd6ea62e5..c28394c0f 100644
--- a/maps/Route4.asm
+++ b/maps/Route4.asm
@@ -51,8 +51,7 @@ Route4HPUp:
itemball HP_UP
Route4HiddenUltraBall:
- dwb EVENT_ROUTE_4_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+ hiddenitem EVENT_ROUTE_4_HIDDEN_ULTRA_BALL, ULTRA_BALL
BirdKeeperHankSeenText:
text "I'm raising my"
diff --git a/maps/Route40.asm b/maps/Route40.asm
index 73f089bd2..28461eac8 100644
--- a/maps/Route40.asm
+++ b/maps/Route40.asm
@@ -18,7 +18,7 @@ Route40_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .MonicaCallback
+ callback MAPCALLBACK_OBJECTS, .MonicaCallback
.MonicaCallback:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
@@ -79,7 +79,7 @@ Route40Lass1Script:
jumptextfaceplayer Route40Lass1Text
PokefanMScript_0x1a61c7:
- special Mobile_DummyReturnFalse
+ special Special_Mobile_DummyReturnFalse
iftrue .mobile
jumptextfaceplayer UnknownText_0x1a646a
@@ -135,7 +135,7 @@ Route40Rock:
jumpstd smashrock
Route40HiddenHyperPotion:
- dwb EVENT_ROUTE_40_HIDDEN_HYPER_POTION, HYPER_POTION
+ hiddenitem EVENT_ROUTE_40_HIDDEN_HYPER_POTION, HYPER_POTION
MovementData_0x1a621c:
step RIGHT
diff --git a/maps/Route40BattleTowerGate.asm b/maps/Route40BattleTowerGate.asm
index f37b78669..9562c3ae4 100644
--- a/maps/Route40BattleTowerGate.asm
+++ b/maps/Route40BattleTowerGate.asm
@@ -8,7 +8,7 @@ Route40BattleTowerGate_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .ShowSailor
+ callback MAPCALLBACK_OBJECTS, .ShowSailor
.ShowSailor:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
diff --git a/maps/Route41.asm b/maps/Route41.asm
index 95618e692..29eb35e04 100644
--- a/maps/Route41.asm
+++ b/maps/Route41.asm
@@ -132,7 +132,7 @@ Route41Rock:
jumpstd smashrock
Route41HiddenMaxEther:
- dwb EVENT_ROUTE_41_HIDDEN_MAX_ETHER, MAX_ETHER
+ hiddenitem EVENT_ROUTE_41_HIDDEN_MAX_ETHER, MAX_ETHER
SwimmermCharlieSeenText:
text "The water's warm"
diff --git a/maps/Route42.asm b/maps/Route42.asm
index ccf174b17..46606e647 100644
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -31,9 +31,9 @@ Route42SuicuneScript:
applymovement ROUTE42_SUICUNE, MovementData_0x1a9356
disappear ROUTE42_SUICUNE
pause 10
- setscene $0
+ setscene 0
clearevent EVENT_SAW_SUICUNE_ON_ROUTE_36
- setmapscene ROUTE_36, $1
+ setmapscene ROUTE_36, 1
end
TrainerFisherTully1:
@@ -61,9 +61,9 @@ UnknownScript_0x1a9268:
scall UnknownScript_0x1a92f5
UnknownScript_0x1a926b:
askforphonenumber PHONE_FISHER_TULLY
- if_equal $1, UnknownScript_0x1a9305
- if_equal $2, UnknownScript_0x1a9301
- trainertotext FISHER, TULLY1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a9305
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a9301
+ trainertotext FISHER, TULLY1, MEM_BUFFER_0
scall UnknownScript_0x1a92f9
jump UnknownScript_0x1a92fd
@@ -212,18 +212,17 @@ FruitTreeScript_0x1a9351:
fruittree FRUITTREE_ROUTE_42_3
Route42HiddenMaxPotion:
- dwb EVENT_ROUTE_42_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_ROUTE_42_HIDDEN_MAX_POTION, MAX_POTION
MovementData_0x1a9356:
- db $39 ; movement
+ set_sliding
fast_jump_step UP
fast_jump_step UP
fast_jump_step UP
fast_jump_step RIGHT
fast_jump_step RIGHT
fast_jump_step RIGHT
- db $38 ; movement
+ remove_sliding
step_end
FisherTully1SeenText:
diff --git a/maps/Route43.asm b/maps/Route43.asm
index b76ebaead..afad4a606 100644
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -14,16 +14,16 @@ Route43_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .CheckIfRockets
+ callback MAPCALLBACK_NEWMAP, .CheckIfRockets
.CheckIfRockets:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
iftrue .NoRockets
- setmapscene ROUTE_43_GATE, $0
+ setmapscene ROUTE_43_GATE, 0
return
.NoRockets:
- setmapscene ROUTE_43_GATE, $1
+ setmapscene ROUTE_43_GATE, 1
return
TrainerCamperSpencer:
@@ -71,9 +71,9 @@ UnknownScript_0x19d0b8:
scall UnknownScript_0x19d130
UnknownScript_0x19d0bb:
askforphonenumber PHONE_POKEMANIAC_BRENT
- if_equal $1, UnknownScript_0x19d140
- if_equal $2, UnknownScript_0x19d13c
- trainertotext POKEMANIAC, BRENT1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d140
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d13c
+ trainertotext POKEMANIAC, BRENT1, MEM_BUFFER_0
scall UnknownScript_0x19d134
jump UnknownScript_0x19d138
@@ -202,9 +202,9 @@ UnknownScript_0x19d1aa:
scall UnknownScript_0x19d23d
UnknownScript_0x19d1ad:
askforphonenumber PHONE_PICNICKER_TIFFANY
- if_equal $1, UnknownScript_0x19d24d
- if_equal $2, UnknownScript_0x19d249
- trainertotext PICNICKER, TIFFANY3, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d24d
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d249
+ trainertotext PICNICKER, TIFFANY3, MEM_BUFFER_0
scall UnknownScript_0x19d241
jump UnknownScript_0x19d245
diff --git a/maps/Route43Gate.asm b/maps/Route43Gate.asm
index 58bb163ef..7548394a5 100644
--- a/maps/Route43Gate.asm
+++ b/maps/Route43Gate.asm
@@ -13,7 +13,7 @@ Route43Gate_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .CheckIfRockets
+ callback MAPCALLBACK_NEWMAP, .CheckIfRockets
.RocketShakedown:
priorityjump .RocketTakeover
@@ -25,11 +25,11 @@ Route43Gate_MapScriptHeader:
.CheckIfRockets:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
iftrue .NoRockets
- setmapscene ROUTE_43, $0
+ setmapscene ROUTE_43, 0
return
.NoRockets:
- setmapscene ROUTE_43, $1
+ setmapscene ROUTE_43, 1
return
.RocketTakeover:
@@ -37,7 +37,7 @@ Route43Gate_MapScriptHeader:
checkcode VAR_FACING
if_equal DOWN, RocketScript_Southbound
if_equal UP, RocketScript_Northbound
- setscene $1
+ setscene 1
end
RocketScript_Southbound:
@@ -50,17 +50,17 @@ RocketScript_Southbound:
opentext
writetext RocketText_TollFee
buttonsound
- checkmoney $0, ROUTE43GATE_TOLL - 1
- if_equal $0, RocketScript_TollSouth
+ checkmoney YOUR_MONEY, ROUTE43GATE_TOLL - 1
+ if_equal HAVE_MORE, RocketScript_TollSouth
jump RocketScript_YoureBrokeSouth
RocketScript_TollSouth:
- takemoney $0, ROUTE43GATE_TOLL
+ takemoney YOUR_MONEY, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownSouth
RocketScript_YoureBrokeSouth:
- takemoney $0, ROUTE43GATE_TOLL
+ takemoney YOUR_MONEY, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownSouth
@@ -69,7 +69,7 @@ RocketScript_ShakeDownSouth:
closetext
applymovement ROUTE43GATE_ROCKET1, Rocket1Script_LetsYouPassSouth
applymovement ROUTE43GATE_ROCKET2, Rocket2Script_LetsYouPassSouth
- setscene $1
+ setscene 1
special RestartMapMusic
end
@@ -82,17 +82,17 @@ RocketScript_Northbound:
opentext
writetext RocketText_TollFee
buttonsound
- checkmoney $0, ROUTE43GATE_TOLL - 1
- if_equal $0, RocketScript_TollNorth
+ checkmoney YOUR_MONEY, ROUTE43GATE_TOLL - 1
+ if_equal HAVE_MORE, RocketScript_TollNorth
jump RocketScript_YoureBrokeNorth
RocketScript_TollNorth:
- takemoney $0, ROUTE43GATE_TOLL
+ takemoney YOUR_MONEY, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownNorth
RocketScript_YoureBrokeNorth:
- takemoney $0, ROUTE43GATE_TOLL
+ takemoney YOUR_MONEY, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownNorth
@@ -101,7 +101,7 @@ RocketScript_ShakeDownNorth:
closetext
applymovement ROUTE43GATE_ROCKET2, Rocket2Script_LetsYouPassNorth
applymovement ROUTE43GATE_ROCKET1, Rocket1Script_LetsYouPassNorth
- setscene $1
+ setscene 1
special RestartMapMusic
end
diff --git a/maps/Route44.asm b/maps/Route44.asm
index 4f9261a59..31fe9223f 100644
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -41,9 +41,9 @@ UnknownScript_0x19d853:
scall UnknownScript_0x19d8e3
UnknownScript_0x19d856:
askforphonenumber PHONE_BIRDKEEPER_VANCE
- if_equal $1, UnknownScript_0x19d8f3
- if_equal $2, UnknownScript_0x19d8ef
- trainertotext BIRD_KEEPER, VANCE1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d8f3
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d8ef
+ trainertotext BIRD_KEEPER, VANCE1, MEM_BUFFER_0
scall UnknownScript_0x19d8e7
jump UnknownScript_0x19d8eb
@@ -185,9 +185,9 @@ UnknownScript_0x19d957:
scall UnknownScript_0x19d8e3
UnknownScript_0x19d95a:
askforphonenumber PHONE_FISHER_WILTON
- if_equal $1, UnknownScript_0x19d8f3
- if_equal $2, UnknownScript_0x19d8ef
- trainertotext FISHER, WILTON1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19d8f3
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19d8ef
+ trainertotext FISHER, WILTON1, MEM_BUFFER_0
scall UnknownScript_0x19d8e7
jump UnknownScript_0x19d8eb
@@ -318,8 +318,7 @@ Route44MaxRepel:
itemball MAX_REPEL
Route44HiddenElixer:
- dwb EVENT_ROUTE_44_HIDDEN_ELIXER, ELIXER
-
+ hiddenitem EVENT_ROUTE_44_HIDDEN_ELIXER, ELIXER
FisherWilton1SeenText:
text "Aack! You made me"
diff --git a/maps/Route45.asm b/maps/Route45.asm
index 38b7f77f2..63db10a95 100644
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -42,15 +42,15 @@ UnknownScript_0x19e0cd:
scall UnknownScript_0x19e11f
UnknownScript_0x19e0d0:
askforphonenumber PHONE_BLACKBELT_KENJI
- if_equal $1, UnknownScript_0x19e12f
- if_equal $2, UnknownScript_0x19e12b
- trainertotext BLACKBELT_T, KENJI3, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19e12f
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19e12b
+ trainertotext BLACKBELT_T, KENJI3, MEM_BUFFER_0
scall UnknownScript_0x19e123
jump UnknownScript_0x19e127
UnknownScript_0x19e0e4:
checkcode VAR_KENJI_BREAK
- if_not_equal $1, UnknownScript_0x19e127
+ if_not_equal 1, UnknownScript_0x19e127
checkmorn
iftrue UnknownScript_0x19e10c
checknite
@@ -169,9 +169,9 @@ UnknownScript_0x19e1a1:
scall UnknownScript_0x19e11f
UnknownScript_0x19e1a4:
askforphonenumber PHONE_HIKER_PARRY
- if_equal $1, UnknownScript_0x19e12f
- if_equal $2, UnknownScript_0x19e12b
- trainertotext HIKER, PARRY1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x19e12f
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x19e12b
+ trainertotext HIKER, PARRY1, MEM_BUFFER_0
scall UnknownScript_0x19e123
jump UnknownScript_0x19e127
@@ -312,8 +312,7 @@ Route45MaxPotion:
itemball MAX_POTION
Route45HiddenPpUp:
- dwb EVENT_ROUTE_45_HIDDEN_PP_UP, PP_UP
-
+ hiddenitem EVENT_ROUTE_45_HIDDEN_PP_UP, PP_UP
HikerErikSeenText:
text "Be prepared for"
diff --git a/maps/Route46.asm b/maps/Route46.asm
index 36dad82d3..6edd26404 100644
--- a/maps/Route46.asm
+++ b/maps/Route46.asm
@@ -47,9 +47,9 @@ UnknownScript_0x1a96c3:
scall UnknownScript_0x1a9753
UnknownScript_0x1a96c6:
askforphonenumber PHONE_PICNICKER_ERIN
- if_equal $1, UnknownScript_0x1a9763
- if_equal $2, UnknownScript_0x1a975f
- trainertotext PICNICKER, ERIN1, $0
+ if_equal PHONE_CONTACTS_FULL, UnknownScript_0x1a9763
+ if_equal PHONE_CONTACT_REFUSED, UnknownScript_0x1a975f
+ trainertotext PICNICKER, ERIN1, MEM_BUFFER_0
scall UnknownScript_0x1a9757
jump UnknownScript_0x1a975b
@@ -256,8 +256,8 @@ Route46_MapEventHeader:
.Warps:
db 3
- warp_def 7, 33, 1, ROUTE_29_46_GATE
- warp_def 8, 33, 2, ROUTE_29_46_GATE
+ warp_def 7, 33, 1, ROUTE_29_ROUTE_46_GATE
+ warp_def 8, 33, 2, ROUTE_29_ROUTE_46_GATE
warp_def 14, 5, 3, DARK_CAVE_VIOLET_ENTRANCE
.CoordEvents:
diff --git a/maps/Route5.asm b/maps/Route5.asm
index 7976fbe79..1e2ea7741 100644
--- a/maps/Route5.asm
+++ b/maps/Route5.asm
@@ -46,8 +46,8 @@ Route5_MapEventHeader:
.Warps:
db 4
warp_def 17, 15, 1, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
- warp_def 8, 17, 1, ROUTE_5_SAFFRON_CITY_GATE
- warp_def 9, 17, 2, ROUTE_5_SAFFRON_CITY_GATE
+ warp_def 8, 17, 1, ROUTE_5_SAFFRON_GATE
+ warp_def 9, 17, 2, ROUTE_5_SAFFRON_GATE
warp_def 10, 11, 1, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE
.CoordEvents:
diff --git a/maps/Route5SaffronCityGate.asm b/maps/Route5SaffronGate.asm
index e47ce7628..cf945b7dc 100644
--- a/maps/Route5SaffronCityGate.asm
+++ b/maps/Route5SaffronGate.asm
@@ -1,17 +1,17 @@
const_value set 2
- const ROUTE5SAFFRONCITYGATE_OFFICER
+ const ROUTE5SAFFRONGATE_OFFICER
-Route5SaffronCityGate_MapScriptHeader:
+Route5SaffronGate_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
-Route5SaffronCityGateOfficerScript:
- jumptextfaceplayer Route5SaffronCityGateOfficerText
+Route5SaffronGateOfficerScript:
+ jumptextfaceplayer Route5SaffronGateOfficerText
-Route5SaffronCityGateOfficerText:
+Route5SaffronGateOfficerText:
text "You're from JOHTO,"
line "aren't you?"
@@ -20,7 +20,7 @@ Route5SaffronCityGateOfficerText:
cont "don't you agree?"
done
-Route5SaffronCityGate_MapEventHeader:
+Route5SaffronGate_MapEventHeader:
; filler
db 0, 0
@@ -39,4 +39,4 @@ Route5SaffronCityGate_MapEventHeader:
.ObjectEvents:
db 1
- object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route5SaffronCityGateOfficerScript, -1
+ object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route5SaffronGateOfficerScript, -1
diff --git a/maps/Route9.asm b/maps/Route9.asm
index 1b377ceeb..f98b45310 100644
--- a/maps/Route9.asm
+++ b/maps/Route9.asm
@@ -83,8 +83,7 @@ Route9Sign:
jumptext Route9SignText
Route9HiddenEther:
- dwb EVENT_ROUTE_9_HIDDEN_ETHER, ETHER
-
+ hiddenitem EVENT_ROUTE_9_HIDDEN_ETHER, ETHER
CamperDeanSeenText:
text "I came to explore"
diff --git a/maps/RuinsOfAlphAerodactylChamber.asm b/maps/RuinsOfAlphAerodactylChamber.asm
index 355b5591c..86934ba61 100644
--- a/maps/RuinsOfAlphAerodactylChamber.asm
+++ b/maps/RuinsOfAlphAerodactylChamber.asm
@@ -6,7 +6,7 @@ RuinsOfAlphAerodactylChamber_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .HiddenDoors
+ callback MAPCALLBACK_TILES, .HiddenDoors
.CheckWall:
checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
@@ -23,15 +23,15 @@ RuinsOfAlphAerodactylChamber_MapScriptHeader:
.HiddenDoors:
checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
iftrue .WallOpen
- changeblock $4, $0, $2e
+ changeblock 4, 0, $2e
.WallOpen:
checkevent EVENT_SOLVED_AERODACTYL_PUZZLE
iffalse .FloorClosed
return
.FloorClosed:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
+ changeblock 2, 2, $01
+ changeblock 4, 2, $02
return
.WallOpenScript:
@@ -40,16 +40,16 @@ RuinsOfAlphAerodactylChamber_MapScriptHeader:
showemote EMOTE_SHOCK, PLAYER, 20
pause 30
playsound SFX_STRENGTH
- changeblock $4, $0, $30
+ changeblock 4, 0, $30
reloadmappart
earthquake 50
- setscene $1
+ setscene 1
closetext
end
MapRuinsOfAlphAerodactylChamberSignpost2Script:
- refreshscreen $0
- writebyte $2
+ refreshscreen
+ writebyte UNOWNPUZZLE_AERODACTYL
special Special_UnownPuzzle
closetext
iftrue UnknownScript_0x58df7
@@ -59,11 +59,11 @@ UnknownScript_0x58df7:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_AERODACTYL_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_3
- setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
+ changeblock 2, 2, $18
+ changeblock 4, 2, $19
reloadmappart
playsound SFX_STRENGTH
earthquake 80
@@ -83,7 +83,7 @@ MapRuinsOfAlphAerodactylChamberSignpost3Script:
MapRuinsOfAlphAerodactylChamberSignpost4Script:
opentext
writetext UnknownText_0x58e4f
- writebyte $1
+ writebyte UNOWNWORDS_LIGHT
special Special_DisplayUnownWords
closetext
end
@@ -93,7 +93,7 @@ MapRuinsOfAlphAerodactylChamberSignpost5Script:
iftrue UnknownScript_0x58e46
opentext
writetext UnknownText_0x58e81
- writebyte $1
+ writebyte UNOWNWORDS_LIGHT
special Special_DisplayUnownWords
closetext
end
@@ -106,7 +106,7 @@ UnknownScript_0x58e46:
end
MovementData_0x58e4d:
- db $59 ; movement
+ skyfall_top
step_end
UnknownText_0x58e4f:
@@ -114,8 +114,8 @@ UnknownText_0x58e4f:
line "on the walls…"
done
-; possibly unused.. again?
-UnknownText_0x58e70:
+; unused
+UnusedText_0x58e70:
text "It's UNOWN text!"
done
diff --git a/maps/RuinsOfAlphHoOhChamber.asm b/maps/RuinsOfAlphHoOhChamber.asm
index 52915317d..c63ce2fae 100644
--- a/maps/RuinsOfAlphHoOhChamber.asm
+++ b/maps/RuinsOfAlphHoOhChamber.asm
@@ -6,10 +6,10 @@ RuinsOfAlphHoOhChamber_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .HiddenDoors
+ callback MAPCALLBACK_TILES, .HiddenDoors
.CheckWall:
- special SpecialHoOhChamber
+ special Special_HoOhChamber
checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
iftrue .OpenWall
end
@@ -24,15 +24,15 @@ RuinsOfAlphHoOhChamber_MapScriptHeader:
.HiddenDoors:
checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
iftrue .WallOpen
- changeblock $4, $0, $2e
+ changeblock 4, 0, $2e
.WallOpen:
checkevent EVENT_SOLVED_HO_OH_PUZZLE
iffalse .FloorClosed
return
.FloorClosed:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
+ changeblock 2, 2, $01
+ changeblock 4, 2, $02
return
.WallOpenScript:
@@ -41,16 +41,16 @@ RuinsOfAlphHoOhChamber_MapScriptHeader:
showemote EMOTE_SHOCK, PLAYER, 20
pause 30
playsound SFX_STRENGTH
- changeblock $4, $0, $30
+ changeblock 4, 0, $30
reloadmappart
earthquake 50
- setscene $1
+ setscene 1
closetext
end
MapRuinsOfAlphHoOhChamberSignpost2Script:
- refreshscreen $0
- writebyte $3
+ refreshscreen
+ writebyte UNOWNPUZZLE_HO_OH
special Special_UnownPuzzle
closetext
iftrue UnknownScript_0x585ba
@@ -60,11 +60,11 @@ UnknownScript_0x585ba:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_HO_OH_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_4
- setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
+ changeblock 2, 2, $18
+ changeblock 4, 2, $19
reloadmappart
playsound SFX_STRENGTH
earthquake 80
@@ -84,7 +84,7 @@ MapRuinsOfAlphHoOhChamberSignpost3Script:
MapRuinsOfAlphHoOhChamberSignpost4Script:
opentext
writetext UnknownText_0x58612
- writebyte $3
+ writebyte UNOWNWORDS_HO_OH
special Special_DisplayUnownWords
closetext
end
@@ -94,7 +94,7 @@ MapRuinsOfAlphHoOhChamberSignpost5Script:
iftrue UnknownScript_0x58609
opentext
writetext UnknownText_0x58644
- writebyte $3
+ writebyte UNOWNWORDS_HO_OH
special Special_DisplayUnownWords
closetext
end
@@ -107,7 +107,7 @@ UnknownScript_0x58609:
end
MovementData_0x58610:
- db $59 ; movement
+ skyfall_top
step_end
UnknownText_0x58612:
@@ -115,8 +115,8 @@ UnknownText_0x58612:
line "on the walls…"
done
-; possibly unused
-UnknownText_0x58633:
+; unused
+UnusedText_0x58633:
text "It's UNOWN text!"
done
diff --git a/maps/RuinsOfAlphInnerChamber.asm b/maps/RuinsOfAlphInnerChamber.asm
index e0f9b4ad8..a7c329068 100644
--- a/maps/RuinsOfAlphInnerChamber.asm
+++ b/maps/RuinsOfAlphInnerChamber.asm
@@ -24,7 +24,7 @@ RuinsOfAlphInnerChamber_MapScriptHeader:
writetext RuinsOfAlphStrangePresenceText
waitbutton
closetext
- setscene $0
+ setscene 0
setevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER
end
diff --git a/maps/RuinsOfAlphKabutoChamber.asm b/maps/RuinsOfAlphKabutoChamber.asm
index e4f3f16c5..b6733ec8f 100644
--- a/maps/RuinsOfAlphKabutoChamber.asm
+++ b/maps/RuinsOfAlphKabutoChamber.asm
@@ -10,7 +10,7 @@ RuinsOfAlphKabutoChamber_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .HiddenDoors
+ callback MAPCALLBACK_TILES, .HiddenDoors
.CheckWall:
checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
@@ -27,15 +27,15 @@ RuinsOfAlphKabutoChamber_MapScriptHeader:
.HiddenDoors:
checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
iftrue .WallOpen
- changeblock $4, $0, $2e
+ changeblock 4, 0, $2e
.WallOpen:
checkevent EVENT_SOLVED_KABUTO_PUZZLE
iffalse .FloorClosed
return
.FloorClosed:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
+ changeblock 2, 2, $01
+ changeblock 4, 2, $02
return
.WallOpenScript:
@@ -44,10 +44,10 @@ RuinsOfAlphKabutoChamber_MapScriptHeader:
showemote EMOTE_SHOCK, PLAYER, 20
pause 30
playsound SFX_STRENGTH
- changeblock $4, $0, $30
+ changeblock 4, 0, $30
reloadmappart
earthquake 50
- setscene $1
+ setscene 1
closetext
end
@@ -55,8 +55,8 @@ RuinsOfAlphKabutoChamberReceptionistScript:
jumptextfaceplayer RuinsOfAlphKabutoChamberReceptionistText
MapRuinsOfAlphKabutoChamberSignpost2Script:
- refreshscreen $0
- writebyte $0
+ refreshscreen
+ writebyte UNOWNPUZZLE_KABUTO
special Special_UnownPuzzle
closetext
iftrue UnknownScript_0x58778
@@ -67,11 +67,11 @@ UnknownScript_0x58778:
setevent EVENT_SOLVED_KABUTO_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_1
setevent EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
- setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
+ changeblock 2, 2, $18
+ changeblock 4, 2, $19
reloadmappart
playsound SFX_STRENGTH
earthquake 80
@@ -86,7 +86,7 @@ ScientistScript_0x587a8:
faceplayer
opentext
checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x587cf
+ if_equal NUM_UNOWN, UnknownScript_0x587cf
checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
iftrue UnknownScript_0x587c9
checkevent EVENT_SOLVED_KABUTO_PUZZLE
@@ -121,7 +121,7 @@ MapRuinsOfAlphKabutoChamberSignpost3Script:
MapRuinsOfAlphKabutoChamberSignpost4Script:
opentext
writetext UnknownText_0x58aa7
- writebyte $0
+ writebyte UNOWNWORDS_ESCAPE
special Special_DisplayUnownWords
closetext
end
@@ -131,7 +131,7 @@ MapRuinsOfAlphKabutoChamberSignpost5Script:
iftrue UnknownScript_0x587f7
opentext
writetext UnknownText_0x58ad9
- writebyte $0
+ writebyte UNOWNWORDS_ESCAPE
special Special_DisplayUnownWords
closetext
end
@@ -144,7 +144,7 @@ UnknownScript_0x587f7:
end
MovementData_0x587fe:
- db $59 ; movement
+ skyfall_top
step_end
RuinsOfAlphKabutoChamberReceptionistText:
@@ -202,8 +202,8 @@ UnknownText_0x589b8:
cont "this wall here…"
done
-; possibly unused
-UnknownText_0x58a03:
+; unused
+UnusedText_0x58a03:
text "The patterns on"
line "the wall appear to"
cont "be words!"
@@ -226,8 +226,8 @@ UnknownText_0x58aa7:
line "on the walls…"
done
-; possibly unused
-UnknownText_0x58ac8:
+; unused
+UnusedText_0x58ac8:
text "It's UNOWN text!"
done
diff --git a/maps/RuinsOfAlphOmanyteChamber.asm b/maps/RuinsOfAlphOmanyteChamber.asm
index 994f69edd..87edcc536 100644
--- a/maps/RuinsOfAlphOmanyteChamber.asm
+++ b/maps/RuinsOfAlphOmanyteChamber.asm
@@ -6,10 +6,10 @@ RuinsOfAlphOmanyteChamber_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .HiddenDoors
+ callback MAPCALLBACK_TILES, .HiddenDoors
.CheckWall:
- special SpecialOmanyteChamber
+ special Special_OmanyteChamber
checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
iftrue .OpenWall
end
@@ -24,15 +24,15 @@ RuinsOfAlphOmanyteChamber_MapScriptHeader:
.HiddenDoors:
checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
iftrue .WallOpen
- changeblock $4, $0, $2e
+ changeblock 4, 0, $2e
.WallOpen:
checkevent EVENT_SOLVED_OMANYTE_PUZZLE
iffalse .FloorClosed
return
.FloorClosed:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
+ changeblock 2, 2, $01
+ changeblock 4, 2, $02
return
.WallOpenScript:
@@ -41,16 +41,16 @@ RuinsOfAlphOmanyteChamber_MapScriptHeader:
showemote EMOTE_SHOCK, PLAYER, 20
pause 30
playsound SFX_STRENGTH
- changeblock $4, $0, $30
+ changeblock 4, 0, $30
reloadmappart
earthquake 50
- setscene $1
+ setscene 1
closetext
end
MapRuinsOfAlphOmanyteChamberSignpost2Script:
- refreshscreen $0
- writebyte $1
+ refreshscreen
+ writebyte UNOWNPUZZLE_OMANYTE
special Special_UnownPuzzle
closetext
iftrue UnknownScript_0x58c36
@@ -60,11 +60,11 @@ UnknownScript_0x58c36:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_OMANYTE_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_2
- setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
+ changeblock 2, 2, $18
+ changeblock 4, 2, $19
reloadmappart
playsound SFX_STRENGTH
earthquake 80
@@ -84,7 +84,7 @@ MapRuinsOfAlphOmanyteChamberSignpost3Script:
MapRuinsOfAlphOmanyteChamberSignpost4Script:
opentext
writetext UnknownText_0x58c8e
- writebyte $2
+ writebyte UNOWNWORDS_WATER
special Special_DisplayUnownWords
closetext
end
@@ -94,7 +94,7 @@ MapRuinsOfAlphOmanyteChamberSignpost5Script:
iftrue UnknownScript_0x58c85
opentext
writetext UnknownText_0x58cc0
- writebyte $2
+ writebyte UNOWNWORDS_WATER
special Special_DisplayUnownWords
closetext
end
@@ -107,7 +107,7 @@ UnknownScript_0x58c85:
end
MovementData_0x58c8c:
- db $59 ; movement
+ skyfall_top
step_end
UnknownText_0x58c8e:
@@ -115,8 +115,8 @@ UnknownText_0x58c8e:
line "on the walls…"
done
-; possibly unused.. this again?
-UnknownText_0x58caf:
+; unused
+UnusedText_0x58caf:
text "It's UNOWN text!"
done
diff --git a/maps/RuinsOfAlphOutside.asm b/maps/RuinsOfAlphOutside.asm
index 478a2b9d0..39c85fa05 100644
--- a/maps/RuinsOfAlphOutside.asm
+++ b/maps/RuinsOfAlphOutside.asm
@@ -13,7 +13,7 @@ RuinsOfAlphOutside_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .ScientistCallback
+ callback MAPCALLBACK_OBJECTS, .ScientistCallback
.DummyScene0:
end
@@ -30,17 +30,17 @@ RuinsOfAlphOutside_MapScriptHeader:
.MaybeScientist:
checkcode VAR_UNOWNCOUNT
- if_greater_than $2, .YesScientist
+ if_greater_than 2, .YesScientist
jump .NoScientist
.YesScientist:
appear RUINSOFALPHOUTSIDE_SCIENTIST
- setscene $1
+ setscene 1
return
.NoScientist:
disappear RUINSOFALPHOUTSIDE_SCIENTIST
- setscene $0
+ setscene 0
return
RuinsOfAlphOutsideScientistScene1:
@@ -66,7 +66,7 @@ UnknownScript_0x58044:
disappear RUINSOFALPHOUTSIDE_SCIENTIST
stopfollow
applymovement PLAYER, MovementData_0x580c5
- setmapscene RUINS_OF_ALPH_RESEARCH_CENTER, $1
+ setmapscene RUINS_OF_ALPH_RESEARCH_CENTER, 1
warpcheck
end
@@ -112,7 +112,6 @@ TrainerPsychicNathan:
closetext
end
-
TrainerSuperNerdStan:
trainer EVENT_BEAT_SUPER_NERD_STAN, SUPER_NERD, STAN, UnknownText_0x581e5, UnknownText_0x58217, 0, .Script
@@ -124,7 +123,6 @@ TrainerSuperNerdStan:
closetext
end
-
RuinsOfAlphOutsideSignpost0Script:
jumptext UnknownText_0x58325
diff --git a/maps/RuinsOfAlphResearchCenter.asm b/maps/RuinsOfAlphResearchCenter.asm
index 223b2bd62..920617df8 100644
--- a/maps/RuinsOfAlphResearchCenter.asm
+++ b/maps/RuinsOfAlphResearchCenter.asm
@@ -11,7 +11,7 @@ RuinsOfAlphResearchCenter_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .ScientistCallback
+ callback MAPCALLBACK_OBJECTS, .ScientistCallback
.DummyScene0:
end
@@ -22,11 +22,11 @@ RuinsOfAlphResearchCenter_MapScriptHeader:
.ScientistCallback:
checkscene
- if_equal $1, .ShowScientist
+ if_equal 1, .ShowScientist
return
.ShowScientist:
- moveobject RUINSOFALPHRESEARCHCENTER_SCIENTIST3, $3, $7
+ moveobject RUINSOFALPHRESEARCHCENTER_SCIENTIST3, 3, 7
appear RUINSOFALPHRESEARCHCENTER_SCIENTIST3
return
@@ -55,7 +55,7 @@ RuinsOfAlphResearchCenter_MapScriptHeader:
waitbutton
closetext
applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x59276
- setscene $0
+ setscene 0
special RestartMapMusic
end
@@ -63,7 +63,7 @@ ScientistScript_0x591d1:
faceplayer
opentext
checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x591df
+ if_equal NUM_UNOWN, UnknownScript_0x591df
writetext UnknownText_0x59311
waitbutton
closetext
@@ -79,7 +79,7 @@ ScientistScript_0x591e5:
faceplayer
opentext
checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x5920b
+ if_equal NUM_UNOWN, UnknownScript_0x5920b
checkflag ENGINE_UNOWN_DEX
iftrue UnknownScript_0x59205
checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
@@ -112,7 +112,7 @@ ScientistScript_0x59214:
faceplayer
opentext
checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x5922e
+ if_equal NUM_UNOWN, UnknownScript_0x5922e
checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
iftrue UnknownScript_0x59228
writetext UnknownText_0x5954f
@@ -137,7 +137,7 @@ MapRuinsOfAlphResearchCenterSignpost1Script:
checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
iftrue UnknownScript_0x59241
checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x59247
+ if_equal NUM_UNOWN, UnknownScript_0x59247
UnknownScript_0x59241:
writetext UnknownText_0x597b6
waitbutton
@@ -155,7 +155,7 @@ MapRuinsOfAlphResearchCenterSignpost2Script:
checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
iftrue UnknownScript_0x5925a
checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x59260
+ if_equal NUM_UNOWN, UnknownScript_0x59260
UnknownScript_0x5925a:
writetext UnknownText_0x5980e
waitbutton
@@ -169,8 +169,8 @@ UnknownScript_0x59260:
closetext
end
-UnknownScript_0x59269:
- jumptext UnknownText_0x59848
+UnreferencedScript_0x59269:
+ jumptext UnusedText_0x59848
MapRuinsOfAlphResearchCenterSignpost0Script:
jumptext UnknownText_0x59886
@@ -308,8 +308,8 @@ UnknownText_0x595cb:
cont "kinds of them…"
done
-; possibly unused
-UnknownText_0x59669:
+; unused
+UnusedText_0x59669:
text "We think something"
line "caused the cryptic"
@@ -320,8 +320,8 @@ UnknownText_0x59669:
line "studies on that."
done
-; possibly unused
-UnknownText_0x596d3:
+; unused
+UnusedText_0x596d3:
text "According to my"
line "research…"
@@ -374,8 +374,8 @@ UnknownText_0x5982d:
line "printed out."
done
-; possibly unused
-UnknownText_0x59848:
+; unused
+UnusedText_0x59848:
text "It's a photo of"
line "the RESEARCH"
diff --git a/maps/SaffronCity.asm b/maps/SaffronCity.asm
index 490a269b9..d016d61c7 100644
--- a/maps/SaffronCity.asm
+++ b/maps/SaffronCity.asm
@@ -14,7 +14,7 @@ SaffronCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_SAFFRON
@@ -276,10 +276,10 @@ SaffronCity_MapEventHeader:
warp_def 25, 11, 2, SAFFRON_MART
warp_def 9, 29, 1, SAFFRON_POKECENTER_1F
warp_def 27, 29, 1, MR_PSYCHICS_HOUSE
- warp_def 8, 3, 2, SAFFRON_TRAIN_STATION
+ warp_def 8, 3, 2, SAFFRON_MAGNET_TRAIN_STATION
warp_def 18, 21, 1, SILPH_CO_1F
warp_def 9, 11, 1, COPYCATS_HOUSE_1F
- warp_def 18, 3, 3, ROUTE_5_SAFFRON_CITY_GATE
+ warp_def 18, 3, 3, ROUTE_5_SAFFRON_GATE
warp_def 0, 24, 3, ROUTE_7_SAFFRON_GATE
warp_def 0, 25, 4, ROUTE_7_SAFFRON_GATE
warp_def 16, 33, 1, ROUTE_6_SAFFRON_GATE
diff --git a/maps/SaffronGym.asm b/maps/SaffronGym.asm
index 008356172..909c2754a 100644
--- a/maps/SaffronGym.asm
+++ b/maps/SaffronGym.asm
@@ -22,7 +22,7 @@ SabrinaScript_0x189c2e:
waitbutton
closetext
winlosstext UnknownText_0x189df4, 0
- loadtrainer SABRINA, 1
+ loadtrainer SABRINA, SABRINA1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_SABRINA
@@ -111,7 +111,7 @@ SaffronGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext SABRINA, 1, $1
+ trainertotext SABRINA, SABRINA1, MEM_BUFFER_1
jumpstd gymstatue2
UnknownText_0x189cdf:
diff --git a/maps/SaffronTrainStation.asm b/maps/SaffronMagnetTrainStation.asm
index 19c35a37c..471462840 100644
--- a/maps/SaffronTrainStation.asm
+++ b/maps/SaffronMagnetTrainStation.asm
@@ -1,10 +1,10 @@
const_value set 2
- const SAFFRONTRAINSTATION_OFFICER
- const SAFFRONTRAINSTATION_GYM_GUY
- const SAFFRONTRAINSTATION_TEACHER
- const SAFFRONTRAINSTATION_LASS
+ const SAFFRONMAGNETTRAINSTATION_OFFICER
+ const SAFFRONMAGNETTRAINSTATION_GYM_GUY
+ const SAFFRONMAGNETTRAINSTATION_TEACHER
+ const SAFFRONMAGNETTRAINSTATION_LASS
-SaffronTrainStation_MapScriptHeader:
+SaffronMagnetTrainStation_MapScriptHeader:
.SceneScripts:
db 1
scene_script .DummyScene
@@ -34,14 +34,14 @@ OfficerScript_0x18a81e:
writetext UnknownText_0x18a917
waitbutton
closetext
- applymovement SAFFRONTRAINSTATION_OFFICER, MovementData_0x18a88f
+ applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, MovementData_0x18a88f
applymovement PLAYER, MovementData_0x18a898
- writebyte $1
+ writebyte TRUE
special Special_MagnetTrain
warpcheck
newloadmap MAPSETUP_TRAIN
applymovement PLAYER, .MovementBoardTheTrain
- wait $14
+ wait 20
end
.MovementBoardTheTrain:
@@ -61,9 +61,9 @@ OfficerScript_0x18a81e:
end
Script_ArriveFromGoldenrod:
- applymovement SAFFRONTRAINSTATION_OFFICER, MovementData_0x18a88f
+ applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, MovementData_0x18a88f
applymovement PLAYER, MovementData_0x18a8a1
- applymovement SAFFRONTRAINSTATION_OFFICER, MovementData_0x18a894
+ applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, MovementData_0x18a894
opentext
writetext UnknownText_0x18a993
waitbutton
@@ -86,11 +86,11 @@ UnknownScript_0x18a883:
closetext
end
-SaffronTrainStationTeacherScript:
- jumptextfaceplayer SaffronTrainStationTeacherText
+SaffronMagnetTrainStationTeacherScript:
+ jumptextfaceplayer SaffronMagnetTrainStationTeacherText
-SaffronTrainStationLassScript:
- jumptextfaceplayer SaffronTrainStationLassText
+SaffronMagnetTrainStationLassScript:
+ jumptextfaceplayer SaffronMagnetTrainStationLassText
MovementData_0x18a88f:
step UP
@@ -192,7 +192,7 @@ UnknownText_0x18aa61:
line "KANTO and JOHTO?"
done
-SaffronTrainStationTeacherText:
+SaffronMagnetTrainStationTeacherText:
text "Before the MAGNET"
line "TRAIN STATION was"
@@ -204,7 +204,7 @@ SaffronTrainStationTeacherText:
cont "to live there."
done
-SaffronTrainStationLassText:
+SaffronMagnetTrainStationLassText:
text "Hi. Do you have a"
line "rail PASS? I have"
@@ -215,7 +215,7 @@ SaffronTrainStationLassText:
line "TRAIN have PASSES."
done
-SaffronTrainStation_MapEventHeader:
+SaffronMagnetTrainStation_MapEventHeader:
; filler
db 0, 0
@@ -237,5 +237,5 @@ SaffronTrainStation_MapEventHeader:
db 4
object_event 9, 9, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x18a81e, -1
object_event 10, 14, SPRITE_GYM_GUY, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x18a875, -1
- object_event 6, 11, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronTrainStationTeacherScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION
- object_event 6, 10, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronTrainStationLassScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION
+ object_event 6, 11, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronMagnetTrainStationTeacherScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION
+ object_event 6, 10, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronMagnetTrainStationLassScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION
diff --git a/maps/SaffronTrainStation.blk b/maps/SaffronMagnetTrainStation.blk
index bdca20f29..bdca20f29 100644
--- a/maps/SaffronTrainStation.blk
+++ b/maps/SaffronMagnetTrainStation.blk
diff --git a/maps/SaffronPokecenter1F.asm b/maps/SaffronPokecenter1F.asm
index 39d6ad8bb..7e11928ae 100644
--- a/maps/SaffronPokecenter1F.asm
+++ b/maps/SaffronPokecenter1F.asm
@@ -15,7 +15,7 @@ NurseScript_0x18a47d:
jumpstd pokecenternurse
TeacherScript_0x18a480:
- special Mobile_DummyReturnFalse
+ special Special_Mobile_DummyReturnFalse
iftrue .mobile
jumptextfaceplayer UnknownText_0x18a4a3
diff --git a/maps/SeafoamGym.asm b/maps/SeafoamGym.asm
index f08ba0b8f..225dab027 100644
--- a/maps/SeafoamGym.asm
+++ b/maps/SeafoamGym.asm
@@ -22,7 +22,7 @@ BlaineScript_0x1ab4fb:
waitbutton
closetext
winlosstext UnknownText_0x1ab646, 0
- loadtrainer BLAINE, 1
+ loadtrainer BLAINE, BLAINE1
startbattle
iftrue .ReturnAfterBattle
appear SEAFOAMGYM_GYM_GUY
diff --git a/maps/SilverCaveOutside.asm b/maps/SilverCaveOutside.asm
index 52f1c1b16..0672b7dab 100644
--- a/maps/SilverCaveOutside.asm
+++ b/maps/SilverCaveOutside.asm
@@ -4,7 +4,7 @@ SilverCaveOutside_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_SILVER_CAVE
@@ -17,7 +17,7 @@ MtSilverSign:
jumptext MtSilverSignText
SilverCaveOutsideHiddenFullRestore:
- dwb EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
+ hiddenitem EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
MtSilverSignText:
text "MT.SILVER"
diff --git a/maps/SilverCaveRoom1.asm b/maps/SilverCaveRoom1.asm
index 7879184ee..f75946854 100644
--- a/maps/SilverCaveRoom1.asm
+++ b/maps/SilverCaveRoom1.asm
@@ -24,12 +24,10 @@ SilverCaveRoom1UltraBall:
itemball ULTRA_BALL
SilverCaveRoom1HiddenDireHit:
- dwb EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT, DIRE_HIT
-
+ hiddenitem EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT, DIRE_HIT
SilverCaveRoom1HiddenUltraBall:
- dwb EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+ hiddenitem EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL, ULTRA_BALL
SilverCaveRoom1_MapEventHeader:
; filler
diff --git a/maps/SilverCaveRoom2.asm b/maps/SilverCaveRoom2.asm
index ec33e2be8..57072f858 100644
--- a/maps/SilverCaveRoom2.asm
+++ b/maps/SilverCaveRoom2.asm
@@ -20,8 +20,7 @@ SilverCaveRoom2PPUp:
itemball PP_UP
SilverCaveRoom2HiddenMaxPotion:
- dwb EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION, MAX_POTION
SilverCaveRoom2_MapEventHeader:
; filler
diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm
index 7daab6ba8..076f8ebe1 100644
--- a/maps/SilverCaveRoom3.asm
+++ b/maps/SilverCaveRoom3.asm
@@ -16,7 +16,7 @@ Red:
waitbutton
closetext
winlosstext .Text2, .Text2
- loadtrainer RED, 1
+ loadtrainer RED, RED1
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -26,19 +26,19 @@ Red:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear SILVERCAVEROOM3_RED
pause 15
special Special_FadeInQuickly
pause 30
special HealParty
- refreshscreen $0
+ refreshscreen
credits
end
.Text1:
- text $56
- line $56
+ text "<......>"
+ line "<......>"
done
.Text2:
@@ -46,8 +46,8 @@ Red:
done
.Text3:
- text $56
- line $56
+ text "<......>"
+ line "<......>"
done
SilverCaveRoom3_MapEventHeader:
diff --git a/maps/SlowpokeWellB1F.asm b/maps/SlowpokeWellB1F.asm
index c4357abf1..a7bc02439 100644
--- a/maps/SlowpokeWellB1F.asm
+++ b/maps/SlowpokeWellB1F.asm
@@ -39,7 +39,7 @@ TrainerGruntM1:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear SLOWPOKEWELLB1F_ROCKET1
disappear SLOWPOKEWELLB1F_ROCKET2
disappear SLOWPOKEWELLB1F_ROCKET3
@@ -47,7 +47,7 @@ TrainerGruntM1:
pause 15
special Special_FadeInQuickly
disappear SLOWPOKEWELLB1F_KURT
- moveobject SLOWPOKEWELLB1F_KURT, $b, $6
+ moveobject SLOWPOKEWELLB1F_KURT, 11, 6
appear SLOWPOKEWELLB1F_KURT
applymovement SLOWPOKEWELLB1F_KURT, KurtSlowpokeWellVictoryMovementData
spriteface PLAYER, RIGHT
@@ -57,7 +57,7 @@ TrainerGruntM1:
closetext
setevent EVENT_CLEARED_SLOWPOKE_WELL
variablesprite SPRITE_AZALEA_ROCKET, SPRITE_SILVER
- setmapscene AZALEA_TOWN, $1
+ setmapscene AZALEA_TOWN, 1
clearevent EVENT_ILEX_FOREST_APPRENTICE
clearevent EVENT_ILEX_FOREST_FARFETCHD
setevent EVENT_CHARCOAL_KILN_FARFETCH_D
@@ -67,10 +67,10 @@ TrainerGruntM1:
clearevent EVENT_AZALEA_TOWN_SLOWPOKES
clearevent EVENT_KURTS_HOUSE_SLOWPOKE
clearevent EVENT_KURTS_HOUSE_KURT_1
- special FadeOutPalettes
+ special Special_FadeOutPalettes
special HealParty
pause 15
- warp KURTS_HOUSE, $3, $3
+ warp KURTS_HOUSE, 3, 3
end
TrainerGruntM2:
diff --git a/maps/SproutTower3F.asm b/maps/SproutTower3F.asm
index 33dd4dcd8..95d850fb7 100644
--- a/maps/SproutTower3F.asm
+++ b/maps/SproutTower3F.asm
@@ -55,11 +55,11 @@ UnknownScript_0x184947:
closetext
playsound SFX_WARP_TO
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear SPROUTTOWER3F_SILVER
waitsfx
special Special_FadeInQuickly
- setscene $1
+ setscene 1
special RestartMapMusic
end
diff --git a/maps/TeamRocketBaseB1F.asm b/maps/TeamRocketBaseB1F.asm
index 464215210..6364a44a0 100644
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -13,7 +13,7 @@ TeamRocketBaseB1F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .HideSecurityGrunt
+ callback MAPCALLBACK_OBJECTS, .HideSecurityGrunt
.DummyScene:
end
@@ -30,20 +30,20 @@ SecurityCamera1a:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $2
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 2
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $2
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 2
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_1
end
@@ -55,20 +55,20 @@ SecurityCamera1b:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $3
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 3
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $3
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 3
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_1
end
@@ -80,21 +80,21 @@ SecurityCamera2a:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $4, $7
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 4, 7
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement2
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveobject TEAMROCKETBASEB1F_ROCKET1, $c, $5
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 12, 5
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement3
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_2
end
@@ -106,21 +106,21 @@ SecurityCamera2b:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $4, $8
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 4, 8
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement4
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveobject TEAMROCKETBASEB1F_ROCKET1, $c, $5
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 12, 5
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement5
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_2
end
@@ -132,21 +132,21 @@ SecurityCamera3a:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $6
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 6
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveobject TEAMROCKETBASEB1F_ROCKET1, $19, $b
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 25, 11
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement6
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_3
end
@@ -158,21 +158,21 @@ SecurityCamera3b:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $7
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 7
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveobject TEAMROCKETBASEB1F_ROCKET1, $19, $c
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 25, 12
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement7
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_3
end
@@ -184,21 +184,21 @@ SecurityCamera4:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $11, $10
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 17, 16
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveobject TEAMROCKETBASEB1F_ROCKET1, $19, $b
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 25, 11
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement8
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_4
end
@@ -210,21 +210,21 @@ SecurityCamera5:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveobject TEAMROCKETBASEB1F_ROCKET1, $3, $10
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 3, 16
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt1
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveobject TEAMROCKETBASEB1F_ROCKET1, $e, $10
+ moveobject TEAMROCKETBASEB1F_ROCKET1, 14, 16
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement9
scall TrainerCameraGrunt2
- if_equal $1, NoSecurityCamera
+ if_equal TRUE, NoSecurityCamera
setevent EVENT_SECURITY_CAMERA_5
end
@@ -448,9 +448,9 @@ ExplodingTrap22:
end
VoltorbExplodingTrap:
- special FadeOutPalettes
+ special Special_FadeOutPalettes
cry VOLTORB
- special FadeInPalettes
+ special Special_FadeInPalettes
setlasttalked -1
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon VOLTORB, 23
@@ -458,9 +458,9 @@ VoltorbExplodingTrap:
end
GeodudeExplodingTrap:
- special FadeOutPalettes
+ special Special_FadeOutPalettes
cry GEODUDE
- special FadeInPalettes
+ special Special_FadeInPalettes
setlasttalked -1
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon GEODUDE, 21
@@ -468,9 +468,9 @@ GeodudeExplodingTrap:
end
KoffingExplodingTrap:
- special FadeOutPalettes
+ special Special_FadeOutPalettes
cry KOFFING
- special FadeInPalettes
+ special Special_FadeInPalettes
setlasttalked -1
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
loadwildmon KOFFING, 21
@@ -540,8 +540,7 @@ TeamRocketBaseB1FGuardSpec:
itemball GUARD_SPEC
TeamRocketBaseB1FHiddenRevive:
- dwb EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE, REVIVE
-
+ hiddenitem EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE, REVIVE
SecurityCameraMovement1:
big_step RIGHT
diff --git a/maps/TeamRocketBaseB2F.asm b/maps/TeamRocketBaseB2F.asm
index 0ed2c67f0..62197eec6 100644
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -24,7 +24,7 @@ TeamRocketBaseB2F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .TransmitterDoorCallback
+ callback MAPCALLBACK_TILES, .TransmitterDoorCallback
.DummyScene0:
end
@@ -44,18 +44,18 @@ TeamRocketBaseB2F_MapScriptHeader:
return
.Change:
- changeblock $e, $c, $7
+ changeblock 14, 12, $07
return
UnknownScript_0x6cf95:
- moveobject TEAMROCKETBASEB2F_LANCE, $9, $d
+ moveobject TEAMROCKETBASEB2F_LANCE, 9, 13
jump UnknownScript_0x6cfac
UnknownScript_0x6cf9c:
- moveobject TEAMROCKETBASEB2F_ROCKET_GIRL, $15, $10
- moveobject TEAMROCKETBASEB2F_ROCKET1, $15, $10
- moveobject TEAMROCKETBASEB2F_DRAGON, $a, $d
- moveobject TEAMROCKETBASEB2F_LANCE, $a, $d
+ moveobject TEAMROCKETBASEB2F_ROCKET_GIRL, 21, 16
+ moveobject TEAMROCKETBASEB2F_ROCKET1, 21, 16
+ moveobject TEAMROCKETBASEB2F_DRAGON, 10, 13
+ moveobject TEAMROCKETBASEB2F_LANCE, 10, 13
UnknownScript_0x6cfac:
appear TEAMROCKETBASEB2F_ROCKET_GIRL
appear TEAMROCKETBASEB2F_ROCKET1
@@ -110,7 +110,7 @@ UnknownScript_0x6cfac:
waitbutton
closetext
special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
+ special ReloadSpritesNoPalettes
disappear TEAMROCKETBASEB2F_ROCKET1
disappear TEAMROCKETBASEB2F_ROCKET_GIRL
disappear TEAMROCKETBASEB2F_ROCKET2
@@ -118,7 +118,7 @@ UnknownScript_0x6cfac:
disappear TEAMROCKETBASEB2F_ROCKET4
pause 15
special Special_FadeInQuickly
- setscene $2
+ setscene 2
clearevent EVENT_TEAM_ROCKET_BASE_B2F_LANCE
spriteface TEAMROCKETBASEB2F_LANCE, DOWN
opentext
@@ -166,16 +166,16 @@ LanceHealsCommon:
writetext LanceHealsText1
waitbutton
closetext
- special FadeOutPalettes
- special TrainerRankings_Healings
+ special Special_FadeOutPalettes
+ special Special_StubbedTrainerRankings_Healings
playsound SFX_FULL_HEAL
special HealParty
- special FadeInPalettes
+ special Special_FadeInPalettes
opentext
writetext LanceHealsText2
waitbutton
closetext
- setscene $1
+ setscene 1
setevent EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE
checkcode VAR_FACING
if_equal RIGHT, UnknownScript_0x6d0be
@@ -280,7 +280,7 @@ UnknownScript_0x6d182:
end
UnknownScript_0x6d184:
- moveobject TEAMROCKETBASEB2F_LANCE, $12, $6
+ moveobject TEAMROCKETBASEB2F_LANCE, 18, 6
appear TEAMROCKETBASEB2F_LANCE
applymovement TEAMROCKETBASEB2F_LANCE, MovementData_0x6d27a
spriteface PLAYER, RIGHT
@@ -304,7 +304,7 @@ UnknownScript_0x6d184:
clearflag ENGINE_ROCKET_SIGNAL_ON_CH20
setevent EVENT_ROUTE_43_GATE_ROCKETS
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
- setscene $3
+ setscene 3
clearevent EVENT_LAKE_OF_RAGE_CIVILIANS
setevent EVENT_TURNED_OFF_SECURITY_CAMERAS
setevent EVENT_SECURITY_CAMERA_1
@@ -315,7 +315,7 @@ UnknownScript_0x6d184:
end
TeamRocketBaseB2FLockedDoor:
- dw EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER, .Script
+ conditional_event EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER, .Script
.Script:
opentext
@@ -330,7 +330,7 @@ UnknownScript_0x6d1e8:
writetext UnknownText_0x6dd6b
waitbutton
playsound SFX_ENTER_DOOR
- changeblock $e, $c, $7
+ changeblock 14, 12, $07
reloadmappart
closetext
setevent EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER
@@ -356,8 +356,7 @@ TeamRocketBaseB2FTMThief:
itemball TM_THIEF
TeamRocketBaseB2FHiddenFullHeal:
- dwb EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL, FULL_HEAL
-
+ hiddenitem EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL, FULL_HEAL
MovementData_0x6d212:
step RIGHT
@@ -414,9 +413,9 @@ MovementData_0x6d236:
MovementData_0x6d23b:
fix_facing
- db $39 ; movement
+ set_sliding
jump_step RIGHT
- db $38 ; movement
+ remove_sliding
remove_fixed_facing
step_end
diff --git a/maps/TeamRocketBaseB3F.asm b/maps/TeamRocketBaseB3F.asm
index 63729ce63..38734063a 100644
--- a/maps/TeamRocketBaseB3F.asm
+++ b/maps/TeamRocketBaseB3F.asm
@@ -24,7 +24,7 @@ TeamRocketBaseB3F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .CheckGiovanniDoor
+ callback MAPCALLBACK_TILES, .CheckGiovanniDoor
.LanceGetsPassword:
priorityjump LanceGetPasswordScript
@@ -45,7 +45,7 @@ TeamRocketBaseB3F_MapScriptHeader:
return
.OpenSesame:
- changeblock $a, $8, $7
+ changeblock 10, 8, $07
return
LanceGetPasswordScript:
@@ -60,7 +60,7 @@ LanceGetPasswordScript:
closetext
applymovement TEAMROCKETBASEB3F_LANCE, MovementData_0x6e12c
disappear TEAMROCKETBASEB3F_LANCE
- setscene $1
+ setscene 1
end
RocketBaseRival:
@@ -79,7 +79,7 @@ RocketBaseRival:
applymovement PLAYER, RocketBaseRivalShovesPlayerMovement
applymovement TEAMROCKETBASEB3F_SILVER, RocketBaseRivalLeaveMovement
disappear TEAMROCKETBASEB3F_SILVER
- setscene $2
+ setscene 2
special RestartMapMusic
end
@@ -116,7 +116,7 @@ UnknownScript_0x6e056:
playsound SFX_TACKLE
applymovement TEAMROCKETBASEB3F_ROCKET1, MovementData_0x6e147
disappear TEAMROCKETBASEB3F_ROCKET1
- setscene $3
+ setscene 3
end
RocketBaseMurkrow:
@@ -174,7 +174,7 @@ TrainerScientistMitch:
end
TeamRocketBaseB3FLockedDoor:
- dw EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE, .Script
+ conditional_event EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE, .Script
.Script:
opentext
@@ -194,7 +194,7 @@ TeamRocketBaseB3FLockedDoor:
writetext UnknownText_0x6e9a3
waitbutton
playsound SFX_ENTER_DOOR
- changeblock $a, $8, $7
+ changeblock 10, 8, $07
reloadmappart
closetext
setevent EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE
diff --git a/maps/TimeCapsule.asm b/maps/TimeCapsule.asm
index c24c1606a..3ea686c32 100644
--- a/maps/TimeCapsule.asm
+++ b/maps/TimeCapsule.asm
@@ -10,7 +10,7 @@ TimeCapsule_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .SetWhichChris
+ callback MAPCALLBACK_OBJECTS, .SetWhichChris
.InitializeTimeCapsule:
priorityjump .InitializeAndPreparePokecenter2F
@@ -32,8 +32,8 @@ TimeCapsule_MapScriptHeader:
return
.InitializeAndPreparePokecenter2F:
- setscene $1
- setmapscene POKECENTER_2F, $3
+ setscene 1
+ setmapscene POKECENTER_2F, 3
end
MapTimeCapsuleSignpost1Script:
diff --git a/maps/TinTower1F.asm b/maps/TinTower1F.asm
index ab23a7b3e..f439b8a6c 100644
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -18,8 +18,8 @@ TinTower1F_MapScriptHeader:
.MapCallbacks:
db 2
- dbw MAPCALLBACK_OBJECTS, .NPCsCallback
- dbw MAPCALLBACK_TILES, .StairsCallback
+ callback MAPCALLBACK_OBJECTS, .NPCsCallback
+ callback MAPCALLBACK_TILES, .StairsCallback
.FaceSuicune:
priorityjump .SuicuneBattle
@@ -33,7 +33,7 @@ TinTower1F_MapScriptHeader:
iftrue .GotRainbowWing
checkevent EVENT_BEAT_ELITE_FOUR
iffalse .FaceBeasts
- special SpecialBeastsCheck
+ special Special_BeastsCheck
iffalse .FaceBeasts
clearevent EVENT_TIN_TOWER_1F_WISE_TRIO_2
setevent EVENT_TIN_TOWER_1F_WISE_TRIO_1
@@ -49,7 +49,7 @@ TinTower1F_MapScriptHeader:
iftrue .FoughtSuicune
appear TINTOWER1F_SUICUNE
writebyte RAIKOU
- special SpecialMonCheck
+ special Special_MonCheck
iftrue .NoRaikou
appear TINTOWER1F_RAIKOU
jump .CheckEntei
@@ -58,7 +58,7 @@ TinTower1F_MapScriptHeader:
disappear TINTOWER1F_RAIKOU
.CheckEntei:
writebyte ENTEI
- special SpecialMonCheck
+ special Special_MonCheck
iftrue .NoEntei
appear TINTOWER1F_ENTEI
jump .BeastsDone
@@ -79,7 +79,7 @@ TinTower1F_MapScriptHeader:
.StairsCallback:
checkevent EVENT_GOT_RAINBOW_WING
iftrue .DontHideStairs
- changeblock $a, $2, $9
+ changeblock 10, 2, $09
.DontHideStairs:
return
@@ -87,7 +87,7 @@ TinTower1F_MapScriptHeader:
applymovement PLAYER, TinTowerPlayerMovement1
pause 15
writebyte RAIKOU
- special SpecialMonCheck
+ special Special_MonCheck
iftrue .Next1 ; if player caught Raikou, he doesn't appear in Tin Tower
applymovement TINTOWER1F_RAIKOU, TinTowerRaikouMovement1
spriteface PLAYER, LEFT
@@ -100,7 +100,7 @@ TinTower1F_MapScriptHeader:
waitsfx
.Next1:
writebyte ENTEI
- special SpecialMonCheck
+ special Special_MonCheck
iftrue .Next2 ; if player caught Entei, he doesn't appear in Tin Tower
applymovement TINTOWER1F_ENTEI, TinTowerEnteiMovement1
spriteface PLAYER, RIGHT
@@ -125,36 +125,36 @@ TinTower1F_MapScriptHeader:
disappear TINTOWER1F_SUICUNE
setevent EVENT_FOUGHT_SUICUNE
setevent EVENT_SAW_SUICUNE_ON_ROUTE_42
- setmapscene ROUTE_42, $0
+ setmapscene ROUTE_42, 0
setevent EVENT_SAW_SUICUNE_ON_ROUTE_36
- setmapscene ROUTE_36, $0
+ setmapscene ROUTE_36, 0
setevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
- setmapscene CIANWOOD_CITY, $0
- setscene $1
+ setmapscene CIANWOOD_CITY, 0
+ setscene 1
clearevent EVENT_SET_WHEN_FOUGHT_HO_OH
reloadmapafterbattle
pause 20
spriteface PLAYER, DOWN
playmusic MUSIC_MYSTICALMAN_ENCOUNTER
playsound SFX_ENTER_DOOR
- moveobject TINTOWER1F_EUSINE, $a, $f
+ moveobject TINTOWER1F_EUSINE, 10, 15
appear TINTOWER1F_EUSINE
applymovement TINTOWER1F_EUSINE, MovementData_0x1851ec
playsound SFX_ENTER_DOOR
- moveobject TINTOWER1F_SAGE1, $9, $f
+ moveobject TINTOWER1F_SAGE1, 9, 15
appear TINTOWER1F_SAGE1
applymovement TINTOWER1F_SAGE1, MovementData_0x1851f5
playsound SFX_ENTER_DOOR
- moveobject TINTOWER1F_SAGE2, $9, $f
+ moveobject TINTOWER1F_SAGE2, 9, 15
appear TINTOWER1F_SAGE2
applymovement TINTOWER1F_SAGE2, MovementData_0x1851fb
playsound SFX_ENTER_DOOR
- moveobject TINTOWER1F_SAGE3, $9, $f
+ moveobject TINTOWER1F_SAGE3, 9, 15
appear TINTOWER1F_SAGE3
applymovement TINTOWER1F_SAGE3, MovementData_0x1851fe
- moveobject TINTOWER1F_SAGE1, $7, $d
- moveobject TINTOWER1F_SAGE2, $9, $d
- moveobject TINTOWER1F_SAGE3, $b, $d
+ moveobject TINTOWER1F_SAGE1, 7, 13
+ moveobject TINTOWER1F_SAGE2, 9, 13
+ moveobject TINTOWER1F_SAGE3, 11, 13
spriteface PLAYER, RIGHT
opentext
writetext TinTowerEusineSuicuneText
@@ -197,11 +197,11 @@ TinTower1FSage5Script:
buttonsound
verbosegiveitem RAINBOW_WING
closetext
- refreshscreen $0
+ refreshscreen
earthquake 72
waitsfx
playsound SFX_STRENGTH
- changeblock $a, $2, $20
+ changeblock 10, 2, $20
reloadmappart
setevent EVENT_GOT_RAINBOW_WING
closetext
diff --git a/maps/TinTower4F.asm b/maps/TinTower4F.asm
index 34d1be488..4faf141cd 100644
--- a/maps/TinTower4F.asm
+++ b/maps/TinTower4F.asm
@@ -20,8 +20,7 @@ TinTower4FEscapeRope:
itemball ESCAPE_ROPE
TinTower4FHiddenMaxPotion:
- dwb EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION, MAX_POTION
TinTower4F_MapEventHeader:
; filler
diff --git a/maps/TinTower5F.asm b/maps/TinTower5F.asm
index d8991932c..4bb02de9d 100644
--- a/maps/TinTower5F.asm
+++ b/maps/TinTower5F.asm
@@ -12,12 +12,10 @@ TinTower5FRareCandy:
itemball RARE_CANDY
TinTower5FHiddenFullRestore:
- dwb EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+ hiddenitem EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE, FULL_RESTORE
TinTower5FHiddenCarbos:
- dwb EVENT_TIN_TOWER_5F_HIDDEN_CARBOS, CARBOS
-
+ hiddenitem EVENT_TIN_TOWER_5F_HIDDEN_CARBOS, CARBOS
TinTower5F_MapEventHeader:
; filler
diff --git a/maps/TinTowerRoof.asm b/maps/TinTowerRoof.asm
index 8d5eed029..b04c47800 100644
--- a/maps/TinTowerRoof.asm
+++ b/maps/TinTowerRoof.asm
@@ -7,7 +7,7 @@ TinTowerRoof_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .HoOh
+ callback MAPCALLBACK_OBJECTS, .HoOh
.HoOh:
checkevent EVENT_FOUGHT_HO_OH
diff --git a/maps/TradeCenter.asm b/maps/TradeCenter.asm
index fe9e43ce4..deffd661b 100644
--- a/maps/TradeCenter.asm
+++ b/maps/TradeCenter.asm
@@ -10,7 +10,7 @@ TradeCenter_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .SetWhichChris
+ callback MAPCALLBACK_OBJECTS, .SetWhichChris
.InitializeTradeCenter:
priorityjump .InitializeAndPreparePokecenter2F
@@ -32,8 +32,8 @@ TradeCenter_MapScriptHeader:
return
.InitializeAndPreparePokecenter2F:
- setscene $1
- setmapscene POKECENTER_2F, $1
+ setscene 1
+ setmapscene POKECENTER_2F, 1
end
MapTradeCenterSignpost1Script:
diff --git a/maps/TrainerHouseB1F.asm b/maps/TrainerHouseB1F.asm
index c4219a991..a525c39b8 100644
--- a/maps/TrainerHouseB1F.asm
+++ b/maps/TrainerHouseB1F.asm
@@ -20,13 +20,13 @@ TrainerHouseReceptionistScript:
iftrue .FoughtTooManyTimes
writetext TrainerHouseB1FIntroText
buttonsound
- special SpecialTrainerHouse
+ special Special_TrainerHouse
iffalse .GetCal3Name
- trainertotext CAL, CAL2, $0
+ trainertotext CAL, CAL2, MEM_BUFFER_0
jump .GotName
.GetCal3Name:
- trainertotext CAL, CAL3, $0
+ trainertotext CAL, CAL3, MEM_BUFFER_0
.GotName:
writetext TrainerHouseB1FYourOpponentIsText
buttonsound
@@ -42,7 +42,7 @@ TrainerHouseReceptionistScript:
writetext TrainerHouseB1FCalBeforeText
waitbutton
closetext
- special SpecialTrainerHouse
+ special Special_TrainerHouse
iffalse .NoSpecialBattle
winlosstext TrainerHouseB1FCalBeatenText, 0
setlasttalked TRAINERHOUSEB1F_CHRIS
diff --git a/maps/UndergroundPath.asm b/maps/UndergroundPath.asm
index 557a478be..0f47d7cb8 100644
--- a/maps/UndergroundPath.asm
+++ b/maps/UndergroundPath.asm
@@ -6,12 +6,10 @@ UndergroundPath_MapScriptHeader:
db 0
UndergroundPathHiddenFullRestore:
- dwb EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+ hiddenitem EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
UndergroundPathHiddenXSpecial:
- dwb EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
-
+ hiddenitem EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
UndergroundPath_MapEventHeader:
; filler
diff --git a/maps/UnionCaveB2F.asm b/maps/UnionCaveB2F.asm
index 8aa4ddd5e..ec6c30385 100644
--- a/maps/UnionCaveB2F.asm
+++ b/maps/UnionCaveB2F.asm
@@ -12,7 +12,7 @@ UnionCaveB2F_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Lapras
+ callback MAPCALLBACK_OBJECTS, .Lapras
.Lapras:
checkflag ENGINE_UNION_CAVE_LAPRAS
diff --git a/maps/VermilionCity.asm b/maps/VermilionCity.asm
index 90baf28b0..63bd8116f 100644
--- a/maps/VermilionCity.asm
+++ b/maps/VermilionCity.asm
@@ -12,7 +12,7 @@ VermilionCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_VERMILION
@@ -42,7 +42,7 @@ VermilionCitySuperNerdScript:
VermilionSnorlax:
opentext
- special SpecialSnorlaxAwake
+ special Special_SnorlaxAwake
iftrue UnknownScript_0x1aa9ab
writetext UnknownText_0x1aab64
waitbutton
@@ -68,7 +68,7 @@ VermilionGymBadgeGuy:
checkevent EVENT_GOT_HP_UP_FROM_VERMILION_GUY
iftrue .AlreadyGotItem
checkcode VAR_BADGES
- if_equal 16, .AllBadges
+ if_equal NUM_BADGES, .AllBadges
if_greater_than 13, .MostBadges
if_greater_than 9, .SomeBadges
writetext UnknownText_0x1aabc8
@@ -123,7 +123,7 @@ VermilionCityMartSign:
jumpstd martsign
VermilionCityHiddenFullHeal:
- dwb EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL, FULL_HEAL
+ hiddenitem EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL, FULL_HEAL
VermilionCityTeacherText:
text "VERMILION PORT is"
diff --git a/maps/VermilionGym.asm b/maps/VermilionGym.asm
index 7c86eba76..ac70f5c95 100644
--- a/maps/VermilionGym.asm
+++ b/maps/VermilionGym.asm
@@ -21,7 +21,7 @@ SurgeScript_0x1920a5:
waitbutton
closetext
winlosstext UnknownText_0x192238, 0
- loadtrainer LT_SURGE, 1
+ loadtrainer LT_SURGE, LT_SURGE1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_LTSURGE
@@ -101,7 +101,7 @@ VermilionGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext LT_SURGE, 1, $1
+ trainertotext LT_SURGE, LT_SURGE1, MEM_BUFFER_1
jumpstd gymstatue2
UnknownText_0x192142:
diff --git a/maps/VermilionPort.asm b/maps/VermilionPort.asm
index 8d7af46a8..b1204a0e5 100644
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -11,7 +11,7 @@ VermilionPort_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.DummyScene0:
end
@@ -27,7 +27,7 @@ VermilionPort_MapScriptHeader:
.LeaveFastShipScript:
applymovement PLAYER, MovementData_0x74ef3
appear VERMILIONPORT_SAILOR1
- setscene $0
+ setscene 0
setevent EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1
setevent EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN
setevent EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
@@ -52,7 +52,7 @@ SailorScript_0x74dc4:
waitsfx
applymovement PLAYER, MovementData_0x74ef1
playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
+ special Special_FadeOutPalettes
waitsfx
setevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
clearevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
@@ -68,8 +68,8 @@ SailorScript_0x74dc4:
clearevent EVENT_BEAT_SCHOOLBOY_RICKY
setevent EVENT_FAST_SHIP_DESTINATION_OLIVINE
appear VERMILIONPORT_SAILOR1
- setmapscene FAST_SHIP_1F, $1
- warp FAST_SHIP_1F, $19, $1
+ setmapscene FAST_SHIP_1F, 1
+ warp FAST_SHIP_1F, 25, 1
end
UnknownScript_0x74e1a:
@@ -195,8 +195,7 @@ SuperNerdScript_0x74ee6:
end
VermilionPortHiddenIron:
- dwb EVENT_VERMILION_PORT_HIDDEN_IRON, IRON
-
+ hiddenitem EVENT_VERMILION_PORT_HIDDEN_IRON, IRON
MovementData_0x74ef1:
step DOWN
diff --git a/maps/VictoryRoad.asm b/maps/VictoryRoad.asm
index ef8bd3ead..d8fc51043 100644
--- a/maps/VictoryRoad.asm
+++ b/maps/VictoryRoad.asm
@@ -22,7 +22,7 @@ VictoryRoad_MapScriptHeader:
end
UnknownScript_0x74492:
- moveobject VICTORYROAD_SILVER, $12, $b
+ moveobject VICTORYROAD_SILVER, 18, 11
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
special Special_FadeOutMusic
@@ -32,7 +32,7 @@ UnknownScript_0x74492:
scall UnknownScript_0x744d4
applymovement VICTORYROAD_SILVER, MovementData_0x7454c
disappear VICTORYROAD_SILVER
- setscene $1
+ setscene 1
playmapmusic
end
@@ -46,7 +46,7 @@ UnknownScript_0x744b5:
scall UnknownScript_0x744d4
applymovement VICTORYROAD_SILVER, MovementData_0x74555
disappear VICTORYROAD_SILVER
- setscene $1
+ setscene 1
playmapmusic
end
@@ -112,12 +112,10 @@ VictoryRoadHPUp:
itemball HP_UP
VictoryRoadHiddenMaxPotion:
- dwb EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION, MAX_POTION
-
+ hiddenitem EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION, MAX_POTION
VictoryRoadHiddenFullHeal:
- dwb EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL, FULL_HEAL
-
+ hiddenitem EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL, FULL_HEAL
MovementData_0x74539:
step LEFT
diff --git a/maps/VictoryRoadGate.asm b/maps/VictoryRoadGate.asm
index 95011fd5e..f1ae34fab 100644
--- a/maps/VictoryRoadGate.asm
+++ b/maps/VictoryRoadGate.asm
@@ -29,7 +29,7 @@ VictoryRoadGateBadgeCheckScript:
writetext VictoryRoadGateOfficerText
buttonsound
checkcode VAR_BADGES
- if_greater_than 7, .AllEightBadges
+ if_greater_than NUM_JOHTO_BADGES - 1, .AllEightBadges
writetext VictoryRoadGateNotEnoughBadgesText
waitbutton
closetext
@@ -40,7 +40,7 @@ VictoryRoadGateBadgeCheckScript:
writetext VictoryRoadGateEightBadgesText
waitbutton
closetext
- setscene $1
+ setscene 1
end
VictoryRoadGateLeftBlackBeltScript:
diff --git a/maps/VioletCity.asm b/maps/VioletCity.asm
index 34939ff3e..63dd3b92c 100644
--- a/maps/VioletCity.asm
+++ b/maps/VioletCity.asm
@@ -14,7 +14,7 @@ VioletCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_VIOLET
@@ -98,7 +98,7 @@ VioletCityFruitTreeScript:
fruittree FRUITTREE_VIOLET_CITY
VioletCityHiddenHyperPotion:
- dwb EVENT_VIOLET_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
+ hiddenitem EVENT_VIOLET_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
VioletCityFollowEarl_MovementData:
big_step DOWN
diff --git a/maps/VioletGym.asm b/maps/VioletGym.asm
index 84effea16..fc7cb0169 100644
--- a/maps/VioletGym.asm
+++ b/maps/VioletGym.asm
@@ -20,7 +20,7 @@ FalknerScript_0x683c2:
waitbutton
closetext
winlosstext UnknownText_0x6854a, 0
- loadtrainer FALKNER, 1
+ loadtrainer FALKNER, FALKNER1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_FALKNER
@@ -36,7 +36,7 @@ FalknerScript_0x683c2:
iftrue .SpeechAfterTM
setevent EVENT_BEAT_BIRD_KEEPER_ROD
setevent EVENT_BEAT_BIRD_KEEPER_ABE
- setmapscene ELMS_LAB, $2
+ setmapscene ELMS_LAB, 2
specialphonecall SPECIALCALL_ASSISTANT
writetext UnknownText_0x685c8
buttonsound
@@ -109,7 +109,7 @@ VioletGymStatue:
iftrue .Beaten
jumpstd gymstatue1
.Beaten:
- trainertotext FALKNER, 1, $1
+ trainertotext FALKNER, FALKNER1, MEM_BUFFER_1
jumpstd gymstatue2
UnknownText_0x68473:
diff --git a/maps/VioletPokecenter1F.asm b/maps/VioletPokecenter1F.asm
index e4c6e8df6..757ab1f44 100644
--- a/maps/VioletPokecenter1F.asm
+++ b/maps/VioletPokecenter1F.asm
@@ -27,12 +27,12 @@ VioletPokecenter1F_ElmsAideScript:
checkcode VAR_PARTYCOUNT
if_equal PARTY_LENGTH, .PartyFull
giveegg TOGEPI, 5
- stringtotext .eggname, $1
+ stringtotext .eggname, MEM_BUFFER_1
scall .AideGivesEgg
setevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
clearevent EVENT_ELMS_AIDE_IN_LAB
clearevent EVENT_TOGEPI_HATCHED
- setmapscene ROUTE_32, $1
+ setmapscene ROUTE_32, 1
writetext UnknownText_0x695c5
waitbutton
closetext
diff --git a/maps/ViridianCity.asm b/maps/ViridianCity.asm
index 5b5e077cb..c29422c52 100644
--- a/maps/ViridianCity.asm
+++ b/maps/ViridianCity.asm
@@ -10,7 +10,7 @@ ViridianCity_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ callback MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_VIRIDIAN
diff --git a/maps/ViridianGym.asm b/maps/ViridianGym.asm
index bf6a99290..19f8654d9 100644
--- a/maps/ViridianGym.asm
+++ b/maps/ViridianGym.asm
@@ -18,7 +18,7 @@ ViridianGymBlueScript:
waitbutton
closetext
winlosstext LeaderBlueWinText, 0
- loadtrainer BLUE, 1
+ loadtrainer BLUE, BLUE1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_BLUE
@@ -60,7 +60,7 @@ ViridianGymStatue:
jumpstd gymstatue1
.Beaten:
- trainertotext BLUE, 1, $1
+ trainertotext BLUE, BLUE1, MEM_BUFFER_1
jumpstd gymstatue2
LeaderBlueBeforeText:
diff --git a/maps/WhirlIslandB1F.asm b/maps/WhirlIslandB1F.asm
index 011b0ac8f..c84725509 100644
--- a/maps/WhirlIslandB1F.asm
+++ b/maps/WhirlIslandB1F.asm
@@ -32,16 +32,13 @@ WhirlIslandB1FBoulder:
jumpstd strengthboulder
WhirlIslandB1FHiddenRareCandy:
- dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY, RARE_CANDY
-
+ hiddenitem EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY, RARE_CANDY
WhirlIslandB1FHiddenUltraBall:
- dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+ hiddenitem EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
WhirlIslandB1FHiddenFullRestore:
- dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+ hiddenitem EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE, FULL_RESTORE
WhirlIslandB1F_MapEventHeader:
; filler
diff --git a/maps/WhirlIslandLugiaChamber.asm b/maps/WhirlIslandLugiaChamber.asm
index 39285cc15..7ee64bf74 100644
--- a/maps/WhirlIslandLugiaChamber.asm
+++ b/maps/WhirlIslandLugiaChamber.asm
@@ -7,7 +7,7 @@ WhirlIslandLugiaChamber_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .Lugia
+ callback MAPCALLBACK_OBJECTS, .Lugia
.Lugia:
checkevent EVENT_FOUGHT_LUGIA
diff --git a/maps/WillsRoom.asm b/maps/WillsRoom.asm
index d72451638..9ea754d1a 100644
--- a/maps/WillsRoom.asm
+++ b/maps/WillsRoom.asm
@@ -9,7 +9,7 @@ WillsRoom_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_TILES, .WillsRoomDoors
+ callback MAPCALLBACK_TILES, .WillsRoomDoors
.LockDoor:
priorityjump .WillsDoorLocksBehindYou
@@ -21,11 +21,11 @@ WillsRoom_MapScriptHeader:
.WillsRoomDoors:
checkevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
iffalse .KeepDoorsClosed
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
.KeepDoorsClosed:
checkevent EVENT_WILLS_ROOM_EXIT_OPEN
iffalse .OpenDoors
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
.OpenDoors:
return
@@ -34,10 +34,10 @@ WillsRoom_MapScriptHeader:
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
- changeblock $4, $e, $2a
+ changeblock 4, 14, $2a
reloadmappart
closetext
- setscene $1
+ setscene 1
setevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -51,7 +51,7 @@ WillScript_Battle:
waitbutton
closetext
winlosstext WillScript_WillBeatenText, 0
- loadtrainer WILL, 1
+ loadtrainer WILL, WILL1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_ELITE_4_WILL
@@ -60,7 +60,7 @@ WillScript_Battle:
waitbutton
closetext
playsound SFX_ENTER_DOOR
- changeblock $4, $2, $16
+ changeblock 4, 2, $16
reloadmappart
closetext
setevent EVENT_WILLS_ROOM_EXIT_OPEN
diff --git a/maps/WiseTriosRoom.asm b/maps/WiseTriosRoom.asm
index ab072fb36..c3440c889 100644
--- a/maps/WiseTriosRoom.asm
+++ b/maps/WiseTriosRoom.asm
@@ -14,7 +14,7 @@ WiseTriosRoom_MapScriptHeader:
.MapCallbacks:
db 1
- dbw MAPCALLBACK_OBJECTS, .WiseTrioCallback
+ callback MAPCALLBACK_OBJECTS, .WiseTrioCallback
.DummyScene0:
end
@@ -105,7 +105,7 @@ TrainerSageKoji:
applymovement WISETRIOSROOM_SAGE6, MovementData_0x98628
spriteface WISETRIOSROOM_SAGE6, UP
setevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER
- setscene $1
+ setscene 1
end
UnknownScript_0x9861b:
diff --git a/maps/blockdata.asm b/maps/blockdata.asm
index 9e44798ad..4f0fe925e 100644
--- a/maps/blockdata.asm
+++ b/maps/blockdata.asm
@@ -175,7 +175,7 @@ BluesHouse_BlockData:
PewterNidoranSpeechHouse_BlockData:
PewterSnoozeSpeechHouse_BlockData:
FuchsiaBillSpeechHouse_BlockData:
-LavenderTownSpeechHouse_BlockData:
+LavenderSpeechHouse_BlockData:
LavenderNameRater_BlockData:
Route12SuperRodHouse_BlockData:
Route28FamousSpeechHouse_BlockData:
@@ -183,7 +183,7 @@ CeladonMansionRoofHouse_BlockData:
Route16FuchsiaSpeechHouse_BlockData:
ManiasHouse_BlockData:
CianwoodPharmacy_BlockData:
-CianwoodCityPhotoStudio_BlockData:
+CianwoodPhotoStudio_BlockData:
CianwoodLugiaSpeechHouse_BlockData:
PokeSeersHouse_BlockData:
ViridianNicknameSpeechHouse_BlockData:
@@ -210,12 +210,12 @@ Route34IlexForestGate_BlockData:
Route6SaffronGate_BlockData:
Route40BattleTowerGate_BlockData:
Route2Gate_BlockData:
-Route2946Gate_BlockData:
-Route5SaffronCityGate_BlockData:
+Route29Route46Gate_BlockData:
+Route5SaffronGate_BlockData:
INCBIN "maps/NorthSouthGate.blk"
-BetaTeakCity_BlockData:
- INCBIN "maps/BetaTeakCity.blk"
+BetaEcruteakCity_BlockData:
+ INCBIN "maps/BetaEcruteakCity.blk"
BetaCherrygroveCity_BlockData:
INCBIN "maps/BetaCherrygroveCity.blk"
@@ -276,7 +276,7 @@ Route15FuchsiaGate_BlockData:
Route8SaffronGate_BlockData:
Route16Gate_BlockData:
Route7SaffronGate_BlockData:
-Route1718Gate_BlockData:
+Route17Route18Gate_BlockData:
Route31VioletGate_BlockData:
INCBIN "maps/EastWestGate.blk"
@@ -372,17 +372,17 @@ BetaPewterMuseumOfScience2F_BlockData:
EarlsPokemonAcademy_BlockData:
INCBIN "maps/EarlsPokemonAcademy.blk"
-BetaCinnabarIslandPokemonLabHallway_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabHallway.blk"
+BetaCinnabarPokemonLabHallway_BlockData:
+ INCBIN "maps/BetaCinnabarPokemonLabHallway.blk"
-BetaCinnabarIslandPokemonLabRoom1_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabRoom1.blk"
+BetaCinnabarPokemonLabRoom1_BlockData:
+ INCBIN "maps/BetaCinnabarPokemonLabRoom1.blk"
-BetaCinnabarIslandPokemonLabRoom2_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabRoom2.blk"
+BetaCinnabarPokemonLabRoom2_BlockData:
+ INCBIN "maps/BetaCinnabarPokemonLabRoom2.blk"
-BetaCinnabarIslandPokemonLabRoom3_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabRoom3.blk"
+BetaCinnabarPokemonLabRoom3_BlockData:
+ INCBIN "maps/BetaCinnabarPokemonLabRoom3.blk"
GoldenrodDeptStore1F_BlockData:
CeladonDeptStore1F_BlockData:
@@ -824,8 +824,8 @@ FastShip1F_BlockData:
FastShipB1F_BlockData:
INCBIN "maps/FastShipB1F.blk"
-BetaSSAquaInsideCutOut_BlockData:
- INCBIN "maps/BetaSSAquaInsideCutOut.blk"
+BetaFastShipInsideCutOut_BlockData:
+ INCBIN "maps/BetaFastShipInsideCutOut.blk"
FastShipCabins_NNW_NNE_NE_BlockData:
INCBIN "maps/FastShipCabins_NNW_NNE_NE.blk"
@@ -849,8 +849,8 @@ SafariZoneMainOffice_BlockData:
KrissHouse2F_BlockData:
INCBIN "maps/KrissHouse2F.blk"
-SaffronTrainStation_BlockData:
- INCBIN "maps/SaffronTrainStation.blk"
+SaffronMagnetTrainStation_BlockData:
+ INCBIN "maps/SaffronMagnetTrainStation.blk"
CeruleanGym_BlockData:
INCBIN "maps/CeruleanGym.blk"
diff --git a/maps/map_headers.asm b/maps/map_headers.asm
index ac4b20ece..8ad8d7333 100644
--- a/maps/map_headers.asm
+++ b/maps/map_headers.asm
@@ -373,7 +373,7 @@ MapGroup_Lavender:
map_header LavenderPokecenter1F, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header LavenderPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MrFujisHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header LavenderTownSpeechHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header LavenderSpeechHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header LavenderNameRater, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header LavenderMart, TILESET_MART, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SoulHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -424,7 +424,7 @@ MapGroup_Celadon:
map_header Route16FuchsiaSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_16, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route16Gate, TILESET_GATE, GATE, ROUTE_16, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route7SaffronGate, TILESET_GATE, GATE, ROUTE_7, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route1718Gate, TILESET_GATE, GATE, ROUTE_17, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route17Route18Gate, TILESET_GATE, GATE, ROUTE_17, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
MapGroup_Cianwood:
@@ -435,7 +435,7 @@ MapGroup_Cianwood:
map_header CianwoodGym, TILESET_SPROUT_TOWER, INDOOR, CIANWOOD_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodPokecenter1F, TILESET_POKECENTER, INDOOR, CIANWOOD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodPharmacy, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CianwoodCityPhotoStudio, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CianwoodPhotoStudio, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodLugiaSpeechHouse, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header PokeSeersHouse, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header BattleTower1F, TILESET_BATTLE_TOWER, INDOOR, BATTLE_TOWER, MUSIC_BATTLE_TOWER_LOBBY, 1, PALETTE_DAY, FISHGROUP_SHORE
@@ -475,7 +475,7 @@ MapGroup_NewBark:
map_header Route26HealSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_26, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route26DayofWeekSiblingsHouse, TILESET_HOUSE_1, INDOOR, ROUTE_26, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route27SandstormHouse, TILESET_HOUSE_1, INDOOR, ROUTE_27, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route2946Gate, TILESET_GATE, GATE, ROUTE_29, MUSIC_ROUTE_29, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route29Route46Gate, TILESET_GATE, GATE, ROUTE_29, MUSIC_ROUTE_29, 0, PALETTE_DAY, FISHGROUP_SHORE
MapGroup_Saffron:
@@ -487,12 +487,12 @@ MapGroup_Saffron:
map_header SaffronPokecenter1F, TILESET_POKECENTER, INDOOR, SAFFRON_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SaffronPokecenter2FBeta, TILESET_POKECENTER, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MrPsychicsHouse, TILESET_HOUSE_1, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header SaffronTrainStation, TILESET_TRAIN_STATION, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header SaffronMagnetTrainStation, TILESET_TRAIN_STATION, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SilphCo1F, TILESET_POWER_PLANT, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CopycatsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CopycatsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route5SaffronCityGate, TILESET_GATE, GATE, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route5SaffronGate, TILESET_GATE, GATE, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5CleanseTagSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
diff --git a/maps/second_map_headers.asm b/maps/second_map_headers.asm
index 3628babd2..378b3d05a 100644
--- a/maps/second_map_headers.asm
+++ b/maps/second_map_headers.asm
@@ -593,7 +593,7 @@ ENDM
map_header_2 LavenderPokecenter1F, LAVENDER_POKECENTER_1F, $0, 0
map_header_2 LavenderPokecenter2FBeta, LAVENDER_POKECENTER_2F_BETA, $0, 0
map_header_2 MrFujisHouse, MR_FUJIS_HOUSE, $0, 0
- map_header_2 LavenderTownSpeechHouse, LAVENDER_TOWN_SPEECH_HOUSE, $0, 0
+ map_header_2 LavenderSpeechHouse, LAVENDER_SPEECH_HOUSE, $0, 0
map_header_2 LavenderNameRater, LAVENDER_NAME_RATER, $0, 0
map_header_2 LavenderMart, LAVENDER_MART, $0, 0
map_header_2 SoulHouse, SOUL_HOUSE, $0, 0
@@ -629,12 +629,12 @@ ENDM
map_header_2 Route16FuchsiaSpeechHouse, ROUTE_16_FUCHSIA_SPEECH_HOUSE, $0, 0
map_header_2 Route16Gate, ROUTE_16_GATE, $0, 0
map_header_2 Route7SaffronGate, ROUTE_7_SAFFRON_GATE, $0, 0
- map_header_2 Route1718Gate, ROUTE_17_18_GATE, $0, 0
+ map_header_2 Route17Route18Gate, ROUTE_17_ROUTE_18_GATE, $0, 0
map_header_2 ManiasHouse, MANIAS_HOUSE, $0, 0
map_header_2 CianwoodGym, CIANWOOD_GYM, $0, 0
map_header_2 CianwoodPokecenter1F, CIANWOOD_POKECENTER_1F, $0, 0
map_header_2 CianwoodPharmacy, CIANWOOD_PHARMACY, $0, 0
- map_header_2 CianwoodCityPhotoStudio, CIANWOOD_CITY_PHOTO_STUDIO, $0, 0
+ map_header_2 CianwoodPhotoStudio, CIANWOOD_PHOTO_STUDIO, $0, 0
map_header_2 CianwoodLugiaSpeechHouse, CIANWOOD_LUGIA_SPEECH_HOUSE, $0, 0
map_header_2 PokeSeersHouse, POKE_SEERS_HOUSE, $0, 0
map_header_2 BattleTower1F, BATTLE_TOWER_1F, $0, 0
@@ -661,19 +661,19 @@ ENDM
map_header_2 Route26HealSpeechHouse, ROUTE_26_HEAL_SPEECH_HOUSE, $0, 0
map_header_2 Route26DayofWeekSiblingsHouse, ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE, $0, 0
map_header_2 Route27SandstormHouse, ROUTE_27_SANDSTORM_HOUSE, $0, 0
- map_header_2 Route2946Gate, ROUTE_29_46_GATE, $0, 0
+ map_header_2 Route29Route46Gate, ROUTE_29_ROUTE_46_GATE, $0, 0
map_header_2 FightingDojo, FIGHTING_DOJO, $0, 0
map_header_2 SaffronGym, SAFFRON_GYM, $0, 0
map_header_2 SaffronMart, SAFFRON_MART, $0, 0
map_header_2 SaffronPokecenter1F, SAFFRON_POKECENTER_1F, $0, 0
map_header_2 SaffronPokecenter2FBeta, SAFFRON_POKECENTER_2F_BETA, $0, 0
map_header_2 MrPsychicsHouse, MR_PSYCHICS_HOUSE, $0, 0
- map_header_2 SaffronTrainStation, SAFFRON_TRAIN_STATION, $0, 0
+ map_header_2 SaffronMagnetTrainStation, SAFFRON_MAGNET_TRAIN_STATION, $0, 0
map_header_2 SilphCo1F, SILPH_CO_1F, $0, 0
map_header_2 CopycatsHouse1F, COPYCATS_HOUSE_1F, $0, 0
map_header_2 CopycatsHouse2F, COPYCATS_HOUSE_2F, $0, 0
map_header_2 Route5UndergroundPathEntrance, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, $0, 0
- map_header_2 Route5SaffronCityGate, ROUTE_5_SAFFRON_CITY_GATE, $0, 0
+ map_header_2 Route5SaffronGate, ROUTE_5_SAFFRON_GATE, $0, 0
map_header_2 Route5CleanseTagSpeechHouse, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, $0, 0
map_header_2 CherrygroveMart, CHERRYGROVE_MART, $0, 0
map_header_2 CherrygrovePokecenter1F, CHERRYGROVE_POKECENTER_1F, $0, 0
diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm
index a1ddb5ad2..53bce47d3 100755
--- a/mobile/fixed_words.asm
+++ b/mobile/fixed_words.asm
@@ -33,8 +33,7 @@ Function11c075: ; 11c075
ret
; 11c082
-Function11c082: ; 11c082
-; XXX
+Unreferenced_Function11c082: ; 11c082
push de
ld a, c
call Function11c254
@@ -275,7 +274,7 @@ CopyMobileEZChatToC608: ; 11c156
jr .copy_string
; 11c1ab
-Function11c1ab: ; 11c1ab
+Special_Function11c1ab: ; 11c1ab
ld a, [hInMenu]
push af
ld a, $1
@@ -426,11 +425,11 @@ EZChat_MasterLoop: ; 11c283
.SpawnObjects: ; 11c2e9 (47:42e9)
depixel 3, 1, 2, 5
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
depixel 8, 1, 2, 5
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -438,7 +437,7 @@ EZChat_MasterLoop: ; 11c283
ld [hl], a
depixel 9, 2, 2, 0
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -446,7 +445,7 @@ EZChat_MasterLoop: ; 11c283
ld [hl], a
depixel 10, 16
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -454,7 +453,7 @@ EZChat_MasterLoop: ; 11c283
ld [hl], a
depixel 10, 4
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -462,7 +461,7 @@ EZChat_MasterLoop: ; 11c283
ld [hl], a
depixel 10, 2
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -2561,7 +2560,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
jr .load
.three ; 11d10f (47:510f)
- ld a, SPRITE_ANIM_FRAMESET_27
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2
call ReinitSpriteAnimFrame
ld a, [wMobileCommsJumptableIndex]
sla a
@@ -2587,7 +2586,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
ret
.four ; 11d134 (47:5134)
- ld a, SPRITE_ANIM_FRAMESET_27
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2
call ReinitSpriteAnimFrame
ld a, [wcd2a]
sla a
@@ -2596,7 +2595,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
jr .load
.five ; 11d145 (47:5145)
- ld a, SPRITE_ANIM_FRAMESET_27
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2
call ReinitSpriteAnimFrame
ld a, [wcd2c]
sla a
@@ -2605,7 +2604,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
jr .load
.six ; 11d156 (47:5156)
- ld a, SPRITE_ANIM_FRAMESET_2A
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_5
call ReinitSpriteAnimFrame
; X = [wcd4a] * 8 + 24
ld a, [wcd4a]
@@ -2628,12 +2627,12 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
.seven ; 11d175 (47:5175)
ld a, [wEZChatCursorYCoord]
cp $4
- jr z, .frameset_26
- ld a, SPRITE_ANIM_FRAMESET_28
+ jr z, .cursor0
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3
jr .got_frameset
-.frameset_26
- ld a, SPRITE_ANIM_FRAMESET_26
+.cursor0
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1
.got_frameset
call ReinitSpriteAnimFrame
ld a, [wEZChatCursorYCoord]
@@ -2685,12 +2684,12 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
.nine ; 11d1d1 (47:51d1)
ld d, -13 * 8
- ld a, SPRITE_ANIM_FRAMESET_2C
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_7
jr .eight_nine_load
.eight ; 11d1d7 (47:51d7)
ld d, 2 * 8
- ld a, SPRITE_ANIM_FRAMESET_2B
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_6
.eight_nine_load ; 11d1db (47:51db)
push de
call ReinitSpriteAnimFrame
@@ -2713,7 +2712,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
ret
.ten ; 11d1fc (47:51fc)
- ld a, SPRITE_ANIM_FRAMESET_26
+ ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1
call ReinitSpriteAnimFrame
ld a, $8
ld e, a
@@ -2825,54 +2824,54 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6)
dbpixel 4, 12
.FramesetsIDs_Two: ; 11d2be
- db SPRITE_ANIM_FRAMESET_28 ; 00
- db SPRITE_ANIM_FRAMESET_28 ; 01
- db SPRITE_ANIM_FRAMESET_28 ; 02
- db SPRITE_ANIM_FRAMESET_28 ; 03
- db SPRITE_ANIM_FRAMESET_28 ; 04
- db SPRITE_ANIM_FRAMESET_28 ; 05
- db SPRITE_ANIM_FRAMESET_28 ; 06
- db SPRITE_ANIM_FRAMESET_28 ; 07
- db SPRITE_ANIM_FRAMESET_28 ; 08
- db SPRITE_ANIM_FRAMESET_28 ; 09
- db SPRITE_ANIM_FRAMESET_28 ; 0a
- db SPRITE_ANIM_FRAMESET_28 ; 0b
- db SPRITE_ANIM_FRAMESET_28 ; 0c
- db SPRITE_ANIM_FRAMESET_28 ; 0d
- db SPRITE_ANIM_FRAMESET_28 ; 0e
- db SPRITE_ANIM_FRAMESET_28 ; 0f
- db SPRITE_ANIM_FRAMESET_28 ; 10
- db SPRITE_ANIM_FRAMESET_28 ; 11
- db SPRITE_ANIM_FRAMESET_28 ; 12
- db SPRITE_ANIM_FRAMESET_28 ; 13
- db SPRITE_ANIM_FRAMESET_28 ; 14
- db SPRITE_ANIM_FRAMESET_28 ; 15
- db SPRITE_ANIM_FRAMESET_28 ; 16
- db SPRITE_ANIM_FRAMESET_28 ; 17
- db SPRITE_ANIM_FRAMESET_28 ; 18
- db SPRITE_ANIM_FRAMESET_28 ; 19
- db SPRITE_ANIM_FRAMESET_28 ; 1a
- db SPRITE_ANIM_FRAMESET_28 ; 1b
- db SPRITE_ANIM_FRAMESET_28 ; 1c
- db SPRITE_ANIM_FRAMESET_28 ; 1d
- db SPRITE_ANIM_FRAMESET_28 ; 1e
- db SPRITE_ANIM_FRAMESET_28 ; 1f
- db SPRITE_ANIM_FRAMESET_28 ; 20
- db SPRITE_ANIM_FRAMESET_28 ; 21
- db SPRITE_ANIM_FRAMESET_28 ; 22
- db SPRITE_ANIM_FRAMESET_28 ; 23
- db SPRITE_ANIM_FRAMESET_28 ; 24
- db SPRITE_ANIM_FRAMESET_28 ; 25
- db SPRITE_ANIM_FRAMESET_28 ; 26
- db SPRITE_ANIM_FRAMESET_28 ; 27
- db SPRITE_ANIM_FRAMESET_28 ; 28
- db SPRITE_ANIM_FRAMESET_28 ; 29
- db SPRITE_ANIM_FRAMESET_28 ; 2a
- db SPRITE_ANIM_FRAMESET_28 ; 2b
- db SPRITE_ANIM_FRAMESET_29 ; 2c
- db SPRITE_ANIM_FRAMESET_26 ; 2d
- db SPRITE_ANIM_FRAMESET_26 ; 2e
- db SPRITE_ANIM_FRAMESET_26 ; 2f
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 00
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 01
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 02
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 03
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 04
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 05
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 06
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 07
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 08
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 09
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0a
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0b
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0c
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0d
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0e
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0f
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 10
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 11
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 12
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 13
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 14
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 15
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 16
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 17
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 18
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 19
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1a
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1b
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1c
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1d
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1e
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1f
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 20
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 21
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 22
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 23
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 24
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 25
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 26
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 27
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 28
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 29
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 2a
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 2b
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_4 ; 2c
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2d
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2e
+ db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2f
.UpdateObjectFlags: ; 11d2ee (47:52ee)
ld hl, wcd24
@@ -3022,9 +3021,9 @@ EZChat_GetSeenPokemonByKana: ; 11d3ba
ld [wcd2e], a
ld [hl], a
- ld a, LOW(SortedPokemon)
+ ld a, LOW(EZChat_SortedPokemon)
ld [wcd2f], a
- ld a, HIGH(SortedPokemon)
+ ld a, HIGH(EZChat_SortedPokemon)
ld [wcd30], a
ld a, LOW($c6a8)
@@ -3093,7 +3092,7 @@ EZChat_GetSeenPokemonByKana: ; 11d3ba
or b
jr nz, .loop1
-; recover the pointer from wcd2f (default: SortedPokemon)
+; recover the pointer from wcd2f (default: EZChat_SortedPokemon)
ld a, [wcd2f]
ld l, a
ld a, [wcd30]
@@ -3292,101 +3291,7 @@ EZChat_GetCategoryWordsByKana: ; 11d4aa
ret
; 11d4fe
-SortedPokemon:
-; Pokemon sorted by kana.
-; Notably, Rhydon is missing.
- dw .a
- dw .i
- dw .u
- dw .e
- dw .o
- dw .ka_ga
- dw .ki_gi
- dw .ku_gu
- dw .ke_ge
- dw .ko_go
- dw .sa_za
- dw .shi_ji
- dw .su_zu
- dw .se_ze
- dw .so_zo
- dw .ta_da
- dw .chi_dhi
- dw .tsu_du
- dw .te_de
- dw .to_do
- dw .na
- dw .ni
- dw .nu
- dw .ne
- dw .no
- dw .ha_ba_pa
- dw .hi_bi_pi
- dw .fu_bu_pu
- dw .he_be_pe
- dw .ho_bo_po
- dw .ma
- dw .mi
- dw .mu
- dw .me
- dw .mo
- dw .ya
- dw .yu
- dw .yo
- dw .ra
- dw .ri
- dw .ru
- dw .re
- dw .ro
- dw .wa
- dw .end
-
-.a: db EKANS, ARBOK, SEAKING, ARIADOS, CROCONAW, UNOWN, -1
-.i: db EEVEE, GEODUDE, SPINARAK, PILOSWINE, ONIX, -1
-.u: db ARCANINE, SUDOWOODO, WEEPINBELL, VICTREEBEL, WOOPER, SWINUB, -1
-.e: db SKARMORY, AIPOM, ESPEON, HITMONCHAN, ELEKID, ELECTABUZZ, ENTEI, -1
-.o: db FERALIGATR, FURRET, OCTILLERY, PRIMEAPE, SENTRET, STANTLER, SPEAROW, FEAROW, OMASTAR, OMANYTE, -1
-.ka_ga db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN, -1
-.ki_gi db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER, -1
-.ku_gu db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT, -1
-.ke_ge db ABRA, GENGAR, TAUROS, -1
-.ko_go db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT, -1
-.sa_za db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH, -1 ; RHYDON should lead this list
-.shi_ji db SEADRA, SHELLDER, VAPOREON, DEWGONG, -1
-.su_zu db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE, -1
-.se_ze db SQUIRTLE, CELEBI, -1
-.so_zo db WOBBUFFET, -1
-.ta_da db DUGTRIO, HORSEA, EXEGGCUTE, -1
-.chi_dhi db CHIKORITA, CHINCHOU, -1
-.tsu_du db SHUCKLE, -1
-.te_de db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS, -1
-.to_do db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN, -1
-.na db ODDISH, EXEGGUTOR, -1
-.ni db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG, -1
-.nu db QUAGSIRE, -1
-.ne db NATU, XATU, -1
-.no db DUNSPARCE, -1
-.ha_ba_pa db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR, -1
-.hi_bi_pi db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB, -1
-.fu_bu_pu db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL, -1
-.he_be_pe db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG, -1
-.ho_bo_po db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2, -1
-.ma db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE, -1
-.mi db DRATINI, MEW, MEWTWO, MILTANK, -1
-.mu db MISDREAVUS, SMOOCHUM, -1
-.me db MEGANIUM, DITTO, TENTACOOL, MAREEP, -1
-.mo db FLAAFFY, VENOMOTH, TANGELA, -1
-.ya db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA, -1
-.yu db KADABRA, -1
-.yo db LARVITAR, NOCTOWL, -1
-.ra db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN, -1
-.ri db CHARMELEON, CHARIZARD, URSARING, -1
-.ru db JYNX, LUGIA, -1
-.re db MAGNETON, LEDIAN, LEDYBA, -1
-.ro db VULPIX, -1
-.wa db JUMPLUFF, TOTODILE, MACHOP;, -1
-.end db -1
-; 11d67e
+INCLUDE "data/pokemon/ezchat_order.asm"
GFX_11d67e:
INCBIN "gfx/pokedex/select_start.2bpp"
diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm
index 14b787645..e8c89ce9c 100755
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -564,8 +564,7 @@ MobileDesc_ZipCode: db "Your zip code?@"
MenuDataHeader_0x484f1: ; 0x484f1
db $40 ; flags
- db 02, 11 ; start coords
- db 07, 19 ; end coords
+ menu_coords 11, 2, SCREEN_WIDTH - 1, 7
dw MenuData2_0x484f9
db 1 ; default option
; 0x484f9
@@ -580,23 +579,19 @@ String_484ff: db "Girl@"
MenuDataHeader_0x48504: ; 0x48504
db $40 ; flags
- db 00, 10 ; start coords
- db 17, 19 ; end coords
+ menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
MenuDataHeader_0x48509: ; 0x48509
db $40 ; flags
- db 05, 10 ; start coords
- db 07, 19 ; end coords
+ menu_coords 10, 5, SCREEN_WIDTH - 1, 7
MenuDataHeader_0x4850e: ; 0x4850e
db $40 ; flags
- db 09, 10 ; start coords
- db 11, 19 ; end coords
+ menu_coords 10, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
MenuDataHeader_0x48513: ; 0x48513
db $40 ; flags
- db 01, 11 ; start coords
- db 12, 18 ; end coords
+ menu_coords 11, 1, 18, 12
dw MenuData2_0x4851b
db 1 ; default option
; 0x4851b
@@ -1278,8 +1273,7 @@ Function48a9a: ; 48a9a (12:4a9a)
MenuDataHeader_0x48a9c: ; 0x48a9c
db $40 ; flags
- db 08, 10 ; start coords
- db 13, 19 ; end coord
+ menu_coords 10, 8, SCREEN_WIDTH - 1, 13
String_48aa1: ; 48aa1
db "Tell Now"
@@ -1621,9 +1615,8 @@ Function48c63: ; 48c63
ret
; 48c8e
-Function48c8e: ; 48c8e
-; unreferenced
- ld hl, $d02a
+Unreferenced_Function48c8e: ; 48c8e
+ ld hl, wd019 + $11
ld d, h
ld e, l
farcall Function48c63
diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm
index ba663cf86..19fcb16aa 100755
--- a/mobile/mobile_12_2.asm
+++ b/mobile/mobile_12_2.asm
@@ -159,7 +159,7 @@ MobileCheckOwnMonAnywhere: ; 4a843
ret
; 4a927
-FindItemInPCOrBag: ; 4a927
+UnusedSpecial_FindItemInPCOrBag: ; 4a927
ld a, [ScriptVar]
ld [CurItem], a
ld hl, PCItems
@@ -716,8 +716,7 @@ Function4ac58: ; 4ac58
MenuDataHeader_0x4aca2: ; 0x4aca2
db $40 ; flags
- db 09, 11 ; start coords
- db 17, 19 ; end coords
+ menu_coords 11, 9, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw NULL
db 1 ; default option
; 0x4acaa
diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm
index 9180c29e0..8f88299d8 100644
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -278,8 +278,7 @@ Function89261: ; 89261
MenuDataHeader_0x892a3: ; 0x892a3
db $40 ; flags
- db 05, 10 ; start coords
- db 09, 15 ; end coords
+ menu_coords 10, 5, 15, 9
dw MenuData2_0x892ab
db 1 ; default option
; 0x892ab
@@ -572,7 +571,7 @@ Function89448: ; 89448 (22:5448)
; Clears the Sprites array
push af
ld hl, Sprites
- ld d, $10 * 6
+ ld d, 24 * SPRITEOAMSTRUCT_LENGTH
xor a
.loop
ld [hli], a
@@ -1228,7 +1227,7 @@ Function897af: ; 897af
xor a
ld [CurPartySpecies], a
ld de, vTiles2 tile $37
- farcall GetTrainerPic
+ farcall Predef_GetTrainerPic
pop bc
ret
; 897d5
@@ -1260,7 +1259,7 @@ Function897d5: ; 897d5
ld [hGraphicStartTile], a
hlcoord 12, 3
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call Function8963d
pop bc
ret
@@ -1924,7 +1923,7 @@ Function89b97: ; 89b97 (22:5b97)
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, Sprites
+ ld de, Sprite01
.asm_89bb4
ld a, [hli]
cp $ff
@@ -1934,19 +1933,19 @@ Function89b97: ; 89b97 (22:5b97)
.asm_89bbb
push hl
ld a, [hli]
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add b
- ld [de], a
+ ld [de], a ; x
inc de
- ld a, $8
+ ld a, $08
add b
ld b, a
- ld a, [hli]
+ ld a, [hli] ; tile id
ld [de], a
inc de
- ld a, [hli]
+ ld a, [hli] ; attributes
ld [de], a
inc de
pop hl
@@ -1966,32 +1965,32 @@ Unknown_89bd8: ; 89bd8
; 89be0
Unknown_89be0: ; 89be0
- db $01, $12, $4e, $01, $00
- db $01, $19, $4e, $01, $40
- db $01, $12, $72, $01, $20
- db $01, $19, $72, $01, $60
- db $ff
+ db $01, $12, $4e, $01, 0
+ db $01, $19, $4e, $01, 0 | Y_FLIP
+ db $01, $12, $72, $01, 0 | X_FLIP
+ db $01, $19, $72, $01, 0 | X_FLIP | Y_FLIP
+ db -1 ; end
Unknown_89bf5: ; 89bf5
- db $01, $60, $16, $01, $00
- db $01, $62, $16, $01, $40
- db $01, $60, $92, $01, $20
- db $01, $62, $92, $01, $60
- db $ff
+ db $01, $60, $16, $01, 0
+ db $01, $62, $16, $01, 0 | Y_FLIP
+ db $01, $60, $92, $01, 0 | X_FLIP
+ db $01, $62, $92, $01, 0 | X_FLIP | Y_FLIP
+ db -1 ; end
Unknown_89c0a: ; 89c0a
- db $01, $78, $66, $01, $00
- db $01, $78, $66, $01, $40
- db $01, $78, $92, $01, $20
- db $01, $78, $92, $01, $60
- db $ff
+ db $01, $78, $66, $01, 0
+ db $01, $78, $66, $01, 0 | Y_FLIP
+ db $01, $78, $92, $01, 0 | X_FLIP
+ db $01, $78, $92, $01, 0 | X_FLIP | Y_FLIP
+ db -1 ; end
Unknown_89c1f: ; 89c1f
- db $01, $80, $66, $01, $00
- db $01, $80, $66, $01, $40
- db $01, $80, $92, $01, $20
- db $01, $80, $92, $01, $60
- db $ff
+ db $01, $80, $66, $01, 0
+ db $01, $80, $66, $01, 0 | Y_FLIP
+ db $01, $80, $92, $01, 0 | X_FLIP
+ db $01, $80, $92, $01, 0 | X_FLIP | Y_FLIP
+ db -1 ; end
; 89c34
Function89c34: ; 89c34 (22:5c34)
@@ -2014,10 +2013,10 @@ Function89c44: ; 89c44 (22:5c44)
pop de
ret
.asm_89c4f
- ld hl, Sprites
+ ld hl, Sprite01
push de
ld a, b
- ld [hli], a
+ ld [hli], a ; y
ld d, $8
ld a, e
and a
@@ -2029,11 +2028,11 @@ Function89c44: ; 89c44 (22:5c44)
jr nz, .asm_89c5c
.asm_89c60
pop de
- ld [hli], a
+ ld [hli], a ; x
ld a, d
- ld [hli], a
+ ld [hli], a ; tile id
xor a
- ld [hli], a
+ ld [hli], a ; attributes
ret
Function89c67: ; 89c67 (22:5c67)
@@ -2124,20 +2123,20 @@ Function89cdf: ; 89cdf (22:5cdf)
ld c, a
ld e, $2
ld a, $2
- ld hl, Sprites
+ ld hl, Sprite01
.asm_89cee
push af
push bc
ld d, $4
.asm_89cf2
ld a, b
- ld [hli], a
+ ld [hli], a ; y
ld a, c
- ld [hli], a
+ ld [hli], a ; x
ld a, e
- ld [hli], a
+ ld [hli], a ; tile id
ld a, $1
- ld [hli], a
+ ld [hli], a ; attributes
ld a, $8
add c
ld c, a
@@ -2833,8 +2832,7 @@ Function8a116: ; 8a116 (22:6116)
MenuDataHeader_0x8a176: ; 0x8a176
db $40 ; flags
- db 00, 14 ; start coords
- db 06, 19 ; end coords
+ menu_coords 14, 0, SCREEN_WIDTH - 1, 6
; 8a17b
Function8a17b: ; 8a17b (22:617b)
@@ -2856,8 +2854,7 @@ Function8a17b: ; 8a17b (22:617b)
MenuDataHeader_0x8a19a: ; 0x8a19a
db $40 ; flags
- db 00, 14 ; start coords
- db 06, 19 ; end coords
+ menu_coords 14, 0, SCREEN_WIDTH - 1, 6
dw MenuData2_0x8a1a2
db 1 ; default option
; 0x8a1a2
@@ -3016,8 +3013,7 @@ Function8a2aa: ; 8a2aa (22:62aa)
MenuDataHeader_0x8a2ef: ; 0x8a2ef
db $40 ; flags
- db 12, 00 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
; 8a2f4
UnknownText_0x8a2f4: ; 0x8a2f4
@@ -3178,8 +3174,7 @@ Unknown_8a40b: db 1, 2, 3, -1
MenuDataHeader_0x8a40f: ; 0x8a40f
db $40 ; flags
- db 02, 00 ; start coords
- db 11, 10 ; end coords
+ menu_coords 0, 2, 10, TEXTBOX_Y - 1
dw MenuData2_0x8a417
db 1 ; default option
; 0x8a417
@@ -3195,8 +3190,7 @@ MenuData2_0x8a417: ; 0x8a417
MenuDataHeader_0x8a435: ; 0x8a435
db $40 ; flags
- db 02, 00 ; start coords
- db 09, 10 ; end coords
+ menu_coords 0, 2, 10, 9
dw MenuData2_0x8a43d
db 1 ; default option
; 0x8a43d
@@ -3301,7 +3295,7 @@ asm_8a529: ; 8a529 (22:6529)
ld [hli], a
ld hl, Sprites
xor a
- ld bc, $20
+ ld bc, 8 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
ret
@@ -3921,8 +3915,7 @@ Jumptable_8a9c5: ; 8a9c5 (22:69c5)
MenuDataHeader_0x8a9c9: ; 0x8a9c9
db $40 ; flags
- db 04, 11 ; start coords
- db 11, 18 ; end coords
+ menu_coords 11, 4, 18, TEXTBOX_Y - 1
; 8a9ce
Function8a9ce: ; 8a9ce (22:69ce)
@@ -3951,8 +3944,7 @@ Function8a9ce: ; 8a9ce (22:69ce)
MenuDataHeader_0x8a9f2: ; 0x8a9f2
db $40 ; flags
- db 04, 11 ; start coords
- db 11, 18 ; end coords
+ menu_coords 11, 4, 18, TEXTBOX_Y - 1
dw MenuData2_0x8a9fa
db 1 ; default option
; 0x8a9fa
diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm
index 37b3d60b8..9deb9b261 100644
--- a/mobile/mobile_22_2.asm
+++ b/mobile/mobile_22_2.asm
@@ -1,6 +1,6 @@
Function8b342:: ; 8b342
; Loads the secondary map header pointer, then runs through a
-; dw with three dummy functions. Spends a lot of energy
+; dw with three dummy functions. Spends a lot of energy
; doing pretty much nothing.
call GetSecondaryMapHeaderPointer
ld d, h
@@ -26,15 +26,15 @@ Function8b342:: ; 8b342
; 8b35a
.zero ; 8b35a
- mobile
+ ret
; 8b35b
.one ; 8b35b
- mobile
+ ret
; 8b35c
.two ; 8b35c
- mobile
+ ret
; 8b35d
Function8b35d: ; 8b35d
@@ -911,8 +911,7 @@ Function8b855: ; 8b855
MenuDataHeader_0x8b867: ; 0x8b867
db $40 ; flags
- db 03, 01 ; start coords
- db 13, 18 ; end coords
+ menu_coords 1, 3, 18, 13
dw MenuData2_0x8b870
db 1 ; default option
; 0x8b86f
@@ -1084,13 +1083,11 @@ Function8b9ab: ; 8b9ab
MenuDataHeader_0x8b9ac: ; 0x8b9ac
db $40 ; flags
- db 00, 11 ; start coords
- db 11, 19 ; end coords
+ menu_coords 11, 0, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
MenuDataHeader_0x8b9b1: ; 0x8b9b1
db $40 ; flags
- db 00, 11 ; start coords
- db 07, 19 ; end coords
+ menu_coords 11, 0, SCREEN_WIDTH - 1, 7
dw MenuData2_0x8b9b9
db 1 ; default option
; 0x8b9b9
@@ -1105,8 +1102,7 @@ MenuData2_0x8b9b9: ; 0x8b9b9
MenuDataHeader_0x8b9ca: ; 0x8b9ca
db $40 ; flags
- db 00, 11 ; start coords
- db 11, 19 ; end coords
+ menu_coords 11, 0, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw MenuData2_0x8b9d2
db 1 ; default option
; 0x8b9d2
diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm
index 84be87ce4..d0a857b91 100644
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -40,7 +40,7 @@ Function100022: ; 100022
ld a, b
ld [wcd24], a
farcall Function10127e
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464 ; load broken gfx
farcall Function11615a ; init RAM
ld hl, VramState
@@ -318,7 +318,7 @@ Function10016f: ; 10016f
Function10020b: ; 10020b
xor a
ld [wc303], a
- farcall FadeOutPalettes
+ farcall Special_FadeOutPalettes
farcall Function106464
call HideSprites
call DelayFrame
@@ -1985,7 +1985,7 @@ Function100c74: ; 100c74
ld a, SCREEN_WIDTH * 2
ld [Buffer1], a
hlcoord 2, 10
- predef ListMoves
+ predef Predef_ListMoves
ret
; 100c98
@@ -2120,8 +2120,7 @@ Function100d67: ; 100d67
.MenuDataHeader: ; 100d88
db 0 ; flags
- db 11, 11 ; start coords
- db 17, 19 ; end coords
+ menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw .MenuData2
db 1 ; default option
@@ -2804,7 +2803,7 @@ LoadSelectedPartiesForColosseum: ; 1010f2
ret
; 1011f1
-Function1011f1: ; 1011f1
+Special_Function1011f1: ; 1011f1
ld a, $04
call GetSRAMBank
ld a, [$a60c]
@@ -2828,20 +2827,20 @@ Function1011f1: ; 1011f1
ret
; 101220
-Function101220: ; 101220
+Special_Function101220: ; 101220
xor a
ld [wLinkMode], a
ret
; 101225
-Function101225: ; 101225
+Special_Function101225: ; 101225
ld d, 1
ld e, BANK(Jumptable_101297)
ld bc, Jumptable_101297
call Function100000
jr Function10123d
-Function101231: ; 101231
+Special_Function101231: ; 101231
ld d, 2
ld e, BANK(Jumptable_101297)
ld bc, Jumptable_101297
@@ -2872,7 +2871,7 @@ Function101251: ; 101251
call Function1021e0
call Function1020ea
ret c
- call Function102142
+ call Special_Function102142
ret
; 101265
@@ -3077,7 +3076,7 @@ Function1013aa: ; 1013aa
Function1013c0: ; 1013c0
farcall BlankScreen
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
call FinishExitMenu
ret
@@ -3093,7 +3092,7 @@ Function1013dd: ; 1013dd
ret
; 1013e1
-Function1013e1: ; 1013e1 ; unreferenced
+Unreferenced_Function1013e1: ; 1013e1
push de
inc de
ld b, a
@@ -3130,7 +3129,7 @@ Function1013f5: ; 1013f5
ret
; 101400
-Function101400: ; 101400 ; unreferenced
+Unreferenced_Function101400: ; 101400
ld a, [de]
inc de
cp [hl]
@@ -3318,7 +3317,7 @@ Function101507: ; 101507
ret
; 10151d
-Function10151d: ; 10151d ; unreferenced
+Unreferenced_Function10151d: ; 10151d
ld a, $34
call Function3e32
ld a, [wMobileCommsJumptableIndex]
@@ -3513,7 +3512,7 @@ Function101663: ; 101663
ret
; 101674
-Function101674: ; 101674 ; unreferenced
+Unreferenced_Function101674: ; 101674
ld a, $05
ld hl, w5_dc00
call Function101635
@@ -4402,7 +4401,7 @@ Function101cbc: ; 101cbc
ret
; 101cc2
-Function101cc2: ; 101cc2 ; unreferenced
+Unreferenced_Function101cc2: ; 101cc2
ld a, $02
ld [wcd2b], a
ret
@@ -4683,7 +4682,7 @@ Function101e64: ; 101e64
ret
; 101e82
-Function101e82: ; 101e82 ; unreferenced
+Unreferenced_Function101e82: ; 101e82
call Function101ecc
ld a, [wMobileCommsJumptableIndex]
inc a
@@ -4691,7 +4690,7 @@ Function101e82: ; 101e82 ; unreferenced
ret
; 101e8d
-Function101e8d: ; 101e8d ; unreferenced
+Unreferenced_Function101e8d: ; 101e8d
call Function101ed3
ld a, [wMobileCommsJumptableIndex]
inc a
@@ -5025,7 +5024,7 @@ Function102112: ; 102112
ret
; 102142
-Function102142: ; 102142
+Special_Function102142: ; 102142
call Function10218d
call Function102180
ld hl, UnknownText_0x1021d1
@@ -5454,7 +5453,7 @@ Function102423: ; 102423
call Function102921
ret nc
farcall SaveAfterLinkTrade
- farcall TrainerRankings_Trades
+ farcall StubbedTrainerRankings_Trades
farcall BackupMobileEventIndex
ld hl, wcd4b
set 1, [hl]
@@ -6288,8 +6287,7 @@ Function1029af: ; 1029af
MenuDataHeader_1029bb: ; 1029bb
db $40 ; flags
- db 10, 3 ; start coords
- db 12, 15 ; end coords
+ menu_coords 3, 10, 15, 12
dw NULL
db 1 ; default option
; 1029c3
@@ -6506,7 +6504,7 @@ Function102b4e: ; 102b4e
ret
; 102b68
-Function102b68: ; 102b68 ; unreferenced
+Unreferenced_Function102b68: ; 102b68
xor a
ld hl, wWindowStackPointer
ld bc, $10
@@ -6796,7 +6794,7 @@ Function102d48: ; 102d48
ld bc, PARTYMON_STRUCT_LENGTH
ld hl, PartyMon1DVs
call AddNTimes
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
farcall UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
@@ -7724,9 +7722,9 @@ Unknown_1035d7: ; 1035d7
dw Unknown_103608
dw Unknown_103608
dw Unknown_1035fe
- dw AskMobileOrCable
- dw AskMobileOrCable
- dw AskMobileOrCable
+ dw Special_AskMobileOrCable
+ dw Special_AskMobileOrCable
+ dw Special_AskMobileOrCable
Unknown_1035e7: ; 1035e7
dwcoord 0, 6
@@ -7757,7 +7755,7 @@ Unknown_103608: ; 103608
db 2, 2, 3
; 103612
-AskMobileOrCable: ; 103612
+Special_AskMobileOrCable: ; 103612
ld hl, MenuDataHeader_103640
call LoadMenuDataHeader
ld a, [wMobileOrCable_LastSelection]
@@ -7786,8 +7784,7 @@ AskMobileOrCable: ; 103612
MenuDataHeader_103640: ; 103640
db $40 ; flags
- db 6, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 6, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw MenuData2_103648
db 1 ; default option
@@ -7814,7 +7811,7 @@ Function103654: ; 103654
ret
; 10366e
-Mobile_SelectThreeMons: ; 10366e
+Special_Mobile_SelectThreeMons: ; 10366e
farcall Mobile_AlwaysReturnNotCarry
bit 7, c
jr z, .asm_10369b
@@ -7941,8 +7938,7 @@ Function103700: ; 103700
MenuDataHeader_103747: ; 103747
db $40 ; flags
- db 5, 13 ; start coords
- db 11, 19 ; end coords
+ menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw MenuData2_10374f
db 1 ; default option
@@ -7983,7 +7979,7 @@ UnknownText_0x10377b: ; 0x10377b
db "@"
; 0x103780
-Function103780: ; 103780
+Special_Function103780: ; 103780
ld a, [wd265]
push af
call Function10378c
@@ -8025,7 +8021,7 @@ Function10378c: ; 10378c
ret
; 1037c2
-Function1037c2: ; 1037c2
+Special_Function1037c2: ; 1037c2
call Function103823
jr c, .nope
ld a, [wdc5f]
@@ -8051,7 +8047,7 @@ UnknownText_0x1037e6: ; 0x1037e6
db "@"
; 0x1037eb
-Function1037eb: ; 1037eb
+Special_Function1037eb: ; 1037eb
call Function103823
jr nc, .asm_103807
ld hl, UnknownText_0x103819
@@ -8106,7 +8102,7 @@ Function103823: ; 103823
ret
; 10383c
-Function10383c: ; 10383c
+Special_Function10383c: ; 10383c
ld a, $01
ld [wdc60], a
xor a
@@ -8139,7 +8135,7 @@ UnknownText_0x103876: ; 0x103876
db "@"
; 0x10387b
-Function10387b: ; 10387b
+Special_Function10387b: ; 10387b
farcall Mobile_AlwaysReturnNotCarry
bit 7, c
ret nz
diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm
index b92af19fe..a4f2c7e61 100755
--- a/mobile/mobile_41.asm
+++ b/mobile/mobile_41.asm
@@ -2,7 +2,8 @@
; which were used for Trainer Rankings in Pokémon News.
; Copies certain values at the time the player enters the Hall of Fame.
-TrainerRankings_HallOfFame2:: mobile ; 0x105ef6
+StubbedTrainerRankings_HallOfFame2:: ; 0x105ef6
+ ret
ld a, BANK(sTrainerRankingGameTimeHOF)
call GetSRAMBank
@@ -33,7 +34,8 @@ TrainerRankings_HallOfFame2:: mobile ; 0x105ef6
ret
; 105f33
-TrainerRankings_MagikarpLength: mobile ; 105f33
+StubbedTrainerRankings_MagikarpLength: ; 105f33
+ ret
ld a, BANK(sTrainerRankingLongestMagikarp)
call GetSRAMBank
ld de, Buffer1
@@ -101,7 +103,8 @@ TrainerRankings_MagikarpLength: mobile ; 105f33
ret
; 105f79
-TrainerRankings_BugContestScore: mobile ; 105f79
+StubbedTrainerRankings_BugContestScore: ; 105f79
+ ret
ld a, BANK(sTrainerRankingBugContestScore)
call GetSRAMBank
ld a, [hProduct]
@@ -130,7 +133,8 @@ TrainerRankings_BugContestScore: mobile ; 105f79
ret
; 105f9f
-TrainerRankings_AddToSlotsWinStreak: mobile ; 105f9f
+StubbedTrainerRankings_AddToSlotsWinStreak: ; 105f9f
+ ret
ld a, BANK(sTrainerRankingCurrentSlotsStreak)
call GetSRAMBank
@@ -170,7 +174,8 @@ TrainerRankings_AddToSlotsWinStreak: mobile ; 105f9f
ret
; 105fd0
-TrainerRankings_EndSlotsWinStreak: mobile ; 105fd0
+StubbedTrainerRankings_EndSlotsWinStreak: ; 105fd0
+ ret
ld a, BANK(sTrainerRankingCurrentSlotsStreak)
call GetSRAMBank
ld hl, sTrainerRankingCurrentSlotsStreak
@@ -182,7 +187,8 @@ TrainerRankings_EndSlotsWinStreak: mobile ; 105fd0
ret
; 105fe3
-TrainerRankings_AddToSlotsPayouts: mobile ; 105fe3
+StubbedTrainerRankings_AddToSlotsPayouts: ; 105fe3
+ ret
ld a, BANK(sTrainerRankingTotalSlotsPayouts)
call GetSRAMBank
ld hl, sTrainerRankingTotalSlotsPayouts + 3
@@ -210,7 +216,8 @@ TrainerRankings_AddToSlotsPayouts: mobile ; 105fe3
ret
; 106008
-TrainerRankings_AddToBattlePayouts: mobile ; 106008
+StubbedTrainerRankings_AddToBattlePayouts: ; 106008
+ ret
ld a, BANK(sTrainerRankingTotalBattlePayouts)
call GetSRAMBank
ld hl, sTrainerRankingTotalBattlePayouts + 3
@@ -240,12 +247,13 @@ TrainerRankings_AddToBattlePayouts: mobile ; 106008
ret
; 10602e
-TrainerRankings_StepCount: mobile ; 10602e (41:602e)
+StubbedTrainerRankings_StepCount: ; 10602e (41:602e)
+ ret
ld hl, sTrainerRankingStepCount
- jp TrainerRankings_Increment4Byte
+ jp StubbedTrainerRankings_Increment4Byte
-; Unreferenced in English version.
-TrainerRankings_BattleTowerWins: mobile ; 106035
+Unreferenced_StubbedTrainerRankings_BattleTowerWins: ; 106035
+ ret
ld a, $5
call GetSRAMBank
ld a, [$aa8d]
@@ -253,167 +261,196 @@ TrainerRankings_BattleTowerWins: mobile ; 106035
call CloseSRAM
ret nz
ld hl, sTrainerRankingBattleTowerWins
- jp TrainerRankings_Increment2Byte
+ jp StubbedTrainerRankings_Increment2Byte
-TrainerRankings_TMsHMsTaught: mobile ; 106049
+StubbedTrainerRankings_TMsHMsTaught: ; 106049
+ ret
ld hl, sTrainerRankingTMsHMsTaught
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Battles: mobile ; 106050
+StubbedTrainerRankings_Battles: ; 106050
+ ret
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle
ret z
ld hl, sTrainerRankingBattles
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_WildBattles: mobile ; 10605d
+StubbedTrainerRankings_WildBattles: ; 10605d
+ ret
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle
ret z
ld hl, sTrainerRankingWildBattles
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_TrainerBattles: mobile ; 10606a
+StubbedTrainerRankings_TrainerBattles: ; 10606a
+ ret
ld hl, sTrainerRankingTrainerBattles
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Unused1: mobile ; 106071
+StubbedTrainerRankings_Unused1: ; 106071
+ ret
ld hl, sTrainerRankingUnused1
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_HallOfFame:: mobile ; 0x106078
+StubbedTrainerRankings_HallOfFame:: ; 0x106078
+ ret
ld hl, sTrainerRankingHOFEntries
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_WildMonsCaught: mobile ; 10607f (41:607f)
+StubbedTrainerRankings_WildMonsCaught: ; 10607f (41:607f)
+ ret
ld hl, sTrainerRankingWildMonsCaught
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_HookedEncounters: mobile ; 106086
+StubbedTrainerRankings_HookedEncounters: ; 106086
+ ret
ld hl, sTrainerRankingHookedEncounters
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_EggsHatched: mobile ; 10608d (41:608d)
+StubbedTrainerRankings_EggsHatched: ; 10608d (41:608d)
+ ret
ld hl, sTrainerRankingEggsHatched
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_MonsEvolved: mobile ; 106094
+StubbedTrainerRankings_MonsEvolved: ; 106094
+ ret
ld hl, sTrainerRankingMonsEvolved
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_FruitPicked: mobile ; 10609b
+StubbedTrainerRankings_FruitPicked: ; 10609b
+ ret
ld hl, sTrainerRankingFruitPicked
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Healings: mobile ; 1060a2
+Special_StubbedTrainerRankings_Healings: ; 1060a2
+ ret
ld hl, sTrainerRankingHealings
- jp TrainerRankings_Increment3Byte
+ jp StubbedTrainerRankings_Increment3Byte
-TrainerRankings_MysteryGift: mobile ; 1060a9 (41:60a9)
+StubbedTrainerRankings_MysteryGift: ; 1060a9 (41:60a9)
+ ret
ld hl, sTrainerRankingMysteryGift
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Trades: mobile ; 1060af
+StubbedTrainerRankings_Trades: ; 1060af
+ ret
ld hl, sTrainerRankingTrades
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Fly: mobile ; 1060b5
+StubbedTrainerRankings_Fly: ; 1060b5
+ ret
ld hl, sTrainerRankingFly
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Surf: mobile ; 1060bb
+StubbedTrainerRankings_Surf: ; 1060bb
+ ret
ld hl, sTrainerRankingSurf
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Waterfall: mobile ; 1060c1
+StubbedTrainerRankings_Waterfall: ; 1060c1
+ ret
ld hl, sTrainerRankingWaterfall
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_WhiteOuts: mobile ; 1060c7
+StubbedTrainerRankings_WhiteOuts: ; 1060c7
+ ret
ld hl, sTrainerRankingWhiteOuts
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_LuckyNumberShow: mobile ; 1060cd
+StubbedTrainerRankings_LuckyNumberShow: ; 1060cd
+ ret
ld hl, sTrainerRankingLuckyNumberShow
- jr TrainerRankings_Increment2Byte
+ jr StubbedTrainerRankings_Increment2Byte
-TrainerRankings_PhoneCalls: mobile ; 1060d3
+StubbedTrainerRankings_PhoneCalls: ; 1060d3
+ ret
ld hl, sTrainerRankingPhoneCalls
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Unused2: mobile ; 1060df
+StubbedTrainerRankings_Unused2: ; 1060df
+ ret
ld hl, sTrainerRankingUnused2
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_LinkBattles: mobile ; 1060df
+StubbedTrainerRankings_LinkBattles: ; 1060df
+ ret
ld hl, sTrainerRankingLinkBattles
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Splash: mobile ; 1060e5
+StubbedTrainerRankings_Splash: ; 1060e5
+ ret
; Only counts if it’s the player’s turn
ld a, [hBattleTurn]
and a
ret nz
ld hl, sTrainerRankingSplash
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_TreeEncounters: mobile ; 1060ef
+StubbedTrainerRankings_TreeEncounters: ; 1060ef
+ ret
ld hl, sTrainerRankingTreeEncounters
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_Unused3: mobile ; 1060f5
+StubbedTrainerRankings_Unused3: ; 1060f5
+ ret
ld hl, sTrainerRankingUnused3
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_ColosseumWins: mobile ; win
+StubbedTrainerRankings_ColosseumWins: ; win
+ ret
ld hl, sTrainerRankingColosseumWins
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
-TrainerRankings_ColosseumLosses: mobile ; lose
+StubbedTrainerRankings_ColosseumLosses: ; lose
+ ret
ld hl, sTrainerRankingColosseumLosses
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
; 106107
-TrainerRankings_ColosseumDraws: mobile ; draw
+StubbedTrainerRankings_ColosseumDraws: ; draw
+ ret
ld hl, sTrainerRankingColosseumDraws
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
; 10610d
; Counts uses of both Selfdestruct and Explosion.
-TrainerRankings_Selfdestruct: mobile ; 10610d
+StubbedTrainerRankings_Selfdestruct: ; 10610d
+ ret
; Only counts if it’s the player’s turn
ld a, [hBattleTurn]
and a
ret nz
ld hl, sTrainerRankingSelfdestruct
- jr TrainerRankings_Increment3Byte
+ jr StubbedTrainerRankings_Increment3Byte
; 106117
-TrainerRankings_Increment4Byte: ; 106117
+StubbedTrainerRankings_Increment4Byte: ; 106117
push bc
ld bc, 3
- jr TrainerRankings_Increment
+ jr StubbedTrainerRankings_Increment
; 10611d
-TrainerRankings_Increment3Byte: ; 10611d
+StubbedTrainerRankings_Increment3Byte: ; 10611d
push bc
ld bc, 2
- jr TrainerRankings_Increment
+ jr StubbedTrainerRankings_Increment
; 106123
-TrainerRankings_Increment2Byte: ; 106123
+StubbedTrainerRankings_Increment2Byte: ; 106123
push bc
ld bc, 1
- jr TrainerRankings_Increment
+ jr StubbedTrainerRankings_Increment
; 106129
; unused
-TrainerRankings_Increment1Byte: ; 106129
+StubbedTrainerRankings_Increment1Byte: ; 106129
push bc
ld bc, 0
; Increments a big-endian value of bc + 1 bytes at hl
-TrainerRankings_Increment: ; 10612d
+StubbedTrainerRankings_Increment: ; 10612d
ld a, BANK(sTrainerRankings)
call GetSRAMBank
push hl
@@ -450,7 +487,8 @@ TrainerRankings_Increment: ; 10612d
; 106155
; Used when SRAM bank 5 isn’t already loaded — what’s the point of this?
-UpdateTrainerRankingsChecksum2: mobile ; 106155
+UpdateTrainerRankingsChecksum2: ; 106155
+ ret
ld a, BANK(sTrainerRankings)
call GetSRAMBank
call UpdateTrainerRankingsChecksum
@@ -520,8 +558,7 @@ RestoreMobileEventIndex: ; 10619d (41:619d)
ret
; 1061b3 (41:61b3)
-; Unreferenced in English version.
-VerifyTrainerRankingsChecksum: ; 1061b3
+Unreferenced_VerifyTrainerRankingsChecksum: ; 1061b3
call CalculateTrainerRankingsChecksum
ld hl, sTrainerRankingsChecksum
ld a, d
@@ -773,15 +810,16 @@ endr
ret
; 10630f
-; functions related to the cable club and various NPC scripts referencing mobile communications
+; functions related to the cable club and various NPC scripts referencing communications
-Mobile_DummyReturnFalse: ; 10630f
+Special_Mobile_DummyReturnFalse: ; 10630f
xor a
ld [ScriptVar], a
ret
; 106314
-MobileFn_106314: mobile ; 106314
+Stubbed_Function106314: ; 106314
+ ret
ld a, $4
call GetSRAMBank
ld a, c
@@ -800,7 +838,7 @@ Mobile_AlwaysReturnNotCarry: ; 10632f
or a
ret
-Function106331: ; 106331 - called by Mobile_DummyReturnFalse in Crystal-J
+Function106331: ; 106331 - called by Special_Mobile_DummyReturnFalse in Crystal-J
; check ~[4:b000] == [7:a800]
ld a, $4
call GetSRAMBank
@@ -960,7 +998,7 @@ Function106403: ; 106403
or c
inc a
ld c, a
- call MobileFn_106314
+ call Stubbed_Function106314
ld a, [wMobileCommsJumptableIndex]
inc a
ld [wMobileCommsJumptableIndex], a
@@ -978,7 +1016,7 @@ Function106403: ; 106403
.asm_106435
ld c, $0
- call MobileFn_106314
+ call Stubbed_Function106314
ld a, [wMobileCommsJumptableIndex]
inc a
ld [wMobileCommsJumptableIndex], a
@@ -1005,21 +1043,22 @@ Function106453: ; 106453
ret
; 106462
-MobileFunc_106462: mobile
+Stubbed_Function106462:
+ ret
ret
; 106464
Function106464:: ; 106464
- ld de, MobilePhoneTilesGFX
- ld hl, vTiles2 tile $60
- lb bc, BANK(MobilePhoneTilesGFX), 1
+ ld de, FontsExtra_SolidBlackGFX
+ ld hl, vTiles2 tile "<BLACK>" ; $60
+ lb bc, BANK(FontsExtra_SolidBlackGFX), 1
call Get2bpp
ld de, FontsExtra2_UpArrowGFX
- ld hl, vTiles2 tile $61
+ ld hl, vTiles2 tile "▲" ; $61
lb bc, BANK(FontsExtra2_UpArrowGFX), 1
call Get2bpp
ld de, GFX_106514
- ld hl, vTiles2 tile $62
+ ld hl, vTiles2 tile "<PHONE>" ; $62
ld c, 9
ld b, BANK(GFX_106514)
call Get2bpp
@@ -1033,17 +1072,17 @@ Function106464:: ; 106464
Function10649b: ; 10649b
ld a, [TextBoxFrame]
- and $7
- ld bc, 3 tiles
+ maskbits NUM_FRAMES +- 1
+ ld bc, 6 * LEN_1BPP_TILE
ld hl, Frames
call AddNTimes
ld d, h
ld e, l
- ld hl, vTiles2 tile $79
- ld c, 6
+ ld hl, vTiles2 tile "┌" ; $79
+ ld c, 6 ; "┌" to "┘"
ld b, BANK(Frames)
call Function1064c3
- ld hl, vTiles2 tile $7f
+ ld hl, vTiles2 tile " " ; $7f
ld de, TextBoxSpaceGFX
ld c, 1
ld b, BANK(TextBoxSpaceGFX)
@@ -1103,8 +1142,8 @@ asm_1064ed
; 10650a
Function10650a: ; 10650a
- ld de, MobilePhoneTilesGFX + $20
- lb bc, BANK(MobilePhoneTilesGFX), $11
+ ld de, MobilePhoneTilesGFX
+ lb bc, BANK(MobilePhoneTilesGFX), 17
call Get2bpp
ret
; 106514
diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm
index 4e956229c..146fcf902 100644
--- a/mobile/mobile_42.asm
+++ b/mobile/mobile_42.asm
@@ -181,12 +181,12 @@ Function1080b7: ; 1080b7
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
xor a
@@ -290,26 +290,26 @@ MobileTradeAnim_ClearBGMap: ; 1081ca
MobileTradeAnim_GetFrontpic: ; 1081e9
push de
push af
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop af
ld [CurPartySpecies], a
ld [CurSpecies], a
call GetBaseData
pop de
- predef GetMonFrontpic
+ predef Predef_GetMonFrontpic
ret
; 108201
Function108201: ; 108201
push de
push af
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
pop af
ld [CurPartySpecies], a
ld [CurSpecies], a
call GetBaseData
pop de
- predef GetAnimatedFrontpicPredef
+ predef Predef_GetAnimatedFrontpic
ret
; 108219
@@ -318,7 +318,7 @@ Function108219: ; 108219
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_TRADE
- predef AnimateFrontpic
+ predef Predef_AnimateFrontpic
ret
; 108229
@@ -327,7 +327,7 @@ Function108229: ; 108229
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_TRADE
- predef LoadMonAnimation
+ predef Predef_LoadMonAnimation
ret
; 108239
@@ -361,7 +361,7 @@ MobileTradeAnim_JumptableLoop: ; 10824b
ld [hWY], a
call LoadStandardFont
call LoadFontsBattleExtra
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
scf
ret
@@ -616,11 +616,11 @@ MobileTradeAnim_ShowPlayerMonForGTS: ; 10842c
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
ld a, [wPlayerTrademonDVs]
ld [TempMonDVs], a
@@ -690,11 +690,11 @@ MobileTradeAnim_ShowOTMonFromGTS: ; 1084d7
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
xor a
ld [hSCX], a
@@ -759,11 +759,11 @@ MobileTradeAnim_GetOddEgg: ; 108589
call DelayFrame
ld de, TradeBallGFX
ld hl, vTiles0
- lb bc, BANK(TradeBallGFX), $06
+ lb bc, BANK(TradeBallGFX), 6
call Request2bpp
ld de, TradePoofGFX
ld hl, vTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
+ lb bc, BANK(TradePoofGFX), 12
call Request2bpp
xor a
ld [hSCX], a
@@ -959,7 +959,7 @@ MobileTradeAnim_GiveTrademon1: ; 108763
cp $f8
jr nz, .next
depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
call _InitSpriteAnimStruct
.next
@@ -984,7 +984,7 @@ MobileTradeAnim_GiveTrademon1: ; 108763
.init
depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
call _InitSpriteAnimStruct
xor a
call Function108ad4
@@ -1015,7 +1015,7 @@ MobileTradeAnim_GiveTrademon2: ; 1087cf
call Function108af4
call Function108b5a
depixel 9, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_25
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_PING
call _InitSpriteAnimStruct
ld de, SFX_FORESIGHT
call PlaySFX
@@ -1024,7 +1024,7 @@ MobileTradeAnim_GiveTrademon2: ; 1087cf
xor a
ld [wcf64], a
depixel 9, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_23
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE
call _InitSpriteAnimStruct
.loop
ld a, [hSCY]
@@ -1051,7 +1051,7 @@ MobileTradeAnim_05: ; 108811
ld c, 60
call WaitMobileTradeSpriteAnims
depixel 30, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_24
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE
call _InitSpriteAnimStruct
call GetMobileTradeAnimByte
ld de, SFX_THROW_BALL
@@ -1074,7 +1074,7 @@ MobileTradeAnim_07: ; 10884c
ld c, 80
call DelayFrames
depixel 30, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_24
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE
call _InitSpriteAnimStruct
call GetMobileTradeAnimByte
ld de, SFX_THROW_BALL
@@ -1098,7 +1098,7 @@ MobileTradeAnim_GetTrademon1: ; 108863
.done
farcall DeinitializeAllSprites
depixel 9, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_25
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_PING
call _InitSpriteAnimStruct
ld de, SFX_GLASS_TING_2
call PlaySFX
@@ -1134,13 +1134,13 @@ MobileTradeAnim_GetTrademon2: ; 108894
.asm_1088c5
depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
call _InitSpriteAnimStruct
jr .asm_1088e7
.asm_1088cf
depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
call _InitSpriteAnimStruct
xor a
call Function108ad4
@@ -1238,7 +1238,7 @@ asm_108966
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call WaitBGMap
ret
; 10898a
@@ -1252,7 +1252,7 @@ Function10898a: ; 10898a
xor a
ld [hGraphicStartTile], a
lb bc, 7, 7
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
call WaitBGMap
ret
; 1089a8
@@ -1825,7 +1825,7 @@ LZ_1090a7:
INCBIN "gfx/unknown/1090a7.tilemap.lz"
Palette_1090f7:
-; unreferenced
+; unused
RGB 31, 31, 31
RGB 0, 0, 0
diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm
index 5fc5eaa7e..920ef5cd7 100644
--- a/mobile/mobile_45.asm
+++ b/mobile/mobile_45.asm
@@ -61,7 +61,7 @@ String_114163: ; 114163
; 114165
Jumptable_114165: ; 114165
- dw Function114268
+ dw Stubbed_Function114268
dw Function114269
dw Function11433c
dw Function1143b7
@@ -159,7 +159,8 @@ Function11425c: ; 11425c
; 114268
-Function114268: mobile
+Stubbed_Function114268:
+ ret
; 114269
@@ -5844,7 +5845,7 @@ Unknown_116815: ; 116815
db $c, $5
db $9, $8
db $8, $4
- db $ff
+ db -1 ; end
Unknown_11683e: ; 11683e
db $fd, $20
@@ -5867,7 +5868,7 @@ Unknown_11683e: ; 11683e
db $12, $5
db $f, $8
db $e, $4
- db $ff
+ db -1 ; end
Unknown_116867: ; 116867
db $14, $8
@@ -5910,7 +5911,7 @@ Unknown_116881: ; 116881
db $fd, $2
db $23, $2
db $fd, $40
- db $ff
+ db -1 ; end
Unknown_1168ae: ; 1168ae
db $24, $4
@@ -7298,16 +7299,14 @@ Function1179a7: ; 1179a7 (45:79a7)
MenuDataHeader_1179b5: ; 1179b5
db $40 ; flags
- db 12, 0 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw NULL
db 0 ; default option
; 1179bd
MenuDataHeader_1179bd: ; 1179bd
db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw NULL
db 0 ; default option
; 1179c5
@@ -7350,7 +7349,7 @@ INCBIN "data/mobile/ascii-sym.txt"
; everything from here to the end of the bank is related to the
; Mobile Stadium option from the continue/newgame menu.
-; XXX better function names
+; Needs better function names
MobileStudium: ; 0x117a7f
ld a, [hInMenu]
push af
@@ -7658,18 +7657,16 @@ Function117c89:
ret
MenuDataHeader_117cbc: ; 0x117cbc
- db $40 ; flags
- db 12, 0 ; start coords
- db 17, 19 ; end coords
- dw NULL ; menu data 2
- db 0 ; default option
+ db $40 ; flags
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
+ dw NULL
+ db 0 ; default option
MenuDataHeader_117cc4: ; 0x117cc4
- db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
- dw NULL ; menu data 2
- db 0 ; default item
+ db $40 ; flags
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
+ dw NULL
+ db 0 ; default item
YesNo117ccc: ; 0x117ccc
db "はい"
diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm
index b114e5166..d77a8836f 100755
--- a/mobile/mobile_45_sprite_engine.asm
+++ b/mobile/mobile_45_sprite_engine.asm
@@ -1,7 +1,7 @@
Function115d99: ; 115d99
ld de, GFX_11601a
ld hl, vTiles0 tile $60
- lb bc, BANK(GFX_11601a), $14
+ lb bc, BANK(GFX_11601a), 20
call Get2bpp
xor a
ld [wc305], a
@@ -22,8 +22,8 @@ Function115dc3: ; 115dc3
xor a
ld [wc305], a
ld a, $a0
- ld hl, Sprites + 31 * 4
- ld bc, 8 * 4
+ ld hl, Sprite32
+ ld bc, 8 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
ret
@@ -34,8 +34,8 @@ Function115dd3: ; 115dd3
and a
ret z
ld a, $a0
- ld hl, Sprites + 31 * 4
- ld bc, 8 * 4
+ ld hl, Sprite32
+ ld bc, 8 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
call Function115e22
ld a, [wc309]
@@ -50,7 +50,7 @@ Function115dd3: ; 115dd3
ld d, a
push de
pop hl
- ld de, Sprites + 31 * 4
+ ld de, Sprite32
ld a, [wc307]
ld c, a
ld a, [wc308]
@@ -60,17 +60,17 @@ Function115dd3: ; 115dd3
push af
ld a, [hli]
add b
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add c
- ld [de], a
+ ld [de], a ; x
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; tile id
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; attributes
inc de
pop af
dec a
@@ -361,7 +361,7 @@ Function11619d: ; 11619d
jr c, .asm_1161b4
ld a, $a0
ld hl, Sprites
- ld bc, $0064
+ ld bc, 25 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
.asm_1161b4
@@ -508,8 +508,7 @@ Function1161d5: ; 1161d5
MenuDataHeader_11628c: ; 11628c
db $40 ; flags
- db 6, 0 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 6, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw NULL
db 0 ; default option
; 116294
@@ -586,22 +585,22 @@ Function1162f2: ; 1162f2
ld e, a
ld a, [hli]
sub e
- ld de, Sprites + $24
+ ld de, Sprite10
.asm_116321
push af
ld a, [hli]
add b
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add c
- ld [de], a
+ ld [de], a ; x
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; tile id
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; attributes
inc de
pop af
dec a
@@ -627,22 +626,22 @@ Function1162f2: ; 1162f2
ld e, a
ld a, [hli]
sub e
- ld de, Sprites
+ ld de, Sprite01
.asm_11635a
push af
ld a, [hli]
add b
- ld [de], a
+ ld [de], a ; y
inc de
ld a, [hli]
add c
- ld [de], a
+ ld [de], a ; x
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; tile id
inc de
ld a, [hli]
- ld [de], a
+ ld [de], a ; attributes
inc de
pop af
dec a
@@ -669,7 +668,7 @@ Function11636e: ; 11636e
ld [rSVBK], a
ld a, $a0
ld hl, Sprites
- ld bc, 16 * 4
+ ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
ld a, $90
ld [hWY], a
@@ -697,7 +696,7 @@ Function1163c0: ; 1163c0
ld [rSVBK], a
ld a, $a0
ld hl, Sprites
- ld bc, 16 * 4
+ ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
call DelayFrame
farcall Function14146
diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm
index 28231daea..b956a7224 100755
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -487,7 +487,7 @@ BattleTowerRoomMenu_InitRAM: ; 1183cb
ld [hMobileReceive], a
ld [hMobile], a
ei
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
farcall Function115d99
farcall Function11615a
@@ -1559,8 +1559,7 @@ IndexDownloadURL: ; 0x118ce5
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
-Function118d35: ; 118d35
-; unreferenced
+Unreferenced_Function118d35: ; 118d35
ld hl, $d200
ld a, [wcd38]
and a
@@ -1673,7 +1672,7 @@ Function118ded: ; 118ded
push af
ld a, $1
ld [rSVBK], a
- farcall Function11b93b
+ farcall Special_Function11b93b
pop af
ld [rSVBK], a
@@ -2602,7 +2601,7 @@ Function119413: ; 119413
jr z, .asm_119447
ld a, $6
ld [rSVBK], a
- ld a, [wd000]
+ ld a, [w3_d000]
ld c, a
ld a, [w3_d000 + 1]
ld b, a
@@ -3539,11 +3538,11 @@ Function1199e2: ; 1199e2
ld [w3_d8a1], a
ld [w3_d8a2], a
ld [w3_d8a3], a
- ld hl, $d8a0
+ ld hl, w3_d8a0
ld bc, $d889
call Function119e98
call Function119e98
- ld hl, $d8a0
+ ld hl, w3_d8a0
ld a, [wcd2d]
cp [hl]
jr nz, Function119ac9
@@ -3564,12 +3563,12 @@ Function1199e2: ; 1199e2
ld [w3_d8a1], a
ld [w3_d8a2], a
ld [w3_d8a3], a
- ld hl, $d8a0
+ ld hl, w3_d8a0
ld bc, $d88e
call Function119e98
ld bc, $d893
call Function119e98
- ld hl, $d8a0
+ ld hl, w3_d8a0
ld a, [wcd2f]
cp [hl]
jr nz, .asm_119aa7
@@ -3956,16 +3955,14 @@ BattleTowerRoomMenu_UpdateYesNoMenu:
MenuDataHeader_119cf7: ; 119cf7
db $40 ; flags
- db 7, 12 ; start coords
- db 11, 19 ; end coords
+ menu_coords 12, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw NULL
db 0 ; default option
; 119cff
MenuData_119cff: ; 119cff
db $40 ; flags
- db 7, 15 ; start coords
- db 11, 19 ; end coords
+ menu_coords 15, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw NULL
db 0 ; default option
; 119d07
@@ -4462,7 +4459,7 @@ Function11a00e: ; 11a00e
call PushWindow
farcall Function11765d
farcall Function117ab4
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
call ExitMenu
farcall ReloadMapPart
@@ -4485,7 +4482,7 @@ Function11a0ca: ; 11a0ca
call PushWindow
farcall Function11765d
farcall Function17d3f6
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
call ExitMenu
farcall ReloadMapPart
@@ -4758,16 +4755,14 @@ String_11a2d3: ; 11a2d3
MenuDataHeader_11a2d6: ; 11a2d6
db $40 ; flags
- db 6, 14 ; start coords
- db 10, 19 ; end coords
+ menu_coords 14, 6, SCREEN_WIDTH - 1, 10
dw NULL
db 0 ; default option
; 11a2de
MenuDataHeader_11a2de: ; 11a2de
db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw NULL
db 0 ; default option
; 11a2e6
@@ -5330,8 +5325,7 @@ String_11a7f4: ; 11a7f4
MenuDataHeader_11a804: ; 11a804
db $40 ; flags
- db 0, 0 ; start coords
- db 5, 19 ; end coords
+ menu_coords 0, 0, SCREEN_WIDTH - 1, 5
dw NULL
db 0 ; default option
; 11a80c
@@ -5578,7 +5572,7 @@ Function11a9ce: ; 11a9ce
call ClearBGPalettes
call ReloadTilesetAndPalettes
call Call_ExitMenu
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
call ret_d90
farcall FinishExitMenu
@@ -5730,7 +5724,7 @@ Text_ThisBattleRoomPleaseWait: ; 0x11ac1f
done
; 0x11ac3e
-Function11ac3e: ; 11ac3e
+Special_Function11ac3e: ; 11ac3e
call SpeechTextBox
call FadeToMenu
callfar ClearSpriteAnims2
@@ -6002,8 +5996,7 @@ Function11adc4:
MenuDataHeader_11ae38: ; 11ae38
db $40 ; flags
- db 10, 10 ; start coords
- db 17, 17 ; end coords
+ menu_coords 10, 10, 17, SCREEN_HEIGHT - 1
dw NULL
db 0 ; default option
; 11ae40
@@ -6249,8 +6242,7 @@ Function11afd6: ; 11afd6
MenuDataHeader_11afe8: ; 11afe8
db $40 ; flags
- db 12, 9 ; start coords
- db 17, 19 ; end coords
+ menu_coords 9, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw NULL
db 0 ; default option
; 11aff0
@@ -6267,8 +6259,7 @@ String_11b003: ; 11b003
MenuDataHeader_11b013: ; 11b013
db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw NULL
db 1 ; default option
; 11b01b
@@ -6697,7 +6688,7 @@ Function11b242: ; 11b242
call PlaceString
xor a
ld [MonType], a
- farcall GetGender
+ farcall Predef_GetGender
hlcoord 1, 4
ld a, [CurPartySpecies]
ld bc, wcd2f
@@ -6930,7 +6921,7 @@ Function11b31b: ; 11b31b
db $39 ; 13
Function11b397: ; 11b397
- ld de, Sprites
+ ld de, Sprite01
.loop
ld a, [hl]
cp $ff
@@ -6939,26 +6930,25 @@ Function11b397: ; 11b397
and $7
swap a
add [hl]
- inc hl ; 1
- ld [de], a
+ inc hl
+ ld [de], a ; y
inc de
- ld a, [hli] ; 2
- ld [de], a
+ ld a, [hli]
+ ld [de], a ; x
inc de
ld a, [bc]
inc bc
- ld [de], a
+ ld [de], a ; tile id
inc de
- ld a, $5 ; OBPal 5
- ld [de], a
+ ld a, $5
+ ld [de], a ; attributes
inc de
jr .loop
; 11b3b6
-Function11b3b6: ; 11b3b6
-; unreferenced
+Unreferenced_Function11b3b6: ; 11b3b6
.loop
ld a, [hl]
cp -1
@@ -6989,7 +6979,7 @@ Function11b3b6: ; 11b3b6
; 11b3d9
Function11b3d9: ; 11b3d9
- ld de, Sprites + 28 * 4
+ ld de, Sprite29
push de
ld a, [wc7d2]
dec a
@@ -7062,7 +7052,7 @@ Function11b3d9: ; 11b3d9
ret
; 11b444
-Function11b444: ; 11b444
+Special_Function11b444: ; 11b444
; special
call Mobile46_InitJumptable
call Mobile46_RunJumptable
@@ -7156,7 +7146,7 @@ Function11b483: ; 11b483
pop de
push de
ld b, OTPARTYMON
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
pop de
ld h, d
ld l, e
@@ -7351,7 +7341,7 @@ Function11b5e7: ; 11b5e7
ret
; 11b5e8
-Function11b5e8: ; 11b5e8
+Special_Function11b5e8: ; 11b5e8
ld a, $0
call GetSRAMBank
ld hl, wRTC
@@ -7575,7 +7565,7 @@ Function11b6b4: ; 11b6b4
ld hl, $c60d + MON_STAT_EXP - 1
ld de, $c60d + MON_MAXHP
ld b, $1
- predef CalcPkmnStats
+ predef Predef_CalcPkmnStats
ld de, $c60d + MON_MAXHP
ld hl, $c60d + MON_HP
ld a, [de]
@@ -7587,7 +7577,7 @@ Function11b6b4: ; 11b6b4
ret
; 11b7e5
-Function11b7e5: ; 11b7e5
+Special_Function11b7e5: ; 11b7e5
ld a, [$c60d] ; species
ld [wOTTrademonSpecies], a
ld [CurPartySpecies], a
@@ -7646,7 +7636,7 @@ Function11b7e5: ; 11b7e5
ret
; 11b879
-Function11b879: ; 11b879
+Special_Function11b879: ; 11b879
farcall BattleTower_CheckSaveFileExistsAndIsYours
ld a, [ScriptVar]
and a
@@ -7739,7 +7729,7 @@ Function11b879: ; 11b879
ret
; 11b920
-Function11b920: ; 11b920
+Special_Function11b920: ; 11b920
call Mobile46_InitJumptable
ld a, $5
call GetSRAMBank
@@ -7752,7 +7742,7 @@ Function11b920: ; 11b920
ret
; 11b93b
-Function11b93b: ; 11b93b
+Special_Function11b93b: ; 11b93b
ld a, $5
call GetSRAMBank
xor a
@@ -7896,7 +7886,7 @@ AddMobileMonToParty: ; 11b98f
ret
; 11ba38
-Function11ba38: ; 11ba38
+Special_Function11ba38: ; 11ba38
farcall CheckCurPartyMonFainted
ret c
xor a
diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm
index f16391871..a1e8dac8a 100755
--- a/mobile/mobile_5b.asm
+++ b/mobile/mobile_5b.asm
@@ -1,5 +1,4 @@
-Function16c000: ; 16c000
-; unreferenced
+Unreferenced_Function16c000: ; 16c000
; Only for CGB
ld a, [hCGB]
and a
@@ -172,7 +171,7 @@ MobileSystemSplashScreen_InitGFX: ; 16c108
call DisableLCD
ld hl, vTiles2
ld de, .Tiles
- lb bc, BANK(.Tiles), $68
+ lb bc, BANK(.Tiles), 104
call Get2bpp
call .LoadPals
call .LoadTileMap
@@ -710,7 +709,7 @@ Function16cc02: ; 16cc02
Function16cc18: ; 16cc18
ld hl, vTiles1
ld de, GFX_16cca3
- lb bc, BANK(GFX_16cca3), $2e
+ lb bc, BANK(GFX_16cca3), 46
call Get2bpp
ret
; 16cc25
diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm
index 0e2f7d024..12bd893e0 100755
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -75,7 +75,7 @@ Function17005a: ; 17005a
; 1700b0
-INCLUDE "mobile/battle_tower_5c.asm"
+INCLUDE "engine/events/battle_tower/battle_tower.asm"
Function170be4: ; 170be4
ld a, $5
@@ -296,7 +296,7 @@ Function170d02: ; 170d02
ld [rVBK], a
ld de, GFX_171848
ld hl, vTiles1 tile $41
- lb bc, BANK(GFX_171848), $18
+ lb bc, BANK(GFX_171848), 24
call Get2bpp
xor a
ld [rVBK], a
@@ -514,7 +514,7 @@ Function171b42: ; 171b42 (5c:5b42)
Function171b4b: ; 171b4b (5c:5b4b)
depixel 8, 2
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -522,7 +522,7 @@ Function171b4b: ; 171b4b (5c:5b4b)
ld [hl], a
depixel 8, 19
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -530,7 +530,7 @@ Function171b4b: ; 171b4b (5c:5b4b)
ld [hl], a
depixel 17, 14, 2, 0
- ld a, SPRITE_ANIM_INDEX_1D
+ ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -654,7 +654,7 @@ Function171c41: ; 171c41 (5c:5c41)
dec [hl]
ret nz
call ClearBGPalettes
- farcall MobileFunc_106462
+ farcall Stubbed_Function106462
farcall Function106464
ld a, $2
ld [wc303], a
@@ -673,8 +673,7 @@ Function171c66: ; 171c66 (5c:5c66)
MenuDataHeader_171c6b: ; 171c6b
db $40 ; flags
- db 12, 0 ; start coords
- db 17, 19 ; end coords
+ menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
dw NULL
db 0 ; default option
; 171c73
@@ -936,7 +935,7 @@ GameBoyN64GFX:
INCBIN "gfx/trade/game_boy_n64.2bpp"
Tilemap_1733af:
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
INCBIN "gfx/unknown/1733af_corrupt.tilemap"
else
INCBIN "gfx/unknown/1733af.tilemap"
diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm
index 4d77df916..6074b6799 100644
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -412,7 +412,7 @@ Function17d1f1: ; 17d1f1
dec a
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
- predef GetUnownLetter
+ predef Predef_GetUnownLetter
callfar UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
@@ -429,10 +429,10 @@ Function17d1f1: ; 17d1f1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Parameter: [ScriptVar] = 0..1
;
-; if [ScriptVar] == 0
+; if [ScriptVar] == FALSE
; Show japanese menu options
; - News - News - ??? - Cancel
-; if [ScriptVar] == 1
+; if [ScriptVar] == TRUE
; Show BattleTower-Menu with 3 options in english language
; - Challenge - Explanation - Cancel
Special_Menu_ChallengeExplanationCancel: ; 17d224
@@ -484,8 +484,7 @@ Function17d246: ; 17d246
MenuDataHeader_17d26a: ; 17d26a
db $40 ; flags
- db 0, 0 ; start coords
- db 9, 14 ; end coords
+ menu_coords 0, 0, 14, 9
dw MenuData2_17d272
db 1 ; default option
@@ -500,8 +499,7 @@ MenuData2_17d272: ; 17d272
MenuDataHeader_ChallengeExplanationCancel: ; 17d28f
db $40 ; flags
- db 0, 0 ; start coords
- db 7, 14 ; end coords
+ menu_coords 0, 0, 14, 7
dw MenuData2_ChallengeExplanationCancel
db 1 ; default option
@@ -513,7 +511,7 @@ MenuData2_ChallengeExplanationCancel: ; 17d297
db "Cancel@"
; 17d2b6
-Function17d2b6: ; 17d2b6
+Special_Function17d2b6: ; 17d2b6
call Function17d2c0
farcall Function1181da
ret
@@ -528,7 +526,7 @@ Function17d2c0: ; 17d2c0
ret
; 17d2ce
-Function17d2ce: ; 17d2ce
+Special_Function17d2ce: ; 17d2ce
ld a, $5
call GetSRAMBank
ld a, [$aa72]
@@ -1500,7 +1498,7 @@ Function17d93a: ; 17d93a
add hl, de
ld e, l
ld d, h
- farcall HOF_AnimateFrontpic
+ farcall HOF_Predef_AnimateFrontpic
pop af
ld [rSVBK], a
call Function17e349
@@ -1532,12 +1530,12 @@ Function17d98b: ; 17d98b
ld d, a
push de
ld de, vTiles2
- farcall GetTrainerPic
+ farcall Predef_GetTrainerPic
pop hl
decoord 0, 0
add hl, de
ld bc, $707
- predef PlaceGraphic
+ predef Predef_PlaceGraphic
pop af
ld [rSVBK], a
call Function17e349
@@ -2339,7 +2337,7 @@ Function17ded9: ; 17ded9
ld [MonType], a
push hl
push bc
- predef TryAddMonToParty
+ predef Predef_TryAddMonToParty
farcall SetCaughtData
pop bc
pop hl
@@ -2444,7 +2442,7 @@ Function17ded9: ; 17ded9
ld e, l
push hl
ld b, $0
- farcall CalcPkmnStats
+ farcall Predef_CalcPkmnStats
ld a, [PartyCount]
dec a
ld hl, PartyMon1HP
@@ -2510,7 +2508,7 @@ Function17ded9: ; 17ded9
ld d, h
ld e, l
pop hl
- predef FillPP
+ predef Predef_FillPP
pop hl
pop bc
jp asm_17e0ee
@@ -2533,7 +2531,7 @@ Function17e026: ; 17e026
push bc
push hl
farcall LoadEnemyMon
- farcall SentPkmnIntoBox
+ farcall Predef_SendPkmnIntoBox
farcall SetBoxMonCaughtData
pop hl
pop bc
@@ -2624,7 +2622,7 @@ Function17e026: ; 17e026
push hl
ld hl, sBoxMon1Moves
ld de, sBoxMon1PP
- predef FillPP
+ predef Predef_FillPP
call CloseSRAM
pop hl
pop bc
@@ -4588,7 +4586,7 @@ Function17f524: ; 17f524
jr .asm_17f536
; 17f53d
-BattleTowerMobileError: ; 17f53d
+Special_BattleTowerMobileError: ; 17f53d
call FadeToMenu
xor a
ld [wc303], a
@@ -5215,7 +5213,7 @@ String_17fe63: ; 17fe63
next "せつめいしょを ごらんください"
db "@"
-String_17fe9a: ; 17fe9a ; unreferenced
+String_17fe9a: ; 17fe9a ; unused
db "ポケモンニュースが"
next "あたらしくなっているので"
next "レポートを おくれません"
diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm
index e36e779ae..2485410d4 100755
--- a/mobile/mobile_menu.asm
+++ b/mobile/mobile_menu.asm
@@ -462,8 +462,7 @@ Function4a28a: ; 4a28a (12:628a)
MenuDataHeader_0x4a346: ; 0x4a346
db $40 ; flags
- db 00, 12 ; start coords
- db 06, 19 ; end coords
+ menu_coords 12, 0, SCREEN_WIDTH - 1, 6
String_4a34b: ; 4a34b
db "いれなおす"
@@ -485,8 +484,7 @@ UnknownText_0x4a35d: ; 0x4a35d
DeletePassword_YesNo_MenuDataHeader: ; 0x4a362
db $40 ; flags
- db 07, 14 ; start coords
- db 11, 19 ; end coords
+ menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw MenuData2_0x4a36a
db 2 ; default option
; 0x4a36a
@@ -847,7 +845,7 @@ Function4a6ab: ; 4a6ab (12:66ab)
call ClearBGPalettes
ld b, SCGB_DIPLOMA
call GetSGBLayout
- farcall Function11c1ab
+ farcall Special_Function11c1ab
pop bc
call LoadFontsExtra
jp Function4a4c4
diff --git a/mobile/news/news.asm b/mobile/news/news.asm
index b95df06aa..d9dcc3ce8 100644
--- a/mobile/news/news.asm
+++ b/mobile/news/news.asm
@@ -1,9 +1,8 @@
; http://forums.glitchcity.info/index.php?topic=7509.msg206449#msg206449
- db $cc, $6b, $1e ; XXX
+ db $cc, $6b, $1e ; unused
-Function1f4003: ; 1f4003
-; XXX
+Unreferenced_Function1f4003: ; 1f4003
ld a, $6
call GetSRAMBank
ld hl, .news_data
@@ -16,8 +15,7 @@ Function1f4003: ; 1f4003
.news_data
INCBIN "mobile/news/news_1.bin"
-Function1f4dbe: ; 1f4dbe
-; XXX
+Unreferenced_Function1f4dbe: ; 1f4dbe
ld a, $6
call GetSRAMBank
ld hl, .news_data
diff --git a/sram.asm b/sram.asm
index 0b44c9304..f4ea18717 100644
--- a/sram.asm
+++ b/sram.asm
@@ -187,7 +187,8 @@ SECTION "SRAM Crystal Data", SRAM
sMobileEventIndex:: db ; be3c
sCrystalData:: ds wCrystalDataEnd - wCrystalData
-sMobileEventIndexBackup:: db
+
+sMobileEventIndexBackup:: db ; be44
SECTION "SRAM Battle Tower", SRAM
@@ -241,6 +242,7 @@ SECTION "Boxes 8-14", SRAM
SECTION "SRAM Mobile", SRAM, BANK [5]
ds 1 ; former location for sMobileEventIndex, moved to 1:BE3C in English
+
sTrainerRankings:: ; a001
sTrainerRankingGameTimeHOF:: ds 4
sTrainerRankingStepCountHOF:: ds 4
@@ -287,10 +289,11 @@ sTrainerRankingBugContestScore:: ds 2
sTrainerRankingsChecksum:: ds 2
sTrainerRankingsEnd:: ; a083
-ds 1 ; Former location for sMobileEventIndexBackup, moved to 1:BE44 in English
+ ds 1 ; Former location for sMobileEventIndexBackup, moved to 1:BE44 in English
+
sTrainerRankingsBackup:: ds sTrainerRankingsEnd - sTrainerRankings
-ds $945
+ ds $945
; aa4b
sMobileLoginPassword:: ds MOBILE_LOGIN_PASSWORD_LENGTH
diff --git a/text/common_2.asm b/text/common_2.asm
deleted file mode 100644
index 060070dea..000000000
--- a/text/common_2.asm
+++ /dev/null
@@ -1,309 +0,0 @@
-UnknownText_0x1c0000::
- text "Oh, no picture?"
- line "Come again, OK?"
- done
-
-UnknownText_0x1c0021::
- text "An EGG? My talent"
- line "is worth more…"
- done
-
-UnknownText_0x1c0043::
- text "Hello, hello! I'm"
- line "the NAME RATER."
-
- para "I rate the names"
- line "of #MON."
-
- para "Would you like me"
- line "to rate names?"
- done
-
-UnknownText_0x1c00a0::
- text "Which #MON's"
- line "nickname should I"
- cont "rate for you?"
- prompt
-
-UnknownText_0x1c00cd::
- text "Hm… @"
- text_from_ram StringBuffer1
- text "…"
- line "That's a fairly"
- cont "decent name."
-
- para "But, how about a"
- line "slightly better"
- cont "nickname?"
-
- para "Want me to give it"
- line "a better name?"
- done
-
-UnknownText_0x1c0142::
- text "All right. What"
- line "name should we"
- cont "give it, then?"
- prompt
-
-UnknownText_0x1c0171::
- text "That's a better"
- line "name than before!"
-
- para "Well done!"
- done
-
-UnknownText_0x1c019e::
- text "OK, then. Come"
- line "again sometime."
- done
-
-UnknownText_0x1c01be::
- text "Hm… @"
- text_from_ram StringBuffer1
- text "?"
- line "What a great name!"
- cont "It's perfect."
-
- para "Treat @"
- text_from_ram StringBuffer1
- text ""
- line "with loving care."
- done
-
-UnknownText_0x1c0208::
- text "Whoa… That's just"
- line "an EGG."
- done
-
-UnknownText_0x1c0222::
- text "It might look the"
- line "same as before,"
-
- para "but this new name"
- line "is much better!"
-
- para "Well done!"
- done
-
-UnknownText_0x1c0272::
- text "All right. This"
- line "#MON is now"
- cont "named @"
- text_from_ram StringBuffer1
- text "."
- prompt
-
-Text_Gained::
- text_from_ram StringBuffer1
- text " gained@@"
-
-Text_ABoostedStringBuffer2ExpPoints::
- text ""
- line "a boosted"
- cont "@"
- deciram StringBuffer2, 2, 4
- text " EXP. Points!"
- prompt
-
-Text_StringBuffer2ExpPoints::
- text ""
- line "@"
- deciram StringBuffer2, 2, 4
- text " EXP. Points!"
- prompt
-
-Text_GoPkmn::
- text "Go! @@"
-
-Text_DoItPkmn::
- text "Do it! @@"
-
-Text_GoForItPkmn::
- text "Go for it,"
- line "@@"
-
-Text_YourFoesWeakGetmPkmn::
- text "Your foe's weak!"
- line "Get'm, @@"
-
-Text_BattleMonNick01::
- text_from_ram BattleMonNick
- text "!"
- done
-
-Text_BattleMonNickComma::
- text_from_ram BattleMonNick
- text ",@@"
-
-Text_ThatsEnoughComeBack::
- text " that's"
- line "enough! Come back!@@"
-
-Text_OKComeBack::
- text " OK!"
- line "Come back!@@"
-
-Text_GoodComeBack::
- text " good!"
- line "Come back!@@"
-
-Text_ComeBack::
- text " come"
- line "back!"
- done
-
-UnknownText_0x1c0373::
- text "Booted up a TM."
- prompt
-
-UnknownText_0x1c0384::
- text "Booted up an HM."
- prompt
-
-UnknownText_0x1c0396::
- text "It contained"
- line "@"
- text_from_ram StringBuffer2
- text "."
-
- para "Teach @"
- text_from_ram StringBuffer2
- text ""
- line "to a #MON?"
- done
-
-UnknownText_0x1c03c2::
- text_from_ram StringBuffer2
- text " is"
- line "not compatible"
- cont "with @"
- text_from_ram StringBuffer1
- text "."
-
- para "It can't learn"
- line "@"
- text_from_ram StringBuffer2
- text "."
- prompt
-
-UnknownText_0x1c03fa::
- text "You have no room"
- line "for any more"
- cont "@"
- text_from_ram StringBuffer1
- text "S."
- prompt
-
-UnknownText_0x1c0421::
- text "You received"
- line "@"
- text_from_ram StringBuffer1
- text "!"
- prompt
-
-UnknownText_0x1c0436::
- text "The link has been"
- line "cancelled."
- prompt
-
-UnknownText_0x1c0454::
- text "Communication"
- line "error."
- prompt
-
-UnknownText_0x1c046a::
- text "Must retrieve GIFT"
- line "at #MON CENTER."
- prompt
-
-UnknownText_0x1c048e::
- text "Your friend isn't"
- line "ready."
- prompt
-
-UnknownText_0x1c04a7::
- text "Sorry--only five"
- line "GIFTS a day."
- prompt
-
-UnknownText_0x1c04c6::
- text "Sorry. One GIFT"
- line "a day per person."
- prompt
-
-UnknownText_0x1c04e9::
- text_from_ram wMysteryGiftPartnerName
- text " sent"
- line "@"
- text_from_ram StringBuffer1
- text "."
- prompt
-
-UnknownText_0x1c04fa::
- text_from_ram wMysteryGiftPartnerName
- text " sent"
- line "@"
- text_from_ram StringBuffer1
- text ""
- cont "to @"
- text_from_ram wMysteryGiftPlayerName
- text "'s home."
- prompt
-
-UnknownText_0x1c051a::
- text "Received"
- line "@"
- text_from_ram wc850
- text "'s CARD."
- prompt
-
-UnknownText_0x1c0531::
- text_from_ram wc850
- text "'s CARD was"
- line "listed as no.@"
- deciram wd265, 1, 2
- text "."
- prompt
-
-UnknownText_0x1c0555::
- text "The CARD was not"
- line "registered."
- prompt
-
-UnknownText_0x1c0573::
- text "The link has been"
- line "cancelled."
- prompt
-
-UnknownText_0x1c0591::
- text "Communication"
- line "error."
- prompt
-
-_BadgeRequiredText::
- text "Sorry! A new BADGE"
- line "is required."
- prompt
-
-UnknownText_0x1c05c8::
- text "Can't use that"
- line "here."
- prompt
-
-UnknownText_0x1c05dd::
- text_from_ram StringBuffer2
- text " used"
- line "CUT!"
- prompt
-
-UnknownText_0x1c05ec::
- text "There's nothing to"
- line "CUT here."
- prompt
-
-UnknownText_0x1c0609::
- text "A blinding FLASH"
- line "lights the area!@"
- text_waitbutton
- db "@@"
diff --git a/text/common_4.asm b/text/common_4.asm
deleted file mode 100644
index f5d14b7cd..000000000
--- a/text/common_4.asm
+++ /dev/null
@@ -1,683 +0,0 @@
-_OakText6::
- text "Now, what did you"
- line "say your name was?"
- prompt
-
-_OakText7::
- text "<PLAYER>, are you"
- line "ready?"
-
- para "Your very own"
- line "#MON story is"
- cont "about to unfold."
-
- para "You'll face fun"
- line "times and tough"
- cont "challenges."
-
- para "A world of dreams"
- line "and adventures"
-
- para "with #MON"
- line "awaits! Let's go!"
-
- para "I'll be seeing you"
- line "later!"
- done
-
-UnknownText_0x1c40e6::
- text "The clock's time"
- line "may be wrong."
-
- para "Please reset the"
- line "time."
- prompt
-
-UnknownText_0x1c411c::
- text "Set with the"
- line "Control Pad."
-
- para "Confirm: A Button"
- line "Cancel: B Button"
- done
-
-UnknownText_0x1c415b::
- text "Is this OK?"
- done
-
-UnknownText_0x1c4168::
- text "The clock has been"
- line "reset."
- done
-
-UnknownText_0x1c4183::
- text "Too much time has"
- line "elapsed. Please"
- cont "try again."
- prompt
-
-UnknownText_0x1c41b1::
- text "If you trade that"
- line "#MON, you won't"
- cont "be able to battle."
- prompt
-
-UnknownText_0x1c41e6::
- text "Your friend's"
- line "@"
- text_from_ram StringBuffer1
- text " appears"
- cont "to be abnormal!"
- prompt
-
-UnknownText_0x1c4212::
- text "Trade @"
- text_from_ram wd004
- text ""
- line "for @"
- text_from_ram StringBuffer1
- text "?"
- done
-
-UnknownText_0x1c422a::
- text "To enter a mobile"
- line "battle, you must"
-
- para "pick a team of"
- line "three #MON."
-
- para "Is that OK?"
- done
-
-UnknownText_0x1c4275::
- text "Need more info on"
- line "mobile battles?"
- done
-
-UnknownText_0x1c4298::
- text "For a mobile"
- line "battle, choose"
- cont "three #MON."
-
- para "The maximum daily"
- line "play time is ten"
-
- para "minutes for each"
- line "linked player."
-
- para "If a battle isn't"
- line "finished within"
-
- para "the time limit,"
- line "the player with"
-
- para "the fewest fainted"
- line "#MON wins."
-
- para "If tied, the team"
- line "that lost the"
-
- para "least amount of HP"
- line "wins."
- done
-
-UnknownText_0x1c439c::
- text "Today's remaining"
- line "time is @"
- deciram StringBuffer2, 1, 2
- text " min."
-
- para "Would you like to"
- line "battle?"
- done
-
-UnknownText_0x1c43dc::
- text "There are only @"
- deciram StringBuffer2, 1, 2
- text ""
- line "min. left today."
-
- para "Want a quick"
- line "battle?"
- done
-
-UnknownText_0x1c4419::
- text "There is only"
- line "1 min. left today!"
-
- para "Want to rush"
- line "through a battle?"
- done
-
-UnknownText_0x1c445a::
- text "There is less than"
- line "1 min. left today!"
-
- para "Please try again"
- line "tomorrow."
- done
-
-UnknownText_0x1c449c::
- text "Try again using"
- line "the same settings?"
- done
-
-UnknownText_0x1c44c0::
- text "There is less than"
- line "1 min. left today!"
- done
-
-UnknownText_0x1c44e7::
- text "No time left for"
- line "linking today."
- done
-
-UnknownText_0x1c4508::
- text "Pick three #MON"
- line "for battle."
- done
-
-UnknownText_0x1c4525::
- text "Today's remaining"
- line "time is @"
- deciram StringBuffer2, 1, 2
- text " min."
- done
-
-UnknownText_0x1c454b::
- text "Would you like to"
- line "save the game?"
- done
-
-UnknownText_0x1c456d::
- text "SAVING… DON'T TURN"
- line "OFF THE POWER."
- done
-
-UnknownText_0x1c4590::
- text "<PLAYER> saved"
- line "the game."
- done
-
-UnknownText_0x1c45a3::
- text "There is already a"
- line "save file. Is it"
- cont "OK to overwrite?"
- done
-
-UnknownText_0x1c45d9::
- text "There is another"
- line "save file. Is it"
- cont "OK to overwrite?"
- done
-
-UnknownText_0x1c460d::
- text "The save file is"
- line "corrupted!"
- prompt
-
-UnknownText_0x1c462a::
- text "When you change a"
- line "#MON BOX, data"
- cont "will be saved. OK?"
- done
-
-UnknownText_0x1c465f::
- text "Each time you move"
- line "a #MON, data"
- cont "will be saved. OK?"
- done
-
-UnknownText_0x1c4693::
- text "The window save"
- line "area was exceeded."
- done
-
-UnknownText_0x1c46b7::
- text "No windows avail-"
- line "able for popping."
- done
-
-UnknownText_0x1c46dc::
- text "Corrupted event!"
- prompt
-
-_ObjectEventText::
- text "Object event"
- done
-
-UnknownText_0x1c46fc::
- text "BG event"
- done
-
-UnknownText_0x1c4706::
- text "Coordinates event"
- done
-
-UnknownText_0x1c4719::
- text "<PLAYER> received"
- line "@"
- text_from_ram StringBuffer4
- text "."
- done
-
-UnknownText_0x1c472c::
- text "<PLAYER> put the"
- line "@"
- text_from_ram StringBuffer1
- text " in"
- cont "the @"
- text_from_ram StringBuffer3
- text "."
- prompt
-
-UnknownText_0x1c474b::
- text "The @"
- text_from_ram StringBuffer3
- text ""
- line "is full…"
- prompt
-
-UnknownText_0x1c475f::
- text "I see all."
- line "I know all…"
-
- para "Certainly, I know"
- line "of your #MON!"
- done
-
-UnknownText_0x1c4797::
- text "Whaaaat? I can't"
- line "tell a thing!"
-
- para "How could I not"
- line "know of this?"
- done
-
-UnknownText_0x1c47d4::
- text "Hm… I see you met"
- line "@"
- text_from_ram wSeerNickname
- text " here:"
- cont "@"
- text_from_ram wSeerCaughtLocation
- text "!"
- prompt
-
-UnknownText_0x1c47fa::
- text "The time was"
- line "@"
- text_from_ram wSeerTimeOfDay
- text "!"
-
- para "Its level was @"
- text_from_ram wSeerCaughtLevelString
- text "!"
-
- para "Am I good or what?"
- prompt
-
-UnknownText_0x1c4837::
- text "Hm… @"
- text_from_ram wSeerNickname
- text ""
- line "came from @"
- text_from_ram wSeerOTName
- text ""
- cont "in a trade?"
-
- para "@"
- text_from_ram wSeerCaughtLocation
- text ""
- line "was where @"
- text_from_ram wSeerOTName
- text ""
- cont "met @"
- text_from_ram wSeerNickname
- text "!"
- prompt
-
-UnknownText_0x1c487f::
- text "What!? Incredible!"
-
- para "I don't understand"
- line "how, but it is"
-
- para "incredible!"
- line "You are special."
-
- para "I can't tell where"
- line "you met it, but it"
- cont "was at level @"
- text_from_ram wSeerCaughtLevelString
- text "."
-
- para "Am I good or what?"
- prompt
-
-UnknownText_0x1c491d::
- text "Hey!"
-
- para "That's an EGG!"
-
- para "You can't say that"
- line "you've met it yet…"
- done
-
-UnknownText_0x1c4955::
- text "Fufufu! I saw that"
- line "you'd do nothing!"
- done
-
-UnknownText_0x1c497a::
- text "Incidentally…"
-
- para "It would be wise"
- line "to raise your"
-
- para "#MON with a"
- line "little more care."
- done
-
-UnknownText_0x1c49c6::
- text "Incidentally…"
-
- para "It seems to have"
- line "grown a little."
-
- para "@"
- text_from_ram wSeerNickname
- text " seems"
- line "to be becoming"
- cont "more confident."
- done
-
-UnknownText_0x1c4a21::
- text "Incidentally…"
-
- para "@"
- text_from_ram wSeerNickname
- text " has"
- line "grown. It's gained"
- cont "much strength."
- done
-
-UnknownText_0x1c4a5b::
- text "Incidentally…"
-
- para "It certainly has"
- line "grown mighty!"
-
- para "This @"
- text_from_ram wSeerNickname
- text ""
- line "must have come"
-
- para "through numerous"
- line "#MON battles."
-
- para "It looks brimming"
- line "with confidence."
- done
-
-UnknownText_0x1c4ae5::
- text "Incidentally…"
-
- para "I'm impressed by"
- line "your dedication."
-
- para "It's been a long"
- line "time since I've"
-
- para "seen a #MON as"
- line "mighty as this"
- cont "@"
- text_from_ram wSeerNickname
- text "."
-
- para "I'm sure that"
- line "seeing @"
- text_from_ram wSeerNickname
- text ""
- para "in battle would"
- line "excite anyone."
- done
-
-UnknownText_0x1c4b92::
- text "Congratulations!"
- line "Your @"
- text_from_ram StringBuffer2
- db "@@"
-
-UnknownText_0x1c4baf::
- text ""
- para "evolved into"
- line "@"
- text_from_ram StringBuffer1
- text "!"
- done
-
-UnknownText_0x1c4bc5::
- text "Huh? @"
- text_from_ram StringBuffer2
- text ""
- line "stopped evolving!"
- prompt
-
-UnknownText_0x1c4be3::
- text "What? @"
- text_from_ram StringBuffer2
- text ""
- line "is evolving!"
- done
-
-UnknownText_0x1c4bfd::
- text "How many?"
- done
-
-UnknownText_0x1c4c08::
- deciram wItemQuantityChangeBuffer, 1, 2
- text " @"
- text_from_ram StringBuffer2
- text "(S)"
- line "will be ¥@"
- deciram hMoneyTemp, 3, 6
- text "."
- done
-
-UnknownText_0x1c4c28::
- text "Hello, dear."
-
- para "I sell inexpensive"
- line "herbal medicine."
-
- para "They're good, but"
- line "a trifle bitter."
-
- para "Your #MON may"
- line "not like them."
-
- para "Hehehehe…"
- done
-
-UnknownText_0x1c4ca3::
- text "How many?"
- done
-
-UnknownText_0x1c4cae::
- deciram wItemQuantityChangeBuffer, 1, 2
- text " @"
- text_from_ram StringBuffer2
- text "(S)"
- line "will be ¥@"
- deciram hMoneyTemp, 3, 6
- text "."
- done
-
-UnknownText_0x1c4cce::
- text "Thank you, dear."
- line "Hehehehe…"
- done
-
-UnknownText_0x1c4cea::
- text "Oh? Your PACK is"
- line "full, dear."
- done
-
-UnknownText_0x1c4d08::
- text "Hehehe… You don't"
- line "have the money."
- done
-
-UnknownText_0x1c4d2a::
- text "Come again, dear."
- line "Hehehehe…"
- done
-
-UnknownText_0x1c4d47::
- text "Hiya! Care to see"
- line "some bargains?"
-
- para "I sell rare items"
- line "that nobody else"
-
- para "carries--but only"
- line "one of each item."
- done
-
-UnknownText_0x1c4db0::
- text_from_ram StringBuffer2
- text " costs"
- line "¥@"
- deciram hMoneyTemp, 3, 6
- text ". Want it?"
- done
-
-UnknownText_0x1c4dcd::
- text "Thanks."
- done
-
-UnknownText_0x1c4dd6::
- text "Uh-oh, your PACK"
- line "is chock-full."
- done
-
-UnknownText_0x1c4df7::
- text "You bought that"
- line "already. I'm all"
- cont "sold out of it."
- done
-
-UnknownText_0x1c4e28::
- text "Uh-oh, you're"
- line "short on funds."
- done
-
-UnknownText_0x1c4e46::
- text "Come by again"
- line "sometime."
- done
-
-UnknownText_0x1c4e5f::
- text "What's up? Need"
- line "some medicine?"
- done
-
-UnknownText_0x1c4e7e::
- text "How many?"
- done
-
-UnknownText_0x1c4e89::
- deciram wItemQuantityChangeBuffer, 1, 2
- text " @"
- text_from_ram StringBuffer2
- text "(S)"
- line "will cost ¥@"
- deciram hMoneyTemp, 3, 6
- text "."
- done
-
-UnknownText_0x1c4eab::
- text "Thanks much!"
- done
-
-UnknownText_0x1c4eb9::
- text "You don't have any"
- line "more space."
- done
-
-UnknownText_0x1c4ed8::
- text "Huh? That's not"
- line "enough money."
- done
-
-UnknownText_0x1c4ef6::
- text "All right."
- line "See you around."
- done
-
-UnknownText_0x1c4f12::
- text "You don't have"
- line "anything to sell."
- prompt
-
-UnknownText_0x1c4f33::
- text "How many?"
- done
-
-UnknownText_0x1c4f3e::
- text "I can pay you"
- line "¥@"
- deciram hMoneyTemp, 3, 6
- text "."
-
- para "Is that OK?"
- done
-
-UnknownText_0x1c4f62::
- text "Welcome! How may I"
- line "help you?"
- done
-
-UnknownText_0x1c4f80::
- text "Here you are."
- line "Thank you!"
- done
-
-UnknownText_0x1c4f9a::
- text "You don't have"
- line "enough money."
- done
-
-UnknownText_0x1c4fb7::
- text "You can't carry"
- line "any more items."
- done
-
-UnknownText_0x1c4fd7::
- text "Sorry, I can't buy"
- line "that from you."
- prompt
-
-UnknownText_0x1c4ff9::
- text "Please come again!"
- done
-
-UnknownText_0x1c500d::
- text "Can I do anything"
- line "else for you?"
- done
-
-UnknownText_0x1c502e::
- text "Got ¥@"
- deciram hMoneyTemp, 3, 6
- text " for"
- line "@"
- text_from_ram StringBuffer2
- text "(S)."
- done
-
-UnknownText_0x1c5049::
- text "Bet how many"
- line "coins?"
- done
diff --git a/text/common_text.asm b/text/common_text.asm
deleted file mode 100644
index d21685480..000000000
--- a/text/common_text.asm
+++ /dev/null
@@ -1,18 +0,0 @@
-INCLUDE "includes.asm"
-
-
-SECTION "Text 1", ROMX
-
-INCLUDE "text/common_1.asm"
-
-
-SECTION "Text 2", ROMX
-
-INCLUDE "text/common_2.asm"
-INCLUDE "text/common_3.asm"
-
-
-SECTION "Text 3", ROMX
-
-INCLUDE "text/common_4.asm"
-INCLUDE "text/common_5.asm"
diff --git a/tilesets/palette_maps.asm b/tilesets/palette_maps.asm
deleted file mode 100644
index 55391aeac..000000000
--- a/tilesets/palette_maps.asm
+++ /dev/null
@@ -1,130 +0,0 @@
-TilesetKantoPalMap: ; 0x4c075
-INCLUDE "tilesets/kanto_palette_map.asm"
-; 0x4c0e5
-
-Tileset0PalMap: ; 0x4c0e5
-TilesetJohto1PalMap: ; 0x4c0e5
-INCLUDE "tilesets/johto_1_palette_map.asm"
-; 0x4c155
-
-TilesetJohto2PalMap: ; 0x4c155
-INCLUDE "tilesets/johto_2_palette_map.asm"
-; 0x4c1c5
-
-TilesetHouse1PalMap: ; 0x4c1c5
-INCLUDE "tilesets/house_1_palette_map.asm"
-; 0x4c235
-
-TilesetPlayersHousePalMap: ; 0x4c235
-INCLUDE "tilesets/players_house_palette_map.asm"
-; 0x4c2a5
-
-TilesetPokecenterPalMap: ; 0x4c2a5
-INCLUDE "tilesets/pokecenter_palette_map.asm"
-; 0x4c315
-
-TilesetGatePalMap: ; 0x4c315
-INCLUDE "tilesets/gate_palette_map.asm"
-; 0x4c385
-
-TilesetPortPalMap: ; 0x4c385
-INCLUDE "tilesets/port_palette_map.asm"
-; 0x4c3f5
-
-TilesetLabPalMap: ; 0x4c3f5
-INCLUDE "tilesets/lab_palette_map.asm"
-; 0x4c465
-
-TilesetPowerPlantPalMap: ; 0x4c465
-INCLUDE "tilesets/power_plant_palette_map.asm"
-; 0x4c4d5
-
-TilesetMartPalMap: ; 0x4c4d5
-INCLUDE "tilesets/mart_palette_map.asm"
-; 0x4c545
-
-TilesetCeladonMansionPalMap: ; 0x4c545
-INCLUDE "tilesets/celadon_mansion_palette_map.asm"
-; 0x4c5b5
-
-TilesetGameCornerPalMap: ; 0x4c5b5
-INCLUDE "tilesets/game_corner_palette_map.asm"
-; 0x4c625
-
-TilesetGym1PalMap: ; 0x4c625
-INCLUDE "tilesets/gym_1_palette_map.asm"
-; 0x4c695
-
-TilesetKurtsHousePalMap: ; 0x4c695
-INCLUDE "tilesets/kurts_house_palette_map.asm"
-; 0x4c705
-
-TilesetSproutTowerPalMap: ; 0x4c705
-INCLUDE "tilesets/sprout_tower_palette_map.asm"
-; 0x4c775
-
-TilesetCavePalMap: ; 0x4c775
-TilesetWhirlIslandsPalMap: ; 0x4c775
-INCLUDE "tilesets/cave_palette_map.asm"
-; 0x4c7e5
-
-TilesetParkPalMap: ; 0x4c7e5
-INCLUDE "tilesets/park_palette_map.asm"
-; 0x4c855
-
-TilesetRuinsOfAlphPalMap: ; 0x4c855
-TilesetBetaWordRoomPalMap: ; 0x4c855
-TilesetHoOhWordRoomPalMap: ; 0x4c855
-TilesetKabutoWordRoomPalMap: ; 0x4c855
-TilesetOmanyteWordRoomPalMap: ; 0x4c855
-TilesetAerodactylWordRoomPalMap: ; 0x4c855
-INCLUDE "tilesets/ruins_of_alph_palette_map.asm"
-; 0x4c8c5
-
-TilesetRadioTowerPalMap: ; 0x4c8c5
-INCLUDE "tilesets/radio_tower_palette_map.asm"
-; 0x4c935
-
-TilesetTrainStationPalMap: ; 0x4c935
-INCLUDE "tilesets/train_station_palette_map.asm"
-; 0x4c9a5
-
-TilesetUndergroundPalMap: ; 0x4c9a5
-INCLUDE "tilesets/underground_palette_map.asm"
-; 0x4ca15
-
-TilesetOlivineGymPalMap: ; 0x4ca15
-INCLUDE "tilesets/olivine_gym_palette_map.asm"
-; 0x4ca85
-
-TilesetLighthousePalMap: ; 0x4ca85
-INCLUDE "tilesets/lighthouse_palette_map.asm"
-; 0x4caf5
-
-TilesetPlayersHouse2FPalMap: ; 0x4caf5
-INCLUDE "tilesets/players_house_2f_palette_map.asm"
-; 0x4cb65
-
-UnusedMuseumPalMap: ; 0x4cb65
-INCLUDE "tilesets/unused_museum_palette_map.asm"
-; 4cbd5
-
-TilesetIcePathPalMap: ; 0x4cbd5
-INCLUDE "tilesets/ice_path_palette_map.asm"
-; 0x4cc45
-
-TilesetIlexForestPalMap: ; 0x4cc45
-INCLUDE "tilesets/ilex_forest_palette_map.asm"
-; 0x4ccb5
-
-TilesetPokeComCenterPalMap: ; 0x4ccb5
-INCLUDE "tilesets/pokecom_center_palette_map.asm"
-; 0x4cd25
-
-TilesetBattleTowerPalMap: ; 0x4cd25
-INCLUDE "tilesets/battle_tower_palette_map.asm"
-; 0x4cd95
-
-TilesetBattleTowerOutsidePalMap: ; 0x4cd95
-INCLUDE "tilesets/battle_tower_outside_palette_map.asm"
-; 0x4ce05
diff --git a/version.asm b/version.asm
deleted file mode 100644
index b42aceaee..000000000
--- a/version.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-_CRYSTAL EQU 1
-VERSION EQU 0
diff --git a/wram.asm b/wram.asm
index 91a452506..acc78b66b 100644
--- a/wram.asm
+++ b/wram.asm
@@ -1,4 +1,4 @@
-INCLUDE "includes.asm"
+INCLUDE "constants.asm"
INCLUDE "macros/wram.asm"
@@ -152,7 +152,7 @@ wMapTimeOfDay:: db
wPrinterConnectionOpen:: db
wPrinterOpcode:: db
-wLastDexEntry:: db
+wPrevDexEntry:: db
wDisableTextAcceleration:: db
wPreviousLandmark:: db
wCurrentLandmark:: db
@@ -303,20 +303,46 @@ wc3fc:: ds 1
SECTION "Sprites", WRAM0
Sprites:: ; c400
-; 4 bytes per sprite
-; 40 sprites
-; struct:
-; y (px)
-; x (px)
-; tile id
-; attributes:
-; bit 7: priority
-; bit 6: y flip
-; bit 5: x flip
-; bit 4: pal # (non-cgb)
-; bit 3: vram bank (cgb only)
-; bit 2-0: pal # (cgb only)
- ds 4 * 40
+Sprite01:: sprite_oam_struct Sprite01
+Sprite02:: sprite_oam_struct Sprite02
+Sprite03:: sprite_oam_struct Sprite03
+Sprite04:: sprite_oam_struct Sprite04
+Sprite05:: sprite_oam_struct Sprite05
+Sprite06:: sprite_oam_struct Sprite06
+Sprite07:: sprite_oam_struct Sprite07
+Sprite08:: sprite_oam_struct Sprite08
+Sprite09:: sprite_oam_struct Sprite09
+Sprite10:: sprite_oam_struct Sprite10
+Sprite11:: sprite_oam_struct Sprite11
+Sprite12:: sprite_oam_struct Sprite12
+Sprite13:: sprite_oam_struct Sprite13
+Sprite14:: sprite_oam_struct Sprite14
+Sprite15:: sprite_oam_struct Sprite15
+Sprite16:: sprite_oam_struct Sprite16
+Sprite17:: sprite_oam_struct Sprite17
+Sprite18:: sprite_oam_struct Sprite18
+Sprite19:: sprite_oam_struct Sprite19
+Sprite20:: sprite_oam_struct Sprite20
+Sprite21:: sprite_oam_struct Sprite21
+Sprite22:: sprite_oam_struct Sprite22
+Sprite23:: sprite_oam_struct Sprite23
+Sprite24:: sprite_oam_struct Sprite24
+Sprite25:: sprite_oam_struct Sprite25
+Sprite26:: sprite_oam_struct Sprite26
+Sprite27:: sprite_oam_struct Sprite27
+Sprite28:: sprite_oam_struct Sprite28
+Sprite29:: sprite_oam_struct Sprite29
+Sprite30:: sprite_oam_struct Sprite30
+Sprite31:: sprite_oam_struct Sprite31
+Sprite32:: sprite_oam_struct Sprite32
+Sprite33:: sprite_oam_struct Sprite33
+Sprite34:: sprite_oam_struct Sprite34
+Sprite35:: sprite_oam_struct Sprite35
+Sprite36:: sprite_oam_struct Sprite36
+Sprite37:: sprite_oam_struct Sprite37
+Sprite38:: sprite_oam_struct Sprite38
+Sprite39:: sprite_oam_struct Sprite39
+Sprite40:: sprite_oam_struct Sprite40
SpritesEnd::
@@ -827,7 +853,7 @@ wDexListingCursorBackup:: db
wBackupDexListingCursor:: db
wBackupDexListingPage:: db
wDexCurrentLocation:: db
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
wPokedexStatus:: db
wPokedexDataEnd::
else
@@ -1275,8 +1301,8 @@ wNamedObjectTypeBuffer:: db
ds 1
-wBattleTowerBattleEnded::
wJumptableIndex::
+wBattleTowerBattleEnded::
db
UNION ; cf64
@@ -1288,7 +1314,11 @@ wcf66:: db
NEXTU ; cf64
; intro and title data
wIntroSceneFrameCounter:: db
+UNION ; cf65
+wIntroSceneTimer:: db
+NEXTU ; cf65
wTitleScreenTimer:: dw
+ENDU
NEXTU ; cf64
; credits data
@@ -1297,10 +1327,31 @@ wCreditsBorderMon:: db
wCreditsLYOverride:: db
NEXTU ; cf64
-; unown puzzle data
-wHoldingUnownPuzzlePiece:: db
-wUnownPuzzleCursorPosition:: db
-wUnownPuzzleHeldPiece:: db
+; pokedex
+wPrevDexEntryJumptableIndex:: db
+if DEF(_CRYSTAL11)
+wPrevDexEntryBackup:: db
+else
+wPrevDexEntryBackup::
+wPokedexStatus:: db
+endc
+
+NEXTU ; cf64
+; pokegear
+wPokegearCard:: db
+wPokegearMapRegion:: db
+
+NEXTU ; cf64
+; pack
+wPackJumptableIndex:: db
+wCurrPocket:: db
+wPackUsedItem:: db
+
+NEXTU ; cf64
+; trainer card badges
+wTrainerCardBadgeFrameCounter:: db
+wTrainerCardBadgeTileID:: db
+wTrainerCardBadgeAttributes:: db
NEXTU ; cf64
; card flip data
@@ -1309,19 +1360,26 @@ wCardFlipCursorX:: db
wCardFlipWhichCard:: db
NEXTU ; cf64
-; pokedex
-wDexEntryPrevJumptableIndex:: db
-if !DEF(CRYSTAL11)
-wPokedexStatus:: db
-endc
+; magnet train
+wMagnetTrainOffset:: db
+wMagnetTrainPosition:: db
+wMagnetTrainWaitCounter:: db
+
+NEXTU ; cf64
+; unown puzzle data
+wHoldingUnownPuzzlePiece:: db
+wUnownPuzzleCursorPosition:: db
+wUnownPuzzleHeldPiece:: db
NEXTU ; cf64
; miscellaneous
+wFrameCounter::
wNrOfBeatenBattleTowerTrainers::
wMomBankDigitCursorPosition::
+wNamingScreenLetterCase::
+wHallOfFameMonCounter::
wSlotsDelay::
db
-wCurrPocket::
wPrinterQueueLength::
db
ENDU ; cf67
@@ -2438,9 +2496,9 @@ wCeruleanGymSceneID:: db ; d977
wRoute25SceneID:: db ; d978
wTrainerHouseB1FSceneID:: db ; d979
wVictoryRoadGateSceneID:: db ; d97a
-wSaffronTrainStationSceneID:: db ; d97b
+wSaffronMagnetTrainStationSceneID:: db ; d97b
wRoute16GateSceneID:: db ; d97c
-wRoute1718GateSceneID:: db ; d97d
+wRoute17Route18GateSceneID:: db ; d97d
wIndigoPlateauPokecenter1FSceneID:: db ; d97e
wWillsRoomSceneID:: db ; d97f
wKogasRoomSceneID:: db ; d980