summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
committerdannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
commit5914540ba780d7936fd6624d6fde2d67a9f7a773 (patch)
treea1ce27018f39d98f49d89468df426d0291e18560
parentccf4fe54a8e444aaf966fac7b38bc9452c494222 (diff)
parent8a5a7d8e68538b727e0c166488265f395603366e (diff)
Merge branch 'master' of https://github.com/pret/pokered into rgbgfxrgbgfx
-rw-r--r--INSTALL.md29
-rw-r--r--Makefile97
-rw-r--r--audio.asm42
-rw-r--r--audio/engine_1.asm1277
-rw-r--r--audio/engine_2.asm540
-rw-r--r--audio/engine_3.asm532
-rw-r--r--constants.asm2
-rwxr-xr-xconstants/connection_constants.asm4
-rwxr-xr-xconstants/event_macros.asm16
-rw-r--r--constants/hardware_constants.asm1
-rwxr-xr-xconstants/hide_show_constants.asm2
-rwxr-xr-xconstants/item_constants.asm20
-rw-r--r--constants/misc_constants.asm30
-rw-r--r--constants/music_constants.asm39
-rwxr-xr-xconstants/palette_constants.asm16
-rw-r--r--constants/pokedex_constants.asm2
-rw-r--r--constants/pokemon_constants.asm2
-rwxr-xr-xconstants/trainer_constants.asm101
-rw-r--r--constants/wram_constants.asm10
-rwxr-xr-xdata/baseStats/farfetchd.asm2
-rwxr-xr-xdata/evos_moves.asm171
-rwxr-xr-xdata/hidden_objects.asm2
-rwxr-xr-xdata/hide_show_data.asm2
-rwxr-xr-xdata/item_prices.asm34
-rwxr-xr-xdata/mapObjects/agatha.asm2
-rwxr-xr-xdata/mapObjects/bruno.asm2
-rwxr-xr-xdata/mapObjects/celadongamecorner.asm2
-rwxr-xr-xdata/mapObjects/celadongym.asm16
-rwxr-xr-xdata/mapObjects/ceruleancity.asm2
-rwxr-xr-xdata/mapObjects/ceruleangym.asm6
-rwxr-xr-xdata/mapObjects/cinnabargym.asm16
-rwxr-xr-xdata/mapObjects/fightingdojo.asm10
-rwxr-xr-xdata/mapObjects/fuchsiagym.asm14
-rwxr-xr-xdata/mapObjects/lance.asm2
-rwxr-xr-xdata/mapObjects/lorelei.asm2
-rwxr-xr-xdata/mapObjects/mansion1.asm2
-rwxr-xr-xdata/mapObjects/mansion2.asm2
-rwxr-xr-xdata/mapObjects/mansion3.asm4
-rwxr-xr-xdata/mapObjects/mansion4.asm4
-rwxr-xr-xdata/mapObjects/mtmoon1.asm14
-rwxr-xr-xdata/mapObjects/mtmoon3.asm10
-rwxr-xr-xdata/mapObjects/oakslab.asm2
-rwxr-xr-xdata/mapObjects/pewtergym.asm4
-rwxr-xr-xdata/mapObjects/pokemontower3.asm6
-rwxr-xr-xdata/mapObjects/pokemontower4.asm6
-rwxr-xr-xdata/mapObjects/pokemontower5.asm8
-rwxr-xr-xdata/mapObjects/pokemontower6.asm6
-rwxr-xr-xdata/mapObjects/pokemontower7.asm6
-rwxr-xr-xdata/mapObjects/rockethideout1.asm10
-rwxr-xr-xdata/mapObjects/rockethideout2.asm2
-rwxr-xr-xdata/mapObjects/rockethideout3.asm4
-rwxr-xr-xdata/mapObjects/rockethideout4.asm8
-rwxr-xr-xdata/mapObjects/rocktunnel1.asm14
-rwxr-xr-xdata/mapObjects/rocktunnel2.asm16
-rwxr-xr-xdata/mapObjects/route10.asm12
-rwxr-xr-xdata/mapObjects/route11.asm20
-rwxr-xr-xdata/mapObjects/route12.asm14
-rwxr-xr-xdata/mapObjects/route13.asm20
-rwxr-xr-xdata/mapObjects/route14.asm20
-rwxr-xr-xdata/mapObjects/route15.asm20
-rwxr-xr-xdata/mapObjects/route16.asm12
-rwxr-xr-xdata/mapObjects/route17.asm20
-rwxr-xr-xdata/mapObjects/route18.asm6
-rwxr-xr-xdata/mapObjects/route19.asm26
-rwxr-xr-xdata/mapObjects/route20.asm20
-rwxr-xr-xdata/mapObjects/route21.asm18
-rwxr-xr-xdata/mapObjects/route24.asm14
-rwxr-xr-xdata/mapObjects/route25.asm18
-rwxr-xr-xdata/mapObjects/route3.asm16
-rwxr-xr-xdata/mapObjects/route4.asm2
-rwxr-xr-xdata/mapObjects/route6.asm12
-rwxr-xr-xdata/mapObjects/route8.asm18
-rwxr-xr-xdata/mapObjects/route9.asm18
-rwxr-xr-xdata/mapObjects/saffrongym.asm16
-rwxr-xr-xdata/mapObjects/silphco10.asm4
-rwxr-xr-xdata/mapObjects/silphco11.asm6
-rwxr-xr-xdata/mapObjects/silphco2.asm8
-rwxr-xr-xdata/mapObjects/silphco3.asm4
-rwxr-xr-xdata/mapObjects/silphco4.asm6
-rwxr-xr-xdata/mapObjects/silphco5.asm8
-rwxr-xr-xdata/mapObjects/silphco6.asm6
-rwxr-xr-xdata/mapObjects/silphco7.asm8
-rwxr-xr-xdata/mapObjects/silphco8.asm6
-rwxr-xr-xdata/mapObjects/silphco9.asm6
-rwxr-xr-xdata/mapObjects/ssanne10.asm12
-rwxr-xr-xdata/mapObjects/ssanne2.asm2
-rwxr-xr-xdata/mapObjects/ssanne5.asm4
-rwxr-xr-xdata/mapObjects/ssanne8.asm8
-rwxr-xr-xdata/mapObjects/ssanne9.asm8
-rwxr-xr-xdata/mapObjects/vermiliongym.asm8
-rwxr-xr-xdata/mapObjects/victoryroad1.asm4
-rwxr-xr-xdata/mapObjects/victoryroad2.asm12
-rwxr-xr-xdata/mapObjects/victoryroad3.asm8
-rwxr-xr-xdata/mapObjects/viridianforest.asm6
-rwxr-xr-xdata/mapObjects/viridiangym.asm18
-rwxr-xr-xdata/mart_inventories.asm2
-rwxr-xr-xdata/mon_palettes.asm2
-rwxr-xr-xdata/moves.asm1
-rwxr-xr-xdata/pokedex_order.asm2
-rwxr-xr-xdata/sgb_packets.asm76
-rwxr-xr-xdata/trades.asm40
-rwxr-xr-xdata/trainer_moves.asm6
-rwxr-xr-xdata/trainer_parties.asm288
-rwxr-xr-xdata/trainer_types.asm24
-rwxr-xr-xdata/wildPokemon/route12.asm4
-rwxr-xr-xdata/wildPokemon/route13.asm4
-rwxr-xr-xengine/HoF_room_pc.asm3
-rwxr-xr-xengine/battle/animations.asm254
-rwxr-xr-xengine/battle/bank_e_misc.asm4
-rw-r--r--engine/battle/battle_transitions.asm15
-rw-r--r--engine/battle/common_text.asm10
-rwxr-xr-xengine/battle/core.asm994
-rw-r--r--engine/battle/decrement_pp.asm8
-rw-r--r--engine/battle/draw_hud_pokeball_gfx.asm21
-rwxr-xr-xengine/battle/end_of_battle.asm10
-rw-r--r--engine/battle/experience.asm22
-rw-r--r--engine/battle/get_trainer_name.asm8
-rw-r--r--engine/battle/ghost_marowak_anim.asm12
-rw-r--r--engine/battle/init_battle_variables.asm16
-rw-r--r--engine/battle/moveEffects/conversion_effect.asm4
-rw-r--r--engine/battle/moveEffects/drain_hp_effect.asm10
-rw-r--r--engine/battle/moveEffects/focus_energy_effect.asm4
-rw-r--r--engine/battle/moveEffects/haze_effect.asm8
-rw-r--r--engine/battle/moveEffects/heal_effect.asm4
-rw-r--r--engine/battle/moveEffects/leech_seed_effect.asm6
-rw-r--r--engine/battle/moveEffects/mist_effect.asm4
-rw-r--r--engine/battle/moveEffects/one_hit_ko_effect.asm6
-rw-r--r--engine/battle/moveEffects/paralyze_effect.asm6
-rw-r--r--engine/battle/moveEffects/pay_day_effect.asm2
-rw-r--r--engine/battle/moveEffects/recoil_effect.asm8
-rw-r--r--engine/battle/moveEffects/reflect_light_screen_effect.asm8
-rw-r--r--engine/battle/moveEffects/substitute_effect.asm6
-rw-r--r--engine/battle/moveEffects/transform_effect.asm20
-rw-r--r--engine/battle/print_type.asm8
-rwxr-xr-xengine/battle/read_trainer_party.asm24
-rwxr-xr-xengine/battle/safari_zone.asm2
-rw-r--r--engine/battle/save_trainer_name.asm54
-rw-r--r--engine/battle/scale_sprites.asm8
-rw-r--r--engine/battle/scroll_draw_trainer_pic.asm4
-rw-r--r--engine/battle/trainer_ai.asm48
-rw-r--r--engine/battle/wild_encounters.asm20
-rwxr-xr-xengine/cable_club.asm58
-rwxr-xr-xengine/clear_save.asm2
-rwxr-xr-xengine/evolution.asm22
-rwxr-xr-xengine/evos_moves.asm28
-rwxr-xr-xengine/experience.asm2
-rwxr-xr-xengine/game_corner_slots2.asm2
-rwxr-xr-xengine/gamefreak.asm12
-rwxr-xr-xengine/give_pokemon.asm4
-rwxr-xr-xengine/hall_of_fame.asm30
-rwxr-xr-xengine/hidden_object_functions14.asm2
-rwxr-xr-xengine/hidden_object_functions17.asm118
-rwxr-xr-xengine/hidden_object_functions18.asm4
-rwxr-xr-xengine/hidden_object_functions3.asm6
-rwxr-xr-xengine/hidden_object_functions7.asm56
-rwxr-xr-xengine/in_game_trades.asm22
-rwxr-xr-xengine/intro.asm68
-rwxr-xr-xengine/items/itemfinder.asm10
-rwxr-xr-xengine/items/items.asm635
-rwxr-xr-xengine/items/tms.asm2
-rwxr-xr-xengine/learn_move.asm42
-rwxr-xr-xengine/load_pokedex_tiles.asm2
-rw-r--r--engine/menu/bills_pc.asm16
-rwxr-xr-xengine/menu/diploma.asm4
-rwxr-xr-xengine/menu/league_pc.asm12
-rwxr-xr-xengine/menu/main_menu.asm35
-rwxr-xr-xengine/menu/naming_screen.asm27
-rwxr-xr-xengine/menu/party_menu.asm26
-rwxr-xr-xengine/menu/pokedex.asm23
-rwxr-xr-xengine/menu/prize_menu.asm20
-rwxr-xr-xengine/menu/start_sub_menus.asm34
-rwxr-xr-xengine/menu/status_screen.asm25
-rwxr-xr-xengine/mon_party_sprites.asm14
-rwxr-xr-xengine/oak_speech.asm26
-rwxr-xr-xengine/oak_speech2.asm8
-rwxr-xr-xengine/overworld/card_key.asm12
-rwxr-xr-xengine/overworld/cinnabar_lab.asm26
-rwxr-xr-xengine/overworld/cut.asm12
-rwxr-xr-xengine/overworld/doors.asm2
-rwxr-xr-xengine/overworld/elevator.asm2
-rwxr-xr-xengine/overworld/emotion_bubbles.asm2
-rwxr-xr-xengine/overworld/healing_machine.asm42
-rwxr-xr-xengine/overworld/hidden_items.asm4
-rwxr-xr-xengine/overworld/hidden_objects.asm14
-rw-r--r--engine/overworld/is_player_just_outside_map.asm8
-rw-r--r--engine/overworld/item.asm4
-rwxr-xr-xengine/overworld/ledges.asm5
-rwxr-xr-xengine/overworld/map_sprites.asm28
-rw-r--r--engine/overworld/movement.asm29
-rwxr-xr-xengine/overworld/npc_movement.asm24
-rwxr-xr-xengine/overworld/oaks_aide.asm34
-rwxr-xr-xengine/overworld/pewter_guys.asm4
-rwxr-xr-xengine/overworld/player_animations.asm4
-rwxr-xr-xengine/overworld/pokecenter.asm12
-rwxr-xr-xengine/overworld/ssanne.asm3
-rwxr-xr-xengine/overworld/trainers.asm2
-rwxr-xr-xengine/palettes.asm383
-rwxr-xr-xengine/play_time.asm26
-rwxr-xr-xengine/pokedex_rating.asm32
-rwxr-xr-xengine/predefs.asm4
-rwxr-xr-xengine/predefs17_2.asm4
-rwxr-xr-xengine/predefs7.asm4
-rwxr-xr-xengine/save.asm66
-rwxr-xr-xengine/slot_machine.asm30
-rwxr-xr-xengine/titlescreen.asm33
-rwxr-xr-xengine/town_map.asm37
-rwxr-xr-xengine/trade.asm62
-rw-r--r--home.asm270
-rw-r--r--home/audio.asm233
-rw-r--r--home/init.asm14
-rw-r--r--home/overworld.asm342
-rw-r--r--home/pic.asm240
-rw-r--r--home/text.asm2
-rw-r--r--home/vblank.asm16
-rw-r--r--home/vcopy.asm51
-rw-r--r--hram.asm29
-rw-r--r--macros.asm8
-rwxr-xr-xmain.asm264
-rwxr-xr-xscripts/agatha.asm59
-rwxr-xr-xscripts/bikeshop.asm20
-rwxr-xr-xscripts/billshouse.asm16
-rwxr-xr-xscripts/blueshouse.asm4
-rwxr-xr-xscripts/bruno.asm57
-rwxr-xr-xscripts/celadongamecorner.asm24
-rwxr-xr-xscripts/celadongym.asm20
-rwxr-xr-xscripts/celadonmansion3.asm2
-rwxr-xr-xscripts/celadonmartelevator.asm13
-rwxr-xr-xscripts/celadonmartroof.asm106
-rwxr-xr-xscripts/ceruleancity.asm36
-rwxr-xr-xscripts/ceruleangym.asm18
-rwxr-xr-xscripts/ceruleanhousetrashed.asm2
-rwxr-xr-xscripts/cinnabargym.asm30
-rwxr-xr-xscripts/cinnabarisland.asm12
-rwxr-xr-xscripts/daycarem.asm8
-rwxr-xr-xscripts/fightingdojo.asm22
-rwxr-xr-xscripts/fuchsiagym.asm18
-rwxr-xr-xscripts/gary.asm96
-rwxr-xr-xscripts/halloffameroom.asm22
-rwxr-xr-xscripts/indigoplateaulobby.asm2
-rwxr-xr-xscripts/lab4.asm17
-rwxr-xr-xscripts/lance.asm65
-rwxr-xr-xscripts/lorelei.asm57
-rwxr-xr-xscripts/mansion1.asm8
-rwxr-xr-xscripts/mansion2.asm8
-rwxr-xr-xscripts/mansion3.asm6
-rwxr-xr-xscripts/mansion4.asm6
-rwxr-xr-xscripts/mtmoon1.asm4
-rwxr-xr-xscripts/mtmoon3.asm38
-rwxr-xr-xscripts/museum1f.asm16
-rwxr-xr-xscripts/namerater.asm6
-rwxr-xr-xscripts/oakslab.asm108
-rwxr-xr-xscripts/pallettown.asm16
-rwxr-xr-xscripts/pewtercity.asm20
-rwxr-xr-xscripts/pewtergym.asm20
-rwxr-xr-xscripts/pewterpokecenter.asm9
-rwxr-xr-xscripts/pokemontower2.asm32
-rwxr-xr-xscripts/pokemontower3.asm4
-rwxr-xr-xscripts/pokemontower4.asm4
-rwxr-xr-xscripts/pokemontower5.asm4
-rwxr-xr-xscripts/pokemontower6.asm30
-rwxr-xr-xscripts/pokemontower7.asm32
-rwxr-xr-xscripts/powerplant.asm8
-rwxr-xr-xscripts/redshouse1f.asm8
-rwxr-xr-xscripts/redshouse2f.asm4
-rwxr-xr-xscripts/rockethideout1.asm6
-rwxr-xr-xscripts/rockethideout2.asm14
-rwxr-xr-xscripts/rockethideout3.asm12
-rwxr-xr-xscripts/rockethideout4.asm22
-rwxr-xr-xscripts/rockethideoutelevator.asm11
-rwxr-xr-xscripts/rocktunnel1.asm4
-rwxr-xr-xscripts/rocktunnel2.asm4
-rwxr-xr-xscripts/route10.asm4
-rwxr-xr-xscripts/route11.asm4
-rwxr-xr-xscripts/route11gateupstairs.asm12
-rwxr-xr-xscripts/route12.asm22
-rwxr-xr-xscripts/route13.asm4
-rwxr-xr-xscripts/route14.asm4
-rwxr-xr-xscripts/route15.asm4
-rwxr-xr-xscripts/route15gateupstairs.asm14
-rwxr-xr-xscripts/route16.asm22
-rwxr-xr-xscripts/route16gate.asm10
-rwxr-xr-xscripts/route17.asm4
-rwxr-xr-xscripts/route18.asm4
-rwxr-xr-xscripts/route18gate.asm10
-rwxr-xr-xscripts/route19.asm4
-rwxr-xr-xscripts/route20.asm4
-rwxr-xr-xscripts/route21.asm4
-rwxr-xr-xscripts/route22.asm46
-rwxr-xr-xscripts/route22gate.asm10
-rwxr-xr-xscripts/route23.asm16
-rwxr-xr-xscripts/route24.asm26
-rwxr-xr-xscripts/route25.asm6
-rwxr-xr-xscripts/route2gate.asm12
-rwxr-xr-xscripts/route3.asm4
-rwxr-xr-xscripts/route4.asm4
-rwxr-xr-xscripts/route5gate.asm8
-rwxr-xr-xscripts/route6.asm4
-rwxr-xr-xscripts/route6gate.asm6
-rwxr-xr-xscripts/route7gate.asm8
-rwxr-xr-xscripts/route8.asm4
-rwxr-xr-xscripts/route8gate.asm6
-rwxr-xr-xscripts/route9.asm4
-rw-r--r--scripts/safarizoneentrance-yellow.asm6
-rwxr-xr-xscripts/safarizoneentrance.asm24
-rwxr-xr-xscripts/saffrongym.asm18
-rwxr-xr-xscripts/seafoamislands4.asm20
-rwxr-xr-xscripts/seafoamislands5.asm20
-rwxr-xr-xscripts/silphco10.asm6
-rwxr-xr-xscripts/silphco11.asm12
-rwxr-xr-xscripts/silphco2.asm6
-rwxr-xr-xscripts/silphco3.asm6
-rwxr-xr-xscripts/silphco4.asm6
-rwxr-xr-xscripts/silphco5.asm6
-rwxr-xr-xscripts/silphco6.asm6
-rwxr-xr-xscripts/silphco7.asm24
-rwxr-xr-xscripts/silphco8.asm6
-rwxr-xr-xscripts/silphco9.asm6
-rwxr-xr-xscripts/silphcoelevator.asm19
-rwxr-xr-xscripts/ssanne10.asm4
-rwxr-xr-xscripts/ssanne2.asm30
-rwxr-xr-xscripts/ssanne5.asm4
-rwxr-xr-xscripts/ssanne7.asm12
-rwxr-xr-xscripts/ssanne8.asm4
-rwxr-xr-xscripts/ssanne9.asm4
-rwxr-xr-xscripts/unknowndungeon3.asm4
-rwxr-xr-xscripts/vermilioncity.asm26
-rwxr-xr-xscripts/vermiliondock.asm34
-rwxr-xr-xscripts/vermiliongym.asm20
-rwxr-xr-xscripts/victoryroad1.asm8
-rwxr-xr-xscripts/victoryroad2.asm10
-rwxr-xr-xscripts/victoryroad3.asm8
-rwxr-xr-xscripts/viridiancity.asm38
-rwxr-xr-xscripts/viridianforest.asm4
-rwxr-xr-xscripts/viridiangym.asm24
-rwxr-xr-xscripts/viridianmart.asm10
-rw-r--r--sram.asm40
-rw-r--r--text.asm1224
-rw-r--r--text/maps/agatha.asm12
-rw-r--r--text/maps/bike_shop.asm22
-rw-r--r--text/maps/bills_house.asm23
-rw-r--r--text/maps/blues_house.asm8
-rw-r--r--text/maps/bruno.asm8
-rw-r--r--text/maps/celadon_city.asm56
-rw-r--r--text/maps/celadon_dept_store_1f.asm6
-rw-r--r--text/maps/celadon_dept_store_2f.asm6
-rw-r--r--text/maps/celadon_dept_store_3f.asm30
-rw-r--r--text/maps/celadon_dept_store_4f.asm15
-rw-r--r--text/maps/celadon_dept_store_5f.asm6
-rw-r--r--text/maps/celadon_dept_store_roof.asm46
-rw-r--r--text/maps/celadon_diner.asm16
-rw-r--r--text/maps/celadon_game_corner.asm60
-rw-r--r--text/maps/celadon_gym.asm56
-rw-r--r--text/maps/celadon_hotel.asm6
-rw-r--r--text/maps/celadon_house.asm6
-rw-r--r--text/maps/celadon_mansion_1f.asm10
-rw-r--r--text/maps/celadon_mansion_2f.asm2
-rw-r--r--text/maps/celadon_mansion_3f.asm18
-rw-r--r--text/maps/celadon_mansion_4f_inside.asm2
-rw-r--r--text/maps/celadon_mansion_4f_outside.asm2
-rw-r--r--text/maps/celadon_pokecenter.asm4
-rw-r--r--text/maps/celadon_prize_room.asm4
-rw-r--r--text/maps/cerulean_badge_house.asm30
-rw-r--r--text/maps/cerulean_city.asm105
-rw-r--r--text/maps/cerulean_gym.asm56
-rw-r--r--text/maps/cerulean_mart.asm4
-rw-r--r--text/maps/cerulean_pokecenter.asm4
-rw-r--r--text/maps/cerulean_trade_house.asm41
-rw-r--r--text/maps/cerulean_trashed_house.asm8
-rw-r--r--text/maps/champion.asm16
-rw-r--r--text/maps/cinnabar_gym.asm60
-rw-r--r--text/maps/cinnabar_island.asm16
-rw-r--r--text/maps/cinnabar_lab.asm10
-rw-r--r--text/maps/cinnabar_lab_fossil_room.asm16
-rw-r--r--text/maps/cinnabar_lab_metronome_room.asm14
-rw-r--r--text/maps/cinnabar_lab_trade_room.asm2
-rw-r--r--text/maps/cinnabar_mart.asm4
-rw-r--r--text/maps/cinnabar_pokecenter.asm6
-rw-r--r--text/maps/copycats_house_1f.asm11
-rw-r--r--text/maps/copycats_house_2f.asm22
-rw-r--r--text/maps/daycare_1.asm18
-rw-r--r--text/maps/daycare_2.asm18
-rw-r--r--text/maps/digletts_cave_route_11_entrance.asm2
-rw-r--r--text/maps/digletts_cave_route_2_entrance.asm2
-rw-r--r--text/maps/fan_club.asm85
-rw-r--r--text/maps/fighting_dojo.asm46
-rw-r--r--text/maps/fuchsia_city.asm40
-rw-r--r--text/maps/fuchsia_fishing_house.asm10
-rw-r--r--text/maps/fuchsia_gym_1.asm4
-rw-r--r--text/maps/fuchsia_gym_2.asm50
-rw-r--r--text/maps/fuchsia_house.asm6
-rw-r--r--text/maps/fuchsia_mart.asm4
-rw-r--r--text/maps/fuchsia_meeting_room.asm6
-rw-r--r--text/maps/fuchsia_pokecenter.asm4
-rw-r--r--text/maps/fujis_house.asm24
-rw-r--r--text/maps/hall_of_fame.asm6
-rw-r--r--text/maps/indigo_plateau_lobby.asm4
-rw-r--r--text/maps/lance.asm10
-rw-r--r--text/maps/lavender_house.asm6
-rw-r--r--text/maps/lavender_mart.asm6
-rw-r--r--text/maps/lavender_pokecenter.asm8
-rw-r--r--text/maps/lavender_town.asm18
-rw-r--r--text/maps/lorelei.asm8
-rw-r--r--text/maps/mansion_1f.asm12
-rw-r--r--text/maps/mansion_2f.asm16
-rw-r--r--text/maps/mansion_3f.asm14
-rw-r--r--text/maps/mansion_b1f.asm14
-rw-r--r--text/maps/mr_psychics_house.asm8
-rw-r--r--text/maps/mt_moon_1f.asm48
-rw-r--r--text/maps/mt_moon_b1f.asm2
-rw-r--r--text/maps/mt_moon_b2f.asm65
-rw-r--r--text/maps/mt_moon_pokecenter.asm14
-rw-r--r--text/maps/museum_1f.asm36
-rw-r--r--text/maps/museum_2f.asm29
-rw-r--r--text/maps/name_rater.asm18
-rw-r--r--text/maps/oaks_lab.asm315
-rw-r--r--text/maps/pewter_city.asm32
-rw-r--r--text/maps/pewter_gym_1.asm2
-rw-r--r--text/maps/pewter_gym_2.asm68
-rw-r--r--text/maps/pewter_house_1.asm6
-rw-r--r--text/maps/pewter_house_2.asm4
-rw-r--r--text/maps/pewter_mart.asm8
-rw-r--r--text/maps/pewter_pokecenter.asm19
-rw-r--r--text/maps/pokemon_league_gate.asm6
-rw-r--r--text/maps/pokemon_tower_1f.asm10
-rw-r--r--text/maps/pokemon_tower_2f.asm10
-rw-r--r--text/maps/pokemon_tower_3f.asm18
-rw-r--r--text/maps/pokemon_tower_4f.asm18
-rw-r--r--text/maps/pokemon_tower_5f.asm28
-rw-r--r--text/maps/pokemon_tower_6f.asm24
-rw-r--r--text/maps/pokemon_tower_7f.asm47
-rw-r--r--text/maps/power_plant.asm4
-rw-r--r--text/maps/reds_house_1f.asm16
-rw-r--r--text/maps/rock_tunnel_b1f.asm44
-rw-r--r--text/maps/rock_tunnel_b2f_1.asm40
-rw-r--r--text/maps/rock_tunnel_b2f_2.asm8
-rw-r--r--text/maps/rock_tunnel_pokecenter.asm4
-rw-r--r--text/maps/rocket_hideout_b1f.asm30
-rw-r--r--text/maps/rocket_hideout_b2f.asm6
-rw-r--r--text/maps/rocket_hideout_b3f.asm12
-rw-r--r--text/maps/rocket_hideout_b4f.asm49
-rw-r--r--text/maps/rocket_hideout_elevator.asm2
-rw-r--r--text/maps/route_1.asm12
-rw-r--r--text/maps/route_10.asm46
-rw-r--r--text/maps/route_11_1.asm50
-rw-r--r--text/maps/route_11_2.asm12
-rw-r--r--text/maps/route_11_gate.asm2
-rw-r--r--text/maps/route_11_gate_upstairs.asm4
-rw-r--r--text/maps/route_12.asm56
-rw-r--r--text/maps/route_12_gate.asm2
-rw-r--r--text/maps/route_12_gate_upstairs.asm16
-rw-r--r--text/maps/route_12_house.asm12
-rw-r--r--text/maps/route_13.asm66
-rw-r--r--text/maps/route_14.asm66
-rw-r--r--text/maps/route_15.asm62
-rw-r--r--text/maps/route_15_gate.asm2
-rw-r--r--text/maps/route_15_gate_upstairs.asm4
-rw-r--r--text/maps/route_16.asm50
-rw-r--r--text/maps/route_16_gate.asm8
-rw-r--r--text/maps/route_16_gate_upstairs.asm8
-rw-r--r--text/maps/route_16_house.asm10
-rw-r--r--text/maps/route_17.asm76
-rw-r--r--text/maps/route_18.asm22
-rw-r--r--text/maps/route_18_gate.asm6
-rw-r--r--text/maps/route_18_gate_upstairs.asm4
-rw-r--r--text/maps/route_19.asm62
-rw-r--r--text/maps/route_2.asm4
-rw-r--r--text/maps/route_20.asm64
-rw-r--r--text/maps/route_21.asm54
-rw-r--r--text/maps/route_22.asm24
-rw-r--r--text/maps/route_23.asm8
-rw-r--r--text/maps/route_24_1.asm16
-rw-r--r--text/maps/route_24_2.asm34
-rw-r--r--text/maps/route_25.asm91
-rw-r--r--text/maps/route_2_gate.asm4
-rw-r--r--text/maps/route_2_house.asm2
-rw-r--r--text/maps/route_3.asm57
-rw-r--r--text/maps/route_4.asm12
-rw-r--r--text/maps/route_5.asm2
-rw-r--r--text/maps/route_6.asm70
-rw-r--r--text/maps/route_7.asm2
-rw-r--r--text/maps/route_8.asm60
-rw-r--r--text/maps/route_9.asm73
-rw-r--r--text/maps/safari_zone_center.asm4
-rw-r--r--text/maps/safari_zone_east.asm6
-rw-r--r--text/maps/safari_zone_entrance.asm26
-rw-r--r--text/maps/safari_zone_north.asm10
-rw-r--r--text/maps/safari_zone_rest_house_1.asm4
-rw-r--r--text/maps/safari_zone_rest_house_2.asm6
-rw-r--r--text/maps/safari_zone_rest_house_3.asm6
-rw-r--r--text/maps/safari_zone_rest_house_4.asm6
-rw-r--r--text/maps/safari_zone_secret_house.asm8
-rw-r--r--text/maps/safari_zone_west.asm8
-rw-r--r--text/maps/saffron_city.asm46
-rw-r--r--text/maps/saffron_gates.asm16
-rw-r--r--text/maps/saffron_gym.asm64
-rw-r--r--text/maps/saffron_house.asm8
-rw-r--r--text/maps/saffron_mart.asm4
-rw-r--r--text/maps/saffron_pokecenter.asm4
-rw-r--r--text/maps/school.asm12
-rw-r--r--text/maps/seafoam_islands_b4f.asm6
-rw-r--r--text/maps/silph_co_10f.asm42
-rw-r--r--text/maps/silph_co_11f.asm38
-rw-r--r--text/maps/silph_co_1f.asm2
-rw-r--r--text/maps/silph_co_2f.asm36
-rw-r--r--text/maps/silph_co_3f.asm16
-rw-r--r--text/maps/silph_co_4f.asm22
-rw-r--r--text/maps/silph_co_5f_1.asm23
-rw-r--r--text/maps/silph_co_5f_2.asm16
-rw-r--r--text/maps/silph_co_6f.asm38
-rw-r--r--text/maps/silph_co_7f.asm42
-rw-r--r--text/maps/silph_co_8f.asm22
-rw-r--r--text/maps/silph_co_9f.asm24
-rw-r--r--text/maps/ss_anne_1.asm4
-rw-r--r--text/maps/ss_anne_10.asm40
-rw-r--r--text/maps/ss_anne_2.asm10
-rw-r--r--text/maps/ss_anne_3.asm2
-rw-r--r--text/maps/ss_anne_5.asm18
-rw-r--r--text/maps/ss_anne_6.asm24
-rw-r--r--text/maps/ss_anne_7.asm22
-rw-r--r--text/maps/ss_anne_8.asm36
-rw-r--r--text/maps/ss_anne_9.asm42
-rw-r--r--text/maps/underground_path_route_6_entrance.asm2
-rw-r--r--text/maps/underground_path_route_7_entrance.asm2
-rw-r--r--text/maps/underground_path_route_7_entrance_unused.asm8
-rw-r--r--text/maps/underground_path_route_8_entrance.asm2
-rw-r--r--text/maps/unknown_dungeon_b1f.asm2
-rw-r--r--text/maps/vermilion_city.asm34
-rw-r--r--text/maps/vermilion_dock.asm2
-rw-r--r--text/maps/vermilion_fishing_house.asm12
-rw-r--r--text/maps/vermilion_gym_1.asm24
-rw-r--r--text/maps/vermilion_gym_2.asm38
-rw-r--r--text/maps/vermilion_house.asm6
-rw-r--r--text/maps/vermilion_mart.asm4
-rw-r--r--text/maps/vermilion_pokecenter.asm6
-rw-r--r--text/maps/victory_road_1f.asm12
-rw-r--r--text/maps/victory_road_2f.asm32
-rw-r--r--text/maps/victory_road_3f.asm24
-rw-r--r--text/maps/viridian_city.asm44
-rw-r--r--text/maps/viridian_forest.asm74
-rw-r--r--text/maps/viridian_forest_entrance.asm15
-rw-r--r--text/maps/viridian_forest_exit.asm4
-rw-r--r--text/maps/viridian_gym.asm74
-rw-r--r--text/maps/viridian_house.asm8
-rw-r--r--text/maps/viridian_mart.asm28
-rw-r--r--text/maps/wardens_house.asm22
-rwxr-xr-xwram.asm1020
546 files changed, 9101 insertions, 9478 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 11450d93..c9696f72 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,14 +1,14 @@
# Linux
- sudo apt-get install make gcc bison git python python-setuptools
- sudo easy_install pypng
+ sudo apt-get install make gcc bison git python python-pip
+ sudo pip install pypng
- git clone git://github.com/bentley/rgbds.git
+ git clone https://github.com/bentley/rgbds
cd rgbds
sudo make install
cd ..
- git clone --recursive git://github.com/iimarckus/pokered.git
+ git clone --recursive https://github.com/pret/pokered
cd pokered
To build **pokered.gbc** and **pokeblue.gbc**:
@@ -23,17 +23,17 @@ To build them individually:
# Mac
-In the shell, run:
+In **Terminal**, run:
xcode-select --install
sudo easy_install pypng
- git clone git://github.com/bentley/rgbds.git
+ git clone https://github.com/bentley/rgbds
cd rgbds
sudo make install
cd ..
- git clone --recursive git://github.com/iimarckus/pokered.git
+ git clone --recursive https://github.com/pret/pokered
cd pokered
make
@@ -41,17 +41,20 @@ In the shell, run:
# Windows
-To build on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit).
-
-In the installer, select the following packages: `make` `git` `gettext` `python` `python-setuptools`
+To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings.
Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/).
-Put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
+Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
In the **Cygwin terminal**:
- easy_install pypng
- git clone --recursive git://github.com/iimarckus/pokered.git
+ install $(lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg) /bin
+ apt-cyg install make git python gettext
+
+ lynx -source bootstrap.pypa.io/get-pip.py | python
+ pip install pypng
+
+ git clone --recursive https://github.com/pret/pokered
cd pokered
make
diff --git a/Makefile b/Makefile
index 6333a776..f9b32b9b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,41 +1,10 @@
-# Build Red/Blue. Yellow is WIP.
-roms := pokered.gbc pokeblue.gbc
-
-
-.PHONY: all clean red blue yellow compare
-
-all: $(roms)
-red: pokered.gbc
-blue: pokeblue.gbc
-yellow: pokeyellow.gbc
-
-versions := red blue yellow
-
-
-# Header options for rgbfix.
-dmg_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03
-cgb_opt = -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03
-
-red_opt = $(dmg_opt) -t "POKEMON RED"
-blue_opt = $(dmg_opt) -t "POKEMON BLUE"
-yellow_opt = $(cgb_opt) -t "POKEMON YELLOW"
-
-
-
-# If your default python is 3, you may want to change this to python27.
+# python 2.7
PYTHON := python
# md5sum -c is used to compare rom hashes. The options may vary across platforms.
MD5 := md5sum -c --quiet
-# The compare target is a shortcut to check that the build matches the original roms exactly.
-# This is for contributors to make sure a change didn't affect the contents of the rom.
-# More thorough comparison can be made by diffing the output of hexdump -C against both roms.
-compare: red blue
- @$(MD5) roms.md5
-
-
# Clear the default suffixes.
.SUFFIXES:
.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pic
@@ -46,16 +15,16 @@ compare: red blue
# Suppress annoying intermediate file deletion messages.
.PRECIOUS: %.2bpp
-# Filepath shortcuts to avoid overly long recipes.
+.PHONY: all clean red blue compare
+
+
poketools := extras/pokemontools
-gfx := $(PYTHON) $(poketools)/gfx.py
-pic := $(PYTHON) $(poketools)/pic.py
+pic := $(PYTHON) $(poketools)/pic.py compress
includes := $(PYTHON) $(poketools)/scan_includes.py
+versions := red blue
-
-# Collect file dependencies for objects in red/, blue/ and yellow/.
-# These aren't provided by rgbds by default, so we have to look for file includes ourselves.
+# Collect file dependencies for objects in red/ and blue/.
$(foreach ver, $(versions), \
$(eval $(ver)_asm := $(shell find $(ver) -iname '*.asm')) \
$(eval $(ver)_obj := $($(ver)_asm:.asm=.o)) \
@@ -66,33 +35,49 @@ $(foreach obj, $(all_obj), \
)
-# Image files are converted using rgbgfx. Pokemon pics are added to a queue and compressed.
+roms := pokered.gbc pokeblue.gbc
+
+all: $(roms)
+red: pokered.gbc
+blue: pokeblue.gbc
+
+# For contributors to make sure a change didn't affect the contents of the rom.
+compare: red blue
+ @$(MD5) roms.md5
+
+clean:
+ rm -f $(roms) $(all_obj) $(roms:.gbc=.sym)
+ find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} +
+
+
+# Don't fix halts.
+asm_opt = -h
+
+# Make a symfile for debugging.
+link_opt = -n poke$*.sym
+
+# Header options for rgbfix.
+dmg_opt = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03
+red_opt = $(dmg_opt) -t "POKEMON RED"
+blue_opt = $(dmg_opt) -t "POKEMON BLUE"
+
+
+#%.png: ;
+#%.2bpp: %.png ; @$(2bpp) $<
+#%.1bpp: %.png ; @$(1bpp) $<
.png.2bpp:
@rgbgfx -o $@ $<
.png.1bpp:
@rgbgfx -b -o $@ $<
-%.pic: %.2bpp ; $(eval picq += $<) @rm -f $@
+%.pic: %.2bpp ; @$(pic) $<
# Assemble source files into objects.
-# Queue payloads are here. These are made silent since there may be hundreds of targets.
-# Use rgbasm -h to use halts without nops.
$(all_obj): $$*.asm $$($$*_dep)
- @$(pic) compress $(picq); $(eval picq :=)
- rgbasm -h -o $@ $*.asm
-
-
-# Link objects together to build a rom.
-
-# Make a symfile for debugging.
-link = rgblink -n poke$*.sym
+ rgbasm $(asm_opt) -o $@ $*.asm
+# Link objects to produce a rom.
poke%.gbc: $$(%_obj)
- $(link) -o $@ $^
+ rgblink $(link_opt) -o $@ $^
rgbfix $($*_opt) $@
-
-
-clean:
- rm -f $(roms) $(all_obj) poke*.sym
- find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} +
diff --git a/audio.asm b/audio.asm
index 286dc7ed..7e28b136 100644
--- a/audio.asm
+++ b/audio.asm
@@ -364,25 +364,25 @@ SECTION "Audio Engine 1", ROMX, BANK[AUDIO_1]
PlayBattleMusic:: ; 0x90c6
xor a
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
ld [wLowHealthAlarm], a
dec a
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound ; stop music
call DelayFrame
ld c, BANK(Music_GymLeaderBattle)
- ld a, [W_GYMLEADERNO]
+ ld a, [wGymLeaderNo]
and a
jr z, .notGymLeaderBattle
ld a, MUSIC_GYM_LEADER_BATTLE
jr .playSong
.notGymLeaderBattle
- ld a, [W_CUROPPONENT]
- cp $c8
+ ld a, [wCurOpponent]
+ cp 200
jr c, .wildBattle
- cp SONY3 + $c8
+ cp OPP_SONY3
jr z, .finalBattle
- cp LANCE + $c8
+ cp OPP_LANCE
jr nz, .normalTrainerBattle
ld a, MUSIC_GYM_LEADER_BATTLE ; lance also plays gym leader theme
jr .playSong
@@ -406,7 +406,7 @@ Music_RivalAlternateStart:: ; 0x9b47
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld de, Music_MeetRival_branch_b1a2
call Audio1_OverwriteChannelPointer
ld de, Music_MeetRival_branch_b21d
@@ -425,30 +425,30 @@ Music_RivalAlternateTempo:: ; 0x9b65
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
call PlayMusic
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld de, Music_MeetRival_branch_b119
jp Audio1_OverwriteChannelPointer
; applies both the alternate start and alternate tempo
Music_RivalAlternateStartAndTempo:: ; 0x9b75
call Music_RivalAlternateStart
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld de, Music_MeetRival_branch_b19b
jp Audio1_OverwriteChannelPointer
; an alternate tempo for Cities1 which is used for the Hall of Fame room
Music_Cities1AlternateTempo:: ; 0x9b81
- ld a, $a
- ld [wcfc8], a
- ld [wcfc9], a
- ld a, $ff
- ld [wMusicHeaderPointer], a
+ ld a, 10
+ ld [wAudioFadeOutCounterReloadValue], a
+ ld [wAudioFadeOutCounter], a
+ ld a, $ff ; stop playing music after the fade-out is finished
+ ld [wAudioFadeOutControl], a
ld c, 100
- call DelayFrames
+ call DelayFrames ; wait for the fade-out to finish
ld c, BANK(Music_Cities1)
ld a, MUSIC_CITIES1
call PlayMusic
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld de, Music_Cities1_branch_aa6f
jp Audio1_OverwriteChannelPointer
@@ -477,7 +477,7 @@ Music_DoLowHealthAlarm:: ; 2136e (8:536e)
.asm_2138a
ld a, $86
- ld [wc02a], a ;disable sound channel?
+ ld [wChannelSoundIDs + CH4], a ;disable sound channel?
ld a, [wLowHealthAlarm]
and $7f ;decrement alarm timer.
dec a
@@ -491,7 +491,7 @@ Music_DoLowHealthAlarm:: ; 2136e (8:536e)
.disableAlarm
xor a
ld [wLowHealthAlarm], a ;disable alarm
- ld [wc02a], a ;re-enable sound channel?
+ ld [wChannelSoundIDs + CH4], a ;re-enable sound channel?
ld de, .toneDataSilence
jr .playTone
@@ -542,7 +542,7 @@ Music_PokeFluteInBattle:: ; 22306 (8:6306)
ld a, SFX_CAUGHT_MON
call PlaySoundWaitForCurrent
; then immediately overwrtie the channel pointers
- ld hl, wc00e
+ ld hl, wChannelCommandPointers + CH4 * 2
ld de, SFX_08_PokeFlute_Ch1
call Audio2_OverwriteChannelPointer
ld de, SFX_08_PokeFlute_Ch2
@@ -572,7 +572,7 @@ PlayPokedexRatingSfx:: ; 7d13b (1f:513b)
.gotSfxPointer
push bc
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySoundWaitForCurrent
pop bc
ld b, $0
diff --git a/audio/engine_1.asm b/audio/engine_1.asm
index 9a302ef3..c729fa7e 100644
--- a/audio/engine_1.asm
+++ b/audio/engine_1.asm
@@ -3,29 +3,29 @@
Audio1_UpdateMusic:: ; 0x9103
ld c, CH0
.loop
- ld b, $0
- ld hl, wc026
+ ld b, 0
+ ld hl, wChannelSoundIDs
add hl, bc
ld a, [hl]
and a
jr z, .nextChannel
ld a, c
cp CH4
- jr nc, .asm_912e ; if sfx channel
- ld a, [wc002]
+ jr nc, .applyAffects ; if sfx channel
+ ld a, [wMuteAudioAndPauseMusic]
and a
- jr z, .asm_912e
+ jr z, .applyAffects
bit 7, a
jr nz, .nextChannel
set 7, a
- ld [wc002], a
- xor a
- ld [$ff25], a
- ld [$ff1a], a
+ ld [wMuteAudioAndPauseMusic], a
+ xor a ; disable all channels' output
+ ld [rNR51], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
jr .nextChannel
-.asm_912e
+.applyAffects
call Audio1_ApplyMusicAffects
.nextChannel
ld a, c
@@ -36,15 +36,9 @@ Audio1_UpdateMusic:: ; 0x9103
; this routine checks flags for music effects currently applied
; to the channel and calls certain functions based on flags.
-; known flags for wc02e:
-; 0: toggleperfectpitch has been used
-; 1: call has been used
-; 3: a toggle used only by this routine for vibrato
-; 4: pitchbend flag
-; 6: dutycycle flag
Audio1_ApplyMusicAffects: ; 0x9138
ld b, $0
- ld hl, wc0b6 ; delay until next note
+ ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
cp $1 ; if the delay is 1, play next note
@@ -54,45 +48,45 @@ Audio1_ApplyMusicAffects: ; 0x9138
ld a, c
cp CH4
jr nc, .startChecks ; if a sfx channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr z, .startChecks
ret
.startChecks
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 6, [hl] ; dutycycle
+ bit BIT_ROTATE_DUTY, [hl]
jr z, .checkForExecuteMusic
call Audio1_ApplyDutyCycle
.checkForExecuteMusic
- ld b, $0
- ld hl, wc036
+ ld b, 0
+ ld hl, wChannelFlags2
add hl, bc
- bit 0, [hl]
+ bit BIT_EXECUTE_MUSIC, [hl]
jr nz, .checkForPitchBend
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 2, [hl]
- jr nz, .disablePitchBendVibrato
+ bit BIT_NOISE_OR_SFX, [hl]
+ jr nz, .skipPitchBendVibrato
.checkForPitchBend
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 4, [hl] ; pitchbend
+ bit BIT_PITCH_BEND_ON, [hl]
jr z, .checkVibratoDelay
jp Audio1_ApplyPitchBend
.checkVibratoDelay
- ld hl, wc04e ; vibrato delay
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld a, [hl]
and a ; check if delay is over
jr z, .checkForVibrato
dec [hl] ; otherwise, dec delay
-.disablePitchBendVibrato
+.skipPitchBendVibrato
ret
.checkForVibrato
- ld hl, wc056 ; vibrato rate
+ ld hl, wChannelVibratoExtents
add hl, bc
ld a, [hl]
and a
@@ -100,38 +94,40 @@ Audio1_ApplyMusicAffects: ; 0x9138
ret ; no vibrato
.vibrato
ld d, a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, bc
ld a, [hl]
and $f
and a
- jr z, .vibratoAlreadyDone
- dec [hl] ; apply vibrato pitch change
+ jr z, .applyVibrato
+ dec [hl] ; decrement counter
ret
-.vibratoAlreadyDone
+.applyVibrato
ld a, [hl]
swap [hl]
or [hl]
- ld [hl], a ; reset the vibrato value and start again
- ld hl, wc066
+ ld [hl], a ; reload the counter
+ ld hl, wChannelFrequencyLowBytes
add hl, bc
ld e, [hl] ; get note pitch
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 3, [hl] ; this is the only code that sets/resets bit three so
- jr z, .unset ; it continuously alternates which path it takes
- res 3, [hl]
+; This is the only code that sets/resets the vibrato direction bit, so it
+; continuously alternates which path it takes.
+ bit BIT_VIBRATO_DIRECTION, [hl]
+ jr z, .unset
+ res BIT_VIBRATO_DIRECTION, [hl]
ld a, d
and $f
ld d, a
ld a, e
sub d
jr nc, .noCarry
- ld a, $0
+ ld a, 0
.noCarry
jr .done
.unset
- set 3, [hl]
+ set BIT_VIBRATO_DIRECTION, [hl]
ld a, d
and $f0
swap a
@@ -140,8 +136,8 @@ Audio1_ApplyMusicAffects: ; 0x9138
ld a, $ff
.done
ld d, a
- ld b, $3
- call Audio1_9838
+ ld b, REG_FREQUENCY_LO
+ call Audio1_GetRegisterPointer
ld [hl], d
ret
@@ -149,16 +145,18 @@ Audio1_ApplyMusicAffects: ; 0x9138
; like tempo changes, duty changes etc. and doesn't return
; until the first note is reached
Audio1_PlayNextNote: ; 0x91d0
- ld hl, wc06e
+; reload the vibrato delay counter
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, bc
ld a, [hl]
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld [hl], a
- ld hl, wc02e
+
+ ld hl, wChannelFlags1
add hl, bc
- res 4, [hl]
- res 5, [hl]
+ res BIT_PITCH_BEND_ON, [hl]
+ res BIT_PITCH_BEND_DECREASING, [hl]
call Audio1_endchannel
ret
@@ -167,34 +165,35 @@ Audio1_endchannel: ; 0x91e6
ld d, a
cp $ff ; is this command an endchannel?
jp nz, Audio1_callchannel ; no
- ld b, $0 ; yes
- ld hl, wc02e
+ ld b, 0
+ ld hl, wChannelFlags1
add hl, bc
- bit 1, [hl]
+ bit BIT_CHANNEL_CALL, [hl]
jr nz, .returnFromCall
ld a, c
cp CH3
jr nc, .noiseOrSfxChannel
- jr .asm_923f
+ jr .disableChannelOutput
.noiseOrSfxChannel
- res 2, [hl]
- ld hl, wc036
+ res BIT_NOISE_OR_SFX, [hl]
+ ld hl, wChannelFlags2
add hl, bc
- res 0, [hl]
+ res BIT_EXECUTE_MUSIC, [hl]
cp CH6
- jr nz, .notSfxChannel3
+ jr nz, .skipSfxChannel3
+; restart hardware channel 3 (wave channel) output
ld a, $0
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
-.notSfxChannel3
+ ld [rNR30], a
+.skipSfxChannel3
jr nz, .asm_9222
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr z, .asm_9222
xor a
- ld [wc003], a
- jr .asm_923f
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ jr .disableChannelOutput
.asm_9222
jr .asm_9248
.returnFromCall
@@ -203,10 +202,10 @@ Audio1_endchannel: ; 0x91e6
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
push hl ; store current channel address
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld e, l
ld d, h
@@ -217,36 +216,36 @@ Audio1_endchannel: ; 0x91e6
ld a, [de]
ld [hl], a ; loads channel address to return to
jp Audio1_endchannel
-.asm_923f
- ld hl, Unknown_9b1f
+.disableChannelOutput
+ ld hl, Audio1_HWChannelDisableMasks
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
and [hl]
- ld [$ff25], a
+ ld [rNR51], a
.asm_9248
- ld a, [wc02a]
- cp $14
+ ld a, [wChannelSoundIDs + CH4]
+ cp CRY_SFX_START
jr nc, .asm_9251
- jr .asm_926e
+ jr .skipCry
.asm_9251
- ld a, [wc02a]
- cp $86
- jr z, .asm_926e
- jr c, .asm_925c
- jr .asm_926e
-.asm_925c
+ ld a, [wChannelSoundIDs + CH4]
+ cp CRY_SFX_END
+ jr z, .skipCry
+ jr c, .cry
+ jr .skipCry
+.cry
ld a, c
cp CH4
jr z, .asm_9265
- call Audio1_96c7
+ call Audio1_GoBackOneCommandIfCry
ret c
.asm_9265
- ld a, [wc005]
- ld [$ff24], a
+ ld a, [wSavedVolume]
+ ld [rNR50], a
xor a
- ld [wc005], a
-.asm_926e
- ld hl, wc026
+ ld [wSavedVolume], a
+.skipCry
+ ld hl, wChannelSoundIDs
add hl, bc
ld [hl], b
ret
@@ -254,7 +253,7 @@ Audio1_endchannel: ; 0x91e6
Audio1_callchannel: ; 0x9274
cp $fd ; is this command a callchannel?
jp nz, Audio1_loopchannel ; no
- call Audio1_GetNextMusicByte ; yes
+ call Audio1_GetNextMusicByte
push af
call Audio1_GetNextMusicByte
ld d, a
@@ -265,10 +264,10 @@ Audio1_callchannel: ; 0x9274
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
push hl
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld e, l
ld d, h
@@ -283,20 +282,20 @@ Audio1_callchannel: ; 0x9274
inc hl
ld [hl], d ; overwrite current address with pointer
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- set 1, [hl] ; set the call flag
+ set BIT_CHANNEL_CALL, [hl] ; set the call flag
jp Audio1_endchannel
Audio1_loopchannel: ; 0x92a9
cp $fe ; is this command a loopchannel?
jp nz, Audio1_notetype ; no
- call Audio1_GetNextMusicByte ; yes
+ call Audio1_GetNextMusicByte
ld e, a
and a
jr z, .infiniteLoop
- ld b, $0
- ld hl, wc0be
+ ld b, 0
+ ld hl, wChannelLoopCounters
add hl, bc
ld a, [hl]
cp e
@@ -319,7 +318,7 @@ Audio1_loopchannel: ; 0x92a9
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
pop af
ld [hli], a
@@ -330,10 +329,10 @@ Audio1_notetype: ; 0x92e4
and $f0
cp $d0 ; is this command a notetype?
jp nz, Audio1_toggleperfectpitch ; no
- ld a, d ; yes
+ ld a, d
and $f
ld b, $0
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, bc
ld [hl], a ; store low nibble as speed
ld a, c
@@ -345,15 +344,15 @@ Audio1_notetype: ; 0x92e4
cp CH2
jr z, .musicChannel3
cp CH6
- jr nz, .notChannel3
- ld hl, wc0e7
- jr .sfxChannel3
+ jr nz, .skipChannel3
+ ld hl, wSfxWaveInstrument
+ jr .channel3
.musicChannel3
- ld hl, wc0e6
-.sfxChannel3
+ ld hl, wMusicWaveInstrument
+.channel3
ld a, d
and $f
- ld [hl], a ; store low nibble of param as duty
+ ld [hl], a ; store low nibble of param as wave instrument
ld a, d
and $30
sla a
@@ -362,9 +361,9 @@ Audio1_notetype: ; 0x92e4
; if channel 3, store high nibble as volume
; else, store volume (high nibble) and fade (low nibble)
-.notChannel3
- ld b, $0
- ld hl, wc0de
+.skipChannel3
+ ld b, 0
+ ld hl, wChannelVolumes
add hl, bc
ld [hl], d
.noiseChannel
@@ -374,56 +373,70 @@ Audio1_toggleperfectpitch: ; 0x9323
ld a, d
cp $e8 ; is this command a toggleperfectpitch?
jr nz, Audio1_vibrato ; no
- ld b, $0 ; yes
- ld hl, wc02e
+ ld b, 0
+ ld hl, wChannelFlags1
add hl, bc
ld a, [hl]
xor $1
- ld [hl], a ; flip bit 0 of wc02e
+ ld [hl], a ; flip bit 0 of wChannelFlags1
jp Audio1_endchannel
Audio1_vibrato: ; 0x9335
cp $ea ; is this command a vibrato?
jr nz, Audio1_pitchbend ; no
- call Audio1_GetNextMusicByte ; yes
- ld b, $0
- ld hl, wc04e
+ call Audio1_GetNextMusicByte
+ ld b, 0
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld [hl], a ; store delay
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, bc
ld [hl], a ; store delay
call Audio1_GetNextMusicByte
ld d, a
+
+; The high nybble of the command byte is the extent of the vibrato.
+; Let n be the extent.
+; The upper nybble of the channel's byte in the wChannelVibratoExtents
+; array will store the extent above the note: (n / 2) + (n % 2).
+; The lower nybble will store the extent below the note: (n / 2).
+; These two values add to the total extent, n.
and $f0
swap a
- ld b, $0
- ld hl, wc056
+ ld b, 0
+ ld hl, wChannelVibratoExtents
add hl, bc
srl a
ld e, a
adc b
swap a
or e
- ld [hl], a ; store rate as both high and low nibbles
+ ld [hl], a
+
+; The low nybble of the command byte is the rate of the vibrato.
+; The high and low nybbles of the channel's byte in the wChannelVibratoRates
+; array are both initialised to this value because the high nybble is the
+; counter reload value and the low nybble is the counter itself, which should
+; start at its value upon reload.
ld a, d
and $f
ld d, a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, bc
swap a
or d
- ld [hl], a ; store depth as both high and low nibbles
+ ld [hl], a
+
jp Audio1_endchannel
Audio1_pitchbend: ; 0x936d
cp $eb ; is this command a pitchbend?
jr nz, Audio1_duty ; no
- call Audio1_GetNextMusicByte ; yes
- ld b, $0
- ld hl, wc076
+ call Audio1_GetNextMusicByte
+ ld b, 0
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
- ld [hl], a ; store first param
+ ld [hl], a
call Audio1_GetNextMusicByte
ld d, a
and $f0
@@ -431,18 +444,18 @@ Audio1_pitchbend: ; 0x936d
ld b, a
ld a, d
and $f
- call Audio1_9858
- ld b, $0
- ld hl, wc0a6
+ call Audio1_CalculateFrequency
+ ld b, 0
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
- ld [hl], d ; store unknown part of second param
- ld hl, wc0ae
+ ld [hl], d
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
- ld [hl], e ; store unknown part of second param
- ld b, $0
- ld hl, wc02e
+ ld [hl], e
+ ld b, 0
+ ld hl, wChannelFlags1
add hl, bc
- set 4, [hl] ; set pitchbend flag
+ set BIT_PITCH_BEND_ON, [hl]
call Audio1_GetNextMusicByte
ld d, a
jp Audio1_notelength
@@ -450,12 +463,12 @@ Audio1_pitchbend: ; 0x936d
Audio1_duty: ; 0x93a5
cp $ec ; is this command a duty?
jr nz, Audio1_tempo ; no
- call Audio1_GetNextMusicByte ; yes
+ call Audio1_GetNextMusicByte
rrca
rrca
and $c0
- ld b, $0
- ld hl, wc03e
+ ld b, 0
+ ld hl, wChannelDuties
add hl, bc
ld [hl], a ; store duty
jp Audio1_endchannel
@@ -463,96 +476,96 @@ Audio1_duty: ; 0x93a5
Audio1_tempo: ; 0x93ba
cp $ed ; is this command a tempo?
jr nz, Audio1_stereopanning ; no
- ld a, c ; yes
+ ld a, c
cp CH4
jr nc, .sfxChannel
call Audio1_GetNextMusicByte
- ld [wc0e8], a ; store first param
+ ld [wMusicTempo], a ; store first param
call Audio1_GetNextMusicByte
- ld [wc0e9], a ; store second param
+ ld [wMusicTempo + 1], a ; store second param
xor a
- ld [wc0ce], a ; clear RAM
- ld [wc0cf], a
- ld [wc0d0], a
- ld [wc0d1], a
+ ld [wChannelNoteDelayCountersFractionalPart], a ; clear RAM
+ ld [wChannelNoteDelayCountersFractionalPart + 1], a
+ ld [wChannelNoteDelayCountersFractionalPart + 2], a
+ ld [wChannelNoteDelayCountersFractionalPart + 3], a
jr .musicChannelDone
.sfxChannel
call Audio1_GetNextMusicByte
- ld [wc0ea], a ; store first param
+ ld [wSfxTempo], a ; store first param
call Audio1_GetNextMusicByte
- ld [wc0eb], a ; store second param
+ ld [wSfxTempo + 1], a ; store second param
xor a
- ld [wc0d2], a ; clear RAM
- ld [wc0d3], a
- ld [wc0d4], a
- ld [wc0d5], a
+ ld [wChannelNoteDelayCountersFractionalPart + 4], a ; clear RAM
+ ld [wChannelNoteDelayCountersFractionalPart + 5], a
+ ld [wChannelNoteDelayCountersFractionalPart + 6], a
+ ld [wChannelNoteDelayCountersFractionalPart + 7], a
.musicChannelDone
jp Audio1_endchannel
Audio1_stereopanning: ; 0x93fa
cp $ee ; is this command a stereopanning?
jr nz, Audio1_unknownmusic0xef ; no
- call Audio1_GetNextMusicByte ; yes
- ld [wc004], a ; store panning
+ call Audio1_GetNextMusicByte
+ ld [wStereoPanning], a ; store panning
jp Audio1_endchannel
; this appears to never be used
Audio1_unknownmusic0xef: ; 0x9407
cp $ef ; is this command an unknownmusic0xef?
jr nz, Audio1_dutycycle ; no
- call Audio1_GetNextMusicByte ; yes
+ call Audio1_GetNextMusicByte
push bc
- call Audio1_9876
+ call Audio1_PlaySound
pop bc
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr nz, .skip
- ld a, [wc02d]
- ld [wc003], a
+ ld a, [wChannelSoundIDs + CH7]
+ ld [wDisableChannelOutputWhenSfxEnds], a
xor a
- ld [wc02d], a
+ ld [wChannelSoundIDs + CH7], a
.skip
jp Audio1_endchannel
Audio1_dutycycle: ; 0x9426
cp $fc ; is this command a dutycycle?
jr nz, Audio1_volume ; no
- call Audio1_GetNextMusicByte ; yes
- ld b, $0
- ld hl, wc046
+ call Audio1_GetNextMusicByte
+ ld b, 0
+ ld hl, wChannelDutyCycles
add hl, bc
ld [hl], a ; store full cycle
and $c0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld [hl], a ; store first duty
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- set 6, [hl] ; set dutycycle flag
+ set BIT_ROTATE_DUTY, [hl]
jp Audio1_endchannel
Audio1_volume: ; 0x9444
cp $f0 ; is this command a volume?
jr nz, Audio1_executemusic ; no
- call Audio1_GetNextMusicByte ; yes
- ld [$ff24], a ; store volume
+ call Audio1_GetNextMusicByte
+ ld [rNR50], a ; store volume
jp Audio1_endchannel
Audio1_executemusic: ; 0x9450
cp $f8 ; is this command an executemusic?
jr nz, Audio1_octave ; no
- ld b, $0 ; yes
- ld hl, wc036
+ ld b, $0
+ ld hl, wChannelFlags2
add hl, bc
- set 0, [hl]
+ set BIT_EXECUTE_MUSIC, [hl]
jp Audio1_endchannel
Audio1_octave: ; 0x945f
and $f0
cp $e0 ; is this command an octave?
jr nz, Audio1_unknownsfx0x20 ; no
- ld hl, wc0d6 ; yes
- ld b, $0
+ ld hl, wChannelOctaves
+ ld b, 0
add hl, bc
ld a, d
and $f
@@ -561,47 +574,54 @@ Audio1_octave: ; 0x945f
Audio1_unknownsfx0x20: ; 0x9472
cp $20 ; is this command an unknownsfx0x20?
- jr nz, Audio1_unknownsfx0x10 ; no
+ jr nz, Audio1_unknownsfx0x10
ld a, c
cp CH3 ; is this a noise or sfx channel?
jr c, Audio1_unknownsfx0x10 ; no
- ld b, $0
- ld hl, wc036
+ ld b, 0
+ ld hl, wChannelFlags2
add hl, bc
- bit 0, [hl]
- jr nz, Audio1_unknownsfx0x10 ; no
- call Audio1_notelength ; yes
+ bit BIT_EXECUTE_MUSIC, [hl] ; is executemusic being used?
+ jr nz, Audio1_unknownsfx0x10 ; yes
+ call Audio1_notelength
+
+; This code seems to do the same thing as what Audio1_ApplyDutyAndSoundLength
+; does below.
ld d, a
- ld b, $0
- ld hl, wc03e
+ ld b, 0
+ ld hl, wChannelDuties
add hl, bc
ld a, [hl]
or d
ld d, a
- ld b, $1
- call Audio1_9838
+ ld b, REG_DUTY_SOUND_LEN
+ call Audio1_GetRegisterPointer
ld [hl], d
+
call Audio1_GetNextMusicByte
ld d, a
- ld b, $2
- call Audio1_9838
+ ld b, REG_VOLUME_ENVELOPE
+ call Audio1_GetRegisterPointer
ld [hl], d
call Audio1_GetNextMusicByte
ld e, a
ld a, c
cp CH7
- ld a, $0
- jr z, .sfxNoiseChannel ; only two params for noise channel
+ ld a, 0
+ jr z, .skip
+; Channels 1 through 3 have 2 registers that control frequency, but the noise
+; channel a single register (the polynomial counter) that controls frequency,
+; so this command has one less byte on the noise channel.
push de
call Audio1_GetNextMusicByte
pop de
-.sfxNoiseChannel
+.skip
ld d, a
push de
- call Audio1_9629
- call Audio1_95f8
+ call Audio1_ApplyDutyAndSoundLength
+ call Audio1_EnableChannelOutput
pop de
- call Audio1_964b
+ call Audio1_ApplyWavePatternAndFrequency
ret
Audio1_unknownsfx0x10:
@@ -612,12 +632,12 @@ Audio1_unknownsfx0x10:
cp $10 ; is this command a unknownsfx0x10?
jr nz, Audio1_note ; no
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
- bit 0, [hl]
+ bit BIT_EXECUTE_MUSIC, [hl]
jr nz, Audio1_note ; no
- call Audio1_GetNextMusicByte ; yes
- ld [$ff10], a
+ call Audio1_GetNextMusicByte
+ ld [rNR10], a
jp Audio1_endchannel
Audio1_note:
@@ -627,7 +647,7 @@ Audio1_note:
ld a, d
and $f0
cp $b0 ; is this command a dnote?
- jr z, Audio1_dnote ; yes
+ jr z, Audio1_dnote
jr nc, Audio1_notelength ; no
swap a
ld b, a
@@ -647,11 +667,11 @@ Audio1_dnote:
call Audio1_GetNextMusicByte ; get dnote instrument
asm_94fd
ld d, a
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr nz, .asm_9508
ld a, d
- call Audio1_9876
+ call Audio1_PlaySound
.asm_9508
pop bc
pop de
@@ -661,20 +681,20 @@ Audio1_notelength: ; 0x950a
push af
and $f
inc a
- ld b, $0
+ ld b, 0
ld e, a ; store note length (in 16ths)
ld d, b
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, bc
ld a, [hl]
ld l, b
- call Audio1_9847
+ call Audio1_MultiplyAdd
ld a, c
cp CH4
jr nc, .sfxChannel
- ld a, [wc0e8]
+ ld a, [wMusicTempo]
ld d, a
- ld a, [wc0e9]
+ ld a, [wMusicTempo + 1]
ld e, a
jr .skip
.sfxChannel
@@ -682,34 +702,34 @@ Audio1_notelength: ; 0x950a
ld e, $0
cp CH7
jr z, .skip ; if noise channel
- call Audio1_9693
- ld a, [wc0ea]
+ call Audio1_SetSfxTempo
+ ld a, [wSfxTempo]
ld d, a
- ld a, [wc0eb]
+ ld a, [wSfxTempo + 1]
ld e, a
.skip
- ld a, l
- ld b, $0
- ld hl, wc0ce
+ ld a, l ; a = note_length * note_speed
+ ld b, 0
+ ld hl, wChannelNoteDelayCountersFractionalPart
add hl, bc
ld l, [hl]
- call Audio1_9847
+ call Audio1_MultiplyAdd
ld e, l
- ld d, h
- ld hl, wc0ce
+ ld d, h ; de = note_delay_frac_part + (note_length * note_speed * tempo)
+ ld hl, wChannelNoteDelayCountersFractionalPart
add hl, bc
ld [hl], e
ld a, d
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld [hl], a
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
- bit 0, [hl]
+ bit BIT_EXECUTE_MUSIC, [hl]
jr nz, Audio1_notepitch
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 2, [hl]
+ bit BIT_NOISE_OR_SFX, [hl]
jr z, Audio1_notepitch
pop hl
ret
@@ -721,177 +741,183 @@ Audio1_notepitch: ; 0x9568
jr nz, .notRest
ld a, c
cp CH4
- jr nc, .sfxChannel
- ld hl, wc02a
+ jr nc, .next
+; If this isn't an SFX channel, try the corresponding SFX channel.
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr nz, .done
; fall through
-.sfxChannel
+.next
ld a, c
cp CH2
- jr z, .musicChannel3
+ jr z, .channel3
cp CH6
- jr nz, .notSfxChannel3
-.musicChannel3
- ld b, $0
- ld hl, Unknown_9b1f
+ jr nz, .notChannel3
+.channel3
+ ld b, 0
+ ld hl, Audio1_HWChannelDisableMasks
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
and [hl]
- ld [$ff25], a
+ ld [rNR51], a ; disable hardware channel 3's output
jr .done
-.notSfxChannel3
- ld b, $2
- call Audio1_9838
- ld a, $8
+.notChannel3
+ ld b, REG_VOLUME_ENVELOPE
+ call Audio1_GetRegisterPointer
+ ld a, $8 ; fade in sound
ld [hli], a
inc hl
- ld a, $80
+ ld a, $80 ; restart sound
ld [hl], a
.done
ret
.notRest
swap a
- ld b, $0
- ld hl, wc0d6
+ ld b, 0
+ ld hl, wChannelOctaves
add hl, bc
ld b, [hl]
- call Audio1_9858
- ld b, $0
- ld hl, wc02e
- add hl, bc
- bit 4, [hl]
- jr z, .asm_95b8
- call Audio1_978f
-.asm_95b8
+ call Audio1_CalculateFrequency
+ ld b, 0
+ ld hl, wChannelFlags1
+ add hl, bc
+ bit BIT_PITCH_BEND_ON, [hl]
+ jr z, .skipPitchBend
+ call Audio1_InitPitchBendVars
+.skipPitchBend
push de
ld a, c
cp CH4
- jr nc, .skip ; if sfx channel
- ld hl, wc02a
- ld d, $0
+ jr nc, .sfxChannel ; if sfx channel
+; If this isn't an SFX channel, try the corresponding SFX channel.
+ ld hl, wChannelSoundIDs + CH4
+ ld d, 0
ld e, a
add hl, de
ld a, [hl]
and a
- jr nz, .asm_95cb
- jr .skip
-.asm_95cb
+ jr nz, .noSfx
+ jr .sfxChannel
+.noSfx
pop de
ret
-.skip
- ld b, $0
- ld hl, wc0de
+.sfxChannel
+ ld b, 0
+ ld hl, wChannelVolumes
add hl, bc
ld d, [hl]
- ld b, $2
- call Audio1_9838
+ ld b, REG_VOLUME_ENVELOPE
+ call Audio1_GetRegisterPointer
ld [hl], d
- call Audio1_9629
- call Audio1_95f8
+ call Audio1_ApplyDutyAndSoundLength
+ call Audio1_EnableChannelOutput
pop de
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 0, [hl] ; has toggleperfectpitch been used?
- jr z, .skip2
- inc e ; if yes, increment the pitch by 1
- jr nc, .skip2
+ bit BIT_PERFECT_PITCH, [hl] ; has toggleperfectpitch been used?
+ jr z, .skipFrequencyInc
+ inc e ; if yes, increment the frequency by 1
+ jr nc, .skipFrequencyInc
inc d
-.skip2
- ld hl, wc066
+.skipFrequencyInc
+ ld hl, wChannelFrequencyLowBytes
add hl, bc
ld [hl], e
- call Audio1_964b
+ call Audio1_ApplyWavePatternAndFrequency
ret
-Audio1_95f8: ; 0x95f8
- ld b, $0
- ld hl, Unknown_9b27
+Audio1_EnableChannelOutput: ; 0x95f8
+ ld b, 0
+ ld hl, Audio1_HWChannelEnableMasks
add hl, bc
- ld a, [$ff25]
- or [hl]
+ ld a, [rNR51]
+ or [hl] ; set this channel's bits
ld d, a
ld a, c
cp CH7
- jr z, .sfxNoiseChannel
+ jr z, .noiseChannelOrNoSfx
cp CH4
jr nc, .skip ; if sfx channel
- ld hl, wc02a
+; If this isn't an SFX channel, try the corresponding SFX channel.
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr nz, .skip
-.sfxNoiseChannel
- ld a, [wc004]
- ld hl, Unknown_9b27
+.noiseChannelOrNoSfx
+; If this is the SFX noise channel or a music channel whose corresponding
+; SFX channel is off, apply stereo panning.
+ ld a, [wStereoPanning]
+ ld hl, Audio1_HWChannelEnableMasks
add hl, bc
and [hl]
ld d, a
- ld a, [$ff25]
- ld hl, Unknown_9b1f
+ ld a, [rNR51]
+ ld hl, Audio1_HWChannelDisableMasks
add hl, bc
- and [hl]
- or d
+ and [hl] ; reset this channel's output bits
+ or d ; set this channel's output bits that enabled in [wStereoPanning]
ld d, a
.skip
ld a, d
- ld [$ff25], a
+ ld [rNR51], a
ret
-Audio1_9629: ; 0x9629
- ld b, $0
- ld hl, wc0b6
+Audio1_ApplyDutyAndSoundLength: ; 0x9629
+ ld b, 0
+ ld hl, wChannelNoteDelayCounters ; use the note delay as sound length
add hl, bc
ld d, [hl]
ld a, c
cp CH2
- jr z, .channel3 ; if music channel 3
+ jr z, .skipDuty ; if music channel 3
cp CH6
- jr z, .channel3 ; if sfx channel 3
+ jr z, .skipDuty ; if sfx channel 3
+; include duty (except on channel 3 which doesn't have it)
ld a, d
and $3f
ld d, a
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld a, [hl]
or d
ld d, a
-.channel3
- ld b, $1
- call Audio1_9838
+.skipDuty
+ ld b, REG_DUTY_SOUND_LEN
+ call Audio1_GetRegisterPointer
ld [hl], d
ret
-Audio1_964b: ; 0x964b
+Audio1_ApplyWavePatternAndFrequency: ; 0x964b
ld a, c
cp CH2
jr z, .channel3
cp CH6
- jr nz, .notSfxChannel3
+ jr nz, .notChannel3
; fall through
.channel3
push de
- ld de, wc0e6
+ ld de, wMusicWaveInstrument
cp CH2
- jr z, .musicChannel3
- ld de, wc0e7
-.musicChannel3
+ jr z, .next
+ ld de, wSfxWaveInstrument
+.next
ld a, [de]
add a
- ld d, $0
+ ld d, 0
ld e, a
ld hl, Audio1_WavePointers
add hl, de
ld e, [hl]
inc hl
ld d, [hl]
- ld hl, $ff30
+ ld hl, $ff30 ; wave pattern RAM
ld b, $f
- ld a, $0
- ld [$ff1a], a
+ ld a, $0 ; stop hardware channel 3
+ ld [rNR30], a
.loop
ld a, [de]
inc de
@@ -900,152 +926,155 @@ Audio1_964b: ; 0x964b
dec b
and a
jr nz, .loop
- ld a, $80
- ld [$ff1a], a
+ ld a, $80 ; start hardware channel 3
+ ld [rNR30], a
pop de
-.notSfxChannel3
+.notChannel3
ld a, d
- or $80
- and $c7
+ or $80 ; use counter mode (i.e. disable output when the counter reaches 0)
+ and $c7 ; zero the unused bits in the register
ld d, a
- ld b, $3
- call Audio1_9838
- ld [hl], e
+ ld b, REG_FREQUENCY_LO
+ call Audio1_GetRegisterPointer
+ ld [hl], e ; store frequency low byte
inc hl
- ld [hl], d
- call Audio1_96b5
+ ld [hl], d ; store frequency high byte
+ call Audio1_ApplyFrequencyModifier
ret
-Audio1_9693: ; 0x9693
- call Audio1_96e5
- jr nc, .asm_96ab
- ld d, $0
- ld a, [wc0f2]
+Audio1_SetSfxTempo: ; 0x9693
+ call Audio1_IsCry
+ jr nc, .notCry
+ ld d, 0
+ ld a, [wTempoModifier]
add $80
- jr nc, .asm_96a2
+ jr nc, .next
inc d
-.asm_96a2
- ld [wc0eb], a
+.next
+ ld [wSfxTempo + 1], a
ld a, d
- ld [wc0ea], a
- jr .asm_96b4
-.asm_96ab
+ ld [wSfxTempo], a
+ jr .done
+.notCry
xor a
- ld [wc0eb], a
+ ld [wSfxTempo + 1], a
ld a, $1
- ld [wc0ea], a
-.asm_96b4
+ ld [wSfxTempo], a
+.done
ret
-Audio1_96b5: ; 0x96b5
- call Audio1_96e5
- jr nc, .asm_96c6
- ld a, [wc0f1]
+Audio1_ApplyFrequencyModifier: ; 0x96b5
+ call Audio1_IsCry
+ jr nc, .done
+; if playing a cry, add the cry's frequency modifier
+ ld a, [wFrequencyModifier]
add e
- jr nc, .asm_96c1
+ jr nc, .noCarry
inc d
-.asm_96c1
+.noCarry
dec hl
ld e, a
ld [hl], e
inc hl
ld [hl], d
-.asm_96c6
+.done
ret
-Audio1_96c7: ; 0x96c7
- call Audio1_96e5
- jr nc, .asm_96e2
- ld hl, wc006
+Audio1_GoBackOneCommandIfCry: ; 0x96c7
+ call Audio1_IsCry
+ jr nc, .done
+ ld hl, wChannelCommandPointers
ld e, c
- ld d, $0
+ ld d, 0
sla e
rl d
add hl, de
ld a, [hl]
- sub $1
+ sub 1
ld [hl], a
inc hl
ld a, [hl]
- sbc $0
+ sbc 0
ld [hl], a
scf
ret
-.asm_96e2
+.done
scf
ccf
ret
-Audio1_96e5: ; 0x96e5
- ld a, [wc02a]
- cp $14
- jr nc, .asm_96ee
- jr .asm_96f4
-.asm_96ee
- cp $86
- jr z, .asm_96f4
- jr c, .asm_96f7
-.asm_96f4
+Audio1_IsCry: ; 0x96e5
+; Returns whether the currently playing audio is a cry in carry.
+ ld a, [wChannelSoundIDs + CH4]
+ cp CRY_SFX_START
+ jr nc, .next
+ jr .no
+.next
+ cp CRY_SFX_END
+ jr z, .no
+ jr c, .yes
+.no
scf
ccf
ret
-.asm_96f7
+.yes
scf
ret
Audio1_ApplyPitchBend: ; 0x96f9
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
- bit 5, [hl]
- jp nz, .asm_9740
- ld hl, wc09e
+ bit BIT_PITCH_BEND_DECREASING, [hl]
+ jp nz, .frequencyDecreasing
+; frequency increasing
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld e, [hl]
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld l, [hl]
ld h, b
add hl, de
ld d, h
ld e, l
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, bc
push hl
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld a, [hl]
pop hl
add [hl]
ld [hl], a
- ld a, $0
+ ld a, 0
adc e
ld e, a
- ld a, $0
+ ld a, 0
adc d
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, [hl]
cp d
- jp c, .asm_9786
- jr nz, .asm_9773
- ld hl, wc0ae
+ jp c, .reachedTargetFrequency
+ jr nz, .applyUpdatedFrequency
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, [hl]
cp e
- jp c, .asm_9786
- jr .asm_9773
-.asm_9740
- ld hl, wc09e
+ jp c, .reachedTargetFrequency
+ jr .applyUpdatedFrequency
+.frequencyDecreasing
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld a, [hl]
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld e, [hl]
sub e
@@ -1053,7 +1082,7 @@ Audio1_ApplyPitchBend: ; 0x96f9
ld a, d
sbc b
ld d, a
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld a, [hl]
add a
@@ -1064,129 +1093,140 @@ Audio1_ApplyPitchBend: ; 0x96f9
ld a, d
sbc b
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, d
cp [hl]
- jr c, .asm_9786
- jr nz, .asm_9773
- ld hl, wc0ae
+ jr c, .reachedTargetFrequency
+ jr nz, .applyUpdatedFrequency
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, e
cp [hl]
- jr c, .asm_9786
-.asm_9773
- ld hl, wc09e
+ jr c, .reachedTargetFrequency
+.applyUpdatedFrequency
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld [hl], e
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld [hl], d
- ld b, $3
- call Audio1_9838
+ ld b, REG_FREQUENCY_LO
+ call Audio1_GetRegisterPointer
ld a, e
ld [hli], a
ld [hl], d
ret
-.asm_9786
- ld hl, wc02e
+.reachedTargetFrequency
+; Turn off pitch bend when the target frequency has been reached.
+ ld hl, wChannelFlags1
add hl, bc
- res 4, [hl]
- res 5, [hl]
+ res BIT_PITCH_BEND_ON, [hl]
+ res BIT_PITCH_BEND_DECREASING, [hl]
ret
-Audio1_978f: ; 0x978f
- ld hl, wc096
+Audio1_InitPitchBendVars: ; 0x978f
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld [hl], d
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld [hl], e
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld a, [hl]
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
sub [hl]
- jr nc, .asm_97a7
- ld a, $1
-.asm_97a7
+ jr nc, .next
+ ld a, 1
+.next
ld [hl], a
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, e
sub [hl]
ld e, a
ld a, d
sbc b
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
sub [hl]
- jr c, .asm_97c3
+ jr c, .targetFrequencyGreater
ld d, a
- ld b, $0
- ld hl, wc02e
+ ld b, 0
+ ld hl, wChannelFlags1
add hl, bc
- set 5, [hl]
- jr .asm_97e6
-.asm_97c3
- ld hl, wc096
+ set BIT_PITCH_BEND_DECREASING, [hl]
+ jr .next2
+.targetFrequencyGreater
+; If the target frequency is greater, subtract the current frequency from
+; the target frequency to get the absolute difference.
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld e, [hl]
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, [hl]
sub e
ld e, a
+
+; Bug. Instead of borrowing from the high byte of the target frequency as it
+; should, it borrows from the high byte of the current frequency instead.
+; This means that the result will be 0x200 greater than it should be if the
+; low byte of the current frequency is greater than the low byte of the
+; target frequency.
ld a, d
sbc b
ld d, a
- ld hl, wc0a6
+
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, [hl]
sub d
ld d, a
- ld b, $0
- ld hl, wc02e
+ ld b, 0
+ ld hl, wChannelFlags1
add hl, bc
- res 5, [hl]
-.asm_97e6
- ld hl, wc076
+ res BIT_PITCH_BEND_DECREASING, [hl]
+
+.next2
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
-.asm_97ea
+.divideLoop
inc b
ld a, e
sub [hl]
ld e, a
- jr nc, .asm_97ea
+ jr nc, .divideLoop
ld a, d
and a
- jr z, .asm_97f8
+ jr z, .doneDividing
dec a
ld d, a
- jr .asm_97ea
-.asm_97f8
- ld a, e
+ jr .divideLoop
+.doneDividing
+ ld a, e ; a = remainder - dividend
add [hl]
- ld d, b
- ld b, $0
- ld hl, wc07e
+ ld d, b ; d = quotient + 1
+ ld b, 0
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
- ld [hl], d
- ld hl, wc086
+ ld [hl], d ; store quotient + 1
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
- ld [hl], a
- ld hl, wc08e
+ ld [hl], a ; store remainder - dividend
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, bc
- ld [hl], a
+ ld [hl], a ; store remainder - dividend
ret
Audio1_ApplyDutyCycle: ; 0x980d
- ld b, $0
- ld hl, wc046
+ ld b, 0
+ ld hl, wChannelDutyCycles
add hl, bc
ld a, [hl]
rlca
@@ -1194,8 +1234,8 @@ Audio1_ApplyDutyCycle: ; 0x980d
ld [hl], a
and $c0
ld d, a
- ld b, $1
- call Audio1_9838
+ ld b, REG_DUTY_SOUND_LEN
+ call Audio1_GetRegisterPointer
ld a, [hl]
and $3f
or d
@@ -1203,11 +1243,11 @@ Audio1_ApplyDutyCycle: ; 0x980d
ret
Audio1_GetNextMusicByte: ; 0x9825
- ld d, $0
+ ld d, 0
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
ld a, [hli]
ld e, a
@@ -1220,9 +1260,10 @@ Audio1_GetNextMusicByte: ; 0x9825
ld [hl], d
ret
-Audio1_9838: ; 0x9838
+Audio1_GetRegisterPointer: ; 0x9838
+; hl = address of hardware sound register b for software channel c
ld a, c
- ld hl, Unknown_9b17
+ ld hl, Audio1_HWChannelBaseAddresses
add l
jr nc, .noCarry
inc h
@@ -1234,13 +1275,14 @@ Audio1_9838: ; 0x9838
ld h, $ff
ret
-Audio1_9847: ; 0x9847
- ld h, $0
+Audio1_MultiplyAdd: ; 0x9847
+; hl = l + (a * de)
+ ld h, 0
.loop
srl a
- jr nc, .noCarry
+ jr nc, .skipAdd
add hl, de
-.noCarry
+.skipAdd
sla e
rl d
and a
@@ -1249,8 +1291,9 @@ Audio1_9847: ; 0x9847
.done
ret
-Audio1_9858: ; 0x9858
- ld h, $0
+Audio1_CalculateFrequency: ; 0x9858
+; return the frequency for note a, octave b in de
+ ld h, 0
ld l, a
add hl, hl
ld d, h
@@ -1262,137 +1305,138 @@ Audio1_9858: ; 0x9858
ld d, [hl]
ld a, b
.loop
- cp $7
+ cp 7
jr z, .done
sra d
rr e
inc a
jr .loop
.done
- ld a, $8
+ ld a, 8
add d
ld d, a
ret
-Audio1_9876:: ; 0x9876
- ld [wc001], a
+Audio1_PlaySound:: ; 0x9876
+ ld [wSoundID], a
cp $ff
- jp z, Audio1_9a34
- cp $b9
- jp z, Audio1_994e
- jp c, Audio1_994e
+ jp z, .stopAllAudio
+ cp MAX_SFX_ID
+ jp z, .playSfx
+ jp c, .playSfx
cp $fe
- jr z, .asm_988d
- jp nc, Audio1_994e
-.asm_988d
+ jr z, .playMusic
+ jp nc, .playSfx
+
+.playMusic
xor a
- ld [wc000], a
- ld [wc003], a
- ld [wc0e9], a
- ld [wc0e6], a
- ld [wc0e7], a
+ ld [wUnusedC000], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ ld [wMusicTempo + 1], a
+ ld [wMusicWaveInstrument], a
+ ld [wSfxWaveInstrument], a
ld d, $8
- ld hl, wc016
- call FillAudioRAM1
- ld hl, wc006
- call FillAudioRAM1
+ ld hl, wChannelReturnAddresses
+ call .FillMem
+ ld hl, wChannelCommandPointers
+ call .FillMem
ld d, $4
- ld hl, wc026
- call FillAudioRAM1
- ld hl, wc02e
- call FillAudioRAM1
- ld hl, wc03e
- call FillAudioRAM1
- ld hl, wc046
- call FillAudioRAM1
- ld hl, wc04e
- call FillAudioRAM1
- ld hl, wc056
- call FillAudioRAM1
- ld hl, wc05e
- call FillAudioRAM1
- ld hl, wc066
- call FillAudioRAM1
- ld hl, wc06e
- call FillAudioRAM1
- ld hl, wc036
- call FillAudioRAM1
- ld hl, wc076
- call FillAudioRAM1
- ld hl, wc07e
- call FillAudioRAM1
- ld hl, wc086
- call FillAudioRAM1
- ld hl, wc08e
- call FillAudioRAM1
- ld hl, wc096
- call FillAudioRAM1
- ld hl, wc09e
- call FillAudioRAM1
- ld hl, wc0a6
- call FillAudioRAM1
- ld hl, wc0ae
- call FillAudioRAM1
+ ld hl, wChannelSoundIDs
+ call .FillMem
+ ld hl, wChannelFlags1
+ call .FillMem
+ ld hl, wChannelDuties
+ call .FillMem
+ ld hl, wChannelDutyCycles
+ call .FillMem
+ ld hl, wChannelVibratoDelayCounters
+ call .FillMem
+ ld hl, wChannelVibratoExtents
+ call .FillMem
+ ld hl, wChannelVibratoRates
+ call .FillMem
+ ld hl, wChannelFrequencyLowBytes
+ call .FillMem
+ ld hl, wChannelVibratoDelayCounterReloadValues
+ call .FillMem
+ ld hl, wChannelFlags2
+ call .FillMem
+ ld hl, wChannelPitchBendLengthModifiers
+ call .FillMem
+ ld hl, wChannelPitchBendFrequencySteps
+ call .FillMem
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
+ call .FillMem
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
+ call .FillMem
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
+ call .FillMem
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
+ call .FillMem
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
+ call .FillMem
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
+ call .FillMem
ld a, $1
- ld hl, wc0be
- call FillAudioRAM1
- ld hl, wc0b6
- call FillAudioRAM1
- ld hl, wc0c6
- call FillAudioRAM1
- ld [wc0e8], a
+ ld hl, wChannelLoopCounters
+ call .FillMem
+ ld hl, wChannelNoteDelayCounters
+ call .FillMem
+ ld hl, wChannelNoteSpeeds
+ call .FillMem
+ ld [wMusicTempo], a
ld a, $ff
- ld [wc004], a
+ ld [wStereoPanning], a
xor a
- ld [$ff24], a
+ ld [rNR50], a
ld a, $8
- ld [$ff10], a
- ld a, $0
- ld [$ff25], a
+ ld [rNR10], a
+ ld a, 0
+ ld [rNR51], a
xor a
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $77
- ld [$ff24], a
- jp Audio1_9a8f
+ ld [rNR50], a
+ jp .playSoundCommon
-Audio1_994e: ; 0x994e
+.playSfx
ld l, a
ld e, a
- ld h, $0
+ ld h, 0
ld d, h
add hl, hl
add hl, de
ld de, SFX_Headers_1
add hl, de
ld a, h
- ld [wc0ec], a
+ ld [wSfxHeaderPointer], a
ld a, l
- ld [wc0ed], a
+ ld [wSfxHeaderPointer + 1], a
ld a, [hl]
and $c0
rlca
rlca
ld c, a
-.asm_9967
+.sfxChannelLoop
ld d, c
ld a, c
add a
add c
ld c, a
- ld b, $0
- ld a, [wc0ec]
+ ld b, 0
+ ld a, [wSfxHeaderPointer]
ld h, a
- ld a, [wc0ed]
+ ld a, [wSfxHeaderPointer + 1]
ld l, a
add hl, bc
ld c, d
ld a, [hl]
and $f
- ld e, a
- ld d, $0
- ld hl, wc026
+ ld e, a ; software channel ID
+ ld d, 0
+ ld hl, wChannelSoundIDs
add hl, de
ld a, [hl]
and a
@@ -1400,7 +1444,7 @@ Audio1_994e: ; 0x994e
ld a, e
cp $7
jr nz, .asm_999a
- ld a, [wc001]
+ ld a, [wSoundID]
cp $14
jr nc, .asm_9993
ret
@@ -1410,7 +1454,7 @@ Audio1_994e: ; 0x994e
jr z, .asm_99a3
jr c, .asm_99a3
.asm_999a
- ld a, [wc001]
+ ld a, [wSoundID]
cp [hl]
jr z, .asm_99a3
jr c, .asm_99a3
@@ -1423,132 +1467,132 @@ Audio1_994e: ; 0x994e
add hl, hl
ld d, h
ld e, l
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld [hli], a
ld [hl], a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
ld [hli], a
ld [hl], a
pop de
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, de
ld [hl], a
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, de
ld [hl], a
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, de
ld [hl], a
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, de
ld [hl], a
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, de
ld [hl], a
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
add hl, de
ld [hl], a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, de
ld [hl], a
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, de
ld [hl], a
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, de
ld [hl], a
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, de
ld [hl], a
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, de
ld [hl], a
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, de
ld [hl], a
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, de
ld [hl], a
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, de
ld [hl], a
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, de
ld [hl], a
ld a, $1
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
add hl, de
ld [hl], a
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, de
ld [hl], a
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, de
ld [hl], a
ld a, e
- cp $4
+ cp CH4
jr nz, .asm_9a2b
ld a, $8
- ld [$ff10], a
+ ld [rNR10], a ; sweep off
.asm_9a2b
ld a, c
and a
- jp z, Audio1_9a8f
+ jp z, .playSoundCommon
dec c
- jp .asm_9967
+ jp .sfxChannelLoop
-Audio1_9a34: ; 0x9a34
+.stopAllAudio
ld a, $80
- ld [$ff26], a
- ld [$ff1a], a
+ ld [rNR52], a ; sound hardware on
+ ld [rNR30], a ; wave playback on
xor a
- ld [$ff25], a
- ld [$ff1c], a
+ ld [rNR51], a ; no sound output
+ ld [rNR32], a ; mute channel 3 (wave channel)
ld a, $8
- ld [$ff10], a
- ld [$ff12], a
- ld [$ff17], a
- ld [$ff21], a
+ ld [rNR10], a ; sweep off
+ ld [rNR12], a ; mute channel 1 (pulse channel 1)
+ ld [rNR22], a ; mute channel 2 (pulse channel 2)
+ ld [rNR42], a ; mute channel 4 (noise channel)
ld a, $40
- ld [$ff14], a
- ld [$ff19], a
- ld [$ff23], a
+ ld [rNR14], a ; counter mode
+ ld [rNR24], a
+ ld [rNR44], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a ; full volume
xor a
- ld [wc000], a
- ld [wc003], a
- ld [wc002], a
- ld [wc0e9], a
- ld [wc0eb], a
- ld [wc0e6], a
- ld [wc0e7], a
+ ld [wUnusedC000], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ ld [wMuteAudioAndPauseMusic], a
+ ld [wMusicTempo + 1], a
+ ld [wSfxTempo + 1], a
+ ld [wMusicWaveInstrument], a
+ ld [wSfxWaveInstrument], a
ld d, $a0
- ld hl, wc006
- call FillAudioRAM1
+ ld hl, wChannelCommandPointers
+ call .FillMem
ld a, $1
ld d, $18
- ld hl, wc0b6
- call FillAudioRAM1
- ld [wc0e8], a
- ld [wc0ea], a
+ ld hl, wChannelNoteDelayCounters
+ call .FillMem
+ ld [wMusicTempo], a
+ ld [wSfxTempo], a
ld a, $ff
- ld [wc004], a
+ ld [wStereoPanning], a
ret
; fills d bytes at hl with a
-FillAudioRAM1: ; 0x9a89
+.FillMem
ld b, d
.loop
ld [hli], a
@@ -1556,11 +1600,11 @@ FillAudioRAM1: ; 0x9a89
jr nz, .loop
ret
-Audio1_9a8f: ; 0x9a8f
- ld a, [wc001]
+.playSoundCommon
+ ld a, [wSoundID]
ld l, a
ld e, a
- ld h, $0
+ ld h, 0
ld d, h
add hl, hl
add hl, de
@@ -1568,7 +1612,7 @@ Audio1_9a8f: ; 0x9a8f
add hl, de
ld e, l
ld d, h
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld a, [de] ; get channel number
ld b, a
rlca
@@ -1580,31 +1624,31 @@ Audio1_9a8f: ; 0x9a8f
ld b, c
inc b
inc de
- ld c, $0
-.asm_9ab1
+ ld c, 0
+.commandPointerLoop
cp c
- jr z, .asm_9ab9
+ jr z, .next
inc c
inc hl
inc hl
- jr .asm_9ab1
-.asm_9ab9
+ jr .commandPointerLoop
+.next
push hl
push bc
push af
- ld b, $0
+ ld b, 0
ld c, a
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
- ld a, [wc001]
+ ld a, [wSoundID]
ld [hl], a
pop af
- cp $3
- jr c, .asm_9ad2
- ld hl, wc02e
+ cp CH3
+ jr c, .skipSettingFlag
+ ld hl, wChannelFlags1
add hl, bc
- set 2, [hl]
-.asm_9ad2
+ set BIT_NOISE_OR_SFX, [hl]
+.skipSettingFlag
pop bc
pop hl
ld a, [de] ; get channel pointer
@@ -1619,52 +1663,53 @@ Audio1_9a8f: ; 0x9a8f
and a
ld a, [de]
inc de
- jr nz, .asm_9ab1
- ld a, [wc001]
- cp $14
+ jr nz, .commandPointerLoop
+ ld a, [wSoundID]
+ cp CRY_SFX_START
jr nc, .asm_9aeb
- jr .asm_9b15
+ jr .done
.asm_9aeb
- ld a, [wc001]
- cp $86
- jr z, .asm_9b15
- jr c, .asm_9af6
- jr .asm_9b15
-.asm_9af6
- ld hl, wc02a
+ ld a, [wSoundID]
+ cp CRY_SFX_END
+ jr z, .done
+ jr c, .cry
+ jr .done
+.cry
+ ld hl, wChannelSoundIDs + CH4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
- ld hl, wc012 ; sfx noise channel pointer
- ld de, Noise1_endchannel
+ ld hl, wChannelCommandPointers + CH6 * 2 ; sfx wave channel pointer
+ ld de, Audio1_CryEndchannel
ld [hl], e
inc hl
ld [hl], d ; overwrite pointer to point to endchannel
- ld a, [wc005]
+ ld a, [wSavedVolume]
and a
- jr nz, .asm_9b15
- ld a, [$ff24]
- ld [wc005], a
+ jr nz, .done
+ ld a, [rNR50]
+ ld [wSavedVolume], a
ld a, $77
- ld [$ff24], a
-.asm_9b15
+ ld [rNR50], a ; full volume
+.done
ret
-Noise1_endchannel: ; 0x9b16
+Audio1_CryEndchannel: ; 0x9b16
endchannel
-Unknown_9b17: ; 0x9b17
- db $10, $15, $1A, $1F ; channels 0-3
- db $10, $15, $1A, $1F ; channels 4-7
+Audio1_HWChannelBaseAddresses: ; 0x9b17
+; the low bytes of each HW channel's base address
+ db HW_CH1_BASE, HW_CH2_BASE, HW_CH3_BASE, HW_CH4_BASE ; channels 0-3
+ db HW_CH1_BASE, HW_CH2_BASE, HW_CH3_BASE, HW_CH4_BASE ; channels 4-7
-Unknown_9b1f: ; 0x9b1f
- db $EE, $DD, $BB, $77 ; channels 0-3
- db $EE, $DD, $BB, $77 ; channels 4-7
+Audio1_HWChannelDisableMasks: ; 0x9b1f
+ db HW_CH1_DISABLE_MASK, HW_CH2_DISABLE_MASK, HW_CH3_DISABLE_MASK, HW_CH4_DISABLE_MASK ; channels 0-3
+ db HW_CH1_DISABLE_MASK, HW_CH2_DISABLE_MASK, HW_CH3_DISABLE_MASK, HW_CH4_DISABLE_MASK ; channels 4-7
-Unknown_9b27: ; 0x9b27
- db $11, $22, $44, $88 ; channels 0-3
- db $11, $22, $44, $88 ; channels 4-7
+Audio1_HWChannelEnableMasks: ; 0x9b27
+ db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 0-3
+ db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 4-7
Audio1_Pitches: ; 0x9b2f
dw $F82C ; C_
diff --git a/audio/engine_2.asm b/audio/engine_2.asm
index 62b82cec..e70a305f 100644
--- a/audio/engine_2.asm
+++ b/audio/engine_2.asm
@@ -4,7 +4,7 @@ Audio2_UpdateMusic:: ; 21879 (8:5879)
ld c, CH0
.loop
ld b, $0
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
ld a, [hl]
and a
@@ -12,18 +12,18 @@ Audio2_UpdateMusic:: ; 21879 (8:5879)
ld a, c
cp CH4
jr nc, .applyAffects ; if sfx channel
- ld a, [wc002]
+ ld a, [wMuteAudioAndPauseMusic]
and a
jr z, .applyAffects
bit 7, a
jr nz, .nextChannel
set 7, a
- ld [wc002], a
+ ld [wMuteAudioAndPauseMusic], a
xor a
- ld [$ff25], a
- ld [$ff1a], a
+ ld [rNR51], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
jr .nextChannel
.applyAffects
call Audio2_ApplyMusicAffects
@@ -36,7 +36,7 @@ Audio2_UpdateMusic:: ; 21879 (8:5879)
; this routine checks flags for music effects currently applied
; to the channel and calls certain functions based on flags.
-; known flags for wc02e:
+; known flags for wChannelFlags1:
; 0: toggleperfectpitch has been used
; 1: call has been used
; 3: a toggle used only by this routine for vibrato
@@ -44,7 +44,7 @@ Audio2_UpdateMusic:: ; 21879 (8:5879)
; 6: dutycycle flag
Audio2_ApplyMusicAffects: ; 218ae (8:58ae)
ld b, $0
- ld hl, wc0b6 ; delay until next note
+ ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
cp $1 ; if the delay is 1, play next note
@@ -54,36 +54,36 @@ Audio2_ApplyMusicAffects: ; 218ae (8:58ae)
ld a, c
cp CH4
jr nc, .startChecks ; if a sfx channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr z, .startChecks
ret
.startChecks
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 6, [hl] ; dutycycle
jr z, .checkForExecuteMusic
call Audio2_ApplyDutyCycle
.checkForExecuteMusic
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, .checkForPitchBend
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 2, [hl]
jr nz, .disablePitchBendVibrato
.checkForPitchBend
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 4, [hl] ; pitchbend
jr z, .checkVibratoDelay
jp Audio2_ApplyPitchBend
.checkVibratoDelay
- ld hl, wc04e ; vibrato delay
+ ld hl, wChannelVibratoDelayCounters ; vibrato delay
add hl, bc
ld a, [hl]
and a ; check if delay is over
@@ -92,7 +92,7 @@ Audio2_ApplyMusicAffects: ; 218ae (8:58ae)
.disablePitchBendVibrato
ret
.checkForVibrato
- ld hl, wc056 ; vibrato rate
+ ld hl, wChannelVibratoExtents ; vibrato rate
add hl, bc
ld a, [hl]
and a
@@ -100,7 +100,7 @@ Audio2_ApplyMusicAffects: ; 218ae (8:58ae)
ret ; no vibrato
.vibrato
ld d, a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, bc
ld a, [hl]
and $f
@@ -113,10 +113,10 @@ Audio2_ApplyMusicAffects: ; 218ae (8:58ae)
swap [hl]
or [hl]
ld [hl], a ; reset the vibrato value and start again
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, bc
ld e, [hl] ; get note pitch
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 3, [hl] ; this is the only code that sets/resets bit three so
jr z, .unset ; it continuously alternates which path it takes
@@ -149,13 +149,13 @@ Audio2_ApplyMusicAffects: ; 218ae (8:58ae)
; like tempo changes, duty changes etc. and doesn't return
; until the first note is reached
Audio2_PlayNextNote: ; 21946 (8:5946)
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, bc
ld a, [hl]
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld [hl], a
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
res 4, [hl]
res 5, [hl]
@@ -175,7 +175,7 @@ Audio2_endchannel: ; 21967 (8:5967)
cp $ff ; is this command an endchannel?
jp nz, Audio2_callchannel ; no
ld b, $0 ; yes
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 1, [hl]
jr nz, .returnFromCall
@@ -185,22 +185,22 @@ Audio2_endchannel: ; 21967 (8:5967)
jr .asm_219c0
.noiseOrSfxChannel
res 2, [hl]
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
res 0, [hl]
cp CH6
jr nz, .notSfxChannel3
ld a, $0
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
.notSfxChannel3
jr nz, .asm_219a3
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr z, .asm_219a3
xor a
- ld [wc003], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
jr .asm_219c0
.asm_219a3
jr .asm_219c9
@@ -210,10 +210,10 @@ Audio2_endchannel: ; 21967 (8:5967)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
push hl ; store current channel address
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld e, l
ld d, h
@@ -227,16 +227,16 @@ Audio2_endchannel: ; 21967 (8:5967)
.asm_219c0
ld hl, Unknown_222de
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
and [hl]
- ld [$ff25], a
+ ld [rNR51], a
.asm_219c9
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $14
jr nc, .asm_219d2
jr .asm_219ef
.asm_219d2
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $86
jr z, .asm_219ef
jr c, .asm_219dd
@@ -248,12 +248,12 @@ Audio2_endchannel: ; 21967 (8:5967)
call Audio2_21e6d
ret c
.asm_219e6
- ld a, [wc005]
- ld [$ff24], a
+ ld a, [wSavedVolume]
+ ld [rNR50], a
xor a
- ld [wc005], a
+ ld [wSavedVolume], a
.asm_219ef
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
ld [hl], b
ret
@@ -272,10 +272,10 @@ Audio2_callchannel: ; 219f5 (8:59f5)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
push hl
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld e, l
ld d, h
@@ -290,7 +290,7 @@ Audio2_callchannel: ; 219f5 (8:59f5)
inc hl
ld [hl], d ; overwrite current address with pointer
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 1, [hl] ; set the call flag
jp Audio2_endchannel
@@ -303,7 +303,7 @@ Audio2_loopchannel: ; 21a2a (8:5a2a)
and a
jr z, .infiniteLoop
ld b, $0
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
add hl, bc
ld a, [hl]
cp e
@@ -326,7 +326,7 @@ Audio2_loopchannel: ; 21a2a (8:5a2a)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
pop af
ld [hli], a
@@ -340,7 +340,7 @@ Audio2_notetype: ; 21a65 (8:5a65)
ld a, d ; yes
and $f
ld b, $0
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, bc
ld [hl], a ; store low nibble as speed
ld a, c
@@ -353,10 +353,10 @@ Audio2_notetype: ; 21a65 (8:5a65)
jr z, .musicChannel3
cp CH6
jr nz, .notChannel3
- ld hl, wc0e7
+ ld hl, wSfxWaveInstrument
jr .sfxChannel3
.musicChannel3
- ld hl, wc0e6
+ ld hl, wMusicWaveInstrument
.sfxChannel3
ld a, d
and $f
@@ -371,7 +371,7 @@ Audio2_notetype: ; 21a65 (8:5a65)
; else, store volume (high nibble) and fade (low nibble)
.notChannel3
ld b, $0
- ld hl, wc0de
+ ld hl, wChannelVolumes
add hl, bc
ld [hl], d
.noiseChannel
@@ -382,11 +382,11 @@ Audio2_toggleperfectpitch: ; 21aa4 (8:5aa4)
cp $e8 ; is this command a toggleperfectpitch?
jr nz, Audio2_vibrato ; no
ld b, $0 ; yes
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
ld a, [hl]
xor $1
- ld [hl], a ; flip bit 0 of wc02e
+ ld [hl], a ; flip bit 0 of wChannelFlags1
jp Audio2_endchannel
Audio2_vibrato: ; 21ab6 (8:5ab6)
@@ -394,10 +394,10 @@ Audio2_vibrato: ; 21ab6 (8:5ab6)
jr nz, Audio2_pitchbend ; no
call Audio2_GetNextMusicByte ; yes
ld b, $0
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld [hl], a ; store delay
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, bc
ld [hl], a ; store delay
call Audio2_GetNextMusicByte
@@ -405,7 +405,7 @@ Audio2_vibrato: ; 21ab6 (8:5ab6)
and $f0
swap a
ld b, $0
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
add hl, bc
srl a
ld e, a
@@ -416,7 +416,7 @@ Audio2_vibrato: ; 21ab6 (8:5ab6)
ld a, d
and $f
ld d, a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, bc
swap a
or d
@@ -428,7 +428,7 @@ Audio2_pitchbend: ; 21aee (8:5aee)
jr nz, Audio2_duty ; no
call Audio2_GetNextMusicByte ; yes
ld b, $0
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
ld [hl], a ; store first param
call Audio2_GetNextMusicByte
@@ -440,14 +440,14 @@ Audio2_pitchbend: ; 21aee (8:5aee)
and $f
call Audio2_22017
ld b, $0
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld [hl], d ; store unknown part of second param
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld [hl], e ; store unknown part of second param
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 4, [hl] ; set pitchbend flag
call Audio2_GetNextMusicByte
@@ -462,7 +462,7 @@ Audio2_duty: ; 21b26 (8:5b26)
rrca
and $c0
ld b, $0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld [hl], a ; store duty
jp Audio2_endchannel
@@ -474,25 +474,25 @@ Audio2_tempo: ; 21b3b (8:5b3b)
cp CH4
jr nc, .sfxChannel
call Audio2_GetNextMusicByte
- ld [wc0e8], a ; store first param
+ ld [wMusicTempo], a ; store first param
call Audio2_GetNextMusicByte
- ld [wc0e9], a ; store second param
+ ld [wMusicTempo + 1], a ; store second param
xor a
- ld [wc0ce], a ; clear RAM
- ld [wc0cf], a
- ld [wc0d0], a
- ld [wc0d1], a
+ ld [wChannelNoteDelayCountersFractionalPart], a ; clear RAM
+ ld [wChannelNoteDelayCountersFractionalPart + 1], a
+ ld [wChannelNoteDelayCountersFractionalPart + 2], a
+ ld [wChannelNoteDelayCountersFractionalPart + 3], a
jr .musicChannelDone
.sfxChannel
call Audio2_GetNextMusicByte
- ld [wc0ea], a ; store first param
+ ld [wSfxTempo], a ; store first param
call Audio2_GetNextMusicByte
- ld [wc0eb], a ; store second param
+ ld [wSfxTempo + 1], a ; store second param
xor a
- ld [wc0d2], a ; clear RAM
- ld [wc0d3], a
- ld [wc0d4], a
- ld [wc0d5], a
+ ld [wChannelNoteDelayCountersFractionalPart + 4], a ; clear RAM
+ ld [wChannelNoteDelayCountersFractionalPart + 5], a
+ ld [wChannelNoteDelayCountersFractionalPart + 6], a
+ ld [wChannelNoteDelayCountersFractionalPart + 7], a
.musicChannelDone
jp Audio2_endchannel
@@ -500,7 +500,7 @@ Audio2_stereopanning: ; 21b7b (8:5b7b)
cp $ee ; is this command a stereopanning?
jr nz, Audio2_unknownmusic0xef ; no
call Audio2_GetNextMusicByte ; yes
- ld [wc004], a ; store panning
+ ld [wStereoPanning], a ; store panning
jp Audio2_endchannel
; this appears to never be used
@@ -509,15 +509,15 @@ Audio2_unknownmusic0xef: ; 21b88 (8:5b88)
jr nz, Audio2_dutycycle ; no
call Audio2_GetNextMusicByte ; yes
push bc
- call Audio2_22035
+ call Audio2_PlaySound
pop bc
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr nz, .skip
- ld a, [wc02d]
- ld [wc003], a
+ ld a, [wChannelSoundIDs + CH7]
+ ld [wDisableChannelOutputWhenSfxEnds], a
xor a
- ld [wc02d], a
+ ld [wChannelSoundIDs + CH7], a
.skip
jp Audio2_endchannel
@@ -526,14 +526,14 @@ Audio2_dutycycle: ; 21ba7 (8:5ba7)
jr nz, Audio2_volume ; no
call Audio2_GetNextMusicByte ; yes
ld b, $0
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, bc
ld [hl], a ; store full cycle
and $c0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld [hl], a ; store first duty
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 6, [hl] ; set dutycycle flag
jp Audio2_endchannel
@@ -542,14 +542,14 @@ Audio2_volume: ; 21bc5 (8:5bc5)
cp $f0 ; is this command a volume?
jr nz, Audio2_executemusic ; no
call Audio2_GetNextMusicByte ; yes
- ld [$ff24], a ; store volume
+ ld [rNR50], a ; store volume
jp Audio2_endchannel
Audio2_executemusic: ; 21bd1 (8:5bd1)
cp $f8 ; is this command an executemusic?
jr nz, Audio2_octave ; no
ld b, $0 ; yes
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
set 0, [hl]
jp Audio2_endchannel
@@ -558,7 +558,7 @@ Audio2_octave: ; 21be0 (8:5be0)
and $f0
cp $e0 ; is this command an octave?
jr nz, Audio2_unknownsfx0x20 ; no
- ld hl, wc0d6 ; yes
+ ld hl, wChannelOctaves ; yes
ld b, $0
add hl, bc
ld a, d
@@ -573,14 +573,14 @@ Audio2_unknownsfx0x20: ; 21bf3
cp CH3 ; is this a noise or sfx channel?
jr c, Audio2_unknownsfx0x10 ; no
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, Audio2_unknownsfx0x10 ; no
call Audio2_notelength
ld d, a
ld b, $0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld a, [hl]
or d
@@ -619,12 +619,12 @@ Audio2_unknownsfx0x10: ; 21c40 (8:5c40)
cp $10 ; is this command a unknownsfx0x10?
jr nz, Audio2_note ; no
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, Audio2_note ; no
call Audio2_GetNextMusicByte ; yes
- ld [$ff10], a
+ ld [rNR10], a
jp Audio2_endchannel
Audio2_note: ; 21c5c (8:5c5c)
@@ -654,11 +654,11 @@ Audio2_dnote: ; 21c76 (8:5c76)
call Audio2_GetNextMusicByte ; get dnote instrument
asm_21c7e
ld d, a
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr nz, .asm_21c89
ld a, d
- call Audio2_22035
+ call Audio2_PlaySound
.asm_21c89
pop bc
pop de
@@ -671,7 +671,7 @@ Audio2_notelength: ; 21c8b (8:5c8b)
ld b, $0
ld e, a ; store note length (in 16ths)
ld d, b
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, bc
ld a, [hl]
ld l, b
@@ -679,9 +679,9 @@ Audio2_notelength: ; 21c8b (8:5c8b)
ld a, c
cp CH4
jr nc, .sfxChannel
- ld a, [wc0e8]
+ ld a, [wMusicTempo]
ld d, a
- ld a, [wc0e9]
+ ld a, [wMusicTempo + 1]
ld e, a
jr .skip
.sfxChannel
@@ -690,31 +690,31 @@ Audio2_notelength: ; 21c8b (8:5c8b)
cp CH7
jr z, .skip ; if noise channel
call Audio2_21e2f
- ld a, [wc0ea]
+ ld a, [wSfxTempo]
ld d, a
- ld a, [wc0eb]
+ ld a, [wSfxTempo + 1]
ld e, a
.skip
ld a, l
ld b, $0
- ld hl, wc0ce
+ ld hl, wChannelNoteDelayCountersFractionalPart
add hl, bc
ld l, [hl]
call Audio2_22006
ld e, l
ld d, h
- ld hl, wc0ce
+ ld hl, wChannelNoteDelayCountersFractionalPart
add hl, bc
ld [hl], e
ld a, d
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld [hl], a
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, Audio2_notepitch
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 2, [hl]
jr z, Audio2_notepitch
@@ -729,7 +729,7 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
ld a, c
cp CH4
jr nc, .sfxChannel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
@@ -745,9 +745,9 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
ld b, $0
ld hl, Unknown_222de
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
and [hl]
- ld [$ff25], a
+ ld [rNR51], a
jr .done
.notSfxChannel3
ld b, $2
@@ -762,12 +762,12 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
.notRest
swap a
ld b, $0
- ld hl, wc0d6
+ ld hl, wChannelOctaves
add hl, bc
ld b, [hl]
call Audio2_22017
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 4, [hl]
jr z, .asm_21d39
@@ -777,7 +777,7 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
ld a, c
cp CH4
jr nc, .skip ; if sfx channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
ld d, $0
ld e, a
add hl, de
@@ -790,7 +790,7 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
ret
.skip
ld b, $0
- ld hl, wc0de
+ ld hl, wChannelVolumes
add hl, bc
ld d, [hl]
ld b, $2
@@ -800,7 +800,7 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
call Audio2_21d79
pop de
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 0, [hl] ; has toggleperfectpitch been used?
jr z, .skip2
@@ -808,7 +808,7 @@ Audio2_notepitch: ; 21ce9 (8:5ce9)
jr nc, .skip2
inc d
.skip2
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, bc
ld [hl], e
call Audio2_21dcc
@@ -818,7 +818,7 @@ Audio2_21d79: ; 21d79 (8:5d79)
ld b, $0
ld hl, Unknown_222e6
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
or [hl]
ld d, a
ld a, c
@@ -826,18 +826,18 @@ Audio2_21d79: ; 21d79 (8:5d79)
jr z, .sfxNoiseChannel
cp CH4
jr nc, .skip ; if sfx channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr nz, .skip
.sfxNoiseChannel
- ld a, [wc004]
+ ld a, [wStereoPanning]
ld hl, Unknown_222e6
add hl, bc
and [hl]
ld d, a
- ld a, [$ff25]
+ ld a, [rNR51]
ld hl, Unknown_222de
add hl, bc
and [hl]
@@ -845,12 +845,12 @@ Audio2_21d79: ; 21d79 (8:5d79)
ld d, a
.skip
ld a, d
- ld [$ff25], a
+ ld [rNR51], a
ret
Audio2_21daa: ; 21daa (8:5daa)
ld b, $0
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld d, [hl]
ld a, c
@@ -861,7 +861,7 @@ Audio2_21daa: ; 21daa (8:5daa)
ld a, d
and $3f
ld d, a
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld a, [hl]
or d
@@ -881,10 +881,10 @@ Audio2_21dcc: ; 21dcc (8:5dcc)
; fall through
.channel3
push de
- ld de, wc0e6
+ ld de, wMusicWaveInstrument
cp CH2
jr z, .musicChannel3
- ld de, wc0e7
+ ld de, wSfxWaveInstrument
.musicChannel3
ld a, [de]
add a
@@ -898,7 +898,7 @@ Audio2_21dcc: ; 21dcc (8:5dcc)
ld hl, $ff30
ld b, $f
ld a, $0
- ld [$ff1a], a
+ ld [rNR30], a
.loop
ld a, [de]
inc de
@@ -908,7 +908,7 @@ Audio2_21dcc: ; 21dcc (8:5dcc)
and a
jr nz, .loop
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
pop de
.notSfxChannel3
ld a, d
@@ -935,9 +935,9 @@ Audio2_21e19: ; 21e19 (8:5e19)
bit 7, a
jr z, .asm_21e2e
xor a
- ld [wc0f1], a
+ ld [wFrequencyModifier], a
ld a, $80
- ld [wc0f2], a
+ ld [wTempoModifier], a
.asm_21e2e
ret
@@ -948,20 +948,20 @@ Audio2_21e2f: ; 21e2f (8:5e2f)
jr nc, .asm_21e4c
.asm_21e39
ld d, $0
- ld a, [wc0f2]
+ ld a, [wTempoModifier]
add $80
jr nc, .asm_21e43
inc d
.asm_21e43
- ld [wc0eb], a
+ ld [wSfxTempo + 1], a
ld a, d
- ld [wc0ea], a
+ ld [wSfxTempo], a
jr .asm_21e55
.asm_21e4c
xor a
- ld [wc0eb], a
+ ld [wSfxTempo + 1], a
ld a, $1
- ld [wc0ea], a
+ ld [wSfxTempo], a
.asm_21e55
ret
@@ -971,7 +971,7 @@ Audio2_21e56: ; 21e56 (8:5e56)
call Audio2_21e9f
jr nc, .asm_21e6c
.asm_21e60
- ld a, [wc0f1]
+ ld a, [wFrequencyModifier]
add e
jr nc, .asm_21e67
inc d
@@ -987,7 +987,7 @@ Audio2_21e56: ; 21e56 (8:5e56)
Audio2_21e6d: ; 21e6d (8:5e6d)
call Audio2_21e8b
jr nc, .asm_21e88
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld e, c
ld d, $0
sla e
@@ -1008,7 +1008,7 @@ Audio2_21e6d: ; 21e6d (8:5e6d)
ret
Audio2_21e8b: ; 21e8b (8:5e8b)
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $14
jr nc, .asm_21e94
jr .asm_21e9a
@@ -1025,9 +1025,9 @@ Audio2_21e8b: ; 21e8b (8:5e8b)
ret
Audio2_21e9f: ; 21e9f (8:5e9f)
- ld a, [wc02d]
+ ld a, [wChannelSoundIDs + CH7]
ld b, a
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
or b
cp $9d
jr nc, .asm_21ead
@@ -1045,27 +1045,27 @@ Audio2_21e9f: ; 21e9f (8:5e9f)
ret
Audio2_ApplyPitchBend: ; 21eb8 (8:5eb8)
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 5, [hl]
jp nz, .asm_21eff
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld e, [hl]
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld l, [hl]
ld h, b
add hl, de
ld d, h
ld e, l
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, bc
push hl
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld a, [hl]
pop hl
@@ -1077,26 +1077,26 @@ Audio2_ApplyPitchBend: ; 21eb8 (8:5eb8)
ld a, $0
adc d
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, [hl]
cp d
jp c, .asm_21f45
jr nz, .asm_21f32
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, [hl]
cp e
jp c, .asm_21f45
jr .asm_21f32
.asm_21eff
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld a, [hl]
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld e, [hl]
sub e
@@ -1104,7 +1104,7 @@ Audio2_ApplyPitchBend: ; 21eb8 (8:5eb8)
ld a, d
sbc b
ld d, a
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld a, [hl]
add a
@@ -1115,22 +1115,22 @@ Audio2_ApplyPitchBend: ; 21eb8 (8:5eb8)
ld a, d
sbc b
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, d
cp [hl]
jr c, .asm_21f45
jr nz, .asm_21f32
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, e
cp [hl]
jr c, .asm_21f45
.asm_21f32
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld [hl], e
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld [hl], d
ld b, $3
@@ -1140,54 +1140,54 @@ Audio2_ApplyPitchBend: ; 21eb8 (8:5eb8)
ld [hl], d
ret
.asm_21f45
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
res 4, [hl]
res 5, [hl]
ret
Audio2_21f4e: ; 21f4e (8:5f4e)
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld [hl], d
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld [hl], e
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld a, [hl]
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
sub [hl]
jr nc, .asm_21f66
ld a, $1
.asm_21f66
ld [hl], a
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, e
sub [hl]
ld e, a
ld a, d
sbc b
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
sub [hl]
jr c, .asm_21f82
ld d, a
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 5, [hl]
jr .asm_21fa5
.asm_21f82
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld e, [hl]
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, [hl]
sub e
@@ -1195,17 +1195,17 @@ Audio2_21f4e: ; 21f4e (8:5f4e)
ld a, d
sbc b
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, [hl]
sub d
ld d, a
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
res 5, [hl]
.asm_21fa5
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
.asm_21fa9
inc b
@@ -1224,20 +1224,20 @@ Audio2_21f4e: ; 21f4e (8:5f4e)
add [hl]
ld d, b
ld b, $0
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld [hl], d
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld [hl], a
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, bc
ld [hl], a
ret
Audio2_ApplyDutyCycle: ; 21fcc (8:5fcc)
ld b, $0
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, bc
ld a, [hl]
rlca
@@ -1258,7 +1258,7 @@ Audio2_GetNextMusicByte: ; 21fe4 (8:5fe4)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
ld a, [hli]
ld e, a
@@ -1325,8 +1325,8 @@ Audio2_22017: ; 22017 (8:6017)
ld d, a
ret
-Audio2_22035:: ; 22035 (8:6035)
- ld [wc001], a
+Audio2_PlaySound:: ; 22035 (8:6035)
+ ld [wSoundID], a
cp $ff
jp z, Audio2_221f3
cp $e9
@@ -1337,75 +1337,75 @@ Audio2_22035:: ; 22035 (8:6035)
jp nc, Audio2_2210d
.asm_2204c
xor a
- ld [wc000], a
- ld [wc003], a
- ld [wc0e9], a
- ld [wc0e6], a
- ld [wc0e7], a
+ ld [wUnusedC000], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ ld [wMusicTempo + 1], a
+ ld [wMusicWaveInstrument], a
+ ld [wSfxWaveInstrument], a
ld d, $8
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
call FillAudioRAM2
- ld hl, wc006
+ ld hl, wChannelCommandPointers
call FillAudioRAM2
ld d, $4
- ld hl, wc026
+ ld hl, wChannelSoundIDs
call FillAudioRAM2
- ld hl, wc02e
+ ld hl, wChannelFlags1
call FillAudioRAM2
- ld hl, wc03e
+ ld hl, wChannelDuties
call FillAudioRAM2
- ld hl, wc046
+ ld hl, wChannelDutyCycles
call FillAudioRAM2
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
call FillAudioRAM2
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
call FillAudioRAM2
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
call FillAudioRAM2
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
call FillAudioRAM2
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
call FillAudioRAM2
- ld hl, wc036
+ ld hl, wChannelFlags2
call FillAudioRAM2
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
call FillAudioRAM2
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
call FillAudioRAM2
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
call FillAudioRAM2
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
call FillAudioRAM2
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
call FillAudioRAM2
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
call FillAudioRAM2
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
call FillAudioRAM2
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
call FillAudioRAM2
ld a, $1
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
call FillAudioRAM2
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
call FillAudioRAM2
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
call FillAudioRAM2
- ld [wc0e8], a
+ ld [wMusicTempo], a
ld a, $ff
- ld [wc004], a
+ ld [wStereoPanning], a
xor a
- ld [$ff24], a
+ ld [rNR50], a
ld a, $8
- ld [$ff10], a
+ ld [rNR10], a
ld a, $0
- ld [$ff25], a
+ ld [rNR51], a
xor a
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
jp Audio2_2224e
Audio2_2210d: ; 2210d (8:610d)
@@ -1418,9 +1418,9 @@ Audio2_2210d: ; 2210d (8:610d)
ld de, SFX_Headers_2
add hl, de
ld a, h
- ld [wc0ec], a
+ ld [wSfxHeaderPointer], a
ld a, l
- ld [wc0ed], a
+ ld [wSfxHeaderPointer + 1], a
ld a, [hl]
and $c0
rlca
@@ -1433,9 +1433,9 @@ Audio2_2210d: ; 2210d (8:610d)
add c
ld c, a
ld b, $0
- ld a, [wc0ec]
+ ld a, [wSfxHeaderPointer]
ld h, a
- ld a, [wc0ed]
+ ld a, [wSfxHeaderPointer + 1]
ld l, a
add hl, bc
ld c, d
@@ -1443,7 +1443,7 @@ Audio2_2210d: ; 2210d (8:610d)
and $f
ld e, a
ld d, $0
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, de
ld a, [hl]
and a
@@ -1451,7 +1451,7 @@ Audio2_2210d: ; 2210d (8:610d)
ld a, e
cp $7
jr nz, .asm_22159
- ld a, [wc001]
+ ld a, [wSoundID]
cp $14
jr nc, .asm_22152
ret
@@ -1461,7 +1461,7 @@ Audio2_2210d: ; 2210d (8:610d)
jr z, .asm_22162
jr c, .asm_22162
.asm_22159
- ld a, [wc001]
+ ld a, [wSoundID]
cp [hl]
jr z, .asm_22162
jr c, .asm_22162
@@ -1474,84 +1474,84 @@ Audio2_2210d: ; 2210d (8:610d)
add hl, hl
ld d, h
ld e, l
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld [hli], a
ld [hl], a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
ld [hli], a
ld [hl], a
pop de
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, de
ld [hl], a
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, de
ld [hl], a
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, de
ld [hl], a
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, de
ld [hl], a
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, de
ld [hl], a
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
add hl, de
ld [hl], a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, de
ld [hl], a
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, de
ld [hl], a
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, de
ld [hl], a
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, de
ld [hl], a
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, de
ld [hl], a
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, de
ld [hl], a
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, de
ld [hl], a
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, de
ld [hl], a
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, de
ld [hl], a
ld a, $1
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
add hl, de
ld [hl], a
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, de
ld [hl], a
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, de
ld [hl], a
ld a, e
cp $4
jr nz, .asm_221ea
ld a, $8
- ld [$ff10], a
+ ld [rNR10], a
.asm_221ea
ld a, c
and a
@@ -1561,41 +1561,41 @@ Audio2_2210d: ; 2210d (8:610d)
Audio2_221f3: ; 221f3 (8:61f3)
ld a, $80
- ld [$ff26], a
- ld [$ff1a], a
+ ld [rNR52], a
+ ld [rNR30], a
xor a
- ld [$ff25], a
- ld [$ff1c], a
+ ld [rNR51], a
+ ld [rNR32], a
ld a, $8
- ld [$ff10], a
- ld [$ff12], a
- ld [$ff17], a
- ld [$ff21], a
+ ld [rNR10], a
+ ld [rNR12], a
+ ld [rNR22], a
+ ld [rNR42], a
ld a, $40
- ld [$ff14], a
- ld [$ff19], a
- ld [$ff23], a
+ ld [rNR14], a
+ ld [rNR24], a
+ ld [rNR44], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
xor a
- ld [wc000], a
- ld [wc003], a
- ld [wc002], a
- ld [wc0e9], a
- ld [wc0eb], a
- ld [wc0e6], a
- ld [wc0e7], a
+ ld [wUnusedC000], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ ld [wMuteAudioAndPauseMusic], a
+ ld [wMusicTempo + 1], a
+ ld [wSfxTempo + 1], a
+ ld [wMusicWaveInstrument], a
+ ld [wSfxWaveInstrument], a
ld d, $a0
- ld hl, wc006
+ ld hl, wChannelCommandPointers
call FillAudioRAM2
ld a, $1
ld d, $18
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
call FillAudioRAM2
- ld [wc0e8], a
- ld [wc0ea], a
+ ld [wMusicTempo], a
+ ld [wSfxTempo], a
ld a, $ff
- ld [wc004], a
+ ld [wStereoPanning], a
ret
; fills d bytes at hl with a
@@ -1608,7 +1608,7 @@ FillAudioRAM2: ; 22248 (8:6248)
ret
Audio2_2224e: ; 2224e (8:624e)
- ld a, [wc001]
+ ld a, [wSoundID]
ld l, a
ld e, a
ld h, $0
@@ -1619,7 +1619,7 @@ Audio2_2224e: ; 2224e (8:624e)
add hl, de
ld e, l
ld d, h
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld a, [de] ; get channel number
ld b, a
rlca
@@ -1645,14 +1645,14 @@ Audio2_2224e: ; 2224e (8:624e)
push af
ld b, $0
ld c, a
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
- ld a, [wc001]
+ ld a, [wSoundID]
ld [hl], a
pop af
cp $3
jr c, .asm_22291
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 2, [hl]
.asm_22291
@@ -1671,34 +1671,34 @@ Audio2_2224e: ; 2224e (8:624e)
ld a, [de]
inc de
jr nz, .asm_22270
- ld a, [wc001]
+ ld a, [wSoundID]
cp $14
jr nc, .asm_222aa
jr .asm_222d4
.asm_222aa
- ld a, [wc001]
+ ld a, [wSoundID]
cp $86
jr z, .asm_222d4
jr c, .asm_222b5
jr .asm_222d4
.asm_222b5
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
- ld hl, wc012 ; sfx noise channel pointer
+ ld hl, wChannelCommandPointers + CH6 * 2 ; sfx noise channel pointer
ld de, Noise2_endchannel
ld [hl], e
inc hl
ld [hl], d ; overwrite pointer to point to endchannel
- ld a, [wc005]
+ ld a, [wSavedVolume]
and a
jr nz, .asm_222d4
- ld a, [$ff24]
- ld [wc005], a
+ ld a, [rNR50]
+ ld [wSavedVolume], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
.asm_222d4
ret
diff --git a/audio/engine_3.asm b/audio/engine_3.asm
index 93fa62aa..c7254405 100644
--- a/audio/engine_3.asm
+++ b/audio/engine_3.asm
@@ -4,7 +4,7 @@ Audio3_UpdateMusic:: ; 7d177 (1f:5177)
ld c, CH0
.loop
ld b, $0
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
ld a, [hl]
and a
@@ -12,18 +12,18 @@ Audio3_UpdateMusic:: ; 7d177 (1f:5177)
ld a, c
cp CH4
jr nc, .applyAffects ; if sfx channel
- ld a, [wc002]
+ ld a, [wMuteAudioAndPauseMusic]
and a
jr z, .applyAffects
bit 7, a
jr nz, .nextChannel
set 7, a
- ld [wc002], a
+ ld [wMuteAudioAndPauseMusic], a
xor a
- ld [$ff25], a
- ld [$ff1a], a
+ ld [rNR51], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
jr .nextChannel
.applyAffects
call Audio3_ApplyMusicAffects
@@ -36,7 +36,7 @@ Audio3_UpdateMusic:: ; 7d177 (1f:5177)
; this routine checks flags for music effects currently applied
; to the channel and calls certain functions based on flags.
-; known flags for wc02e:
+; known flags for wChannelFlags1:
; 0: toggleperfectpitch has been used
; 1: call has been used
; 3: a toggle used only by this routine for vibrato
@@ -44,7 +44,7 @@ Audio3_UpdateMusic:: ; 7d177 (1f:5177)
; 6: dutycycle flag
Audio3_ApplyMusicAffects: ; 7d1ac (1f:51ac)
ld b, $0
- ld hl, wc0b6 ; delay until next note
+ ld hl, wChannelNoteDelayCounters ; delay until next note
add hl, bc
ld a, [hl]
cp $1 ; if delay is 1, play next note
@@ -54,36 +54,36 @@ Audio3_ApplyMusicAffects: ; 7d1ac (1f:51ac)
ld a, c
cp CH4
jr nc, .startChecks ; if a sfx channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr z, .startChecks
ret
.startChecks
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 6, [hl] ; dutycycle
jr z, .checkForExecuteMusic
call Audio3_ApplyDutyCycle
.checkForExecuteMusic
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, .checkForPitchBend
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 2, [hl]
jr nz, .disablePitchBendVibrato
.checkForPitchBend
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 4, [hl] ; pitchbend
jr z, .checkVibratoDelay
jp Audio3_ApplyPitchBend
.checkVibratoDelay
- ld hl, wc04e ; vibrato delay
+ ld hl, wChannelVibratoDelayCounters ; vibrato delay
add hl, bc
ld a, [hl]
and a ; check if delay is over
@@ -92,7 +92,7 @@ Audio3_ApplyMusicAffects: ; 7d1ac (1f:51ac)
.disablePitchBendVibrato
ret
.checkForVibrato
- ld hl, wc056 ; vibrato rate
+ ld hl, wChannelVibratoExtents ; vibrato rate
add hl, bc
ld a, [hl]
and a
@@ -100,7 +100,7 @@ Audio3_ApplyMusicAffects: ; 7d1ac (1f:51ac)
ret ; no vibrato
.vibrato
ld d, a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, bc
ld a, [hl]
and $f
@@ -113,10 +113,10 @@ Audio3_ApplyMusicAffects: ; 7d1ac (1f:51ac)
swap [hl]
or [hl]
ld [hl], a ; reset the vibrato value and start again
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, bc
ld e, [hl] ; get note pitch
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 3, [hl] ; this is the only code that sets/resets bit three so
jr z, .unset ; it continuously alternates which path it takes
@@ -149,13 +149,13 @@ Audio3_ApplyMusicAffects: ; 7d1ac (1f:51ac)
; like tempo changes, duty changes etc. and doesn't return
; until the first note is reached
Audio3_PlayNextNote: ; 7d244 (1f:5244)
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, bc
ld a, [hl]
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld [hl], a
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
res 4, [hl]
res 5, [hl]
@@ -168,7 +168,7 @@ Audio3_endchannel: ; 7d25a (1f:525a)
cp $ff ; is this command an endchannel?
jp nz, Audio3_callchannel ; no
ld b, $0 ; yes
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 1, [hl]
jr nz, .returnFromCall
@@ -178,22 +178,22 @@ Audio3_endchannel: ; 7d25a (1f:525a)
jr .asm_7d2b3
.noiseOrSfxChannel
res 2, [hl]
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
res 0, [hl]
cp CH6
jr nz, .notSfxChannel3
ld a, $0
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
.notSfxChannel3
jr nz, .asm_7d296
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr z, .asm_7d296
xor a
- ld [wc003], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
jr .asm_7d2b3
.asm_7d296
jr .asm_7d2bc
@@ -203,10 +203,10 @@ Audio3_endchannel: ; 7d25a (1f:525a)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
push hl ; store current channel address
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld e, l
ld d, h
@@ -220,16 +220,16 @@ Audio3_endchannel: ; 7d25a (1f:525a)
.asm_7d2b3
ld hl, Unknown_7db93
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
and [hl]
- ld [$ff25], a
+ ld [rNR51], a
.asm_7d2bc
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $14
jr nc, .asm_7d2c5
jr .asm_7d2e2
.asm_7d2c5
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $86
jr z, .asm_7d2e2
jr c, .asm_7d2d0
@@ -241,12 +241,12 @@ Audio3_endchannel: ; 7d25a (1f:525a)
call Audio3_7d73b
ret c
.asm_7d2d9
- ld a, [wc005]
- ld [$ff24], a
+ ld a, [wSavedVolume]
+ ld [rNR50], a
xor a
- ld [wc005], a
+ ld [wSavedVolume], a
.asm_7d2e2
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
ld [hl], b
ret
@@ -265,10 +265,10 @@ Audio3_callchannel: ; 7d2e8 (1f:52e8)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
push hl
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld e, l
ld d, h
@@ -283,7 +283,7 @@ Audio3_callchannel: ; 7d2e8 (1f:52e8)
inc hl
ld [hl], d ; overwrite current address with pointer
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 1, [hl] ; set the call flag
jp Audio3_endchannel
@@ -296,7 +296,7 @@ Audio3_loopchannel: ; 7d31d (1f:531d)
and a
jr z, .infiniteLoop
ld b, $0
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
add hl, bc
ld a, [hl]
cp e
@@ -319,7 +319,7 @@ Audio3_loopchannel: ; 7d31d (1f:531d)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
pop af
ld [hli], a
@@ -333,7 +333,7 @@ Audio3_notetype: ; 7d358 (1f:5358)
ld a, d ; yes
and $f
ld b, $0
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, bc
ld [hl], a ; store low nibble as speed
ld a, c
@@ -346,10 +346,10 @@ Audio3_notetype: ; 7d358 (1f:5358)
jr z, .musicChannel3
cp CH6
jr nz, .notChannel3
- ld hl, wc0e7
+ ld hl, wSfxWaveInstrument
jr .sfxChannel3
.musicChannel3
- ld hl, wc0e6
+ ld hl, wMusicWaveInstrument
.sfxChannel3
ld a, d
and $f
@@ -364,7 +364,7 @@ Audio3_notetype: ; 7d358 (1f:5358)
; else, store volume (high nibble) and fade (low nibble)
.notChannel3
ld b, $0
- ld hl, wc0de
+ ld hl, wChannelVolumes
add hl, bc
ld [hl], d
.noiseChannel
@@ -375,11 +375,11 @@ Audio3_toggleperfectpitch: ; 7d397 (1f:5397)
cp $e8 ; is this command a toggleperfectpitch?
jr nz, Audio3_vibrato ; no
ld b, $0 ; yes
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
ld a, [hl]
xor $1
- ld [hl], a ; flip bit 0 of wc02e
+ ld [hl], a ; flip bit 0 of wChannelFlags1
jp Audio3_endchannel
Audio3_vibrato: ; 7d3a9 (1f:53a9)
@@ -387,10 +387,10 @@ Audio3_vibrato: ; 7d3a9 (1f:53a9)
jr nz, Audio3_pitchbend ; no
call Audio3_GetNextMusicByte ; yes
ld b, $0
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, bc
ld [hl], a ; store delay
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, bc
ld [hl], a ; store delay
call Audio3_GetNextMusicByte
@@ -398,7 +398,7 @@ Audio3_vibrato: ; 7d3a9 (1f:53a9)
and $f0
swap a
ld b, $0
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
add hl, bc
srl a
ld e, a
@@ -409,7 +409,7 @@ Audio3_vibrato: ; 7d3a9 (1f:53a9)
ld a, d
and $f
ld d, a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, bc
swap a
or d
@@ -421,7 +421,7 @@ Audio3_pitchbend: ; 7d3e1 (1f:53e1)
jr nz, Audio3_duty ; no
call Audio3_GetNextMusicByte ; yes
ld b, $0
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
ld [hl], a ; store first param
call Audio3_GetNextMusicByte
@@ -433,14 +433,14 @@ Audio3_pitchbend: ; 7d3e1 (1f:53e1)
and $f
call Audio3_7d8cc
ld b, $0
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld [hl], d ; store unknown part of second param
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld [hl], e ; store unknown part of second param
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 4, [hl] ; set pitchbend flag
call Audio3_GetNextMusicByte
@@ -455,7 +455,7 @@ Audio3_duty: ; 7d419 (1f:5419)
rrca
and $c0
ld b, $0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld [hl], a ; store duty
jp Audio3_endchannel
@@ -467,25 +467,25 @@ Audio3_tempo: ; 7d42e (1f:542e)
cp CH4
jr nc, .sfxChannel
call Audio3_GetNextMusicByte
- ld [wc0e8], a ; store first param
+ ld [wMusicTempo], a ; store first param
call Audio3_GetNextMusicByte
- ld [wc0e9], a ; store second param
+ ld [wMusicTempo + 1], a ; store second param
xor a
- ld [wc0ce], a ; clear RAM
- ld [wc0cf], a
- ld [wc0d0], a
- ld [wc0d1], a
+ ld [wChannelNoteDelayCountersFractionalPart], a ; clear RAM
+ ld [wChannelNoteDelayCountersFractionalPart + 1], a
+ ld [wChannelNoteDelayCountersFractionalPart + 2], a
+ ld [wChannelNoteDelayCountersFractionalPart + 3], a
jr .musicChannelDone
.sfxChannel
call Audio3_GetNextMusicByte
- ld [wc0ea], a ; store first param
+ ld [wSfxTempo], a ; store first param
call Audio3_GetNextMusicByte
- ld [wc0eb], a ; store second param
+ ld [wSfxTempo + 1], a ; store second param
xor a
- ld [wc0d2], a ; clear RAM
- ld [wc0d3], a
- ld [wc0d4], a
- ld [wc0d5], a
+ ld [wChannelNoteDelayCountersFractionalPart + 4], a ; clear RAM
+ ld [wChannelNoteDelayCountersFractionalPart + 5], a
+ ld [wChannelNoteDelayCountersFractionalPart + 6], a
+ ld [wChannelNoteDelayCountersFractionalPart + 7], a
.musicChannelDone
jp Audio3_endchannel
@@ -493,7 +493,7 @@ Audio3_stereopanning: ; 7d46e (1f:546e)
cp $ee ; is this command a stereopanning?
jr nz, Audio3_unknownmusic0xef ; no
call Audio3_GetNextMusicByte ; yes
- ld [wc004], a ; store panning
+ ld [wStereoPanning], a ; store panning
jp Audio3_endchannel
; this appears to never be used
@@ -502,15 +502,15 @@ Audio3_unknownmusic0xef: ; 7d47b (1f:547b)
jr nz, Audio3_dutycycle ; no
call Audio3_GetNextMusicByte ; yes
push bc
- call Audio3_7d8ea
+ call Audio3_PlaySound
pop bc
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr nz, .skip
- ld a, [wc02d]
- ld [wc003], a
+ ld a, [wChannelSoundIDs + CH7]
+ ld [wDisableChannelOutputWhenSfxEnds], a
xor a
- ld [wc02d], a
+ ld [wChannelSoundIDs + CH7], a
.skip
jp Audio3_endchannel
@@ -519,14 +519,14 @@ Audio3_dutycycle: ; 7d49a (1f:549a)
jr nz, Audio3_volume ; no
call Audio3_GetNextMusicByte ; yes
ld b, $0
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, bc
ld [hl], a ; store full cycle
and $c0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld [hl], a ; store first duty
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 6, [hl] ; set duty flag
jp Audio3_endchannel
@@ -535,14 +535,14 @@ Audio3_volume: ; 7d4b8 (1f:54b8)
cp $f0 ; is this command a volume?
jr nz, Audio3_executemusic ; no
call Audio3_GetNextMusicByte ; yes
- ld [$ff24], a ; store volume
+ ld [rNR50], a ; store volume
jp Audio3_endchannel
Audio3_executemusic: ; 7d4c4 (1f:54c4)
cp $f8 ; is this command an executemusic?
jr nz, Audio3_octave ; no
ld b, $0 ; yes
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
set 0, [hl]
jp Audio3_endchannel
@@ -551,7 +551,7 @@ Audio3_octave: ; 7d4d3 (1f:54d3)
and $f0
cp $e0 ; is this command an octave?
jr nz, Audio3_unknownsfx0x20 ; no
- ld hl, wc0d6 ; yes
+ ld hl, wChannelOctaves ; yes
ld b, $0
add hl, bc
ld a, d
@@ -566,14 +566,14 @@ Audio3_unknownsfx0x20: ; 7d4e6 (1f:54e6)
cp CH3 ; is this a noise or sfx channel?
jr c, Audio3_unknownsfx0x10 ; no
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, Audio3_unknownsfx0x10 ; no
call Audio3_notelength ; yes
ld d, a
ld b, $0
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld a, [hl]
or d
@@ -612,12 +612,12 @@ Audio3_unknownsfx0x10: ; 7d533 (1f:5533)
cp $10 ; is this command an unknownsfx0x10?
jr nz, Audio3_note ; no
ld b, $0
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, Audio3_note ; no
call Audio3_GetNextMusicByte ; yes
- ld [$ff10], a
+ ld [rNR10], a
jp Audio3_endchannel
Audio3_note: ; 7d54f (1f:554f)
@@ -647,11 +647,11 @@ Audio3_dnote: ; 7d569 (1f:5569)
call Audio3_GetNextMusicByte ; get dnote instrument
asm_7d571
ld d, a
- ld a, [wc003]
+ ld a, [wDisableChannelOutputWhenSfxEnds]
and a
jr nz, .asm_7d57c
ld a, d
- call Audio3_7d8ea
+ call Audio3_PlaySound
.asm_7d57c
pop bc
pop de
@@ -664,7 +664,7 @@ Audio3_notelength: ; 7d57e (1f:557e)
ld b, $0
ld e, a ; store note length (in 16ths)
ld d, b
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, bc
ld a, [hl]
ld l, b
@@ -672,9 +672,9 @@ Audio3_notelength: ; 7d57e (1f:557e)
ld a, c
cp CH4
jr nc, .sfxChannel
- ld a, [wc0e8]
+ ld a, [wMusicTempo]
ld d, a
- ld a, [wc0e9]
+ ld a, [wMusicTempo + 1]
ld e, a
jr .skip
.sfxChannel
@@ -683,31 +683,31 @@ Audio3_notelength: ; 7d57e (1f:557e)
cp CH7
jr z, .skip ; if noise channel
call Audio3_7d707
- ld a, [wc0ea]
+ ld a, [wSfxTempo]
ld d, a
- ld a, [wc0eb]
+ ld a, [wSfxTempo + 1]
ld e, a
.skip
ld a, l
ld b, $0
- ld hl, wc0ce
+ ld hl, wChannelNoteDelayCountersFractionalPart
add hl, bc
ld l, [hl]
call Audio3_7d8bb
ld e, l
ld d, h
- ld hl, wc0ce
+ ld hl, wChannelNoteDelayCountersFractionalPart
add hl, bc
ld [hl], e
ld a, d
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld [hl], a
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
jr nz, Audio3_notepitch
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 2, [hl]
jr z, Audio3_notepitch
@@ -722,7 +722,7 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
ld a, c
cp CH4
jr nc, .sfxChannel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
@@ -738,9 +738,9 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
ld b, $0
ld hl, Unknown_7db93
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
and [hl]
- ld [$ff25], a
+ ld [rNR51], a
jr .quit
.notSfxChannel3
ld b, $2
@@ -755,12 +755,12 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
.notRest
swap a
ld b, $0
- ld hl, wc0d6
+ ld hl, wChannelOctaves
add hl, bc
ld b, [hl]
call Audio3_7d8cc
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 4, [hl]
jr z, .asm_7d62c
@@ -770,7 +770,7 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
ld a, c
cp CH4
jr nc, .skip ; if sfx Channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
ld d, $0
ld e, a
add hl, de
@@ -783,7 +783,7 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
ret
.skip
ld b, $0
- ld hl, wc0de
+ ld hl, wChannelVolumes
add hl, bc
ld d, [hl]
ld b, $2
@@ -793,7 +793,7 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
call Audio3_7d66c
pop de
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 0, [hl] ; has toggleperfectpitch been used?
jr z, .skip2
@@ -801,7 +801,7 @@ Audio3_notepitch: ; 7d5dc (1f:55dc)
jr nc, .skip2
inc d
.skip2
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, bc
ld [hl], e
call Audio3_7d6bf
@@ -811,7 +811,7 @@ Audio3_7d66c: ; 7d66c (1f:566c)
ld b, $0
ld hl, Unknown_7db9b
add hl, bc
- ld a, [$ff25]
+ ld a, [rNR51]
or [hl]
ld d, a
ld a, c
@@ -819,18 +819,18 @@ Audio3_7d66c: ; 7d66c (1f:566c)
jr z, .sfxNoiseChannel
cp CH4
jr nc, .skip ; if sfx channel
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
add hl, bc
ld a, [hl]
and a
jr nz, .skip
.sfxNoiseChannel
- ld a, [wc004]
+ ld a, [wStereoPanning]
ld hl, Unknown_7db9b
add hl, bc
and [hl]
ld d, a
- ld a, [$ff25]
+ ld a, [rNR51]
ld hl, Unknown_7db93
add hl, bc
and [hl]
@@ -838,12 +838,12 @@ Audio3_7d66c: ; 7d66c (1f:566c)
ld d, a
.skip
ld a, d
- ld [$ff25], a
+ ld [rNR51], a
ret
Audio3_7d69d: ; 7d69d (1f:569d)
ld b, $0
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld d, [hl]
ld a, c
@@ -854,7 +854,7 @@ Audio3_7d69d: ; 7d69d (1f:569d)
ld a, d
and $3f
ld d, a
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, bc
ld a, [hl]
or d
@@ -874,10 +874,10 @@ Audio3_7d6bf: ; 7d6bf (1f:56bf)
; fall through
.channel3
push de
- ld de, wc0e6
+ ld de, wMusicWaveInstrument
cp CH2
jr z, .musicChannel3
- ld de, wc0e7
+ ld de, wSfxWaveInstrument
.musicChannel3
ld a, [de]
add a
@@ -891,7 +891,7 @@ Audio3_7d6bf: ; 7d6bf (1f:56bf)
ld hl, $ff30
ld b, $f
ld a, $0
- ld [$ff1a], a
+ ld [rNR30], a
.loop
ld a, [de]
inc de
@@ -901,7 +901,7 @@ Audio3_7d6bf: ; 7d6bf (1f:56bf)
and a
jr nz, .loop
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
pop de
.notSfxChannel3
ld a, d
@@ -920,27 +920,27 @@ Audio3_7d707: ; 7d707 (1f:5707)
call Audio3_7d759
jr nc, .asm_7d71f
ld d, $0
- ld a, [wc0f2]
+ ld a, [wTempoModifier]
add $80
jr nc, .asm_7d716
inc d
.asm_7d716
- ld [wc0eb], a
+ ld [wSfxTempo + 1], a
ld a, d
- ld [wc0ea], a
+ ld [wSfxTempo], a
jr .asm_7d728
.asm_7d71f
xor a
- ld [wc0eb], a
+ ld [wSfxTempo + 1], a
ld a, $1
- ld [wc0ea], a
+ ld [wSfxTempo], a
.asm_7d728
ret
Audio3_7d729: ; 7d729 (1f:5729)
call Audio3_7d759
jr nc, .asm_7d73a
- ld a, [wc0f1]
+ ld a, [wFrequencyModifier]
add e
jr nc, .asm_7d735
inc d
@@ -956,7 +956,7 @@ Audio3_7d729: ; 7d729 (1f:5729)
Audio3_7d73b: ; 7d73b (1f:573b)
call Audio3_7d759
jr nc, .asm_7d756
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld e, c
ld d, $0
sla e
@@ -977,7 +977,7 @@ Audio3_7d73b: ; 7d73b (1f:573b)
ret
Audio3_7d759: ; 7d759 (1f:5759)
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $14
jr nc, .asm_7d762
jr .asm_7d768
@@ -994,27 +994,27 @@ Audio3_7d759: ; 7d759 (1f:5759)
ret
Audio3_ApplyPitchBend: ; 7d76d (1f:576d)
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
bit 5, [hl]
jp nz, .asm_7d7b4
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld e, [hl]
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld l, [hl]
ld h, b
add hl, de
ld d, h
ld e, l
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, bc
push hl
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld a, [hl]
pop hl
@@ -1026,26 +1026,26 @@ Audio3_ApplyPitchBend: ; 7d76d (1f:576d)
ld a, $0
adc d
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, [hl]
cp d
jp c, .asm_7d7fa
jr nz, .asm_7d7e7
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, [hl]
cp e
jp c, .asm_7d7fa
jr .asm_7d7e7
.asm_7d7b4
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld a, [hl]
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld e, [hl]
sub e
@@ -1053,7 +1053,7 @@ Audio3_ApplyPitchBend: ; 7d76d (1f:576d)
ld a, d
sbc b
ld d, a
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld a, [hl]
add a
@@ -1064,22 +1064,22 @@ Audio3_ApplyPitchBend: ; 7d76d (1f:576d)
ld a, d
sbc b
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, d
cp [hl]
jr c, .asm_7d7fa
jr nz, .asm_7d7e7
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, e
cp [hl]
jr c, .asm_7d7fa
.asm_7d7e7
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld [hl], e
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld [hl], d
ld b, $3
@@ -1089,54 +1089,54 @@ Audio3_ApplyPitchBend: ; 7d76d (1f:576d)
ld [hl], d
ret
.asm_7d7fa
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
res 4, [hl]
res 5, [hl]
ret
Audio3_7d803: ; 7d803 (1f:5803)
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld [hl], d
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld [hl], e
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, bc
ld a, [hl]
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
sub [hl]
jr nc, .asm_7d81b
ld a, $1
.asm_7d81b
ld [hl], a
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, e
sub [hl]
ld e, a
ld a, d
sbc b
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
sub [hl]
jr c, .asm_7d837
ld d, a
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 5, [hl]
jr .asm_7d85a
.asm_7d837
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, bc
ld d, [hl]
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, bc
ld e, [hl]
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, bc
ld a, [hl]
sub e
@@ -1144,17 +1144,17 @@ Audio3_7d803: ; 7d803 (1f:5803)
ld a, d
sbc b
ld d, a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, bc
ld a, [hl]
sub d
ld d, a
ld b, $0
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
res 5, [hl]
.asm_7d85a
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, bc
.asm_7d85e
inc b
@@ -1173,20 +1173,20 @@ Audio3_7d803: ; 7d803 (1f:5803)
add [hl]
ld d, b
ld b, $0
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, bc
ld [hl], d
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, bc
ld [hl], a
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, bc
ld [hl], a
ret
Audio3_ApplyDutyCycle: ; 7d881 (1f:5881)
ld b, $0
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, bc
ld a, [hl]
rlca
@@ -1207,7 +1207,7 @@ Audio3_GetNextMusicByte: ; 7d899 (1f:5899)
ld a, c
add a
ld e, a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
ld a, [hli]
ld e, a
@@ -1274,8 +1274,8 @@ Audio3_7d8cc: ; 7d8cc (1f:58cc)
ld d, a
ret
-Audio3_7d8ea:: ; 7d8ea (1f:58ea)
- ld [wc001], a
+Audio3_PlaySound:: ; 7d8ea (1f:58ea)
+ ld [wSoundID], a
cp $ff
jp z, Audio3_7daa8
cp $c2
@@ -1286,75 +1286,75 @@ Audio3_7d8ea:: ; 7d8ea (1f:58ea)
jp nc, Audio3_7d9c2
.asm_7d901
xor a
- ld [wc000], a
- ld [wc003], a
- ld [wc0e9], a
- ld [wc0e6], a
- ld [wc0e7], a
+ ld [wUnusedC000], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ ld [wMusicTempo + 1], a
+ ld [wMusicWaveInstrument], a
+ ld [wSfxWaveInstrument], a
ld d, $8
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
call FillAudioRAM3
- ld hl, wc006
+ ld hl, wChannelCommandPointers
call FillAudioRAM3
ld d, $4
- ld hl, wc026
+ ld hl, wChannelSoundIDs
call FillAudioRAM3
- ld hl, wc02e
+ ld hl, wChannelFlags1
call FillAudioRAM3
- ld hl, wc03e
+ ld hl, wChannelDuties
call FillAudioRAM3
- ld hl, wc046
+ ld hl, wChannelDutyCycles
call FillAudioRAM3
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
call FillAudioRAM3
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
call FillAudioRAM3
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
call FillAudioRAM3
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
call FillAudioRAM3
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
call FillAudioRAM3
- ld hl, wc036
+ ld hl, wChannelFlags2
call FillAudioRAM3
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
call FillAudioRAM3
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
call FillAudioRAM3
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
call FillAudioRAM3
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
call FillAudioRAM3
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
call FillAudioRAM3
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
call FillAudioRAM3
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
call FillAudioRAM3
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
call FillAudioRAM3
ld a, $1
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
call FillAudioRAM3
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
call FillAudioRAM3
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
call FillAudioRAM3
- ld [wc0e8], a
+ ld [wMusicTempo], a
ld a, $ff
- ld [wc004], a
+ ld [wStereoPanning], a
xor a
- ld [$ff24], a
+ ld [rNR50], a
ld a, $8
- ld [$ff10], a
+ ld [rNR10], a
ld a, $0
- ld [$ff25], a
+ ld [rNR51], a
xor a
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $80
- ld [$ff1a], a
+ ld [rNR30], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
jp Audio3_7db03
Audio3_7d9c2: ; 7d9c2 (1f:59c2)
@@ -1367,9 +1367,9 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
ld de, SFX_Headers_3
add hl, de
ld a, h
- ld [wc0ec], a
+ ld [wSfxHeaderPointer], a
ld a, l
- ld [wc0ed], a
+ ld [wSfxHeaderPointer + 1], a
ld a, [hl]
and $c0
rlca
@@ -1382,9 +1382,9 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
add c
ld c, a
ld b, $0
- ld a, [wc0ec]
+ ld a, [wSfxHeaderPointer]
ld h, a
- ld a, [wc0ed]
+ ld a, [wSfxHeaderPointer + 1]
ld l, a
add hl, bc
ld c, d
@@ -1392,7 +1392,7 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
and $f
ld e, a
ld d, $0
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, de
ld a, [hl]
and a
@@ -1400,7 +1400,7 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
ld a, e
cp $7
jr nz, .asm_7da0e
- ld a, [wc001]
+ ld a, [wSoundID]
cp $14
jr nc, .asm_7da07
ret
@@ -1410,7 +1410,7 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
jr z, .asm_7da17
jr c, .asm_7da17
.asm_7da0e
- ld a, [wc001]
+ ld a, [wSoundID]
cp [hl]
jr z, .asm_7da17
jr c, .asm_7da17
@@ -1423,84 +1423,84 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
add hl, hl
ld d, h
ld e, l
- ld hl, wc016
+ ld hl, wChannelReturnAddresses
add hl, de
ld [hli], a
ld [hl], a
- ld hl, wc006
+ ld hl, wChannelCommandPointers
add hl, de
ld [hli], a
ld [hl], a
pop de
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, de
ld [hl], a
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, de
ld [hl], a
- ld hl, wc03e
+ ld hl, wChannelDuties
add hl, de
ld [hl], a
- ld hl, wc046
+ ld hl, wChannelDutyCycles
add hl, de
ld [hl], a
- ld hl, wc04e
+ ld hl, wChannelVibratoDelayCounters
add hl, de
ld [hl], a
- ld hl, wc056
+ ld hl, wChannelVibratoExtents
add hl, de
ld [hl], a
- ld hl, wc05e
+ ld hl, wChannelVibratoRates
add hl, de
ld [hl], a
- ld hl, wc066
+ ld hl, wChannelFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc06e
+ ld hl, wChannelVibratoDelayCounterReloadValues
add hl, de
ld [hl], a
- ld hl, wc076
+ ld hl, wChannelPitchBendLengthModifiers
add hl, de
ld [hl], a
- ld hl, wc07e
+ ld hl, wChannelPitchBendFrequencySteps
add hl, de
ld [hl], a
- ld hl, wc086
+ ld hl, wChannelPitchBendFrequencyStepsFractionalPart
add hl, de
ld [hl], a
- ld hl, wc08e
+ ld hl, wChannelPitchBendCurrentFrequencyFractionalPart
add hl, de
ld [hl], a
- ld hl, wc096
+ ld hl, wChannelPitchBendCurrentFrequencyHighBytes
add hl, de
ld [hl], a
- ld hl, wc09e
+ ld hl, wChannelPitchBendCurrentFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc0a6
+ ld hl, wChannelPitchBendTargetFrequencyHighBytes
add hl, de
ld [hl], a
- ld hl, wc0ae
+ ld hl, wChannelPitchBendTargetFrequencyLowBytes
add hl, de
ld [hl], a
- ld hl, wc036
+ ld hl, wChannelFlags2
add hl, de
ld [hl], a
ld a, $1
- ld hl, wc0be
+ ld hl, wChannelLoopCounters
add hl, de
ld [hl], a
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
add hl, de
ld [hl], a
- ld hl, wc0c6
+ ld hl, wChannelNoteSpeeds
add hl, de
ld [hl], a
ld a, e
cp $4
jr nz, .asm_7da9f
ld a, $8
- ld [$ff10], a
+ ld [rNR10], a
.asm_7da9f
ld a, c
and a
@@ -1510,41 +1510,41 @@ Audio3_7d9c2: ; 7d9c2 (1f:59c2)
Audio3_7daa8: ; 7daa8 (1f:5aa8)
ld a, $80
- ld [$ff26], a
- ld [$ff1a], a
+ ld [rNR52], a
+ ld [rNR30], a
xor a
- ld [$ff25], a
- ld [$ff1c], a
+ ld [rNR51], a
+ ld [rNR32], a
ld a, $8
- ld [$ff10], a
- ld [$ff12], a
- ld [$ff17], a
- ld [$ff21], a
+ ld [rNR10], a
+ ld [rNR12], a
+ ld [rNR22], a
+ ld [rNR42], a
ld a, $40
- ld [$ff14], a
- ld [$ff19], a
- ld [$ff23], a
+ ld [rNR14], a
+ ld [rNR24], a
+ ld [rNR44], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
xor a
- ld [wc000], a
- ld [wc003], a
- ld [wc002], a
- ld [wc0e9], a
- ld [wc0eb], a
- ld [wc0e6], a
- ld [wc0e7], a
+ ld [wUnusedC000], a
+ ld [wDisableChannelOutputWhenSfxEnds], a
+ ld [wMuteAudioAndPauseMusic], a
+ ld [wMusicTempo + 1], a
+ ld [wSfxTempo + 1], a
+ ld [wMusicWaveInstrument], a
+ ld [wSfxWaveInstrument], a
ld d, $a0
- ld hl, wc006
+ ld hl, wChannelCommandPointers
call FillAudioRAM3
ld a, $1
ld d, $18
- ld hl, wc0b6
+ ld hl, wChannelNoteDelayCounters
call FillAudioRAM3
- ld [wc0e8], a
- ld [wc0ea], a
+ ld [wMusicTempo], a
+ ld [wSfxTempo], a
ld a, $ff
- ld [wc004], a
+ ld [wStereoPanning], a
ret
; fills d bytes at hl with a
@@ -1557,7 +1557,7 @@ FillAudioRAM3: ; 7dafd (1f:5afd)
ret
Audio3_7db03: ; 7db03 (1f:5b03)
- ld a, [wc001]
+ ld a, [wSoundID]
ld l, a
ld e, a
ld h, $0
@@ -1568,7 +1568,7 @@ Audio3_7db03: ; 7db03 (1f:5b03)
add hl, de
ld e, l
ld d, h
- ld hl, wc006
+ ld hl, wChannelCommandPointers
ld a, [de] ; get channel number
ld b, a
rlca
@@ -1594,14 +1594,14 @@ Audio3_7db03: ; 7db03 (1f:5b03)
push af
ld b, $0
ld c, a
- ld hl, wc026
+ ld hl, wChannelSoundIDs
add hl, bc
- ld a, [wc001]
+ ld a, [wSoundID]
ld [hl], a
pop af
cp $3
jr c, .asm_7db46
- ld hl, wc02e
+ ld hl, wChannelFlags1
add hl, bc
set 2, [hl]
.asm_7db46
@@ -1620,34 +1620,34 @@ Audio3_7db03: ; 7db03 (1f:5b03)
ld a, [de]
inc de
jr nz, .asm_7db25
- ld a, [wc001]
+ ld a, [wSoundID]
cp $14
jr nc, .asm_7db5f
jr .asm_7db89
.asm_7db5f
- ld a, [wc001]
+ ld a, [wSoundID]
cp $86
jr z, .asm_7db89
jr c, .asm_7db6a
jr .asm_7db89
.asm_7db6a
- ld hl, wc02a
+ ld hl, wChannelSoundIDs + CH4
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
- ld hl, wc012 ; sfx noise channel pointer
+ ld hl, wChannelCommandPointers + CH6 * 2 ; sfx noise channel pointer
ld de, Noise3_endchannel
ld [hl], e
inc hl
ld [hl], d ; overwrite pointer to point to endchannel
- ld a, [wc005]
+ ld a, [wSavedVolume]
and a
jr nz, .asm_7db89
- ld a, [$ff24]
- ld [wc005], a
+ ld a, [rNR50]
+ ld [wSavedVolume], a
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
.asm_7db89
ret
diff --git a/constants.asm b/constants.asm
index 3b2d8437..090799f9 100644
--- a/constants.asm
+++ b/constants.asm
@@ -7,8 +7,6 @@ INCLUDE "constants/hardware_constants.asm"
INCLUDE "constants/oam_constants.asm"
INCLUDE "constants/misc_constants.asm"
-INCLUDE "constants/wram_constants.asm"
-
INCLUDE "constants/pokemon_constants.asm"
INCLUDE "constants/pokedex_constants.asm"
INCLUDE "constants/trainer_constants.asm"
diff --git a/constants/connection_constants.asm b/constants/connection_constants.asm
index 916d6c4f..154c4163 100755
--- a/constants/connection_constants.asm
+++ b/constants/connection_constants.asm
@@ -1,3 +1,7 @@
+; width of east/west connections
+; height of north/south connections
+MAP_BORDER EQU 3
+
; connection directions
EAST EQU 1
WEST EQU 2
diff --git a/constants/event_macros.asm b/constants/event_macros.asm
index cc7c03f5..90a6a59b 100755
--- a/constants/event_macros.asm
+++ b/constants/event_macros.asm
@@ -163,14 +163,13 @@ event_byte = ((\1) / 8)
;\1 = event index
;\2 = event index
-;\3 = event index (optional)
+;\3, \4, ... = additional (optional) event indices
SetEvents: MACRO
SetEvent \1
+ rept (_NARG + -1)
SetEventReuseHL \2
-
- IF _NARG > 2
- SetEventReuseHL \3
- ENDC
+ shift
+ endr
ENDM
;\1 = event index
@@ -214,11 +213,10 @@ event_byte = ((\1) / 8)
;\3 = event index (optional)
ResetEvents: MACRO
ResetEvent \1
+ rept (_NARG + -1)
ResetEventReuseHL \2
-
- IF _NARG > 2
- ResetEventReuseHL \3
- ENDC
+ shift
+ endr
ENDM
;\1 = event index
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
index f9e3fe19..21a3ad93 100644
--- a/constants/hardware_constants.asm
+++ b/constants/hardware_constants.asm
@@ -107,4 +107,3 @@ rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write)
rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only)
rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only)
rIE EQU $ffff ; Interrupt Enable (R/W)
-
diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm
index 5a517afc..1a44b1e7 100755
--- a/constants/hide_show_constants.asm
+++ b/constants/hide_show_constants.asm
@@ -2,7 +2,7 @@
; sprites marked with an X are constants that are never used
; because those sprites are not (de)activated in a map's script
; (they are either items or sprites that deactivate after battle
-; and are detected in W_MISSABLEOBJECTLIST)
+; and are detected in wMissableObjectList)
const_value = 0
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index dd321b45..fe6fcb15 100755
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -56,7 +56,7 @@ SAFARI_ROCK EQU $16 ; overload
const FULL_HEAL ; $34
const REVIVE ; $35
const MAX_REVIVE ; $36
- const GUARD_SPEC_ ; $37
+ const GUARD_SPEC ; $37
const SUPER_REPEL ; $38
const MAX_REPEL ; $39
const DIRE_HIT ; $3A
@@ -64,7 +64,7 @@ SAFARI_ROCK EQU $16 ; overload
const FRESH_WATER ; $3C
const SODA_POP ; $3D
const LEMONADE ; $3E
- const S_S__TICKET ; $3F
+ const S_S_TICKET ; $3F
const GOLD_TEETH ; $40
const X_ATTACK ; $41
const X_DEFEND ; $42
@@ -76,7 +76,7 @@ SAFARI_ROCK EQU $16 ; overload
const SILPH_SCOPE ; $48
const POKE_FLUTE ; $49
const LIFT_KEY ; $4A
- const EXP__ALL ; $4B
+ const EXP_ALL ; $4B
const OLD_ROD ; $4C
const GOOD_ROD ; $4D
const SUPER_ROD ; $4E
@@ -85,6 +85,20 @@ SAFARI_ROCK EQU $16 ; overload
const MAX_ETHER ; $51
const ELIXER ; $52
const MAX_ELIXER ; $53
+ const FLOOR_B2F ; $54
+ const FLOOR_B1F ; $55
+ const FLOOR_1F ; $56
+ const FLOOR_2F ; $57
+ const FLOOR_3F ; $58
+ const FLOOR_4F ; $59
+ const FLOOR_5F ; $5A
+ const FLOOR_6F ; $5B
+ const FLOOR_7F ; $5C
+ const FLOOR_8F ; $5D
+ const FLOOR_9F ; $5E
+ const FLOOR_10F ; $5F
+ const FLOOR_11F ; $60
+ const FLOOR_B4F ; $61
const_value = $C4
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index ef9e6ba3..de777c5d 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -10,10 +10,16 @@ PARTY_LENGTH EQU 6
MONS_PER_BOX EQU 20
NUM_BOXES EQU 12
+BAG_ITEM_CAPACITY EQU 20
+PC_ITEM_CAPACITY EQU 50
+
HOF_MON EQU $10
HOF_TEAM EQU PARTY_LENGTH * HOF_MON
HOF_TEAM_CAPACITY EQU 50
+NAME_LENGTH EQU 11
+ITEM_NAME_LENGTH EQU 13
+
A_BUTTON EQU %00000001
B_BUTTON EQU %00000010
SELECT EQU %00000100
@@ -23,13 +29,16 @@ D_LEFT EQU %00100000
D_UP EQU %01000000
D_DOWN EQU %10000000
-PIXELS_PER_TILE EQU 8
-
SCREEN_WIDTH EQU 20
SCREEN_HEIGHT EQU 18
-SCREEN_WIDTH_PIXELS EQU SCREEN_WIDTH * PIXELS_PER_TILE
-SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * PIXELS_PER_TILE
+SCREEN_WIDTH_PIXELS EQU SCREEN_WIDTH * 8
+SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * 8
+
+BG_MAP_WIDTH EQU 32
+BG_MAP_HEIGHT EQU 32
+
+SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile)
NPC_MOVEMENT_DOWN EQU $00
NPC_MOVEMENT_UP EQU $40
@@ -157,6 +166,19 @@ BIT_LEADING_ZEROES EQU 7
LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN)
LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES)
+; HP bar
+HP_BAR_GREEN EQU 0
+HP_BAR_YELLOW EQU 1
+HP_BAR_RED EQU 2
+
+; D733 flags
+BIT_TEST_BATTLE EQU 0
+
+; battle type constants
+BATTLE_TYPE_NORMAL EQU 0
+BATTLE_TYPE_OLD_MAN EQU 1
+BATTLE_TYPE_SAFARI EQU 2
+
; serial
ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01
diff --git a/constants/music_constants.asm b/constants/music_constants.asm
index f239acea..57ad230d 100644
--- a/constants/music_constants.asm
+++ b/constants/music_constants.asm
@@ -1,3 +1,42 @@
+; HW sound channel register base addresses
+HW_CH1_BASE EQU (rNR10 % $100)
+HW_CH2_BASE EQU ((rNR21 % $100) - 1)
+HW_CH3_BASE EQU (rNR30 % $100)
+HW_CH4_BASE EQU ((rNR41 % $100) - 1)
+
+; HW sound channel enable bit masks
+HW_CH1_ENABLE_MASK EQU %00010001
+HW_CH2_ENABLE_MASK EQU %00100010
+HW_CH3_ENABLE_MASK EQU %01000100
+HW_CH4_ENABLE_MASK EQU %10001000
+
+; HW sound channel disable bit masks
+HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff)
+HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff)
+HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff)
+HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff)
+
+REG_DUTY_SOUND_LEN EQU 1
+REG_VOLUME_ENVELOPE EQU 2
+REG_FREQUENCY_LO EQU 3
+
+MAX_SFX_ID EQU $B9
+
+CRY_SFX_START EQU $14
+CRY_SFX_END EQU $86
+
+; wChannelFlags1 constants
+BIT_PERFECT_PITCH EQU 0 ; controlled by toggleperfectpitch command
+BIT_CHANNEL_CALL EQU 1 ; if in channel call
+BIT_NOISE_OR_SFX EQU 2 ; if channel is the music noise channel or an SFX channel
+BIT_VIBRATO_DIRECTION EQU 3 ; if the pitch is above or below normal (cycles)
+BIT_PITCH_BEND_ON EQU 4 ; if pitch bend is active
+BIT_PITCH_BEND_DECREASING EQU 5 ; if the pitch bend frequency is decreasing (instead of increasing)
+BIT_ROTATE_DUTY EQU 6 ; if rotating duty
+
+; wChannelFlags2 constant (only has one flag)
+BIT_EXECUTE_MUSIC EQU 0 ; if in execute music
+
; Song ids are calculated by address to save space.
music_const: MACRO
diff --git a/constants/palette_constants.asm b/constants/palette_constants.asm
index 2a871462..ca2e103a 100755
--- a/constants/palette_constants.asm
+++ b/constants/palette_constants.asm
@@ -1,3 +1,19 @@
+SET_PAL_BATTLE_BLACK EQU $00
+SET_PAL_BATTLE EQU $01
+SET_PAL_TOWN_MAP EQU $02
+SET_PAL_STATUS_SCREEN EQU $03
+SET_PAL_POKEDEX EQU $04
+SET_PAL_SLOTS EQU $05
+SET_PAL_TITLE_SCREEN EQU $06
+SET_PAL_NIDORINO_INTRO EQU $07
+SET_PAL_GENERIC EQU $08
+SET_PAL_OVERWORLD EQU $09
+SET_PAL_PARTY_MENU EQU $0A
+SET_PAL_POKEMON_WHOLE_SCREEN EQU $0B
+SET_PAL_GAME_FREAK_INTRO EQU $0C
+SET_PAL_TRAINER_CARD EQU $0D
+UPDATE_PARTY_MENU_BLK_PACKET EQU $FC
+
; super game boy palettes
const_value = 0
diff --git a/constants/pokedex_constants.asm b/constants/pokedex_constants.asm
index 036426ed..360fbb4c 100644
--- a/constants/pokedex_constants.asm
+++ b/constants/pokedex_constants.asm
@@ -82,7 +82,7 @@ const_value = 1
const DEX_SLOWBRO ; 80
const DEX_MAGNEMITE ; 81
const DEX_MAGNETON ; 82
- const DEX_FARFETCH_D ; 83
+ const DEX_FARFETCHD ; 83
const DEX_DODUO ; 84
const DEX_DODRIO ; 85
const DEX_SEEL ; 86
diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm
index 255d601a..96d44ef5 100644
--- a/constants/pokemon_constants.asm
+++ b/constants/pokemon_constants.asm
@@ -63,7 +63,7 @@ const_value = 1
const MISSINGNO_3D ; $3D
const MISSINGNO_3E ; $3E
const MISSINGNO_3F ; $3F
- const FARFETCH_D ; $40
+ const FARFETCHD ; $40
const VENONAT ; $41
const DRAGONITE ; $42
const MISSINGNO_43 ; $43
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index 7df95bb5..ee890282 100755
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -1,50 +1,55 @@
-; sometimes it's necessary to add $C8 to these values
+trainer_const: MACRO
+\1 EQU const_value
+OPP_\1 EQU const_value + 200
+const_value = const_value + 1
+ENDM
+
const_value = 1
- const YOUNGSTER ; $01
- const BUG_CATCHER ; $02
- const LASS ; $03
- const SAILOR ; $04
- const JR__TRAINER_M ; $05
- const JR__TRAINER_F ; $06
- const POKEMANIAC ; $07
- const SUPER_NERD ; $08
- const HIKER ; $09
- const BIKER ; $0A
- const BURGLAR ; $0B
- const ENGINEER ; $0C
- const JUGGLER_X ; $0D
- const FISHER ; $0E
- const SWIMMER ; $0F
- const CUE_BALL ; $10
- const GAMBLER ; $11
- const BEAUTY ; $12
- const PSYCHIC_TR ; $13
- const ROCKER ; $14
- const JUGGLER ; $15
- const TAMER ; $16
- const BIRD_KEEPER ; $17
- const BLACKBELT ; $18
- const SONY1 ; $19
- const PROF_OAK ; $1A
- const CHIEF ; $1B
- const SCIENTIST ; $1C
- const GIOVANNI ; $1D
- const ROCKET ; $1E
- const COOLTRAINER_M ; $1F
- const COOLTRAINER_F ; $20
- const BRUNO ; $21
- const BROCK ; $22
- const MISTY ; $23
- const LT__SURGE ; $24
- const ERIKA ; $25
- const KOGA ; $26
- const BLAINE ; $27
- const SABRINA ; $28
- const GENTLEMAN ; $29
- const SONY2 ; $2A
- const SONY3 ; $2B
- const LORELEI ; $2C
- const CHANNELER ; $2D
- const AGATHA ; $2E
- const LANCE ; $2F
+ trainer_const YOUNGSTER ; $01
+ trainer_const BUG_CATCHER ; $02
+ trainer_const LASS ; $03
+ trainer_const SAILOR ; $04
+ trainer_const JR_TRAINER_M ; $05
+ trainer_const JR_TRAINER_F ; $06
+ trainer_const POKEMANIAC ; $07
+ trainer_const SUPER_NERD ; $08
+ trainer_const HIKER ; $09
+ trainer_const BIKER ; $0A
+ trainer_const BURGLAR ; $0B
+ trainer_const ENGINEER ; $0C
+ trainer_const JUGGLER_X ; $0D
+ trainer_const FISHER ; $0E
+ trainer_const SWIMMER ; $0F
+ trainer_const CUE_BALL ; $10
+ trainer_const GAMBLER ; $11
+ trainer_const BEAUTY ; $12
+ trainer_const PSYCHIC_TR ; $13
+ trainer_const ROCKER ; $14
+ trainer_const JUGGLER ; $15
+ trainer_const TAMER ; $16
+ trainer_const BIRD_KEEPER ; $17
+ trainer_const BLACKBELT ; $18
+ trainer_const SONY1 ; $19
+ trainer_const PROF_OAK ; $1A
+ trainer_const CHIEF ; $1B
+ trainer_const SCIENTIST ; $1C
+ trainer_const GIOVANNI ; $1D
+ trainer_const ROCKET ; $1E
+ trainer_const COOLTRAINER_M ; $1F
+ trainer_const COOLTRAINER_F ; $20
+ trainer_const BRUNO ; $21
+ trainer_const BROCK ; $22
+ trainer_const MISTY ; $23
+ trainer_const LT_SURGE ; $24
+ trainer_const ERIKA ; $25
+ trainer_const KOGA ; $26
+ trainer_const BLAINE ; $27
+ trainer_const SABRINA ; $28
+ trainer_const GENTLEMAN ; $29
+ trainer_const SONY2 ; $2A
+ trainer_const SONY3 ; $2B
+ trainer_const LORELEI ; $2C
+ trainer_const CHANNELER ; $2D
+ trainer_const AGATHA ; $2E
+ trainer_const LANCE ; $2F
diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm
deleted file mode 100644
index 067c8707..00000000
--- a/constants/wram_constants.asm
+++ /dev/null
@@ -1,10 +0,0 @@
-
-SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile)
-
-; Overload W_GRASSMONS
-wSerialEnemyDataBlock EQU $d893 ; W_GRASSMONS + 11
-
-; Overload enemy party data
-W_WATERRATE EQU $d8a4 ; wEnemyMon1Species
-W_WATERMONS EQU $d8a5 ; wEnemyMon1Species + 1
-
diff --git a/data/baseStats/farfetchd.asm b/data/baseStats/farfetchd.asm
index 015e9ff8..a1084b17 100755
--- a/data/baseStats/farfetchd.asm
+++ b/data/baseStats/farfetchd.asm
@@ -1,5 +1,5 @@
FarfetchdBaseStats: ; 38cd6 (e:4cd6)
-db DEX_FARFETCH_D ; pokedex id
+db DEX_FARFETCHD ; pokedex id
db 52 ; base hp
db 65 ; base attack
db 55 ; base defense
diff --git a/data/evos_moves.asm b/data/evos_moves.asm
index cdbec0d8..29a33479 100755
--- a/data/evos_moves.asm
+++ b/data/evos_moves.asm
@@ -202,6 +202,7 @@ Mon112_EvosMoves: ; 3b1d8 (e:71d8)
db 55,LEER
db 64,TAKE_DOWN
db 0
+
Mon115_EvosMoves: ; 3b1e6 (e:71e6)
;KANGASKHAN
;Evolutions
@@ -213,6 +214,7 @@ Mon115_EvosMoves: ; 3b1e6 (e:71e6)
db 41,LEER
db 46,DIZZY_PUNCH
db 0
+
Mon032_EvosMoves: ; 3b1f2 (e:71f2)
;NIDORAN_M
;Evolutions
@@ -226,6 +228,7 @@ Mon032_EvosMoves: ; 3b1f2 (e:71f2)
db 36,HORN_DRILL
db 43,DOUBLE_KICK
db 0
+
Mon035_EvosMoves: ; 3b203 (e:7203)
;CLEFAIRY
;Evolutions
@@ -239,6 +242,7 @@ Mon035_EvosMoves: ; 3b203 (e:7203)
db 39,DEFENSE_CURL
db 48,LIGHT_SCREEN
db 0
+
Mon021_EvosMoves: ; 3b215 (e:7215)
;SPEAROW
;Evolutions
@@ -251,6 +255,7 @@ Mon021_EvosMoves: ; 3b215 (e:7215)
db 29,DRILL_PECK
db 36,AGILITY
db 0
+
Mon100_EvosMoves: ; 3b224 (e:7224)
;VOLTORB
;Evolutions
@@ -263,6 +268,7 @@ Mon100_EvosMoves: ; 3b224 (e:7224)
db 36,SWIFT
db 43,EXPLOSION
db 0
+
Mon034_EvosMoves: ; 3b233 (e:7233)
;NIDOKING
;Evolutions
@@ -272,6 +278,7 @@ Mon034_EvosMoves: ; 3b233 (e:7233)
db 14,POISON_STING
db 23,THRASH
db 0
+
Mon080_EvosMoves: ; 3b23b (e:723b)
;SLOWBRO
;Evolutions
@@ -285,6 +292,7 @@ Mon080_EvosMoves: ; 3b23b (e:723b)
db 44,AMNESIA
db 55,PSYCHIC_M
db 0
+
Mon002_EvosMoves: ; 3b24b (e:724b)
;IVYSAUR
;Evolutions
@@ -299,6 +307,7 @@ Mon002_EvosMoves: ; 3b24b (e:724b)
db 46,SLEEP_POWDER
db 54,SOLARBEAM
db 0
+
Mon103_EvosMoves: ; 3b25e (e:725e)
;EXEGGUTOR
;Evolutions
@@ -306,6 +315,7 @@ Mon103_EvosMoves: ; 3b25e (e:725e)
;Learnset
db 28,STOMP
db 0
+
Mon108_EvosMoves: ; 3b262 (e:7262)
;LICKITUNG
;Evolutions
@@ -317,10 +327,11 @@ Mon108_EvosMoves: ; 3b262 (e:7262)
db 31,SLAM
db 39,SCREECH
db 0
+
Mon102_EvosMoves: ; 3b26e (e:726e)
;EXEGGCUTE
;Evolutions
- db EV_ITEM,LEAF_STONE ,1,EXEGGUTOR
+ db EV_ITEM,LEAF_STONE,1,EXEGGUTOR
db 0
;Learnset
db 25,REFLECT
@@ -330,6 +341,7 @@ Mon102_EvosMoves: ; 3b26e (e:726e)
db 42,SOLARBEAM
db 48,SLEEP_POWDER
db 0
+
Mon088_EvosMoves: ; 3b280 (e:7280)
;GRIMER
;Evolutions
@@ -343,6 +355,7 @@ Mon088_EvosMoves: ; 3b280 (e:7280)
db 48,SCREECH
db 55,ACID_ARMOR
db 0
+
Mon094_EvosMoves: ; 3b291 (e:7291)
;GENGAR
;Evolutions
@@ -351,6 +364,7 @@ Mon094_EvosMoves: ; 3b291 (e:7291)
db 29,HYPNOSIS
db 38,DREAM_EATER
db 0
+
Mon029_EvosMoves: ; 3b297 (e:7297)
;NIDORAN_F
;Evolutions
@@ -364,6 +378,7 @@ Mon029_EvosMoves: ; 3b297 (e:7297)
db 36,FURY_SWIPES
db 43,DOUBLE_KICK
db 0
+
Mon031_EvosMoves: ; 3b2a8 (e:72a8)
;NIDOQUEEN
;Evolutions
@@ -373,6 +388,7 @@ Mon031_EvosMoves: ; 3b2a8 (e:72a8)
db 14,POISON_STING
db 23,BODY_SLAM
db 0
+
Mon104_EvosMoves: ; 3b2b0 (e:72b0)
;CUBONE
;Evolutions
@@ -385,6 +401,7 @@ Mon104_EvosMoves: ; 3b2b0 (e:72b0)
db 43,BONEMERANG
db 46,RAGE
db 0
+
Mon111_EvosMoves: ; 3b2bf (e:72bf)
;RHYHORN
;Evolutions
@@ -398,6 +415,7 @@ Mon111_EvosMoves: ; 3b2bf (e:72bf)
db 50,LEER
db 55,TAKE_DOWN
db 0
+
Mon131_EvosMoves: ; 3b2d0 (e:72d0)
;LAPRAS
;Evolutions
@@ -410,12 +428,14 @@ Mon131_EvosMoves: ; 3b2d0 (e:72d0)
db 38,ICE_BEAM
db 46,HYDRO_PUMP
db 0
+
Mon059_EvosMoves: ; 3b2de (e:72de)
;ARCANINE
;Evolutions
db 0
;Learnset
db 0
+
Mon151_EvosMoves: ; 3b2e0 (e:72e0)
;MEW
;Evolutions
@@ -426,6 +446,7 @@ Mon151_EvosMoves: ; 3b2e0 (e:72e0)
db 30,METRONOME
db 40,PSYCHIC_M
db 0
+
Mon130_EvosMoves: ; 3b2ea (e:72ea)
;GYARADOS
;Evolutions
@@ -437,10 +458,11 @@ Mon130_EvosMoves: ; 3b2ea (e:72ea)
db 41,HYDRO_PUMP
db 52,HYPER_BEAM
db 0
+
Mon090_EvosMoves: ; 3b2f6 (e:72f6)
;SHELLDER
;Evolutions
- db EV_ITEM,WATER_STONE ,1,CLOYSTER
+ db EV_ITEM,WATER_STONE,1,CLOYSTER
db 0
;Learnset
db 18,SUPERSONIC
@@ -449,6 +471,7 @@ Mon090_EvosMoves: ; 3b2f6 (e:72f6)
db 39,LEER
db 50,ICE_BEAM
db 0
+
Mon072_EvosMoves: ; 3b306 (e:7306)
;TENTACOOL
;Evolutions
@@ -464,6 +487,7 @@ Mon072_EvosMoves: ; 3b306 (e:7306)
db 40,SCREECH
db 48,HYDRO_PUMP
db 0
+
Mon092_EvosMoves: ; 3b31b (e:731b)
;GASTLY
;Evolutions
@@ -473,6 +497,7 @@ Mon092_EvosMoves: ; 3b31b (e:731b)
db 27,HYPNOSIS
db 35,DREAM_EATER
db 0
+
Mon123_EvosMoves: ; 3b324 (e:7324)
;SCYTHER
;Evolutions
@@ -485,10 +510,11 @@ Mon123_EvosMoves: ; 3b324 (e:7324)
db 35,SWORDS_DANCE
db 42,AGILITY
db 0
+
Mon120_EvosMoves: ; 3b332 (e:7332)
;STARYU
;Evolutions
- db EV_ITEM,WATER_STONE ,1,STARMIE
+ db EV_ITEM,WATER_STONE,1,STARMIE
db 0
;Learnset
db 17,WATER_GUN
@@ -499,6 +525,7 @@ Mon120_EvosMoves: ; 3b332 (e:7332)
db 42,LIGHT_SCREEN
db 47,HYDRO_PUMP
db 0
+
Mon009_EvosMoves: ; 3b346 (e:7346)
;BLASTOISE
;Evolutions
@@ -511,6 +538,7 @@ Mon009_EvosMoves: ; 3b346 (e:7346)
db 42,SKULL_BASH
db 52,HYDRO_PUMP
db 0
+
Mon127_EvosMoves: ; 3b354 (e:7354)
;PINSIR
;Evolutions
@@ -523,6 +551,7 @@ Mon127_EvosMoves: ; 3b354 (e:7354)
db 49,SLASH
db 54,SWORDS_DANCE
db 0
+
Mon114_EvosMoves: ; 3b362 (e:7362)
;TANGELA
;Evolutions
@@ -549,6 +578,7 @@ Mon153_EvosMoves: ; 3b372 (e:7372)
db 0
;Learnset
db 0
+
Mon058_EvosMoves: ; 3b374 (e:7374)
;GROWLITHE
;Evolutions
@@ -561,6 +591,7 @@ Mon058_EvosMoves: ; 3b374 (e:7374)
db 39,AGILITY
db 50,FLAMETHROWER
db 0
+
Mon095_EvosMoves: ; 3b384 (e:7384)
;ONIX
;Evolutions
@@ -572,6 +603,7 @@ Mon095_EvosMoves: ; 3b384 (e:7384)
db 33,SLAM
db 43,HARDEN
db 0
+
Mon022_EvosMoves: ; 3b390 (e:7390)
;FEAROW
;Evolutions
@@ -583,6 +615,7 @@ Mon022_EvosMoves: ; 3b390 (e:7390)
db 34,DRILL_PECK
db 43,AGILITY
db 0
+
Mon016_EvosMoves: ; 3b39c (e:739c)
;PIDGEY
;Evolutions
@@ -596,6 +629,7 @@ Mon016_EvosMoves: ; 3b39c (e:739c)
db 36,AGILITY
db 44,MIRROR_MOVE
db 0
+
Mon079_EvosMoves: ; 3b3ad (e:73ad)
;SLOWPOKE
;Evolutions
@@ -609,6 +643,7 @@ Mon079_EvosMoves: ; 3b3ad (e:73ad)
db 40,AMNESIA
db 48,PSYCHIC_M
db 0
+
Mon064_EvosMoves: ; 3b3be (e:73be)
;KADABRA
;Evolutions
@@ -622,6 +657,7 @@ Mon064_EvosMoves: ; 3b3be (e:73be)
db 38,PSYCHIC_M
db 42,REFLECT
db 0
+
Mon075_EvosMoves: ; 3b3cf (e:73cf)
;GRAVELER
;Evolutions
@@ -635,6 +671,7 @@ Mon075_EvosMoves: ; 3b3cf (e:73cf)
db 36,EARTHQUAKE
db 43,EXPLOSION
db 0
+
Mon113_EvosMoves: ; 3b3e0 (e:73e0)
;CHANSEY
;Evolutions
@@ -647,6 +684,7 @@ Mon113_EvosMoves: ; 3b3e0 (e:73e0)
db 48,LIGHT_SCREEN
db 54,DOUBLE_EDGE
db 0
+
Mon067_EvosMoves: ; 3b3ee (e:73ee)
;MACHOKE
;Evolutions
@@ -659,6 +697,7 @@ Mon067_EvosMoves: ; 3b3ee (e:73ee)
db 44,SEISMIC_TOSS
db 52,SUBMISSION
db 0
+
Mon122_EvosMoves: ; 3b3fd (e:73fd)
;MR_MIME
;Evolutions
@@ -670,6 +709,7 @@ Mon122_EvosMoves: ; 3b3fd (e:73fd)
db 39,MEDITATE
db 47,SUBSTITUTE
db 0
+
Mon106_EvosMoves: ; 3b409 (e:7409)
;HITMONLEE
;Evolutions
@@ -681,6 +721,7 @@ Mon106_EvosMoves: ; 3b409 (e:7409)
db 48,HI_JUMP_KICK
db 53,MEGA_KICK
db 0
+
Mon107_EvosMoves: ; 3b415 (e:7415)
;HITMONCHAN
;Evolutions
@@ -692,6 +733,7 @@ Mon107_EvosMoves: ; 3b415 (e:7415)
db 48,MEGA_PUNCH
db 53,COUNTER
db 0
+
Mon024_EvosMoves: ; 3b421 (e:7421)
;ARBOK
;Evolutions
@@ -703,6 +745,7 @@ Mon024_EvosMoves: ; 3b421 (e:7421)
db 36,SCREECH
db 47,ACID
db 0
+
Mon047_EvosMoves: ; 3b42d (e:742d)
;PARASECT
;Evolutions
@@ -714,6 +757,7 @@ Mon047_EvosMoves: ; 3b42d (e:742d)
db 39,SLASH
db 48,GROWTH
db 0
+
Mon054_EvosMoves: ; 3b439 (e:7439)
;PSYDUCK
;Evolutions
@@ -726,6 +770,7 @@ Mon054_EvosMoves: ; 3b439 (e:7439)
db 43,FURY_SWIPES
db 52,HYDRO_PUMP
db 0
+
Mon096_EvosMoves: ; 3b448 (e:7448)
;DROWZEE
;Evolutions
@@ -739,6 +784,7 @@ Mon096_EvosMoves: ; 3b448 (e:7448)
db 32,PSYCHIC_M
db 37,MEDITATE
db 0
+
Mon076_EvosMoves: ; 3b459 (e:7459)
;GOLEM
;Evolutions
@@ -758,6 +804,7 @@ Mon154_EvosMoves: ; 3b467 (e:7467)
db 0
;Learnset
db 0
+
Mon126_EvosMoves: ; 3b469 (e:7469)
;MAGMAR
;Evolutions
@@ -777,6 +824,7 @@ Mon155_EvosMoves: ; 3b477 (e:7477)
db 0
;Learnset
db 0
+
Mon125_EvosMoves: ; 3b479 (e:7479)
;ELECTABUZZ
;Evolutions
@@ -788,6 +836,7 @@ Mon125_EvosMoves: ; 3b479 (e:7479)
db 49,LIGHT_SCREEN
db 54,THUNDER
db 0
+
Mon082_EvosMoves: ; 3b485 (e:7485)
;MAGNETON
;Evolutions
@@ -800,6 +849,7 @@ Mon082_EvosMoves: ; 3b485 (e:7485)
db 46,SWIFT
db 54,SCREECH
db 0
+
Mon109_EvosMoves: ; 3b493 (e:7493)
;KOFFING
;Evolutions
@@ -819,6 +869,7 @@ Mon156_EvosMoves: ; 3b4a2 (e:74a2)
db 0
;Learnset
db 0
+
Mon056_EvosMoves: ; 3b4a4 (e:74a4)
;MANKEY
;Evolutions
@@ -831,6 +882,7 @@ Mon056_EvosMoves: ; 3b4a4 (e:74a4)
db 33,SEISMIC_TOSS
db 39,THRASH
db 0
+
Mon086_EvosMoves: ; 3b4b3 (e:74b3)
;SEEL
;Evolutions
@@ -843,6 +895,7 @@ Mon086_EvosMoves: ; 3b4b3 (e:74b3)
db 45,TAKE_DOWN
db 50,ICE_BEAM
db 0
+
Mon050_EvosMoves: ; 3b4c2 (e:74c2)
;DIGLETT
;Evolutions
@@ -855,6 +908,7 @@ Mon050_EvosMoves: ; 3b4c2 (e:74c2)
db 31,SLASH
db 40,EARTHQUAKE
db 0
+
Mon128_EvosMoves: ; 3b4d1 (e:74d1)
;TAUROS
;Evolutions
@@ -887,8 +941,9 @@ Mon159_EvosMoves: ; 3b4e1 (e:74e1)
db 0
;Learnset
db 0
+
Mon083_EvosMoves: ; 3b4e3 (e:74e3)
-;FARFETCH_D
+;FARFETCHD
;Evolutions
db 0
;Learnset
@@ -898,6 +953,7 @@ Mon083_EvosMoves: ; 3b4e3 (e:74e3)
db 31,AGILITY
db 39,SLASH
db 0
+
Mon048_EvosMoves: ; 3b4ef (e:74ef)
;VENONAT
;Evolutions
@@ -911,6 +967,7 @@ Mon048_EvosMoves: ; 3b4ef (e:74ef)
db 38,SLEEP_POWDER
db 43,PSYCHIC_M
db 0
+
Mon149_EvosMoves: ; 3b500 (e:7500)
;DRAGONITE
;Evolutions
@@ -943,6 +1000,7 @@ Mon162_EvosMoves: ; 3b510 (e:7510)
db 0
;Learnset
db 0
+
Mon084_EvosMoves: ; 3b512 (e:7512)
;DODUO
;Evolutions
@@ -956,6 +1014,7 @@ Mon084_EvosMoves: ; 3b512 (e:7512)
db 40,TRI_ATTACK
db 44,AGILITY
db 0
+
Mon060_EvosMoves: ; 3b523 (e:7523)
;POLIWAG
;Evolutions
@@ -969,6 +1028,7 @@ Mon060_EvosMoves: ; 3b523 (e:7523)
db 38,AMNESIA
db 45,HYDRO_PUMP
db 0
+
Mon124_EvosMoves: ; 3b534 (e:7534)
;JYNX
;Evolutions
@@ -981,6 +1041,7 @@ Mon124_EvosMoves: ; 3b534 (e:7534)
db 47,THRASH
db 58,BLIZZARD
db 0
+
Mon146_EvosMoves: ; 3b542 (e:7542)
;MOLTRES
;Evolutions
@@ -990,6 +1051,7 @@ Mon146_EvosMoves: ; 3b542 (e:7542)
db 55,AGILITY
db 60,SKY_ATTACK
db 0
+
Mon144_EvosMoves: ; 3b54a (e:754a)
;ARTICUNO
;Evolutions
@@ -999,6 +1061,7 @@ Mon144_EvosMoves: ; 3b54a (e:754a)
db 55,AGILITY
db 60,MIST
db 0
+
Mon145_EvosMoves: ; 3b552 (e:7552)
;ZAPDOS
;Evolutions
@@ -1008,12 +1071,14 @@ Mon145_EvosMoves: ; 3b552 (e:7552)
db 55,AGILITY
db 60,LIGHT_SCREEN
db 0
+
Mon132_EvosMoves: ; 3b55a (e:755a)
;DITTO
;Evolutions
db 0
;Learnset
db 0
+
Mon052_EvosMoves: ; 3b55c (e:755c)
;MEOWTH
;Evolutions
@@ -1026,6 +1091,7 @@ Mon052_EvosMoves: ; 3b55c (e:755c)
db 33,FURY_SWIPES
db 44,SLASH
db 0
+
Mon098_EvosMoves: ; 3b56b (e:756b)
;KRABBY
;Evolutions
@@ -1059,6 +1125,7 @@ Mon165_EvosMoves: ; 3b57e (e:757e)
db 0
;Learnset
db 0
+
Mon037_EvosMoves: ; 3b580 (e:7580)
;VULPIX
;Evolutions
@@ -1071,16 +1138,18 @@ Mon037_EvosMoves: ; 3b580 (e:7580)
db 35,FLAMETHROWER
db 42,FIRE_SPIN
db 0
+
Mon038_EvosMoves: ; 3b590 (e:7590)
;NINETALES
;Evolutions
db 0
;Learnset
db 0
+
Mon025_EvosMoves: ; 3b592 (e:7592)
;PIKACHU
;Evolutions
- db EV_ITEM,THUNDER_STONE ,1,RAICHU
+ db EV_ITEM,THUNDER_STONE,1,RAICHU
db 0
;Learnset
db 9,THUNDER_WAVE
@@ -1089,6 +1158,7 @@ Mon025_EvosMoves: ; 3b592 (e:7592)
db 33,AGILITY
db 43,THUNDER
db 0
+
Mon026_EvosMoves: ; 3b5a2 (e:75a2)
;RAICHU
;Evolutions
@@ -1109,6 +1179,7 @@ Mon167_EvosMoves: ; 3b5a6 (e:75a6)
db 0
;Learnset
db 0
+
Mon147_EvosMoves: ; 3b5a8 (e:75a8)
;DRATINI
;Evolutions
@@ -1121,6 +1192,7 @@ Mon147_EvosMoves: ; 3b5a8 (e:75a8)
db 40,DRAGON_RAGE
db 50,HYPER_BEAM
db 0
+
Mon148_EvosMoves: ; 3b5b7 (e:75b7)
;DRAGONAIR
;Evolutions
@@ -1133,6 +1205,7 @@ Mon148_EvosMoves: ; 3b5b7 (e:75b7)
db 45,DRAGON_RAGE
db 55,HYPER_BEAM
db 0
+
Mon140_EvosMoves: ; 3b5c6 (e:75c6)
;KABUTO
;Evolutions
@@ -1144,6 +1217,7 @@ Mon140_EvosMoves: ; 3b5c6 (e:75c6)
db 44,LEER
db 49,HYDRO_PUMP
db 0
+
Mon141_EvosMoves: ; 3b5d3 (e:75d3)
;KABUTOPS
;Evolutions
@@ -1154,6 +1228,7 @@ Mon141_EvosMoves: ; 3b5d3 (e:75d3)
db 46,LEER
db 53,HYDRO_PUMP
db 0
+
Mon116_EvosMoves: ; 3b5dd (e:75dd)
;HORSEA
;Evolutions
@@ -1166,6 +1241,7 @@ Mon116_EvosMoves: ; 3b5dd (e:75dd)
db 37,AGILITY
db 45,HYDRO_PUMP
db 0
+
Mon117_EvosMoves: ; 3b5ec (e:75ec)
;SEADRA
;Evolutions
@@ -1191,6 +1267,7 @@ Mon169_EvosMoves: ; 3b5fa (e:75fa)
db 0
;Learnset
db 0
+
Mon027_EvosMoves: ; 3b5fc (e:75fc)
;SANDSHREW
;Evolutions
@@ -1203,6 +1280,7 @@ Mon027_EvosMoves: ; 3b5fc (e:75fc)
db 31,SWIFT
db 38,FURY_SWIPES
db 0
+
Mon028_EvosMoves: ; 3b60b (e:760b)
;SANDSLASH
;Evolutions
@@ -1214,6 +1292,7 @@ Mon028_EvosMoves: ; 3b60b (e:760b)
db 36,SWIFT
db 47,FURY_SWIPES
db 0
+
Mon138_EvosMoves: ; 3b617 (e:7617)
;OMANYTE
;Evolutions
@@ -1225,6 +1304,7 @@ Mon138_EvosMoves: ; 3b617 (e:7617)
db 46,SPIKE_CANNON
db 53,HYDRO_PUMP
db 0
+
Mon139_EvosMoves: ; 3b624 (e:7624)
;OMASTAR
;Evolutions
@@ -1235,6 +1315,7 @@ Mon139_EvosMoves: ; 3b624 (e:7624)
db 44,SPIKE_CANNON
db 49,HYDRO_PUMP
db 0
+
Mon039_EvosMoves: ; 3b62e (e:762e)
;JIGGLYPUFF
;Evolutions
@@ -1249,25 +1330,29 @@ Mon039_EvosMoves: ; 3b62e (e:762e)
db 34,BODY_SLAM
db 39,DOUBLE_EDGE
db 0
+
Mon040_EvosMoves: ; 3b642 (e:7642)
;WIGGLYTUFF
;Evolutions
db 0
;Learnset
db 0
+
Mon133_EvosMoves: ; 3b644 (e:7644)
;EEVEE
;Evolutions
db EV_ITEM,FIRE_STONE,1,FLAREON
- db EV_ITEM,THUNDER_STONE ,1,JOLTEON
- db EV_ITEM,WATER_STONE ,1,VAPOREON
+ db EV_ITEM,THUNDER_STONE,1,JOLTEON
+ db EV_ITEM,WATER_STONE,1,VAPOREON
db 0
+Mon133_EvosEnd:
;Learnset
db 27,QUICK_ATTACK
db 31,TAIL_WHIP
db 37,BITE
db 45,TAKE_DOWN
db 0
+
Mon136_EvosMoves: ; 3b65a (e:765a)
;FLAREON
;Evolutions
@@ -1282,6 +1367,7 @@ Mon136_EvosMoves: ; 3b65a (e:765a)
db 48,RAGE
db 54,FLAMETHROWER
db 0
+
Mon135_EvosMoves: ; 3b66c (e:766c)
;JOLTEON
;Evolutions
@@ -1296,6 +1382,7 @@ Mon135_EvosMoves: ; 3b66c (e:766c)
db 48,PIN_MISSILE
db 54,THUNDER
db 0
+
Mon134_EvosMoves: ; 3b67e (e:767e)
;VAPOREON
;Evolutions
@@ -1310,6 +1397,7 @@ Mon134_EvosMoves: ; 3b67e (e:767e)
db 48,MIST
db 54,HYDRO_PUMP
db 0
+
Mon066_EvosMoves: ; 3b690 (e:7690)
;MACHOP
;Evolutions
@@ -1322,6 +1410,7 @@ Mon066_EvosMoves: ; 3b690 (e:7690)
db 39,SEISMIC_TOSS
db 46,SUBMISSION
db 0
+
Mon041_EvosMoves: ; 3b69f (e:769f)
;ZUBAT
;Evolutions
@@ -1334,6 +1423,7 @@ Mon041_EvosMoves: ; 3b69f (e:769f)
db 28,WING_ATTACK
db 36,HAZE
db 0
+
Mon023_EvosMoves: ; 3b6ae (e:76ae)
;EKANS
;Evolutions
@@ -1346,6 +1436,7 @@ Mon023_EvosMoves: ; 3b6ae (e:76ae)
db 31,SCREECH
db 38,ACID
db 0
+
Mon046_EvosMoves: ; 3b6bd (e:76bd)
;PARAS
;Evolutions
@@ -1358,10 +1449,11 @@ Mon046_EvosMoves: ; 3b6bd (e:76bd)
db 34,SLASH
db 41,GROWTH
db 0
+
Mon061_EvosMoves: ; 3b6cc (e:76cc)
;POLIWHIRL
;Evolutions
- db EV_ITEM,WATER_STONE ,1,POLIWRATH
+ db EV_ITEM,WATER_STONE,1,POLIWRATH
db 0
;Learnset
db 16,HYPNOSIS
@@ -1371,6 +1463,7 @@ Mon061_EvosMoves: ; 3b6cc (e:76cc)
db 41,AMNESIA
db 49,HYDRO_PUMP
db 0
+
Mon062_EvosMoves: ; 3b6de (e:76de)
;POLIWRATH
;Evolutions
@@ -1379,6 +1472,7 @@ Mon062_EvosMoves: ; 3b6de (e:76de)
db 16,HYPNOSIS
db 19,WATER_GUN
db 0
+
Mon013_EvosMoves: ; 3b6e4 (e:76e4)
;WEEDLE
;Evolutions
@@ -1386,6 +1480,7 @@ Mon013_EvosMoves: ; 3b6e4 (e:76e4)
db 0
;Learnset
db 0
+
Mon014_EvosMoves: ; 3b6e9 (e:76e9)
;KAKUNA
;Evolutions
@@ -1393,6 +1488,7 @@ Mon014_EvosMoves: ; 3b6e9 (e:76e9)
db 0
;Learnset
db 0
+
Mon015_EvosMoves: ; 3b6ee (e:76ee)
;BEEDRILL
;Evolutions
@@ -1412,6 +1508,7 @@ Mon170_EvosMoves: ; 3b6fc (e:76fc)
db 0
;Learnset
db 0
+
Mon085_EvosMoves: ; 3b6fe (e:76fe)
;DODRIO
;Evolutions
@@ -1424,6 +1521,7 @@ Mon085_EvosMoves: ; 3b6fe (e:76fe)
db 45,TRI_ATTACK
db 51,AGILITY
db 0
+
Mon057_EvosMoves: ; 3b70c (e:770c)
;PRIMEAPE
;Evolutions
@@ -1435,6 +1533,7 @@ Mon057_EvosMoves: ; 3b70c (e:770c)
db 37,SEISMIC_TOSS
db 46,THRASH
db 0
+
Mon051_EvosMoves: ; 3b718 (e:7718)
;DUGTRIO
;Evolutions
@@ -1446,6 +1545,7 @@ Mon051_EvosMoves: ; 3b718 (e:7718)
db 35,SLASH
db 47,EARTHQUAKE
db 0
+
Mon049_EvosMoves: ; 3b724 (e:7724)
;VENOMOTH
;Evolutions
@@ -1458,6 +1558,7 @@ Mon049_EvosMoves: ; 3b724 (e:7724)
db 43,SLEEP_POWDER
db 50,PSYCHIC_M
db 0
+
Mon087_EvosMoves: ; 3b732 (e:7732)
;DEWGONG
;Evolutions
@@ -1483,6 +1584,7 @@ Mon172_EvosMoves: ; 3b740 (e:7740)
db 0
;Learnset
db 0
+
Mon010_EvosMoves: ; 3b742 (e:7742)
;CATERPIE
;Evolutions
@@ -1490,6 +1592,7 @@ Mon010_EvosMoves: ; 3b742 (e:7742)
db 0
;Learnset
db 0
+
Mon011_EvosMoves: ; 3b747 (e:7747)
;METAPOD
;Evolutions
@@ -1497,6 +1600,7 @@ Mon011_EvosMoves: ; 3b747 (e:7747)
db 0
;Learnset
db 0
+
Mon012_EvosMoves: ; 3b74c (e:774c)
;BUTTERFREE
;Evolutions
@@ -1510,6 +1614,7 @@ Mon012_EvosMoves: ; 3b74c (e:774c)
db 26,WHIRLWIND
db 32,PSYBEAM
db 0
+
Mon068_EvosMoves: ; 3b75c (e:775c)
;MACHAMP
;Evolutions
@@ -1528,6 +1633,7 @@ Mon173_EvosMoves: ; 3b768 (e:7768)
db 0
;Learnset
db 0
+
Mon055_EvosMoves: ; 3b76a (e:776a)
;GOLDUCK
;Evolutions
@@ -1539,6 +1645,7 @@ Mon055_EvosMoves: ; 3b76a (e:776a)
db 48,FURY_SWIPES
db 59,HYDRO_PUMP
db 0
+
Mon097_EvosMoves: ; 3b776 (e:7776)
;HYPNO
;Evolutions
@@ -1551,6 +1658,7 @@ Mon097_EvosMoves: ; 3b776 (e:7776)
db 37,PSYCHIC_M
db 43,MEDITATE
db 0
+
Mon042_EvosMoves: ; 3b784 (e:7784)
;GOLBAT
;Evolutions
@@ -1562,6 +1670,7 @@ Mon042_EvosMoves: ; 3b784 (e:7784)
db 32,WING_ATTACK
db 43,HAZE
db 0
+
Mon150_EvosMoves: ; 3b790 (e:7790)
;MEWTWO
;Evolutions
@@ -1573,6 +1682,7 @@ Mon150_EvosMoves: ; 3b790 (e:7790)
db 75,MIST
db 81,AMNESIA
db 0
+
Mon143_EvosMoves: ; 3b79c (e:779c)
;SNORLAX
;Evolutions
@@ -1583,6 +1693,7 @@ Mon143_EvosMoves: ; 3b79c (e:779c)
db 48,DOUBLE_EDGE
db 56,HYPER_BEAM
db 0
+
Mon129_EvosMoves: ; 3b7a6 (e:77a6)
;MAGIKARP
;Evolutions
@@ -1605,6 +1716,7 @@ Mon175_EvosMoves: ; 3b7af (e:77af)
db 0
;Learnset
db 0
+
Mon089_EvosMoves: ; 3b7b1 (e:77b1)
;MUK
;Evolutions
@@ -1624,6 +1736,7 @@ Mon176_EvosMoves: ; 3b7bf (e:77bf)
db 0
;Learnset
db 0
+
Mon099_EvosMoves: ; 3b7c1 (e:77c1)
;KINGLER
;Evolutions
@@ -1635,6 +1748,7 @@ Mon099_EvosMoves: ; 3b7c1 (e:77c1)
db 42,CRABHAMMER
db 49,HARDEN
db 0
+
Mon091_EvosMoves: ; 3b7cd (e:77cd)
;CLOYSTER
;Evolutions
@@ -1649,6 +1763,7 @@ Mon177_EvosMoves: ; 3b7d1 (e:77d1)
db 0
;Learnset
db 0
+
Mon101_EvosMoves: ; 3b7d3 (e:77d3)
;ELECTRODE
;Evolutions
@@ -1660,12 +1775,14 @@ Mon101_EvosMoves: ; 3b7d3 (e:77d3)
db 40,SWIFT
db 50,EXPLOSION
db 0
+
Mon036_EvosMoves: ; 3b7df (e:77df)
;CLEFABLE
;Evolutions
db 0
;Learnset
db 0
+
Mon110_EvosMoves: ; 3b7e1 (e:77e1)
;WEEZING
;Evolutions
@@ -1677,6 +1794,7 @@ Mon110_EvosMoves: ; 3b7e1 (e:77e1)
db 49,HAZE
db 53,EXPLOSION
db 0
+
Mon053_EvosMoves: ; 3b7ed (e:77ed)
;PERSIAN
;Evolutions
@@ -1688,6 +1806,7 @@ Mon053_EvosMoves: ; 3b7ed (e:77ed)
db 37,FURY_SWIPES
db 51,SLASH
db 0
+
Mon105_EvosMoves: ; 3b7f9 (e:77f9)
;MAROWAK
;Evolutions
@@ -1706,6 +1825,7 @@ Mon178_EvosMoves: ; 3b805 (e:7805)
db 0
;Learnset
db 0
+
Mon093_EvosMoves: ; 3b807 (e:7807)
;HAUNTER
;Evolutions
@@ -1715,6 +1835,7 @@ Mon093_EvosMoves: ; 3b807 (e:7807)
db 29,HYPNOSIS
db 38,DREAM_EATER
db 0
+
Mon063_EvosMoves: ; 3b810 (e:7810)
;ABRA
;Evolutions
@@ -1722,6 +1843,7 @@ Mon063_EvosMoves: ; 3b810 (e:7810)
db 0
;Learnset
db 0
+
Mon065_EvosMoves: ; 3b815 (e:7815)
;ALAKAZAM
;Evolutions
@@ -1734,6 +1856,7 @@ Mon065_EvosMoves: ; 3b815 (e:7815)
db 38,PSYCHIC_M
db 42,REFLECT
db 0
+
Mon017_EvosMoves: ; 3b823 (e:7823)
;PIDGEOTTO
;Evolutions
@@ -1747,6 +1870,7 @@ Mon017_EvosMoves: ; 3b823 (e:7823)
db 40,AGILITY
db 49,MIRROR_MOVE
db 0
+
Mon018_EvosMoves: ; 3b834 (e:7834)
;PIDGEOT
;Evolutions
@@ -1759,12 +1883,14 @@ Mon018_EvosMoves: ; 3b834 (e:7834)
db 44,AGILITY
db 54,MIRROR_MOVE
db 0
+
Mon121_EvosMoves: ; 3b842 (e:7842)
;STARMIE
;Evolutions
db 0
;Learnset
db 0
+
Mon001_EvosMoves: ; 3b844 (e:7844)
;BULBASAUR
;Evolutions
@@ -1779,6 +1905,7 @@ Mon001_EvosMoves: ; 3b844 (e:7844)
db 41,SLEEP_POWDER
db 48,SOLARBEAM
db 0
+
Mon003_EvosMoves: ; 3b857 (e:7857)
;VENUSAUR
;Evolutions
@@ -1792,6 +1919,7 @@ Mon003_EvosMoves: ; 3b857 (e:7857)
db 55,SLEEP_POWDER
db 65,SOLARBEAM
db 0
+
Mon073_EvosMoves: ; 3b867 (e:7867)
;TENTACRUEL
;Evolutions
@@ -1813,6 +1941,7 @@ Mon179_EvosMoves: ; 3b879 (e:7879)
db 0
;Learnset
db 0
+
Mon118_EvosMoves: ; 3b87b (e:787b)
;GOLDEEN
;Evolutions
@@ -1826,6 +1955,7 @@ Mon118_EvosMoves: ; 3b87b (e:787b)
db 45,HORN_DRILL
db 54,AGILITY
db 0
+
Mon119_EvosMoves: ; 3b88c (e:788c)
;SEAKING
;Evolutions
@@ -1866,6 +1996,7 @@ Mon183_EvosMoves: ; 3b8a0 (e:78a0)
db 0
;Learnset
db 0
+
Mon077_EvosMoves: ; 3b8a2 (e:78a2)
;PONYTA
;Evolutions
@@ -1879,6 +2010,7 @@ Mon077_EvosMoves: ; 3b8a2 (e:78a2)
db 43,TAKE_DOWN
db 48,AGILITY
db 0
+
Mon078_EvosMoves: ; 3b8b3 (e:78b3)
;RAPIDASH
;Evolutions
@@ -1891,6 +2023,7 @@ Mon078_EvosMoves: ; 3b8b3 (e:78b3)
db 47,TAKE_DOWN
db 55,AGILITY
db 0
+
Mon019_EvosMoves: ; 3b8c1 (e:78c1)
;RATTATA
;Evolutions
@@ -1902,6 +2035,7 @@ Mon019_EvosMoves: ; 3b8c1 (e:78c1)
db 23,FOCUS_ENERGY
db 34,SUPER_FANG
db 0
+
Mon020_EvosMoves: ; 3b8ce (e:78ce)
;RATICATE
;Evolutions
@@ -1912,6 +2046,7 @@ Mon020_EvosMoves: ; 3b8ce (e:78ce)
db 27,FOCUS_ENERGY
db 41,SUPER_FANG
db 0
+
Mon033_EvosMoves: ; 3b8d8 (e:78d8)
;NIDORINO
;Evolutions
@@ -1925,6 +2060,7 @@ Mon033_EvosMoves: ; 3b8d8 (e:78d8)
db 41,HORN_DRILL
db 50,DOUBLE_KICK
db 0
+
Mon030_EvosMoves: ; 3b8ea (e:78ea)
;NIDORINA
;Evolutions
@@ -1938,6 +2074,7 @@ Mon030_EvosMoves: ; 3b8ea (e:78ea)
db 41,FURY_SWIPES
db 50,DOUBLE_KICK
db 0
+
Mon074_EvosMoves: ; 3b8fc (e:78fc)
;GEODUDE
;Evolutions
@@ -1951,6 +2088,7 @@ Mon074_EvosMoves: ; 3b8fc (e:78fc)
db 31,EARTHQUAKE
db 36,EXPLOSION
db 0
+
Mon137_EvosMoves: ; 3b90d (e:790d)
;PORYGON
;Evolutions
@@ -1961,6 +2099,7 @@ Mon137_EvosMoves: ; 3b90d (e:790d)
db 35,AGILITY
db 42,TRI_ATTACK
db 0
+
Mon142_EvosMoves: ; 3b917 (e:7917)
;AERODACTYL
;Evolutions
@@ -1978,6 +2117,7 @@ Mon184_EvosMoves: ; 3b921 (e:7921)
db 0
;Learnset
db 0
+
Mon081_EvosMoves: ; 3b923 (e:7923)
;MAGNEMITE
;Evolutions
@@ -2005,6 +2145,7 @@ Mon186_EvosMoves: ; 3b936 (e:7936)
db 0
;Learnset
db 0
+
Mon004_EvosMoves: ; 3b938 (e:7938)
;CHARMANDER
;Evolutions
@@ -2018,6 +2159,7 @@ Mon004_EvosMoves: ; 3b938 (e:7938)
db 38,FLAMETHROWER
db 46,FIRE_SPIN
db 0
+
Mon007_EvosMoves: ; 3b949 (e:7949)
;SQUIRTLE
;Evolutions
@@ -2031,6 +2173,7 @@ Mon007_EvosMoves: ; 3b949 (e:7949)
db 35,SKULL_BASH
db 42,HYDRO_PUMP
db 0
+
Mon005_EvosMoves: ; 3b95a (e:795a)
;CHARMELEON
;Evolutions
@@ -2044,6 +2187,7 @@ Mon005_EvosMoves: ; 3b95a (e:795a)
db 42,FLAMETHROWER
db 56,FIRE_SPIN
db 0
+
Mon008_EvosMoves: ; 3b96b (e:796b)
;WARTORTLE
;Evolutions
@@ -2057,6 +2201,7 @@ Mon008_EvosMoves: ; 3b96b (e:796b)
db 39,SKULL_BASH
db 47,HYDRO_PUMP
db 0
+
Mon006_EvosMoves: ; 3b97c (e:797c)
;CHARIZARD
;Evolutions
@@ -2097,6 +2242,7 @@ Mon190_EvosMoves: ; 3b990 (e:7990)
db 0
;Learnset
db 0
+
Mon043_EvosMoves: ; 3b992 (e:7992)
;ODDISH
;Evolutions
@@ -2110,10 +2256,11 @@ Mon043_EvosMoves: ; 3b992 (e:7992)
db 33,PETAL_DANCE
db 46,SOLARBEAM
db 0
+
Mon044_EvosMoves: ; 3b9a3 (e:79a3)
;GLOOM
;Evolutions
- db EV_ITEM,LEAF_STONE ,1,VILEPLUME
+ db EV_ITEM,LEAF_STONE,1,VILEPLUME
db 0
;Learnset
db 15,POISONPOWDER
@@ -2123,6 +2270,7 @@ Mon044_EvosMoves: ; 3b9a3 (e:79a3)
db 38,PETAL_DANCE
db 52,SOLARBEAM
db 0
+
Mon045_EvosMoves: ; 3b9b5 (e:79b5)
;VILEPLUME
;Evolutions
@@ -2132,6 +2280,7 @@ Mon045_EvosMoves: ; 3b9b5 (e:79b5)
db 17,STUN_SPORE
db 19,SLEEP_POWDER
db 0
+
Mon069_EvosMoves: ; 3b9bd (e:79bd)
;BELLSPROUT
;Evolutions
@@ -2146,10 +2295,11 @@ Mon069_EvosMoves: ; 3b9bd (e:79bd)
db 33,RAZOR_LEAF
db 42,SLAM
db 0
+
Mon070_EvosMoves: ; 3b9d0 (e:79d0)
;WEEPINBELL
;Evolutions
- db EV_ITEM,LEAF_STONE ,1,VICTREEBEL
+ db EV_ITEM,LEAF_STONE,1,VICTREEBEL
db 0
;Learnset
db 13,WRAP
@@ -2160,6 +2310,7 @@ Mon070_EvosMoves: ; 3b9d0 (e:79d0)
db 38,RAZOR_LEAF
db 49,SLAM
db 0
+
Mon071_EvosMoves: ; 3b9e4 (e:79e4)
;VICTREEBEL
;Evolutions
diff --git a/data/hidden_objects.asm b/data/hidden_objects.asm
index 8170cf5a..d7851779 100755
--- a/data/hidden_objects.asm
+++ b/data/hidden_objects.asm
@@ -195,7 +195,7 @@ RedsHouse2FHiddenObjects: ; 46b5a (11:6b5a)
db $01,$00,$04
dbw BANK(OpenRedsPC), OpenRedsPC
db $05,$03,$d0
- dbw BANK(PrintRedsNESText), PrintRedsNESText
+ dbw BANK(PrintRedSNESText), PrintRedSNESText
db $FF
BluesHouseHiddenObjects: ; 46b67 (11:6b67)
db $01,$00,$04
diff --git a/data/hide_show_data.asm b/data/hide_show_data.asm
index c8d89102..4fe57b20 100755
--- a/data/hide_show_data.asm
+++ b/data/hide_show_data.asm
@@ -263,7 +263,7 @@ MapHSPointers: ; c8f5 (3:48f5)
; a) Map_ID = $FF
; b) Map_ID ≠ currentMapID
;
-; This Data is loaded into RAM at wd5ce-$D5F?. (W_MISSABLEOBJECTLIST)
+; This Data is loaded into RAM at wd5ce-$D5F?. (wMissableObjectList)
; These constants come from the bytes for Predef functions:
Hide equ $11
diff --git a/data/item_prices.asm b/data/item_prices.asm
index f6882fd0..c36e1c69 100755
--- a/data/item_prices.asm
+++ b/data/item_prices.asm
@@ -53,7 +53,7 @@ ItemPrices: ; 4608 (1:4608)
money 600 ; FULL_HEAL
money 1500 ; REVIVE
money 4000 ; MAX_REVIVE
- money 700 ; GUARD_SPEC_
+ money 700 ; GUARD_SPEC
money 500 ; SUPER_REPEL
money 700 ; MAX_REPEL
money 650 ; DIRE_HIT
@@ -61,7 +61,7 @@ ItemPrices: ; 4608 (1:4608)
money 200 ; FRESH_WATER
money 300 ; SODA_POP
money 350 ; LEMONADE
- money 0 ; S_S__TICKET
+ money 0 ; S_S_TICKET
money 0 ; GOLD_TEETH
money 500 ; X_ATTACK
money 550 ; X_DEFEND
@@ -73,7 +73,7 @@ ItemPrices: ; 4608 (1:4608)
money 0 ; SILPH_SCOPE
money 0 ; POKE_FLUTE
money 0 ; LIFT_KEY
- money 0 ; EXP__ALL
+ money 0 ; EXP_ALL
money 0 ; OLD_ROD
money 0 ; GOOD_ROD
money 0 ; SUPER_ROD
@@ -82,17 +82,17 @@ ItemPrices: ; 4608 (1:4608)
money 0 ; MAX_ETHER
money 0 ; ELIXER
money 0 ; MAX_ELIXER
- money 0 ; B2F
- money 0 ; B1F
- money 0 ; 1F
- money 0 ; 2F
- money 0 ; 3F
- money 0 ; 4F
- money 0 ; 5F
- money 0 ; 6F
- money 0 ; 7F
- money 0 ; 8F
- money 0 ; 9F
- money 0 ; 10F
- money 0 ; 11F
- money 0 ; B4F
+ money 0 ; FLOOR_B2F
+ money 0 ; FLOOR_B1F
+ money 0 ; FLOOR_1F
+ money 0 ; FLOOR_2F
+ money 0 ; FLOOR_3F
+ money 0 ; FLOOR_4F
+ money 0 ; FLOOR_5F
+ money 0 ; FLOOR_6F
+ money 0 ; FLOOR_7F
+ money 0 ; FLOOR_8F
+ money 0 ; FLOOR_9F
+ money 0 ; FLOOR_10F
+ money 0 ; FLOOR_11F
+ money 0 ; FLOOR_B4F
diff --git a/data/mapObjects/agatha.asm b/data/mapObjects/agatha.asm
index f755df83..e33172ae 100755
--- a/data/mapObjects/agatha.asm
+++ b/data/mapObjects/agatha.asm
@@ -10,7 +10,7 @@ AgathaObject: ; 0x76534 (size=44)
db $0 ; signs
db $1 ; objects
- object SPRITE_AGATHA, $5, $2, STAY, DOWN, $1, AGATHA + $C8, $1
+ object SPRITE_AGATHA, $5, $2, STAY, DOWN, $1, OPP_AGATHA, $1
; warp-to
EVENT_DISP AGATHAS_ROOM_WIDTH, $b, $4 ; BRUNOS_ROOM
diff --git a/data/mapObjects/bruno.asm b/data/mapObjects/bruno.asm
index 805f3302..8d55461f 100755
--- a/data/mapObjects/bruno.asm
+++ b/data/mapObjects/bruno.asm
@@ -10,7 +10,7 @@ BrunoObject: ; 0x763d7 (size=44)
db $0 ; signs
db $1 ; objects
- object SPRITE_BRUNO, $5, $2, STAY, DOWN, $1, BRUNO + $C8, $1
+ object SPRITE_BRUNO, $5, $2, STAY, DOWN, $1, OPP_BRUNO, $1
; warp-to
EVENT_DISP BRUNOS_ROOM_WIDTH, $b, $4 ; LORELEIS_ROOM
diff --git a/data/mapObjects/celadongamecorner.asm b/data/mapObjects/celadongamecorner.asm
index c0af5920..1169e1da 100755
--- a/data/mapObjects/celadongamecorner.asm
+++ b/data/mapObjects/celadongamecorner.asm
@@ -20,7 +20,7 @@ CeladonGameCornerObject: ; 0x48fa0 (size=99)
object SPRITE_GAMBLER, $b, $f, STAY, RIGHT, $8 ; person
object SPRITE_MART_GUY, $e, $b, STAY, LEFT, $9 ; person
object SPRITE_GENTLEMAN, $11, $d, STAY, RIGHT, $a ; person
- object SPRITE_ROCKET, $9, $5, STAY, UP, $b, ROCKET + $C8, $7
+ object SPRITE_ROCKET, $9, $5, STAY, UP, $b, OPP_ROCKET, $7
; warp-to
EVENT_DISP GAME_CORNER_WIDTH, $11, $f
diff --git a/data/mapObjects/celadongym.asm b/data/mapObjects/celadongym.asm
index 795f7efa..a38dd535 100755
--- a/data/mapObjects/celadongym.asm
+++ b/data/mapObjects/celadongym.asm
@@ -8,14 +8,14 @@ CeladonGymObject: ; 0x48b30 (size=84)
db $0 ; signs
db $8 ; objects
- object SPRITE_ERIKA, $4, $3, STAY, DOWN, $1, ERIKA + $C8, $1
- object SPRITE_LASS, $2, $b, STAY, RIGHT, $2, LASS + $C8, $11
- object SPRITE_FOULARD_WOMAN, $7, $a, STAY, LEFT, $3, BEAUTY + $C8, $1
- object SPRITE_LASS, $9, $5, STAY, DOWN, $4, JR__TRAINER_F + $C8, $b
- object SPRITE_FOULARD_WOMAN, $1, $5, STAY, DOWN, $5, BEAUTY + $C8, $2
- object SPRITE_LASS, $6, $3, STAY, DOWN, $6, LASS + $C8, $12
- object SPRITE_FOULARD_WOMAN, $3, $3, STAY, DOWN, $7, BEAUTY + $C8, $3
- object SPRITE_LASS, $5, $3, STAY, DOWN, $8, COOLTRAINER_F + $C8, $1
+ object SPRITE_ERIKA, $4, $3, STAY, DOWN, $1, OPP_ERIKA, $1
+ object SPRITE_LASS, $2, $b, STAY, RIGHT, $2, OPP_LASS, $11
+ object SPRITE_FOULARD_WOMAN, $7, $a, STAY, LEFT, $3, OPP_BEAUTY, $1
+ object SPRITE_LASS, $9, $5, STAY, DOWN, $4, OPP_JR_TRAINER_F, $b
+ object SPRITE_FOULARD_WOMAN, $1, $5, STAY, DOWN, $5, OPP_BEAUTY, $2
+ object SPRITE_LASS, $6, $3, STAY, DOWN, $6, OPP_LASS, $12
+ object SPRITE_FOULARD_WOMAN, $3, $3, STAY, DOWN, $7, OPP_BEAUTY, $3
+ object SPRITE_LASS, $5, $3, STAY, DOWN, $8, OPP_COOLTRAINER_F, $1
; warp-to
EVENT_DISP CELADON_GYM_WIDTH, $11, $4
diff --git a/data/mapObjects/ceruleancity.asm b/data/mapObjects/ceruleancity.asm
index 0be79c17..8c429695 100755
--- a/data/mapObjects/ceruleancity.asm
+++ b/data/mapObjects/ceruleancity.asm
@@ -23,7 +23,7 @@ CeruleanCityObject: ; 0x18786 (size=170)
db $b ; objects
object SPRITE_BLUE, $14, $2, STAY, DOWN, $1 ; person
- object SPRITE_ROCKET, $1e, $8, STAY, NONE, $2, ROCKET + $C8, $5
+ object SPRITE_ROCKET, $1e, $8, STAY, NONE, $2, OPP_ROCKET, $5
object SPRITE_BLACK_HAIR_BOY_1, $1f, $14, STAY, DOWN, $3 ; person
object SPRITE_BLACK_HAIR_BOY_2, $f, $12, WALK, $1, $4 ; person
object SPRITE_BLACK_HAIR_BOY_2, $9, $15, WALK, $2, $5 ; person
diff --git a/data/mapObjects/ceruleangym.asm b/data/mapObjects/ceruleangym.asm
index 23d06d53..68d74547 100755
--- a/data/mapObjects/ceruleangym.asm
+++ b/data/mapObjects/ceruleangym.asm
@@ -8,9 +8,9 @@ CeruleanGymObject: ; 0x5c834 (size=50)
db $0 ; signs
db $4 ; objects
- object SPRITE_BRUNETTE_GIRL, $4, $2, STAY, DOWN, $1, MISTY + $C8, $1
- object SPRITE_LASS, $2, $3, STAY, RIGHT, $2, JR__TRAINER_F + $C8, $1
- object SPRITE_SWIMMER, $8, $7, STAY, LEFT, $3, SWIMMER + $C8, $1
+ object SPRITE_BRUNETTE_GIRL, $4, $2, STAY, DOWN, $1, OPP_MISTY, $1
+ object SPRITE_LASS, $2, $3, STAY, RIGHT, $2, OPP_JR_TRAINER_F, $1
+ object SPRITE_SWIMMER, $8, $7, STAY, LEFT, $3, OPP_SWIMMER, $1
object SPRITE_GYM_HELPER, $7, $a, STAY, DOWN, $4 ; person
; warp-to
diff --git a/data/mapObjects/cinnabargym.asm b/data/mapObjects/cinnabargym.asm
index 21afcbdf..d9b69192 100755
--- a/data/mapObjects/cinnabargym.asm
+++ b/data/mapObjects/cinnabargym.asm
@@ -8,14 +8,14 @@ CinnabarGymObject: ; 0x75acc (size=90)
db $0 ; signs
db $9 ; objects
- object SPRITE_FAT_BALD_GUY, $3, $3, STAY, DOWN, $1, BLAINE + $C8, $1
- object SPRITE_BLACK_HAIR_BOY_2, $11, $2, STAY, DOWN, $2, SUPER_NERD + $C8, $9
- object SPRITE_BLACK_HAIR_BOY_2, $11, $8, STAY, DOWN, $3, BURGLAR + $C8, $4
- object SPRITE_BLACK_HAIR_BOY_2, $b, $4, STAY, DOWN, $4, SUPER_NERD + $C8, $a
- object SPRITE_BLACK_HAIR_BOY_2, $b, $8, STAY, DOWN, $5, BURGLAR + $C8, $5
- object SPRITE_BLACK_HAIR_BOY_2, $b, $e, STAY, DOWN, $6, SUPER_NERD + $C8, $b
- object SPRITE_BLACK_HAIR_BOY_2, $3, $e, STAY, DOWN, $7, BURGLAR + $C8, $6
- object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, DOWN, $8, SUPER_NERD + $C8, $c
+ object SPRITE_FAT_BALD_GUY, $3, $3, STAY, DOWN, $1, OPP_BLAINE, $1
+ object SPRITE_BLACK_HAIR_BOY_2, $11, $2, STAY, DOWN, $2, OPP_SUPER_NERD, $9
+ object SPRITE_BLACK_HAIR_BOY_2, $11, $8, STAY, DOWN, $3, OPP_BURGLAR, $4
+ object SPRITE_BLACK_HAIR_BOY_2, $b, $4, STAY, DOWN, $4, OPP_SUPER_NERD, $a
+ object SPRITE_BLACK_HAIR_BOY_2, $b, $8, STAY, DOWN, $5, OPP_BURGLAR, $5
+ object SPRITE_BLACK_HAIR_BOY_2, $b, $e, STAY, DOWN, $6, OPP_SUPER_NERD, $b
+ object SPRITE_BLACK_HAIR_BOY_2, $3, $e, STAY, DOWN, $7, OPP_BURGLAR, $6
+ object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, DOWN, $8, OPP_SUPER_NERD, $c
object SPRITE_GYM_HELPER, $10, $d, STAY, DOWN, $9 ; person
; warp-to
diff --git a/data/mapObjects/fightingdojo.asm b/data/mapObjects/fightingdojo.asm
index 042791e1..aa9c0bd7 100755
--- a/data/mapObjects/fightingdojo.asm
+++ b/data/mapObjects/fightingdojo.asm
@@ -8,11 +8,11 @@ FightingDojoObject: ; 0x5cf9b (size=72)
db $0 ; signs
db $7 ; objects
- object SPRITE_HIKER, $5, $3, STAY, DOWN, $1, BLACKBELT + $C8, $1
- object SPRITE_HIKER, $3, $4, STAY, RIGHT, $2, BLACKBELT + $C8, $2
- object SPRITE_HIKER, $3, $6, STAY, RIGHT, $3, BLACKBELT + $C8, $3
- object SPRITE_HIKER, $5, $5, STAY, LEFT, $4, BLACKBELT + $C8, $4
- object SPRITE_HIKER, $5, $7, STAY, LEFT, $5, BLACKBELT + $C8, $5
+ object SPRITE_HIKER, $5, $3, STAY, DOWN, $1, OPP_BLACKBELT, $1
+ object SPRITE_HIKER, $3, $4, STAY, RIGHT, $2, OPP_BLACKBELT, $2
+ object SPRITE_HIKER, $3, $6, STAY, RIGHT, $3, OPP_BLACKBELT, $3
+ object SPRITE_HIKER, $5, $5, STAY, LEFT, $4, OPP_BLACKBELT, $4
+ object SPRITE_HIKER, $5, $7, STAY, LEFT, $5, OPP_BLACKBELT, $5
object SPRITE_BALL, $4, $1, STAY, NONE, $6 ; person
object SPRITE_BALL, $5, $1, STAY, NONE, $7 ; person
diff --git a/data/mapObjects/fuchsiagym.asm b/data/mapObjects/fuchsiagym.asm
index 1d082f62..ded17031 100755
--- a/data/mapObjects/fuchsiagym.asm
+++ b/data/mapObjects/fuchsiagym.asm
@@ -8,13 +8,13 @@ FuchsiaGymObject: ; 0x75658 (size=82)
db $0 ; signs
db $8 ; objects
- object SPRITE_BLACKBELT, $4, $a, STAY, DOWN, $1, KOGA + $C8, $1
- object SPRITE_ROCKER, $8, $d, STAY, DOWN, $2, JUGGLER + $C8, $7
- object SPRITE_ROCKER, $7, $8, STAY, RIGHT, $3, JUGGLER + $C8, $3
- object SPRITE_ROCKER, $1, $c, STAY, DOWN, $4, JUGGLER + $C8, $8
- object SPRITE_ROCKER, $3, $5, STAY, UP, $5, TAMER + $C8, $1
- object SPRITE_ROCKER, $8, $2, STAY, DOWN, $6, TAMER + $C8, $2
- object SPRITE_ROCKER, $2, $7, STAY, LEFT, $7, JUGGLER + $C8, $4
+ object SPRITE_BLACKBELT, $4, $a, STAY, DOWN, $1, OPP_KOGA, $1
+ object SPRITE_ROCKER, $8, $d, STAY, DOWN, $2, OPP_JUGGLER, $7
+ object SPRITE_ROCKER, $7, $8, STAY, RIGHT, $3, OPP_JUGGLER, $3
+ object SPRITE_ROCKER, $1, $c, STAY, DOWN, $4, OPP_JUGGLER, $8
+ object SPRITE_ROCKER, $3, $5, STAY, UP, $5, OPP_TAMER, $1
+ object SPRITE_ROCKER, $8, $2, STAY, DOWN, $6, OPP_TAMER, $2
+ object SPRITE_ROCKER, $2, $7, STAY, LEFT, $7, OPP_JUGGLER, $4
object SPRITE_GYM_HELPER, $7, $f, STAY, DOWN, $8 ; person
; warp-to
diff --git a/data/mapObjects/lance.asm b/data/mapObjects/lance.asm
index 42a3e83b..cdfbc7a6 100755
--- a/data/mapObjects/lance.asm
+++ b/data/mapObjects/lance.asm
@@ -9,7 +9,7 @@ LanceObject: ; 0x5a3c5 (size=36)
db $0 ; signs
db $1 ; objects
- object SPRITE_LANCE, $6, $1, STAY, DOWN, $1, LANCE + $C8, $1
+ object SPRITE_LANCE, $6, $1, STAY, DOWN, $1, OPP_LANCE, $1
; warp-to
EVENT_DISP LANCES_ROOM_WIDTH, $10, $18 ; AGATHAS_ROOM
diff --git a/data/mapObjects/lorelei.asm b/data/mapObjects/lorelei.asm
index dc318326..4ce080f7 100755
--- a/data/mapObjects/lorelei.asm
+++ b/data/mapObjects/lorelei.asm
@@ -10,7 +10,7 @@ LoreleiObject: ; 0x76280 (size=44)
db $0 ; signs
db $1 ; objects
- object SPRITE_LORELEI, $5, $2, STAY, DOWN, $1, LORELEI + $C8, $1
+ object SPRITE_LORELEI, $5, $2, STAY, DOWN, $1, OPP_LORELEI, $1
; warp-to
EVENT_DISP LORELEIS_ROOM_WIDTH, $b, $4 ; INDIGO_PLATEAU_LOBBY
diff --git a/data/mapObjects/mansion1.asm b/data/mapObjects/mansion1.asm
index 30b79433..0bb168bb 100755
--- a/data/mapObjects/mansion1.asm
+++ b/data/mapObjects/mansion1.asm
@@ -14,7 +14,7 @@ Mansion1Object: ; 0x443a4 (size=90)
db $0 ; signs
db $3 ; objects
- object SPRITE_OAK_AIDE, $11, $11, STAY, LEFT, $1, SCIENTIST + $C8, $4
+ object SPRITE_OAK_AIDE, $11, $11, STAY, LEFT, $1, OPP_SCIENTIST, $4
object SPRITE_BALL, $e, $3, STAY, NONE, $2, ESCAPE_ROPE
object SPRITE_BALL, $12, $15, STAY, NONE, $3, CARBOS
diff --git a/data/mapObjects/mansion2.asm b/data/mapObjects/mansion2.asm
index b9a7b551..2cb45879 100755
--- a/data/mapObjects/mansion2.asm
+++ b/data/mapObjects/mansion2.asm
@@ -10,7 +10,7 @@ Mansion2Object: ; 0x520d1 (size=63)
db $0 ; signs
db $4 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $3, $11, WALK, $2, $1, BURGLAR + $C8, $7
+ object SPRITE_BLACK_HAIR_BOY_2, $3, $11, WALK, $2, $1, OPP_BURGLAR, $7
object SPRITE_BALL, $1c, $7, STAY, NONE, $2, CALCIUM
object SPRITE_BOOK_MAP_DEX, $12, $2, STAY, NONE, $3 ; person
object SPRITE_BOOK_MAP_DEX, $3, $16, STAY, NONE, $4 ; person
diff --git a/data/mapObjects/mansion3.asm b/data/mapObjects/mansion3.asm
index 52b46327..288b4753 100755
--- a/data/mapObjects/mansion3.asm
+++ b/data/mapObjects/mansion3.asm
@@ -9,8 +9,8 @@ Mansion3Object: ; 0x522e6 (size=64)
db $0 ; signs
db $5 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $5, $b, WALK, $2, $1, BURGLAR + $C8, $8
- object SPRITE_OAK_AIDE, $14, $b, STAY, LEFT, $2, SCIENTIST + $C8, $c
+ object SPRITE_BLACK_HAIR_BOY_2, $5, $b, WALK, $2, $1, OPP_BURGLAR, $8
+ object SPRITE_OAK_AIDE, $14, $b, STAY, LEFT, $2, OPP_SCIENTIST, $c
object SPRITE_BALL, $1, $10, STAY, NONE, $3, MAX_POTION
object SPRITE_BALL, $19, $5, STAY, NONE, $4, IRON
object SPRITE_BOOK_MAP_DEX, $6, $c, STAY, NONE, $5 ; person
diff --git a/data/mapObjects/mansion4.asm b/data/mapObjects/mansion4.asm
index 6d5cac47..eddbda8e 100755
--- a/data/mapObjects/mansion4.asm
+++ b/data/mapObjects/mansion4.asm
@@ -7,8 +7,8 @@ Mansion4Object: ; 0x52498 (size=69)
db $0 ; signs
db $8 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $10, $17, STAY, NONE, $1, BURGLAR + $C8, $9
- object SPRITE_OAK_AIDE, $1b, $b, STAY, DOWN, $2, SCIENTIST + $C8, $d
+ object SPRITE_BLACK_HAIR_BOY_2, $10, $17, STAY, NONE, $1, OPP_BURGLAR, $9
+ object SPRITE_OAK_AIDE, $1b, $b, STAY, DOWN, $2, OPP_SCIENTIST, $d
object SPRITE_BALL, $a, $2, STAY, NONE, $3, RARE_CANDY
object SPRITE_BALL, $1, $16, STAY, NONE, $4, FULL_RESTORE
object SPRITE_BALL, $13, $19, STAY, NONE, $5, TM_14
diff --git a/data/mapObjects/mtmoon1.asm b/data/mapObjects/mtmoon1.asm
index 3c9bcc80..a59f2a20 100755
--- a/data/mapObjects/mtmoon1.asm
+++ b/data/mapObjects/mtmoon1.asm
@@ -12,13 +12,13 @@ MtMoon1Object: ; 0x49b06 (size=145)
db $17, $f, $e ; MtMoon1Text14
db $d ; objects
- object SPRITE_HIKER, $5, $6, STAY, DOWN, $1, HIKER + $C8, $1
- object SPRITE_BUG_CATCHER, $c, $10, STAY, RIGHT, $2, YOUNGSTER + $C8, $3
- object SPRITE_LASS, $1e, $4, STAY, DOWN, $3, LASS + $C8, $5
- object SPRITE_BLACK_HAIR_BOY_2, $18, $1f, STAY, UP, $4, SUPER_NERD + $C8, $1
- object SPRITE_LASS, $10, $17, STAY, DOWN, $5, LASS + $C8, $6
- object SPRITE_BUG_CATCHER, $7, $16, STAY, DOWN, $6, BUG_CATCHER + $C8, $7
- object SPRITE_BUG_CATCHER, $1e, $1b, STAY, RIGHT, $7, BUG_CATCHER + $C8, $8
+ object SPRITE_HIKER, $5, $6, STAY, DOWN, $1, OPP_HIKER, $1
+ object SPRITE_BUG_CATCHER, $c, $10, STAY, RIGHT, $2, OPP_YOUNGSTER, $3
+ object SPRITE_LASS, $1e, $4, STAY, DOWN, $3, OPP_LASS, $5
+ object SPRITE_BLACK_HAIR_BOY_2, $18, $1f, STAY, UP, $4, OPP_SUPER_NERD, $1
+ object SPRITE_LASS, $10, $17, STAY, DOWN, $5, OPP_LASS, $6
+ object SPRITE_BUG_CATCHER, $7, $16, STAY, DOWN, $6, OPP_BUG_CATCHER, $7
+ object SPRITE_BUG_CATCHER, $1e, $1b, STAY, RIGHT, $7, OPP_BUG_CATCHER, $8
object SPRITE_BALL, $2, $14, STAY, NONE, $8, POTION
object SPRITE_BALL, $2, $2, STAY, NONE, $9, MOON_STONE
object SPRITE_BALL, $23, $1f, STAY, NONE, $a, RARE_CANDY
diff --git a/data/mapObjects/mtmoon3.asm b/data/mapObjects/mtmoon3.asm
index 3bcfe40f..4f8f911c 100755
--- a/data/mapObjects/mtmoon3.asm
+++ b/data/mapObjects/mtmoon3.asm
@@ -10,11 +10,11 @@ MtMoon3Object: ; 0x49fdb (size=102)
db $0 ; signs
db $9 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $c, $8, STAY, RIGHT, $1, SUPER_NERD + $C8, $2
- object SPRITE_ROCKET, $b, $10, STAY, DOWN, $2, ROCKET + $C8, $1
- object SPRITE_ROCKET, $f, $16, STAY, DOWN, $3, ROCKET + $C8, $2
- object SPRITE_ROCKET, $1d, $b, STAY, UP, $4, ROCKET + $C8, $3
- object SPRITE_ROCKET, $1d, $11, STAY, LEFT, $5, ROCKET + $C8, $4
+ object SPRITE_BLACK_HAIR_BOY_2, $c, $8, STAY, RIGHT, $1, OPP_SUPER_NERD, $2
+ object SPRITE_ROCKET, $b, $10, STAY, DOWN, $2, OPP_ROCKET, $1
+ object SPRITE_ROCKET, $f, $16, STAY, DOWN, $3, OPP_ROCKET, $2
+ object SPRITE_ROCKET, $1d, $b, STAY, UP, $4, OPP_ROCKET, $3
+ object SPRITE_ROCKET, $1d, $11, STAY, LEFT, $5, OPP_ROCKET, $4
object SPRITE_OMANYTE, $c, $6, STAY, NONE, $6 ; person
object SPRITE_OMANYTE, $d, $6, STAY, NONE, $7 ; person
object SPRITE_BALL, $19, $15, STAY, NONE, $8, HP_UP
diff --git a/data/mapObjects/oakslab.asm b/data/mapObjects/oakslab.asm
index 0cfe9328..53d6b85b 100755
--- a/data/mapObjects/oakslab.asm
+++ b/data/mapObjects/oakslab.asm
@@ -8,7 +8,7 @@ OaksLabObject: ; 0x1d40a (size=88)
db $0 ; signs
db $b ; objects
- object SPRITE_BLUE, $4, $3, STAY, NONE, $1, SONY1 + $C8, $1
+ object SPRITE_BLUE, $4, $3, STAY, NONE, $1, OPP_SONY1, $1
object SPRITE_BALL, $6, $3, STAY, NONE, $2 ; person
object SPRITE_BALL, $7, $3, STAY, NONE, $3 ; person
object SPRITE_BALL, $8, $3, STAY, NONE, $4 ; person
diff --git a/data/mapObjects/pewtergym.asm b/data/mapObjects/pewtergym.asm
index 13909781..b0224a11 100755
--- a/data/mapObjects/pewtergym.asm
+++ b/data/mapObjects/pewtergym.asm
@@ -8,8 +8,8 @@ PewterGymObject: ; 0x5c52e (size=42)
db $0 ; signs
db $3 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $4, $1, STAY, DOWN, $1, BROCK + $C8, $1
- object SPRITE_BLACK_HAIR_BOY_1, $3, $6, STAY, RIGHT, $2, JR__TRAINER_M + $C8, $1
+ object SPRITE_BLACK_HAIR_BOY_2, $4, $1, STAY, DOWN, $1, OPP_BROCK, $1
+ object SPRITE_BLACK_HAIR_BOY_1, $3, $6, STAY, RIGHT, $2, OPP_JR_TRAINER_M, $1
object SPRITE_GYM_HELPER, $7, $a, STAY, DOWN, $3 ; person
; warp-to
diff --git a/data/mapObjects/pokemontower3.asm b/data/mapObjects/pokemontower3.asm
index a3580e23..4591cbe3 100755
--- a/data/mapObjects/pokemontower3.asm
+++ b/data/mapObjects/pokemontower3.asm
@@ -8,9 +8,9 @@ PokemonTower3Object: ; 0x6075d (size=51)
db $0 ; signs
db $4 ; objects
- object SPRITE_MEDIUM, $c, $3, STAY, LEFT, $1, CHANNELER + $C8, $5
- object SPRITE_MEDIUM, $9, $8, STAY, DOWN, $2, CHANNELER + $C8, $6
- object SPRITE_MEDIUM, $a, $d, STAY, DOWN, $3, CHANNELER + $C8, $8
+ object SPRITE_MEDIUM, $c, $3, STAY, LEFT, $1, OPP_CHANNELER, $5
+ object SPRITE_MEDIUM, $9, $8, STAY, DOWN, $2, OPP_CHANNELER, $6
+ object SPRITE_MEDIUM, $a, $d, STAY, DOWN, $3, OPP_CHANNELER, $8
object SPRITE_BALL, $c, $1, STAY, NONE, $4, ESCAPE_ROPE
; warp-to
diff --git a/data/mapObjects/pokemontower4.asm b/data/mapObjects/pokemontower4.asm
index de95d1b0..722f6e08 100755
--- a/data/mapObjects/pokemontower4.asm
+++ b/data/mapObjects/pokemontower4.asm
@@ -8,9 +8,9 @@ PokemonTower4Object: ; 0x6088b (size=65)
db $0 ; signs
db $6 ; objects
- object SPRITE_MEDIUM, $5, $a, STAY, RIGHT, $1, CHANNELER + $C8, $9
- object SPRITE_MEDIUM, $f, $7, STAY, DOWN, $2, CHANNELER + $C8, $a
- object SPRITE_MEDIUM, $e, $c, STAY, LEFT, $3, CHANNELER + $C8, $c
+ object SPRITE_MEDIUM, $5, $a, STAY, RIGHT, $1, OPP_CHANNELER, $9
+ object SPRITE_MEDIUM, $f, $7, STAY, DOWN, $2, OPP_CHANNELER, $a
+ object SPRITE_MEDIUM, $e, $c, STAY, LEFT, $3, OPP_CHANNELER, $c
object SPRITE_BALL, $c, $a, STAY, NONE, $4, ELIXER
object SPRITE_BALL, $9, $a, STAY, NONE, $5, AWAKENING
object SPRITE_BALL, $c, $10, STAY, NONE, $6, HP_UP
diff --git a/data/mapObjects/pokemontower5.asm b/data/mapObjects/pokemontower5.asm
index bb3f1882..1d23abbf 100755
--- a/data/mapObjects/pokemontower5.asm
+++ b/data/mapObjects/pokemontower5.asm
@@ -9,10 +9,10 @@ PokemonTower5Object: ; 0x60a48 (size=65)
db $6 ; objects
object SPRITE_MEDIUM, $c, $8, STAY, NONE, $1 ; person
- object SPRITE_MEDIUM, $11, $7, STAY, LEFT, $2, CHANNELER + $C8, $e
- object SPRITE_MEDIUM, $e, $3, STAY, LEFT, $3, CHANNELER + $C8, $10
- object SPRITE_MEDIUM, $6, $a, STAY, RIGHT, $4, CHANNELER + $C8, $11
- object SPRITE_MEDIUM, $9, $10, STAY, RIGHT, $5, CHANNELER + $C8, $12
+ object SPRITE_MEDIUM, $11, $7, STAY, LEFT, $2, OPP_CHANNELER, $e
+ object SPRITE_MEDIUM, $e, $3, STAY, LEFT, $3, OPP_CHANNELER, $10
+ object SPRITE_MEDIUM, $6, $a, STAY, RIGHT, $4, OPP_CHANNELER, $11
+ object SPRITE_MEDIUM, $9, $10, STAY, RIGHT, $5, OPP_CHANNELER, $12
object SPRITE_BALL, $6, $e, STAY, NONE, $6, NUGGET
; warp-to
diff --git a/data/mapObjects/pokemontower6.asm b/data/mapObjects/pokemontower6.asm
index 56dcc404..cd7453d8 100755
--- a/data/mapObjects/pokemontower6.asm
+++ b/data/mapObjects/pokemontower6.asm
@@ -8,9 +8,9 @@ PokemonTower6Object: ; 0x60c5b (size=58)
db $0 ; signs
db $5 ; objects
- object SPRITE_MEDIUM, $c, $a, STAY, RIGHT, $1, CHANNELER + $C8, $13
- object SPRITE_MEDIUM, $9, $5, STAY, DOWN, $2, CHANNELER + $C8, $14
- object SPRITE_MEDIUM, $10, $5, STAY, LEFT, $3, CHANNELER + $C8, $15
+ object SPRITE_MEDIUM, $c, $a, STAY, RIGHT, $1, OPP_CHANNELER, $13
+ object SPRITE_MEDIUM, $9, $5, STAY, DOWN, $2, OPP_CHANNELER, $14
+ object SPRITE_MEDIUM, $10, $5, STAY, LEFT, $3, OPP_CHANNELER, $15
object SPRITE_BALL, $6, $8, STAY, NONE, $4, RARE_CANDY
object SPRITE_BALL, $e, $e, STAY, NONE, $5, X_ACCURACY
diff --git a/data/mapObjects/pokemontower7.asm b/data/mapObjects/pokemontower7.asm
index 270f3aa7..fd1fc884 100755
--- a/data/mapObjects/pokemontower7.asm
+++ b/data/mapObjects/pokemontower7.asm
@@ -13,9 +13,9 @@ IF DEF(_YELLOW)
object SPRITE_MR_FUJI, $a, 3, STAY, DOWN, 3
ELSE
db $4 ; objects
- object SPRITE_ROCKET, $9, $b, STAY, RIGHT, $1, ROCKET + $C8, $13
- object SPRITE_ROCKET, $c, $9, STAY, LEFT, $2, ROCKET + $C8, $14
- object SPRITE_ROCKET, $9, $7, STAY, RIGHT, $3, ROCKET + $C8, $15
+ object SPRITE_ROCKET, $9, $b, STAY, RIGHT, $1, OPP_ROCKET, $13
+ object SPRITE_ROCKET, $c, $9, STAY, LEFT, $2, OPP_ROCKET, $14
+ object SPRITE_ROCKET, $9, $7, STAY, RIGHT, $3, OPP_ROCKET, $15
object SPRITE_MR_FUJI, $a, $3, STAY, DOWN, $4 ; person
ENDC
diff --git a/data/mapObjects/rockethideout1.asm b/data/mapObjects/rockethideout1.asm
index a1a87350..55c0c101 100755
--- a/data/mapObjects/rockethideout1.asm
+++ b/data/mapObjects/rockethideout1.asm
@@ -11,11 +11,11 @@ RocketHideout1Object: ; 0x44ce7 (size=98)
db $0 ; signs
db $7 ; objects
- object SPRITE_ROCKET, $1a, $8, STAY, LEFT, $1, ROCKET + $C8, $8
- object SPRITE_ROCKET, $c, $6, STAY, RIGHT, $2, ROCKET + $C8, $9
- object SPRITE_ROCKET, $12, $11, STAY, DOWN, $3, ROCKET + $C8, $a
- object SPRITE_ROCKET, $f, $19, STAY, RIGHT, $4, ROCKET + $C8, $b
- object SPRITE_ROCKET, $1c, $12, STAY, LEFT, $5, ROCKET + $C8, $c
+ object SPRITE_ROCKET, $1a, $8, STAY, LEFT, $1, OPP_ROCKET, $8
+ object SPRITE_ROCKET, $c, $6, STAY, RIGHT, $2, OPP_ROCKET, $9
+ object SPRITE_ROCKET, $12, $11, STAY, DOWN, $3, OPP_ROCKET, $a
+ object SPRITE_ROCKET, $f, $19, STAY, RIGHT, $4, OPP_ROCKET, $b
+ object SPRITE_ROCKET, $1c, $12, STAY, LEFT, $5, OPP_ROCKET, $c
object SPRITE_BALL, $b, $e, STAY, NONE, $6, ESCAPE_ROPE
object SPRITE_BALL, $9, $11, STAY, NONE, $7, HYPER_POTION
diff --git a/data/mapObjects/rockethideout2.asm b/data/mapObjects/rockethideout2.asm
index 40e19895..b14dc0e6 100755
--- a/data/mapObjects/rockethideout2.asm
+++ b/data/mapObjects/rockethideout2.asm
@@ -11,7 +11,7 @@ RocketHideout2Object: ; 0x450f7 (size=80)
db $0 ; signs
db $5 ; objects
- object SPRITE_ROCKET, $14, $c, STAY, DOWN, $1, ROCKET + $C8, $d
+ object SPRITE_ROCKET, $14, $c, STAY, DOWN, $1, OPP_ROCKET, $d
object SPRITE_BALL, $1, $b, STAY, NONE, $2, MOON_STONE
object SPRITE_BALL, $10, $8, STAY, NONE, $3, NUGGET
object SPRITE_BALL, $6, $c, STAY, NONE, $4, TM_07
diff --git a/data/mapObjects/rockethideout3.asm b/data/mapObjects/rockethideout3.asm
index 3001be76..d7933ddf 100755
--- a/data/mapObjects/rockethideout3.asm
+++ b/data/mapObjects/rockethideout3.asm
@@ -8,8 +8,8 @@ RocketHideout3Object: ; 0x4534d (size=50)
db $0 ; signs
db $4 ; objects
- object SPRITE_ROCKET, $a, $16, STAY, RIGHT, $1, ROCKET + $C8, $e
- object SPRITE_ROCKET, $1a, $c, STAY, UP, $2, ROCKET + $C8, $f
+ object SPRITE_ROCKET, $a, $16, STAY, RIGHT, $1, OPP_ROCKET, $e
+ object SPRITE_ROCKET, $1a, $c, STAY, UP, $2, OPP_ROCKET, $f
object SPRITE_BALL, $1a, $11, STAY, NONE, $3, TM_10
object SPRITE_BALL, $14, $e, STAY, NONE, $4, RARE_CANDY
diff --git a/data/mapObjects/rockethideout4.asm b/data/mapObjects/rockethideout4.asm
index e11133fd..5441f9cd 100755
--- a/data/mapObjects/rockethideout4.asm
+++ b/data/mapObjects/rockethideout4.asm
@@ -9,10 +9,10 @@ RocketHideout4Object: ; 0x455f1 (size=95)
db $0 ; signs
db $9 ; objects
- object SPRITE_GIOVANNI, $19, $3, STAY, DOWN, $1, GIOVANNI + $C8, $1
- object SPRITE_ROCKET, $17, $c, STAY, DOWN, $2, ROCKET + $C8, $10
- object SPRITE_ROCKET, $1a, $c, STAY, DOWN, $3, ROCKET + $C8, $11
- object SPRITE_ROCKET, $b, $2, STAY, DOWN, $4, ROCKET + $C8, $12
+ object SPRITE_GIOVANNI, $19, $3, STAY, DOWN, $1, OPP_GIOVANNI, $1
+ object SPRITE_ROCKET, $17, $c, STAY, DOWN, $2, OPP_ROCKET, $10
+ object SPRITE_ROCKET, $1a, $c, STAY, DOWN, $3, OPP_ROCKET, $11
+ object SPRITE_ROCKET, $b, $2, STAY, DOWN, $4, OPP_ROCKET, $12
object SPRITE_BALL, $a, $c, STAY, NONE, $5, HP_UP
object SPRITE_BALL, $9, $4, STAY, NONE, $6, TM_02
object SPRITE_BALL, $c, $14, STAY, NONE, $7, IRON
diff --git a/data/mapObjects/rocktunnel1.asm b/data/mapObjects/rocktunnel1.asm
index 348e9e50..70ffa438 100755
--- a/data/mapObjects/rocktunnel1.asm
+++ b/data/mapObjects/rocktunnel1.asm
@@ -15,13 +15,13 @@ RockTunnel1Object: ; 0x445f6 (size=127)
db $1d, $b, $8 ; RockTunnel1Text8
db $7 ; objects
- object SPRITE_HIKER, $7, $5, STAY, DOWN, $1, HIKER + $C8, $c
- object SPRITE_HIKER, $5, $10, STAY, DOWN, $2, HIKER + $C8, $d
- object SPRITE_HIKER, $11, $f, STAY, LEFT, $3, HIKER + $C8, $e
- object SPRITE_BLACK_HAIR_BOY_2, $17, $8, STAY, LEFT, $4, POKEMANIAC + $C8, $7
- object SPRITE_LASS, $25, $15, STAY, LEFT, $5, JR__TRAINER_F + $C8, $11
- object SPRITE_LASS, $16, $18, STAY, DOWN, $6, JR__TRAINER_F + $C8, $12
- object SPRITE_LASS, $20, $18, STAY, RIGHT, $7, JR__TRAINER_F + $C8, $13
+ object SPRITE_HIKER, $7, $5, STAY, DOWN, $1, OPP_HIKER, $c
+ object SPRITE_HIKER, $5, $10, STAY, DOWN, $2, OPP_HIKER, $d
+ object SPRITE_HIKER, $11, $f, STAY, LEFT, $3, OPP_HIKER, $e
+ object SPRITE_BLACK_HAIR_BOY_2, $17, $8, STAY, LEFT, $4, OPP_POKEMANIAC, $7
+ object SPRITE_LASS, $25, $15, STAY, LEFT, $5, OPP_JR_TRAINER_F, $11
+ object SPRITE_LASS, $16, $18, STAY, DOWN, $6, OPP_JR_TRAINER_F, $12
+ object SPRITE_LASS, $20, $18, STAY, RIGHT, $7, OPP_JR_TRAINER_F, $13
; warp-to
EVENT_DISP ROCK_TUNNEL_1_WIDTH, $3, $f
diff --git a/data/mapObjects/rocktunnel2.asm b/data/mapObjects/rocktunnel2.asm
index 7da2c3d1..e343fc0b 100755
--- a/data/mapObjects/rocktunnel2.asm
+++ b/data/mapObjects/rocktunnel2.asm
@@ -10,14 +10,14 @@ RockTunnel2Object: ; 0x4613d (size=100)
db $0 ; signs
db $8 ; objects
- object SPRITE_LASS, $b, $d, STAY, DOWN, $1, JR__TRAINER_F + $C8, $9
- object SPRITE_HIKER, $6, $a, STAY, DOWN, $2, HIKER + $C8, $9
- object SPRITE_BLACK_HAIR_BOY_2, $3, $5, STAY, DOWN, $3, POKEMANIAC + $C8, $3
- object SPRITE_BLACK_HAIR_BOY_2, $14, $15, STAY, RIGHT, $4, POKEMANIAC + $C8, $4
- object SPRITE_HIKER, $1e, $a, STAY, DOWN, $5, HIKER + $C8, $a
- object SPRITE_LASS, $e, $1c, STAY, RIGHT, $6, JR__TRAINER_F + $C8, $a
- object SPRITE_HIKER, $21, $5, STAY, RIGHT, $7, HIKER + $C8, $b
- object SPRITE_BLACK_HAIR_BOY_2, $1a, $1e, STAY, DOWN, $8, POKEMANIAC + $C8, $5
+ object SPRITE_LASS, $b, $d, STAY, DOWN, $1, OPP_JR_TRAINER_F, $9
+ object SPRITE_HIKER, $6, $a, STAY, DOWN, $2, OPP_HIKER, $9
+ object SPRITE_BLACK_HAIR_BOY_2, $3, $5, STAY, DOWN, $3, OPP_POKEMANIAC, $3
+ object SPRITE_BLACK_HAIR_BOY_2, $14, $15, STAY, RIGHT, $4, OPP_POKEMANIAC, $4
+ object SPRITE_HIKER, $1e, $a, STAY, DOWN, $5, OPP_HIKER, $a
+ object SPRITE_LASS, $e, $1c, STAY, RIGHT, $6, OPP_JR_TRAINER_F, $a
+ object SPRITE_HIKER, $21, $5, STAY, RIGHT, $7, OPP_HIKER, $b
+ object SPRITE_BLACK_HAIR_BOY_2, $1a, $1e, STAY, DOWN, $8, OPP_POKEMANIAC, $5
; warp-to
EVENT_DISP ROCK_TUNNEL_2_WIDTH, $19, $21 ; ROCK_TUNNEL_1
diff --git a/data/mapObjects/route10.asm b/data/mapObjects/route10.asm
index b9b0cd25..3623b79f 100755
--- a/data/mapObjects/route10.asm
+++ b/data/mapObjects/route10.asm
@@ -14,12 +14,12 @@ Route10Object: ; 0x582f6 (size=96)
db $29, $5, $a ; Route10Text10
db $6 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $a, $2c, STAY, LEFT, $1, POKEMANIAC + $C8, $1
- object SPRITE_HIKER, $3, $39, STAY, UP, $2, HIKER + $C8, $7
- object SPRITE_BLACK_HAIR_BOY_2, $e, $40, STAY, LEFT, $3, POKEMANIAC + $C8, $2
- object SPRITE_LASS, $7, $19, STAY, LEFT, $4, JR__TRAINER_F + $C8, $7
- object SPRITE_HIKER, $3, $3d, STAY, DOWN, $5, HIKER + $C8, $8
- object SPRITE_LASS, $7, $36, STAY, DOWN, $6, JR__TRAINER_F + $C8, $8
+ object SPRITE_BLACK_HAIR_BOY_2, $a, $2c, STAY, LEFT, $1, OPP_POKEMANIAC, $1
+ object SPRITE_HIKER, $3, $39, STAY, UP, $2, OPP_HIKER, $7
+ object SPRITE_BLACK_HAIR_BOY_2, $e, $40, STAY, LEFT, $3, OPP_POKEMANIAC, $2
+ object SPRITE_LASS, $7, $19, STAY, LEFT, $4, OPP_JR_TRAINER_F, $7
+ object SPRITE_HIKER, $3, $3d, STAY, DOWN, $5, OPP_HIKER, $8
+ object SPRITE_LASS, $7, $36, STAY, DOWN, $6, OPP_JR_TRAINER_F, $8
; warp-to
EVENT_DISP ROUTE_10_WIDTH, $13, $b ; ROCK_TUNNEL_POKECENTER
diff --git a/data/mapObjects/route11.asm b/data/mapObjects/route11.asm
index ccbd1af2..4e196b20 100755
--- a/data/mapObjects/route11.asm
+++ b/data/mapObjects/route11.asm
@@ -12,16 +12,16 @@ Route11Object: ; 0x584e0 (size=127)
db $5, $1, $b ; Route11Text11
db $a ; objects
- object SPRITE_GAMBLER, $a, $e, STAY, DOWN, $1, GAMBLER + $C8, $1
- object SPRITE_GAMBLER, $1a, $9, STAY, DOWN, $2, GAMBLER + $C8, $2
- object SPRITE_BUG_CATCHER, $d, $5, STAY, LEFT, $3, YOUNGSTER + $C8, $9
- object SPRITE_BLACK_HAIR_BOY_2, $24, $b, STAY, DOWN, $4, ENGINEER + $C8, $2
- object SPRITE_BUG_CATCHER, $16, $4, STAY, UP, $5, YOUNGSTER + $C8, $a
- object SPRITE_GAMBLER, $2d, $7, STAY, DOWN, $6, GAMBLER + $C8, $3
- object SPRITE_GAMBLER, $21, $3, STAY, UP, $7, GAMBLER + $C8, $4
- object SPRITE_BUG_CATCHER, $2b, $5, STAY, RIGHT, $8, YOUNGSTER + $C8, $b
- object SPRITE_BLACK_HAIR_BOY_2, $2d, $10, STAY, LEFT, $9, ENGINEER + $C8, $3
- object SPRITE_BUG_CATCHER, $16, $c, STAY, UP, $a, YOUNGSTER + $C8, $c
+ object SPRITE_GAMBLER, $a, $e, STAY, DOWN, $1, OPP_GAMBLER, $1
+ object SPRITE_GAMBLER, $1a, $9, STAY, DOWN, $2, OPP_GAMBLER, $2
+ object SPRITE_BUG_CATCHER, $d, $5, STAY, LEFT, $3, OPP_YOUNGSTER, $9
+ object SPRITE_BLACK_HAIR_BOY_2, $24, $b, STAY, DOWN, $4, OPP_ENGINEER, $2
+ object SPRITE_BUG_CATCHER, $16, $4, STAY, UP, $5, OPP_YOUNGSTER, $a
+ object SPRITE_GAMBLER, $2d, $7, STAY, DOWN, $6, OPP_GAMBLER, $3
+ object SPRITE_GAMBLER, $21, $3, STAY, UP, $7, OPP_GAMBLER, $4
+ object SPRITE_BUG_CATCHER, $2b, $5, STAY, RIGHT, $8, OPP_YOUNGSTER, $b
+ object SPRITE_BLACK_HAIR_BOY_2, $2d, $10, STAY, LEFT, $9, OPP_ENGINEER, $3
+ object SPRITE_BUG_CATCHER, $16, $c, STAY, UP, $a, OPP_YOUNGSTER, $c
; warp-to
EVENT_DISP ROUTE_11_WIDTH, $8, $31 ; ROUTE_11_GATE_1F
diff --git a/data/mapObjects/route12.asm b/data/mapObjects/route12.asm
index 82c36313..8ed43ff4 100755
--- a/data/mapObjects/route12.asm
+++ b/data/mapObjects/route12.asm
@@ -13,13 +13,13 @@ Route12Object: ; 0x5869a (size=118)
db $a ; objects
object SPRITE_SNORLAX, $a, $3e, STAY, DOWN, $1 ; person
- object SPRITE_FISHER2, $e, $1f, STAY, LEFT, $2, FISHER + $C8, $3
- object SPRITE_FISHER2, $5, $27, STAY, UP, $3, FISHER + $C8, $4
- object SPRITE_BLACK_HAIR_BOY_1, $b, $5c, STAY, LEFT, $4, JR__TRAINER_M + $C8, $9
- object SPRITE_BLACK_HAIR_BOY_2, $e, $4c, STAY, UP, $5, ROCKER + $C8, $2
- object SPRITE_FISHER2, $c, $28, STAY, LEFT, $6, FISHER + $C8, $5
- object SPRITE_FISHER2, $9, $34, STAY, RIGHT, $7, FISHER + $C8, $6
- object SPRITE_FISHER2, $6, $57, STAY, DOWN, $8, FISHER + $C8, $b
+ object SPRITE_FISHER2, $e, $1f, STAY, LEFT, $2, OPP_FISHER, $3
+ object SPRITE_FISHER2, $5, $27, STAY, UP, $3, OPP_FISHER, $4
+ object SPRITE_BLACK_HAIR_BOY_1, $b, $5c, STAY, LEFT, $4, OPP_JR_TRAINER_M, $9
+ object SPRITE_BLACK_HAIR_BOY_2, $e, $4c, STAY, UP, $5, OPP_ROCKER, $2
+ object SPRITE_FISHER2, $c, $28, STAY, LEFT, $6, OPP_FISHER, $5
+ object SPRITE_FISHER2, $9, $34, STAY, RIGHT, $7, OPP_FISHER, $6
+ object SPRITE_FISHER2, $6, $57, STAY, DOWN, $8, OPP_FISHER, $b
object SPRITE_BALL, $e, $23, STAY, NONE, $9, TM_16
object SPRITE_BALL, $5, $59, STAY, NONE, $a, IRON
diff --git a/data/mapObjects/route13.asm b/data/mapObjects/route13.asm
index 3b2c6b87..e6fdf8e6 100755
--- a/data/mapObjects/route13.asm
+++ b/data/mapObjects/route13.asm
@@ -9,13 +9,13 @@ Route13Object: ; 0x5482e (size=93)
db $b, $1f, $d ; Route13Text13
db $a ; objects
- object SPRITE_BLACK_HAIR_BOY_1, $31, $a, STAY, RIGHT, $1, BIRD_KEEPER + $C8, $1
- object SPRITE_LASS, $30, $a, STAY, DOWN, $2, JR__TRAINER_F + $C8, $c
- object SPRITE_LASS, $1b, $9, STAY, DOWN, $3, JR__TRAINER_F + $C8, $d
- object SPRITE_LASS, $17, $a, STAY, LEFT, $4, JR__TRAINER_F + $C8, $e
- object SPRITE_LASS, $32, $5, STAY, DOWN, $5, JR__TRAINER_F + $C8, $f
- object SPRITE_BLACK_HAIR_BOY_1, $c, $4, STAY, RIGHT, $6, BIRD_KEEPER + $C8, $2
- object SPRITE_FOULARD_WOMAN, $21, $6, STAY, DOWN, $7, BEAUTY + $C8, $4
- object SPRITE_FOULARD_WOMAN, $20, $6, STAY, DOWN, $8, BEAUTY + $C8, $5
- object SPRITE_BIKER, $a, $7, STAY, UP, $9, BIKER + $C8, $1
- object SPRITE_BLACK_HAIR_BOY_1, $7, $d, STAY, UP, $a, BIRD_KEEPER + $C8, $3
+ object SPRITE_BLACK_HAIR_BOY_1, $31, $a, STAY, RIGHT, $1, OPP_BIRD_KEEPER, $1
+ object SPRITE_LASS, $30, $a, STAY, DOWN, $2, OPP_JR_TRAINER_F, $c
+ object SPRITE_LASS, $1b, $9, STAY, DOWN, $3, OPP_JR_TRAINER_F, $d
+ object SPRITE_LASS, $17, $a, STAY, LEFT, $4, OPP_JR_TRAINER_F, $e
+ object SPRITE_LASS, $32, $5, STAY, DOWN, $5, OPP_JR_TRAINER_F, $f
+ object SPRITE_BLACK_HAIR_BOY_1, $c, $4, STAY, RIGHT, $6, OPP_BIRD_KEEPER, $2
+ object SPRITE_FOULARD_WOMAN, $21, $6, STAY, DOWN, $7, OPP_BEAUTY, $4
+ object SPRITE_FOULARD_WOMAN, $20, $6, STAY, DOWN, $8, OPP_BEAUTY, $5
+ object SPRITE_BIKER, $a, $7, STAY, UP, $9, OPP_BIKER, $1
+ object SPRITE_BLACK_HAIR_BOY_1, $7, $d, STAY, UP, $a, OPP_BIRD_KEEPER, $3
diff --git a/data/mapObjects/route14.asm b/data/mapObjects/route14.asm
index 6b8dcd40..ce6d52b0 100755
--- a/data/mapObjects/route14.asm
+++ b/data/mapObjects/route14.asm
@@ -7,13 +7,13 @@ Route14Object: ; 0x549bb (size=87)
db $d, $11, $b ; Route14Text11
db $a ; objects
- object SPRITE_BLACK_HAIR_BOY_1, $4, $4, STAY, DOWN, $1, BIRD_KEEPER + $C8, $e
- object SPRITE_BLACK_HAIR_BOY_1, $f, $6, STAY, DOWN, $2, BIRD_KEEPER + $C8, $f
- object SPRITE_BLACK_HAIR_BOY_1, $c, $b, STAY, DOWN, $3, BIRD_KEEPER + $C8, $10
- object SPRITE_BLACK_HAIR_BOY_1, $e, $f, STAY, UP, $4, BIRD_KEEPER + $C8, $11
- object SPRITE_BLACK_HAIR_BOY_1, $f, $1f, STAY, LEFT, $5, BIRD_KEEPER + $C8, $4
- object SPRITE_BLACK_HAIR_BOY_1, $6, $31, STAY, UP, $6, BIRD_KEEPER + $C8, $5
- object SPRITE_BIKER, $5, $27, STAY, DOWN, $7, BIKER + $C8, $d
- object SPRITE_BIKER, $4, $1e, STAY, RIGHT, $8, BIKER + $C8, $e
- object SPRITE_BIKER, $f, $1e, STAY, LEFT, $9, BIKER + $C8, $f
- object SPRITE_BIKER, $4, $1f, STAY, RIGHT, $a, BIKER + $C8, $2
+ object SPRITE_BLACK_HAIR_BOY_1, $4, $4, STAY, DOWN, $1, OPP_BIRD_KEEPER, $e
+ object SPRITE_BLACK_HAIR_BOY_1, $f, $6, STAY, DOWN, $2, OPP_BIRD_KEEPER, $f
+ object SPRITE_BLACK_HAIR_BOY_1, $c, $b, STAY, DOWN, $3, OPP_BIRD_KEEPER, $10
+ object SPRITE_BLACK_HAIR_BOY_1, $e, $f, STAY, UP, $4, OPP_BIRD_KEEPER, $11
+ object SPRITE_BLACK_HAIR_BOY_1, $f, $1f, STAY, LEFT, $5, OPP_BIRD_KEEPER, $4
+ object SPRITE_BLACK_HAIR_BOY_1, $6, $31, STAY, UP, $6, OPP_BIRD_KEEPER, $5
+ object SPRITE_BIKER, $5, $27, STAY, DOWN, $7, OPP_BIKER, $d
+ object SPRITE_BIKER, $4, $1e, STAY, RIGHT, $8, OPP_BIKER, $e
+ object SPRITE_BIKER, $f, $1e, STAY, LEFT, $9, OPP_BIKER, $f
+ object SPRITE_BIKER, $4, $1f, STAY, RIGHT, $a, OPP_BIKER, $2
diff --git a/data/mapObjects/route15.asm b/data/mapObjects/route15.asm
index 32ec8d8a..e0d19e5c 100755
--- a/data/mapObjects/route15.asm
+++ b/data/mapObjects/route15.asm
@@ -11,16 +11,16 @@ Route15Object: ; 0x5894e (size=126)
db $9, $27, $c ; Route15Text12
db $b ; objects
- object SPRITE_LASS, $29, $b, STAY, DOWN, $1, JR__TRAINER_F + $C8, $14
- object SPRITE_LASS, $35, $a, STAY, LEFT, $2, JR__TRAINER_F + $C8, $15
- object SPRITE_BLACK_HAIR_BOY_1, $1f, $d, STAY, UP, $3, BIRD_KEEPER + $C8, $6
- object SPRITE_BLACK_HAIR_BOY_1, $23, $d, STAY, UP, $4, BIRD_KEEPER + $C8, $7
- object SPRITE_FOULARD_WOMAN, $35, $b, STAY, DOWN, $5, BEAUTY + $C8, $9
- object SPRITE_FOULARD_WOMAN, $29, $a, STAY, RIGHT, $6, BEAUTY + $C8, $a
- object SPRITE_BIKER, $30, $a, STAY, DOWN, $7, BIKER + $C8, $3
- object SPRITE_BIKER, $2e, $a, STAY, DOWN, $8, BIKER + $C8, $4
- object SPRITE_LASS, $25, $5, STAY, RIGHT, $9, JR__TRAINER_F + $C8, $16
- object SPRITE_LASS, $12, $d, STAY, UP, $a, JR__TRAINER_F + $C8, $17
+ object SPRITE_LASS, $29, $b, STAY, DOWN, $1, OPP_JR_TRAINER_F, $14
+ object SPRITE_LASS, $35, $a, STAY, LEFT, $2, OPP_JR_TRAINER_F, $15
+ object SPRITE_BLACK_HAIR_BOY_1, $1f, $d, STAY, UP, $3, OPP_BIRD_KEEPER, $6
+ object SPRITE_BLACK_HAIR_BOY_1, $23, $d, STAY, UP, $4, OPP_BIRD_KEEPER, $7
+ object SPRITE_FOULARD_WOMAN, $35, $b, STAY, DOWN, $5, OPP_BEAUTY, $9
+ object SPRITE_FOULARD_WOMAN, $29, $a, STAY, RIGHT, $6, OPP_BEAUTY, $a
+ object SPRITE_BIKER, $30, $a, STAY, DOWN, $7, OPP_BIKER, $3
+ object SPRITE_BIKER, $2e, $a, STAY, DOWN, $8, OPP_BIKER, $4
+ object SPRITE_LASS, $25, $5, STAY, RIGHT, $9, OPP_JR_TRAINER_F, $16
+ object SPRITE_LASS, $12, $d, STAY, UP, $a, OPP_JR_TRAINER_F, $17
object SPRITE_BALL, $12, $5, STAY, NONE, $b, TM_20
; warp-to
diff --git a/data/mapObjects/route16.asm b/data/mapObjects/route16.asm
index 94adaf96..600dbbf1 100755
--- a/data/mapObjects/route16.asm
+++ b/data/mapObjects/route16.asm
@@ -17,12 +17,12 @@ Route16Object: ; 0x58afc (size=136)
db $11, $5, $9 ; Route16Text9
db $7 ; objects
- object SPRITE_BIKER, $11, $c, STAY, LEFT, $1, BIKER + $C8, $5
- object SPRITE_BIKER, $e, $d, STAY, RIGHT, $2, CUE_BALL + $C8, $1
- object SPRITE_BIKER, $b, $c, STAY, UP, $3, CUE_BALL + $C8, $2
- object SPRITE_BIKER, $9, $b, STAY, LEFT, $4, BIKER + $C8, $6
- object SPRITE_BIKER, $6, $a, STAY, RIGHT, $5, CUE_BALL + $C8, $3
- object SPRITE_BIKER, $3, $c, STAY, RIGHT, $6, BIKER + $C8, $7
+ object SPRITE_BIKER, $11, $c, STAY, LEFT, $1, OPP_BIKER, $5
+ object SPRITE_BIKER, $e, $d, STAY, RIGHT, $2, OPP_CUE_BALL, $1
+ object SPRITE_BIKER, $b, $c, STAY, UP, $3, OPP_CUE_BALL, $2
+ object SPRITE_BIKER, $9, $b, STAY, LEFT, $4, OPP_BIKER, $6
+ object SPRITE_BIKER, $6, $a, STAY, RIGHT, $5, OPP_CUE_BALL, $3
+ object SPRITE_BIKER, $3, $c, STAY, RIGHT, $6, OPP_BIKER, $7
object SPRITE_SNORLAX, $1a, $a, STAY, DOWN, $7 ; person
; warp-to
diff --git a/data/mapObjects/route17.asm b/data/mapObjects/route17.asm
index b0f22cde..c496373e 100755
--- a/data/mapObjects/route17.asm
+++ b/data/mapObjects/route17.asm
@@ -12,13 +12,13 @@ Route17Object: ; 0x54b42 (size=102)
db $8d, $9, $10 ; Route17Text16
db $a ; objects
- object SPRITE_BIKER, $c, $13, STAY, LEFT, $1, CUE_BALL + $C8, $4
- object SPRITE_BIKER, $b, $10, STAY, RIGHT, $2, CUE_BALL + $C8, $5
- object SPRITE_BIKER, $4, $12, STAY, UP, $3, BIKER + $C8, $8
- object SPRITE_BIKER, $7, $20, STAY, LEFT, $4, BIKER + $C8, $9
- object SPRITE_BIKER, $e, $22, STAY, RIGHT, $5, BIKER + $C8, $a
- object SPRITE_BIKER, $11, $3a, STAY, LEFT, $6, CUE_BALL + $C8, $6
- object SPRITE_BIKER, $2, $44, STAY, RIGHT, $7, CUE_BALL + $C8, $7
- object SPRITE_BIKER, $e, $62, STAY, RIGHT, $8, CUE_BALL + $C8, $8
- object SPRITE_BIKER, $5, $62, STAY, LEFT, $9, BIKER + $C8, $b
- object SPRITE_BIKER, $a, $76, STAY, DOWN, $a, BIKER + $C8, $c
+ object SPRITE_BIKER, $c, $13, STAY, LEFT, $1, OPP_CUE_BALL, $4
+ object SPRITE_BIKER, $b, $10, STAY, RIGHT, $2, OPP_CUE_BALL, $5
+ object SPRITE_BIKER, $4, $12, STAY, UP, $3, OPP_BIKER, $8
+ object SPRITE_BIKER, $7, $20, STAY, LEFT, $4, OPP_BIKER, $9
+ object SPRITE_BIKER, $e, $22, STAY, RIGHT, $5, OPP_BIKER, $a
+ object SPRITE_BIKER, $11, $3a, STAY, LEFT, $6, OPP_CUE_BALL, $6
+ object SPRITE_BIKER, $2, $44, STAY, RIGHT, $7, OPP_CUE_BALL, $7
+ object SPRITE_BIKER, $e, $62, STAY, RIGHT, $8, OPP_CUE_BALL, $8
+ object SPRITE_BIKER, $5, $62, STAY, LEFT, $9, OPP_BIKER, $b
+ object SPRITE_BIKER, $a, $76, STAY, DOWN, $a, OPP_BIKER, $c
diff --git a/data/mapObjects/route18.asm b/data/mapObjects/route18.asm
index 7fd24383..88547941 100755
--- a/data/mapObjects/route18.asm
+++ b/data/mapObjects/route18.asm
@@ -12,9 +12,9 @@ Route18Object: ; 0x58c5a (size=66)
db $5, $21, $5 ; Route18Text5
db $3 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, $24, $b, STAY, RIGHT, $1, BIRD_KEEPER + $C8, $8
- object SPRITE_BLACK_HAIR_BOY_1, $28, $f, STAY, LEFT, $2, BIRD_KEEPER + $C8, $9
- object SPRITE_BLACK_HAIR_BOY_1, $2a, $d, STAY, LEFT, $3, BIRD_KEEPER + $C8, $a
+ object SPRITE_BLACK_HAIR_BOY_1, $24, $b, STAY, RIGHT, $1, OPP_BIRD_KEEPER, $8
+ object SPRITE_BLACK_HAIR_BOY_1, $28, $f, STAY, LEFT, $2, OPP_BIRD_KEEPER, $9
+ object SPRITE_BLACK_HAIR_BOY_1, $2a, $d, STAY, LEFT, $3, OPP_BIRD_KEEPER, $a
; warp-to
EVENT_DISP ROUTE_18_WIDTH, $8, $21 ; ROUTE_18_GATE_1F
diff --git a/data/mapObjects/route19.asm b/data/mapObjects/route19.asm
index f86a114a..ee55a069 100755
--- a/data/mapObjects/route19.asm
+++ b/data/mapObjects/route19.asm
@@ -17,24 +17,24 @@ ENDC
db $a ; objects
IF DEF(_OPTION_BEACH_HOUSE)
- object SPRITE_BLACK_HAIR_BOY_1, $9, $7, STAY, RIGHT, 1, SWIMMER + $C8, 2
- object SPRITE_BLACK_HAIR_BOY_1, $c, $9, STAY, LEFT, 2, SWIMMER + $C8, 3
+ object SPRITE_BLACK_HAIR_BOY_1, $9, $7, STAY, RIGHT, 1, OPP_SWIMMER, 2
+ object SPRITE_BLACK_HAIR_BOY_1, $c, $9, STAY, LEFT, 2, OPP_SWIMMER, 3
ELSE
- object SPRITE_BLACK_HAIR_BOY_1, $8, $7, STAY, LEFT, 1, SWIMMER + $C8, 2
- object SPRITE_BLACK_HAIR_BOY_1, $d, $7, STAY, LEFT, 2, SWIMMER + $C8, 3
+ object SPRITE_BLACK_HAIR_BOY_1, $8, $7, STAY, LEFT, 1, OPP_SWIMMER, 2
+ object SPRITE_BLACK_HAIR_BOY_1, $d, $7, STAY, LEFT, 2, OPP_SWIMMER, 3
ENDC
- object SPRITE_SWIMMER, $d, $19, STAY, LEFT, $3, SWIMMER + $C8, $4
- object SPRITE_SWIMMER, $4, $1b, STAY, RIGHT, $4, SWIMMER + $C8, $5
- object SPRITE_SWIMMER, $10, $1f, STAY, UP, $5, SWIMMER + $C8, $6
+ object SPRITE_SWIMMER, $d, $19, STAY, LEFT, $3, OPP_SWIMMER, $4
+ object SPRITE_SWIMMER, $4, $1b, STAY, RIGHT, $4, OPP_SWIMMER, $5
+ object SPRITE_SWIMMER, $10, $1f, STAY, UP, $5, OPP_SWIMMER, $6
IF DEF(_OPTION_BEACH_HOUSE)
- object SPRITE_SWIMMER, $9, $d, STAY, DOWN, $6, SWIMMER + $C8, $7
+ object SPRITE_SWIMMER, $9, $d, STAY, DOWN, $6, OPP_SWIMMER, $7
ELSE
- object SPRITE_SWIMMER, $9, $b, STAY, DOWN, $6, SWIMMER + $C8, $7
+ object SPRITE_SWIMMER, $9, $b, STAY, DOWN, $6, OPP_SWIMMER, $7
ENDC
- object SPRITE_SWIMMER, $8, $2b, STAY, LEFT, $7, BEAUTY + $C8, $c
- object SPRITE_SWIMMER, $b, $2b, STAY, RIGHT, $8, BEAUTY + $C8, $d
- object SPRITE_SWIMMER, $9, $2a, STAY, UP, $9, SWIMMER + $C8, $8
- object SPRITE_SWIMMER, $a, $2c, STAY, DOWN, $a, BEAUTY + $C8, $e
+ object SPRITE_SWIMMER, $8, $2b, STAY, LEFT, $7, OPP_BEAUTY, $c
+ object SPRITE_SWIMMER, $b, $2b, STAY, RIGHT, $8, OPP_BEAUTY, $d
+ object SPRITE_SWIMMER, $9, $2a, STAY, UP, $9, OPP_SWIMMER, $8
+ object SPRITE_SWIMMER, $a, $2c, STAY, DOWN, $a, OPP_BEAUTY, $e
; warp-to
IF DEF(_OPTION_BEACH_HOUSE)
diff --git a/data/mapObjects/route20.asm b/data/mapObjects/route20.asm
index 00aa4684..6939ffad 100755
--- a/data/mapObjects/route20.asm
+++ b/data/mapObjects/route20.asm
@@ -10,16 +10,16 @@ Route20Object: ; 0x50113 (size=106)
db $b, $39, $c ; Route20Text12
db $a ; objects
- object SPRITE_SWIMMER, $57, $8, STAY, UP, $1, SWIMMER + $C8, $9
- object SPRITE_SWIMMER, $44, $b, STAY, UP, $2, BEAUTY + $C8, $f
- object SPRITE_SWIMMER, $2d, $a, STAY, DOWN, $3, BEAUTY + $C8, $6
- object SPRITE_SWIMMER, $37, $e, STAY, RIGHT, $4, JR__TRAINER_F + $C8, $18
- object SPRITE_SWIMMER, $26, $d, STAY, DOWN, $5, SWIMMER + $C8, $a
- object SPRITE_SWIMMER, $57, $d, STAY, UP, $6, SWIMMER + $C8, $b
- object SPRITE_BLACK_HAIR_BOY_1, $22, $9, STAY, UP, $7, BIRD_KEEPER + $C8, $b
- object SPRITE_SWIMMER, $19, $7, STAY, UP, $8, BEAUTY + $C8, $7
- object SPRITE_SWIMMER, $18, $c, STAY, DOWN, $9, JR__TRAINER_F + $C8, $10
- object SPRITE_SWIMMER, $f, $8, STAY, UP, $a, BEAUTY + $C8, $8
+ object SPRITE_SWIMMER, $57, $8, STAY, UP, $1, OPP_SWIMMER, $9
+ object SPRITE_SWIMMER, $44, $b, STAY, UP, $2, OPP_BEAUTY, $f
+ object SPRITE_SWIMMER, $2d, $a, STAY, DOWN, $3, OPP_BEAUTY, $6
+ object SPRITE_SWIMMER, $37, $e, STAY, RIGHT, $4, OPP_JR_TRAINER_F, $18
+ object SPRITE_SWIMMER, $26, $d, STAY, DOWN, $5, OPP_SWIMMER, $a
+ object SPRITE_SWIMMER, $57, $d, STAY, UP, $6, OPP_SWIMMER, $b
+ object SPRITE_BLACK_HAIR_BOY_1, $22, $9, STAY, UP, $7, OPP_BIRD_KEEPER, $b
+ object SPRITE_SWIMMER, $19, $7, STAY, UP, $8, OPP_BEAUTY, $7
+ object SPRITE_SWIMMER, $18, $c, STAY, DOWN, $9, OPP_JR_TRAINER_F, $10
+ object SPRITE_SWIMMER, $f, $8, STAY, UP, $a, OPP_BEAUTY, $8
; warp-to
EVENT_DISP ROUTE_20_WIDTH, $5, $30 ; SEAFOAM_ISLANDS_1
diff --git a/data/mapObjects/route21.asm b/data/mapObjects/route21.asm
index 68e4c630..e98c8425 100755
--- a/data/mapObjects/route21.asm
+++ b/data/mapObjects/route21.asm
@@ -6,12 +6,12 @@ Route21Object: ; 0x55021 (size=76)
db $0 ; signs
db $9 ; objects
- object SPRITE_FISHER2, $4, $18, STAY, LEFT, $1, FISHER + $C8, $7
- object SPRITE_FISHER2, $6, $19, STAY, DOWN, $2, FISHER + $C8, $9
- object SPRITE_SWIMMER, $a, $1f, STAY, UP, $3, SWIMMER + $C8, $c
- object SPRITE_SWIMMER, $c, $1e, STAY, RIGHT, $4, CUE_BALL + $C8, $9
- object SPRITE_SWIMMER, $10, $3f, STAY, DOWN, $5, SWIMMER + $C8, $d
- object SPRITE_SWIMMER, $5, $47, STAY, RIGHT, $6, SWIMMER + $C8, $e
- object SPRITE_SWIMMER, $f, $47, STAY, LEFT, $7, SWIMMER + $C8, $f
- object SPRITE_FISHER2, $e, $38, STAY, LEFT, $8, FISHER + $C8, $8
- object SPRITE_FISHER2, $11, $39, STAY, RIGHT, $9, FISHER + $C8, $a
+ object SPRITE_FISHER2, $4, $18, STAY, LEFT, $1, OPP_FISHER, $7
+ object SPRITE_FISHER2, $6, $19, STAY, DOWN, $2, OPP_FISHER, $9
+ object SPRITE_SWIMMER, $a, $1f, STAY, UP, $3, OPP_SWIMMER, $c
+ object SPRITE_SWIMMER, $c, $1e, STAY, RIGHT, $4, OPP_CUE_BALL, $9
+ object SPRITE_SWIMMER, $10, $3f, STAY, DOWN, $5, OPP_SWIMMER, $d
+ object SPRITE_SWIMMER, $5, $47, STAY, RIGHT, $6, OPP_SWIMMER, $e
+ object SPRITE_SWIMMER, $f, $47, STAY, LEFT, $7, OPP_SWIMMER, $f
+ object SPRITE_FISHER2, $e, $38, STAY, LEFT, $8, OPP_FISHER, $8
+ object SPRITE_FISHER2, $11, $39, STAY, RIGHT, $9, OPP_FISHER, $a
diff --git a/data/mapObjects/route24.asm b/data/mapObjects/route24.asm
index 95ee726c..f8173c9d 100755
--- a/data/mapObjects/route24.asm
+++ b/data/mapObjects/route24.asm
@@ -6,11 +6,11 @@ Route24Object: ; 0x506a4 (size=67)
db $0 ; signs
db $8 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, $b, $f, STAY, LEFT, $1, ROCKET + $C8, $6
- object SPRITE_BLACK_HAIR_BOY_1, $5, $14, STAY, UP, $2, JR__TRAINER_M + $C8, $2
- object SPRITE_BLACK_HAIR_BOY_1, $b, $13, STAY, LEFT, $3, JR__TRAINER_M + $C8, $3
- object SPRITE_LASS, $a, $16, STAY, RIGHT, $4, LASS + $C8, $7
- object SPRITE_BUG_CATCHER, $b, $19, STAY, LEFT, $5, YOUNGSTER + $C8, $4
- object SPRITE_LASS, $a, $1c, STAY, RIGHT, $6, LASS + $C8, $8
- object SPRITE_BUG_CATCHER, $b, $1f, STAY, LEFT, $7, BUG_CATCHER + $C8, $9
+ object SPRITE_BLACK_HAIR_BOY_1, $b, $f, STAY, LEFT, $1, OPP_ROCKET, $6
+ object SPRITE_BLACK_HAIR_BOY_1, $5, $14, STAY, UP, $2, OPP_JR_TRAINER_M, $2
+ object SPRITE_BLACK_HAIR_BOY_1, $b, $13, STAY, LEFT, $3, OPP_JR_TRAINER_M, $3
+ object SPRITE_LASS, $a, $16, STAY, RIGHT, $4, OPP_LASS, $7
+ object SPRITE_BUG_CATCHER, $b, $19, STAY, LEFT, $5, OPP_YOUNGSTER, $4
+ object SPRITE_LASS, $a, $1c, STAY, RIGHT, $6, OPP_LASS, $8
+ object SPRITE_BUG_CATCHER, $b, $1f, STAY, LEFT, $7, OPP_BUG_CATCHER, $9
object SPRITE_BALL, $a, $5, STAY, NONE, $8, TM_45
diff --git a/data/mapObjects/route25.asm b/data/mapObjects/route25.asm
index aa9bfe74..5c6811f3 100755
--- a/data/mapObjects/route25.asm
+++ b/data/mapObjects/route25.asm
@@ -8,15 +8,15 @@ Route25Object: ; 0x507b2 (size=94)
db $3, $2b, $b ; Route25Text11
db $a ; objects
- object SPRITE_BUG_CATCHER, $e, $2, STAY, DOWN, $1, YOUNGSTER + $C8, $5
- object SPRITE_BUG_CATCHER, $12, $5, STAY, UP, $2, YOUNGSTER + $C8, $6
- object SPRITE_BLACK_HAIR_BOY_1, $18, $4, STAY, DOWN, $3, JR__TRAINER_M + $C8, $2
- object SPRITE_LASS, $12, $8, STAY, RIGHT, $4, LASS + $C8, $9
- object SPRITE_BUG_CATCHER, $20, $3, STAY, LEFT, $5, YOUNGSTER + $C8, $7
- object SPRITE_LASS, $25, $4, STAY, DOWN, $6, LASS + $C8, $a
- object SPRITE_HIKER, $8, $4, STAY, RIGHT, $7, HIKER + $C8, $2
- object SPRITE_HIKER, $17, $9, STAY, UP, $8, HIKER + $C8, $3
- object SPRITE_HIKER, $d, $7, STAY, RIGHT, $9, HIKER + $C8, $4
+ object SPRITE_BUG_CATCHER, $e, $2, STAY, DOWN, $1, OPP_YOUNGSTER, $5
+ object SPRITE_BUG_CATCHER, $12, $5, STAY, UP, $2, OPP_YOUNGSTER, $6
+ object SPRITE_BLACK_HAIR_BOY_1, $18, $4, STAY, DOWN, $3, OPP_JR_TRAINER_M, $2
+ object SPRITE_LASS, $12, $8, STAY, RIGHT, $4, OPP_LASS, $9
+ object SPRITE_BUG_CATCHER, $20, $3, STAY, LEFT, $5, OPP_YOUNGSTER, $7
+ object SPRITE_LASS, $25, $4, STAY, DOWN, $6, OPP_LASS, $a
+ object SPRITE_HIKER, $8, $4, STAY, RIGHT, $7, OPP_HIKER, $2
+ object SPRITE_HIKER, $17, $9, STAY, UP, $8, OPP_HIKER, $3
+ object SPRITE_HIKER, $d, $7, STAY, RIGHT, $9, OPP_HIKER, $4
object SPRITE_BALL, $16, $2, STAY, NONE, $a, TM_19
; warp-to
diff --git a/data/mapObjects/route3.asm b/data/mapObjects/route3.asm
index 29a6307b..a2df6925 100755
--- a/data/mapObjects/route3.asm
+++ b/data/mapObjects/route3.asm
@@ -8,11 +8,11 @@ Route3Object: ; 0x54208 (size=77)
db $9 ; objects
object SPRITE_BLACK_HAIR_BOY_2, $39, $b, STAY, NONE, $1 ; person
- object SPRITE_BUG_CATCHER, $a, $6, STAY, RIGHT, $2, BUG_CATCHER + $C8, $4
- object SPRITE_BUG_CATCHER, $e, $4, STAY, DOWN, $3, YOUNGSTER + $C8, $1
- object SPRITE_LASS, $10, $9, STAY, LEFT, $4, LASS + $C8, $1
- object SPRITE_BUG_CATCHER, $13, $5, STAY, DOWN, $5, BUG_CATCHER + $C8, $5
- object SPRITE_LASS, $17, $4, STAY, LEFT, $6, LASS + $C8, $2
- object SPRITE_BUG_CATCHER, $16, $9, STAY, LEFT, $7, YOUNGSTER + $C8, $2
- object SPRITE_BUG_CATCHER, $18, $6, STAY, RIGHT, $8, BUG_CATCHER + $C8, $6
- object SPRITE_LASS, $21, $a, STAY, UP, $9, LASS + $C8, $3
+ object SPRITE_BUG_CATCHER, $a, $6, STAY, RIGHT, $2, OPP_BUG_CATCHER, $4
+ object SPRITE_BUG_CATCHER, $e, $4, STAY, DOWN, $3, OPP_YOUNGSTER, $1
+ object SPRITE_LASS, $10, $9, STAY, LEFT, $4, OPP_LASS, $1
+ object SPRITE_BUG_CATCHER, $13, $5, STAY, DOWN, $5, OPP_BUG_CATCHER, $5
+ object SPRITE_LASS, $17, $4, STAY, LEFT, $6, OPP_LASS, $2
+ object SPRITE_BUG_CATCHER, $16, $9, STAY, LEFT, $7, OPP_YOUNGSTER, $2
+ object SPRITE_BUG_CATCHER, $18, $6, STAY, RIGHT, $8, OPP_BUG_CATCHER, $6
+ object SPRITE_LASS, $21, $a, STAY, UP, $9, OPP_LASS, $3
diff --git a/data/mapObjects/route4.asm b/data/mapObjects/route4.asm
index e91b0301..14e59684 100755
--- a/data/mapObjects/route4.asm
+++ b/data/mapObjects/route4.asm
@@ -13,7 +13,7 @@ Route4Object: ; 0x543b2 (size=58)
db $3 ; objects
object SPRITE_LASS, $9, $8, WALK, $0, $1 ; person
- object SPRITE_LASS, $3f, $3, STAY, RIGHT, $2, LASS + $C8, $4
+ object SPRITE_LASS, $3f, $3, STAY, RIGHT, $2, OPP_LASS, $4
object SPRITE_BALL, $39, $3, STAY, NONE, $3, TM_04
; warp-to
diff --git a/data/mapObjects/route6.asm b/data/mapObjects/route6.asm
index f1702acc..19ac2a8a 100755
--- a/data/mapObjects/route6.asm
+++ b/data/mapObjects/route6.asm
@@ -11,12 +11,12 @@ Route6Object: ; 0x58022 (size=87)
db $f, $13, $7 ; Route6Text7
db $6 ; objects
- object SPRITE_BLACK_HAIR_BOY_1, $a, $15, STAY, RIGHT, $1, JR__TRAINER_M + $C8, $4
- object SPRITE_LASS, $b, $15, STAY, LEFT, $2, JR__TRAINER_F + $C8, $2
- object SPRITE_BUG_CATCHER, $0, $f, STAY, RIGHT, $3, BUG_CATCHER + $C8, $a
- object SPRITE_BLACK_HAIR_BOY_1, $b, $1f, STAY, LEFT, $4, JR__TRAINER_M + $C8, $5
- object SPRITE_LASS, $b, $1e, STAY, LEFT, $5, JR__TRAINER_F + $C8, $3
- object SPRITE_BUG_CATCHER, $13, $1a, STAY, LEFT, $6, BUG_CATCHER + $C8, $b
+ object SPRITE_BLACK_HAIR_BOY_1, $a, $15, STAY, RIGHT, $1, OPP_JR_TRAINER_M, $4
+ object SPRITE_LASS, $b, $15, STAY, LEFT, $2, OPP_JR_TRAINER_F, $2
+ object SPRITE_BUG_CATCHER, $0, $f, STAY, RIGHT, $3, OPP_BUG_CATCHER, $a
+ object SPRITE_BLACK_HAIR_BOY_1, $b, $1f, STAY, LEFT, $4, OPP_JR_TRAINER_M, $5
+ object SPRITE_LASS, $b, $1e, STAY, LEFT, $5, OPP_JR_TRAINER_F, $3
+ object SPRITE_BUG_CATCHER, $13, $1a, STAY, LEFT, $6, OPP_BUG_CATCHER, $b
; warp-to
EVENT_DISP ROUTE_6_WIDTH, $1, $9 ; ROUTE_6_GATE
diff --git a/data/mapObjects/route8.asm b/data/mapObjects/route8.asm
index 2687c596..5863129b 100755
--- a/data/mapObjects/route8.asm
+++ b/data/mapObjects/route8.asm
@@ -12,15 +12,15 @@ Route8Object: ; 0x5814f (size=119)
db $3, $11, $a ; Route8Text10
db $9 ; objects
- object SPRITE_BLACK_HAIR_BOY_2, $8, $5, STAY, RIGHT, $1, SUPER_NERD + $C8, $3
- object SPRITE_GAMBLER, $d, $9, STAY, UP, $2, GAMBLER + $C8, $5
- object SPRITE_BLACK_HAIR_BOY_2, $2a, $6, STAY, UP, $3, SUPER_NERD + $C8, $4
- object SPRITE_LASS, $1a, $3, STAY, LEFT, $4, LASS + $C8, $d
- object SPRITE_BLACK_HAIR_BOY_2, $1a, $4, STAY, RIGHT, $5, SUPER_NERD + $C8, $5
- object SPRITE_LASS, $1a, $5, STAY, LEFT, $6, LASS + $C8, $e
- object SPRITE_LASS, $1a, $6, STAY, RIGHT, $7, LASS + $C8, $f
- object SPRITE_GAMBLER, $2e, $d, STAY, DOWN, $8, GAMBLER + $C8, $7
- object SPRITE_LASS, $33, $c, STAY, LEFT, $9, LASS + $C8, $10
+ object SPRITE_BLACK_HAIR_BOY_2, $8, $5, STAY, RIGHT, $1, OPP_SUPER_NERD, $3
+ object SPRITE_GAMBLER, $d, $9, STAY, UP, $2, OPP_GAMBLER, $5
+ object SPRITE_BLACK_HAIR_BOY_2, $2a, $6, STAY, UP, $3, OPP_SUPER_NERD, $4
+ object SPRITE_LASS, $1a, $3, STAY, LEFT, $4, OPP_LASS, $d
+ object SPRITE_BLACK_HAIR_BOY_2, $1a, $4, STAY, RIGHT, $5, OPP_SUPER_NERD, $5
+ object SPRITE_LASS, $1a, $5, STAY, LEFT, $6, OPP_LASS, $e
+ object SPRITE_LASS, $1a, $6, STAY, RIGHT, $7, OPP_LASS, $f
+ object SPRITE_GAMBLER, $2e, $d, STAY, DOWN, $8, OPP_GAMBLER, $7
+ object SPRITE_LASS, $33, $c, STAY, LEFT, $9, OPP_LASS, $10
; warp-to
EVENT_DISP ROUTE_8_WIDTH, $9, $1 ; ROUTE_8_GATE
diff --git a/data/mapObjects/route9.asm b/data/mapObjects/route9.asm
index 6871c73a..79d0d5ed 100755
--- a/data/mapObjects/route9.asm
+++ b/data/mapObjects/route9.asm
@@ -7,13 +7,13 @@ Route9Object: ; 0x546a8 (size=86)
db $7, $19, $b ; Route9Text11
db $a ; objects
- object SPRITE_LASS, $d, $a, STAY, LEFT, $1, JR__TRAINER_F + $C8, $5
- object SPRITE_BLACK_HAIR_BOY_1, $18, $7, STAY, LEFT, $2, JR__TRAINER_M + $C8, $7
- object SPRITE_BLACK_HAIR_BOY_1, $1f, $7, STAY, RIGHT, $3, JR__TRAINER_M + $C8, $8
- object SPRITE_LASS, $30, $8, STAY, RIGHT, $4, JR__TRAINER_F + $C8, $6
- object SPRITE_HIKER, $10, $f, STAY, LEFT, $5, HIKER + $C8, $b
- object SPRITE_HIKER, $2b, $3, STAY, LEFT, $6, HIKER + $C8, $6
- object SPRITE_BUG_CATCHER, $16, $2, STAY, DOWN, $7, BUG_CATCHER + $C8, $d
- object SPRITE_HIKER, $2d, $f, STAY, RIGHT, $8, HIKER + $C8, $5
- object SPRITE_BUG_CATCHER, $28, $8, STAY, RIGHT, $9, BUG_CATCHER + $C8, $e
+ object SPRITE_LASS, $d, $a, STAY, LEFT, $1, OPP_JR_TRAINER_F, $5
+ object SPRITE_BLACK_HAIR_BOY_1, $18, $7, STAY, LEFT, $2, OPP_JR_TRAINER_M, $7
+ object SPRITE_BLACK_HAIR_BOY_1, $1f, $7, STAY, RIGHT, $3, OPP_JR_TRAINER_M, $8
+ object SPRITE_LASS, $30, $8, STAY, RIGHT, $4, OPP_JR_TRAINER_F, $6
+ object SPRITE_HIKER, $10, $f, STAY, LEFT, $5, OPP_HIKER, $b
+ object SPRITE_HIKER, $2b, $3, STAY, LEFT, $6, OPP_HIKER, $6
+ object SPRITE_BUG_CATCHER, $16, $2, STAY, DOWN, $7, OPP_BUG_CATCHER, $d
+ object SPRITE_HIKER, $2d, $f, STAY, RIGHT, $8, OPP_HIKER, $5
+ object SPRITE_BUG_CATCHER, $28, $8, STAY, RIGHT, $9, OPP_BUG_CATCHER, $e
object SPRITE_BALL, $a, $f, STAY, NONE, $a, TM_30
diff --git a/data/mapObjects/saffrongym.asm b/data/mapObjects/saffrongym.asm
index 3e11e006..63676905 100755
--- a/data/mapObjects/saffrongym.asm
+++ b/data/mapObjects/saffrongym.asm
@@ -38,14 +38,14 @@ SaffronGymObject: ; 0x5d259 (size=330)
db $0 ; signs
db $9 ; objects
- object SPRITE_GIRL, $9, $8, STAY, DOWN, $1, SABRINA + $C8, $1
- object SPRITE_MEDIUM, $a, $1, STAY, DOWN, $2, CHANNELER + $C8, $16
- object SPRITE_BUG_CATCHER, $11, $1, STAY, DOWN, $3, PSYCHIC_TR + $C8, $1
- object SPRITE_MEDIUM, $3, $7, STAY, DOWN, $4, CHANNELER + $C8, $17
- object SPRITE_BUG_CATCHER, $11, $7, STAY, DOWN, $5, PSYCHIC_TR + $C8, $2
- object SPRITE_MEDIUM, $3, $d, STAY, DOWN, $6, CHANNELER + $C8, $18
- object SPRITE_BUG_CATCHER, $11, $d, STAY, DOWN, $7, PSYCHIC_TR + $C8, $3
- object SPRITE_BUG_CATCHER, $3, $1, STAY, DOWN, $8, PSYCHIC_TR + $C8, $4
+ object SPRITE_GIRL, $9, $8, STAY, DOWN, $1, OPP_SABRINA, $1
+ object SPRITE_MEDIUM, $a, $1, STAY, DOWN, $2, OPP_CHANNELER, $16
+ object SPRITE_BUG_CATCHER, $11, $1, STAY, DOWN, $3, OPP_PSYCHIC_TR, $1
+ object SPRITE_MEDIUM, $3, $7, STAY, DOWN, $4, OPP_CHANNELER, $17
+ object SPRITE_BUG_CATCHER, $11, $7, STAY, DOWN, $5, OPP_PSYCHIC_TR, $2
+ object SPRITE_MEDIUM, $3, $d, STAY, DOWN, $6, OPP_CHANNELER, $18
+ object SPRITE_BUG_CATCHER, $11, $d, STAY, DOWN, $7, OPP_PSYCHIC_TR, $3
+ object SPRITE_BUG_CATCHER, $3, $1, STAY, DOWN, $8, OPP_PSYCHIC_TR, $4
object SPRITE_GYM_HELPER, $a, $f, STAY, DOWN, $9 ; person
; warp-to
diff --git a/data/mapObjects/silphco10.asm b/data/mapObjects/silphco10.asm
index e48a4284..cc608e64 100755
--- a/data/mapObjects/silphco10.asm
+++ b/data/mapObjects/silphco10.asm
@@ -12,8 +12,8 @@ SilphCo10Object: ; 0x5a1fb (size=95)
db $0 ; signs
db $6 ; objects
- object SPRITE_ROCKET, $1, $9, STAY, RIGHT, $1, ROCKET + $C8, $27
- object SPRITE_OAK_AIDE, $a, $2, STAY, LEFT, $2, SCIENTIST + $C8, $b
+ object SPRITE_ROCKET, $1, $9, STAY, RIGHT, $1, OPP_ROCKET, $27
+ object SPRITE_OAK_AIDE, $a, $2, STAY, LEFT, $2, OPP_SCIENTIST, $b
object SPRITE_ERIKA, $9, $f, WALK, $0, $3 ; person
object SPRITE_BALL, $2, $c, STAY, NONE, $4, TM_26
object SPRITE_BALL, $4, $e, STAY, NONE, $5, RARE_CANDY
diff --git a/data/mapObjects/silphco11.asm b/data/mapObjects/silphco11.asm
index e1a7a568..8cba618e 100755
--- a/data/mapObjects/silphco11.asm
+++ b/data/mapObjects/silphco11.asm
@@ -12,9 +12,9 @@ SilphCo11Object: ; 0x62380 (size=72)
db $5 ; objects
object SPRITE_MR_MASTERBALL, $7, $5, STAY, DOWN, $1 ; person
object SPRITE_FOULARD_WOMAN, $a, $5, STAY, DOWN, $2 ; person
- object SPRITE_GIOVANNI, $6, $9, STAY, DOWN, $3, GIOVANNI + $C8, $2
- object SPRITE_ROCKET, $3, $10, STAY, UP, $4, ROCKET + $C8, $29
- object SPRITE_ROCKET, $f, $9, STAY, UP, $5, ROCKET + $C8, $28
+ object SPRITE_GIOVANNI, $6, $9, STAY, DOWN, $3, OPP_GIOVANNI, $2
+ object SPRITE_ROCKET, $3, $10, STAY, UP, $4, OPP_ROCKET, $29
+ object SPRITE_ROCKET, $f, $9, STAY, UP, $5, OPP_ROCKET, $28
; warp-to
EVENT_DISP SILPH_CO_11F_WIDTH, $0, $9 ; SILPH_CO_10F
diff --git a/data/mapObjects/silphco2.asm b/data/mapObjects/silphco2.asm
index cd4f8be5..44271d70 100755
--- a/data/mapObjects/silphco2.asm
+++ b/data/mapObjects/silphco2.asm
@@ -14,10 +14,10 @@ SilphCo2Object: ; 0x59e66 (size=98)
db $5 ; objects
object SPRITE_ERIKA, $a, $1, STAY, UP, $1 ; person
- object SPRITE_OAK_AIDE, $5, $c, STAY, DOWN, $2, SCIENTIST + $C8, $2
- object SPRITE_OAK_AIDE, $18, $d, STAY, LEFT, $3, SCIENTIST + $C8, $3
- object SPRITE_ROCKET, $10, $b, STAY, UP, $4, ROCKET + $C8, $17
- object SPRITE_ROCKET, $18, $7, STAY, UP, $5, ROCKET + $C8, $18
+ object SPRITE_OAK_AIDE, $5, $c, STAY, DOWN, $2, OPP_SCIENTIST, $2
+ object SPRITE_OAK_AIDE, $18, $d, STAY, LEFT, $3, OPP_SCIENTIST, $3
+ object SPRITE_ROCKET, $10, $b, STAY, UP, $4, OPP_ROCKET, $17
+ object SPRITE_ROCKET, $18, $7, STAY, UP, $5, OPP_ROCKET, $18
; warp-to
EVENT_DISP SILPH_CO_2F_WIDTH, $0, $18 ; SILPH_CO_1F
diff --git a/data/mapObjects/silphco3.asm b/data/mapObjects/silphco3.asm
index a293593a..48bb8c1a 100755
--- a/data/mapObjects/silphco3.asm
+++ b/data/mapObjects/silphco3.asm
@@ -17,8 +17,8 @@ SilphCo3Object: ; 0x5a035 (size=113)
db $4 ; objects
object SPRITE_LAPRAS_GIVER, $18, $8, STAY, NONE, $1 ; person
- object SPRITE_ROCKET, $14, $7, STAY, LEFT, $2, ROCKET + $C8, $19
- object SPRITE_OAK_AIDE, $7, $9, STAY, DOWN, $3, SCIENTIST + $C8, $4
+ object SPRITE_ROCKET, $14, $7, STAY, LEFT, $2, OPP_ROCKET, $19
+ object SPRITE_OAK_AIDE, $7, $9, STAY, DOWN, $3, OPP_SCIENTIST, $4
object SPRITE_BALL, $8, $5, STAY, NONE, $4, HYPER_POTION
; warp-to
diff --git a/data/mapObjects/silphco4.asm b/data/mapObjects/silphco4.asm
index f9974ccb..762ca7f8 100755
--- a/data/mapObjects/silphco4.asm
+++ b/data/mapObjects/silphco4.asm
@@ -14,9 +14,9 @@ SilphCo4Object: ; 0x19e35 (size=111)
db $7 ; objects
object SPRITE_LAPRAS_GIVER, $6, $2, STAY, NONE, $1 ; person
- object SPRITE_ROCKET, $9, $e, STAY, RIGHT, $2, ROCKET + $C8, $1a
- object SPRITE_OAK_AIDE, $e, $6, STAY, LEFT, $3, SCIENTIST + $C8, $5
- object SPRITE_ROCKET, $1a, $a, STAY, UP, $4, ROCKET + $C8, $1b
+ object SPRITE_ROCKET, $9, $e, STAY, RIGHT, $2, OPP_ROCKET, $1a
+ object SPRITE_OAK_AIDE, $e, $6, STAY, LEFT, $3, OPP_SCIENTIST, $5
+ object SPRITE_ROCKET, $1a, $a, STAY, UP, $4, OPP_ROCKET, $1b
object SPRITE_BALL, $3, $9, STAY, NONE, $5, FULL_HEAL
object SPRITE_BALL, $4, $7, STAY, NONE, $6, MAX_REVIVE
object SPRITE_BALL, $5, $8, STAY, NONE, $7, ESCAPE_ROPE
diff --git a/data/mapObjects/silphco5.asm b/data/mapObjects/silphco5.asm
index bb7bf68e..0c956cd3 100755
--- a/data/mapObjects/silphco5.asm
+++ b/data/mapObjects/silphco5.asm
@@ -14,10 +14,10 @@ SilphCo5Object: ; 0x1a08d (size=137)
db $b ; objects
object SPRITE_LAPRAS_GIVER, $d, $9, STAY, NONE, $1 ; person
- object SPRITE_ROCKET, $8, $10, STAY, RIGHT, $2, ROCKET + $C8, $1c
- object SPRITE_OAK_AIDE, $8, $3, STAY, RIGHT, $3, SCIENTIST + $C8, $6
- object SPRITE_ROCKER, $12, $a, STAY, UP, $4, JUGGLER + $C8, $1
- object SPRITE_ROCKET, $1c, $4, STAY, UP, $5, ROCKET + $C8, $1d
+ object SPRITE_ROCKET, $8, $10, STAY, RIGHT, $2, OPP_ROCKET, $1c
+ object SPRITE_OAK_AIDE, $8, $3, STAY, RIGHT, $3, OPP_SCIENTIST, $6
+ object SPRITE_ROCKER, $12, $a, STAY, UP, $4, OPP_JUGGLER, $1
+ object SPRITE_ROCKET, $1c, $4, STAY, UP, $5, OPP_ROCKET, $1d
object SPRITE_BALL, $2, $d, STAY, NONE, $6, TM_09
object SPRITE_BALL, $4, $6, STAY, NONE, $7, PROTEIN
object SPRITE_BALL, $15, $10, STAY, NONE, $8, CARD_KEY
diff --git a/data/mapObjects/silphco6.asm b/data/mapObjects/silphco6.asm
index c1cdebd0..66372f57 100755
--- a/data/mapObjects/silphco6.asm
+++ b/data/mapObjects/silphco6.asm
@@ -16,9 +16,9 @@ SilphCo6Object: ; 0x1a2fb (size=112)
object SPRITE_ERIKA, $15, $6, STAY, DOWN, $3 ; person
object SPRITE_ERIKA, $b, $a, STAY, RIGHT, $4 ; person
object SPRITE_LAPRAS_GIVER, $12, $d, STAY, UP, $5 ; person
- object SPRITE_ROCKET, $11, $3, STAY, RIGHT, $6, ROCKET + $C8, $1e
- object SPRITE_OAK_AIDE, $7, $8, STAY, DOWN, $7, SCIENTIST + $C8, $7
- object SPRITE_ROCKET, $e, $f, STAY, LEFT, $8, ROCKET + $C8, $1f
+ object SPRITE_ROCKET, $11, $3, STAY, RIGHT, $6, OPP_ROCKET, $1e
+ object SPRITE_OAK_AIDE, $7, $8, STAY, DOWN, $7, OPP_SCIENTIST, $7
+ object SPRITE_ROCKET, $e, $f, STAY, LEFT, $8, OPP_ROCKET, $1f
object SPRITE_BALL, $3, $c, STAY, NONE, $9, HP_UP
object SPRITE_BALL, $2, $f, STAY, NONE, $a, X_ACCURACY
diff --git a/data/mapObjects/silphco7.asm b/data/mapObjects/silphco7.asm
index 42a84faa..ef665ac0 100755
--- a/data/mapObjects/silphco7.asm
+++ b/data/mapObjects/silphco7.asm
@@ -16,10 +16,10 @@ SilphCo7Object: ; 0x51ed7 (size=128)
object SPRITE_LAPRAS_GIVER, $d, $d, STAY, UP, $2 ; person
object SPRITE_LAPRAS_GIVER, $7, $a, STAY, NONE, $3 ; person
object SPRITE_ERIKA, $a, $8, STAY, NONE, $4 ; person
- object SPRITE_ROCKET, $d, $1, STAY, DOWN, $5, ROCKET + $C8, $20
- object SPRITE_OAK_AIDE, $2, $d, STAY, DOWN, $6, SCIENTIST + $C8, $8
- object SPRITE_ROCKET, $14, $2, STAY, LEFT, $7, ROCKET + $C8, $21
- object SPRITE_ROCKET, $13, $e, STAY, RIGHT, $8, ROCKET + $C8, $22
+ object SPRITE_ROCKET, $d, $1, STAY, DOWN, $5, OPP_ROCKET, $20
+ object SPRITE_OAK_AIDE, $2, $d, STAY, DOWN, $6, OPP_SCIENTIST, $8
+ object SPRITE_ROCKET, $14, $2, STAY, LEFT, $7, OPP_ROCKET, $21
+ object SPRITE_ROCKET, $13, $e, STAY, RIGHT, $8, OPP_ROCKET, $22
object SPRITE_BLUE, $3, $7, STAY, UP, $9 ; person
object SPRITE_BALL, $1, $9, STAY, NONE, $a, CALCIUM
object SPRITE_BALL, $18, $b, STAY, NONE, $b, TM_03
diff --git a/data/mapObjects/silphco8.asm b/data/mapObjects/silphco8.asm
index 6b7541ad..a4b97a91 100755
--- a/data/mapObjects/silphco8.asm
+++ b/data/mapObjects/silphco8.asm
@@ -14,9 +14,9 @@ SilphCo8Object: ; 0x56613 (size=90)
db $4 ; objects
object SPRITE_LAPRAS_GIVER, $4, $2, STAY, NONE, $1 ; person
- object SPRITE_ROCKET, $13, $2, STAY, LEFT, $2, ROCKET + $C8, $23
- object SPRITE_OAK_AIDE, $a, $2, STAY, DOWN, $3, SCIENTIST + $C8, $9
- object SPRITE_ROCKET, $c, $f, STAY, RIGHT, $4, ROCKET + $C8, $24
+ object SPRITE_ROCKET, $13, $2, STAY, LEFT, $2, OPP_ROCKET, $23
+ object SPRITE_OAK_AIDE, $a, $2, STAY, DOWN, $3, OPP_SCIENTIST, $9
+ object SPRITE_ROCKET, $c, $f, STAY, RIGHT, $4, OPP_ROCKET, $24
; warp-to
EVENT_DISP SILPH_CO_8F_WIDTH, $0, $10 ; SILPH_CO_9F
diff --git a/data/mapObjects/silphco9.asm b/data/mapObjects/silphco9.asm
index 5fb1db79..204f0d1d 100755
--- a/data/mapObjects/silphco9.asm
+++ b/data/mapObjects/silphco9.asm
@@ -12,9 +12,9 @@ SilphCo9Object: ; 0x5d93f (size=74)
db $4 ; objects
object SPRITE_NURSE, $3, $e, STAY, DOWN, $1 ; person
- object SPRITE_ROCKET, $2, $4, STAY, UP, $2, ROCKET + $C8, $25
- object SPRITE_OAK_AIDE, $15, $d, STAY, DOWN, $3, SCIENTIST + $C8, $a
- object SPRITE_ROCKET, $d, $10, STAY, UP, $4, ROCKET + $C8, $26
+ object SPRITE_ROCKET, $2, $4, STAY, UP, $2, OPP_ROCKET, $25
+ object SPRITE_OAK_AIDE, $15, $d, STAY, DOWN, $3, OPP_SCIENTIST, $a
+ object SPRITE_ROCKET, $d, $10, STAY, UP, $4, OPP_ROCKET, $26
; warp-to
EVENT_DISP SILPH_CO_9F_WIDTH, $0, $e ; SILPH_CO_10F
diff --git a/data/mapObjects/ssanne10.asm b/data/mapObjects/ssanne10.asm
index 8001c043..c57925f1 100755
--- a/data/mapObjects/ssanne10.asm
+++ b/data/mapObjects/ssanne10.asm
@@ -16,12 +16,12 @@ SSAnne10Object: ; 0x61e75 (size=165)
db $0 ; signs
db $b ; objects
- object SPRITE_SAILOR, $0, $d, STAY, DOWN, $1, SAILOR + $C8, $3
- object SPRITE_SAILOR, $2, $b, STAY, DOWN, $2, SAILOR + $C8, $4
- object SPRITE_SAILOR, $c, $3, STAY, LEFT, $3, SAILOR + $C8, $5
- object SPRITE_SAILOR, $16, $2, STAY, DOWN, $4, SAILOR + $C8, $6
- object SPRITE_SAILOR, $0, $2, STAY, RIGHT, $5, SAILOR + $C8, $7
- object SPRITE_FISHER2, $0, $4, STAY, RIGHT, $6, FISHER + $C8, $2
+ object SPRITE_SAILOR, $0, $d, STAY, DOWN, $1, OPP_SAILOR, $3
+ object SPRITE_SAILOR, $2, $b, STAY, DOWN, $2, OPP_SAILOR, $4
+ object SPRITE_SAILOR, $c, $3, STAY, LEFT, $3, OPP_SAILOR, $5
+ object SPRITE_SAILOR, $16, $2, STAY, DOWN, $4, OPP_SAILOR, $6
+ object SPRITE_SAILOR, $0, $2, STAY, RIGHT, $5, OPP_SAILOR, $7
+ object SPRITE_FISHER2, $0, $4, STAY, RIGHT, $6, OPP_FISHER, $2
object SPRITE_BLACK_HAIR_BOY_2, $a, $d, STAY, RIGHT, $7 ; person
object SPRITE_SLOWBRO, $b, $c, STAY, NONE, $8 ; person
object SPRITE_BALL, $14, $2, STAY, NONE, $9, ETHER
diff --git a/data/mapObjects/ssanne2.asm b/data/mapObjects/ssanne2.asm
index 80e54683..9f3691cf 100755
--- a/data/mapObjects/ssanne2.asm
+++ b/data/mapObjects/ssanne2.asm
@@ -16,7 +16,7 @@ SSAnne2Object: ; 0x61514 (size=90)
db $2 ; objects
object SPRITE_WAITER, $3, $7, WALK, $1, $1 ; person
- object SPRITE_BLUE, $24, $4, STAY, DOWN, $2, SONY1 + $C8, $1
+ object SPRITE_BLUE, $24, $4, STAY, DOWN, $2, OPP_SONY1, $1
; warp-to
EVENT_DISP SS_ANNE_2_WIDTH, $b, $9 ; SS_ANNE_9
diff --git a/data/mapObjects/ssanne5.asm b/data/mapObjects/ssanne5.asm
index e8a48417..e18f1074 100755
--- a/data/mapObjects/ssanne5.asm
+++ b/data/mapObjects/ssanne5.asm
@@ -11,8 +11,8 @@ SSAnne5Object: ; 0x6172b (size=54)
object SPRITE_BLACK_HAIR_BOY_2, $5, $2, STAY, UP, $1 ; person
object SPRITE_SAILOR, $4, $9, STAY, NONE, $2 ; person
object SPRITE_BLACK_HAIR_BOY_1, $7, $b, STAY, NONE, $3 ; person
- object SPRITE_SAILOR, $4, $4, STAY, DOWN, $4, SAILOR + $C8, $1
- object SPRITE_SAILOR, $a, $8, STAY, UP, $5, SAILOR + $C8, $2
+ object SPRITE_SAILOR, $4, $4, STAY, DOWN, $4, OPP_SAILOR, $1
+ object SPRITE_SAILOR, $a, $8, STAY, UP, $5, OPP_SAILOR, $2
; warp-to
EVENT_DISP SS_ANNE_5_WIDTH, $6, $d ; SS_ANNE_3
diff --git a/data/mapObjects/ssanne8.asm b/data/mapObjects/ssanne8.asm
index e9c2aa71..992230d8 100755
--- a/data/mapObjects/ssanne8.asm
+++ b/data/mapObjects/ssanne8.asm
@@ -12,10 +12,10 @@ SSAnne8Object: ; 0x61a60 (size=127)
db $0 ; signs
db $b ; objects
- object SPRITE_GENTLEMAN, $2, $3, STAY, LEFT, $1, GENTLEMAN + $C8, $1
- object SPRITE_GENTLEMAN, $b, $4, STAY, UP, $2, GENTLEMAN + $C8, $2
- object SPRITE_BUG_CATCHER, $b, $e, STAY, UP, $3, YOUNGSTER + $C8, $8
- object SPRITE_LASS, $d, $b, STAY, LEFT, $4, LASS + $C8, $b
+ object SPRITE_GENTLEMAN, $2, $3, STAY, LEFT, $1, OPP_GENTLEMAN, $1
+ object SPRITE_GENTLEMAN, $b, $4, STAY, UP, $2, OPP_GENTLEMAN, $2
+ object SPRITE_BUG_CATCHER, $b, $e, STAY, UP, $3, OPP_YOUNGSTER, $8
+ object SPRITE_LASS, $d, $b, STAY, LEFT, $4, OPP_LASS, $b
object SPRITE_GIRL, $16, $3, WALK, $1, $5 ; person
object SPRITE_FAT_BALD_GUY, $0, $e, STAY, NONE, $6 ; person
object SPRITE_LITTLE_GIRL, $2, $b, STAY, DOWN, $7 ; person
diff --git a/data/mapObjects/ssanne9.asm b/data/mapObjects/ssanne9.asm
index a9bccafa..7fddc058 100755
--- a/data/mapObjects/ssanne9.asm
+++ b/data/mapObjects/ssanne9.asm
@@ -18,10 +18,10 @@ SSAnne9Object: ; 0x61c8d (size=188)
db $0 ; signs
db $d ; objects
- object SPRITE_GENTLEMAN, $a, $2, STAY, RIGHT, $1, GENTLEMAN + $C8, $3
- object SPRITE_FISHER2, $d, $4, STAY, LEFT, $2, FISHER + $C8, $1
- object SPRITE_GENTLEMAN, $0, $e, STAY, RIGHT, $3, GENTLEMAN + $C8, $5
- object SPRITE_LASS, $2, $b, STAY, DOWN, $4, LASS + $C8, $c
+ object SPRITE_GENTLEMAN, $a, $2, STAY, RIGHT, $1, OPP_GENTLEMAN, $3
+ object SPRITE_FISHER2, $d, $4, STAY, LEFT, $2, OPP_FISHER, $1
+ object SPRITE_GENTLEMAN, $0, $e, STAY, RIGHT, $3, OPP_GENTLEMAN, $5
+ object SPRITE_LASS, $2, $b, STAY, DOWN, $4, OPP_LASS, $c
object SPRITE_GENTLEMAN, $1, $2, STAY, DOWN, $5 ; person
object SPRITE_BALL, $c, $1, STAY, NONE, $6, MAX_ETHER
object SPRITE_GENTLEMAN, $15, $2, STAY, DOWN, $7 ; person
diff --git a/data/mapObjects/vermiliongym.asm b/data/mapObjects/vermiliongym.asm
index df3da382..892403a3 100755
--- a/data/mapObjects/vermiliongym.asm
+++ b/data/mapObjects/vermiliongym.asm
@@ -8,10 +8,10 @@ VermilionGymObject: ; 0x5cbfe (size=58)
db $0 ; signs
db $5 ; objects
- object SPRITE_ROCKER, $5, $1, STAY, DOWN, $1, LT__SURGE + $C8, $1
- object SPRITE_GENTLEMAN, $9, $6, STAY, LEFT, $2, GENTLEMAN + $C8, $3
- object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, LEFT, $3, ROCKER + $C8, $1
- object SPRITE_SAILOR, $0, $a, STAY, RIGHT, $4, SAILOR + $C8, $8
+ object SPRITE_ROCKER, $5, $1, STAY, DOWN, $1, OPP_LT_SURGE, $1
+ object SPRITE_GENTLEMAN, $9, $6, STAY, LEFT, $2, OPP_GENTLEMAN, $3
+ object SPRITE_BLACK_HAIR_BOY_2, $3, $8, STAY, LEFT, $3, OPP_ROCKER, $1
+ object SPRITE_SAILOR, $0, $a, STAY, RIGHT, $4, OPP_SAILOR, $8
object SPRITE_GYM_HELPER, $4, $e, STAY, DOWN, $5 ; person
; warp-to
diff --git a/data/mapObjects/victoryroad1.asm b/data/mapObjects/victoryroad1.asm
index 75552f36..9e66e95b 100755
--- a/data/mapObjects/victoryroad1.asm
+++ b/data/mapObjects/victoryroad1.asm
@@ -9,8 +9,8 @@ VictoryRoad1Object: ; 0x5dab8 (size=76)
db $0 ; signs
db $7 ; objects
- object SPRITE_LASS, $7, $5, STAY, RIGHT, $1, COOLTRAINER_F + $C8, $5
- object SPRITE_BLACK_HAIR_BOY_1, $3, $2, STAY, DOWN, $2, COOLTRAINER_M + $C8, $5
+ object SPRITE_LASS, $7, $5, STAY, RIGHT, $1, OPP_COOLTRAINER_F, $5
+ object SPRITE_BLACK_HAIR_BOY_1, $3, $2, STAY, DOWN, $2, OPP_COOLTRAINER_M, $5
object SPRITE_BALL, $b, $0, STAY, NONE, $3, TM_43
object SPRITE_BALL, $9, $2, STAY, NONE, $4, RARE_CANDY
object SPRITE_BOULDER, $5, $f, STAY, BOULDER_MOVEMENT_BYTE_2, $5 ; person
diff --git a/data/mapObjects/victoryroad2.asm b/data/mapObjects/victoryroad2.asm
index 3d6cd633..348cae03 100755
--- a/data/mapObjects/victoryroad2.asm
+++ b/data/mapObjects/victoryroad2.asm
@@ -13,16 +13,16 @@ VictoryRoad2Object: ; 0x51915 (size=154)
db $0 ; signs
db $d ; objects
- object SPRITE_HIKER, $c, $9, STAY, LEFT, $1, BLACKBELT + $C8, $9
- object SPRITE_BLACK_HAIR_BOY_2, $15, $d, STAY, LEFT, $2, JUGGLER + $C8, $2
- object SPRITE_BLACK_HAIR_BOY_1, $13, $8, STAY, DOWN, $3, TAMER + $C8, $5
- object SPRITE_BLACK_HAIR_BOY_2, $4, $2, STAY, DOWN, $4, POKEMANIAC + $C8, $6
- object SPRITE_BLACK_HAIR_BOY_2, $1a, $3, STAY, LEFT, $5, JUGGLER + $C8, $5
+ object SPRITE_HIKER, $c, $9, STAY, LEFT, $1, OPP_BLACKBELT, $9
+ object SPRITE_BLACK_HAIR_BOY_2, $15, $d, STAY, LEFT, $2, OPP_JUGGLER, $2
+ object SPRITE_BLACK_HAIR_BOY_1, $13, $8, STAY, DOWN, $3, OPP_TAMER, $5
+ object SPRITE_BLACK_HAIR_BOY_2, $4, $2, STAY, DOWN, $4, OPP_POKEMANIAC, $6
+ object SPRITE_BLACK_HAIR_BOY_2, $1a, $3, STAY, LEFT, $5, OPP_JUGGLER, $5
object SPRITE_BIRD, $b, $5, STAY, UP, $6, MOLTRES, 50
object SPRITE_BALL, $1b, $5, STAY, NONE, $7, TM_17
object SPRITE_BALL, $12, $9, STAY, NONE, $8, FULL_HEAL
object SPRITE_BALL, $9, $b, STAY, NONE, $9, TM_05
- object SPRITE_BALL, $b, $0, STAY, NONE, $a, GUARD_SPEC_
+ object SPRITE_BALL, $b, $0, STAY, NONE, $a, GUARD_SPEC
object SPRITE_BOULDER, $4, $e, STAY, BOULDER_MOVEMENT_BYTE_2, $b ; person
object SPRITE_BOULDER, $5, $5, STAY, BOULDER_MOVEMENT_BYTE_2, $c ; person
object SPRITE_BOULDER, $17, $10, STAY, BOULDER_MOVEMENT_BYTE_2, $d ; person
diff --git a/data/mapObjects/victoryroad3.asm b/data/mapObjects/victoryroad3.asm
index 843b388f..19a06c65 100755
--- a/data/mapObjects/victoryroad3.asm
+++ b/data/mapObjects/victoryroad3.asm
@@ -10,10 +10,10 @@ VictoryRoad3Object: ; 0x44acd (size=106)
db $0 ; signs
db $a ; objects
- object SPRITE_BLACK_HAIR_BOY_1, $1c, $5, STAY, LEFT, $1, COOLTRAINER_M + $C8, $2
- object SPRITE_LASS, $7, $d, STAY, RIGHT, $2, COOLTRAINER_F + $C8, $2
- object SPRITE_BLACK_HAIR_BOY_1, $6, $e, STAY, LEFT, $3, COOLTRAINER_M + $C8, $3
- object SPRITE_LASS, $d, $3, STAY, RIGHT, $4, COOLTRAINER_F + $C8, $3
+ object SPRITE_BLACK_HAIR_BOY_1, $1c, $5, STAY, LEFT, $1, OPP_COOLTRAINER_M, $2
+ object SPRITE_LASS, $7, $d, STAY, RIGHT, $2, OPP_COOLTRAINER_F, $2
+ object SPRITE_BLACK_HAIR_BOY_1, $6, $e, STAY, LEFT, $3, OPP_COOLTRAINER_M, $3
+ object SPRITE_LASS, $d, $3, STAY, RIGHT, $4, OPP_COOLTRAINER_F, $3
object SPRITE_BALL, $1a, $5, STAY, NONE, $5, MAX_REVIVE
object SPRITE_BALL, $7, $7, STAY, NONE, $6, TM_47
object SPRITE_BOULDER, $16, $3, STAY, BOULDER_MOVEMENT_BYTE_2, $7 ; person
diff --git a/data/mapObjects/viridianforest.asm b/data/mapObjects/viridianforest.asm
index 1ae1d1e2..a1d52cfe 100755
--- a/data/mapObjects/viridianforest.asm
+++ b/data/mapObjects/viridianforest.asm
@@ -19,9 +19,9 @@ ViridianForestObject: ; 0x611da (size=127)
db $8 ; objects
object SPRITE_BUG_CATCHER, $10, $2b, STAY, NONE, $1 ; person
- object SPRITE_BUG_CATCHER, $1e, $21, STAY, LEFT, $2, BUG_CATCHER + $C8, $1
- object SPRITE_BUG_CATCHER, $1e, $13, STAY, LEFT, $3, BUG_CATCHER + $C8, $2
- object SPRITE_BUG_CATCHER, $2, $12, STAY, LEFT, $4, BUG_CATCHER + $C8, $3
+ object SPRITE_BUG_CATCHER, $1e, $21, STAY, LEFT, $2, OPP_BUG_CATCHER, $1
+ object SPRITE_BUG_CATCHER, $1e, $13, STAY, LEFT, $3, OPP_BUG_CATCHER, $2
+ object SPRITE_BUG_CATCHER, $2, $12, STAY, LEFT, $4, OPP_BUG_CATCHER, $3
object SPRITE_BALL, $19, $b, STAY, NONE, $5, ANTIDOTE
object SPRITE_BALL, $c, $1d, STAY, NONE, $6, POTION
object SPRITE_BALL, $1, $1f, STAY, NONE, $7, POKE_BALL
diff --git a/data/mapObjects/viridiangym.asm b/data/mapObjects/viridiangym.asm
index fb81788d..468b9022 100755
--- a/data/mapObjects/viridiangym.asm
+++ b/data/mapObjects/viridiangym.asm
@@ -8,15 +8,15 @@ ViridianGymObject: ; 0x74bde (size=105)
db $0 ; signs
db $b ; objects
- object SPRITE_GIOVANNI, $2, $1, STAY, DOWN, $1, GIOVANNI + $C8, $3
- object SPRITE_BLACK_HAIR_BOY_1, $c, $7, STAY, DOWN, $2, COOLTRAINER_M + $C8, $9
- object SPRITE_HIKER, $b, $b, STAY, UP, $3, BLACKBELT + $C8, $6
- object SPRITE_ROCKER, $a, $7, STAY, DOWN, $4, TAMER + $C8, $3
- object SPRITE_HIKER, $3, $7, STAY, LEFT, $5, BLACKBELT + $C8, $7
- object SPRITE_BLACK_HAIR_BOY_1, $d, $5, STAY, RIGHT, $6, COOLTRAINER_M + $C8, $a
- object SPRITE_HIKER, $a, $1, STAY, DOWN, $7, BLACKBELT + $C8, $8
- object SPRITE_ROCKER, $2, $10, STAY, RIGHT, $8, TAMER + $C8, $4
- object SPRITE_BLACK_HAIR_BOY_1, $6, $5, STAY, DOWN, $9, COOLTRAINER_M + $C8, $1
+ object SPRITE_GIOVANNI, $2, $1, STAY, DOWN, $1, OPP_GIOVANNI, $3
+ object SPRITE_BLACK_HAIR_BOY_1, $c, $7, STAY, DOWN, $2, OPP_COOLTRAINER_M, $9
+ object SPRITE_HIKER, $b, $b, STAY, UP, $3, OPP_BLACKBELT, $6
+ object SPRITE_ROCKER, $a, $7, STAY, DOWN, $4, OPP_TAMER, $3
+ object SPRITE_HIKER, $3, $7, STAY, LEFT, $5, OPP_BLACKBELT, $7
+ object SPRITE_BLACK_HAIR_BOY_1, $d, $5, STAY, RIGHT, $6, OPP_COOLTRAINER_M, $a
+ object SPRITE_HIKER, $a, $1, STAY, DOWN, $7, OPP_BLACKBELT, $8
+ object SPRITE_ROCKER, $2, $10, STAY, RIGHT, $8, OPP_TAMER, $4
+ object SPRITE_BLACK_HAIR_BOY_1, $6, $5, STAY, DOWN, $9, OPP_COOLTRAINER_M, $1
object SPRITE_GYM_HELPER, $10, $f, STAY, DOWN, $a ; person
object SPRITE_BALL, $10, $9, STAY, NONE, $b, REVIVE
diff --git a/data/mart_inventories.asm b/data/mart_inventories.asm
index 4389a1a3..85f7459a 100755
--- a/data/mart_inventories.asm
+++ b/data/mart_inventories.asm
@@ -44,7 +44,7 @@ CeladonMart4Text1:: ; 248e (0:248e)
; Celadon Dept. Store 5F (1)
CeladonMart5Text3:: ; 2496 (0:2496)
- db $FE,7,X_ACCURACY,GUARD_SPEC_,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED
+ db $FE,7,X_ACCURACY,GUARD_SPEC,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED
db X_SPECIAL,$FF
; Celadon Dept. Store 5F (2)
diff --git a/data/mon_palettes.asm b/data/mon_palettes.asm
index f6763d7d..8a8aecdb 100755
--- a/data/mon_palettes.asm
+++ b/data/mon_palettes.asm
@@ -82,7 +82,7 @@ MonsterPalettes: ; 725c8 (1c:65c8)
db PAL_PINKMON ; SLOWBRO
db PAL_GREYMON ; MAGNEMITE
db PAL_GREYMON ; MAGNETON
- db PAL_BROWNMON ; FARFETCH_D
+ db PAL_BROWNMON ; FARFETCHD
db PAL_BROWNMON ; DODUO
db PAL_BROWNMON ; DODRIO
db PAL_BLUEMON ; SEEL
diff --git a/data/moves.asm b/data/moves.asm
index 22165b7d..44859681 100755
--- a/data/moves.asm
+++ b/data/moves.asm
@@ -11,6 +11,7 @@ move: macro
endm
move POUND, NO_ADDITIONAL_EFFECT, 40, NORMAL, 100, 35
+MoveEnd:
move KARATE_CHOP, NO_ADDITIONAL_EFFECT, 50, NORMAL, 100, 25
move DOUBLESLAP, TWO_TO_FIVE_ATTACKS_EFFECT, 15, NORMAL, 85, 10
move COMET_PUNCH, TWO_TO_FIVE_ATTACKS_EFFECT, 18, NORMAL, 85, 15
diff --git a/data/pokedex_order.asm b/data/pokedex_order.asm
index 46a1717a..3bd6a15b 100755
--- a/data/pokedex_order.asm
+++ b/data/pokedex_order.asm
@@ -62,7 +62,7 @@ PokedexOrder: ; 41024 (10:5024)
db 0 ; MISSINGNO.
db 0 ; MISSINGNO.
db 0 ; MISSINGNO.
- db DEX_FARFETCH_D
+ db DEX_FARFETCHD
db DEX_VENONAT
db DEX_DRAGONITE
db 0 ; MISSINGNO.
diff --git a/data/sgb_packets.asm b/data/sgb_packets.asm
index 3e5e3f0b..f810db8f 100755
--- a/data/sgb_packets.asm
+++ b/data/sgb_packets.asm
@@ -60,11 +60,11 @@ BlkPacket_WholeScreen: ; 7219e (1c:619e)
BlkPacket_Battle: ; 721b5 (1c:61b5)
ATTR_BLK 5
- ATTR_BLK_DATA %111, 2,2,0, 00,12, 19,17
- ATTR_BLK_DATA %011, 1,1,0, 01,00, 10,03
- ATTR_BLK_DATA %011, 0,0,0, 10,07, 19,10
- ATTR_BLK_DATA %011, 2,2,0, 00,04, 08,11
- ATTR_BLK_DATA %011, 3,3,0, 11,00, 19,06
+ ATTR_BLK_DATA %111, 2,2,0, 00,12, 19,17 ; message box: pal 2
+ ATTR_BLK_DATA %011, 1,1,0, 01,00, 10,03 ; enemy HP bar: pal 1
+ ATTR_BLK_DATA %011, 0,0,0, 10,07, 19,10 ; player HP bar: pal 0
+ ATTR_BLK_DATA %011, 2,2,0, 00,04, 08,11 ; player mon: pal 2
+ ATTR_BLK_DATA %011, 3,3,0, 11,00, 19,06 ; enemy mon : pal 3
db $03,$00,$00,$13,$0b,$00
db $03,$00,$0c,$13,$11,$02
@@ -76,7 +76,7 @@ BlkPacket_Battle: ; 721b5 (1c:61b5)
BlkPacket_StatusScreen: ; 721fa (1c:61fa)
ATTR_BLK 1
- ATTR_BLK_DATA %111, 1,1,0, 01,00, 07,06
+ ATTR_BLK_DATA %111, 1,1,0, 01,00, 07,06 ; mon: pal 1, HP bar: pal 0
ds 8
db $02,$00,$00,$11,$00,$03
@@ -86,7 +86,7 @@ BlkPacket_StatusScreen: ; 721fa (1c:61fa)
BlkPacket_Pokedex: ; 72222 (1c:6222)
ATTR_BLK 1
- ATTR_BLK_DATA %111, 1,1,0, 01,01, 08,08
+ ATTR_BLK_DATA %111, 1,1,0, 01,01, 08,08 ; mon: pal 1, everything else: pal 0
ds 8
db $02,$00,$00,$11,$00,$01
@@ -97,11 +97,11 @@ BlkPacket_Pokedex: ; 72222 (1c:6222)
BlkPacket_Slots: ; 7224f (1c:624f)
ATTR_BLK 5
- ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,11
- ATTR_BLK_DATA %011, 2,2,0, 00,04, 19,09
- ATTR_BLK_DATA %010, 3,3,0, 00,06, 19,07
- ATTR_BLK_DATA %011, 0,0,0, 04,04, 15,09
- ATTR_BLK_DATA %011, 0,0,0, 00,12, 19,17
+ ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,11 ; "3" rows and top of screen: pal 1
+ ATTR_BLK_DATA %011, 2,2,0, 00,04, 19,09 ; "2" rows: pal 2
+ ATTR_BLK_DATA %010, 3,3,0, 00,06, 19,07 ; "1" row: pal 3
+ ATTR_BLK_DATA %011, 0,0,0, 04,04, 15,09 ; slot reels: pal 0
+ ATTR_BLK_DATA %011, 0,0,0, 00,12, 19,17 ; message box: pal 0
db $03,$00,$00,$13,$0b,$01
db $03,$00,$04,$13,$09,$02
@@ -112,9 +112,9 @@ BlkPacket_Slots: ; 7224f (1c:624f)
BlkPacket_Titlescreen: ; 7228e (1c:628e)
ATTR_BLK 3
- ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,07
- ATTR_BLK_DATA %010, 1,1,0, 00,08, 19,09
- ATTR_BLK_DATA %011, 2,2,0, 00,10, 19,17
+ ATTR_BLK_DATA %011, 0,0,0, 00,00, 19,07 ; pokemon logo: pal 0
+ ATTR_BLK_DATA %010, 1,1,0, 00,08, 19,09 ; version text: pal 1
+ ATTR_BLK_DATA %011, 2,2,0, 00,10, 19,17 ; player, mon, copyright text: pal 2
ds 12
db $03,$00,$00,$13,$07,$00
@@ -124,9 +124,9 @@ BlkPacket_Titlescreen: ; 7228e (1c:628e)
BlkPacket_NidorinoIntro: ; 722c1 (1c:62c1)
ATTR_BLK 3
- ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,03
- ATTR_BLK_DATA %011, 0,0,0, 00,04, 19,13
- ATTR_BLK_DATA %011, 1,1,0, 00,14, 19,17
+ ATTR_BLK_DATA %011, 1,1,0, 00,00, 19,03 ; upper black bar: pal 1
+ ATTR_BLK_DATA %011, 0,0,0, 00,04, 19,13 ; letterbox: pal 0
+ ATTR_BLK_DATA %011, 1,1,0, 00,14, 19,17 ; lower black bar: pal 1
ds 12
db $03,$00,$00,$13,$03,$01
@@ -136,13 +136,13 @@ BlkPacket_NidorinoIntro: ; 722c1 (1c:62c1)
BlkPacket_PartyMenu: ; 722f4 (1c:62f4)
ATTR_BLK 7
- ATTR_BLK_DATA %110, 0,0,1, 01,00, 02,12
- ATTR_BLK_DATA %010, 0,0,0, 05,01, 11,01
- ATTR_BLK_DATA %010, 0,0,0, 05,03, 11,03
- ATTR_BLK_DATA %010, 0,0,0, 05,05, 11,05
- ATTR_BLK_DATA %010, 0,0,0, 05,07, 11,07
- ATTR_BLK_DATA %010, 0,0,0, 05,09, 11,09
- ATTR_BLK_DATA %010, 0,0,0, 05,11, 11,11
+ ATTR_BLK_DATA %110, 0,0,1, 01,00, 02,12 ; mon sprites: pal 0, everything else: pal 1
+ ATTR_BLK_DATA %010, 0,0,0, 05,01, 11,01 ; HP bar 0: pal set dynamically
+ ATTR_BLK_DATA %010, 0,0,0, 05,03, 11,03 ; HP bar 1: pal set dynamically
+ ATTR_BLK_DATA %010, 0,0,0, 05,05, 11,05 ; HP bar 2: pal set dynamically
+ ATTR_BLK_DATA %010, 0,0,0, 05,07, 11,07 ; HP bar 3: pal set dynamically
+ ATTR_BLK_DATA %010, 0,0,0, 05,09, 11,09 ; HP bar 4: pal set dynamically
+ ATTR_BLK_DATA %010, 0,0,0, 05,11, 11,11 ; HP bar 5: pal set dynamically
ds 4
db $02,$00,$00,$11,$01,$03
@@ -158,16 +158,16 @@ BlkPacket_PartyMenu: ; 722f4 (1c:62f4)
BlkPacket_TrainerCard: ; 72360 (1c:6360)
ATTR_BLK 10
- ATTR_BLK_DATA %010, 0,0,0, 03,12, 04,13
- ATTR_BLK_DATA %010, 1,1,0, 07,12, 08,13
- ATTR_BLK_DATA %010, 3,3,0, 11,12, 12,13
- ATTR_BLK_DATA %010, 2,2,0, 16,11, 17,12
- ATTR_BLK_DATA %010, 1,1,0, 14,13, 15,14
- ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,14
- ATTR_BLK_DATA %010, 2,2,0, 03,15, 04,16
- ATTR_BLK_DATA %010, 3,3,0, 07,15, 08,16
- ATTR_BLK_DATA %010, 2,2,0, 11,15, 12,16
- ATTR_BLK_DATA %010, 1,1,0, 15,15, 16,16
+ ATTR_BLK_DATA %010, 0,0,0, 03,12, 04,13 ; Boulder Badge
+ ATTR_BLK_DATA %010, 1,1,0, 07,12, 08,13 ; Cascade Badge
+ ATTR_BLK_DATA %010, 3,3,0, 11,12, 12,13 ; Thunder Badge
+ ATTR_BLK_DATA %010, 2,2,0, 16,11, 17,12 ; Rainbow Badge
+ ATTR_BLK_DATA %010, 1,1,0, 14,13, 15,14 ; Rainbow Badge
+ ATTR_BLK_DATA %010, 3,3,0, 16,13, 17,14 ; Rainbow Badge
+ ATTR_BLK_DATA %010, 2,2,0, 03,15, 04,16 ; Soul Badge
+ ATTR_BLK_DATA %010, 3,3,0, 07,15, 08,16 ; Marsh Badge
+ ATTR_BLK_DATA %010, 2,2,0, 11,15, 12,16 ; Volcano Badge
+ ATTR_BLK_DATA %010, 1,1,0, 15,15, 16,16 ; Earth Badge
ds 2
db $03,$03,$0c,$04,$0d,$00
@@ -184,9 +184,9 @@ BlkPacket_TrainerCard: ; 72360 (1c:6360)
BlkPacket_GameFreakIntro: ; 723dd (1c:63dd)
ATTR_BLK 3
- ATTR_BLK_DATA %111, 1,1,0, 05,11, 07,13
- ATTR_BLK_DATA %010, 2,2,0, 08,11, 09,13
- ATTR_BLK_DATA %011, 3,3,0, 12,11, 14,13
+ ATTR_BLK_DATA %111, 1,1,0, 05,11, 07,13 ; falling stars (left): pal 1, GameFreak logo: pal 0
+ ATTR_BLK_DATA %010, 2,2,0, 08,11, 09,13 ; falling stars (middle): pal 2
+ ATTR_BLK_DATA %011, 3,3,0, 12,11, 14,13 ; falling stars (right): pal 3
ds 12
db $03,$00,$00,$13,$0a,$00
diff --git a/data/trades.asm b/data/trades.asm
index b761fecf..274b0297 100755
--- a/data/trades.asm
+++ b/data/trades.asm
@@ -1,25 +1,25 @@
TradeMons: ; 71b7b (1c:5b7b)
; givemonster, getmonster, textstring, nickname (11 bytes), 14 bytes total
IF DEF(_YELLOW)
- db LICKITUNG, DUGTRIO, 0,"GURIO@@@@@@"
- db CLEFAIRY, MR_MIME, 0,"MILES@@@@@@"
- db BUTTERFREE,BEEDRILL, 2,"STINGER@@@@"
- db KANGASKHAN,MUK, 0,"STICKY@@@@@"
- db MEW, MEW, 2,"BART@@@@@@@"
- db TANGELA, PARASECT, 0,"SPIKE@@@@@@"
- db PIDGEOT, PIDGEOT, 1,"MARTY@@@@@@"
- db GOLDUCK, RHYDON, 1,"BUFFY@@@@@@"
- db GROWLITHE, DEWGONG, 2,"CEZANNE@@@@"
- db CUBONE, MACHOKE, 2,"RICKY@@@@@@"
+ db LICKITUNG, DUGTRIO, 0,"GURIO@@@@@@"
+ db CLEFAIRY, MR_MIME, 0,"MILES@@@@@@"
+ db BUTTERFREE,BEEDRILL, 2,"STINGER@@@@"
+ db KANGASKHAN,MUK, 0,"STICKY@@@@@"
+ db MEW, MEW, 2,"BART@@@@@@@"
+ db TANGELA, PARASECT, 0,"SPIKE@@@@@@"
+ db PIDGEOT, PIDGEOT, 1,"MARTY@@@@@@"
+ db GOLDUCK, RHYDON, 1,"BUFFY@@@@@@"
+ db GROWLITHE, DEWGONG, 2,"CEZANNE@@@@"
+ db CUBONE, MACHOKE, 2,"RICKY@@@@@@"
ELSE
- db NIDORINO, NIDORINA, 0,"TERRY@@@@@@"
- db ABRA, MR_MIME, 0,"MARCEL@@@@@"
- db BUTTERFREE,BEEDRILL, 2,"CHIKUCHIKU@"
- db PONYTA, SEEL, 0,"SAILOR@@@@@"
- db SPEAROW, FARFETCH_D,2,"DUX@@@@@@@@"
- db SLOWBRO, LICKITUNG, 0,"MARC@@@@@@@"
- db POLIWHIRL, JYNX, 1,"LOLA@@@@@@@"
- db RAICHU, ELECTRODE, 1,"DORIS@@@@@@"
- db VENONAT, TANGELA, 2,"CRINKLES@@@"
- db NIDORAN_M, NIDORAN_F, 2,"SPOT@@@@@@@"
+ db NIDORINO, NIDORINA, 0,"TERRY@@@@@@"
+ db ABRA, MR_MIME, 0,"MARCEL@@@@@"
+ db BUTTERFREE,BEEDRILL, 2,"CHIKUCHIKU@"
+ db PONYTA, SEEL, 0,"SAILOR@@@@@"
+ db SPEAROW, FARFETCHD,2,"DUX@@@@@@@@"
+ db SLOWBRO, LICKITUNG,0,"MARC@@@@@@@"
+ db POLIWHIRL, JYNX, 1,"LOLA@@@@@@@"
+ db RAICHU, ELECTRODE,1,"DORIS@@@@@@"
+ db VENONAT, TANGELA, 2,"CRINKLES@@@"
+ db NIDORAN_M, NIDORAN_F,2,"SPOT@@@@@@@"
ENDC
diff --git a/data/trainer_moves.asm b/data/trainer_moves.asm
index 432f0fed..518dab42 100755
--- a/data/trainer_moves.asm
+++ b/data/trainer_moves.asm
@@ -1,8 +1,8 @@
IF !DEF(YELLOW)
LoneMoves: ; 39d22 (e:5d22)
; these are used for gym leaders.
-; this is not automatic! you have to write the number you want to W_LONEATTACKNO
-; first. e.g., erika's script writes 4 to W_LONEATTACKNO to get mega drain,
+; this is not automatic! you have to write the number you want to wLoneAttackNo
+; first. e.g., erika's script writes 4 to wLoneAttackNo to get mega drain,
; the fourth entry in the list.
; first byte: pokemon in the trainer's party that gets the move
@@ -58,7 +58,7 @@ TeamMoves:
db 2,4,BUBBLEBEAM
db 0
- db LT__SURGE,$1
+ db LT_SURGE,$1
db 1,1,THUNDERBOLT
db 1,2,MEGA_PUNCH
db 1,3,MEGA_KICK
diff --git a/data/trainer_parties.asm b/data/trainer_parties.asm
index b121efc0..321e565c 100755
--- a/data/trainer_parties.asm
+++ b/data/trainer_parties.asm
@@ -1,14 +1,51 @@
TrainerDataPointers: ; 39d3b (e:5d3b)
- dw YoungsterData,BugCatcherData,LassData,SailorData,JrTrainerMData
- dw JrTrainerFData,PokemaniacData,SuperNerdData,HikerData,BikerData
- dw BurglarData,EngineerData,Juggler1Data,FisherData,SwimmerData
- dw CueBallData,GamblerData,BeautyData,PsychicData,RockerData
- dw JugglerData,TamerData,BirdKeeperData,BlackbeltData,Green1Data
- dw ProfOakData,ChiefData,ScientistData,GiovanniData,RocketData
- dw CooltrainerMData,CooltrainerFData,BrunoData,BrockData,MistyData
- dw LtSurgeData,ErikaData,KogaData,BlaineData,SabrinaData
- dw GentlemanData,Green2Data,Green3Data,LoreleiData,ChannelerData
- dw AgathaData,LanceData
+ dw YoungsterData
+ dw BugCatcherData
+ dw LassData
+ dw SailorData
+ dw JrTrainerMData
+ dw JrTrainerFData
+ dw PokemaniacData
+ dw SuperNerdData
+ dw HikerData
+ dw BikerData
+ dw BurglarData
+ dw EngineerData
+ dw Juggler1Data
+ dw FisherData
+ dw SwimmerData
+ dw CueBallData
+ dw GamblerData
+ dw BeautyData
+ dw PsychicData
+ dw RockerData
+ dw JugglerData
+ dw TamerData
+ dw BirdKeeperData
+ dw BlackbeltData
+ dw Green1Data
+ dw ProfOakData
+ dw ChiefData
+ dw ScientistData
+ dw GiovanniData
+ dw RocketData
+ dw CooltrainerMData
+ dw CooltrainerFData
+ dw BrunoData
+ dw BrockData
+ dw MistyData
+ dw LtSurgeData
+ dw ErikaData
+ dw KogaData
+ dw BlaineData
+ dw SabrinaData
+ dw GentlemanData
+ dw Green2Data
+ dw Green3Data
+ dw LoreleiData
+ dw ChannelerData
+ dw AgathaData
+ dw LanceData
; if first byte != FF, then
; first byte is level (of all pokemon on this team)
@@ -19,7 +56,7 @@ TrainerDataPointers: ; 39d3b (e:5d3b)
; every next two bytes are a level and species
; null-terminated
-YoungsterData: ; 39d99 (e:5d99)
+YoungsterData:
db 11,RATTATA,EKANS,0
db 14,SPEAROW,0
db 10,RATTATA,RATTATA,ZUBAT,0
@@ -33,19 +70,10 @@ YoungsterData: ; 39d99 (e:5d99)
db 17,RATTATA,RATTATA,RATICATE,0
db 18,NIDORAN_M,NIDORINO,0
db 17,SPEAROW,RATTATA,RATTATA,SPEAROW,0
-if DEF(_YELLOW)
- db 24,SANDSHREW,0
-endc
-BugCatcherData: ; 39dce (e:5dce)
-if DEF(_YELLOW)
- db 7,CATERPIE,CATERPIE,0
- db 6,METAPOD,CATERPIE,METAPOD,0
- db 10,CATERPIE,0
-else
+BugCatcherData:
db 6,WEEDLE,CATERPIE,0
db 7,WEEDLE,KAKUNA,WEEDLE,0
db 9,WEEDLE,0
-endc
db 10,CATERPIE,WEEDLE,CATERPIE,0
db 9,WEEDLE,KAKUNA,CATERPIE,METAPOD,0
db 11,CATERPIE,METAPOD,0
@@ -57,10 +85,7 @@ endc
db 18,METAPOD,CATERPIE,VENONAT,0
db 19,BEEDRILL,BEEDRILL,0
db 20,CATERPIE,WEEDLE,VENONAT,0
-if DEF(_YELLOW)
- db 8,CATERPIE,METAPOD,0
-endc
-LassData: ; 39e0c (e:5e0c)
+LassData:
db 9,PIDGEY,PIDGEY,0
db 10,RATTATA,NIDORAN_M,0
db 14,JIGGLYPUFF,0
@@ -72,25 +97,14 @@ LassData: ; 39e0c (e:5e0c)
db 15,NIDORAN_M,NIDORAN_F,0
db 13,ODDISH,PIDGEY,ODDISH,0
db 18,PIDGEY,NIDORAN_F,0
-if DEF(_YELLOW)
- db 20,JIGGLYPUFF,0
-else
db 18,RATTATA,PIKACHU,0
-endc
db 23,NIDORAN_F,NIDORINA,0
db 24,MEOWTH,MEOWTH,MEOWTH,0
-if DEF(_YELLOW)
- db 19,PIDGEY,RATTATA,NIDORAN_F,MEOWTH,NIDORAN_M,0
-else
db 19,PIDGEY,RATTATA,NIDORAN_M,MEOWTH,PIKACHU,0
-endc
db 22,CLEFAIRY,CLEFAIRY,0
db 23,BELLSPROUT,WEEPINBELL,0
db 23,ODDISH,GLOOM,0
-if DEF(_YELLOW)
- db 6,NIDORAN_F,NIDORAN_M,0
-endc
-SailorData: ; 39e58 (e:5e58)
+SailorData:
db 18,MACHOP,SHELLDER,0
db 17,MACHOP,TENTACOOL,0
db 21,SHELLDER,0
@@ -98,17 +112,9 @@ SailorData: ; 39e58 (e:5e58)
db 18,TENTACOOL,STARYU,0
db 17,HORSEA,HORSEA,HORSEA,0
db 20,MACHOP,0
-if DEF(_YELLOW)
- db 24,MAGNEMITE,0
-else
db 21,PIKACHU,PIKACHU,0
-endc
-JrTrainerMData: ; 39e78 (e:5e78)
-if DEF(_YELLOW)
- db 9,DIGLETT,SANDSHREW,0
-else
+JrTrainerMData:
db 11,DIGLETT,SANDSHREW,0
-endc
db 14,RATTATA,EKANS,0
db 18,MANKEY,0
db 20,SQUIRTLE,0
@@ -117,34 +123,19 @@ endc
db 21,GROWLITHE,CHARMANDER,0
db 19,RATTATA,DIGLETT,EKANS,SANDSHREW,0
db 29,NIDORAN_M,NIDORINO,0
-if DEF(_YELLOW)
- db 16,WEEPINBELL,0
-endc
-JrTrainerFData: ; 39e9d (e:5e9d)
+JrTrainerFData:
db 19,GOLDEEN,0
-if DEF(_YELLOW)
- db 16,ODDISH,BELLSPROUT,0
-else
db 16,RATTATA,PIKACHU,0
-endc
db 16,PIDGEY,PIDGEY,PIDGEY,0
db 22,BULBASAUR,0
db 18,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0
db 23,MEOWTH,0
-if DEF(_YELLOW)
- db 20,JIGGLYPUFF,CLEFAIRY,0
-else
db 20,PIKACHU,CLEFAIRY,0
-endc
db 21,PIDGEY,PIDGEOTTO,0
db 21,JIGGLYPUFF,PIDGEY,MEOWTH,0
db 22,ODDISH,BULBASAUR,0
db 24,BULBASAUR,IVYSAUR,0
-if DEF(_YELLOW)
- db 24,PIDGEY,MEOWTH,RATTATA,PIDGEY,MEOWTH,0
-else
db 24,PIDGEY,MEOWTH,RATTATA,PIKACHU,MEOWTH,0
-endc
db 30,POLIWAG,POLIWAG,0
db 27,PIDGEY,MEOWTH,PIDGEY,PIDGEOTTO,0
db 28,GOLDEEN,POLIWAG,HORSEA,0
@@ -153,18 +144,11 @@ endc
db 20,MEOWTH,ODDISH,PIDGEY,0
db 19,PIDGEY,RATTATA,RATTATA,BELLSPROUT,0
db 28,GLOOM,ODDISH,ODDISH,0
-if DEF(_YELLOW)
- db 29,PIDGEY,PIDGEOTTO,0
-else
db 29,PIKACHU,RAICHU,0
-endc
db 33,CLEFAIRY,0
db 29,BELLSPROUT,ODDISH,TANGELA,0
db 30,TENTACOOL,HORSEA,SEEL,0
-if DEF(_YELLOW)
- db 20,CUBONE,0
-endc
-PokemaniacData: ; 39f09 (e:5f09)
+PokemaniacData:
db 30,RHYHORN,LICKITUNG,0
db 20,CUBONE,SLOWPOKE,0
db 20,SLOWPOKE,SLOWPOKE,SLOWPOKE,0
@@ -172,7 +156,7 @@ PokemaniacData: ; 39f09 (e:5f09)
db 25,SLOWPOKE,0
db 40,CHARMELEON,LAPRAS,LICKITUNG,0
db 23,CUBONE,SLOWPOKE,0
-SuperNerdData: ; 39f26 (e:5f26)
+SuperNerdData:
db 11,MAGNEMITE,VOLTORB,0
db 12,GRIMER,VOLTORB,KOFFING,0
db 20,VOLTORB,KOFFING,VOLTORB,MAGNEMITE,0
@@ -185,7 +169,7 @@ SuperNerdData: ; 39f26 (e:5f26)
db 34,PONYTA,CHARMANDER,VULPIX,GROWLITHE,0
db 41,RAPIDASH,0
db 37,GROWLITHE,VULPIX,0
-HikerData: ; 39f5e (e:5f5e)
+HikerData:
db 10,GEODUDE,GEODUDE,ONIX,0
db 15,MACHOP,GEODUDE,0
db 13,GEODUDE,GEODUDE,MACHOP,GEODUDE,0
@@ -200,7 +184,7 @@ HikerData: ; 39f5e (e:5f5e)
db 19,GEODUDE,MACHOP,GEODUDE,GEODUDE,0
db 20,ONIX,ONIX,GEODUDE,0
db 21,GEODUDE,GRAVELER,0
-BikerData: ; 39f9c (e:5f9c)
+BikerData:
db 28,KOFFING,KOFFING,KOFFING,0
db 29,KOFFING,GRIMER,0
db 25,KOFFING,KOFFING,WEEZING,KOFFING,GRIMER,0
@@ -216,7 +200,7 @@ BikerData: ; 39f9c (e:5f9c)
db 26,KOFFING,KOFFING,GRIMER,KOFFING,0
db 28,GRIMER,GRIMER,KOFFING,0
db 29,KOFFING,MUK,0
-BurglarData: ; 39fe4 (e:5fe4)
+BurglarData:
db 29,GROWLITHE,VULPIX,0
db 33,GROWLITHE,0
db 28,VULPIX,CHARMANDER,PONYTA,0
@@ -226,13 +210,13 @@ BurglarData: ; 39fe4 (e:5fe4)
db 34,CHARMANDER,CHARMELEON,0
db 38,NINETALES,0
db 34,GROWLITHE,PONYTA,0
-EngineerData: ; 3a007 (e:6007)
+EngineerData:
db 21,VOLTORB,MAGNEMITE,0
db 21,MAGNEMITE,0
db 18,MAGNEMITE,MAGNEMITE,MAGNETON,0
-Juggler1Data: ; 3a013 (e:6013)
+Juggler1Data:
; none
-FisherData: ; 3a013 (e:6013)
+FisherData:
db 17,GOLDEEN,TENTACOOL,GOLDEEN,0
db 17,TENTACOOL,STARYU,SHELLDER,0
db 22,GOLDEEN,POLIWAG,GOLDEEN,0
@@ -244,7 +228,7 @@ FisherData: ; 3a013 (e:6013)
db 27,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,MAGIKARP,0
db 33,SEAKING,GOLDEEN,0
db 24,MAGIKARP,MAGIKARP,0
-SwimmerData: ; 3a049 (e:6049)
+SwimmerData:
db 16,HORSEA,SHELLDER,0
db 30,TENTACOOL,SHELLDER,0
db 29,GOLDEEN,HORSEA,STARYU,0
@@ -260,7 +244,7 @@ SwimmerData: ; 3a049 (e:6049)
db 37,STARMIE,0
db 33,STARYU,WARTORTLE,0
db 32,POLIWHIRL,TENTACOOL,SEADRA,0
-CueBallData: ; 3a08d (e:608d)
+CueBallData:
db 28,MACHOP,MANKEY,MACHOP,0
db 29,MANKEY,MACHOP,0
db 33,MACHOP,0
@@ -270,7 +254,7 @@ CueBallData: ; 3a08d (e:608d)
db 26,MANKEY,MANKEY,MACHOKE,MACHOP,0
db 29,PRIMEAPE,MACHOKE,0
db 31,TENTACOOL,TENTACOOL,TENTACRUEL,0
-GamblerData: ; 3a0b3 (e:60b3)
+GamblerData:
db 18,POLIWAG,HORSEA,0
db 18,BELLSPROUT,ODDISH,0
db 18,VOLTORB,MAGNEMITE,0
@@ -278,15 +262,11 @@ GamblerData: ; 3a0b3 (e:60b3)
db 22,POLIWAG,POLIWAG,POLIWHIRL,0
db 22,ONIX,GEODUDE,GRAVELER,0
db 24,GROWLITHE,VULPIX,0
-BeautyData: ; 3a0d1 (e:60d1)
+BeautyData:
db 21,ODDISH,BELLSPROUT,ODDISH,BELLSPROUT,0
db 24,BELLSPROUT,BELLSPROUT,0
db 26,EXEGGCUTE,0
-if DEF(_YELLOW)
- db 27,RATTATA,VULPIX,RATTATA,0
-else
db 27,RATTATA,PIKACHU,RATTATA,0
-endc
db 29,CLEFAIRY,MEOWTH,0
db 35,SEAKING,0
db 30,SHELLDER,SHELLDER,CLOYSTER,0
@@ -298,19 +278,15 @@ endc
db 30,GOLDEEN,SEAKING,0
db 29,STARYU,STARYU,STARYU,0
db 30,SEADRA,HORSEA,SEADRA,0
-PsychicData: ; 3a115 (e:6115)
+PsychicData:
db 31,KADABRA,SLOWPOKE,MR_MIME,KADABRA,0
db 34,MR_MIME,KADABRA,0
db 33,SLOWPOKE,SLOWPOKE,SLOWBRO,0
db 38,SLOWBRO,0
-RockerData: ; 3a127 (e:6127)
-if DEF(_YELLOW)
- db 20,VOLTORB,VOLTORB,VOLTORB,0
-else
+RockerData:
db 20,VOLTORB,MAGNEMITE,VOLTORB,0
-endc
db 29,VOLTORB,ELECTRODE,0
-JugglerData: ; 3a130 (e:6130)
+JugglerData:
db 29,KADABRA,MR_MIME,0
db 41,DROWZEE,HYPNO,KADABRA,KADABRA,0
db 31,DROWZEE,DROWZEE,KADABRA,DROWZEE,0
@@ -319,32 +295,32 @@ JugglerData: ; 3a130 (e:6130)
db 33,HYPNO,0
db 38,HYPNO,0
db 34,DROWZEE,KADABRA,0
-TamerData: ; 3a151 (e:6151)
+TamerData:
db 34,SANDSLASH,ARBOK,0
db 33,ARBOK,SANDSLASH,ARBOK,0
db 43,RHYHORN,0
db 39,ARBOK,TAUROS,0
db 44,PERSIAN,GOLDUCK,0
db 42,RHYHORN,PRIMEAPE,ARBOK,TAUROS,0
-BirdKeeperData: ; 3a16b (e:616b)
+BirdKeeperData:
db 29,PIDGEY,PIDGEOTTO,0
db 25,SPEAROW,PIDGEY,PIDGEY,SPEAROW,SPEAROW,0
db 26,PIDGEY,PIDGEOTTO,SPEAROW,FEAROW,0
- db 33,FARFETCH_D,0
+ db 33,FARFETCHD,0
db 29,SPEAROW,FEAROW,0
- db 26,PIDGEOTTO,FARFETCH_D,DODUO,PIDGEY,0
+ db 26,PIDGEOTTO,FARFETCHD,DODUO,PIDGEY,0
db 28,DODRIO,DODUO,DODUO,0
db 29,SPEAROW,FEAROW,0
db 34,DODRIO,0
db 26,SPEAROW,SPEAROW,FEAROW,SPEAROW,0
db 30,FEAROW,FEAROW,PIDGEOTTO,0
db 39,PIDGEOTTO,PIDGEOTTO,PIDGEY,PIDGEOTTO,0
- db 42,FARFETCH_D,FEAROW,0
+ db 42,FARFETCHD,FEAROW,0
db 28,PIDGEY,DODUO,PIDGEOTTO,0
db 26,PIDGEY,SPEAROW,PIDGEY,FEAROW,0
db 29,PIDGEOTTO,FEAROW,0
db 28,SPEAROW,DODUO,FEAROW,0
-BlackbeltData: ; 3a1be (e:61be)
+BlackbeltData:
db 37,HITMONLEE,HITMONCHAN,0
db 31,MANKEY,MANKEY,PRIMEAPE,0
db 32,MACHOP,MACHOKE,0
@@ -354,12 +330,7 @@ BlackbeltData: ; 3a1be (e:61be)
db 43,MACHOKE,0
db 38,MACHOKE,MACHOP,MACHOKE,0
db 43,MACHOKE,MACHOP,MACHOKE,0
-Green1Data: ; 3a1e4 (e:61e4)
-if DEF(_YELLOW)
- db 5,EEVEE,0
- db $FF,9,SPEAROW,8,EEVEE,0
- db $FF,18,SPEAROW,15,SANDSHREW,15,RATTATA,17,EEVEE,0
-else
+Green1Data:
db 5,SQUIRTLE,0
db 5,BULBASAUR,0
db 5,CHARMANDER,0
@@ -369,14 +340,13 @@ else
db $FF,18,PIDGEOTTO,15,ABRA,15,RATTATA,17,SQUIRTLE,0
db $FF,18,PIDGEOTTO,15,ABRA,15,RATTATA,17,BULBASAUR,0
db $FF,18,PIDGEOTTO,15,ABRA,15,RATTATA,17,CHARMANDER,0
-endc
-ProfOakData: ; 3a21d (e:621d)
+ProfOakData:
db $FF,66,TAUROS,67,EXEGGUTOR,68,ARCANINE,69,BLASTOISE,70,GYARADOS,0
db $FF,66,TAUROS,67,EXEGGUTOR,68,ARCANINE,69,VENUSAUR,70,GYARADOS,0
db $FF,66,TAUROS,67,EXEGGUTOR,68,ARCANINE,69,CHARIZARD,70,GYARADOS,0
-ChiefData: ; 3a241 (e:6241)
+ChiefData:
; none
-ScientistData: ; 3a241 (e:6241)
+ScientistData:
db 34,KOFFING,VOLTORB,0
db 26,GRIMER,WEEZING,KOFFING,WEEZING,0
db 28,MAGNEMITE,VOLTORB,MAGNETON,0
@@ -390,17 +360,11 @@ ScientistData: ; 3a241 (e:6241)
db 29,MAGNEMITE,KOFFING,0
db 33,MAGNEMITE,MAGNETON,VOLTORB,0
db 34,MAGNEMITE,ELECTRODE,0
-GiovanniData: ; 3a27e (e:627e)
-if DEF(_YELLOW)
- db $FF,25,ONIX,24,RHYHORN,29,PERSIAN,0
- db $FF,37,NIDORINO,35,PERSIAN,37,RHYHORN,41,NIDOQUEEN,0
- db $FF,50,DUGTRIO,53,PERSIAN,53,NIDOQUEEN,55,NIDOKING,55,RHYDON,0
-else
+GiovanniData:
db $FF,25,ONIX,24,RHYHORN,29,KANGASKHAN,0
db $FF,37,NIDORINO,35,KANGASKHAN,37,RHYHORN,41,NIDOQUEEN,0
db $FF,45,RHYHORN,42,DUGTRIO,44,NIDOQUEEN,45,NIDOKING,50,RHYDON,0
-endc
-RocketData: ; 3a29c (e:629c)
+RocketData:
db 13,RATTATA,ZUBAT,0
db 11,SANDSHREW,RATTATA,ZUBAT,0
db 12,ZUBAT,EKANS,0
@@ -442,18 +406,7 @@ RocketData: ; 3a29c (e:629c)
db 33,MACHOKE,0
db 25,RATTATA,RATTATA,ZUBAT,RATTATA,EKANS,0
db 32,CUBONE,DROWZEE,MAROWAK,0
-if DEF(_YELLOW)
-JessieJamesData:
- db 14,EKANS,MEOWTH,KOFFING,0
- db 25,KOFFING,MEOWTH,EKANS,0
- db 27,MEOWTH,ARBOK,WEEZING,0
- db 31,WEEZING,ARBOK,MEOWTH,0
- db 16,KOFFING,0
- db 27,KOFFING,0
- db 29,WEEZING,0
- db 33,WEEZING,0
-endc
-CooltrainerMData: ; 3a35a (e:635a)
+CooltrainerMData:
db 39,NIDORINO,NIDOKING,0
db 43,EXEGGUTOR,CLOYSTER,ARCANINE,0
db 43,KINGLER,TENTACRUEL,BLASTOISE,0
@@ -464,7 +417,7 @@ CooltrainerMData: ; 3a35a (e:635a)
db 44,KINGLER,CLOYSTER,0
db 39,SANDSLASH,DUGTRIO,0
db 43,RHYHORN,0
-CooltrainerFData: ; 3a385 (e:6385)
+CooltrainerFData:
db 24,WEEPINBELL,GLOOM,IVYSAUR,0
db 43,BELLSPROUT,WEEPINBELL,VICTREEBEL,0
db 43,PARASECT,DEWGONG,CHANSEY,0
@@ -473,69 +426,29 @@ CooltrainerFData: ; 3a385 (e:6385)
db 45,IVYSAUR,VENUSAUR,0
db 45,NIDORINA,NIDOQUEEN,0
db 43,PERSIAN,NINETALES,RAICHU,0
-BrunoData: ; 3a3a9 (e:63a9)
+BrunoData:
db $FF,53,ONIX,55,HITMONCHAN,55,HITMONLEE,56,ONIX,58,MACHAMP,0
-BrockData: ; 3a3b5 (e:63b5)
-if DEF(_YELLOW)
- db $FF,10,GEODUDE,12,ONIX,0
-else
+BrockData:
db $FF,12,GEODUDE,14,ONIX,0
-endc
-MistyData: ; 3a3bb (e:63bb)
+MistyData:
db $FF,18,STARYU,21,STARMIE,0
-LtSurgeData: ; 3a3c1 (e:63c1)
-if DEF(_YELLOW)
- db $FF,28,RAICHU,0
-else
+LtSurgeData:
db $FF,21,VOLTORB,18,PIKACHU,24,RAICHU,0
-endc
-ErikaData: ; 3a3c9 (e:63c9)
-if DEF(_YELLOW)
- db $FF,30,TANGELA,32,WEEPINBELL,32,GLOOM,0
-else
+ErikaData:
db $FF,29,VICTREEBEL,24,TANGELA,29,VILEPLUME,0
-endc
-KogaData: ; 3a3d1 (e:63d1)
-if DEF(_YELLOW)
- db $FF,44,VENONAT,46,VENONAT,48,VENONAT,50,VENOMOTH,0
-else
+KogaData:
db $FF,37,KOFFING,39,MUK,37,KOFFING,43,WEEZING,0
-endc
-BlaineData: ; 3a3db (e:63db)
-if DEF(_YELLOW)
- db $FF,48,NINETALES,50,RAPIDASH,54,ARCANINE,0
-else
+BlaineData:
db $FF,42,GROWLITHE,40,PONYTA,42,RAPIDASH,47,ARCANINE,0
-endc
-SabrinaData: ; 3a3e5 (e:63e5)
-if DEF(_YELLOW)
- db $FF,50,ABRA,50,KADABRA,50,ALAKAZAM,0
-else
+SabrinaData:
db $FF,38,KADABRA,37,MR_MIME,38,VENOMOTH,43,ALAKAZAM,0
-endc
-GentlemanData: ; 3a3ef (e:63ef)
+GentlemanData:
db 18,GROWLITHE,GROWLITHE,0
db 19,NIDORAN_M,NIDORAN_F,0
-if DEF(_YELLOW)
- db 22,VOLTORB,MAGNEMITE,0
-else
db 23,PIKACHU,0
-endc
db 48,PRIMEAPE,0
db 17,GROWLITHE,PONYTA,0
-Green2Data: ; 3a401 (e:6401)
-if DEF(_YELLOW)
- db $FF,19,SPEAROW,16,RATTATA,18,SANDSHREW,20,EEVEE,0
- db $FF,25,FEAROW,23,SHELLDER,22,VULPIX,20,SANDSHREW,25,EEVEE,0
- db $FF,25,FEAROW,23,MAGNEMITE,22,SHELLDER,20,SANDSHREW,25,EEVEE,0
- db $FF,25,FEAROW,23,VULPIX,22,MAGNEMITE,20,SANDSHREW,25,EEVEE,0
- db $FF,38,SANDSLASH,35,NINETALES,37,CLOYSTER,35,KADABRA,40,JOLTEON,0
- db $FF,38,SANDSLASH,35,CLOYSTER,37,MAGNETON,35,KADABRA,40,FLAREON,0
- db $FF,38,SANDSLASH,35,MAGNETON,37,NINETALES,35,KADABRA,40,VAPOREON,0
- db $FF,47,SANDSLASH,45,EXEGGCUTE,45,NINETALES,47,CLOYSTER,50,KADABRA,53,JOLTEON,0
- db $FF,47,SANDSLASH,45,EXEGGCUTE,45,CLOYSTER,47,MAGNETON,50,KADABRA,53,FLAREON,0
- db $FF,47,SANDSLASH,45,EXEGGCUTE,45,MAGNETON,47,NINETALES,50,KADABRA,53,VAPOREON,0
-else
+Green2Data:
db $FF,19,PIDGEOTTO,16,RATICATE,18,KADABRA,20,WARTORTLE,0
db $FF,19,PIDGEOTTO,16,RATICATE,18,KADABRA,20,IVYSAUR,0
db $FF,19,PIDGEOTTO,16,RATICATE,18,KADABRA,20,CHARMELEON,0
@@ -548,20 +461,13 @@ else
db $FF,47,PIDGEOT,45,RHYHORN,45,GROWLITHE,47,EXEGGCUTE,50,ALAKAZAM,53,BLASTOISE,0
db $FF,47,PIDGEOT,45,RHYHORN,45,GYARADOS,47,GROWLITHE,50,ALAKAZAM,53,VENUSAUR,0
db $FF,47,PIDGEOT,45,RHYHORN,45,EXEGGCUTE,47,GYARADOS,50,ALAKAZAM,53,CHARIZARD,0
-endc
-Green3Data: ; 3a491 (e:6491)
-if DEF(_YELLOW)
- db $FF,61,SANDSLASH,59,ALAKAZAM,61,EXEGGUTOR,61,CLOYSTER,63,NINETALES,65,JOLTEON,0
- db $FF,61,SANDSLASH,59,ALAKAZAM,61,EXEGGUTOR,61,MAGNETON,63,CLOYSTER,65,FLAREON,0
- db $FF,61,SANDSLASH,59,ALAKAZAM,61,EXEGGUTOR,61,NINETALES,63,MAGNETON,65,VAPOREON,0
-else
+Green3Data:
db $FF,61,PIDGEOT,59,ALAKAZAM,61,RHYDON,61,ARCANINE,63,EXEGGUTOR,65,BLASTOISE,0
db $FF,61,PIDGEOT,59,ALAKAZAM,61,RHYDON,61,GYARADOS,63,ARCANINE,65,VENUSAUR,0
db $FF,61,PIDGEOT,59,ALAKAZAM,61,RHYDON,61,EXEGGUTOR,63,GYARADOS,65,CHARIZARD,0
-endc
-LoreleiData: ; 3a4bb (e:64bb)
+LoreleiData:
db $FF,54,DEWGONG,53,CLOYSTER,54,SLOWBRO,56,JYNX,56,LAPRAS,0
-ChannelerData: ; 3a4c7 (e:64c7)
+ChannelerData:
db 22,GASTLY,0
db 24,GASTLY,0
db 23,GASTLY,GASTLY,0
@@ -586,7 +492,7 @@ ChannelerData: ; 3a4c7 (e:64c7)
db 34,GASTLY,HAUNTER,0
db 38,HAUNTER,0
db 33,GASTLY,GASTLY,HAUNTER,0
-AgathaData: ; 3a516 (e:6516)
+AgathaData:
db $FF,56,GENGAR,56,GOLBAT,55,HAUNTER,58,ARBOK,60,GENGAR,0
-LanceData: ; 3a522 (e:6522)
+LanceData:
db $FF,58,GYARADOS,56,DRAGONAIR,56,DRAGONAIR,60,AERODACTYL,62,DRAGONITE,0
diff --git a/data/trainer_types.asm b/data/trainer_types.asm
index 5ad1dbd0..bc94015c 100755
--- a/data/trainer_types.asm
+++ b/data/trainer_types.asm
@@ -1,17 +1,17 @@
FemaleTrainerList:: ; 3434 (0:3434)
- db $c8+LASS
- db $c8+JR__TRAINER_F
- db $c8+BEAUTY
- db $c8+COOLTRAINER_F
+ db OPP_LASS
+ db OPP_JR_TRAINER_F
+ db OPP_BEAUTY
+ db OPP_COOLTRAINER_F
db $FF
EvilTrainerList:: ; 3439 (0:3439)
- db $c8+JUGGLER_X
- db $c8+GAMBLER
- db $c8+ROCKER
- db $c8+JUGGLER
- db $c8+CHIEF
- db $c8+SCIENTIST
- db $c8+GIOVANNI
- db $c8+ROCKET
+ db OPP_JUGGLER_X
+ db OPP_GAMBLER
+ db OPP_ROCKER
+ db OPP_JUGGLER
+ db OPP_CHIEF
+ db OPP_SCIENTIST
+ db OPP_GIOVANNI
+ db OPP_ROCKET
db $FF
diff --git a/data/wildPokemon/route12.asm b/data/wildPokemon/route12.asm
index 7f5e47fe..9bb26a6d 100755
--- a/data/wildPokemon/route12.asm
+++ b/data/wildPokemon/route12.asm
@@ -38,8 +38,8 @@ Route12Mons:
db 27,BELLSPROUT
db 29,GLOOM
db 29,WEEPINBELL
- db 26,FARFETCH_D
- db 31,FARFETCH_D
+ db 26,FARFETCHD
+ db 31,FARFETCHD
db $03
db 15,SLOWPOKE
diff --git a/data/wildPokemon/route13.asm b/data/wildPokemon/route13.asm
index 1b694f36..be8ce386 100755
--- a/data/wildPokemon/route13.asm
+++ b/data/wildPokemon/route13.asm
@@ -39,8 +39,8 @@ Route13Mons:
db 27,BELLSPROUT
db 29,GLOOM
db 29,WEEPINBELL
- db 26,FARFETCH_D
- db 31,FARFETCH_D
+ db 26,FARFETCHD
+ db 31,FARFETCHD
db $03
db 15,SLOWPOKE
diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm
index 90b9450b..847ff3d1 100755
--- a/engine/HoF_room_pc.asm
+++ b/engine/HoF_room_pc.asm
@@ -246,7 +246,7 @@ Credits: ; 7418e (1d:418e)
pop de
ld de, TheEndGfx
ld hl, vChars2 + $600
- lb bc, BANK(TheEndGfx), $0a
+ lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10
call CopyVideoData
coord hl, 4, 8
ld de, TheEndTextString
@@ -267,3 +267,4 @@ INCLUDE "text/credits_text.asm"
TheEndGfx: ; 7473e (1d:473e) (7473f on blue)
INCBIN "gfx/theend.2bpp"
+TheEndGfxEnd:
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 424190d3..31b490f3 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -4,18 +4,18 @@ DrawFrameBlock: ; 78000 (1e:4000)
ld l,c
ld h,b
ld a,[hli]
- ld [W_NUMFBTILES],a
- ld a,[W_FBDESTADDR + 1]
+ ld [wNumFBTiles],a
+ ld a,[wFBDestAddr + 1]
ld e,a
- ld a,[W_FBDESTADDR]
+ ld a,[wFBDestAddr]
ld d,a
xor a
- ld [W_FBTILECOUNTER],a ; loop counter
+ ld [wFBTileCounter],a ; loop counter
.loop
- ld a,[W_FBTILECOUNTER]
+ ld a,[wFBTileCounter]
inc a
- ld [W_FBTILECOUNTER],a
- ld a,[W_SUBANIMTRANSFORM]
+ ld [wFBTileCounter],a
+ ld a,[wSubAnimTransform]
dec a
jr z,.flipHorizontalAndVertical ; 1
dec a
@@ -23,15 +23,15 @@ DrawFrameBlock: ; 78000 (1e:4000)
dec a
jr z,.flipBaseCoords ; 3
.noTransformation
- ld a,[W_BASECOORDY]
+ ld a,[wBaseCoordY]
add [hl]
ld [de],a ; store Y
inc hl
inc de
- ld a,[W_BASECOORDX]
+ ld a,[wBaseCoordX]
jr .finishCopying
.flipBaseCoords
- ld a,[W_BASECOORDY]
+ ld a,[wBaseCoordY]
ld b,a
ld a,136
sub b ; flip Y base coordinate
@@ -39,11 +39,11 @@ DrawFrameBlock: ; 78000 (1e:4000)
ld [de],a ; store Y
inc hl
inc de
- ld a,[W_BASECOORDX]
+ ld a,[wBaseCoordX]
ld b,a
ld a,168
sub b ; flip X base coordinate
-.finishCopying ; finish copying values to OAM (when [W_SUBANIMTRANSFORM] not 1 or 2)
+.finishCopying ; finish copying values to OAM (when [wSubAnimTransform] not 1 or 2)
add [hl] ; X offset
ld [de],a ; store X
inc hl
@@ -57,7 +57,7 @@ DrawFrameBlock: ; 78000 (1e:4000)
inc de
jp .nextTile
.flipHorizontalAndVertical
- ld a,[W_BASECOORDY]
+ ld a,[wBaseCoordY]
add [hl] ; Y offset
ld b,a
ld a,136
@@ -65,7 +65,7 @@ DrawFrameBlock: ; 78000 (1e:4000)
ld [de],a ; store Y
inc hl
inc de
- ld a,[W_BASECOORDX]
+ ld a,[wBaseCoordX]
add [hl] ; X offset
ld b,a
ld a,168
@@ -95,13 +95,13 @@ DrawFrameBlock: ; 78000 (1e:4000)
inc de
jp .nextTile
.flipHorizontalTranslateDown
- ld a,[W_BASECOORDY]
+ ld a,[wBaseCoordY]
add [hl]
add a,40 ; translate Y coordinate downwards
ld [de],a ; store Y
inc hl
inc de
- ld a,[W_BASECOORDX]
+ ld a,[wBaseCoordX]
add [hl]
ld b,a
ld a,168
@@ -125,47 +125,47 @@ DrawFrameBlock: ; 78000 (1e:4000)
ld [de],a
inc de
.nextTile
- ld a,[W_FBTILECOUNTER]
+ ld a,[wFBTileCounter]
ld c,a
- ld a,[W_NUMFBTILES]
+ ld a,[wNumFBTiles]
cp c
jp nz,.loop ; go back up if there are more tiles to draw
.afterDrawingTiles
- ld a,[W_FBMODE]
+ ld a,[wFBMode]
cp a,2
jr z,.advanceFrameBlockDestAddr; skip delay and don't clean OAM buffer
- ld a,[W_SUBANIMFRAMEDELAY]
+ ld a,[wSubAnimFrameDelay]
ld c,a
call DelayFrames
- ld a,[W_FBMODE]
+ ld a,[wFBMode]
cp a,3
jr z,.advanceFrameBlockDestAddr ; skip cleaning OAM buffer
cp a,4
jr z,.done ; skip cleaning OAM buffer and don't advance the frame block destination address
- ld a,[W_ANIMATIONID]
+ ld a,[wAnimationID]
cp a,GROWL
jr z,.resetFrameBlockDestAddr
call AnimationCleanOAM
.resetFrameBlockDestAddr
ld hl,wOAMBuffer ; OAM buffer
ld a,l
- ld [W_FBDESTADDR + 1],a
+ ld [wFBDestAddr + 1],a
ld a,h
- ld [W_FBDESTADDR],a ; set destination address to beginning of OAM buffer
+ ld [wFBDestAddr],a ; set destination address to beginning of OAM buffer
ret
.advanceFrameBlockDestAddr
ld a,e
- ld [W_FBDESTADDR + 1],a
+ ld [wFBDestAddr + 1],a
ld a,d
- ld [W_FBDESTADDR],a
+ ld [wFBDestAddr],a
.done
ret
PlayAnimation: ; 780f1 (1e:40f1)
xor a
ld [$FF8B],a ; it looks like nothing reads this
- ld [W_SUBANIMTRANSFORM],a
- ld a,[W_ANIMATIONID] ; get animation number
+ ld [wSubAnimTransform],a
+ ld a,[wAnimationID] ; get animation number
dec a
ld l,a
ld h,0
@@ -217,7 +217,7 @@ PlayAnimation: ; 780f1 (1e:40f1)
.playSubanimation
ld c,a
and a,%00111111
- ld [W_SUBANIMFRAMEDELAY],a
+ ld [wSubAnimFrameDelay],a
xor a
sla c
rla
@@ -235,9 +235,9 @@ PlayAnimation: ; 780f1 (1e:40f1)
ld de,SubanimationPointers
add hl,de
ld a,l
- ld [W_SUBANIMADDRPTR],a
+ ld [wSubAnimAddrPtr],a
ld a,h
- ld [W_SUBANIMADDRPTR + 1],a
+ ld [wSubAnimAddrPtr + 1],a
ld l,c
ld h,b
push hl
@@ -257,9 +257,9 @@ PlayAnimation: ; 780f1 (1e:40f1)
ret
LoadSubanimation: ; 7817c (1e:417c)
- ld a,[W_SUBANIMADDRPTR + 1]
+ ld a,[wSubAnimAddrPtr + 1]
ld h,a
- ld a,[W_SUBANIMADDRPTR]
+ ld a,[wSubAnimAddrPtr]
ld l,a
ld a,[hli]
ld e,a
@@ -268,7 +268,7 @@ LoadSubanimation: ; 7817c (1e:417c)
ld a,[de]
ld b,a
and a,31
- ld [W_SUBANIMCOUNTER],a ; number of frame blocks
+ ld [wSubAnimCounter],a ; number of frame blocks
ld a,b
and a,%11100000
cp a,5 << 5 ; is subanimation type 5?
@@ -282,12 +282,12 @@ LoadSubanimation: ; 7817c (1e:417c)
; place the upper 3 bits of a into bits 0-2 of a before storing
srl a
swap a
- ld [W_SUBANIMTRANSFORM],a
+ ld [wSubAnimTransform],a
cp a,4 ; is the animation reversed?
ld hl,0
jr nz,.storeSubentryAddr
; if the animation is reversed, then place the initial subentry address at the end of the list of subentries
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
dec a
ld bc,3
.loop
@@ -298,9 +298,9 @@ LoadSubanimation: ; 7817c (1e:417c)
inc de
add hl,de
ld a,l
- ld [W_SUBANIMSUBENTRYADDR],a
+ ld [wSubAnimSubEntryAddr],a
ld a,h
- ld [W_SUBANIMSUBENTRYADDR + 1],a
+ ld [wSubAnimSubEntryAddr + 1],a
ret
; called if the subanimation type is not 5
@@ -384,7 +384,7 @@ MoveAnimation: ; 78d5e (1e:4d5e)
push af
call WaitForSoundToFinish
call SetAnimationPalette
- ld a,[W_ANIMATIONID]
+ ld a,[wAnimationID]
and a
jr z,.AnimationFinished
@@ -397,7 +397,7 @@ MoveAnimation: ; 78d5e (1e:4d5e)
.MoveAnimation
; check if battle animations are disabled in the options
- ld a,[W_OPTIONS]
+ ld a,[wOptions]
bit 7,a
jr nz,.AnimationsDisabled
call ShareMoveAnimations
@@ -411,9 +411,9 @@ MoveAnimation: ; 78d5e (1e:4d5e)
.AnimationFinished
call WaitForSoundToFinish
xor a
- ld [W_SUBANIMSUBENTRYADDR],a
+ ld [wSubAnimSubEntryAddr],a
ld [wUnusedD09B],a
- ld [W_SUBANIMTRANSFORM],a
+ ld [wSubAnimTransform],a
dec a
ld [wAnimSoundID],a
pop af
@@ -430,7 +430,7 @@ ShareMoveAnimations: ; 78da6 (1e:4da6)
; opponent’s turn
- ld a,[W_ANIMATIONID]
+ ld a,[wAnimationID]
cp a,AMNESIA
ld b,CONF_ANIM
@@ -442,7 +442,7 @@ ShareMoveAnimations: ; 78da6 (1e:4da6)
.Replace
ld a,b
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
ret
PlayApplyingAttackAnimation: ; 78dbd (1e:4dbd)
@@ -529,7 +529,7 @@ SetAnimationPalette: ; 78e23 (1e:4e23)
ld a, $f0
ld [wAnimPalette], a
ld b, $e4
- ld a, [W_ANIMATIONID]
+ ld a, [wAnimationID]
cp TRADE_BALL_DROP_ANIM
jr c, .next
cp TRADE_BALL_POOF_ANIM + 1
@@ -558,12 +558,12 @@ PlaySubanimation: ; 78e53 (1e:4e53)
.skipPlayingSound
ld hl,wOAMBuffer ; base address of OAM buffer
ld a,l
- ld [W_FBDESTADDR + 1],a
+ ld [wFBDestAddr + 1],a
ld a,h
- ld [W_FBDESTADDR],a
- ld a,[W_SUBANIMSUBENTRYADDR + 1]
+ ld [wFBDestAddr],a
+ ld a,[wSubAnimSubEntryAddr + 1]
ld h,a
- ld a,[W_SUBANIMSUBENTRYADDR]
+ ld a,[wSubAnimSubEntryAddr]
ld l,a
.loop
push hl
@@ -585,24 +585,24 @@ PlaySubanimation: ; 78e53 (1e:4e53)
add hl,de
add hl,de
ld a,[hli]
- ld [W_BASECOORDY],a
+ ld [wBaseCoordY],a
ld a,[hl]
- ld [W_BASECOORDX],a
+ ld [wBaseCoordX],a
pop hl
inc hl
ld a,[hl] ; frame block mode
- ld [W_FBMODE],a
+ ld [wFBMode],a
call DrawFrameBlock
call DoSpecialEffectByAnimationId ; run animation-specific function (if there is one)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
dec a
- ld [W_SUBANIMCOUNTER],a
+ ld [wSubAnimCounter],a
ret z
- ld a,[W_SUBANIMSUBENTRYADDR + 1]
+ ld a,[wSubAnimSubEntryAddr + 1]
ld h,a
- ld a,[W_SUBANIMSUBENTRYADDR]
+ ld a,[wSubAnimSubEntryAddr]
ld l,a
- ld a,[W_SUBANIMTRANSFORM]
+ ld a,[wSubAnimTransform]
cp a,4 ; is the animation reversed?
ld bc,3
jr nz,.nextSubanimationSubentry
@@ -610,9 +610,9 @@ PlaySubanimation: ; 78e53 (1e:4e53)
.nextSubanimationSubentry
add hl,bc
ld a,h
- ld [W_SUBANIMSUBENTRYADDR + 1],a
+ ld [wSubAnimSubEntryAddr + 1],a
ld a,l
- ld [W_SUBANIMSUBENTRYADDR],a
+ ld [wSubAnimSubEntryAddr],a
jp .loop
AnimationCleanOAM: ; 78ec8 (1e:4ec8)
@@ -634,7 +634,7 @@ DoSpecialEffectByAnimationId: ; 78ed7 (1e:4ed7)
push hl
push de
push bc
- ld a,[W_ANIMATIONID]
+ ld a,[wAnimationID]
ld hl,AnimationIdSpecialEffects
ld de,3
call IsInArray
@@ -737,21 +737,21 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e)
xor a,%00111100 ; complement colors 1 and 2
ld [rOBP0],a
.skipFlashingEffect
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,11 ; is it the beginning of the subanimation?
jr nz,.skipPlayingSound
; if it is the beginning of the subanimation, play a sound
ld a,SFX_BALL_TOSS
call PlaySound
.skipPlayingSound
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
cp a,02 ; is it a trainer battle?
jr z,.isTrainerBattle
ld a,[wd11e]
cp a,$10 ; is the enemy pokemon the Ghost Marowak?
ret nz
; if the enemy pokemon is the Ghost Marowak, make it dodge during the last 3 frames
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,3
jr z,.moveGhostMarowakLeft
cp a,2
@@ -772,18 +772,18 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e)
dec b
jr nz,.loop
ld a,%00001000
- ld [$ff10],a ; Channel 1 sweep register
+ ld [rNR10],a ; Channel 1 sweep register
ret
.isTrainerBattle ; if it's a trainer battle, shorten the animation by one frame
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,3
ret nz
dec a
- ld [W_SUBANIMCOUNTER],a
+ ld [wSubAnimCounter],a
ret
DoBallShakeSpecialEffects: ; 78f96 (1e:4f96)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,4 ; is it the beginning of a shake?
jr nz,.skipPlayingSound
; if it is the beginning of a shake, play a sound and wait 2/3 of a second
@@ -792,7 +792,7 @@ DoBallShakeSpecialEffects: ; 78f96 (1e:4f96)
ld c,40
call DelayFrames
.skipPlayingSound
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
dec a
ret nz
; if it's the end of the ball shaking subanimation, check if more shakes are left and restart the subanimation
@@ -801,30 +801,30 @@ DoBallShakeSpecialEffects: ; 78f96 (1e:4f96)
ld [wNumShakes],a
ret z
; if there are shakes left, restart the subanimation
- ld a,[W_SUBANIMSUBENTRYADDR]
+ ld a,[wSubAnimSubEntryAddr]
ld l,a
- ld a,[W_SUBANIMSUBENTRYADDR + 1]
+ ld a,[wSubAnimSubEntryAddr + 1]
ld h,a
ld de,-(4 * 3) ; 4 subentries and 3 bytes per subentry
add hl,de
ld a,l
- ld [W_SUBANIMSUBENTRYADDR],a
+ ld [wSubAnimSubEntryAddr],a
ld a,h
- ld [W_SUBANIMSUBENTRYADDR + 1],a
+ ld [wSubAnimSubEntryAddr + 1],a
ld a,5 ; number of subentries in the ball shaking subanimation plus one
- ld [W_SUBANIMCOUNTER],a
+ ld [wSubAnimCounter],a
ret
; plays a sound after the second frame of the poof animation
DoPoofSpecialEffects: ; 78fce (1e:4fce)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,5
ret nz
ld a,SFX_BALL_POOF
jp PlaySound
DoRockSlideSpecialEffects: ; 78fd9 (1e:4fd9)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,12
ret nc
cp a,8
@@ -840,21 +840,21 @@ DoRockSlideSpecialEffects: ; 78fd9 (1e:4fd9)
predef_jump PredefShakeScreenVertically ; shake vertically
FlashScreenEveryEightFrameBlocks: ; 78ff7 (1e:4ff7)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
and a,7 ; is the subanimation counter exactly 8?
call z,AnimationFlashScreen ; if so, flash the screen
ret
; flashes the screen if the subanimation counter is divisible by 4
FlashScreenEveryFourFrameBlocks: ; 79000 (1e:5000)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
and a,3
call z,AnimationFlashScreen
ret
; used for Explosion and Selfdestruct
DoExplodeSpecialEffects: ; 79009 (1e:5009)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,1 ; is it the end of the subanimation?
jr nz,FlashScreenEveryFourFrameBlocks
; if it's the end of the subanimation, make the attacking pokemon disappear
@@ -863,7 +863,7 @@ DoExplodeSpecialEffects: ; 79009 (1e:5009)
; flashes the screen when subanimation counter is 1 modulo 4
DoBlizzardSpecialEffects: ; 79016 (1e:5016)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,13
jp z,AnimationFlashScreen
cp a,9
@@ -877,7 +877,7 @@ DoBlizzardSpecialEffects: ; 79016 (1e:5016)
; flashes the screen at 3 points in the subanimation
; unused
FlashScreenUnused: ; 7902e (1e:502e)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,14
jp z,AnimationFlashScreen
cp a,9
@@ -888,7 +888,7 @@ FlashScreenUnused: ; 7902e (1e:502e)
; function to make the pokemon disappear at the beginning of the animation
TradeHidePokemon: ; 79041 (1e:5041)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,6
ret nz
ld a,2 * SCREEN_WIDTH + 7
@@ -896,7 +896,7 @@ TradeHidePokemon: ; 79041 (1e:5041)
; function to make a shaking pokeball jump up at the end of the animation
TradeShakePokeball: ; 7904c (1e:504c)
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
cp a,1
ret nz
; if it's the end of the animation, make the ball jump up
@@ -976,7 +976,7 @@ DoGrowlSpecialEffects: ; 790bc (1e:50bc)
ld de,wOAMBuffer + $10
ld bc,$10
call CopyData ; copy the musical note graphic
- ld a,[W_SUBANIMCOUNTER]
+ ld a,[wSubAnimCounter]
dec a
call z,AnimationCleanOAM ; clean up at the end of the subanimation
ret
@@ -984,7 +984,7 @@ DoGrowlSpecialEffects: ; 790bc (1e:50bc)
; this is associated with Tail Whip, but Tail Whip doesn't use any subanimations
TailWhipAnimationUnused: ; 790d0 (1e:50d0)
ld a,1
- ld [W_SUBANIMCOUNTER],a
+ ld [wSubAnimCounter],a
ld c,20
jp DelayFrames
@@ -1243,17 +1243,17 @@ AnimationWaterDropletsEverywhere: ; 79215 (1e:5215)
call LoadAnimationTileset
ld d, 32
ld a, -16
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, $71
ld [wDropletTile], a
.loop
ld a, 16
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, 0
ld [wUnusedD08A], a
call _AnimationWaterDroplets
ld a, 24
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, 32
ld [wUnusedD08A], a
call _AnimationWaterDroplets
@@ -1264,24 +1264,24 @@ AnimationWaterDropletsEverywhere: ; 79215 (1e:5215)
_AnimationWaterDroplets: ; 79246 (1e:5246)
ld hl, wOAMBuffer
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld [hli], a ; Y
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add 27
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld [hli], a ; X
ld a, [wDropletTile]
ld [hli], a ; tile
xor a
ld [hli], a ; attribute
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
cp 144
jr c, .loop
sub 168
- ld [W_BASECOORDX], a
- ld a, [W_BASECOORDY]
+ ld [wBaseCoordX], a
+ ld a, [wBaseCoordY]
add 16
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
cp 112
jr c, .loop
call AnimationCleanOAM
@@ -1387,14 +1387,14 @@ ShakeEnemyHUD_WritePlayerMonPicOAM: ; 792fd (1e:52fd)
; Writes the OAM entries for a copy of the player mon's pic in OAM.
; The top 5 rows are reproduced in OAM, although only 2 are actually needed.
ld a, $10
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, $30
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld hl, wOAMBuffer
ld d, 0
ld c, 7
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld e, a
ld b, 5
.innerLoop
@@ -1406,21 +1406,21 @@ ShakeEnemyHUD_WritePlayerMonPicOAM: ; 792fd (1e:52fd)
ret z
inc d
inc d
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add 8
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
jr .loop
BattleAnimWriteOAMEntry: ; 79329 (1e:5329)
; Y coordinate = e (increased by 8 each call, before the write to OAM)
-; X coordinate = [W_BASECOORDX]
+; X coordinate = [wBaseCoordX]
; tile = d
; attributes = 0
ld a, e
add 8
ld e, a
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld [hli], a
ld a, d
ld [hli], a
@@ -1749,9 +1749,9 @@ AnimationShootBallsUpward: ; 794f9 (1e:54f9)
lb bc, 6 * 8, 5 * 8
.next
ld a, b
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, c
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
lb bc, 5, 1
call _AnimationShootBallsUpward
jp AnimationCleanOAM
@@ -1765,7 +1765,7 @@ _AnimationShootBallsUpward: ; 79517 (1e:5517)
ld d, $7a ; ball tile
ld hl, wOAMBuffer
push bc
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld e, a
.initOAMLoop
call BattleAnimWriteOAMEntry
@@ -1779,7 +1779,7 @@ _AnimationShootBallsUpward: ; 79517 (1e:5517)
push bc
ld hl, wOAMBuffer
.innerLoop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
add 8
ld e, a
ld a, [hl]
@@ -1819,11 +1819,11 @@ AnimationShootManyBallsUpward: ; 79566 (1e:5566)
ld [wSavedY], a
.loop
ld a, [wSavedY]
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, [hli]
cp $ff
jp z, AnimationCleanOAM
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
lb bc, 4, 1
push hl
call _AnimationShootBallsUpward
@@ -2096,10 +2096,10 @@ HideSubstituteShowMonAnim: ; 79747 (1e:5747)
ld a, [H_WHOSETURN]
and a
ld hl, wPlayerMonMinimized
- ld a, [W_PLAYERBATTSTATUS2]
+ ld a, [wPlayerBattleStatus2]
jr z, .next1
ld hl, wEnemyMonMinimized
- ld a, [W_ENEMYBATTSTATUS2]
+ ld a, [wEnemyBattleStatus2]
.next1
push hl
; if the substitute broke, slide it down, else slide it offscreen horizontally
@@ -2150,7 +2150,7 @@ ChangeMonPic: ; 79793 (1e:5793)
ld [wcf91], a
ld [wd0b5], a
xor a
- ld [W_SPRITEFLIPPED], a
+ ld [wSpriteFlipped], a
call GetMonHeader
coord hl, 12, 0
call LoadFrontSpriteByMonIndex
@@ -2170,8 +2170,8 @@ ChangeMonPic: ; 79793 (1e:5793)
pop af
ld [wBattleMonSpecies2], a
.done
- ld b, $1
- jp GoPAL_SET
+ ld b, SET_PAL_BATTLE
+ jp RunPaletteCommand
AnimationHideEnemyMonPic: ; 797d8 (1e:57d8)
; Hides the enemy mon's sprite
@@ -2196,7 +2196,7 @@ InitMultipleObjectsOAM: ; 797e8 (1e:57e8)
pop bc
xor a
ld e, a
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld hl, wOAMBuffer
.loop
call BattleAnimWriteOAMEntry
@@ -2335,26 +2335,26 @@ GetMoveSound: ; 7986f (1e:586f)
call GetCryData
ld b,a
pop hl
- ld a,[wc0f1]
+ ld a,[wFrequencyModifier]
add [hl]
- ld [wc0f1],a
+ ld [wFrequencyModifier],a
inc hl
- ld a,[wc0f2]
+ ld a,[wTempoModifier]
add [hl]
- ld [wc0f2],a
+ ld [wTempoModifier],a
jr .done
.NotCryMove
ld a,[hli]
- ld [wc0f1],a
+ ld [wFrequencyModifier],a
ld a,[hli]
- ld [wc0f2],a
+ ld [wTempoModifier],a
.done
ld a,b
ret
IsCryMove: ; 798ad (1e:58ad)
; set carry if the move animation involves playing a monster cry
- ld a,[W_ANIMATIONID]
+ ld a,[wAnimationID]
cp a,GROWL
jr z,.CryMove
cp a,ROAR
@@ -2953,10 +2953,10 @@ BattleAnimCopyTileMapToVRAM: ; 79e0d (1e:5e0d)
jp Delay3
TossBallAnimation: ; 79e16 (1e:5e16)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
cp a,2
jr z,.BlockBall ; if in trainer battle, play different animation
- ld a,[wd11e]
+ ld a,[wPokeBallAnimData]
ld b,a
; upper nybble: how many animations (from PokeBallAnimations) to play
@@ -2984,7 +2984,7 @@ TossBallAnimation: ; 79e16 (1e:5e16)
.done
ld a,b
.PlayNextAnimation
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
push bc
push hl
call PlayAnimation
@@ -3001,12 +3001,12 @@ TossBallAnimation: ; 79e16 (1e:5e16)
.BlockBall ; 5E55
ld a,TOSS_ANIM
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
call PlayAnimation
ld a,SFX_FAINT_THUD
call PlaySound
ld a,BLOCKBALL_ANIM
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
jp PlayAnimation
PlayApplyingAttackSound: ; 79e6a (1e:5e6a)
@@ -3029,8 +3029,8 @@ PlayApplyingAttackSound: ; 79e6a (1e:5e6a)
ld b, $1
ld c, SFX_NOT_VERY_EFFECTIVE
.playSound
- ld [wc0f1], a
+ ld [wFrequencyModifier], a
ld a, b
- ld [wc0f2], a
+ ld [wTempoModifier], a
ld a, c
jp PlaySound
diff --git a/engine/battle/bank_e_misc.asm b/engine/battle/bank_e_misc.asm
index f47087d8..dc766f23 100755
--- a/engine/battle/bank_e_misc.asm
+++ b/engine/battle/bank_e_misc.asm
@@ -92,9 +92,9 @@ InitList: ; 39bd5 (e:5bd5)
ld a, h
ld [wListPointer + 1], a
ld a, e
- ld [wcf8d], a
+ ld [wUnusedCF8D], a
ld a, d
- ld [wcf8e], a
+ ld [wUnusedCF8D + 1], a
ld bc, ItemPrices
ld a, c
ld [wItemPrices], a
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm
index e9e247f9..545273ee 100644
--- a/engine/battle/battle_transitions.asm
+++ b/engine/battle/battle_transitions.asm
@@ -81,8 +81,8 @@ BattleTransitions: ; 709d2 (1c:49d2)
dw BattleTransition_Split ; %111
GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
- ld a, [W_CUROPPONENT]
- cp $c8
+ ld a, [wCurOpponent]
+ cp 200
jr nc, .trainer
res 0, c
ret
@@ -105,7 +105,7 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
ld a, [hl]
add $3
ld e, a
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
sub e
jr nc, .highLevelEnemy
res 1, c
@@ -122,7 +122,7 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE
; and SILPH_CO_[9-11]F as dungeon maps
GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld e, a
ld hl, DungeonMaps1
.loop1
@@ -151,7 +151,7 @@ GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
res 2, c
ret
-; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP
+; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is equal to one of these maps
DungeonMaps1: ; 70a3f (1c:4a3f)
db VIRIDIAN_FOREST
@@ -160,7 +160,7 @@ DungeonMaps1: ; 70a3f (1c:4a3f)
db ROCK_TUNNEL_2
db $FF
-; GetBattleTransitionID_IsDungeonMap checks if W_CURMAP
+; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is in between or equal to each pair of maps
DungeonMaps2: ; 70a44 (1c:4a44)
; all MT_MOON maps
@@ -184,11 +184,12 @@ DungeonMaps2: ; 70a44 (1c:4a44)
LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
ld hl, vChars1 + $7f0
ld de, BattleTransitionTile
- lb bc, BANK(BattleTransitionTile), $01
+ lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
jp CopyVideoData
BattleTransitionTile: ; 70a59 (1c:4a59)
INCBIN "gfx/battle_transition.2bpp"
+BattleTransitionTileEnd:
BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
ld a, $ff
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index a00e9d59..476284f0 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -1,8 +1,8 @@
PrintBeginningBattleText: ; 58d99 (16:4d99)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr nz, .trainerBattle
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp POKEMONTOWER_3
jr c, .notPokemonTower
cp LAVENDER_HOUSE_1
@@ -11,7 +11,7 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
ld a, [wEnemyMonSpecies2]
call PlayCry
ld hl, WildMonAppearedText
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr z, .notFishing
ld hl, HookedMonAttackedText
@@ -61,9 +61,9 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
.playSFX
xor a
- ld [wc0f1], a
+ ld [wFrequencyModifier], a
ld a, $80
- ld [wc0f2], a
+ ld [wTempoModifier], a
ld a, SFX_SILPH_SCOPE
call PlaySound
jp WaitForSoundToFinish
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 65549f7b..c5c3774f 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -184,8 +184,8 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
inc a
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
- ld b, $1
- call GoPAL_SET
+ ld b, SET_PAL_BATTLE
+ call RunPaletteCommand
call HideSprites
jpab PrintBeginningBattleText
@@ -239,7 +239,7 @@ StartBattle: ; 3c11e (f:411e)
.foundFirstAliveEnemyMon
ld a, d
ld [wSerialExchangeNybbleReceiveData], a
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a ; is it a trainer battle?
call nz, EnemySendOutFirstMon ; if it is a trainer battle, send out enemy mon
ld c, 40
@@ -251,7 +251,7 @@ StartBattle: ; 3c11e (f:411e)
and a
jp z, HandlePlayerBlackOut ; jump if no mon is alive
call LoadScreenTilesFromBuffer1
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
and a ; is it a normal battle?
jp z, .playerSendOutFirstMon ; if so, send out player mon
; safari zone battle
@@ -261,7 +261,7 @@ StartBattle: ; 3c11e (f:411e)
ld a, [wActionResultOrTookBattleTurn]
and a ; was the item used successfully?
jr z, .displaySafariZoneBattleMenu ; if not, display the menu again; XXX does this ever jump?
- ld a, [W_NUMSAFARIBALLS]
+ ld a, [wNumSafariBalls]
and a
jr nz, .notOutOfSafariBalls
call LoadScreenTilesFromBuffer1
@@ -380,13 +380,13 @@ MainInBattleLoop: ; 3c233 (f:4233)
call SaveScreenTilesToBuffer1
xor a
ld [wFirstMonsNotOutYet], a
- ld a, [W_PLAYERBATTSTATUS2]
+ ld a, [wPlayerBattleStatus2]
and (1 << NeedsToRecharge) | (1 << UsingRage) ; check if the player is using Rage or needs to recharge
jr nz, .selectEnemyMove
; the player is not using Rage and doesn't need to recharge
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res Flinched, [hl] ; reset flinch bit
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
res Flinched, [hl] ; reset flinch bit
ld a, [hl]
and (1 << ThrashingAbout) | (1 << ChargingUp) ; check if the player is thrashing about or charging for an attack
@@ -400,10 +400,10 @@ MainInBattleLoop: ; 3c233 (f:4233)
ld a, [wBattleMonStatus]
and (1 << FRZ) | SLP ; is mon frozen or asleep?
jr nz, .selectEnemyMove ; if so, jump
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
and (1 << StoringEnergy) | (1 << UsingTrappingMove) ; check player is using Bide or using a multi-turn attack like wrap
jr nz, .selectEnemyMove ; if so, jump
- ld a, [W_ENEMYBATTSTATUS1]
+ ld a, [wEnemyBattleStatus1]
bit UsingTrappingMove, a ; check if enemy is using a multi-turn attack like wrap
jr z, .selectPlayerMove ; if not, jump
; enemy is using a mult-turn attack like wrap, so player is trapped and cannot execute a move
@@ -416,7 +416,7 @@ MainInBattleLoop: ; 3c233 (f:4233)
jr nz, .selectEnemyMove
ld [wMoveMenuType], a
inc a
- ld [W_ANIMATIONID], a
+ ld [wAnimationID], a
xor a
ld [wMenuItemToSwap], a
call MoveSelectionMenu
@@ -441,7 +441,7 @@ MainInBattleLoop: ; 3c233 (f:4233)
sub $4
jr c, .noLinkBattle
; the link battle enemy has switched mons
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
bit UsingTrappingMove, a ; check if using multi-turn move like Wrap
jr z, .asm_3c2dd
ld a, [wPlayerMoveListIndex]
@@ -584,11 +584,11 @@ HandlePoisonBurnLeechSeed: ; 3c3bd (f:43bd)
pop hl
call HandlePoisonBurnLeechSeed_DecreaseOwnHP
.notBurnedOrPoisoned
- ld de, W_PLAYERBATTSTATUS2
+ ld de, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .playersTurn2
- ld de, W_ENEMYBATTSTATUS2
+ ld de, wEnemyBattleStatus2
.playersTurn2
ld a, [de]
add a
@@ -659,13 +659,13 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP: ; 3c43d (f:443d)
jr nz, .nonZeroDamage
inc c ; damage is at least 1
.nonZeroDamage
- ld hl, W_PLAYERBATTSTATUS3
- ld de, W_PLAYERTOXICCOUNTER
+ ld hl, wPlayerBattleStatus3
+ ld de, wPlayerToxicCounter
ld a, [H_WHOSETURN]
and a
jr z, .playersTurn
- ld hl, W_ENEMYBATTSTATUS3
- ld de, W_ENEMYTOXICCOUNTER
+ ld hl, wEnemyBattleStatus3
+ ld de, wEnemyToxcCounter
.playersTurn
bit BadlyPoisoned, [hl]
jr z, .noToxic
@@ -775,20 +775,20 @@ CheckNumAttacksLeft: ; 3c50f (f:450f)
and a
jr nz, .checkEnemy
; player has 0 attacks left
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
res UsingTrappingMove, [hl] ; player not using multi-turn attack like wrap any more
.checkEnemy
ld a, [wEnemyNumAttacksLeft]
and a
ret nz
; enemy has 0 attacks left
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res UsingTrappingMove, [hl] ; enemy not using multi-turn attack like wrap any more
ret
HandleEnemyMonFainted: ; 3c525 (f:4525)
xor a
- ld [wccf0], a
+ ld [wInHandlePlayerMonFainted], a
call FaintEnemyPokemon
call AnyPartyAlive
ld a, d
@@ -798,7 +798,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525)
ld a, [hli]
or [hl] ; is battle mon HP zero?
call nz, DrawPlayerHUDAndHPBar ; if battle mon HP is not zero, draw player HD and HP bar
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
ret z ; return if it's a wild battle
call AnyEnemyPokemonAliveCheck
@@ -821,7 +821,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525)
FaintEnemyPokemon: ; 0x3c567
call ReadPlayerMonCurHPAndStatus
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr z, .wild
ld a, [wEnemyMonPartyPos]
@@ -832,17 +832,26 @@ FaintEnemyPokemon: ; 0x3c567
ld [hli], a
ld [hl], a
.wild
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
res AttackingMultipleTimes, [hl]
- xor a
- ld [wPlayerNumHits], a
+; Bug. This only zeroes the high byte of the player's accumulated damage,
+; setting the accumulated damage to itself mod 256 instead of 0 as was probably
+; intended. That alone is problematic, but this mistake has another more severe
+; effect. This function's counterpart for when the player mon faints,
+; RemoveFaintedPlayerMon, zeroes both the high byte and the low byte. In a link
+; battle, the other player's Game Boy will call that function in response to
+; the enemy mon (the player mon from the other side's perspective) fainting,
+; and the states of the two Game Boys will go out of sync unless the damage
+; was congruent to 0 modulo 256.
+ xor a
+ ld [wPlayerBideAccumulatedDamage], a
ld hl, wEnemyStatsToDouble ; clear enemy statuses
ld [hli], a
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
- ld [W_ENEMYDISABLEDMOVE], a
+ ld [wEnemyDisabledMove], a
ld [wEnemyDisabledMoveNumber], a
ld [wEnemyMonMinimized], a
ld hl, wPlayerUsedMove
@@ -854,16 +863,16 @@ FaintEnemyPokemon: ; 0x3c567
coord hl, 0, 0
lb bc, 4, 11
call ClearScreenArea
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr z, .wild_win
xor a
- ld [wc0f1], a
- ld [wc0f2], a
+ ld [wFrequencyModifier], a
+ ld [wTempoModifier], a
ld a, SFX_FAINT_FALL
call PlaySoundWaitForCurrent
.sfxwait
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp SFX_FAINT_FALL
jr z, .sfxwait
ld a, SFX_FAINT_THUD
@@ -879,9 +888,9 @@ FaintEnemyPokemon: ; 0x3c567
ld a, [hli]
or [hl]
jr nz, .playermonnotfaint
- ld a, [wccf0]
- and a
- jr nz, .playermonnotfaint
+ ld a, [wInHandlePlayerMonFainted]
+ and a ; was this called by HandlePlayerMonFainted?
+ jr nz, .playermonnotfaint ; if so, don't call RemoveFaintedPlayerMon twice
call RemoveFaintedPlayerMon
.playermonnotfaint
call AnyPartyAlive
@@ -894,7 +903,7 @@ FaintEnemyPokemon: ; 0x3c567
call SaveScreenTilesToBuffer1
xor a
ld [wBattleResult], a
- ld b, EXP__ALL
+ ld b, EXP_ALL
call IsItemInBag
push af
jr z, .giveExpToMonsThatFought ; if no exp all, then jump
@@ -941,11 +950,13 @@ EnemyMonFaintedText: ; 0x3c63e
db "@"
EndLowHealthAlarm: ; 3c643 (f:4643)
+; This function is called when the player has the won the battle. It turns off
+; the low health alarm and prevents it from reactivating until the next battle.
xor a
- ld [wLowHealthAlarm], a ;disable low health alarm
- ld [wc02a], a
+ ld [wLowHealthAlarm], a ; turn off low health alarm
+ ld [wChannelSoundIDs + CH4], a
inc a
- ld [wccf6], a
+ ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating
ret
AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f)
@@ -967,7 +978,7 @@ AnyEnemyPokemonAliveCheck: ; 3c64f (f:464f)
; stores whether enemy ran in Z flag
ReplaceFaintedEnemyMon: ; 3c664 (f:4664)
- ld hl, wcf1e
+ ld hl, wEnemyHPBarColor
ld e, $30
call GetBattleHealthBarColor
callab DrawEnemyPokeballs
@@ -983,7 +994,7 @@ ReplaceFaintedEnemyMon: ; 3c664 (f:4664)
.notLinkBattle
call EnemySendOut
xor a
- ld [W_ENEMYMOVENUM], a
+ ld [wEnemyMoveNum], a
ld [wActionResultOrTookBattleTurn], a
ld [wAILayer2Encouragement], a
inc a ; reset Z flag
@@ -992,16 +1003,16 @@ ReplaceFaintedEnemyMon: ; 3c664 (f:4664)
TrainerBattleVictory: ; 3c696 (f:4696)
call EndLowHealthAlarm
ld b, MUSIC_DEFEATED_GYM_LEADER
- ld a, [W_GYMLEADERNO]
+ ld a, [wGymLeaderNo]
and a
jr nz, .gymleader
ld b, MUSIC_DEFEATED_TRAINER
.gymleader
- ld a, [W_TRAINERCLASS]
+ ld a, [wTrainerClass]
cp SONY3 ; final battle against rival
jr nz, .notrival
ld b, MUSIC_DEFEATED_GYM_LEADER
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
set 1, [hl]
.notrival
ld a, [wLinkState]
@@ -1036,7 +1047,7 @@ TrainerDefeatedText: ; 3c6e9 (f:46e9)
PlayBattleVictoryMusic: ; 3c6ee (f:46ee)
push af
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySoundWaitForCurrent
ld c, BANK(Music_DefeatedTrainer)
pop af
@@ -1044,8 +1055,8 @@ PlayBattleVictoryMusic: ; 3c6ee (f:46ee)
jp Delay3
HandlePlayerMonFainted: ; 3c700 (f:4700)
- ld a, $1
- ld [wccf0], a
+ ld a, 1
+ ld [wInHandlePlayerMonFainted], a
call RemoveFaintedPlayerMon
call AnyPartyAlive ; test if any more mons are alive
ld a, d
@@ -1057,7 +1068,7 @@ HandlePlayerMonFainted: ; 3c700 (f:4700)
jr nz, .doUseNextMonDialogue ; if not, jump
; the enemy mon has 0 HP
call FaintEnemyPokemon
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
ret z ; if wild encounter, battle is over
call AnyEnemyPokemonAliveCheck
@@ -1083,7 +1094,7 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
ld hl, wPartyGainExpFlags
ld b, FLAG_RESET
predef FlagActionPredef ; clear gain exp flag for fainted mon
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res 2, [hl] ; reset "attacking multiple times" flag
ld a, [wLowHealthAlarm]
bit 7, a ; skip sound flag (red bar (?))
@@ -1092,8 +1103,7 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
ld [wLowHealthAlarm], a ;disable low health alarm
call WaitForSoundToFinish
.skipWaitForSound
-; bug? if the player mon faints while the enemy mon is using bide,
-; the accumulated damage is overwritten. xxx what values can [wLowHealthAlarm] have here?
+; a is 0, so this zeroes the enemy's accumulated damage.
ld hl, wEnemyBideAccumulatedDamage
ld [hli], a
ld [hl], a
@@ -1107,9 +1117,15 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
call SlideDownFaintedMonPic
ld a, $1
ld [wBattleResult], a
- ld a, [wccf0]
- and a
- ret z
+
+; When the player mon and enemy mon faint at the same time and the fact that the
+; enemy mon has fainted is detected first (e.g. when the player mon knocks out
+; the enemy mon using a move with recoil and faints due to the recoil), don't
+; play the player mon's cry or show the "[player mon] fainted!" message.
+ ld a, [wInHandlePlayerMonFainted]
+ and a ; was this called by HandleEnemyMonFainted?
+ ret z ; if so, return
+
ld a, [wBattleMonSpecies]
call PlayCry
ld hl, PlayerMonFaintedText
@@ -1124,7 +1140,7 @@ PlayerMonFaintedText: ; 3c796 (f:4796)
DoUseNextMonDialogue: ; 3c79b (f:479b)
call PrintEmptyString
call SaveScreenTilesToBuffer1
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
dec a
ret nz ; return if it's a trainer battle
@@ -1191,7 +1207,7 @@ ChooseNextMon: ; 3c7d8 (f:47d8)
call GBPalWhiteOut
call LoadHudTilePatterns
call LoadScreenTilesFromBuffer1
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call GBPalNormal
call SendOutMon
ld hl, wEnemyMonHP
@@ -1205,8 +1221,8 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr z, .notSony1Battle
- ld a, [W_CUROPPONENT]
- cp $c8 + SONY1
+ ld a, [wCurOpponent]
+ cp OPP_SONY1
jr nz, .notSony1Battle
coord hl, 0, 0 ; sony 1 battle
lb bc, 8, 21
@@ -1216,12 +1232,12 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
call DelayFrames
ld hl, Sony1WinText
call PrintText
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp OAKS_LAB
ret z ; starter battle in oak's lab: don't black out
.notSony1Battle
- ld b, $0
- call GoPAL_SET
+ ld b, SET_PAL_BATTLE_BLACK
+ call RunPaletteCommand
ld hl, PlayerBlackedOutText2
ld a, [wLinkState]
cp LINK_STATE_BATTLING
@@ -1368,7 +1384,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld [hli],a
ld [hli],a
ld [hl],a
- ld [W_ENEMYDISABLEDMOVE],a
+ ld [wEnemyDisabledMove],a
ld [wEnemyDisabledMoveNumber],a
ld [wEnemyMonMinimized],a
ld hl,wPlayerUsedMove
@@ -1376,7 +1392,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld [hl],a
dec a
ld [wAICount],a
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
res 5,[hl]
coord hl, 18, 0
ld a,8
@@ -1416,7 +1432,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld bc,wEnemyMon2 - wEnemyMon1
call AddNTimes
ld a,[hl]
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
ld a,[wWhichPokemon]
inc a
ld hl,wEnemyPartyCount
@@ -1443,7 +1459,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld a,[wLinkState]
cp LINK_STATE_BATTLING
jr z,.next4
- ld a,[W_OPTIONS]
+ ld a,[wOptions]
bit 6,a
jr nz,.next4
ld hl, TrainerAboutToUseText
@@ -1486,8 +1502,8 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
coord hl, 0, 0
lb bc, 4, 11
call ClearScreenArea
- ld b,1
- call GoPAL_SET
+ ld b, SET_PAL_BATTLE
+ call RunPaletteCommand
call GBPalNormal
ld hl,TrainerSentOutText
call PrintText
@@ -1567,13 +1583,13 @@ NoWillText: ; 3cab4 (f:4ab4)
TryRunningFromBattle: ; 3cab9 (f:4ab9)
call IsGhostBattle
jp z, .canEscape ; jump if it's a ghost battle
- ld a, [W_BATTLETYPE]
- cp $2
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
jp z, .canEscape ; jump if it's a safari battle
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jp z, .canEscape
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr nz, .trainerBattle ; jump if it's a trainer battle
ld a, [wNumRunAttempts]
@@ -1720,7 +1736,7 @@ LoadBattleMonFromParty: ; 3cba6 (f:4ba6)
ld a, [wPlayerMonNumber]
call SkipFixedLengthTextEntries
ld de, wBattleMonNick
- ld bc, $b
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wBattleMonLevel
ld de, wPlayerMonUnmodifiedLevel ; block of memory used for unmodified stats
@@ -1764,14 +1780,14 @@ LoadEnemyMonFromParty: ; 3cc13 (f:4c13)
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
ld de, wEnemyMonNick
- ld bc, $b
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wEnemyMonLevel
ld de, wEnemyMonUnmodifiedLevel ; block of memory used for unmodified stats
ld bc, 1 + NUM_STATS * 2
call CopyData
call ApplyBurnAndParalysisPenaltiesToEnemy
- ld hl, W_MONHBASESTATS
+ ld hl, wMonHBaseStats
ld de, wEnemyMonBaseStats
ld b, NUM_STATS
.copyBaseStatsLoop
@@ -1808,7 +1824,7 @@ SendOutMon: ; 3cc91 (f:4c91)
ld [hl], a
ld [wBoostExpByExpAll], a
ld [wDamageMultipliers], a
- ld [W_PLAYERMOVENUM], a
+ ld [wPlayerMoveNum], a
ld hl, wPlayerUsedMove
ld [hli], a
ld [hl], a
@@ -1818,12 +1834,12 @@ SendOutMon: ; 3cc91 (f:4c91)
ld [hli], a
ld [hli], a
ld [hl], a
- ld [W_PLAYERDISABLEDMOVE], a
+ ld [wPlayerDisabledMove], a
ld [wPlayerDisabledMoveNumber], a
ld [wPlayerMonMinimized], a
- ld b, $1
- call GoPAL_SET
- ld hl, W_ENEMYBATTSTATUS1
+ ld b, SET_PAL_BATTLE
+ call RunPaletteCommand
+ ld hl, wEnemyBattleStatus1
res UsingTrappingMove, [hl]
ld a, $1
ld [H_WHOSETURN], a
@@ -1918,17 +1934,17 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
predef DrawHP
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, wcf1d
+ ld hl, wPlayerHPBarColor
call GetBattleHealthBarColor
ld hl, wBattleMonHP
ld a, [hli]
or [hl]
jr z, .asm_3cdd9
- ld a, [wccf6]
- and a
- ret nz
- ld a, [wcf1d]
- cp $2
+ ld a, [wLowHealthAlarmDisabled]
+ and a ; has the alarm been disabled because the player has already won?
+ ret nz ; if so, return
+ ld a, [wPlayerHPBarColor]
+ cp HP_BAR_RED
jr z, .asm_3cde6
.asm_3cdd9
ld hl, wLowHealthAlarm
@@ -1936,7 +1952,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
ld [hl], $0
ret z
xor a
- ld [wc02a], a
+ ld [wChannelSoundIDs + CH4], a
ret
.asm_3cde6
ld hl, wLowHealthAlarm
@@ -2031,7 +2047,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
call DrawHPBar
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
- ld hl, wcf1e
+ ld hl, wEnemyHPBarColor
GetBattleHealthBarColor: ; 3ce90 (f:4e90)
ld b, [hl]
@@ -2039,8 +2055,8 @@ GetBattleHealthBarColor: ; 3ce90 (f:4e90)
ld a, [hl]
cp b
ret z
- ld b, $1
- jp GoPAL_SET
+ ld b, SET_PAL_BATTLE
+ jp RunPaletteCommand
; center's mon's name on the battle screen
; if the name is 1 or 2 letters long, it is printed 2 spaces more to the right than usual
@@ -2070,28 +2086,28 @@ CenterMonName: ; 3ce9c (f:4e9c)
DisplayBattleMenu: ; 3ceb3 (f:4eb3)
call LoadScreenTilesFromBuffer1 ; restore saved screen
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
and a
jr nz, .nonstandardbattle
call DrawHUDsAndHPBars
call PrintEmptyString
call SaveScreenTilesToBuffer1
.nonstandardbattle
- ld a, [W_BATTLETYPE]
- cp $2 ; safari
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
ld a, BATTLE_MENU_TEMPLATE
jr nz, .menuselected
ld a, SAFARI_BATTLE_MENU_TEMPLATE
.menuselected
ld [wTextBoxID], a
call DisplayTextBoxID
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
dec a
jp nz, .handleBattleMenuInput ; handle menu input if it's not the old man tutorial
; the following happens for the old man tutorial
ld hl, wPlayerName
- ld de, W_GRASSRATE
- ld bc, 11
+ ld de, wGrassRate
+ ld bc, NAME_LENGTH
call CopyData ; temporarily save the player name in unused space,
; which is supposed to get overwritten when entering a
; map with wild Pokémon. Due to an oversight, the data
@@ -2099,7 +2115,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
; Missingno. glitch can show up.
ld hl, .oldManName
ld de, wPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
; the following simulates the keystrokes by drawing menus on screen
coord hl, 9, 14
@@ -2127,8 +2143,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
ld [wLastMenuItem], a
jr .rightColumn
.leftColumn ; put cursor in left column of menu
- ld a, [W_BATTLETYPE]
- cp $2
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
ld a, " "
jr z, .safariLeftColumn
; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle)
@@ -2140,7 +2156,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
Coorda 13, 14
Coorda 13, 16
coord hl, 7, 14
- ld de, W_NUMSAFARIBALLS
+ ld de, wNumSafariBalls
lb bc, 1, 2
call PrintNumber
ld b, $1 ; top menu item X
@@ -2160,8 +2176,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
jr nz, .rightColumn
jr .AButtonPressed ; the A button was pressed
.rightColumn ; put cursor in right column of menu
- ld a, [W_BATTLETYPE]
- cp $2
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
ld a, " "
jr z, .safariRightColumn
; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle)
@@ -2173,7 +2189,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
Coorda 1, 14 ; clear upper cursor position in left column
Coorda 1, 16 ; clear lower cursor position in left column
coord hl, 7, 14
- ld de, W_NUMSAFARIBALLS
+ ld de, wNumSafariBalls
lb bc, 1, 2
call PrintNumber
ld b, $d ; top menu item X
@@ -2197,8 +2213,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
ld [wCurrentMenuItem], a
.AButtonPressed
call PlaceUnfilledArrowMenuCursor
- ld a, [W_BATTLETYPE]
- cp $2 ; is it a Safari battle?
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
ld a, [wCurrentMenuItem]
ld [wBattleAndStartSavedMenuItem], a
jr z, .handleMenuSelection
@@ -2219,8 +2235,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
and a
jr nz, .upperLeftMenuItemWasNotSelected
; the upper left menu item was selected
- ld a, [W_BATTLETYPE]
- cp $2
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
jr z, .throwSafariBallWasSelected
; the "FIGHT" menu was selected
xor a
@@ -2247,8 +2263,8 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
.notLinkBattle
call SaveScreenTilesToBuffer2
- ld a, [W_BATTLETYPE]
- cp $2 ; is it a safari battle?
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
jr nz, BagWasSelected
; bait was selected
@@ -2258,14 +2274,14 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
BagWasSelected:
call LoadScreenTilesFromBuffer1
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
and a ; is it a normal battle?
jr nz, .next
; normal battle
call DrawHUDsAndHPBars
.next
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
dec a ; is it the old man tutorial?
jr nz, DisplayPlayerBag ; no, it is a normal battle
ld hl, OldManItemList
@@ -2316,21 +2332,21 @@ UseBagItem:
call ClearSprites
xor a
ld [wCurrentMenuItem], a
- ld a, [W_BATTLETYPE]
- cp $2 ; is it a safari battle?
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
jr z, .checkIfMonCaptured
ld a, [wActionResultOrTookBattleTurn]
and a ; was the item used successfully?
jp z, BagWasSelected ; if not, go back to the bag menu
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
bit UsingTrappingMove, a ; is the player using a multi-turn move like wrap?
jr z, .checkIfMonCaptured
ld hl, wPlayerNumAttacksLeft
dec [hl]
jr nz, .checkIfMonCaptured
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
res UsingTrappingMove, [hl] ; not using multi-turn move any more
.checkIfMonCaptured
@@ -2338,8 +2354,8 @@ UseBagItem:
and a ; was the enemy mon captured with a ball?
jr nz, .returnAfterCapturingMon
- ld a, [W_BATTLETYPE]
- cp $2 ; is it a safari battle?
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
jr z, .returnAfterUsingItem_NoCapture
; not a safari battle
call LoadScreenTilesFromBuffer1
@@ -2369,8 +2385,8 @@ PartyMenuOrRockOrRun:
jp nz, BattleMenu_RunWasSelected
; party menu or rock was selected
call SaveScreenTilesToBuffer2
- ld a, [W_BATTLETYPE]
- cp $2 ; is it a safari battle?
+ ld a, [wBattleType]
+ cp BATTLE_TYPE_SAFARI
jr nz, .partyMenuWasSelected
; safari battle
ld a, SAFARI_ROCK
@@ -2389,12 +2405,12 @@ PartyMenuOrRockOrRun:
call GBPalWhiteOut
call LoadHudTilePatterns
call LoadScreenTilesFromBuffer2
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call GBPalNormal
jp DisplayBattleMenu
.partyMonDeselected
coord hl, 11, 11
- ld bc, $81
+ ld bc, 6 * SCREEN_WIDTH + 9
ld a, " "
call FillMemory
xor a ; NORMAL_PARTY_MENU
@@ -2437,7 +2453,7 @@ PartyMenuOrRockOrRun:
predef StatusScreen
predef StatusScreen2
; now we need to reload the enemy mon pic
- ld a, [W_ENEMYBATTSTATUS2]
+ ld a, [wEnemyBattleStatus2]
bit HasSubstituteUp, a ; does the enemy mon have a substitute?
ld hl, AnimationSubstitute
jr nz, .doEnemyMonAnimation
@@ -2478,7 +2494,7 @@ PartyMenuOrRockOrRun:
call ClearSprites
call LoadHudTilePatterns
call LoadScreenTilesFromBuffer1
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call GBPalNormal
; fall through to SwitchPlayerMon
@@ -2625,8 +2641,8 @@ MoveSelectionMenu: ; 3d219 (f:5219)
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr z, .matchedkeyspicked
- ld a, [W_FLAGS_D733]
- bit 0, a
+ ld a, [wFlags_D733]
+ bit BIT_TEST_BATTLE, a
ld b, D_UP | D_DOWN | A_BUTTON | B_BUTTON | SELECT
jr z, .matchedkeyspicked
ld b, $ff
@@ -2653,8 +2669,8 @@ SelectMenuItem: ; 3d2fe (f:52fe)
call PlaceString
jr .select
.battleselect
- ld a, [W_FLAGS_D733]
- bit 0, a
+ ld a, [wFlags_D733]
+ bit BIT_TEST_BATTLE, a
jr nz, .select
call PrintMenuItem
ld a, [wMenuItemToSwap]
@@ -2708,13 +2724,13 @@ SelectMenuItem: ; 3d2fe (f:52fe)
ld a, [hl]
and $3f
jr z, .nopp
- ld a, [W_PLAYERDISABLEDMOVE]
+ ld a, [wPlayerDisabledMove]
swap a
and $f
dec a
cp c
jr z, .disabled
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
bit 3, a ; transformed
jr nz, .dummy ; game freak derp
.dummy
@@ -2775,7 +2791,7 @@ AnyMoveToSelect: ; 3d3f5 (f:53f5)
; return z and Struggle as the selected move if all moves have 0 PP and/or are disabled
ld a, STRUGGLE
ld [wPlayerSelectedMove], a
- ld a, [W_PLAYERDISABLEDMOVE]
+ ld a, [wPlayerDisabledMove]
and a
ld hl, wBattleMonPP
jr nz, .asm_3d40e
@@ -2827,7 +2843,7 @@ SwapMovesInMenu: ; 3d435 (f:5435)
ld hl, wBattleMonPP
call .swapBytes ; swap move PP
; update the index of the disabled move if necessary
- ld hl, W_PLAYERDISABLEDMOVE
+ ld hl, wPlayerDisabledMove
ld a, [hl]
swap a
and $f
@@ -2901,7 +2917,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
ld b, $3
ld c, $9
call TextBoxBorder
- ld a, [W_PLAYERDISABLEDMOVE]
+ ld a, [wPlayerDisabledMove]
and a
jr z, .notDisabled
swap a
@@ -2954,7 +2970,7 @@ PrintMenuItem: ; 3d4b6 (f:54b6)
lb bc, 1, 2
call PrintNumber
coord hl, 8, 11
- ld de, wd11e
+ ld de, wMaxPP
lb bc, 1, 2
call PrintNumber
call GetCurrentMove
@@ -2998,20 +3014,20 @@ SelectEnemyMove: ; 3d564 (f:5564)
ld a, [hl]
jr .done
.noLinkBattle
- ld a, [W_ENEMYBATTSTATUS2]
+ ld a, [wEnemyBattleStatus2]
and (1 << NeedsToRecharge) | (1 << UsingRage) ; need to recharge or using rage
ret nz
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld a, [hl]
and (1 << ChargingUp) | (1 << ThrashingAbout) ; using a charging move or thrash/petal dance
ret nz
ld a, [wEnemyMonStatus]
and SLP | 1 << FRZ ; sleeping or frozen
ret nz
- ld a, [W_ENEMYBATTSTATUS1]
+ ld a, [wEnemyBattleStatus1]
and (1 << UsingTrappingMove) | (1 << StoringEnergy) ; using a trapping move like wrap or bide
ret nz
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
bit UsingTrappingMove, a ; caught in player's trapping move (e.g. wrap)
jr z, .canSelectMove
.unableToSelectMove
@@ -3022,12 +3038,12 @@ SelectEnemyMove: ; 3d564 (f:5564)
ld a, [hld]
and a
jr nz, .atLeastTwoMovesAvailable
- ld a, [W_ENEMYDISABLEDMOVE]
+ ld a, [wEnemyDisabledMove]
and a
ld a, STRUGGLE ; struggle if the only move is disabled
jr nz, .done
.atLeastTwoMovesAvailable
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr z, .chooseRandomMove ; wild encounter
callab AIEnemyTrainerChooseMoves
@@ -3051,7 +3067,7 @@ SelectEnemyMove: ; 3d564 (f:5564)
ld a, b
dec a
ld [wEnemyMoveListIndex], a
- ld a, [W_ENEMYDISABLEDMOVE]
+ ld a, [wEnemyDisabledMove]
swap a
and $f
cp b
@@ -3123,7 +3139,7 @@ ExecutePlayerMove: ; 3d65e (f:565e)
inc a
jp z, ExecutePlayerMoveDone ; for selected move = FF, skip most of player's turn
xor a
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ld [wMonIsDisobedient], a
ld [wMoveDidntMiss], a
ld a, $a
@@ -3138,14 +3154,14 @@ ExecutePlayerMove: ; 3d65e (f:565e)
jp [hl]
.playerHasNoSpecialCondition
call GetCurrentMove
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
bit ChargingUp, [hl] ; charging up for attack
jr nz, PlayerCanExecuteChargingMove
call CheckForDisobedience
jp z, ExecutePlayerMoveDone
CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a)
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
cp CHARGE_EFFECT
jp z, JumpMoveEffect
cp FLY_EFFECT
@@ -3154,7 +3170,7 @@ CheckIfPlayerNeedsToChargeUp: ; 3d69a (f:569a)
; in-battle stuff
PlayerCanExecuteChargingMove: ; 3d6a9 (f:56a9)
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
res ChargingUp,[hl] ; reset charging up and invulnerability statuses if mon was charging up for an attack
; being fully paralyzed or hurting oneself in confusion removes charging up status
; resulting in the Pokemon being invulnerable for the whole battle
@@ -3165,19 +3181,19 @@ PlayerCanExecuteMove: ; 3d6b0 (f:56b0)
ld de,wPlayerSelectedMove ; pointer to the move just used
ld b,BANK(DecrementPP)
call Bankswitch
- ld a,[W_PLAYERMOVEEFFECT] ; effect of the move just used
+ ld a,[wPlayerMoveEffect] ; effect of the move just used
ld hl,ResidualEffects1
ld de,1
call IsInArray
jp c,JumpMoveEffect ; ResidualEffects1 moves skip damage calculation and accuracy tests
; unless executed as part of their exclusive effect functions
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
ld hl,SpecialEffectsCont
ld de,1
call IsInArray
call c,JumpMoveEffect ; execute the effects of SpecialEffectsCont moves (e.g. Wrap, Thrash) but don't skip anything
PlayerCalcMoveDamage: ; 3d6dc (f:56dc)
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
ld hl,SetDamageEffects
ld de,1
call IsInArray
@@ -3194,33 +3210,33 @@ PlayerCalcMoveDamage: ; 3d6dc (f:56dc)
.moveHitTest
call MoveHitTest
handleIfPlayerMoveMissed
- ld a,[W_MOVEMISSED]
+ ld a,[wMoveMissed]
and a
jr z,getPlayerAnimationType
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
sub a,EXPLODE_EFFECT
jr z,playPlayerMoveAnimation ; don't play any animation if the move missed, unless it was EXPLODE_EFFECT
jr playerCheckIfFlyOrChargeEffect
getPlayerAnimationType
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
and a
ld a,4 ; move has no effect other than dealing damage
jr z,playPlayerMoveAnimation
ld a,5 ; move has effect
playPlayerMoveAnimation
push af
- ld a,[W_PLAYERBATTSTATUS2]
+ ld a,[wPlayerBattleStatus2]
bit HasSubstituteUp,a
ld hl,HideSubstituteShowMonAnim
ld b,BANK(HideSubstituteShowMonAnim)
call nz,Bankswitch
pop af
ld [wAnimationType],a
- ld a,[W_PLAYERMOVENUM]
+ ld a,[wPlayerMoveNum]
call PlayMoveAnimation
call HandleExplodingAnimation
call DrawPlayerHUDAndHPBar
- ld a,[W_PLAYERBATTSTATUS2]
+ ld a,[wPlayerBattleStatus2]
bit HasSubstituteUp,a
ld hl,ReshowSubstituteAnim
ld b,BANK(ReshowSubstituteAnim)
@@ -3229,7 +3245,7 @@ playPlayerMoveAnimation
playerCheckIfFlyOrChargeEffect
ld c,30
call DelayFrames
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
cp a,FLY_EFFECT
jr z,.playAnim
cp a,CHARGE_EFFECT
@@ -3241,7 +3257,7 @@ playerCheckIfFlyOrChargeEffect
ld a,STATUS_AFFECTED_ANIM
call PlayMoveAnimation
MirrorMoveCheck
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
cp a,MIRROR_MOVE_EFFECT
jr nz,.metronomeCheck
call MirrorMoveCopyMove
@@ -3255,16 +3271,16 @@ MirrorMoveCheck
call MetronomePickMove
jp CheckIfPlayerNeedsToChargeUp ; Go back to damage calculation for the move picked by Metronome
.next
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
ld hl,ResidualEffects2
ld de,1
call IsInArray
jp c,JumpMoveEffect ; done here after executing effects of ResidualEffects2
- ld a,[W_MOVEMISSED]
+ ld a,[wMoveMissed]
and a
jr z,.moveDidNotMiss
call PrintMoveFailureText
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
cp a,EXPLODE_EFFECT ; even if Explosion or Selfdestruct missed, its effect still needs to be activated
jr z,.notDone
jp ExecutePlayerMoveDone ; otherwise, we're done if the move missed
@@ -3275,7 +3291,7 @@ MirrorMoveCheck
ld a,1
ld [wMoveDidntMiss],a
.notDone
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
ld hl,AlwaysHappenSideEffects
ld de,1
call IsInArray
@@ -3287,7 +3303,7 @@ MirrorMoveCheck
ret z ; don't do anything else if the enemy fainted
call HandleBuildingRage
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
bit AttackingMultipleTimes,[hl]
jr z,.executeOtherEffects
ld a,[wPlayerNumAttacksLeft]
@@ -3301,7 +3317,7 @@ MirrorMoveCheck
xor a
ld [wPlayerNumHits],a
.executeOtherEffects
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
and a
jp z,ExecutePlayerMoveDone
ld hl,SpecialEffects
@@ -3352,10 +3368,10 @@ GetOutText: ; 3d835 (f:5835)
db "@"
IsGhostBattle: ; 3d83a (f:583a)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
dec a
ret nz
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,POKEMONTOWER_1
jr c,.next
cp a,LAVENDER_HOUSE_1
@@ -3408,7 +3424,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
jp .returnToHL
.HeldInPlaceCheck
- ld a,[W_ENEMYBATTSTATUS1]
+ ld a,[wEnemyBattleStatus1]
bit UsingTrappingMove,a ; is enemy using a mult-turn move like wrap?
jp z,.FlinchedCheck
ld hl,CantMoveText
@@ -3417,7 +3433,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
jp .returnToHL
.FlinchedCheck
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
bit Flinched,[hl]
jp z,.HyperBeamCheck
res Flinched,[hl] ; reset player's flinch status
@@ -3427,7 +3443,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
jp .returnToHL
.HyperBeamCheck
- ld hl,W_PLAYERBATTSTATUS2
+ ld hl,wPlayerBattleStatus2
bit NeedsToRecharge,[hl]
jr z,.AnyMoveDisabledCheck
res NeedsToRecharge,[hl] ; reset player's recharge status
@@ -3437,7 +3453,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
jp .returnToHL
.AnyMoveDisabledCheck
- ld hl,W_PLAYERDISABLEDMOVE
+ ld hl,wPlayerDisabledMove
ld a,[hl]
and a
jr z,.ConfusedCheck
@@ -3451,13 +3467,13 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
call PrintText
.ConfusedCheck
- ld a,[W_PLAYERBATTSTATUS1]
+ ld a,[wPlayerBattleStatus1]
add a ; is player confused?
jr nc,.TriedToUseDisabledMoveCheck
- ld hl,W_PLAYERCONFUSEDCOUNTER
+ ld hl,wPlayerConfusedCounter
dec [hl]
jr nz,.IsConfused
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
res Confused,[hl] ; if confused counter hit 0, reset confusion status
ld hl,ConfusedNoMoreText
call PrintText
@@ -3472,9 +3488,9 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
call BattleRandom
cp a,$80 ; 50% chance to hurt itself
jr c,.TriedToUseDisabledMoveCheck
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
ld a,[hl]
- and a, 1 << Confused ; if mon hurts itself, clear every other status from W_PLAYERBATTSTATUS1
+ and a, 1 << Confused ; if mon hurts itself, clear every other status from wPlayerBattleStatus1
ld [hl],a
call HandleSelfConfusionDamage
jr .MonHurtItselfOrFullyParalysed
@@ -3502,12 +3518,12 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
call PrintText
.MonHurtItselfOrFullyParalysed
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
ld a,[hl]
; clear bide, thrashing, charging up, and trapping moves such as warp (already cleared for confusion damage)
and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
ld [hl],a
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
cp a,FLY_EFFECT
jr z,.FlyOrChargeEffect
cp a,CHARGE_EFFECT
@@ -3524,12 +3540,12 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
jp .returnToHL ; if using a two-turn move, we need to recharge the first turn
.BideCheck
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
bit StoringEnergy,[hl] ; is mon using bide?
jr z,.ThrashingAboutCheck
xor a
- ld [W_PLAYERMOVENUM],a
- ld hl,W_DAMAGE
+ ld [wPlayerMoveNum],a
+ ld hl,wDamage
ld a,[hli]
ld b,a
ld c,[hl]
@@ -3546,30 +3562,30 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
ld hl,ExecutePlayerMoveDone
jp .returnToHL ; unless mon unleashes energy, can't move this turn
.UnleashEnergy
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
res StoringEnergy,[hl] ; not using bide any more
ld hl,UnleashedEnergyText
call PrintText
ld a,1
- ld [W_PLAYERMOVEPOWER],a
+ ld [wPlayerMovePower],a
ld hl,wPlayerBideAccumulatedDamage + 1
ld a,[hld]
add a
ld b,a
- ld [W_DAMAGE + 1],a
+ ld [wDamage + 1],a
ld a,[hl]
rl a ; double the damage
- ld [W_DAMAGE],a
+ ld [wDamage],a
or b
jr nz,.next
ld a,1
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
.next
xor a
ld [hli],a
ld [hl],a
ld a,BIDE
- ld [W_PLAYERMOVENUM],a
+ ld [wPlayerMoveNum],a
ld hl,handleIfPlayerMoveMissed ; skip damage calculation, DecrementPP and MoveHitTest
jp .returnToHL
@@ -3577,7 +3593,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
bit ThrashingAbout,[hl] ; is mon using thrash or petal dance?
jr z,.MultiturnMoveCheck
ld a,THRASH
- ld [W_PLAYERMOVENUM],a
+ ld [wPlayerMoveNum],a
ld hl,ThrashingAboutText
call PrintText
ld hl,wPlayerNumAttacksLeft
@@ -3585,14 +3601,14 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
ld hl,PlayerCalcMoveDamage ; skip DecrementPP
jp nz,.returnToHL
push hl
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
res ThrashingAbout,[hl] ; no longer thrashing about
set Confused,[hl] ; confused
call BattleRandom
and a,3
inc a
inc a ; confused for 2-5 turns
- ld [W_PLAYERCONFUSEDCOUNTER],a
+ ld [wPlayerConfusedCounter],a
pop hl ; skip DecrementPP
jp .returnToHL
@@ -3610,7 +3626,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
jp .returnToHL
.RageCheck
- ld a, [W_PLAYERBATTSTATUS2]
+ ld a, [wPlayerBattleStatus2]
bit UsingRage, a ; is mon using rage?
jp z, .checkPlayerStatusConditionsDone ; if we made it this far, mon can move normally this turn
ld a, RAGE
@@ -3618,7 +3634,7 @@ CheckPlayerStatusConditions: ; 3d854 (f:5854)
call GetMoveName
call CopyStringToCF4B
xor a
- ld [W_PLAYERMOVEEFFECT], a
+ ld [wPlayerMoveEffect], a
ld hl, PlayerCanExecuteMove
jp .returnToHL
@@ -3693,12 +3709,12 @@ CantMoveText: ; 3da83 (f:5a83)
PrintMoveIsDisabledText: ; 3da88 (f:5a88)
ld hl, wPlayerSelectedMove
- ld de, W_PLAYERBATTSTATUS1
+ ld de, wPlayerBattleStatus1
ld a, [H_WHOSETURN]
and a
jr z, .removeChargingUp
inc hl
- ld de, W_ENEMYBATTSTATUS1
+ ld de, wEnemyBattleStatus1
.removeChargingUp
ld a, [de]
res ChargingUp, a ; end the pokemon's
@@ -3725,7 +3741,7 @@ HandleSelfConfusionDamage: ; 3daad (f:5aad)
ld [hli], a
ld a, [wBattleMonDefense + 1]
ld [hl], a
- ld hl, W_PLAYERMOVEEFFECT
+ ld hl, wPlayerMoveEffect
push hl
ld a, [hl]
push af
@@ -3771,10 +3787,10 @@ MonName1Text: ; 3dafb (f:5afb)
TX_ASM
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
ld hl, wPlayerUsedMove
jr z, .asm_3db11
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
ld hl, wEnemyUsedMove
.asm_3db11
ld [hl], a
@@ -3905,11 +3921,11 @@ ExclamationPointMoveSets: ; 3dba3 (f:5ba3)
db $FF ; terminator
PrintMoveFailureText: ; 3dbe2 (f:5be2)
- ld de, W_PLAYERMOVEEFFECT
+ ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .playersTurn
- ld de, W_ENEMYMOVEEFFECT
+ ld de, wEnemyMoveEffect
.playersTurn
ld hl, DoesntAffectMonText
ld a, [wDamageMultipliers]
@@ -3931,7 +3947,7 @@ PrintMoveFailureText: ; 3dbe2 (f:5be2)
ret nz
; if you get here, the mon used jump kick or hi jump kick and missed
- ld hl, W_DAMAGE ; since the move missed, W_DAMAGE will always contain 0 at this point.
+ ld hl, wDamage ; since the move missed, wDamage will always contain 0 at this point.
; Thus, recoil damage will always be equal to 1
; even if it was intended to be potential damage/8.
ld a, [hli]
@@ -4041,7 +4057,7 @@ CheckForDisobedience: ; 3dc88 (f:5c88)
; it was traded
.monIsTraded
; what level might disobey?
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
bit 7, [hl]
ld a, 101
jr nz, .next
@@ -4218,15 +4234,15 @@ IgnoredOrdersText: ; 3ddca (f:5dca)
; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the player mon
GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf)
xor a
- ld hl, W_DAMAGE ; damage to eventually inflict, initialise to zero
+ ld hl, wDamage ; damage to eventually inflict, initialise to zero
ldi [hl], a
ld [hl], a
- ld hl, W_PLAYERMOVEPOWER
+ ld hl, wPlayerMovePower
ld a, [hli]
and a
ld d, a ; d = move power
ret z ; return if move power is zero
- ld a, [hl] ; a = [W_PLAYERMOVETYPE]
+ ld a, [hl] ; a = [wPlayerMoveType]
cp FIRE ; types >= FIRE are all special
jr nc, .specialAttack
.physicalAttack
@@ -4234,7 +4250,7 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf)
ld a, [hli]
ld b, a
ld c, [hl] ; bc = enemy defense
- ld a, [W_ENEMYBATTSTATUS3]
+ ld a, [wEnemyBattleStatus3]
bit HasReflectUp, a ; check for Reflect
jr z, .physicalAttackCritCheck
; if the enemy has used Reflect, double the enemy's defense
@@ -4264,7 +4280,7 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf)
ld a, [hli]
ld b, a
ld c, [hl] ; bc = enemy special
- ld a, [W_ENEMYBATTSTATUS3]
+ ld a, [wEnemyBattleStatus3]
bit HasLightScreenUp, a ; check for Light Screen
jr z, .specialAttackCritCheck
; if the enemy has used Light Screen, double the enemy's special
@@ -4330,16 +4346,16 @@ GetDamageVarsForPlayerAttack: ; 3ddcf (f:5dcf)
; sets b, c, d, and e for the CalculateDamage routine in the case of an attack by the enemy mon
GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75)
- ld hl, W_DAMAGE ; damage to eventually inflict, initialise to zero
+ ld hl, wDamage ; damage to eventually inflict, initialise to zero
xor a
ld [hli], a
ld [hl], a
- ld hl, W_ENEMYMOVEPOWER
+ ld hl, wEnemyMovePower
ld a, [hli]
ld d, a ; d = move power
and a
ret z ; return if move power is zero
- ld a, [hl] ; a = [W_ENEMYMOVETYPE]
+ ld a, [hl] ; a = [wEnemyMoveType]
cp FIRE ; types >= FIRE are all special
jr nc, .specialAttack
.physicalAttack
@@ -4347,7 +4363,7 @@ GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75)
ld a, [hli]
ld b, a
ld c, [hl] ; bc = player defense
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
bit HasReflectUp, a ; check for Reflect
jr z, .physicalAttackCritCheck
; if the player has used Reflect, double the player's defense
@@ -4377,7 +4393,7 @@ GetDamageVarsForEnemyAttack: ; 3de75 (f:5e75)
ld a, [hli]
ld b, a
ld c, [hl]
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
bit HasLightScreenUp, a ; check for Light Screen
jr z, .specialAttackCritCheck
; if the player has used Light Screen, double the player's special
@@ -4467,7 +4483,7 @@ GetEnemyMonStat: ; 3df1c (f:5f1c)
ret
.notLinkBattle
ld a, [wEnemyMonLevel]
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, [wEnemyMonSpecies]
ld [wd0b5], a
call GetMonHeader
@@ -4494,9 +4510,9 @@ CalculateDamage: ; 3df65 (f:5f65)
ld a, [H_WHOSETURN] ; whose turn?
and a
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
jr z, .effect
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
.effect
; EXPLODE_EFFECT halves defense.
@@ -4573,7 +4589,7 @@ CalculateDamage: ; 3df65 (f:5f65)
ld b, 4
call Divide
- ld hl, W_DAMAGE
+ ld hl, wDamage
ld b, [hl]
ld a, [H_QUOTIENT + 3]
add b
@@ -4649,7 +4665,7 @@ CalculateDamage: ; 3df65 (f:5f65)
JumpToOHKOMoveEffect: ; 3e016 (f:6016)
call JumpMoveEffect
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
dec a
ret
@@ -4676,16 +4692,16 @@ CriticalHitTest: ; 3e023 (f:6023)
.asm_3e032
ld [wd0b5], a
call GetMonHeader
- ld a, [W_MONHBASESPEED]
+ ld a, [wMonHBaseSpeed]
ld b, a
srl b ; (effective (base speed/2))
ld a, [H_WHOSETURN]
and a
- ld hl, W_PLAYERMOVEPOWER
- ld de, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerMovePower
+ ld de, wPlayerBattleStatus2
jr z, .calcCriticalHitProbability
- ld hl, W_ENEMYMOVEPOWER
- ld de, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyMovePower
+ ld de, wEnemyBattleStatus2
.calcCriticalHitProbability
ld a, [hld] ; read base power from RAM
and a
@@ -4752,18 +4768,18 @@ HandleCounterMove: ; 3e093 (f:6093)
and a
; player's turn
ld hl,wEnemySelectedMove
- ld de,W_ENEMYMOVEPOWER
+ ld de,wEnemyMovePower
ld a,[wPlayerSelectedMove]
jr z,.next
; enemy's turn
ld hl,wPlayerSelectedMove
- ld de,W_PLAYERMOVEPOWER
+ ld de,wPlayerMovePower
ld a,[wEnemySelectedMove]
.next
cp a,COUNTER
ret nz ; return if not using Counter
ld a,$01
- ld [W_MOVEMISSED],a ; initialize the move missed variable to true (it is set to false below if the move hits)
+ ld [wMoveMissed],a ; initialize the move missed variable to true (it is set to false below if the move hits)
ld a,[hl]
cp a,COUNTER
ret z ; miss if the opponent's last selected move is Counter.
@@ -4781,11 +4797,11 @@ HandleCounterMove: ; 3e093 (f:6093)
xor a
ret
.counterableType
- ld hl,W_DAMAGE
+ ld hl,wDamage
ld a,[hli]
or [hl]
ret z ; If we made it here, Counter still misses if the last move used in battle did no damage to its target.
- ; W_DAMAGE is shared by both players, so Counter may strike back damage dealt by the Counter user itself
+ ; wDamage is shared by both players, so Counter may strike back damage dealt by the Counter user itself
; if the conditions meet, even though 99% of the times damage will come from the target.
; if it did damage, double it
ld a,[hl]
@@ -4801,27 +4817,27 @@ HandleCounterMove: ; 3e093 (f:6093)
ld [hl],a
.noCarry
xor a
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
call MoveHitTest ; do the normal move hit test in addition to Counter's special rules
xor a
ret
ApplyAttackToEnemyPokemon: ; 3e0df (f:60df)
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
cp a,OHKO_EFFECT
jr z,ApplyDamageToEnemyPokemon
cp a,SUPER_FANG_EFFECT
jr z,.superFangEffect
cp a,SPECIAL_DAMAGE_EFFECT
jr z,.specialDamage
- ld a,[W_PLAYERMOVEPOWER]
+ ld a,[wPlayerMovePower]
and a
jp z,ApplyAttackToEnemyPokemonDone ; no attack to apply if base power is 0
jr ApplyDamageToEnemyPokemon
.superFangEffect
; set the damage to half the target's HP
ld hl,wEnemyMonHP
- ld de,W_DAMAGE
+ ld de,wDamage
ld a,[hli]
srl a
ld [de],a
@@ -4840,7 +4856,7 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df)
ld hl,wBattleMonLevel
ld a,[hl]
ld b,a ; Seismic Toss deals damage equal to the user's level
- ld a,[W_PLAYERMOVENUM]
+ ld a,[wPlayerMoveNum]
cp a,SEISMIC_TOSS
jr z,.storeDamage
cp a,NIGHT_SHADE
@@ -4866,20 +4882,20 @@ ApplyAttackToEnemyPokemon: ; 3e0df (f:60df)
jr nc,.loop
ld b,a
.storeDamage ; store damage value at b
- ld hl,W_DAMAGE
+ ld hl,wDamage
xor a
ld [hli],a
ld a,b
ld [hl],a
ApplyDamageToEnemyPokemon: ; 3e142 (f:6142)
- ld hl,W_DAMAGE
+ ld hl,wDamage
ld a,[hli]
ld b,a
ld a,[hl]
or b
jr z,ApplyAttackToEnemyPokemonDone ; we're done if damage is 0
- ld a,[W_ENEMYBATTSTATUS2]
+ ld a,[wEnemyBattleStatus2]
bit HasSubstituteUp,a ; does the enemy have a substitute?
jp nz,AttackSubstitute
; subtract the damage from the pokemon's current HP
@@ -4897,7 +4913,7 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142)
sbc b
ld [wEnemyMonHP],a
jr nc,.animateHpBar
-; if more damage was done than the current HP, zero the HP and set the damage (W_DAMAGE)
+; if more damage was done than the current HP, zero the HP and set the damage (wDamage)
; equal to how much HP the pokemon had before the attack
ld a,[wHPBarOldHP+1]
ld [hli],a
@@ -4926,21 +4942,21 @@ ApplyAttackToEnemyPokemonDone: ; 3e19d (f:619d)
jp DrawHUDsAndHPBars
ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0)
- ld a,[W_ENEMYMOVEEFFECT]
+ ld a,[wEnemyMoveEffect]
cp a,OHKO_EFFECT
jr z,ApplyDamageToPlayerPokemon
cp a,SUPER_FANG_EFFECT
jr z,.superFangEffect
cp a,SPECIAL_DAMAGE_EFFECT
jr z,.specialDamage
- ld a,[W_ENEMYMOVEPOWER]
+ ld a,[wEnemyMovePower]
and a
jp z,ApplyAttackToPlayerPokemonDone
jr ApplyDamageToPlayerPokemon
.superFangEffect
; set the damage to half the target's HP
ld hl,wBattleMonHP
- ld de,W_DAMAGE
+ ld de,wDamage
ld a,[hli]
srl a
ld [de],a
@@ -4959,7 +4975,7 @@ ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0)
ld hl,wEnemyMonLevel
ld a,[hl]
ld b,a
- ld a,[W_ENEMYMOVENUM]
+ ld a,[wEnemyMoveNum]
cp a,SEISMIC_TOSS
jr z,.storeDamage
cp a,NIGHT_SHADE
@@ -4985,20 +5001,20 @@ ApplyAttackToPlayerPokemon: ; 3e1a0 (f:61a0)
jr nc,.loop
ld b,a
.storeDamage
- ld hl,W_DAMAGE
+ ld hl,wDamage
xor a
ld [hli],a
ld a,b
ld [hl],a
ApplyDamageToPlayerPokemon: ; 3e200 (f:6200)
- ld hl,W_DAMAGE
+ ld hl,wDamage
ld a,[hli]
ld b,a
ld a,[hl]
or b
jr z,ApplyAttackToPlayerPokemonDone ; we're done if damage is 0
- ld a,[W_PLAYERBATTSTATUS2]
+ ld a,[wPlayerBattleStatus2]
bit HasSubstituteUp,a ; does the player have a substitute?
jp nz,AttackSubstitute
; subtract the damage from the pokemon's current HP
@@ -5017,7 +5033,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200)
ld [wBattleMonHP],a
ld [wHPBarNewHP+1],a
jr nc,.animateHpBar
-; if more damage was done than the current HP, zero the HP and set the damage (W_DAMAGE)
+; if more damage was done than the current HP, zero the HP and set the damage (wDamage)
; equal to how much HP the pokemon had before the attack
ld a,[wHPBarOldHP+1]
ld [hli],a
@@ -5055,15 +5071,15 @@ AttackSubstitute: ; 3e25e (f:625e)
call PrintText
; values for player turn
ld de,wEnemySubstituteHP
- ld bc,W_ENEMYBATTSTATUS2
+ ld bc,wEnemyBattleStatus2
ld a,[H_WHOSETURN]
and a
jr z,.applyDamageToSubstitute
; values for enemy turn
ld de,wPlayerSubstituteHP
- ld bc,W_PLAYERBATTSTATUS2
+ ld bc,wPlayerBattleStatus2
.applyDamageToSubstitute
- ld hl,W_DAMAGE
+ ld hl,wDamage
ld a,[hli]
and a
jr nz,.substituteBroke ; damage > 0xFF always breaks substitutes
@@ -5073,7 +5089,7 @@ AttackSubstitute: ; 3e25e (f:625e)
ld [de],a
ret nc
.substituteBroke
-; If the target's Substitute breaks, W_DAMAGE isn't updated with the amount of HP
+; If the target's Substitute breaks, wDamage isn't updated with the amount of HP
; the Substitute had before being attacked.
ld h,b
ld l,c
@@ -5089,10 +5105,10 @@ AttackSubstitute: ; 3e25e (f:625e)
ld a,[H_WHOSETURN]
xor a,$01
ld [H_WHOSETURN],a
- ld hl,W_PLAYERMOVEEFFECT ; value for player's turn
+ ld hl,wPlayerMoveEffect ; value for player's turn
and a
jr z,.nullifyEffect
- ld hl,W_ENEMYMOVEEFFECT ; value for enemy's turn
+ ld hl,wEnemyMoveEffect ; value for enemy's turn
.nullifyEffect
xor a
ld [hl],a ; zero the effect of the attacker's move
@@ -5109,16 +5125,16 @@ SubstituteBrokeText: ; 3e2b1 (f:62b1)
; this function raises the attack modifier of a pokemon using Rage when that pokemon is attacked
HandleBuildingRage: ; 3e2b6 (f:62b6)
; values for the player turn
- ld hl,W_ENEMYBATTSTATUS2
+ ld hl,wEnemyBattleStatus2
ld de,wEnemyMonStatMods
- ld bc,W_ENEMYMOVENUM
+ ld bc,wEnemyMoveNum
ld a,[H_WHOSETURN]
and a
jr z,.next
; values for the enemy turn
- ld hl,W_PLAYERBATTSTATUS2
+ ld hl,wPlayerBattleStatus2
ld de,wPlayerMonStatMods
- ld bc,W_PLAYERMOVENUM
+ ld bc,wPlayerMoveNum
.next
bit UsingRage,[hl] ; is the pokemon being attacked under the effect of Rage?
ret z ; return if not
@@ -5167,11 +5183,11 @@ MirrorMoveCopyMove: ; 3e2fd (f:62fd)
; values for player turn
ld a,[wEnemyUsedMove]
ld hl,wPlayerSelectedMove
- ld de,W_PLAYERMOVENUM
+ ld de,wPlayerMoveNum
jr z,.next
; values for enemy turn
ld a,[wPlayerUsedMove]
- ld de,W_ENEMYMOVENUM
+ ld de,wEnemyMoveNum
ld hl,wEnemySelectedMove
.next
ld [hl],a
@@ -5194,7 +5210,7 @@ ReloadMoveData: ; 3e329 (f:6329)
ld [wd11e],a
dec a
ld hl,Moves
- ld bc,$0006
+ ld bc,MoveEnd - Moves
call AddNTimes
ld a,BANK(Moves)
call FarCopyData ; copy the move's stats
@@ -5213,13 +5229,13 @@ MetronomePickMove: ; 3e348 (f:6348)
ld a,METRONOME
call PlayMoveAnimation ; play Metronome's animation
; values for player turn
- ld de,W_PLAYERMOVENUM
+ ld de,wPlayerMoveNum
ld hl,wPlayerSelectedMove
ld a,[H_WHOSETURN]
and a
jr z,.pickMoveLoop
; values for enemy turn
- ld de,W_ENEMYMOVENUM
+ ld de,wEnemyMoveNum
ld hl,wEnemySelectedMove
; loop to pick a random number in the range [1, $a5) to be the move used by Metronome
.pickMoveLoop
@@ -5278,8 +5294,8 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
ld a,[hli]
ld d,a ; d = type 1 of defender
ld e,[hl] ; e = type 2 of defender
- ld a,[W_PLAYERMOVETYPE]
- ld [wd11e],a
+ ld a,[wPlayerMoveType]
+ ld [wMoveType],a
ld a,[H_WHOSETURN]
and a
jr z,.next
@@ -5292,10 +5308,10 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
ld a,[hli]
ld d,a ; d = type 1 of defender
ld e,[hl] ; e = type 2 of defender
- ld a,[W_ENEMYMOVETYPE]
- ld [wd11e],a
+ ld a,[wEnemyMoveType]
+ ld [wMoveType],a
.next
- ld a,[wd11e] ; move type
+ ld a,[wMoveType]
cp b ; does the move type match type 1 of the attacker?
jr z,.sameTypeAttackBonus
cp c ; does the move type match type 2 of the attacker?
@@ -5303,7 +5319,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
jr .skipSameTypeAttackBonus
.sameTypeAttackBonus
; if the move type matches one of the attacker's types
- ld hl,W_DAMAGE + 1
+ ld hl,wDamage + 1
ld a,[hld]
ld h,[hl]
ld l,a ; hl = damage
@@ -5314,14 +5330,14 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
add hl,bc ; hl = floor(1.5 * damage)
; store damage
ld a,h
- ld [W_DAMAGE],a
+ ld [wDamage],a
ld a,l
- ld [W_DAMAGE + 1],a
+ ld [wDamage + 1],a
ld hl,wDamageMultipliers
set 7,[hl]
.skipSameTypeAttackBonus
- ld a,[wd11e]
- ld b,a ; b = move type
+ ld a,[wMoveType]
+ ld b,a
ld hl,TypeEffects
.loop
ld a,[hli] ; a = "attacking type" of the current type pair
@@ -5349,7 +5365,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
ld [wDamageMultipliers],a
xor a
ld [H_MULTIPLICAND],a
- ld hl,W_DAMAGE
+ ld hl,wDamage
ld a,[hli]
ld [H_MULTIPLICAND + 1],a
ld a,[hld]
@@ -5370,7 +5386,7 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
; if damage is 0, make the move miss
; this only occurs if a move that would do 2 or 3 damage is 0.25x effective against the target
inc a
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
.skipTypeImmunity
pop bc
pop hl
@@ -5384,29 +5400,29 @@ AdjustDamageForMoveType: ; 3e3a5 (f:63a5)
; function to tell how effective the type of an enemy attack is on the player's current pokemon
; this doesn't take into account the effects that dual types can have
; (e.g. 4x weakness / resistance, weaknesses and resistances canceling)
-; the result is stored in [wd11e]
+; the result is stored in [wTypeEffectiveness]
; ($05 is not very effective, $10 is neutral, $14 is super effective)
; as far is can tell, this is only used once in some AI code to help decide which move to use
AIGetTypeEffectiveness: ; 3e449 (f:6449)
- ld a,[W_ENEMYMOVETYPE]
- ld d,a ; d = type of enemy move
+ ld a,[wEnemyMoveType]
+ ld d,a ; d = type of enemy move
ld hl,wBattleMonType
- ld b,[hl] ; b = type 1 of player's pokemon
+ ld b,[hl] ; b = type 1 of player's pokemon
inc hl
- ld c,[hl] ; c = type 2 of player's pokemon
+ ld c,[hl] ; c = type 2 of player's pokemon
ld a,$10
- ld [wd11e],a ; initialize [wd11e] to neutral effectiveness
+ ld [wTypeEffectiveness],a ; initialize to neutral effectiveness
ld hl,TypeEffects
.loop
ld a,[hli]
cp a,$ff
ret z
- cp d ; match the type of the move
+ cp d ; match the type of the move
jr nz,.nextTypePair1
ld a,[hli]
- cp b ; match with type 1 of pokemon
+ cp b ; match with type 1 of pokemon
jr z,.done
- cp c ; or match with type 2 of pokemon
+ cp c ; or match with type 2 of pokemon
jr z,.done
jr .nextTypePair2
.nextTypePair1
@@ -5416,7 +5432,7 @@ AIGetTypeEffectiveness: ; 3e449 (f:6449)
jr .loop
.done
ld a,[hl]
- ld [wd11e],a ; store damage multiplier
+ ld [wTypeEffectiveness],a ; store damage multiplier
ret
INCLUDE "data/type_effects.asm"
@@ -5424,15 +5440,15 @@ INCLUDE "data/type_effects.asm"
; some tests that need to pass for a move to hit
MoveHitTest: ; 3e56b (f:656b)
; player's turn
- ld hl,W_ENEMYBATTSTATUS1
- ld de,W_PLAYERMOVEEFFECT
+ ld hl,wEnemyBattleStatus1
+ ld de,wPlayerMoveEffect
ld bc,wEnemyMonStatus
ld a,[H_WHOSETURN]
and a
jr z,.dreamEaterCheck
; enemy's turn
- ld hl,W_PLAYERBATTSTATUS1
- ld de,W_ENEMYMOVEEFFECT
+ ld hl,wPlayerBattleStatus1
+ ld de,wEnemyMoveEffect
ld bc,wBattleMonStatus
.dreamEaterCheck
ld a,[de]
@@ -5461,7 +5477,7 @@ MoveHitTest: ; 3e56b (f:656b)
jr nz,.enemyTurn
.playerTurn
; this checks if the move effect is disallowed by mist
- ld a,[W_PLAYERMOVEEFFECT]
+ ld a,[wPlayerMoveEffect]
cp a,ATTACK_DOWN1_EFFECT
jr c,.skipEnemyMistCheck
cp a,HAZE_EFFECT + 1
@@ -5478,16 +5494,16 @@ MoveHitTest: ; 3e56b (f:656b)
; FLASH, CONVERSION*, HAZE*, SCREECH, LIGHT SCREEN*, REFLECT*
; the moves that are marked with an asterisk are not affected since this
; function is not called when those moves are used
- ld a,[W_ENEMYBATTSTATUS2]
+ ld a,[wEnemyBattleStatus2]
bit ProtectedByMist,a ; is mon protected by mist?
jp nz,.moveMissed
.skipEnemyMistCheck
- ld a,[W_PLAYERBATTSTATUS2]
+ ld a,[wPlayerBattleStatus2]
bit UsingXAccuracy,a ; is the player using X Accuracy?
ret nz ; if so, always hit regardless of accuracy/evasion
jr .calcHitChance
.enemyTurn
- ld a,[W_ENEMYMOVEEFFECT]
+ ld a,[wEnemyMoveEffect]
cp a,ATTACK_DOWN1_EFFECT
jr c,.skipPlayerMistCheck
cp a,HAZE_EFFECT + 1
@@ -5499,21 +5515,21 @@ MoveHitTest: ; 3e56b (f:656b)
jr .skipPlayerMistCheck
.playerMistCheck
; similar to enemy mist check
- ld a,[W_PLAYERBATTSTATUS2]
+ ld a,[wPlayerBattleStatus2]
bit ProtectedByMist,a ; is mon protected by mist?
jp nz,.moveMissed
.skipPlayerMistCheck
- ld a,[W_ENEMYBATTSTATUS2]
+ ld a,[wEnemyBattleStatus2]
bit UsingXAccuracy,a ; is the enemy using X Accuracy?
ret nz ; if so, always hit regardless of accuracy/evasion
.calcHitChance
call CalcHitChance ; scale the move accuracy according to attacker's accuracy and target's evasion
- ld a,[W_PLAYERMOVEACCURACY]
+ ld a,[wPlayerMoveAccuracy]
ld b,a
ld a,[H_WHOSETURN]
and a
jr z,.doAccuracyCheck
- ld a,[W_ENEMYMOVEACCURACY]
+ ld a,[wEnemyMoveAccuracy]
ld b,a
.doAccuracyCheck
; if the random number generated is greater than or equal to the scaled accuracy, the move misses
@@ -5524,26 +5540,26 @@ MoveHitTest: ; 3e56b (f:656b)
ret
.moveMissed
xor a
- ld hl,W_DAMAGE ; zero the damage
+ ld hl,wDamage ; zero the damage
ld [hli],a
ld [hl],a
inc a
- ld [W_MOVEMISSED],a
+ ld [wMoveMissed],a
ld a,[H_WHOSETURN]
and a
jr z,.playerTurn2
.enemyTurn2
- ld hl,W_ENEMYBATTSTATUS1
+ ld hl,wEnemyBattleStatus1
res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap
ret
.playerTurn2
- ld hl,W_PLAYERBATTSTATUS1
+ ld hl,wPlayerBattleStatus1
res UsingTrappingMove,[hl] ; end multi-turn attack e.g. wrap
ret
; values for player turn
CalcHitChance: ; 3e624 (f:6624)
- ld hl,W_PLAYERMOVEACCURACY
+ ld hl,wPlayerMoveAccuracy
ld a,[H_WHOSETURN]
and a
ld a,[wPlayerMonAccuracyMod]
@@ -5552,7 +5568,7 @@ CalcHitChance: ; 3e624 (f:6624)
ld c,a
jr z,.next
; values for enemy turn
- ld hl,W_ENEMYMOVEACCURACY
+ ld hl,wEnemyMoveAccuracy
ld a,[wEnemyMonAccuracyMod]
ld b,a
ld a,[wPlayerMonEvasionMod]
@@ -5615,7 +5631,7 @@ CalcHitChance: ; 3e624 (f:6624)
; multiplies damage by a random percentage from ~85% to 100%
RandomizeDamage: ; 3e687 (f:6687)
- ld hl, W_DAMAGE
+ ld hl, wDamage
ld a, [hli]
and a
jr nz, .DamageGreaterThanOne
@@ -5644,7 +5660,7 @@ RandomizeDamage: ; 3e687 (f:6687)
call Divide ; divide the result by 255
; store the modified damage
ld a, [H_QUOTIENT + 2]
- ld hl, W_DAMAGE
+ ld hl, wDamage
ld [hli], a
ld a, [H_QUOTIENT + 3]
ld [hl], a
@@ -5670,7 +5686,7 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc)
ld hl, wAILayer2Encouragement
inc [hl]
xor a
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ld [wMoveDidntMiss], a
ld a, $a
ld [wDamageMultipliers], a
@@ -5678,23 +5694,23 @@ ExecuteEnemyMove: ; 3e6bc (f:66bc)
jr nz, .enemyHasNoSpecialConditions
jp [hl]
.enemyHasNoSpecialConditions
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
bit ChargingUp, [hl] ; is the enemy charging up for attack?
jr nz, EnemyCanExecuteChargingMove ; if so, jump
call GetCurrentMove
CheckIfEnemyNeedsToChargeUp: ; 3e6fc (f:66fc)
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp CHARGE_EFFECT
jp z, JumpMoveEffect
cp FLY_EFFECT
jp z, JumpMoveEffect
jr EnemyCanExecuteMove
EnemyCanExecuteChargingMove: ; 3e70b (f:670b)
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res ChargingUp, [hl] ; no longer charging up for attack
res Invulnerable, [hl] ; no longer invulnerable to typical attacks
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
ld [wd0b5], a
ld a, BANK(MoveNames)
ld [wPredefBank], a
@@ -5707,19 +5723,19 @@ EnemyCanExecuteMove: ; 3e72b (f:672b)
xor a
ld [wMonIsDisobedient], a
call PrintMonName1Text
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
ld hl, ResidualEffects1
ld de, $1
call IsInArray
jp c, JumpMoveEffect
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
ld hl, SpecialEffectsCont
ld de, $1
call IsInArray
call c, JumpMoveEffect
EnemyCalcMoveDamage: ; 3e750 (f:6750)
call SwapPlayerAndEnemyLevels
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
ld hl, SetDamageEffects
ld de, $1
call IsInArray
@@ -5738,10 +5754,10 @@ EnemyCalcMoveDamage: ; 3e750 (f:6750)
EnemyMoveHitTest: ; 3e77f (f:677f)
call MoveHitTest
handleIfEnemyMoveMissed: ; 3e782 (f:6782)
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr z, .asm_3e791
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp EXPLODE_EFFECT
jr z, asm_3e7a0
jr EnemyCheckIfFlyOrChargeEffect
@@ -5749,7 +5765,7 @@ handleIfEnemyMoveMissed: ; 3e782 (f:6782)
call SwapPlayerAndEnemyLevels
GetEnemyAnimationType: ; 3e794 (f:6794)
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
and a
ld a, $1
jr z, playEnemyMoveAnimation
@@ -5760,18 +5776,18 @@ asm_3e7a0: ; 3e7a0 (f:67a0)
xor a
playEnemyMoveAnimation: ; 3e7a4 (f:67a4)
push af
- ld a, [W_ENEMYBATTSTATUS2]
+ ld a, [wEnemyBattleStatus2]
bit HasSubstituteUp, a ; does mon have a substitute?
ld hl, HideSubstituteShowMonAnim
ld b, BANK(HideSubstituteShowMonAnim)
call nz, Bankswitch
pop af
ld [wAnimationType], a
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
call PlayMoveAnimation
call HandleExplodingAnimation
call DrawEnemyHUDAndHPBar
- ld a, [W_ENEMYBATTSTATUS2]
+ ld a, [wEnemyBattleStatus2]
bit HasSubstituteUp, a ; does mon have a substitute?
ld hl, ReshowSubstituteAnim
ld b, BANK(ReshowSubstituteAnim)
@@ -5782,7 +5798,7 @@ EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1)
call SwapPlayerAndEnemyLevels
ld c, 30
call DelayFrames
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp FLY_EFFECT
jr z, .playAnim
cp CHARGE_EFFECT
@@ -5794,7 +5810,7 @@ EnemyCheckIfFlyOrChargeEffect: ; 3e7d1 (f:67d1)
ld a,STATUS_AFFECTED_ANIM
call PlayMoveAnimation
EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp MIRROR_MOVE_EFFECT
jr nz, .notMirrorMoveEffect
call MirrorMoveCopyMove
@@ -5806,16 +5822,16 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
call MetronomePickMove
jp CheckIfEnemyNeedsToChargeUp
.notMetronomeEffect
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
ld hl, ResidualEffects2
ld de, $1
call IsInArray
jp c, JumpMoveEffect
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr z, .asm_3e82b
call PrintMoveFailureText
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp EXPLODE_EFFECT
jr z, .asm_3e83e
jp ExecuteEnemyMoveDone
@@ -5826,7 +5842,7 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
ld a, 1
ld [wMoveDidntMiss], a
.asm_3e83e
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
ld hl, AlwaysHappenSideEffects
ld de, $1
call IsInArray
@@ -5837,7 +5853,7 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
or b
ret z
call HandleBuildingRage
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
bit AttackingMultipleTimes, [hl] ; is mon hitting multiple times? (example: double kick)
jr z, .asm_3e873
push hl
@@ -5851,7 +5867,7 @@ EnemyCheckIfMirrorMoveEffect: ; 3e7ef (f:67ef)
xor a
ld [wEnemyNumHits], a
.asm_3e873
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
and a
jr z, ExecuteEnemyMoveDone
ld hl, SpecialEffects
@@ -5904,7 +5920,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn
jp .enemyReturnToHL
.checkIfTrapped
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
bit UsingTrappingMove, a ; is the player using a multi-turn attack like warp
jp z, .checkIfFlinched
ld hl, CantMoveText
@@ -5912,7 +5928,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn
jp .enemyReturnToHL
.checkIfFlinched
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
bit Flinched, [hl] ; check if enemy mon flinched
jp z, .checkIfMustRecharge
res Flinched, [hl]
@@ -5921,7 +5937,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn
jp .enemyReturnToHL
.checkIfMustRecharge
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
bit NeedsToRecharge, [hl] ; check if enemy mon has to recharge after using a move
jr z, .checkIfAnyMoveDisabled
res NeedsToRecharge, [hl]
@@ -5930,7 +5946,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ExecuteEnemyMoveDone ; enemy can't move this turn
jp .enemyReturnToHL
.checkIfAnyMoveDisabled
- ld hl, W_ENEMYDISABLEDMOVE
+ ld hl, wEnemyDisabledMove
ld a, [hl]
and a
jr z, .checkIfConfused
@@ -5943,13 +5959,13 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, DisabledNoMoreText
call PrintText
.checkIfConfused
- ld a, [W_ENEMYBATTSTATUS1]
+ ld a, [wEnemyBattleStatus1]
add a ; check if enemy mon is confused
jp nc, .checkIfTriedToUseDisabledMove
- ld hl, W_ENEMYCONFUSEDCOUNTER
+ ld hl, wEnemyConfusedCounter
dec [hl]
jr nz, .isConfused
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res Confused, [hl] ; if confused counter hit 0, reset confusion status
ld hl, ConfusedNoMoreText
call PrintText
@@ -5964,9 +5980,9 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
call BattleRandom
cp $80
jr c, .checkIfTriedToUseDisabledMove
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld a, [hl]
- and 1 << Confused ; if mon hurts itself, clear every other status from W_ENEMYBATTSTATUS1
+ and 1 << Confused ; if mon hurts itself, clear every other status from wEnemyBattleStatus1
ld [hl], a
ld hl, HurtItselfText
call PrintText
@@ -5979,7 +5995,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld [hli], a
ld a, [wEnemyMonDefense + 1]
ld [hl], a
- ld hl, W_ENEMYMOVEEFFECT
+ ld hl, wEnemyMoveEffect
push hl
ld a, [hl]
push af
@@ -6030,12 +6046,12 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, FullyParalyzedText
call PrintText
.monHurtItselfOrFullyParalysed
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld a, [hl]
; clear bide, thrashing about, charging up, and multi-turn moves such as warp
and $ff ^ ((1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << ChargingUp) | (1 << UsingTrappingMove))
ld [hl], a
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp FLY_EFFECT
jr z, .flyOrChargeEffect
cp CHARGE_EFFECT
@@ -6050,12 +6066,12 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ExecuteEnemyMoveDone
jp .enemyReturnToHL ; if using a two-turn move, enemy needs to recharge the first turn
.checkIfUsingBide
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
bit StoringEnergy, [hl] ; is mon using bide?
jr z, .checkIfThrashingAbout
xor a
- ld [W_ENEMYMOVENUM], a
- ld hl, W_DAMAGE
+ ld [wEnemyMoveNum], a
+ ld hl, wDamage
ld a, [hli]
ld b, a
ld c, [hl]
@@ -6072,30 +6088,30 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, ExecuteEnemyMoveDone
jp .enemyReturnToHL ; unless mon unleashes energy, can't move this turn
.unleashEnergy
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res StoringEnergy, [hl] ; not using bide any more
ld hl, UnleashedEnergyText
call PrintText
ld a, $1
- ld [W_ENEMYMOVEPOWER], a
+ ld [wEnemyMovePower], a
ld hl, wEnemyBideAccumulatedDamage + 1
ld a, [hld]
add a
ld b, a
- ld [W_DAMAGE + 1], a
+ ld [wDamage + 1], a
ld a, [hl]
rl a ; double the damage
- ld [W_DAMAGE], a
+ ld [wDamage], a
or b
jr nz, .next
ld a, $1
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
.next
xor a
ld [hli], a
ld [hl], a
ld a, BIDE
- ld [W_ENEMYMOVENUM], a
+ ld [wEnemyMoveNum], a
call SwapPlayerAndEnemyLevels
ld hl, handleIfEnemyMoveMissed ; skip damage calculation, DecrementPP and MoveHitTest
jp .enemyReturnToHL
@@ -6103,7 +6119,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
bit ThrashingAbout, [hl] ; is mon using thrash or petal dance?
jr z, .checkIfUsingMultiturnMove
ld a, THRASH
- ld [W_ENEMYMOVENUM], a
+ ld [wEnemyMoveNum], a
ld hl, ThrashingAboutText
call PrintText
ld hl, wEnemyNumAttacksLeft
@@ -6111,14 +6127,14 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
ld hl, EnemyCalcMoveDamage ; skip DecrementPP
jp nz, .enemyReturnToHL
push hl
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
res ThrashingAbout, [hl] ; mon is no longer using thrash or petal dance
set Confused, [hl] ; mon is now confused
call BattleRandom
and $3
inc a
inc a ; confused for 2-5 turns
- ld [W_ENEMYCONFUSEDCOUNTER], a
+ ld [wEnemyConfusedCounter], a
pop hl ; skip DecrementPP
jp .enemyReturnToHL
.checkIfUsingMultiturnMove
@@ -6133,7 +6149,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
jp nz, .enemyReturnToHL
jp .enemyReturnToHL
.checkIfUsingRage
- ld a, [W_ENEMYBATTSTATUS2]
+ ld a, [wEnemyBattleStatus2]
bit UsingRage, a ; is mon using rage?
jp z, .checkEnemyStatusConditionsDone ; if we made it this far, mon can move normally this turn
ld a, RAGE
@@ -6141,7 +6157,7 @@ CheckEnemyStatusConditions: ; 3e88f (f:688f)
call GetMoveName
call CopyStringToCF4B
xor a
- ld [W_ENEMYMOVEEFFECT], a
+ ld [wEnemyMoveEffect], a
ld hl, EnemyCanExecuteMove
jp .enemyReturnToHL
.enemyReturnToHL
@@ -6156,21 +6172,21 @@ GetCurrentMove: ; 3eabe (f:6abe)
ld a, [H_WHOSETURN]
and a
jp z, .player
- ld de, W_ENEMYMOVENUM
+ ld de, wEnemyMoveNum
ld a, [wEnemySelectedMove]
jr .selected
.player
- ld de, W_PLAYERMOVENUM
- ld a, [W_FLAGS_D733]
- bit 0, a
- ld a, [wccd9]
+ ld de, wPlayerMoveNum
+ ld a, [wFlags_D733]
+ bit BIT_TEST_BATTLE, a
+ ld a, [wTestBattlePlayerSelectedMove]
jr nz, .selected
ld a, [wPlayerSelectedMove]
.selected
ld [wd0b5], a
dec a
ld hl, Moves
- ld bc, $6
+ ld bc, MoveEnd - Moves
call AddNTimes
ld a, BANK(Moves)
call FarCopyData
@@ -6191,13 +6207,13 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
ld [wEnemyMonSpecies], a
ld [wd0b5], a
call GetMonHeader
- ld a, [W_ENEMYBATTSTATUS3]
+ ld a, [wEnemyBattleStatus3]
bit Transformed, a ; is enemy mon transformed?
- ld hl, wcceb ; copied DVs from when it used Transform
+ ld hl, wTransformedEnemyMonOriginalDVs ; original DVs before transforming
ld a, [hli]
ld b, [hl]
jr nz, .storeDVs
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $2 ; is it a trainer battle?
; fixed DVs for trainer mon
ld a, $98
@@ -6212,7 +6228,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
ld [hli], a
ld [hl], b
ld de, wEnemyMonLevel
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld [de], a
inc de
ld b, $0
@@ -6220,10 +6236,10 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
push hl
call CalcStats
pop hl
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $2 ; is it a trainer battle?
jr z, .copyHPAndStatusFromPartyData
- ld a, [W_ENEMYBATTSTATUS3]
+ ld a, [wEnemyBattleStatus3]
bit Transformed, a ; is enemy mon transformed?
jr nz, .copyTypes ; if transformed, jump
; if it's a wild mon and not transformed, init the current HP to max HP and the status to 0
@@ -6252,7 +6268,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
ld [wEnemyMonStatus], a
jr .copyTypes
.copyTypes
- ld hl, W_MONHTYPES
+ ld hl, wMonHTypes
ld de, wEnemyMonType
ld a, [hli] ; copy type 1
ld [de], a
@@ -6263,7 +6279,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
ld a, [hli] ; copy catch rate
ld [de], a
inc de
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $2 ; is it a trainer battle?
jr nz, .copyStandardMoves
; if it's a trainer battle, copy moves from enemy party data
@@ -6276,7 +6292,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
jr .loadMovePPs
.copyStandardMoves
; for a wild mon, first copy default moves from the mon header
- ld hl, W_MONHMOVES
+ ld hl, wMonHMoves
ld a, [hli]
ld [de], a
inc de
@@ -6298,7 +6314,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
ld hl, wEnemyMonMoves
ld de, wEnemyMonPP - 1
predef LoadMovePPs
- ld hl, W_MONHBASESTATS
+ ld hl, wMonHBaseStats
ld de, wEnemyMonBaseStats
ld b, NUM_STATS
.copyBaseStatsLoop
@@ -6307,7 +6323,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
inc de
dec b
jr nz, .copyBaseStatsLoop
- ld hl, W_MONHCATCHRATE
+ ld hl, wMonHCatchRate
ld a, [hli]
ld [de], a
inc de
@@ -6318,7 +6334,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
call GetMonName
ld hl, wcd6d
ld de, wEnemyMonNick
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wEnemyMonSpecies2]
ld [wd11e], a
@@ -6375,7 +6391,7 @@ DoBattleTransitionAndInitBattleVariables: ; 3ec32 (f:6c32)
ld [hli], a
ld [hli], a
ld [hl], a
- ld [W_PLAYERDISABLEDMOVE], a
+ ld [wPlayerDisabledMove], a
ret
; swaps the level values of the BattleMon and EnemyMon structs
@@ -6394,7 +6410,7 @@ SwapPlayerAndEnemyLevels: ; 3ec81 (f:6c81)
; also writes OAM data and loads tile patterns for the Red or Old Man back sprite's head
; (for use when scrolling the player sprite and enemy's silhouettes on screen)
LoadPlayerBackPic: ; 3ec92 (f:6c92)
- ld a, [W_BATTLETYPE]
+ ld a, [wBattleType]
dec a ; is it the old man tutorial?
ld de, RedPicBack
jr nz, .next
@@ -6441,7 +6457,7 @@ LoadPlayerBackPic: ; 3ec92 (f:6c92)
xor a
ld [$4000], a
ld hl, vSprites
- ld de, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer1
ld a, [H_LOADEDROMBANK]
ld b, a
ld c, 7 * 7
@@ -6569,12 +6585,12 @@ CalculateModifiedStats: ; 3ed99 (f:6d99)
CalculateModifiedStat: ; 3eda5 (f:6da5)
push bc
push bc
- ld a, [wd11e]
+ ld a, [wCalculateWhoseStats]
and a
ld a, c
ld hl, wBattleMonAttack
ld de, wPlayerMonUnmodifiedAttack
- ld bc, wPlayerMonAttackMod
+ ld bc, wPlayerMonStatMods
jr z, .next
ld hl, wEnemyMonAttack
ld de, wEnemyMonUnmodifiedAttack
@@ -6648,7 +6664,7 @@ ApplyBadgeStatBoosts: ; 3ee19 (f:6e19)
ld a, [wLinkState]
cp LINK_STATE_BATTLING
ret z ; return if link battle
- ld a, [W_OBTAINEDBADGES]
+ ld a, [wObtainedBadges]
ld b, a
ld hl, wBattleMonAttack
ld c, $4
@@ -6707,22 +6723,22 @@ LoadHudTilePatterns: ; 3ee5b (f:6e5b)
.lcdDisabled
ld hl, BattleHudTiles1
ld de, vChars2 + $6d0
- ld bc, $18
+ ld bc, BattleHudTiles1End - BattleHudTiles1
ld a, BANK(BattleHudTiles1)
call FarCopyDataDouble
ld hl, BattleHudTiles2
ld de, vChars2 + $730
- ld bc, $30
+ ld bc, BattleHudTiles3End - BattleHudTiles2
ld a, BANK(BattleHudTiles2)
jp FarCopyDataDouble
.lcdEnabled
ld de, BattleHudTiles1
ld hl, vChars2 + $6d0
- lb bc, BANK(BattleHudTiles1), $03
+ lb bc, BANK(BattleHudTiles1), (BattleHudTiles1End - BattleHudTiles1) / $8
call CopyVideoDataDouble
ld de, BattleHudTiles2
ld hl, vChars2 + $730
- lb bc, BANK(BattleHudTiles2), $06
+ lb bc, BANK(BattleHudTiles2), (BattleHudTiles3End - BattleHudTiles2) / $8
jp CopyVideoDataDouble
PrintEmptyString: ; 3ee94 (f:6e94)
@@ -6788,12 +6804,12 @@ HandleExplodingAnimation: ; 3eed3 (f:6ed3)
ld a, [H_WHOSETURN]
and a
ld hl, wEnemyMonType1
- ld de, W_ENEMYBATTSTATUS1
- ld a, [W_PLAYERMOVENUM]
+ ld de, wEnemyBattleStatus1
+ ld a, [wPlayerMoveNum]
jr z, .asm_3eeea
ld hl, wBattleMonType1
- ld de, W_ENEMYBATTSTATUS1
- ld a, [W_ENEMYMOVENUM]
+ ld de, wEnemyBattleStatus1
+ ld a, [wEnemyMoveNum]
.asm_3eeea
cp SELFDESTRUCT
jr z, .asm_3eef1
@@ -6809,24 +6825,24 @@ HandleExplodingAnimation: ; 3eed3 (f:6ed3)
ld a, [hl]
cp GHOST
ret z
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
ret nz
ld a, 5
ld [wAnimationType], a
PlayMoveAnimation: ; 3ef07 (f:6f07)
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
call Delay3
predef_jump MoveAnimation
InitBattle: ; 3ef12 (f:6f12)
- ld a, [W_CUROPPONENT]
+ ld a, [wCurOpponent]
and a
jr z, DetermineWildOpponent
InitOpponent: ; 3ef18 (f:6f18)
- ld a, [W_CUROPPONENT]
+ ld a, [wCurOpponent]
ld [wcf91], a
ld [wEnemyMonSpecies2], a
jr InitBattleCommon
@@ -6853,9 +6869,9 @@ InitBattleCommon: ; 3ef3d (f:6f3d)
res 1, [hl]
callab InitBattleVariables
ld a, [wEnemyMonSpecies2]
- sub $c8
+ sub 200
jp c, InitWildBattle
- ld [W_TRAINERCLASS], a
+ ld [wTrainerClass], a
call GetTrainerInformation
callab ReadTrainer
call DoBattleTransitionAndInitBattleVariables
@@ -6870,21 +6886,21 @@ InitBattleCommon: ; 3ef3d (f:6f3d)
ld a, $ff
ld [wEnemyMonPartyPos], a
ld a, $2
- ld [W_ISINBATTLE], a
- jp InitBattle_Common
+ ld [wIsInBattle], a
+ jp _InitBattleCommon
InitWildBattle: ; 3ef8b (f:6f8b)
ld a, $1
- ld [W_ISINBATTLE], a
+ ld [wIsInBattle], a
call LoadEnemyMonData
call DoBattleTransitionAndInitBattleVariables
- ld a, [W_CUROPPONENT]
+ ld a, [wCurOpponent]
cp MAROWAK
jr z, .isGhost
call IsGhostBattle
jr nz, .isNoGhost
.isGhost
- ld hl, W_MONHSPRITEDIM
+ ld hl, wMonHSpriteDim
ld a, $66
ld [hli], a ; write sprite dimensions
ld bc, GhostPic
@@ -6917,15 +6933,15 @@ InitWildBattle: ; 3ef8b (f:6f8b)
call LoadMonFrontSprite ; load mon sprite
.spriteLoaded
xor a
- ld [W_TRAINERCLASS], a
+ ld [wTrainerClass], a
ld [hStartTileID], a
coord hl, 12, 0
predef CopyUncompressedPicToTilemap
; common code that executes after init battle code specific to trainer or wild battles
-InitBattle_Common: ; 3efeb (f:6feb)
- ld b, $0
- call GoPAL_SET
+_InitBattleCommon: ; 3efeb (f:6feb)
+ ld b, SET_PAL_BATTLE_BLACK
+ call RunPaletteCommand
call SlidePlayerAndEnemySilhouettesOnScreen
xor a
ld [H_AUTOBGTRANSFERENABLED], a
@@ -6948,7 +6964,7 @@ InitBattle_Common: ; 3efeb (f:6feb)
lb bc, 4, 10
call ClearScreenArea
call ClearSprites
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a ; is it a wild battle?
call z, DrawEnemyHUDAndHPBar ; draw enemy HUD and HP bar if it's a wild battle
call StartBattle
@@ -6985,8 +7001,8 @@ _LoadTrainerPic: ; 3f04b (f:704b)
; unreferenced
ResetCryModifiers: ; 3f069 (f:7069)
xor a
- ld [wc0f1], a
- ld [wc0f2], a
+ ld [wFrequencyModifier], a
+ ld [wTempoModifier], a
jp PlaySound
; animates the mon "growing" out of the pokeball
@@ -6998,7 +7014,7 @@ AnimateSendingOutMon: ; 3f073 (f:7073)
ld a, [hStartTileID]
ld [hBaseTileID], a
ld b, $4c
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
jr z, .notInBattle
add b
@@ -7040,7 +7056,7 @@ CopyUncompressedPicToHL: ; 3f0d0 (f:70d0)
lb bc, 7, 7
ld de, SCREEN_WIDTH
push af
- ld a, [W_SPRITEFLIPPED]
+ ld a, [wSpriteFlipped]
and a
jr nz, .flipped
pop af
@@ -7092,7 +7108,7 @@ LoadMonBackPic: ; 3f103 (f:7103)
ld b, 7
ld c, 8
call ClearScreenArea
- ld hl, W_MONHBACKSPRITE - W_MONHEADER
+ ld hl, wMonHBackSprite - wMonHeader
call UncompressMonSprite
predef ScaleSpriteByTwo
ld de, vBackPic
@@ -7112,9 +7128,9 @@ JumpMoveEffect: ; 3f132 (f:7132)
_JumpMoveEffect: ; 3f138 (f:7138)
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
jr z, .next1
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
.next1
dec a ; subtract 1, there is no special effect for 00
add a ; x2, 16bit pointers
@@ -7217,12 +7233,12 @@ MoveEffectPointerTable: ; 3f150 (f:7150)
SleepEffect: ; 3f1fc (f:71fc)
ld de, wEnemyMonStatus
- ld bc, W_ENEMYBATTSTATUS2
+ ld bc, wEnemyBattleStatus2
ld a, [H_WHOSETURN]
and a
jp z, .sleepEffect
ld de, wBattleMonStatus
- ld bc, W_PLAYERBATTSTATUS2
+ ld bc, wPlayerBattleStatus2
.sleepEffect
ld a, [bc]
@@ -7244,7 +7260,7 @@ SleepEffect: ; 3f1fc (f:71fc)
push de
call MoveHitTest ; apply accuracy tests
pop de
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .didntAffect
.setSleepCounter
@@ -7269,12 +7285,12 @@ AlreadyAsleepText: ; 3f24a (f:724a)
PoisonEffect: ; 3f24f (f:724f)
ld hl, wEnemyMonStatus
- ld de, W_PLAYERMOVEEFFECT
+ ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .poisonEffect
ld hl, wBattleMonStatus
- ld de, W_ENEMYMOVEEFFECT
+ ld de, wEnemyMoveEffect
.poisonEffect
call CheckTargetSubstitute
jr nz, .noEffect ; can't posion a substitute target
@@ -7300,7 +7316,7 @@ PoisonEffect: ; 3f24f (f:724f)
call MoveHitTest ; apply accuracy tests
pop de
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .didntAffect
jr .inflictPoison
@@ -7316,13 +7332,13 @@ PoisonEffect: ; 3f24f (f:724f)
ld a, [H_WHOSETURN]
and a
ld b, ANIM_C7
- ld hl, W_PLAYERBATTSTATUS3
+ ld hl, wPlayerBattleStatus3
ld a, [de]
- ld de, W_PLAYERTOXICCOUNTER
+ ld de, wPlayerToxicCounter
jr nz, .ok
ld b, ANIM_A9
- ld hl, W_ENEMYBATTSTATUS3
- ld de, W_ENEMYTOXICCOUNTER
+ ld hl, wEnemyBattleStatus3
+ ld de, wEnemyToxcCounter
.ok
cp TOXIC
jr nz, .normalPoison ; done if move is not Toxic
@@ -7366,12 +7382,12 @@ DrainHPEffect: ; 3f2e9 (f:72e9)
ExplodeEffect: ; 3f2f1 (f:72f1)
ld hl, wBattleMonHP
- ld de, W_PLAYERBATTSTATUS2
+ ld de, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .faintUser
ld hl, wEnemyMonHP
- ld de, W_ENEMYBATTSTATUS2
+ ld de, wEnemyBattleStatus2
.faintUser
xor a
ld [hli], a ; set the mon's HP to 0
@@ -7394,7 +7410,7 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c)
ld a, [wEnemyMonStatus]
and a
jp nz, CheckDefrost ; can't inflict status if opponent is already statused
- ld a, [W_PLAYERMOVETYPE]
+ ld a, [wPlayerMoveType]
ld b, a
ld a, [wEnemyMonType1]
cp b ; do target type 1 and move type match?
@@ -7402,7 +7418,7 @@ FreezeBurnParalyzeEffect: ; 3f30c (f:730c)
ld a, [wEnemyMonType2]
cp b ; do target type 2 and move type match?
ret z ; return if they match
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
cp a, PARALYZE_SIDE_EFFECT1 + 1 ; 10% status effects are 04, 05, 06 so 07 will set carry for those
ld b, $1a ; 0x1A/0x100 or 26/256 = 10.2%~ chance
jr c, .next1 ; branch ahead if this is a 10% chance effect..
@@ -7446,7 +7462,7 @@ opponentAttacker: ; 3f382 (f:7382)
ld a, [wBattleMonStatus] ; mostly same as above with addresses swapped for opponent
and a
jp nz, CheckDefrost
- ld a, [W_ENEMYMOVETYPE]
+ ld a, [wEnemyMoveType]
ld b, a
ld a, [wBattleMonType1]
cp b
@@ -7454,7 +7470,7 @@ opponentAttacker: ; 3f382 (f:7382)
ld a, [wBattleMonType2]
cp b
ret z
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp a, PARALYZE_SIDE_EFFECT1 + 1
ld b, $1a
jr c, .next1
@@ -7504,7 +7520,7 @@ CheckDefrost: ; 3f3e2 (f:73e2)
and a
jr nz, .opponent
;player [attacker]
- ld a, [W_PLAYERMOVETYPE]
+ ld a, [wPlayerMoveType]
sub a, FIRE
ret nz ; return if type of move used isn't fire
ld [wEnemyMonStatus], a ; set opponent status to 00 ["defrost" a frozen monster]
@@ -7517,7 +7533,7 @@ CheckDefrost: ; 3f3e2 (f:73e2)
ld hl, FireDefrostedText
jr .common
.opponent
- ld a, [W_ENEMYMOVETYPE] ; same as above with addresses swapped
+ ld a, [wEnemyMoveType] ; same as above with addresses swapped
sub a, FIRE
ret nz
ld [wBattleMonStatus], a
@@ -7537,12 +7553,12 @@ FireDefrostedText: ; 3f423 (f:7423)
StatModifierUpEffect: ; 3f428 (f:7428)
ld hl, wPlayerMonStatMods
- ld de, W_PLAYERMOVEEFFECT
+ ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .statModifierUpEffect
ld hl, wEnemyMonStatMods
- ld de, W_ENEMYMOVEEFFECT
+ ld de, wEnemyMoveEffect
.statModifierUpEffect
ld a, [de]
sub ATTACK_UP1_EFFECT
@@ -7644,14 +7660,14 @@ UpdateStatDone: ; 3f4ca (f:74ca)
ld b, c
inc b
call PrintStatText
- ld hl, W_PLAYERBATTSTATUS2
- ld de, W_PLAYERMOVENUM
+ ld hl, wPlayerBattleStatus2
+ ld de, wPlayerMoveNum
ld bc, wPlayerMonMinimized
ld a, [H_WHOSETURN]
and a
jr z, .asm_3f4e6
- ld hl, W_ENEMYBATTSTATUS2
- ld de, W_ENEMYMOVENUM
+ ld hl, wEnemyBattleStatus2
+ ld de, wEnemyMoveNum
ld bc, wEnemyMonMinimized
.asm_3f4e6
ld a, [de]
@@ -7705,9 +7721,9 @@ MonsStatsRoseText: ; 3f528 (f:7528)
ld hl, GreatlyRoseText
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
jr z, .asm_3f53b
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
.asm_3f53b
cp ATTACK_DOWN1_EFFECT
ret nc
@@ -7724,14 +7740,14 @@ RoseText: ; 3f547 (f:7547)
StatModifierDownEffect: ; 3f54c (f:754c)
ld hl, wEnemyMonStatMods
- ld de, W_PLAYERMOVEEFFECT
- ld bc, W_ENEMYBATTSTATUS1
+ ld de, wPlayerMoveEffect
+ ld bc, wEnemyBattleStatus1
ld a, [H_WHOSETURN]
and a
jr z, .statModifierDownEffect
ld hl, wPlayerMonStatMods
- ld de, W_ENEMYMOVEEFFECT
- ld bc, W_PLAYERBATTSTATUS1
+ ld de, wEnemyMoveEffect
+ ld bc, wPlayerBattleStatus1
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr z, .statModifierDownEffect
@@ -7758,7 +7774,7 @@ StatModifierDownEffect: ; 3f54c (f:754c)
pop bc
pop de
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jp nz, MoveMissed
ld a, [bc]
@@ -7907,9 +7923,9 @@ MonsStatsFellText: ; 3f661 (f:7661)
ld hl, FellText
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
jr z, .asm_3f674
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
.asm_3f674
cp $1a
ret c
@@ -7967,13 +7983,13 @@ StatModifierRatios: ; 3f6cb (f:76cb)
db 4, 1 ; 4.00
BideEffect: ; 3f6e5 (f:76e5)
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
ld de, wPlayerBideAccumulatedDamage
ld bc, wPlayerNumAttacksLeft
ld a, [H_WHOSETURN]
and a
jr z, .bideEffect
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld de, wEnemyBideAccumulatedDamage
ld bc, wEnemyNumAttacksLeft
.bideEffect
@@ -7982,8 +7998,8 @@ BideEffect: ; 3f6e5 (f:76e5)
ld [de], a
inc de
ld [de], a
- ld [W_PLAYERMOVEEFFECT], a
- ld [W_ENEMYMOVEEFFECT], a
+ ld [wPlayerMoveEffect], a
+ ld [wEnemyMoveEffect], a
call BattleRandom
and $1
inc a
@@ -7994,12 +8010,12 @@ BideEffect: ; 3f6e5 (f:76e5)
jp PlayBattleAnimation2
ThrashPetalDanceEffect: ; 3f717 (f:7717)
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
ld de, wPlayerNumAttacksLeft
ld a, [H_WHOSETURN]
and a
jr z, .thrashPetalDanceEffect
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld de, wEnemyNumAttacksLeft
.thrashPetalDanceEffect
set ThrashingAbout, [hl] ; mon is now using thrash/petal dance
@@ -8016,10 +8032,10 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
ld a, [H_WHOSETURN]
and a
jr nz, .asm_3f791
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr nz, .asm_3f77e
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld b, a
ld a, [wBattleMonLevel]
cp b
@@ -8037,7 +8053,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
jr nc, .asm_3f76e
ld c, 50
call DelayFrames
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
cp TELEPORT
jp nz, PrintDidntAffectText
jp PrintButItFailedText_
@@ -8047,23 +8063,23 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
ld [wAnimationType], a
inc a
ld [wEscapedFromBattle], a
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
jr .asm_3f7e4
.asm_3f77e
ld c, 50
call DelayFrames
ld hl, IsUnaffectedText
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
cp TELEPORT
jp nz, PrintText
jp PrintButItFailedText_
.asm_3f791
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr nz, .asm_3f7d1
ld a, [wBattleMonLevel]
ld b, a
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
cp b
jr nc, .asm_3f7c1
add b
@@ -8079,7 +8095,7 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
jr nc, .asm_3f7c1
ld c, 50
call DelayFrames
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
cp TELEPORT
jp nz, PrintDidntAffectText
jp PrintButItFailedText_
@@ -8089,13 +8105,13 @@ SwitchAndTeleportEffect: ; 3f739 (f:7739)
ld [wAnimationType], a
inc a
ld [wEscapedFromBattle], a
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
jr .asm_3f7e4
.asm_3f7d1
ld c, 50
call DelayFrames
ld hl, IsUnaffectedText
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
cp TELEPORT
jp nz, PrintText
jp ConditionalPrintButItFailed
@@ -8128,24 +8144,24 @@ WasBlownAwayText: ; 3f80c (f:780c)
db "@"
TwoToFiveAttacksEffect: ; 3f811 (f:7811)
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
ld de, wPlayerNumAttacksLeft
ld bc, wPlayerNumHits
ld a, [H_WHOSETURN]
and a
jr z, .twoToFiveAttacksEffect
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld de, wEnemyNumAttacksLeft
ld bc, wEnemyNumHits
.twoToFiveAttacksEffect
bit AttackingMultipleTimes, [hl] ; is mon attacking multiple times?
ret nz
set AttackingMultipleTimes, [hl] ; mon is now attacking multiple times
- ld hl, W_PLAYERMOVEEFFECT
+ ld hl, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .setNumberOfHits
- ld hl, W_ENEMYMOVEEFFECT
+ ld hl, wEnemyMoveEffect
.setNumberOfHits
ld a, [hl]
cp TWINEEDLE_EFFECT
@@ -8175,13 +8191,13 @@ TwoToFiveAttacksEffect: ; 3f811 (f:7811)
FlinchSideEffect: ; 3f85b (f:785b)
call CheckTargetSubstitute
ret nz
- ld hl, W_ENEMYBATTSTATUS1
- ld de, W_PLAYERMOVEEFFECT
+ ld hl, wEnemyBattleStatus1
+ ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .flinchSideEffect
- ld hl, W_PLAYERBATTSTATUS1
- ld de, W_ENEMYMOVEEFFECT
+ ld hl, wPlayerBattleStatus1
+ ld de, wEnemyMoveEffect
.flinchSideEffect
ld a, [de]
cp FLINCH_SIDE_EFFECT1
@@ -8200,14 +8216,14 @@ OneHitKOEffect: ; 3f884 (f:7884)
jpab OneHitKOEffect_
ChargeEffect: ; 3f88c (f:788c)
- ld hl, W_PLAYERBATTSTATUS1
- ld de, W_PLAYERMOVEEFFECT
+ ld hl, wPlayerBattleStatus1
+ ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
ld b, XSTATITEM_ANIM
jr z, .chargeEffect
- ld hl, W_ENEMYBATTSTATUS1
- ld de, W_ENEMYMOVEEFFECT
+ ld hl, wEnemyBattleStatus1
+ ld de, wEnemyMoveEffect
ld b, ANIM_AF
.chargeEffect
set ChargingUp, [hl]
@@ -8282,12 +8298,12 @@ DugAHoleText: ; 3f912 (f:7912)
db "@"
TrappingEffect: ; 3f917 (f:7917)
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
ld de, wPlayerNumAttacksLeft
ld a, [H_WHOSETURN]
and a
jr z, .trappingEffect
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
ld de, wEnemyNumAttacksLeft
.trappingEffect
bit UsingTrappingMove, [hl]
@@ -8325,20 +8341,20 @@ ConfusionEffect: ; 3f961 (f:7961)
call CheckTargetSubstitute
jr nz, ConfusionEffectFailed
call MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, ConfusionEffectFailed
ConfusionSideEffectSuccess: ; 3f96f (f:796f)
ld a, [H_WHOSETURN]
and a
- ld hl, W_ENEMYBATTSTATUS1
- ld bc, W_ENEMYCONFUSEDCOUNTER
- ld a, [W_PLAYERMOVEEFFECT]
+ ld hl, wEnemyBattleStatus1
+ ld bc, wEnemyConfusedCounter
+ ld a, [wPlayerMoveEffect]
jr z, .confuseTarget
- ld hl, W_PLAYERBATTSTATUS1
- ld bc, W_PLAYERCONFUSEDCOUNTER
- ld a, [W_ENEMYMOVEEFFECT]
+ ld hl, wPlayerBattleStatus1
+ ld bc, wPlayerConfusedCounter
+ ld a, [wEnemyMoveEffect]
.confuseTarget
bit Confused, [hl] ; is mon confused?
jr nz, ConfusionEffectFailed
@@ -8373,33 +8389,33 @@ SubstituteEffect: ; 3f9b9 (f:79b9)
jpab SubstituteEffect_
HyperBeamEffect: ; 3f9c1 (f:79c1)
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .hyperBeamEffect
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
.hyperBeamEffect
set NeedsToRecharge, [hl] ; mon now needs to recharge
ret
ClearHyperBeam: ; 3f9cf (f:79cf)
push hl
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .asm_3f9db
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
.asm_3f9db
res NeedsToRecharge, [hl] ; mon no longer needs to recharge
pop hl
ret
RageEffect: ; 3f9df (f:79df)
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .player
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
.player
set UsingRage, [hl] ; mon is now in "rage" mode
ret
@@ -8408,19 +8424,19 @@ MimicEffect: ; 3f9ed (f:79ed)
ld c, 50
call DelayFrames
call MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .asm_3fa74
ld a, [H_WHOSETURN]
and a
ld hl, wBattleMonMoves
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
jr nz, .asm_3fa13
ld a, [wLinkState]
cp LINK_STATE_BATTLING
jr nz, .asm_3fa3a
ld hl, wEnemyMonMoves
- ld a, [W_ENEMYBATTSTATUS1]
+ ld a, [wEnemyBattleStatus1]
.asm_3fa13
bit Invulnerable, a
jr nz, .asm_3fa74
@@ -8445,7 +8461,7 @@ MimicEffect: ; 3f9ed (f:79ed)
ld a, [wEnemyMoveListIndex]
jr .asm_3fa5f
.asm_3fa3a
- ld a, [W_ENEMYBATTSTATUS1]
+ ld a, [wEnemyBattleStatus1]
bit Invulnerable, a
jr nz, .asm_3fa74
ld a, [wCurrentMenuItem]
@@ -8489,15 +8505,15 @@ SplashEffect: ; 3fa84 (f:7a84)
DisableEffect: ; 3fa8a (f:7a8a)
call MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .moveMissed
- ld de, W_ENEMYDISABLEDMOVE
+ ld de, wEnemyDisabledMove
ld hl, wEnemyMonMoves
ld a, [H_WHOSETURN]
and a
jr z, .disableEffect
- ld de, W_PLAYERDISABLEDMOVE
+ ld de, wPlayerDisabledMove
ld hl, wBattleMonMoves
.disableEffect
; no effect if target already has a move disabled
@@ -8551,7 +8567,7 @@ DisableEffect: ; 3fa8a (f:7a8a)
inc a ; 1-8 turns disabled
inc c ; move 1-4 will be disabled
swap c
- add c ; map disabled move to high nibble of W_ENEMYDISABLEDMOVE / W_PLAYERDISABLEDMOVE
+ add c ; map disabled move to high nibble of wEnemyDisabledMove / wPlayerDisabledMove
ld [de], a
call PlayCurrentMoveAnimation2
ld hl, wPlayerDisabledMoveNumber
@@ -8639,11 +8655,11 @@ ParalyzedMayNotAttackText: ; 3fb74 (f:7b74)
CheckTargetSubstitute: ; 3fb79 (f:7b79)
push hl
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .next1
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
.next1
bit HasSubstituteUp, [hl]
pop hl
@@ -8654,16 +8670,16 @@ PlayCurrentMoveAnimation2: ; 3fb89 (f:7b89)
; plays wAnimationType 3 or 6
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
jr z, .notEnemyTurn
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
.notEnemyTurn
and a
ret z
PlayBattleAnimation2: ; 3fb96 (f:7b96)
; play animation ID at a and animation type 6 or 3
- ld [W_ANIMATIONID], a
+ ld [wAnimationID], a
ld a, [H_WHOSETURN]
and a
ld a, $6
@@ -8680,19 +8696,19 @@ PlayCurrentMoveAnimation: ; 3fba8 (f:7ba8)
ld [wAnimationType], a
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
jr z, .notEnemyTurn
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
.notEnemyTurn
and a
ret z
PlayBattleAnimation: ; 3fbb9 (f:7bb9)
; play animation ID at a and predefined animation type
- ld [W_ANIMATIONID], a
+ ld [wAnimationID], a
PlayBattleAnimationGotID: ; 3fbbc (f:7bbc)
-; play animation at W_ANIMATIONID
+; play animation at wAnimationID
push hl
push de
push bc
diff --git a/engine/battle/decrement_pp.asm b/engine/battle/decrement_pp.asm
index 7345c5c1..f1a0dd58 100644
--- a/engine/battle/decrement_pp.asm
+++ b/engine/battle/decrement_pp.asm
@@ -4,9 +4,9 @@ DecrementPP: ; 68000 (1a:4000)
cp a, STRUGGLE
ret z ; if the pokemon is using "struggle", there's nothing to do
; we don't decrement PP for "struggle"
- ld hl, W_PLAYERBATTSTATUS1
- ld a, [hli] ; load the W_PLAYERBATTSTATUS1 pokemon status flags and increment hl to load the
- ; W_PLAYERBATTSTATUS2 status flags later
+ ld hl, wPlayerBattleStatus1
+ ld a, [hli] ; load the wPlayerBattleStatus1 pokemon status flags and increment hl to load the
+ ; wPlayerBattleStatus2 status flags later
and a, (1 << StoringEnergy) | (1 << ThrashingAbout) | (1 << AttackingMultipleTimes)
ret nz ; if any of these statuses are true, don't decrement PP
bit UsingRage, [hl]
@@ -17,7 +17,7 @@ DecrementPP: ; 68000 (1a:4000)
call .DecrementPP
; decrement PP in the party struct
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
bit Transformed, a
ret nz ; Return if transformed. Pokemon Red stores the "current pokemon's" PP
; separately from the "Pokemon in your party's" PP. This is
diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm
index 7198d984..8cfd30af 100644
--- a/engine/battle/draw_hud_pokeball_gfx.asm
+++ b/engine/battle/draw_hud_pokeball_gfx.asm
@@ -1,7 +1,7 @@
DrawAllPokeballs: ; 3a849 (e:6849)
call LoadPartyPokeballGfx
call SetupOwnPartyPokeballs
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
ret z ; return if wild pokémon
jp SetupEnemyPartyPokeballs
@@ -13,7 +13,7 @@ DrawEnemyPokeballs: ; 3a857 (e:6857)
LoadPartyPokeballGfx: ; 3a85d (e:685d)
ld de, PokeballTileGraphics
ld hl, vSprites + $310
- lb bc, BANK(PokeballTileGraphics), $04
+ lb bc, BANK(PokeballTileGraphics), (PokeballTileGraphicsEnd - PokeballTileGraphics) / $10
jp CopyVideoData
SetupOwnPartyPokeballs: ; 3a869 (e:6869)
@@ -22,7 +22,7 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869)
ld de, wPartyCount
call SetupPokeballs
ld a, $60
- ld hl, W_BASECOORDX
+ ld hl, wBaseCoordX
ld [hli], a
ld [hl], a
ld a, 8
@@ -35,7 +35,7 @@ SetupEnemyPartyPokeballs: ; 3a887 (e:6887)
ld hl, wEnemyMons
ld de, wEnemyPartyCount
call SetupPokeballs
- ld hl, W_BASECOORDX
+ ld hl, wBaseCoordX
ld a, $48
ld [hli], a
ld [hl], $20
@@ -98,19 +98,19 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
ld de, wBuffer
ld c, PARTY_LENGTH
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld [hli], a
ld a, [de]
ld [hli], a
xor a
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld b, a
ld a, [wHUDPokeballGfxOffsetX]
add b
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
inc de
dec c
jr nz, .loop
@@ -168,7 +168,7 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
ld hl, wPartyMons
ld de, wPartyCount
call SetupPokeballs
- ld hl, W_BASECOORDX
+ ld hl, wBaseCoordX
ld a, $50
ld [hli], a
ld [hl], $40
@@ -179,7 +179,7 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
ld hl, wEnemyMons
ld de, wEnemyPartyCount
call SetupPokeballs
- ld hl, W_BASECOORDX
+ ld hl, wBaseCoordX
ld a, $50
ld [hli], a
ld [hl], $68
@@ -189,3 +189,4 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon)
PokeballTileGraphics:: ; 3a97e (e:697e)
INCBIN "gfx/pokeball.2bpp"
+PokeballTileGraphicsEnd:
diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm
index c642d206..34bc3119 100755
--- a/engine/battle/end_of_battle.asm
+++ b/engine/battle/end_of_battle.asm
@@ -46,11 +46,11 @@ EndOfBattle: ; 137aa (4:77aa)
.resetVariables
xor a
ld [wLowHealthAlarm], a ;disable low health alarm
- ld [wc02a], a
- ld [W_ISINBATTLE], a
- ld [W_BATTLETYPE], a
- ld [W_MOVEMISSED], a
- ld [W_CUROPPONENT], a
+ ld [wChannelSoundIDs + CH4], a
+ ld [wIsInBattle], a
+ ld [wBattleType], a
+ ld [wMoveMissed], a
+ ld [wCurOpponent], a
ld [wForcePlayerToChooseMon], a
ld [wNumRunAttempts], a
ld [wEscapedFromBattle], a
diff --git a/engine/battle/experience.asm b/engine/battle/experience.asm
index edee81b1..0480bfcb 100644
--- a/engine/battle/experience.asm
+++ b/engine/battle/experience.asm
@@ -76,14 +76,14 @@ GainExperience: ; 5524f (15:524f)
ld b, [hl]
ld a, [wPlayerID + 1]
cp b
- ld a, $0
+ ld a, 0
jr z, .next
.tradedMon
call BoostExp ; traded mon exp boost
- ld a, $1
+ ld a, 1
.next
ld [wGainBoostedExp], a
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a ; is it a trainer battle?
call nz, BoostExp ; if so, boost exp
inc hl
@@ -92,12 +92,12 @@ GainExperience: ; 5524f (15:524f)
; add the gained exp to the party mon's exp
ld b, [hl]
ld a, [H_QUOTIENT + 3]
- ld [wcf4c], a
+ ld [wExpAmountGained + 1], a
add b
ld [hld], a
ld b, [hl]
ld a, [H_QUOTIENT + 2]
- ld [wcf4b], a
+ ld [wExpAmountGained], a
adc b
ld [hl], a
jr nc, .noCarry
@@ -160,11 +160,11 @@ GainExperience: ; 5524f (15:524f)
ld a, [hl] ; current level
cp d
jp z, .nextMon ; if level didn't change, go to next mon
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
push af
push hl
ld a, d
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld [hl], a
ld bc, wPartyMon1Species - wPartyMon1Level
add hl, bc
@@ -223,7 +223,7 @@ GainExperience: ; 5524f (15:524f)
ld bc, 1 + NUM_STATS * 2 ; size of stats
call CopyData
pop hl
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
bit 3, a ; is the mon transformed?
jr nz, .recalcStatChanges
; the mon is not transformed, so update the unmodified stats
@@ -231,8 +231,8 @@ GainExperience: ; 5524f (15:524f)
ld bc, 1 + NUM_STATS * 2
call CopyData
.recalcStatChanges
- xor a
- ld [wd11e], a
+ xor a ; battle mon
+ ld [wCalculateWhoseStats], a
callab CalculateModifiedStats
callab ApplyBurnAndParalysisPenaltiesToPlayer
callab ApplyBadgeStatBoosts
@@ -261,7 +261,7 @@ GainExperience: ; 5524f (15:524f)
predef FlagActionPredef
pop hl
pop af
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
.nextMon
ld a, [wPartyCount]
diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm
index 961f25cf..36492292 100644
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -1,10 +1,10 @@
GetTrainerName_: ; 13a58 (4:7a58)
- ld hl, W_GRASSRATE
+ ld hl, wGrassRate
ld a, [wLinkState]
and a
jr nz, .rival
- ld hl, W_RIVALNAME
- ld a, [W_TRAINERCLASS]
+ ld hl, wRivalName
+ ld a, [wTrainerClass]
cp SONY1
jr z, .rival
cp SONY2
@@ -19,6 +19,6 @@ GetTrainerName_: ; 13a58 (4:7a58)
call GetName
ld hl, wcd6d
.rival
- ld de, W_TRAINERNAME
+ ld de, wTrainerName
ld bc, $d
jp CopyData
diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm
index d76f3f41..6702589d 100644
--- a/engine/battle/ghost_marowak_anim.asm
+++ b/engine/battle/ghost_marowak_anim.asm
@@ -55,22 +55,22 @@ CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
ld bc, 7 * 7
call CopyVideoData
ld a, $10
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, $70
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld hl, wOAMBuffer
lb bc, 6, 6
ld d, $8
.oamLoop
push bc
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld e, a
.oamInnerLoop
ld a, e
add $8
ld e, a
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld [hli], a
ld a, d
ld [hli], a
@@ -80,9 +80,9 @@ CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
dec c
jr nz, .oamInnerLoop
inc d
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add $8
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
pop bc
dec b
jr nz, .oamLoop
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm
index 3c926858..9372a786 100644
--- a/engine/battle/init_battle_variables.asm
+++ b/engine/battle/init_battle_variables.asm
@@ -16,23 +16,23 @@ InitBattleVariables: ; 525af (14:65af)
ld [wPlayerMonNumber], a
ld [wEscapedFromBattle], a
ld [wMapPalOffset], a
- ld hl, wcf1d
- ld [hli], a
- ld [hl], a
+ ld hl, wPlayerHPBarColor
+ ld [hli], a ; wPlayerHPBarColor
+ ld [hl], a ; wEnemyHPBarColor
ld hl, wCanEvolveFlags
ld b, $3c
.loop
ld [hli], a
dec b
jr nz, .loop
- inc a
- ld [wccd9], a
- ld a, [W_CURMAP]
+ inc a ; POUND
+ ld [wTestBattlePlayerSelectedMove], a
+ ld a, [wCurMap]
cp SAFARI_ZONE_EAST
jr c, .notSafariBattle
cp SAFARI_ZONE_REST_HOUSE_1
jr nc, .notSafariBattle
- ld a, $2 ; safari battle
- ld [W_BATTLETYPE], a
+ ld a, BATTLE_TYPE_SAFARI
+ ld [wBattleType], a
.notSafariBattle
jpab PlayBattleMusic
diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm
index e4c5b4bd..8e895361 100644
--- a/engine/battle/moveEffects/conversion_effect.asm
+++ b/engine/battle/moveEffects/conversion_effect.asm
@@ -3,13 +3,13 @@ ConversionEffect_: ; 139a3 (4:79a3)
ld de, wBattleMonType1
ld a, [H_WHOSETURN]
and a
- ld a, [W_ENEMYBATTSTATUS1]
+ ld a, [wEnemyBattleStatus1]
jr z, .conversionEffect
push hl
ld h, d
ld l, e
pop de
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
.conversionEffect
bit Invulnerable, a ; is mon immune to typical attacks (dig/fly)
jr nz, PrintButItFailedText
diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm
index 1096794f..ffa75c13 100644
--- a/engine/battle/moveEffects/drain_hp_effect.asm
+++ b/engine/battle/moveEffects/drain_hp_effect.asm
@@ -1,5 +1,5 @@
DrainHPEffect_: ; 783f (1:783f)
- ld hl, W_DAMAGE
+ ld hl, wDamage
ld a, [hl]
srl a ; divide damage by 2
ld [hli], a
@@ -36,12 +36,12 @@ DrainHPEffect_: ; 783f (1:783f)
dec bc
ld [bc], a
; add damage to attacker's HP and copy new HP to wHPBarNewHP
- ld a, [W_DAMAGE + 1]
+ ld a, [wDamage + 1]
ld b, [hl]
add b
ld [hld], a
ld [wHPBarNewHP], a
- ld a, [W_DAMAGE]
+ ld a, [wDamage]
ld b, [hl]
adc b
ld [hli], a
@@ -85,9 +85,9 @@ DrainHPEffect_: ; 783f (1:783f)
ld hl, SuckedHealthText
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVEEFFECT]
+ ld a, [wPlayerMoveEffect]
jr z, .next3
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
.next3
cp DREAM_EATER_EFFECT
jr nz, .printText
diff --git a/engine/battle/moveEffects/focus_energy_effect.asm b/engine/battle/moveEffects/focus_energy_effect.asm
index b8a783e4..b1cd03f3 100644
--- a/engine/battle/moveEffects/focus_energy_effect.asm
+++ b/engine/battle/moveEffects/focus_energy_effect.asm
@@ -1,9 +1,9 @@
FocusEnergyEffect_: ; 27f86 (9:7f86)
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .notEnemy
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
.notEnemy
bit GettingPumped, [hl] ; is mon already using focus energy?
jr nz, .alreadyUsing
diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm
index 5c5443c0..8c759cce 100644
--- a/engine/battle/moveEffects/haze_effect.asm
+++ b/engine/battle/moveEffects/haze_effect.asm
@@ -31,14 +31,14 @@ HazeEffect_: ; 139da (4:79da)
.cureVolatileStatuses
xor a
- ld [W_PLAYERDISABLEDMOVE], a
- ld [W_ENEMYDISABLEDMOVE], a
+ ld [wPlayerDisabledMove], a
+ ld [wEnemyDisabledMove], a
ld hl, wPlayerDisabledMoveNumber
ld [hli], a
ld [hl], a
- ld hl, W_PLAYERBATTSTATUS1
+ ld hl, wPlayerBattleStatus1
call CureVolatileStatuses
- ld hl, W_ENEMYBATTSTATUS1
+ ld hl, wEnemyBattleStatus1
call CureVolatileStatuses
ld hl, PlayCurrentMoveAnimation
call CallBankF
diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm
index cea63a1f..4b8f83bd 100644
--- a/engine/battle/moveEffects/heal_effect.asm
+++ b/engine/battle/moveEffects/heal_effect.asm
@@ -3,11 +3,11 @@ HealEffect_: ; 3b9ec (e:79ec)
and a
ld de, wBattleMonHP
ld hl, wBattleMonMaxHP
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
jr z, .healEffect
ld de, wEnemyMonHP
ld hl, wEnemyMonMaxHP
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
.healEffect
ld b, a
ld a, [de]
diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm
index 1b0afe4b..ea7ceb30 100644
--- a/engine/battle/moveEffects/leech_seed_effect.asm
+++ b/engine/battle/moveEffects/leech_seed_effect.asm
@@ -1,14 +1,14 @@
LeechSeedEffect_: ; 2bea9 (a:7ea9)
callab MoveHitTest
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .moveMissed
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
ld de, wEnemyMonType1
ld a, [H_WHOSETURN]
and a
jr z, .leechSeedEffect
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
ld de, wBattleMonType1
.leechSeedEffect
; miss if the target is grass-type or already seeded
diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm
index 1f8e40b0..fcdb4b28 100644
--- a/engine/battle/moveEffects/mist_effect.asm
+++ b/engine/battle/moveEffects/mist_effect.asm
@@ -1,9 +1,9 @@
MistEffect_: ; 33f2b (c:7f2b)
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .mistEffect
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
.mistEffect
bit ProtectedByMist, [hl] ; is mon protected by mist?
jr nz, .mistAlreadyInUse
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm
index 907db80c..efba0b79 100644
--- a/engine/battle/moveEffects/one_hit_ko_effect.asm
+++ b/engine/battle/moveEffects/one_hit_ko_effect.asm
@@ -1,5 +1,5 @@
OneHitKOEffect_: ; 33f57 (c:7f57)
- ld hl, W_DAMAGE
+ ld hl, wDamage
xor a
ld [hli], a
ld [hl], a ; set the damage output to zero
@@ -24,7 +24,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
ld a, [hl]
sbc b
jr c, .userIsSlower
- ld hl, W_DAMAGE
+ ld hl, wDamage
ld a, $ff
ld [hli], a
ld [hl], a
@@ -34,5 +34,5 @@ OneHitKOEffect_: ; 33f57 (c:7f57)
.userIsSlower
; keep damage at 0 and set move missed flag if target's current speed is higher instead
ld a, $1
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ret
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm
index 658b0c50..eac42a90 100644
--- a/engine/battle/moveEffects/paralyze_effect.asm
+++ b/engine/battle/moveEffects/paralyze_effect.asm
@@ -1,11 +1,11 @@
ParalyzeEffect_: ; 52601 (14:6601)
ld hl, wEnemyMonStatus
- ld de, W_PLAYERMOVETYPE
+ ld de, wPlayerMoveType
ld a, [H_WHOSETURN]
and a
jp z, .next
ld hl, wBattleMonStatus
- ld de, W_ENEMYMOVETYPE
+ ld de, wEnemyMoveType
.next
ld a, [hl]
and a ; does the target already have a status ailment?
@@ -28,7 +28,7 @@ ParalyzeEffect_: ; 52601 (14:6601)
push hl
callab MoveHitTest
pop hl
- ld a, [W_MOVEMISSED]
+ ld a, [wMoveMissed]
and a
jr nz, .didntAffect
set PAR, [hl]
diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm
index 26e69ef5..eb228615 100644
--- a/engine/battle/moveEffects/pay_day_effect.asm
+++ b/engine/battle/moveEffects/pay_day_effect.asm
@@ -1,4 +1,4 @@
-PayDayEffect_ ; 2feb8 (b:7eb8)
+PayDayEffect_: ; 2feb8 (b:7eb8)
xor a
ld hl, wcd6d
ld [hli], a
diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm
index 51232af6..43bf8d5f 100644
--- a/engine/battle/moveEffects/recoil_effect.asm
+++ b/engine/battle/moveEffects/recoil_effect.asm
@@ -1,16 +1,16 @@
RecoilEffect_: ; 1392c (4:792c)
ld a, [H_WHOSETURN]
and a
- ld a, [W_PLAYERMOVENUM]
+ ld a, [wPlayerMoveNum]
ld hl, wBattleMonMaxHP
jr z, .recoilEffect
- ld a, [W_ENEMYMOVENUM]
+ ld a, [wEnemyMoveNum]
ld hl, wEnemyMonMaxHP
.recoilEffect
ld d, a
- ld a, [W_DAMAGE]
+ ld a, [wDamage]
ld b, a
- ld a, [W_DAMAGE + 1]
+ ld a, [wDamage + 1]
ld c, a
srl b
rr c
diff --git a/engine/battle/moveEffects/reflect_light_screen_effect.asm b/engine/battle/moveEffects/reflect_light_screen_effect.asm
index df34827f..45f785a4 100644
--- a/engine/battle/moveEffects/reflect_light_screen_effect.asm
+++ b/engine/battle/moveEffects/reflect_light_screen_effect.asm
@@ -1,11 +1,11 @@
ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
- ld hl, W_PLAYERBATTSTATUS3
- ld de, W_PLAYERMOVEEFFECT
+ ld hl, wPlayerBattleStatus3
+ ld de, wPlayerMoveEffect
ld a, [H_WHOSETURN]
and a
jr z, .reflectLightScreenEffect
- ld hl, W_ENEMYBATTSTATUS3
- ld de, W_ENEMYMOVEEFFECT
+ ld hl, wEnemyBattleStatus3
+ ld de, wEnemyMoveEffect
.reflectLightScreenEffect
ld a, [de]
cp LIGHT_SCREEN_EFFECT
diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm
index c72fffbe..7cac9f62 100644
--- a/engine/battle/moveEffects/substitute_effect.asm
+++ b/engine/battle/moveEffects/substitute_effect.asm
@@ -3,13 +3,13 @@ SubstituteEffect_: ; 17dad (5:7dad)
call DelayFrames
ld hl, wBattleMonMaxHP
ld de, wPlayerSubstituteHP
- ld bc, W_PLAYERBATTSTATUS2
+ ld bc, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .notEnemy
ld hl, wEnemyMonMaxHP
ld de, wEnemySubstituteHP
- ld bc, W_ENEMYBATTSTATUS2
+ ld bc, wEnemyBattleStatus2
.notEnemy
ld a, [bc]
bit HasSubstituteUp, a ; user already has substitute?
@@ -44,7 +44,7 @@ SubstituteEffect_: ; 17dad (5:7dad)
ld h, b
ld l, c
set HasSubstituteUp, [hl]
- ld a, [W_OPTIONS]
+ ld a, [wOptions]
bit 7, a ; battle animation is enabled?
ld hl, PlayCurrentMoveAnimation
ld b, BANK(PlayCurrentMoveAnimation)
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm
index 185d47af..097a0d3a 100644
--- a/engine/battle/moveEffects/transform_effect.asm
+++ b/engine/battle/moveEffects/transform_effect.asm
@@ -1,27 +1,27 @@
TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, wBattleMonSpecies
ld de, wEnemyMonSpecies
- ld bc, W_ENEMYBATTSTATUS3
- ld a, [W_ENEMYBATTSTATUS1]
+ ld bc, wEnemyBattleStatus3
+ ld a, [wEnemyBattleStatus1]
ld a, [H_WHOSETURN]
and a
jr nz, .hitTest
ld hl, wEnemyMonSpecies
ld de, wBattleMonSpecies
- ld bc, W_PLAYERBATTSTATUS3
+ ld bc, wPlayerBattleStatus3
ld [wPlayerMoveListIndex], a
- ld a, [W_PLAYERBATTSTATUS1]
+ ld a, [wPlayerBattleStatus1]
.hitTest
bit Invulnerable, a ; is mon invulnerable to typical attacks? (fly/dig)
jp nz, .failed
push hl
push de
push bc
- ld hl, W_PLAYERBATTSTATUS2
+ ld hl, wPlayerBattleStatus2
ld a, [H_WHOSETURN]
and a
jr z, .transformEffect
- ld hl, W_ENEMYBATTSTATUS2
+ ld hl, wEnemyBattleStatus2
.transformEffect
; animation(s) played are different if target has Substitute up
bit HasSubstituteUp, [hl]
@@ -29,7 +29,7 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld hl, HideSubstituteShowMonAnim
ld b, BANK(HideSubstituteShowMonAnim)
call nz, Bankswitch
- ld a, [W_OPTIONS]
+ ld a, [wOptions]
add a
ld hl, PlayCurrentMoveAnimation
ld b, BANK(PlayCurrentMoveAnimation)
@@ -67,12 +67,12 @@ TransformEffect_: ; 3bab1 (e:7ab1)
ld a, [H_WHOSETURN]
and a
jr z, .next
-; save enemy mon DVs in wcceb/wccec (enemy turn only)
+; save enemy mon DVs at wTransformedEnemyMonOriginalDVs
ld a, [de]
- ld [wcceb], a
+ ld [wTransformedEnemyMonOriginalDVs], a
inc de
ld a, [de]
- ld [wccec], a
+ ld [wTransformedEnemyMonOriginalDVs + 1], a
dec de
.next
; DVs
diff --git a/engine/battle/print_type.asm b/engine/battle/print_type.asm
index 38c701a8..deca2426 100644
--- a/engine/battle/print_type.asm
+++ b/engine/battle/print_type.asm
@@ -6,11 +6,11 @@ PrintMonType: ; 27d6b (9:7d6b)
call GetMonHeader
pop hl
push hl
- ld a, [W_MONHTYPE1]
+ ld a, [wMonHType1]
call PrintType
- ld a, [W_MONHTYPE1]
+ ld a, [wMonHType1]
ld b, a
- ld a, [W_MONHTYPE2]
+ ld a, [wMonHType2]
cp b
pop hl
jr z, EraseType2Text
@@ -34,7 +34,7 @@ EraseType2Text: ; 27d8c (9:7d8c)
PrintMoveType: ; 27d98 (9:7d98)
call GetPredefRegisters
push hl
- ld a, [W_PLAYERMOVETYPE]
+ ld a, [wPlayerMoveType]
; fall through
PrintType_: ; 27d9f (9:7d9f)
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index 0976c7c7..4a5657b2 100755
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -15,7 +15,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [hl],a
; get the pointer to trainer data for this class
- ld a,[W_CUROPPONENT]
+ ld a,[wCurOpponent]
sub $C9 ; convert value from pokemon to trainer
add a,a
ld hl,TrainerDataPointers
@@ -25,7 +25,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld a,[hli]
ld h,[hl]
ld l,a
- ld a,[W_TRAINERNO]
+ ld a,[wTrainerNo]
ld b,a
; At this point b contains the trainer number,
; and hl points to the trainer class.
@@ -43,13 +43,13 @@ ReadTrainer: ; 39c53 (e:5c53)
; if the first byte of trainer data is FF,
; - each pokemon has a specific level
; (as opposed to the whole team being of the same level)
-; - if [W_LONEATTACKNO] != 0, one pokemon on the team has a special move
+; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move
; else the first byte is the level of every pokemon on the team
.IterateTrainer
ld a,[hli]
cp $FF ; is the trainer special?
jr z,.SpecialTrainer ; if so, check for special moves
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
.LoopTrainerData
ld a,[hli]
and a ; have we reached the end of the trainer data?
@@ -65,11 +65,11 @@ ReadTrainer: ; 39c53 (e:5c53)
; if this code is being run:
; - each pokemon has a specific level
; (as opposed to the whole team being of the same level)
-; - if [W_LONEATTACKNO] != 0, one pokemon on the team has a special move
+; - if [wLoneAttackNo] != 0, one pokemon on the team has a special move
ld a,[hli]
and a ; have we reached the end of the trainer data?
jr z,.AddLoneMove
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
ld a,[hli]
ld [wcf91],a
ld a,ENEMY_PARTY_DATA
@@ -80,7 +80,7 @@ ReadTrainer: ; 39c53 (e:5c53)
jr .SpecialTrainer
.AddLoneMove
; does the trainer have a single monster with a different move
- ld a,[W_LONEATTACKNO] ; Brock is 01, Misty is 02, Erika is 04, etc
+ ld a,[wLoneAttackNo] ; Brock is 01, Misty is 02, Erika is 04, etc
and a
jr z,.AddTeamMove
dec a
@@ -100,8 +100,8 @@ ReadTrainer: ; 39c53 (e:5c53)
; check if our trainer's team has special moves
; get trainer class number
- ld a,[W_CUROPPONENT]
- sub $C8
+ ld a,[wCurOpponent]
+ sub 200
ld b,a
ld hl,TeamMoves
@@ -130,7 +130,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [wEnemyMon1Moves + 2],a
; starter
- ld a,[W_RIVALSTARTER]
+ ld a,[wRivalStarter]
cp STARTER3
ld b,MEGA_DRAIN
jr z,.GiveStarterMove
@@ -150,7 +150,7 @@ ReadTrainer: ; 39c53 (e:5c53)
ld [de],a
inc de
ld [de],a
- ld a,[W_CURENEMYLVL]
+ ld a,[wCurEnemyLVL]
ld b,a
.LastLoop
; update wAmountMoneyWon addresses (money to win) based on enemy's level
@@ -162,5 +162,5 @@ ReadTrainer: ; 39c53 (e:5c53)
inc de
inc de
dec b
- jr nz,.LastLoop ; repeat W_CURENEMYLVL times
+ jr nz,.LastLoop ; repeat wCurEnemyLVL times
ret
diff --git a/engine/battle/safari_zone.asm b/engine/battle/safari_zone.asm
index 6b0e2220..344e2309 100755
--- a/engine/battle/safari_zone.asm
+++ b/engine/battle/safari_zone.asm
@@ -18,7 +18,7 @@ PrintSafariZoneBattleText: ; 4277 (1:4277)
ld a, [wEnemyMonSpecies]
ld [wd0b5], a
call GetMonHeader
- ld a, [W_MONHCATCHRATE]
+ ld a, [wMonHCatchRate]
ld [wEnemyMonCatchRate], a
pop hl
.asm_429f
diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm
index 84ef1f69..ceba63bd 100644
--- a/engine/battle/save_trainer_name.asm
+++ b/engine/battle/save_trainer_name.asm
@@ -1,6 +1,6 @@
SaveTrainerName: ; 27e4a (9:7e4a)
ld hl,TrainerNamePointers
- ld a,[W_TRAINERCLASS]
+ ld a,[wTrainerClass]
dec a
ld c,a
ld b,0
@@ -23,50 +23,50 @@ TrainerNamePointers: ; 27e64 (9:7e64)
dw YoungsterName
dw BugCatcherName
dw LassName
- dw W_TRAINERNAME
+ dw wTrainerName
dw JrTrainerMName
dw JrTrainerFName
dw PokemaniacName
dw SuperNerdName
- dw W_TRAINERNAME
- dw W_TRAINERNAME
+ dw wTrainerName
+ dw wTrainerName
dw BurglarName
dw EngineerName
dw JugglerXName
- dw W_TRAINERNAME
+ dw wTrainerName
dw SwimmerName
- dw W_TRAINERNAME
- dw W_TRAINERNAME
+ dw wTrainerName
+ dw wTrainerName
dw BeautyName
- dw W_TRAINERNAME
+ dw wTrainerName
dw RockerName
dw JugglerName
- dw W_TRAINERNAME
- dw W_TRAINERNAME
+ dw wTrainerName
+ dw wTrainerName
dw BlackbeltName
- dw W_TRAINERNAME
+ dw wTrainerName
dw ProfOakName
dw ChiefName
dw ScientistName
- dw W_TRAINERNAME
+ dw wTrainerName
dw RocketName
dw CooltrainerMName
dw CooltrainerFName
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
- dw W_TRAINERNAME
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
+ dw wTrainerName
YoungsterName: ; 27ec2 (9:7ec2)
db "YOUNGSTER@"
diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm
index ed227984..6a8d43a9 100644
--- a/engine/battle/scale_sprites.asm
+++ b/engine/battle/scale_sprites.asm
@@ -2,12 +2,12 @@
; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored
; resulting in a 7*7 tile output sprite chunk
ScaleSpriteByTwo: ; 2fe40 (b:7e40)
- ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
- ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
+ ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
+ ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
call ScaleFirstThreeSpriteColumnsByTwo ; scale first 3 tile columns
- ld de, S_SPRITEBUFFER2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
- ld hl, S_SPRITEBUFFER1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
+ ld de, sSpriteBuffer2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
+ ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
diff --git a/engine/battle/scroll_draw_trainer_pic.asm b/engine/battle/scroll_draw_trainer_pic.asm
index b32650e3..5949208c 100644
--- a/engine/battle/scroll_draw_trainer_pic.asm
+++ b/engine/battle/scroll_draw_trainer_pic.asm
@@ -3,8 +3,8 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
; the screen from the right.
xor a
ld [wEnemyMonSpecies2], a
- ld b, $1
- call GoPAL_SET
+ ld b, SET_PAL_BATTLE
+ call RunPaletteCommand
callab _LoadTrainerPic
coord hl, 19, 0
ld c, $0
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 9102b2d8..bab4c253 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -7,7 +7,7 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
ld [hli], a ; move 2
ld [hli], a ; move 3
ld [hl], a ; move 4
- ld a, [W_ENEMYDISABLEDMOVE] ; forbid disabled move (if any)
+ ld a, [wEnemyDisabledMove] ; forbid disabled move (if any)
swap a
and $f
jr z, .noMoveDisabled
@@ -19,7 +19,7 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
ld [hl], $50 ; forbid (highly discourage) disabled move
.noMoveDisabled
ld hl, TrainerClassMoveChoiceModifications
- ld a, [W_TRAINERCLASS]
+ ld a, [wTrainerClass]
ld b, a
.loopTrainerClasses
dec b
@@ -126,10 +126,10 @@ AIMoveChoiceModification1: ; 397ab (e:57ab)
ret z ; no more moves in move set
inc de
call ReadMove
- ld a, [W_ENEMYMOVEPOWER]
+ ld a, [wEnemyMovePower]
and a
jr nz, .nextMove
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
push hl
push de
push bc
@@ -171,7 +171,7 @@ AIMoveChoiceModification2: ; 397e7 (e:57e7)
ret z ; no more moves in move set
inc de
call ReadMove
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp ATTACK_UP1_EFFECT
jr c, .nextMove
cp BIDE_EFFECT
@@ -191,7 +191,7 @@ AIMoveChoiceModification2: ; 397e7 (e:57e7)
AIMoveChoiceModification3: ; 39817 (e:5817)
ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset)
ld de, wEnemyMonMoves ; enemy moves
- ld b, $5
+ ld b, NUM_MOVES + 1
.nextMove
dec b
ret z ; processed all 4 moves
@@ -208,7 +208,7 @@ AIMoveChoiceModification3: ; 39817 (e:5817)
pop de
pop bc
pop hl
- ld a, [wd11e]
+ ld a, [wTypeEffectiveness]
cp $10
jr z, .nextMove
jr c, .notEffectiveMove
@@ -218,7 +218,7 @@ AIMoveChoiceModification3: ; 39817 (e:5817)
push hl
push de
push bc
- ld a, [W_ENEMYMOVETYPE]
+ ld a, [wEnemyMoveType]
ld d, a
ld hl, wEnemyMonMoves ; enemy moves
ld b, NUM_MOVES + 1
@@ -230,17 +230,17 @@ AIMoveChoiceModification3: ; 39817 (e:5817)
and a
jr z, .done
call ReadMove
- ld a, [W_ENEMYMOVEEFFECT]
+ ld a, [wEnemyMoveEffect]
cp SUPER_FANG_EFFECT
jr z, .betterMoveFound ; Super Fang is considered to be a better move
cp SPECIAL_DAMAGE_EFFECT
jr z, .betterMoveFound ; any special damage moves are considered to be better moves
cp FLY_EFFECT
jr z, .betterMoveFound ; Fly is considered to be a better move
- ld a, [W_ENEMYMOVETYPE]
+ ld a, [wEnemyMoveType]
cp d
jr z, .loopMoves
- ld a, [W_ENEMYMOVEPOWER]
+ ld a, [wEnemyMovePower]
and a
jr nz, .betterMoveFound ; damaging moves of a different type are considered to be better moves
jr .loopMoves
@@ -264,9 +264,9 @@ ReadMove: ; 39884 (e:5884)
push bc
dec a
ld hl,Moves
- ld bc,6
+ ld bc,MoveEnd - Moves
call AddNTimes
- ld de,W_ENEMYMOVENUM
+ ld de,wEnemyMoveNum
call CopyData
pop bc
pop de
@@ -280,8 +280,8 @@ TrainerClassMoveChoiceModifications: ; 3989b (e:589b)
db 1,0 ; BUG CATCHER
db 1,0 ; LASS
db 1,3,0 ; SAILOR
- db 1,0 ; JR__TRAINER_M
- db 1,0 ; JR__TRAINER_F
+ db 1,0 ; JR_TRAINER_M
+ db 1,0 ; JR_TRAINER_F
db 1,2,3,0; POKEMANIAC
db 1,2,0 ; SUPER_NERD
db 1,0 ; HIKER
@@ -311,7 +311,7 @@ TrainerClassMoveChoiceModifications: ; 3989b (e:589b)
db 1,0 ; BRUNO
db 1,0 ; BROCK
db 1,3,0 ; MISTY
- db 1,3,0 ; LT__SURGE
+ db 1,3,0 ; LT_SURGE
db 1,3,0 ; ERIKA
db 1,3,0 ; KOGA
db 1,3,0 ; BLAINE
@@ -338,13 +338,13 @@ INCLUDE "data/trainer_parties.asm"
TrainerAI: ; 3a52e (e:652e)
and a
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
dec a
ret z ; if not a trainer, we're done here
ld a,[wLinkState]
cp LINK_STATE_BATTLING
ret z
- ld a,[W_TRAINERCLASS] ; what trainer class is this?
+ ld a,[wTrainerClass] ; what trainer class is this?
dec a
ld c,a
ld b,0
@@ -727,27 +727,27 @@ AICureStatus: ; 3a791 (e:6791)
xor a
ld [hl],a ; clear status in enemy team roster
ld [wEnemyMonStatus],a ; clear status of active enemy
- ld hl,W_ENEMYBATTSTATUS3
+ ld hl,wEnemyBattleStatus3
res 0,[hl]
ret
AIUseXAccuracy: ; 0x3a7a8 unused
call AIPlayRestoringSFX
- ld hl,W_ENEMYBATTSTATUS2
+ ld hl,wEnemyBattleStatus2
set 0,[hl]
ld a,X_ACCURACY
jp AIPrintItemUse
AIUseGuardSpec: ; 3a7b5 (e:67b5)
call AIPlayRestoringSFX
- ld hl,W_ENEMYBATTSTATUS2
+ ld hl,wEnemyBattleStatus2
set 1,[hl]
- ld a,GUARD_SPEC_
+ ld a,GUARD_SPEC
jp AIPrintItemUse
AIUseDireHit: ; 0x3a7c2 unused
call AIPlayRestoringSFX
- ld hl,W_ENEMYBATTSTATUS2
+ ld hl,wEnemyBattleStatus2
set 2,[hl]
ld a,DIRE_HIT
jp AIPrintItemUse
@@ -803,7 +803,7 @@ AIIncreaseStat: ; 3a808 (e:6808)
push bc
call AIPrintItemUse_
pop bc
- ld hl,W_ENEMYMOVEEFFECT
+ ld hl,wEnemyMoveEffect
ld a,[hld]
push af
ld a,[hl]
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index 144234bb..044f7ea5 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -27,24 +27,24 @@ TryDoWildEncounter: ; 13870 (4:7870)
; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile?
coord hl, 9, 9
ld c, [hl]
- ld a, [W_GRASSTILE]
+ ld a, [wGrassTile]
cp c
- ld a, [W_GRASSRATE]
+ ld a, [wGrassRate]
jr z, .CanEncounter
ld a, $14 ; in all tilesets with a water tile, this is its id
cp c
- ld a, [W_WATERRATE]
+ ld a, [wWaterRate]
jr z, .CanEncounter
; even if not in grass/water, standing anywhere we can encounter pokemon
; so long as the map is "indoor" and has wild pokemon defined.
; ...as long as it's not Viridian Forest or Safari Zone.
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp REDS_HOUSE_1F ; is this an indoor map?
jr c, .CantEncounter2
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
cp FOREST ; Viridian Forest/Safari Zone
jr z, .CantEncounter2
- ld a, [W_GRASSRATE]
+ ld a, [wGrassRate]
.CanEncounter
; compare encounter chance with a random number to determine if there will be an encounter
ld b, a
@@ -63,18 +63,18 @@ TryDoWildEncounter: ; 13870 (4:7870)
.gotEncounterSlot
; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
ld c, [hl]
- ld hl, W_GRASSMONS
+ ld hl, wGrassMons
aCoord 8, 9
cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile?
jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default
- ld hl, W_WATERMONS
+ ld hl, wWaterMons
; since the bottom right tile of a "left shore" half-block is $14 but the bottom left tile is not,
; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters.
.gotWildEncounterType
ld b, 0
add hl, bc
ld a, [hli]
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, [hl]
ld [wcf91], a
ld [wEnemyMonSpecies2], a
@@ -83,7 +83,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
jr z, .willEncounter
ld a, [wPartyMon1Level]
ld b, a
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
cp b
jr c, .CantEncounter2 ; repel prevents encounters if the leading party mon's level is higher than the wild mon
jr .willEncounter
diff --git a/engine/cable_club.asm b/engine/cable_club.asm
index 07284d13..f2f881d8 100755
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -57,8 +57,8 @@ CableClub_DoBattleOrTradeAgain: ; 5345
ld [hli], a
dec b
jr nz, .zeroPlayerDataPatchListLoop
- ld hl, W_GRASSRATE
- ld bc, W_TRAINERHEADERPTR - W_GRASSRATE
+ ld hl, wGrassRate
+ ld bc, wTrainerHeaderPtr - wGrassRate
.zeroEnemyPartyLoop
xor a
ld [hli], a
@@ -176,7 +176,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345
jr z, .findStartOfEnemyNameLoop
dec hl
ld de, wLinkEnemyTrainerName
- ld c, 11
+ ld c, NAME_LENGTH
.copyEnemyNameLoop
ld a, [hli]
cp SERIAL_NO_DATA_BYTE
@@ -186,7 +186,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345
dec c
jr nz, .copyEnemyNameLoop
ld de, wEnemyPartyCount
- ld bc, W_TRAINERHEADERPTR - wEnemyPartyCount
+ ld bc, wTrainerHeaderPtr - wEnemyPartyCount
.copyEnemyPartyLoop
ld a, [hli]
cp SERIAL_NO_DATA_BYTE
@@ -256,9 +256,9 @@ CableClub_DoBattleOrTradeAgain: ; 5345
dec c
jr nz, .unpatchEnemyMonsLoop
ld a, wEnemyMonOT % $100
- ld [wcf8d], a
+ ld [wUnusedCF8D], a
ld a, wEnemyMonOT / $100
- ld [wcf8e], a
+ ld [wUnusedCF8D + 1], a
xor a
ld [wTradeCenterPointerTableIndex], a
ld a, $ff
@@ -274,11 +274,11 @@ CableClub_DoBattleOrTradeAgain: ; 5345
jr nz, .asm_5506
ld a, LINK_STATE_BATTLING
ld [wLinkState], a
- ld a, SONY1 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY1
+ ld [wCurOpponent], a
call ClearScreen
call Delay3
- ld hl, W_OPTIONS
+ ld hl, wOptions
res 7, [hl]
predef InitOpponent
predef HealParty
@@ -598,7 +598,7 @@ ReturnToCableClubRoom: ; 577d (1:577d)
TradeCenter_DrawCancelBox:
coord hl, 11, 15
ld a, $7e
- ld bc, 2 * 20 + 9
+ ld bc, 2 * SCREEN_WIDTH + 9
call FillMemory
coord hl, 0, 15
ld b, 1
@@ -614,7 +614,7 @@ CancelTextString:
TradeCenter_PlaceSelectedEnemyMonMenuCursor:
ld a, [wSerialSyncAndExchangeNybbleReceiveData]
coord hl, 1, 9
- ld bc, 20
+ ld bc, SCREEN_WIDTH
call AddNTimes
ld [hl], $ec ; cursor
ret
@@ -698,7 +698,7 @@ TradeCenter_Trade:
call GetMonName
ld hl, wcd6d
ld de, wNameOfPlayerMonToBeTraded
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wTradingWhichEnemyMon]
ld hl, wEnemyPartyMons
@@ -756,7 +756,7 @@ TradeCenter_Trade:
ld hl, wPartyMonOT
call SkipFixedLengthTextEntries
ld de, wTradedPlayerMonOT
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMon1Species
ld a, [wTradingWhichPlayerMon]
@@ -772,7 +772,7 @@ TradeCenter_Trade:
ld hl, wEnemyMonOT
call SkipFixedLengthTextEntries
ld de, wTradedEnemyMonOT
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wEnemyMons
ld a, [wTradingWhichEnemyMon]
@@ -824,19 +824,19 @@ TradeCenter_Trade:
add hl, bc
ld a, [hl]
ld [wTradedEnemyMonSpecies], a
- ld a, $a
- ld [wMusicHeaderPointer], a
+ ld a, 10
+ ld [wAudioFadeOutControl], a
ld a, $2
- ld [wc0f0], a
+ ld [wAudioSavedROMBank], a
ld a, MUSIC_SAFARI_ZONE
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, 100
call DelayFrames
call ClearScreen
call LoadHpBarAndStatusTilePatterns
xor a
- ld [wcc5b], a
+ ld [wUnusedCC5B], a
ld a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
jr z, .usingExternalClock
@@ -900,27 +900,27 @@ CableClub_Run: ; 5a5f (1:5a5f)
call CableClub_DoBattleOrTrade
ld hl, Club_GFX
ld a, h
- ld [W_TILESETGFXPTR + 1], a
+ ld [wTileSetGFXPtr + 1], a
ld a, l
- ld [W_TILESETGFXPTR], a
+ ld [wTileSetGFXPtr], a
ld a, Bank(Club_GFX)
- ld [W_TILESETBANK], a
+ ld [wTileSetBank], a
ld hl, Club_Coll
ld a, h
- ld [W_TILESETCOLLISIONPTR + 1], a
+ ld [wTileSetCollisionPtr + 1], a
ld a, l
- ld [W_TILESETCOLLISIONPTR], a
+ ld [wTileSetCollisionPtr], a
xor a
- ld [W_GRASSRATE], a
+ ld [wGrassRate], a
inc a ; LINK_STATE_IN_CABLE_CLUB
ld [wLinkState], a
ld [$ffb5], a
- ld a, $a
- ld [wMusicHeaderPointer], a
+ ld a, 10
+ ld [wAudioFadeOutControl], a
ld a, BANK(Music_Celadon)
- ld [wc0f0], a
+ ld [wAudioSavedROMBank], a
ld a, MUSIC_CELADON
- ld [wc0ee], a
+ ld [wNewSoundID], a
jp PlaySound
EmptyFunc3: ; 5aaf (1:5aaf)
diff --git a/engine/clear_save.asm b/engine/clear_save.asm
index d4f05071..adbef1a4 100755
--- a/engine/clear_save.asm
+++ b/engine/clear_save.asm
@@ -1,6 +1,6 @@
DoClearSaveDialogue: ; 1c98a (7:498a)
call ClearScreen
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call LoadFontTilePatterns
call LoadTextBoxTilePatterns
ld hl, ClearSaveDataText
diff --git a/engine/evolution.asm b/engine/evolution.asm
index 720e77cd..c65cc293 100755
--- a/engine/evolution.asm
+++ b/engine/evolution.asm
@@ -8,9 +8,9 @@ EvolveMon: ; 7bde9 (1e:7de9)
push af
xor a
ld [wLowHealthAlarm], a
- ld [wc02a], a
+ ld [wChannelSoundIDs + CH4], a
dec a
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -21,8 +21,8 @@ EvolveMon: ; 7bde9 (1e:7de9)
ld [H_AUTOBGTRANSFERENABLED], a
ld [hTilesetType], a
ld a, [wEvoOldSpecies]
- ld [wcf1d], a
- ld c, $0
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld c, 0
call EvolutionSetWholeScreenPalette
ld a, [wEvoNewSpecies]
ld [wcf91], a
@@ -46,7 +46,7 @@ EvolveMon: ; 7bde9 (1e:7de9)
call PlayMusic
ld c, 80
call DelayFrames
- ld c, $1
+ ld c, 1 ; set PAL_BLACK instead of mon palette
call EvolutionSetWholeScreenPalette
lb bc, $1, $10
.animLoop
@@ -66,13 +66,13 @@ EvolveMon: ; 7bde9 (1e:7de9)
call Evolution_ChangeMonPic ; show the new species pic
ld a, [wEvoNewSpecies]
.done
- ld [wcf1d], a
+ ld [wWholeScreenPaletteMonSpecies], a
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
- ld a, [wcf1d]
+ ld a, [wWholeScreenPaletteMonSpecies]
call PlayCry
- ld c, $0
+ ld c, 0
call EvolutionSetWholeScreenPalette
pop af
ld [wd0b5], a
@@ -94,8 +94,8 @@ EvolveMon: ; 7bde9 (1e:7de9)
jr .done
EvolutionSetWholeScreenPalette: ; 7beb4 (1e:7eb4)
- ld b, $b
- jp GoPAL_SET
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ jp RunPaletteCommand
Evolution_LoadPic: ; 7beb9 (1e:7eb9)
call GetMonHeader
diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm
index 16e893e5..2113e50a 100755
--- a/engine/evos_moves.asm
+++ b/engine/evos_moves.asm
@@ -105,7 +105,7 @@ Evolution_PartyMonLoop: ; loop over party mons
cp b ; is the mon's level greater than the evolution requirement?
jp c, .nextEvoEntry2 ; if so, go the next evolution entry
.doEvolution
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, 1
ld [wEvolutionOccurred], a
push hl
@@ -163,10 +163,10 @@ Evolution_PartyMonLoop: ; loop over party mons
ld hl, BaseStats
ld bc, MonBaseStatsEnd - MonBaseStats
call AddNTimes
- ld de, W_MONHEADER
+ ld de, wMonHeader
call CopyData
ld a, [wd0b5]
- ld [W_MONHDEXNUM], a
+ ld [wMonHIndex], a
pop af
ld [wd11e], a
ld hl, wLoadedMonHPExp - 1
@@ -210,7 +210,7 @@ Evolution_PartyMonLoop: ; loop over party mons
call LearnMoveFromLevelUp
pop hl
predef SetPartyMonTypes
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
call z, Evolution_ReloadTilesetTilePatterns
predef IndexToPokedex
@@ -249,7 +249,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, [wLinkState]
cp LINK_STATE_TRADING
ret z
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
ret nz
ld a, [wEvolutionOccurred]
@@ -257,12 +257,12 @@ Evolution_PartyMonLoop: ; loop over party mons
call nz, PlayDefaultMusic
ret
-; checks if the evolved mon's name is different from the standard name (i.e. it has a nickname)
-; if so, rename it to is evolved form's standard name
RenameEvolvedMon: ; 3aef7 (e:6ef7)
+; Renames the mon to its new, evolved form's standard name unless it had a
+; nickname, in which case the nickname is kept.
ld a, [wd0b5]
push af
- ld a, [W_MONHDEXNUM]
+ ld a, [wMonHIndex]
ld [wd0b5], a
call GetName
pop af
@@ -275,10 +275,10 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7)
cp [hl]
inc hl
ret nz
- cp $50
+ cp "@"
jr nz, .compareNamesLoop
ld a, [wWhichPokemon]
- ld bc, 11
+ ld bc, NAME_LENGTH
ld hl, wPartyMonNicks
call AddNTimes
push hl
@@ -340,7 +340,7 @@ LearnMoveFromLevelUp: ; 3af5b (e:6f5b)
and a ; have we reached the end of the learn set?
jr z, .done ; if we've reached the end of the learn set, jump
ld b, a ; level the move is learnt at
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
cp b ; is the move learnt at the mon's current level?
ld a, [hli] ; move ID
jr nz, .learnSetLoop
@@ -375,7 +375,7 @@ LearnMoveFromLevelUp: ; 3af5b (e:6f5b)
ld [wd11e], a
ret
-; writes the moves a mon has at level [W_CURENEMYLVL] to [de]
+; writes the moves a mon has at level [wCurEnemyLVL] to [de]
; move slots are being filled up sequentially and shifted if all slots are full
WriteMonMoves: ; 3afb8 (e:6fb8)
call GetPredefRegisters
@@ -407,7 +407,7 @@ WriteMonMoves: ; 3afb8 (e:6fb8)
and a
jp z, .done ; end of list
ld b, a
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
cp b
jp c, .done ; mon level < move level (assumption: learnset is sorted by level)
ld a, [wLearningMovesFromDayCare]
@@ -479,7 +479,7 @@ WriteMonMoves: ; 3afb8 (e:6fb8)
push hl
dec a
ld hl, Moves
- ld bc, 6
+ ld bc, MoveEnd - Moves
call AddNTimes
ld de, wBuffer
ld a, BANK(Moves)
diff --git a/engine/experience.asm b/engine/experience.asm
index b43fbcf9..e1037950 100755
--- a/engine/experience.asm
+++ b/engine/experience.asm
@@ -29,7 +29,7 @@ CalcLevelFromExperience: ; 58f43 (16:4f43)
; calculates the amount of experience needed for level d
CalcExperience: ; 58f6a (16:4f6a)
- ld a, [W_MONHGROWTHRATE]
+ ld a, [wMonHGrowthRate]
add a
add a
ld c, a
diff --git a/engine/game_corner_slots2.asm b/engine/game_corner_slots2.asm
index 643536ea..58386ba1 100755
--- a/engine/game_corner_slots2.asm
+++ b/engine/game_corner_slots2.asm
@@ -3,7 +3,7 @@ AbleToPlaySlotsCheck: ; 2ff09 (b:7f09)
and $8
jr z, .done ; not able
ld b, COIN_CASE
- predef IsItemInBag_ ; IsItemInBag_
+ predef GetQuantityOfItemInBag
ld a, b
and a
ld b, (GameCornerCoinCaseText_id - TextPredefs) / 2 + 1
diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm
index 73e4f074..fa8faebc 100755
--- a/engine/gamefreak.asm
+++ b/engine/gamefreak.asm
@@ -13,15 +13,15 @@ LoadShootingStarGraphics: ; 70000 (1c:4000)
call CopyVideoData
ld de, FallingStar
ld hl, vChars1 + $220
- lb bc, BANK(FallingStar), $01
+ lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10
call CopyVideoData
ld hl, GameFreakLogoOAMData
ld de, wOAMBuffer + $60
- ld bc, $40
+ ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData
call CopyData
ld hl, GameFreakShootingStarOAMData
ld de, wOAMBuffer
- ld bc, $10
+ ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData
jp CopyData
AnimateShootingStar: ; 70044 (1c:4044)
@@ -88,7 +88,7 @@ AnimateShootingStar: ; 70044 (1c:4044)
.initSmallStarsOAMLoop
push af
ld hl, SmallStarsOAM
- ld bc, 4
+ ld bc, SmallStarsOAMEnd - SmallStarsOAM
call CopyData
pop af
dec a
@@ -147,6 +147,7 @@ AnimateShootingStar: ; 70044 (1c:4044)
SmallStarsOAM: ; 700ee (1c:40ee)
db $00,$00,$A2,$90
+SmallStarsOAMEnd:
SmallStarsWaveCoordsPointerTable: ; 700f2 (1c:40f2)
dw SmallStarsWave1Coords
@@ -229,12 +230,15 @@ GameFreakLogoOAMData: ; 70140 (1c:4140)
db $60,$68,$83,$00
db $60,$70,$81,$00
db $60,$78,$86,$00
+GameFreakLogoOAMDataEnd:
GameFreakShootingStarOAMData: ; 70180 (1c:4180)
db $00,$A0,$A0,$10
db $00,$A8,$A0,$30
db $08,$A0,$A1,$10
db $08,$A8,$A1,$30
+GameFreakShootingStarOAMDataEnd:
FallingStar: ; 70190 (1c:4190)
INCBIN "gfx/falling_star.2bpp"
+FallingStarEnd:
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm
index 02e2b743..33e7b426 100755
--- a/engine/give_pokemon.asm
+++ b/engine/give_pokemon.asm
@@ -7,12 +7,12 @@ _GivePokemon: ; 4fda5 (13:7da5)
ld a, [wPartyCount]
cp PARTY_LENGTH
jr c, .addToParty
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
cp MONS_PER_BOX
jr nc, .boxFull
; add to box
xor a
- ld [W_ENEMYBATTSTATUS3], a
+ ld [wEnemyBattleStatus3], a
ld a, [wcf91]
ld [wEnemyMonSpecies2], a
callab LoadEnemyMonData
diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm
index ce1430e3..4225c5a1 100755
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -20,7 +20,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
xor a
ld [wUpdateSpritesEnabled], a
ld [hTilesetType], a
- ld [W_SPRITEFLIPPED], a
+ ld [wSpriteFlipped], a
ld [wLetterPrintingDelayFlags], a ; no delay
ld [wHoFMonOrPlayer], a ; mon
inc a
@@ -104,7 +104,7 @@ HoFShowMonOrPlayer: ; 70278 (1c:4278)
ld [wcf91], a
ld [wd0b5], a
ld [wBattleMonSpecies2], a
- ld [wcf1d], a
+ ld [wWholeScreenPaletteMonSpecies], a
ld a, [wHoFMonOrPlayer]
and a
jr z, .showMon
@@ -117,9 +117,9 @@ HoFShowMonOrPlayer: ; 70278 (1c:4278)
call LoadFrontSpriteByMonIndex
predef LoadMonBackPic
.next1
- ld b, $b
- ld c, $0
- call GoPAL_SET
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ ld c, 0
+ call RunPaletteCommand
ld a, %11100100
ld [rBGP], a
ld c, $31 ; back pic
@@ -186,8 +186,8 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
ld de, RedPicFront
ld a, BANK(RedPicFront)
call UncompressSpriteFromDE
- ld hl, S_SPRITEBUFFER1
- ld de, S_SPRITEBUFFER0
+ ld hl, sSpriteBuffer1
+ ld de, sSpriteBuffer0
ld bc, $310
call CopyData
ld de, vFrontPic
@@ -224,12 +224,12 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
ld de, HoFPlayTimeText
call PlaceString
coord hl, 5, 7
- ld de, W_PLAYTIMEHOURS + 1
+ ld de, wPlayTimeHours
lb bc, 1, 3
call PrintNumber
ld [hl], $6d
inc hl
- ld de, W_PLAYTIMEMINUTES + 1
+ ld de, wPlayTimeMinutes
lb bc, LEADING_ZEROES | 1, 2
call PrintNumber
coord hl, 1, 9
@@ -243,7 +243,7 @@ HoFDisplayPlayerStats: ; 70377 (1c:4377)
call HoFPrintTextAndDelay
ld hl, DexRatingText
call HoFPrintTextAndDelay
- ld hl, wcc5d
+ ld hl, wDexRatingText
HoFPrintTextAndDelay: ; 703e2 (1c:43e2)
call PrintText
@@ -276,13 +276,13 @@ HoFRecordMonInfo: ; 70404 (1c:4404)
ld e, l
ld d, h
ld hl, wcd6d
- ld bc, $b
+ ld bc, NAME_LENGTH
jp CopyData
HoFFadeOutScreenAndMusic: ; 70423 (1c:4423)
- ld a, $a
- ld [wcfc8], a
- ld [wcfc9], a
+ ld a, 10
+ ld [wAudioFadeOutCounterReloadValue], a
+ ld [wAudioFadeOutCounter], a
ld a, $ff
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
jp GBFadeOutToWhite
diff --git a/engine/hidden_object_functions14.asm b/engine/hidden_object_functions14.asm
index e0ed973d..97187638 100755
--- a/engine/hidden_object_functions14.asm
+++ b/engine/hidden_object_functions14.asm
@@ -2,7 +2,7 @@ PrintNotebookText: ; 52996 (14:6996)
call EnableAutoTextBoxDrawing
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld a, [wTrainerSpriteOffset]
+ ld a, [wHiddenObjectFunctionArgument]
jp PrintPredefTextID
TMNotebook: ; 529a4 (14:69a4)
diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm
index a2167b54..ffcc33c3 100755
--- a/engine/hidden_object_functions17.asm
+++ b/engine/hidden_object_functions17.asm
@@ -1,4 +1,4 @@
-PrintRedsNESText: ; 5db79 (17:5b79)
+PrintRedSNESText: ; 5db79 (17:5b79)
call EnableAutoTextBoxDrawing
tx_pre_jump RedBedroomSNESText
@@ -95,23 +95,23 @@ LinkCableHelp: ; 5dc29 (17:5c29)
ld hl, LinkCableHelpText1
call PrintText
xor a
- ld [W_ANIMATIONID], a
+ ld [wMenuItemOffset], a ; not used
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
- ld a, $3
+ ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
- ld a, $3
+ ld a, 3
ld [wMaxMenuItem], a
- ld a, $2
+ ld a, 2
ld [wTopMenuItemY], a
- ld a, $1
+ ld a, 1
ld [wTopMenuItemX], a
-.asm_5c51
+.linkHelpLoop
ld hl, wd730
set 6, [hl]
coord hl, 0, 0
- ld b, $8
- ld c, $d
+ ld b, 8
+ ld c, 13
call TextBoxBorder
coord hl, 2, 2
ld de, HowToLinkText
@@ -119,24 +119,24 @@ LinkCableHelp: ; 5dc29 (17:5c29)
ld hl, LinkCableHelpText2
call PrintText
call HandleMenuInput
- bit 1, a
- jr nz, .asm_5dc93
+ bit 1, a ; pressed b
+ jr nz, .exit
ld a, [wCurrentMenuItem]
- cp $3
- jr z, .asm_5dc93
+ cp 3 ; pressed a on "STOP READING"
+ jr z, .exit
ld hl, wd730
res 6, [hl]
ld hl, LinkCableInfoTexts
add a
- ld d, $0
+ ld d, 0
ld e, a
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
call PrintText
- jp .asm_5c51
-.asm_5dc93
+ jp .linkHelpLoop
+.exit
ld hl, wd730
res 6, [hl]
call LoadScreenTilesFromBuffer1
@@ -179,18 +179,18 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced)
ld hl, ViridianSchoolBlackboardText1
call PrintText
xor a
- ld [W_ANIMATIONID], a
+ ld [wMenuItemOffset], a
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
- ld a, $33
+ ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
- ld a, $2
+ ld a, 2
ld [wMaxMenuItem], a
- ld a, $2
+ ld a, 2
ld [wTopMenuItemY], a
- ld a, $1
+ ld a, 1
ld [wTopMenuItemX], a
-.asm_5dd15
+.blackboardLoop
ld hl, wd730
set 6, [hl]
coord hl, 0, 0
@@ -204,51 +204,55 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced)
call PlaceString
ld hl, ViridianSchoolBlackboardText2
call PrintText
- call HandleMenuInput
- bit 1, a
+ call HandleMenuInput ; pressing up and down is handled in here
+ bit 1, a ; pressed b
jr nz, .exitBlackboard
- bit 4, a
- jr z, .asm_5dd5c
- ld a, $2
+ bit 4, a ; pressed right
+ jr z, .didNotPressRight
+ ; move cursor to right column
+ ld a, 2
ld [wMaxMenuItem], a
- ld a, $2
+ ld a, 2
ld [wTopMenuItemY], a
- ld a, $6
+ ld a, 6
ld [wTopMenuItemX], a
- ld a, $3
- ld [W_ANIMATIONID], a
- jr .asm_5dd15
-.asm_5dd5c
- bit 5, a
- jr z, .asm_5dd75
- ld a, $2
+ ld a, 3 ; in the the right column, use an offset to prevent overlap
+ ld [wMenuItemOffset], a
+ jr .blackboardLoop
+.didNotPressRight
+ bit 5, a ; pressed left
+ jr z, .didNotPressLeftOrRight
+ ; move cursor to left column
+ ld a, 2
ld [wMaxMenuItem], a
- ld a, $2
+ ld a, 2
ld [wTopMenuItemY], a
- ld a, $1
+ ld a, 1
ld [wTopMenuItemX], a
xor a
- ld [W_ANIMATIONID], a
- jr .asm_5dd15
-.asm_5dd75
+ ld [wMenuItemOffset], a
+ jr .blackboardLoop
+.didNotPressLeftOrRight
ld a, [wCurrentMenuItem]
ld b, a
- ld a, [W_ANIMATIONID]
+ ld a, [wMenuItemOffset]
add b
- cp $5
+ cp 5 ; cursor is pointing to "QUIT"
jr z, .exitBlackboard
+ ; we must have pressed a on a status condition
+ ; so print the text
ld hl, wd730
res 6, [hl]
ld hl, ViridianBlackboardStatusPointers
add a
- ld d, $0
+ ld d, 0
ld e, a
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
call PrintText
- jp .asm_5dd15
+ jp .blackboardLoop
.exitBlackboard
ld hl, wd730
res 6, [hl]
@@ -276,7 +280,7 @@ StatusAilmentText2: ; 5ddbb (17:5dbb)
ViridianBlackboardStatusPointers: ; 5ddcc (17:5ddc)
dw ViridianBlackboardSleepText
dw ViridianBlackboardPoisonText
- dw ViridianBlackbaordPrlzText
+ dw ViridianBlackboardPrlzText
dw ViridianBlackboardBurnText
dw ViridianBlackboardFrozenText
@@ -288,8 +292,8 @@ ViridianBlackboardPoisonText: ; 5dddb (17:5ddb)
TX_FAR _ViridianBlackboardPoisonText
db "@"
-ViridianBlackbaordPrlzText: ; 5dde0 (17:5de0)
- TX_FAR _ViridianBlackbaordPrlzText
+ViridianBlackboardPrlzText: ; 5dde0 (17:5de0)
+ TX_FAR _ViridianBlackboardPrlzText
db "@"
ViridianBlackboardBurnText: ; 5dde5 (17:5de5)
@@ -375,7 +379,7 @@ GymTrashScript: ; 5ddfc (17:5dfc)
and $f
ld [wSecondLockTrashCanIndex], a
- tx_pre_id VermilionGymTrashSuccesText1
+ tx_pre_id VermilionGymTrashSuccessText1
jr .done
.trySecondLock
@@ -398,10 +402,10 @@ GymTrashScript: ; 5ddfc (17:5dfc)
.openSecondLock
; Completed the trash can puzzle.
SetEvent EVENT_2ND_LOCK_OPENED
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 6, [hl]
- tx_pre_id VermilionGymTrashSuccesText3
+ tx_pre_id VermilionGymTrashSuccessText3
.done
jp PrintPredefTextID
@@ -430,8 +434,8 @@ GymTrashCans: ; 5de7d (17:5e7d)
db 2, 11, 13, 0, 0 ; 14
; 5dec8
-VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8)
- TX_FAR _VermilionGymTrashSuccesText1
+VermilionGymTrashSuccessText1: ; 5dec8 (17:5ec8)
+ TX_FAR _VermilionGymTrashSuccessText1
TX_ASM
call WaitForSoundToFinish
ld a, SFX_SWITCH
@@ -440,8 +444,8 @@ VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8)
jp TextScriptEnd
; unused
-VermilionGymTrashSuccesText2: ; 5dedb (17:5edb)
- TX_FAR _VermilionGymTrashSuccesText2
+VermilionGymTrashSuccessText2: ; 5dedb (17:5edb)
+ TX_FAR _VermilionGymTrashSuccessText2
db "@"
; unused
@@ -453,8 +457,8 @@ VermilionGymTrashSuccesPlaySfx: ; 5dee0 (17:5ee0)
call WaitForSoundToFinish
jp TextScriptEnd
-VermilionGymTrashSuccesText3: ; 5deef (17:5eef)
- TX_FAR _VermilionGymTrashSuccesText3
+VermilionGymTrashSuccessText3: ; 5deef (17:5eef)
+ TX_FAR _VermilionGymTrashSuccessText3
TX_ASM
call WaitForSoundToFinish
ld a, SFX_GO_INSIDE
diff --git a/engine/hidden_object_functions18.asm b/engine/hidden_object_functions18.asm
index 0a93fd44..ab66a818 100755
--- a/engine/hidden_object_functions18.asm
+++ b/engine/hidden_object_functions18.asm
@@ -7,7 +7,7 @@ GymStatues: ; 62419 (18:6419)
cp SPRITE_FACING_UP
ret nz
ld hl, .BadgeFlags
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, a
.loop
ld a, [hli]
@@ -50,7 +50,7 @@ GymStatueText2: ; 62458 (18:6458)
PrintBenchGuyText: ; 6245d (18:645d)
call EnableAutoTextBoxDrawing
ld hl, BenchGuyTextPointers
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, a
.loop
ld a, [hli]
diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm
index 80251b94..d6e25cec 100755
--- a/engine/hidden_object_functions3.asm
+++ b/engine/hidden_object_functions3.asm
@@ -4,7 +4,7 @@ PrintBookshelfText: ; fb50 (3:7b50)
cp SPRITE_FACING_UP
jr nz, .noMatch
; facing up
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
ld b, a
aCoord 8, 7
ld c, a
@@ -78,7 +78,7 @@ IndigoPlateauStatues: ; fbbf (3:7bbf)
TX_ASM
ld hl, IndigoPlateauStatuesText1
call PrintText
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
bit 0, a
ld hl, IndigoPlateauStatuesText2
jr nz, .asm_fbd3
@@ -102,7 +102,7 @@ IndigoPlateauStatuesText3: ; fbe3 (3:7be3)
BookOrSculptureText: ; fbe8 (3:7be8)
TX_ASM
ld hl, PokemonBooksText
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
cp MANSION ; Celadon Mansion tileset
jr nz, .asm_fbfd
aCoord 8, 6
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index e3c296ca..87305472 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -19,8 +19,8 @@ DisplayOakLabRightPoster: ; 1e965 (7:6965)
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
- ld a, [wd11e]
- cp $2
+ ld a, [wNumSetBits]
+ cp 2
tx_pre_id SaveOptionText
jr c, .ownThreeOrMoreMon
tx_pre_id StrengthsAndWeaknessesText
@@ -38,7 +38,7 @@ StrengthsAndWeaknessesText: ; 1e983 (7:6983)
SafariZoneCheck: ; 1e988 (7:6988)
CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone,
jr z, SafariZoneGameStillGoing ; don't bother printing game over text
- ld a, [W_NUMSAFARIBALLS]
+ ld a, [wNumSafariBalls]
and a
jr z, SafariZoneGameOver
jr SafariZoneGameStillGoing
@@ -63,14 +63,14 @@ SafariZoneGameStillGoing: ; 1e9ab (7:69ab)
SafariZoneGameOver: ; 1e9b0 (7:69b0)
call EnableAutoTextBoxDrawing
xor a
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
dec a
call PlaySound
ld c, BANK(SFX_Safari_Zone_PA)
ld a, SFX_SAFARI_ZONE_PA
call PlayMusic
.asm_1e9c2
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $b9
jr nz, .asm_1e9c2
ld a, TEXT_SAFARI_GAME_OVER
@@ -83,7 +83,7 @@ SafariZoneGameOver: ; 1e9b0 (7:69b0)
ld a, $3
ld [wDestinationWarpID], a
ld a, $5
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
SetEvent EVENT_SAFARI_GAME_OVER
ld a, 1
ld [wSafariZoneGameOver], a
@@ -97,7 +97,7 @@ PrintSafariGameOverText: ; 1e9ed (7:69ed)
SafariGameOverText: ; 1e9f7 (7:69f7)
TX_ASM
- ld a, [W_NUMSAFARIBALLS]
+ ld a, [wNumSafariBalls]
and a
jr z, .asm_1ea04
ld hl, TimesUpText
@@ -147,7 +147,7 @@ CinnabarGymQuiz: ; 1ea25 (7:6a25)
ld h, [hl]
ld l, a
call PrintText
- ld a, $1
+ ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call CinnabarGymQuiz_1ea92
jp TextScriptEnd
@@ -199,7 +199,7 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
ld a, [wCurrentMenuItem]
cp c
jr nz, .wrongAnswer
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, [hGymGateIndex]
ld [$ffe0], a
@@ -374,7 +374,7 @@ BillsHouseInitiatedText: ; 1ebe2 (7:6be2)
db $06
TX_ASM
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, 16
call DelayFrames
@@ -391,23 +391,23 @@ BillsHousePokemonList: ; 1ec05 (7:6c05)
ld hl, BillsHousePokemonListText1
call PrintText
xor a
- ld [W_ANIMATIONID], a
+ ld [wMenuItemOffset], a ; not used
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
- ld a, $3
+ ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
- ld a, $4
+ ld a, 4
ld [wMaxMenuItem], a
- ld a, $2
+ ld a, 2
ld [wTopMenuItemY], a
- ld a, $1
+ ld a, 1
ld [wTopMenuItemX], a
-.asm_1ec2d
+.billsPokemonLoop
ld hl, wd730
set 6, [hl]
coord hl, 0, 0
- ld b, $a
- ld c, $9
+ ld b, 10
+ ld c, 9
call TextBoxBorder
coord hl, 2, 2
ld de, BillsMonListText
@@ -416,24 +416,24 @@ BillsHousePokemonList: ; 1ec05 (7:6c05)
call PrintText
call SaveScreenTilesToBuffer2
call HandleMenuInput
- bit 1, a
- jr nz, .asm_1ec74
+ bit 1, a ; pressed b
+ jr nz, .cancel
ld a, [wCurrentMenuItem]
add EEVEE
cp EEVEE
- jr z, .asm_1ec6c
+ jr z, .displayPokedex
cp FLAREON
- jr z, .asm_1ec6c
+ jr z, .displayPokedex
cp JOLTEON
- jr z, .asm_1ec6c
+ jr z, .displayPokedex
cp VAPOREON
- jr z, .asm_1ec6c
- jr .asm_1ec74
-.asm_1ec6c
+ jr z, .displayPokedex
+ jr .cancel
+.displayPokedex
call DisplayPokedex
call LoadScreenTilesFromBuffer2
- jr .asm_1ec2d
-.asm_1ec74
+ jr .billsPokemonLoop
+.cancel
ld hl, wd730
res 6, [hl]
call LoadScreenTilesFromBuffer2
diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm
index b4a73e59..176d6af7 100755
--- a/engine/in_game_trades.asm
+++ b/engine/in_game_trades.asm
@@ -17,7 +17,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9)
ld a,[hli]
push af
ld de,wInGameTradeMonNick
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
pop af
ld l,a
@@ -81,7 +81,7 @@ InGameTrade_GetMonName: ; 71b6a (1c:5b6a)
call GetMonName
ld hl,wcd6d
pop de
- ld bc, 11
+ ld bc, NAME_LENGTH
jp CopyData
INCLUDE "data/trades.asm"
@@ -108,7 +108,7 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07)
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
ld a,[hl]
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
ld hl,wCompletedInGameTradeFlags
ld a,[wWhichTrade]
ld c,a
@@ -118,13 +118,13 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07)
call PrintText
ld a,[wWhichPokemon]
push af
- ld a,[W_CURENEMYLVL]
+ ld a,[wCurEnemyLVL]
push af
call LoadHpBarAndStatusTilePatterns
call InGameTrade_PrepareTradeData
predef InternalClockTradeAnim
pop af
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
pop af
ld [wWhichPokemon],a
ld a,[wInGameTradeReceiveMonSpecies]
@@ -168,11 +168,11 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
ld a, [wInGameTradeReceiveMonSpecies]
ld [hl], a ; wTradedEnemyMonSpecies
ld hl, wPartyMonOT
- ld bc, 11
+ ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wTradedPlayerMonOT
- ld bc, 11
+ ld bc, NAME_LENGTH
call InGameTrade_CopyData
ld hl, InGameTrade_TrainerString
ld de, wTradedEnemyMonOT
@@ -201,16 +201,16 @@ InGameTrade_CopyData: ; 71d11 (1c:5d11)
InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19)
ld hl, wPartyMonNicks
- ld bc, 11
+ ld bc, NAME_LENGTH
call InGameTrade_GetReceivedMonPointer
ld hl, wInGameTradeMonNick
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMonOT
- ld bc, 11
+ ld bc, NAME_LENGTH
call InGameTrade_GetReceivedMonPointer
ld hl, InGameTrade_TrainerString
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1
diff --git a/engine/intro.asm b/engine/intro.asm
index 9f17e05c..7ddbe240 100755
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -1,3 +1,7 @@
+MOVE_GENGAR_RIGHT EQU $00
+MOVE_GENGAR_LEFT EQU $01
+MOVE_NIDORINO_RIGHT EQU $ff
+
PlayIntro: ; 41682 (10:5682)
xor a
ld [hJoyHeld], a
@@ -14,8 +18,8 @@ PlayIntro: ; 41682 (10:5682)
ret
PlayIntroScene: ; 4169d (10:569d)
- ld b, $7
- call GoPAL_SET
+ ld b, SET_PAL_NIDORINO_INTRO
+ call RunPaletteCommand
ld a, %11100100
ld [rBGP], a
ld [rOBP0], a
@@ -25,12 +29,12 @@ PlayIntroScene: ; 4169d (10:569d)
ld b, $3 ; Gengar tiles
call IntroCopyTiles
ld a, 0
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, 80
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
lb bc, 6, 6
call InitIntroNidorinoOAM
- ld de, $28ff ; move Nidorino right by 80 pixels
+ lb de, 80 / 2, MOVE_NIDORINO_RIGHT
call IntroMoveMon
ret c
@@ -69,7 +73,7 @@ PlayIntroScene: ; 4169d (10:569d)
call IntroCopyTiles
ld a, SFX_INTRO_RAISE
call PlaySound
- ld de, $401 ; move Gengar left by 8 pixels
+ lb de, 8 / 2, MOVE_GENGAR_LEFT
call IntroMoveMon
ld c, $1e
call CheckForUserInterruption
@@ -80,7 +84,7 @@ PlayIntroScene: ; 4169d (10:569d)
call IntroCopyTiles
ld a, SFX_INTRO_CRASH
call PlaySound
- ld de, $800 ; move Gengar right by 16 pixels
+ lb de, 16 / 2, MOVE_GENGAR_RIGHT
call IntroMoveMon
; hip
ld a, SFX_INTRO_HIP
@@ -93,7 +97,7 @@ PlayIntroScene: ; 4169d (10:569d)
call CheckForUserInterruption
ret c
- ld de, $401 ; move Gengar left by 8 pixels
+ lb de, 8 / 2, MOVE_GENGAR_LEFT
call IntroMoveMon
ld b, $3
call IntroCopyTiles
@@ -137,10 +141,10 @@ AnimateIntroNidorino: ; 41793 (10:5793)
ld a, [de]
cp $50
ret z
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
inc de
ld a, [de]
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
push de
ld c, 6 * 6
call UpdateIntroNidorinoOAM
@@ -155,10 +159,10 @@ UpdateIntroNidorinoOAM: ; 417ae (10:57ae)
ld a, [wIntroNidorinoBaseTile]
ld d, a
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
add [hl]
ld [hli], a ; Y
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add [hl]
ld [hli], a ; X
ld a, d
@@ -174,14 +178,14 @@ InitIntroNidorinoOAM: ; 417c7 (10:57c7)
ld d, 0
.loop
push bc
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld e, a
.innerLoop
ld a, e
add 8
ld e, a
ld [hli], a ; Y
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld [hli], a ; X
ld a, d
ld [hli], a ; tile
@@ -190,9 +194,9 @@ InitIntroNidorinoOAM: ; 417c7 (10:57c7)
inc d
dec c
jr nz, .innerLoop
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add 8
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
pop bc
dec b
jr nz, .loop
@@ -241,9 +245,9 @@ IntroMoveMon: ; 4180e (10:580e)
.moveNidorinoRight
push de
ld a, 2
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
xor a
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld c, 6 * 6
call UpdateIntroNidorinoOAM
pop de
@@ -278,28 +282,28 @@ PlayMoveSoundB: ; 41849 (10:5849)
LoadIntroGraphics: ; 41852 (10:5852)
ld hl, FightIntroBackMon
ld de, vChars2
- ld bc, $600
+ ld bc, FightIntroBackMonEnd - FightIntroBackMon
ld a, BANK(FightIntroBackMon)
call FarCopyData2
ld hl, GameFreakIntro
ld de, vChars2 + $600
- ld bc, $140
+ ld bc, GameFreakIntroEnd - GameFreakIntro
ld a, BANK(GameFreakIntro)
call FarCopyData2
ld hl, GameFreakIntro
ld de, vChars1
- ld bc, $140
+ ld bc, GameFreakIntroEnd - GameFreakIntro
ld a, BANK(GameFreakIntro)
call FarCopyData2
ld hl, FightIntroFrontMon
ld de, vChars0
- ld bc, $6c0
+ ld bc, FightIntroFrontMonEnd - FightIntroFrontMon
ld a, BANK(FightIntroFrontMon)
jp FarCopyData2
PlayShootingStar: ; 4188a (10:588a)
- ld b, $c
- call GoPAL_SET
+ ld b, SET_PAL_GAME_FREAK_INTRO
+ call RunPaletteCommand
callba LoadCopyrightAndTextBoxTiles
ld a, $e4
ld [rBGP], a
@@ -308,7 +312,7 @@ PlayShootingStar: ; 4188a (10:588a)
call ClearScreen
call DisableLCD
xor a
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
call IntroDrawBlackBars
call LoadIntroGraphics
call EnableLCD
@@ -325,10 +329,10 @@ PlayShootingStar: ; 4188a (10:588a)
call DelayFrames
.next
ld a, BANK(Music_IntroBattle)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, MUSIC_INTRO_BATTLE
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
call IntroClearMiddleOfScreen
call ClearSprites
@@ -430,9 +434,11 @@ GameFreakIntro: ; 41959 (10:5959)
INCBIN "gfx/gamefreak_intro.2bpp"
INCBIN "gfx/gamefreak_logo.2bpp"
ds $10 ; blank tile
+GameFreakIntroEnd:
FightIntroBackMon: ; 41a99 (10:5a99)
INCBIN "gfx/intro_fight.2bpp"
+FightIntroBackMonEnd:
FightIntroFrontMon: ; 42099 (10:6099)
@@ -440,11 +446,13 @@ IF DEF(_RED)
INCBIN "gfx/red/intro_nido_1.2bpp"
INCBIN "gfx/red/intro_nido_2.2bpp"
INCBIN "gfx/red/intro_nido_3.2bpp"
- ds $10 ; blank tile
ENDC
IF DEF(_BLUE)
INCBIN "gfx/blue/intro_purin_1.2bpp"
INCBIN "gfx/blue/intro_purin_2.2bpp"
INCBIN "gfx/blue/intro_purin_3.2bpp"
- ds $10 ; blank tile
ENDC
+
+FightIntroFrontMonEnd:
+
+ ds $10 ; blank tile
diff --git a/engine/items/itemfinder.asm b/engine/items/itemfinder.asm
index 5da72388..d638b0b8 100755
--- a/engine/items/itemfinder.asm
+++ b/engine/items/itemfinder.asm
@@ -3,7 +3,7 @@ HiddenItemNear: ; 7481f (1d:481f)
ld b, 0
.loop
ld de, 3
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
call IsInRestOfArray
ret nc ; return if current map has no hidden items
push bc
@@ -24,19 +24,19 @@ HiddenItemNear: ; 7481f (1d:481f)
inc hl
jr nz, .loop ; if the item has already been obtained
; check if the item is within 4-5 tiles (depending on the direction of item)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
call Sub5ClampTo0
cp d
jr nc, .loop
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
add 4
cp d
jr c, .loop
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
call Sub5ClampTo0
cp e
jr nc, .loop
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
add 5
cp e
jr c, .loop
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 364570da..55dcb53e 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -70,7 +70,7 @@ ItemUsePtrTable: ; d5e1 (3:55e1)
dw ItemUseMedicine ; FULL_HEAL
dw ItemUseMedicine ; REVIVE
dw ItemUseMedicine ; MAX_REVIVE
- dw ItemUseGuardSpec ; GUARD_SPEC_
+ dw ItemUseGuardSpec ; GUARD_SPEC
dw ItemUseSuperRepel ; SUPER_REPL
dw ItemUseMaxRepel ; MAX_REPEL
dw ItemUseDireHit ; DIRE_HIT
@@ -78,7 +78,7 @@ ItemUsePtrTable: ; d5e1 (3:55e1)
dw ItemUseMedicine ; FRESH_WATER
dw ItemUseMedicine ; SODA_POP
dw ItemUseMedicine ; LEMONADE
- dw UnusableItem ; S_S__TICKET
+ dw UnusableItem ; S_S_TICKET
dw UnusableItem ; GOLD_TEETH
dw ItemUseXStat ; X_ATTACK
dw ItemUseXStat ; X_DEFEND
@@ -90,7 +90,7 @@ ItemUsePtrTable: ; d5e1 (3:55e1)
dw UnusableItem ; SILPH_SCOPE
dw ItemUsePokeflute ; POKE_FLUTE
dw UnusableItem ; LIFT_KEY
- dw UnusableItem ; EXP__ALL
+ dw UnusableItem ; EXP_ALL
dw ItemUseOldRod ; OLD_ROD
dw ItemUseGoodRod ; GOOD_ROD
dw ItemUseSuperRod ; SUPER_ROD
@@ -101,97 +101,143 @@ ItemUsePtrTable: ; d5e1 (3:55e1)
dw ItemUsePPRestore ; MAX_ELIXER
ItemUseBall: ; d687 (3:5687)
- ld a,[W_ISINBATTLE]
+
+; Balls can't be used out of battle.
+ ld a,[wIsInBattle]
and a
- jp z,ItemUseNotTime ; not in battle
+ jp z,ItemUseNotTime
+
+; Balls can't catch trainers' Pokémon.
dec a
jp nz,ThrowBallAtTrainerMon
- ld a,[W_BATTLETYPE]
+
+; If this is for the old man battle, skip checking if the party & box are full.
+ ld a,[wBattleType]
dec a
- jr z,.UseBall
- ld a,[wPartyCount] ;is Party full?
+ jr z,.canUseBall
+
+ ld a,[wPartyCount] ; is party full?
cp a,PARTY_LENGTH
- jr nz,.UseBall
- ld a,[W_NUMINBOX] ;is Box full?
+ jr nz,.canUseBall
+ ld a,[wNumInBox] ; is box full?
cp a,MONS_PER_BOX
jp z,BoxFullCannotThrowBall
-.UseBall
-;ok, you can use a ball
+
+.canUseBall
xor a
ld [wCapturedMonSpecies],a
- ld a,[W_BATTLETYPE]
- cp a,2 ;SafariBattle
+
+ ld a,[wBattleType]
+ cp a,BATTLE_TYPE_SAFARI
jr nz,.skipSafariZoneCode
+
.safariZone
- ; remove a Safari Ball from inventory
- ld hl,W_NUMSAFARIBALLS
- dec [hl]
+ ld hl,wNumSafariBalls
+ dec [hl] ; remove a Safari Ball
+
.skipSafariZoneCode
- call GoPAL_SET_CF1C
- ld a,$43
- ld [wd11e],a
- call LoadScreenTilesFromBuffer1 ;restore screenBuffer from Backup
+ call RunDefaultPaletteCommand
+
+ ld a,$43 ; successful capture value
+ ld [wPokeBallAnimData],a
+
+ call LoadScreenTilesFromBuffer1
ld hl,ItemUseText00
call PrintText
+
+; If the player is fighting an unidentified ghost, set the value that indicates
+; the Pokémon can't be caught and skip the capture calculations.
callab IsGhostBattle
- ld b,$10
- jp z,.next12
- ld a,[W_BATTLETYPE]
+ ld b,$10 ; can't be caught value
+ jp z,.setAnimData
+
+ ld a,[wBattleType]
dec a
jr nz,.notOldManBattle
+
.oldManBattle
- ld hl,W_GRASSRATE
+ ld hl,wGrassRate
ld de,wPlayerName
- ld bc,11
- call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno glitch)
- jp .BallSuccess
+ ld bc,NAME_LENGTH
+ call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch)
+ jp .captured
+
.notOldManBattle
- ld a,[W_CURMAP]
+; If the player is fighting the ghost Marowak, set the value that indicates the
+; Pokémon can't be caught and skip the capture calculations.
+ ld a,[wCurMap]
cp a,POKEMONTOWER_6
jr nz,.loop
ld a,[wEnemyMonSpecies2]
cp a,MAROWAK
- ld b,$10
- jp z,.next12
-; if not fighting ghost Marowak, loop until a random number in the current
-; pokeball's allowed range is found
+ ld b,$10 ; can't be caught value
+ jp z,.setAnimData
+
+; Get the first random number. Let it be called Rand1.
+; Rand1 must be within a certain range according the kind of ball being thrown.
+; The ranges are as follows.
+; Poké Ball: [0, 255]
+; Great Ball: [0, 200]
+; Ultra/Safari Ball: [0, 150]
+; Loop until an acceptable number is found.
+
.loop
call Random
ld b,a
+
+; Get the item ID.
ld hl,wcf91
ld a,[hl]
+
+; The Master Ball always succeeds.
cp a,MASTER_BALL
- jp z,.BallSuccess
+ jp z,.captured
+
+; Anything will do for the basic Poké Ball.
cp a,POKE_BALL
jr z,.checkForAilments
+
+; If it's a Great/Ultra/Safari Ball and Rand1 is greater than 200, try again.
ld a,200
cp b
- jr c,.loop ;get only numbers <= 200 for Great Ball
+ jr c,.loop
+
+; Less than or equal to 200 is good enough for a Great Ball.
ld a,[hl]
cp a,GREAT_BALL
jr z,.checkForAilments
- ld a,150 ;get only numbers <= 150 for Ultra Ball
+
+; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again.
+ ld a,150
cp b
jr c,.loop
+
.checkForAilments
-; pokemon can be caught more easily with any (primary) status ailment
-; Frozen/Asleep pokemon are relatively even easier to catch
-; for Frozen/Asleep pokemon, any random number from 0-24 ensures a catch.
-; for the others, a random number from 0-11 ensures a catch.
- ld a,[wEnemyMonStatus] ;status ailments
+; Pokémon can be caught more easily with a status ailment.
+; Depending on the status ailment, a certain value will be subtracted from
+; Rand1. Let this value be called Status.
+; The larger Status is, the more easily the Pokémon can be caught.
+; no status ailment: Status = 0
+; Burn/Paralysis/Poison: Status = 12
+; Freeze/Sleep: Status = 25
+; If Status is greater than Rand1, the Pokémon will be caught for sure.
+ ld a,[wEnemyMonStatus]
and a
- jr z,.noAilments
- and a, 1 << FRZ | SLP ;is frozen and/or asleep?
+ jr z,.skipAilmentValueSubtraction ; no ailments
+ and a, 1 << FRZ | SLP
ld c,12
jr z,.notFrozenOrAsleep
ld c,25
.notFrozenOrAsleep
ld a,b
sub c
- jp c,.BallSuccess
+ jp c,.captured
ld b,a
-.noAilments
- push bc ;save RANDOM number
+
+.skipAilmentValueSubtraction
+ push bc ; save (Rand1 - Status)
+
+; Calculate MaxHP * 255.
xor a
ld [H_MULTIPLICAND],a
ld hl,wEnemyMonMaxHP
@@ -201,123 +247,180 @@ ItemUseBall: ; d687 (3:5687)
ld [H_MULTIPLICAND + 2],a
ld a,255
ld [H_MULTIPLIER],a
- call Multiply ; MaxHP * 255
+ call Multiply
+
+; Determine BallFactor. It's 8 for Great Balls and 12 for the others.
ld a,[wcf91]
cp a,GREAT_BALL
- ld a,12 ;any other BallFactor
- jr nz,.next7
+ ld a,12
+ jr nz,.skip1
ld a,8
-.next7
+
+.skip1
+; Note that the results of all division operations are floored.
+
+; Calculate (MaxHP * 255) / BallFactor.
ld [H_DIVISOR],a
- ld b,4 ; number of bytes in dividend
+ ld b,4 ; number of bytes in dividend
call Divide
+
+; Divide the enemy's current HP by 4. HP is not supposed to exceed 999 so
+; the result should fit in a. If the division results in a quotient of 0,
+; change it to 1.
ld hl,wEnemyMonHP
ld a,[hli]
ld b,a
ld a,[hl]
-
-; explanation: we have a 16-bit value equal to [b << 8 | a].
-; This number is divided by 4. The result is 8 bit (reg. a).
-; Always bigger than zero.
srl b
rr a
srl b
- rr a ; a = current HP / 4
+ rr a
and a
- jr nz,.next8
+ jr nz,.skip2
inc a
-.next8
+
+.skip2
+; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W.
ld [H_DIVISOR],a
ld b,4
- call Divide ; ((MaxHP * 255) / BallFactor) / (CurHP / 4)
+ call Divide
+
+; If W > 255, store 255 in [H_QUOTIENT + 3].
+; Let X = min(W, 255) = [H_QUOTIENT + 3].
ld a,[H_QUOTIENT + 2]
and a
- jr z,.next9
+ jr z,.skip3
ld a,255
ld [H_QUOTIENT + 3],a
-.next9
- pop bc
- ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate
+
+.skip3
+ pop bc ; b = Rand1 - Status
+
+; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon.
+ ld a,[wEnemyMonCatchRate]
cp b
- jr c,.next10
+ jr c,.failedToCapture
+
+; If W > 255, the ball captures the Pokémon.
ld a,[H_QUOTIENT + 2]
and a
- jr nz,.BallSuccess ; if ((MaxHP * 255) / BallFactor) / (CurHP / 4) > 0x255, automatic success
- call Random
+ jr nz,.captured
+
+ call Random ; Let this random number be called Rand2.
+
+; If Rand2 > X, the ball fails to capture the Pokémon.
ld b,a
ld a,[H_QUOTIENT + 3]
cp b
- jr c,.next10
-.BallSuccess
- jr .BallSuccess2
-.next10
+ jr c,.failedToCapture
+
+.captured
+ jr .skipShakeCalculations
+
+.failedToCapture
ld a,[H_QUOTIENT + 3]
- ld [wd11e],a
+ ld [wPokeBallCaptureCalcTemp],a ; Save X.
+
+; Calculate CatchRate * 100.
xor a
ld [H_MULTIPLICAND],a
ld [H_MULTIPLICAND + 1],a
- ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate
+ ld a,[wEnemyMonCatchRate]
ld [H_MULTIPLICAND + 2],a
ld a,100
ld [H_MULTIPLIER],a
- call Multiply ; CatchRate * 100
+ call Multiply
+
+; Determine BallFactor2.
+; Poké Ball: BallFactor2 = 255
+; Great Ball: BallFactor2 = 200
+; Ultra/Safari Ball: BallFactor2 = 150
ld a,[wcf91]
ld b,255
cp a,POKE_BALL
- jr z,.next11
+ jr z,.skip4
ld b,200
cp a,GREAT_BALL
- jr z,.next11
+ jr z,.skip4
ld b,150
cp a,ULTRA_BALL
- jr z,.next11
-.next11
+ jr z,.skip4
+
+.skip4
+; Let Y = (CatchRate * 100) / BallFactor2. Calculate Y.
ld a,b
ld [H_DIVISOR],a
ld b,4
call Divide
+
+; If Y > 255, there are 3 shakes.
+; Note that this shouldn't be possible.
+; The maximum value of Y is (255 * 100) / 150 = 170.
ld a,[H_QUOTIENT + 2]
and a
- ld b,$63
- jr nz,.next12
- ld a,[wd11e]
+ ld b,$63 ; 3 shakes
+ jr nz,.setAnimData
+
+; Calculate X * Y.
+ ld a,[wPokeBallCaptureCalcTemp]
ld [H_MULTIPLIER],a
call Multiply
+
+; Calculate (X * Y) / 255.
ld a,255
ld [H_DIVISOR],a
ld b,4
call Divide
- ld a,[wEnemyMonStatus] ;status ailments
+
+; Determine Status2.
+; no status ailment: Status2 = 0
+; Burn/Paralysis/Poison: Status2 = 5
+; Freeze/Sleep: Status2 = 10
+ ld a,[wEnemyMonStatus]
and a
- jr z,.next13
+ jr z,.skip5
and a, 1 << FRZ | SLP
ld b,5
- jr z,.next14
+ jr z,.addAilmentValue
ld b,10
-.next14
+
+.addAilmentValue
+; If the Pokémon has a status ailment, add Status2.
ld a,[H_QUOTIENT + 3]
add b
ld [H_QUOTIENT + 3],a
-.next13
+
+.skip5
+; Finally determine the number of shakes.
+; Let Z = ((X * Y) / 255) + Status2 = [H_QUOTIENT + 3].
+; The number of shakes depend on the range Z is in.
+; 0 ≤ Z < 10: 0 shakes (the ball misses)
+; 10 ≤ Z < 30: 1 shake
+; 30 ≤ Z < 70: 2 shakes
+; 70 ≤ Z: 3 shakes
ld a,[H_QUOTIENT + 3]
cp a,10
ld b,$20
- jr c,.next12
+ jr c,.setAnimData
cp a,30
ld b,$61
- jr c,.next12
+ jr c,.setAnimData
cp a,70
ld b,$62
- jr c,.next12
+ jr c,.setAnimData
ld b,$63
-.next12
+
+.setAnimData
ld a,b
- ld [wd11e],a
-.BallSuccess2
+ ld [wPokeBallAnimData],a
+
+.skipShakeCalculations
ld c,20
call DelayFrames
+
+; Do the animation.
ld a,TOSS_ANIM
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
xor a
ld [H_WHOSETURN],a
ld [wAnimationType],a
@@ -331,51 +434,67 @@ ItemUseBall: ; d687 (3:5687)
ld [wcf91],a
pop af
ld [wWhichPokemon],a
- ld a,[wd11e]
+
+; Determine the message to display from the animation.
+ ld a,[wPokeBallAnimData]
cp a,$10
ld hl,ItemUseBallText00
- jp z,.printText0
+ jp z,.printMessage
cp a,$20
ld hl,ItemUseBallText01
- jp z,.printText0
+ jp z,.printMessage
cp a,$61
ld hl,ItemUseBallText02
- jp z,.printText0
+ jp z,.printMessage
cp a,$62
ld hl,ItemUseBallText03
- jp z,.printText0
+ jp z,.printMessage
cp a,$63
ld hl,ItemUseBallText04
- jp z,.printText0
- ld hl,wEnemyMonHP ;current HP
+ jp z,.printMessage
+
+; Save current HP.
+ ld hl,wEnemyMonHP
ld a,[hli]
push af
ld a,[hli]
- push af ;backup currentHP...
+ push af
+
+; Save status ailment.
inc hl
ld a,[hl]
- push af ;...and status ailments
+ push af
+
push hl
- ld hl,W_ENEMYBATTSTATUS3
+
+; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto.
+; This is a bug because a wild Pokémon could have used Transform via
+; Mirror Move even though the only wild Pokémon that knows Transform is Ditto.
+ ld hl,wEnemyBattleStatus3
bit Transformed,[hl]
- jr z,.next15
- ld a,$4c
+ jr z,.notTransformed
+ ld a,DITTO
ld [wEnemyMonSpecies2],a
- jr .next16
-.next15
+ jr .skip6
+
+.notTransformed
+; If the Pokémon is not transformed, set the transformed bit and copy the
+; DVs to wTransformedEnemyMonOriginalDVs so that LoadEnemyMonData won't generate
+; new DVs.
set Transformed,[hl]
- ld hl,wcceb
+ ld hl,wTransformedEnemyMonOriginalDVs
ld a,[wEnemyMonDVs]
ld [hli],a
ld a,[wEnemyMonDVs + 1]
ld [hl],a
-.next16
+
+.skip6
ld a,[wcf91]
push af
ld a,[wEnemyMonSpecies2]
ld [wcf91],a
ld a,[wEnemyMonLevel]
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
callab LoadEnemyMonData
pop af
ld [wcf91],a
@@ -387,15 +506,18 @@ ItemUseBall: ; d687 (3:5687)
ld [hld],a
pop af
ld [hl],a
- ld a,[wEnemyMonSpecies] ;enemy
+ ld a,[wEnemyMonSpecies]
ld [wCapturedMonSpecies],a
ld [wcf91],a
ld [wd11e],a
- ld a,[W_BATTLETYPE]
- dec a
- jr z,.printText1
+ ld a,[wBattleType]
+ dec a ; is this the old man battle?
+ jr z,.oldManCaughtMon ; if so, don't give the player the caught Pokémon
+
ld hl,ItemUseBallText05
call PrintText
+
+; Add the caught Pokémon to the Pokédex.
predef IndexToPokedex
ld a,[wd11e]
dec a
@@ -411,46 +533,56 @@ ItemUseBall: ; d687 (3:5687)
ld b,FLAG_SET
predef FlagActionPredef
pop af
- and a
- jr nz,.checkParty
+
+ and a ; was the Pokémon already in the Pokédex?
+ jr nz,.skipShowingPokedexData ; if so, don't show the Pokédex data
+
ld hl,ItemUseBallText06
call PrintText
call ClearSprites
- ld a,[wEnemyMonSpecies] ;caught mon_ID
+ ld a,[wEnemyMonSpecies]
ld [wd11e],a
predef ShowPokedexData
-.checkParty
+
+.skipShowingPokedexData
ld a,[wPartyCount]
- cp a,PARTY_LENGTH ;is party full?
+ cp a,PARTY_LENGTH ; is party full?
jr z,.sendToBox
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation],a
call ClearSprites
- call AddPartyMon ;add mon to Party
- jr .End
+ call AddPartyMon
+ jr .done
+
.sendToBox
call ClearSprites
call SendNewMonToBox
ld hl,ItemUseBallText07
CheckEvent EVENT_MET_BILL
- jr nz,.sendToBox2
+ jr nz,.printTransferredToPCText
ld hl,ItemUseBallText08
-.sendToBox2
+.printTransferredToPCText
call PrintText
- jr .End
-.printText1
+ jr .done
+
+.oldManCaughtMon
ld hl,ItemUseBallText05
-.printText0
+
+.printMessage
call PrintText
call ClearSprites
-.End
- ld a,[W_BATTLETYPE]
- and a
- ret nz
+
+.done
+ ld a,[wBattleType]
+ and a ; is this the old man battle?
+ ret nz ; if so, don't remove a ball from the bag
+
+; Remove a ball from the bag.
ld hl,wNumBagItems
inc a
ld [wItemQuantity],a
jp RemoveItemFromInventory
+
ItemUseBallText00: ; d937 (3:5937)
;"It dodged the thrown ball!"
;"This pokemon can't be caught"
@@ -495,13 +627,13 @@ ItemUseBallText06: ; d961 (3:5961)
db "@"
ItemUseTownMap: ; d968 (3:5968)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
jpba DisplayTownMap
ItemUseBicycle: ; d977 (3:5977)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
ld a,[wWalkBikeSurfState]
@@ -563,7 +695,7 @@ ItemUseSurfboard: ; d9b4 (3:59b4)
ld hl,TilePairCollisionsWater
call CheckForTilePairCollisions
jr c,.cannotStopSurfing
- ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles
+ ld hl,wTileSetCollisionPtr ; pointer to list of passable tiles
ld a,[hli]
ld h,[hl]
ld l,a ; hl now points to passable tiles
@@ -622,7 +754,7 @@ ItemUsePokedex: ; da56 (3:5a56)
predef_jump ShowPokedexMenu
ItemUseEvoStone: ; da5b (3:5a5b)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
ld a,[wWhichPokemon]
@@ -663,7 +795,7 @@ ItemUseEvoStone: ; da5b (3:5a5b)
ret
ItemUseVitamin: ; dab4 (3:5ab4)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -766,13 +898,13 @@ ItemUseMedicine: ; dabb (3:5abb)
xor a
ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data
push hl
- ld hl,W_PLAYERBATTSTATUS3
+ ld hl,wPlayerBattleStatus3
res BadlyPoisoned,[hl] ; heal Toxic status
pop hl
- ld bc,30
+ ld bc,wPartyMon1Stats - wPartyMon1Status
add hl,bc ; hl now points to party stats
- ld de,wBattleMonMaxHP
- ld bc,10
+ ld de,wBattleMonStats
+ ld bc,NUM_STATS * 2
call CopyData ; copy party stats to in-battle stat data
predef DoubleOrHalveSelectedStats
jp .doneHealing
@@ -794,7 +926,7 @@ ItemUseMedicine: ; dabb (3:5abb)
jr z,.updateInBattleFaintedData
jp .healingItemNoEffect
.updateInBattleFaintedData
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jr z,.compareCurrentHPToMaxHP
push hl
@@ -827,7 +959,7 @@ ItemUseMedicine: ; dabb (3:5abb)
.compareCurrentHPToMaxHP
push hl
push bc
- ld bc,32
+ ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1)
add hl,bc ; hl now points to max HP
pop bc
ld a,[hli]
@@ -856,10 +988,10 @@ ItemUseMedicine: ; dabb (3:5abb)
.notFullHP ; if the pokemon's current HP doesn't equal its max HP
xor a
ld [wLowHealthAlarm],a ;disable low health alarm
- ld [wc02a],a
+ ld [wChannelSoundIDs + CH4],a
push hl
push de
- ld bc,32
+ ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1)
add hl,bc ; hl now points to max HP
ld a,[hli]
ld [wHPBarMaxHP+1],a
@@ -892,7 +1024,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld [H_DIVISOR],a
ld b,2 ; number of bytes
call Divide ; get 1/5 of max HP of pokemon that used Softboiled
- ld bc,wPartyMon1HP - wPartyMon1MaxHP
+ ld bc,(wPartyMon1HP + 1) - (wPartyMon1MaxHP + 1)
add hl,bc ; hl now points to LSB of current HP of pokemon that used Softboiled
; subtract 1/5 of max HP from current HP of pokemon that used Softboiled
ld a,[H_QUOTIENT + 3]
@@ -912,7 +1044,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld [wHPBarNewHP+1],a
coord hl, 4, 1
ld a,[wWhichPokemon]
- ld bc,2 * 20
+ ld bc,2 * SCREEN_WIDTH
call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
ld a,SFX_HEAL_HP
call PlaySoundWaitForCurrent
@@ -971,7 +1103,7 @@ ItemUseMedicine: ; dabb (3:5abb)
inc hl
ld d,h
ld e,l ; de now points to current HP
- ld hl,33
+ ld hl,(wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1)
add hl,de ; hl now points to max HP
ld a,[wcf91]
cp a,REVIVE
@@ -1018,7 +1150,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld a,[wcf91]
cp a,FULL_RESTORE
jr nz,.updateInBattleData
- ld bc,-31
+ ld bc,wPartyMon1Status - (wPartyMon1MaxHP + 1)
add hl,bc
xor a
ld [hl],a ; remove the status ailment in the party data
@@ -1041,7 +1173,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data
.calculateHPBarCoords
ld hl,wOAMBuffer + $90
- ld bc,2 * 20
+ ld bc,2 * SCREEN_WIDTH
inc d
.calculateHPBarCoordsLoop
add hl,bc
@@ -1111,8 +1243,8 @@ ItemUseMedicine: ; dabb (3:5abb)
and a ; using Softboiled?
ret nz ; if so, return
call GBPalWhiteOut
- call z,GoPAL_SET_CF1C
- ld a,[W_ISINBATTLE]
+ call z,RunDefaultPaletteCommand
+ ld a,[wIsInBattle]
and a
ret nz
jp ReloadMapData
@@ -1121,10 +1253,10 @@ ItemUseMedicine: ; dabb (3:5abb)
ld a,[hl]
ld [wd0b5],a
ld [wd11e],a
- ld bc,33
+ ld bc,wPartyMon1Level - wPartyMon1
add hl,bc ; hl now points to level
ld a,[hl] ; a = level
- ld [W_CURENEMYLVL],a ; store level
+ ld [wCurEnemyLVL],a ; store level
call GetMonHeader
push de
ld a,d
@@ -1138,7 +1270,7 @@ ItemUseMedicine: ; dabb (3:5abb)
push hl
sub a,HP_UP
add a
- ld bc,17
+ ld bc,wPartyMon1HPExp - wPartyMon1
add hl,bc
add l
ld l,a
@@ -1186,32 +1318,32 @@ ItemUseMedicine: ; dabb (3:5abb)
call PrintText
jp GBPalWhiteOut
.recalculateStats
- ld bc,34
+ ld bc,wPartyMon1Stats - wPartyMon1
add hl,bc
ld d,h
ld e,l ; de now points to stats
- ld bc,-18
- add hl,bc ; hl now points to byte 3 of experience
+ ld bc,(wPartyMon1Exp + 2) - wPartyMon1Stats
+ add hl,bc ; hl now points to LSB of experience
ld b,1
jp CalcStats ; recalculate stats
.useRareCandy
push hl
- ld bc,33
+ ld bc,wPartyMon1Level - wPartyMon1
add hl,bc ; hl now points to level
ld a,[hl] ; a = level
cp a, MAX_LEVEL
jr z,.vitaminNoEffect ; can't raise level above 100
inc a
ld [hl],a ; store incremented level
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
push hl
push de
ld d,a
callab CalcExperience ; calculate experience for next level and store it at $ff96
pop de
pop hl
- ld bc,-19
- add hl,bc ; hl now points to experience
+ ld bc,wPartyMon1Exp - wPartyMon1Level
+ add hl,bc ; hl now points to MSB of experience
; update experience to minimum for new level
ld a,[hExperience]
ld [hli],a
@@ -1226,7 +1358,7 @@ ItemUseMedicine: ; dabb (3:5abb)
push af
push de
push hl
- ld bc,34
+ ld bc,wPartyMon1MaxHP - wPartyMon1
add hl,bc ; hl now points to MSB of max HP
ld a,[hli]
ld b,a
@@ -1236,8 +1368,8 @@ ItemUseMedicine: ; dabb (3:5abb)
push hl
call .recalculateStats
pop hl
- ld bc,35 ; hl now points to LSB of max HP
- add hl,bc
+ ld bc,(wPartyMon1MaxHP + 1) - wPartyMon1
+ add hl,bc ; hl now points to LSB of max HP
pop bc
ld a,[hld]
sub c
@@ -1246,8 +1378,8 @@ ItemUseMedicine: ; dabb (3:5abb)
sbc b
ld b,a ; bc = the amount of max HP gained from leveling up
; add the amount gained to the current HP
- ld de,-32
- add hl,de ; hl now points to MSB of current HP
+ ld de,(wPartyMon1HP + 1) - wPartyMon1MaxHP
+ add hl,de ; hl now points to LSB of current HP
ld a,[hl]
add c
ld [hld],a
@@ -1322,9 +1454,9 @@ ItemUseRock: ; df67 (3:5f67)
ld de,wSafariBaitFactor ; bait factor
BaitRockCommon: ; df7f (3:5f7f)
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
xor a
- ld [wcc5b],a
+ ld [wAnimationType],a
ld [H_WHOSETURN],a
ld [de],a ; zero escape factor (for bait), zero bait factor (for rock)
.randomLoop ; loop until a random number less than 5 is generated
@@ -1354,13 +1486,13 @@ ThrewRockText: ; dfaa (3:5faa)
; also used for Dig out-of-battle effect
ItemUseEscapeRope: ; dfaf (3:5faf)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jr nz,.notUsable
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,AGATHAS_ROOM
jr z,.notUsable
- ld a,[W_CURMAPTILESET]
+ ld a,[wCurMapTileset]
ld b,a
ld hl,EscapeRopeTilesets
.loop
@@ -1376,8 +1508,8 @@ ItemUseEscapeRope: ; dfaf (3:5faf)
res 4,[hl]
ResetEvent EVENT_IN_SAFARI_ZONE
xor a
- ld [W_NUMSAFARIBALLS],a
- ld [W_SAFARIZONEENTRANCECURSCRIPT],a
+ ld [wNumSafariBalls],a
+ ld [wSafariZoneEntranceCurScript],a
inc a
ld [wEscapedFromBattle],a
ld [wActionResultOrTookBattleTurn],a ; item used
@@ -1399,7 +1531,7 @@ ItemUseRepel: ; e003 (3:6003)
ld b,100
ItemUseRepelCommon: ; e005 (3:6005)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
ld a,b
@@ -1408,10 +1540,10 @@ ItemUseRepelCommon: ; e005 (3:6005)
; handles X Accuracy item
ItemUseXAccuracy: ; e013 (3:6013)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp z,ItemUseNotTime
- ld hl,W_PLAYERBATTSTATUS2
+ ld hl,wPlayerBattleStatus2
set UsingXAccuracy,[hl] ; X Accuracy bit
jp PrintItemUseTextAndRemoveItem
@@ -1421,7 +1553,7 @@ ItemUseCardKey: ; e022 (3:6022)
xor a
ld [wUnusedD71F],a
call GetTileAndCoordsInFrontOfPlayer
- ld a,[GetTileAndCoordsInFrontOfPlayer] ; $4586
+ ld a,[GetTileAndCoordsInFrontOfPlayer]
cp a,$18
jr nz,.next0
ld hl,CardKeyTable1
@@ -1436,7 +1568,7 @@ ItemUseCardKey: ; e022 (3:6022)
jp nz,ItemUseNotTime
ld hl,CardKeyTable3
.next1
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
ld b,a
.loop
ld a,[hli]
@@ -1509,7 +1641,7 @@ CardKeyTable3: ; e0c4 (3:60c4)
db $ff
ItemUsePokedoll: ; e0cd (3:60cd)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
dec a
jp nz,ItemUseNotTime
ld a,$01
@@ -1517,10 +1649,10 @@ ItemUsePokedoll: ; e0cd (3:60cd)
jp PrintItemUseTextAndRemoveItem
ItemUseGuardSpec: ; e0dc (3:60dc)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp z,ItemUseNotTime
- ld hl,W_PLAYERBATTSTATUS2
+ ld hl,wPlayerBattleStatus2
set ProtectedByMist,[hl] ; Mist bit
jp PrintItemUseTextAndRemoveItem
@@ -1533,15 +1665,15 @@ ItemUseMaxRepel: ; e0f0 (3:60f0)
jp ItemUseRepelCommon
ItemUseDireHit: ; e0f5 (3:60f5)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp z,ItemUseNotTime
- ld hl,W_PLAYERBATTSTATUS2
+ ld hl,wPlayerBattleStatus2
set GettingPumped,[hl] ; Focus Energy bit
jp PrintItemUseTextAndRemoveItem
ItemUseXStat: ; e104 (3:6104)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jr nz,.inBattle
call ItemUseNotTime
@@ -1549,18 +1681,18 @@ ItemUseXStat: ; e104 (3:6104)
ld [wActionResultOrTookBattleTurn],a ; item not used
ret
.inBattle
- ld hl,W_PLAYERMOVENUM
+ ld hl,wPlayerMoveNum
ld a,[hli]
- push af ; save [W_PLAYERMOVENUM]
+ push af ; save [wPlayerMoveNum]
ld a,[hl]
- push af ; save [W_PLAYERMOVEEFFECT]
+ push af ; save [wPlayerMoveEffect]
push hl
ld a,[wcf91]
sub a,X_ATTACK - ATTACK_UP1_EFFECT
ld [hl],a ; store player move effect
call PrintItemUseTextAndRemoveItem
ld a,XSTATITEM_ANIM ; X stat item animation ID
- ld [W_PLAYERMOVENUM],a
+ ld [wPlayerMoveNum],a
call LoadScreenTilesFromBuffer1 ; restore saved screen
call Delay3
xor a
@@ -1568,18 +1700,18 @@ ItemUseXStat: ; e104 (3:6104)
callba StatModifierUpEffect ; do stat increase move
pop hl
pop af
- ld [hld],a ; restore [W_PLAYERMOVEEFFECT]
+ ld [hld],a ; restore [wPlayerMoveEffect]
pop af
- ld [hl],a ; restore [W_PLAYERMOVENUM]
+ ld [hl],a ; restore [wPlayerMoveNum]
ret
ItemUsePokeflute: ; e140 (3:6140)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jr nz,.inBattle
; if not in battle
call ItemUseReloadOverworldData
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,ROUTE_12
jr nz,.notRoute12
CheckEvent EVENT_BEAT_ROUTE12_SNORLAX
@@ -1614,7 +1746,7 @@ ItemUsePokeflute: ; e140 (3:6140)
ld b,~SLP & $ff
ld hl,wPartyMon1Status
call WakeUpEntireParty
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
dec a ; is it a trainer battle?
jr z,.skipWakingUpEnemyParty
; if it's a trainer battle
@@ -1643,7 +1775,7 @@ ItemUsePokeflute: ; e140 (3:6140)
call WaitForSoundToFinish ; wait for sound to end
callba Music_PokeFluteInBattle ; play in-battle pokeflute music
.musicWaitLoop ; wait for music to finish playing
- ld a,[wc02c]
+ ld a,[wChannelSoundIDs + CH6]
and a ; music off?
jr nz,.musicWaitLoop
.skipMusic
@@ -1706,7 +1838,7 @@ PlayedFluteHadEffectText: ; e215 (3:6215)
TX_FAR _PlayedFluteHadEffectText
db $06
TX_ASM
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jr nz,.done
; play out-of-battle pokeflute music
@@ -1716,15 +1848,15 @@ PlayedFluteHadEffectText: ; e215 (3:6215)
ld c, BANK(SFX_Pokeflute)
call PlayMusic
.musicWaitLoop ; wait for music to finish playing
- ld a,[wc028]
- cp a,$b8
+ ld a,[wChannelSoundIDs + CH2]
+ cp a, SFX_POKEFLUE
jr z,.musicWaitLoop
call PlayDefaultMusic ; start playing normal music again
.done
jp TextScriptEnd ; end text
ItemUseCoinCase: ; e23a (3:623a)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
ld hl,CoinCaseNumCoinsText
@@ -1781,11 +1913,11 @@ RodResponse: ; e28d (3:628d)
jr nz, .next
; if yes, store level and species data
ld a, 1
- ld [W_MOVEMISSED], a
+ ld [wMoveMissed], a
ld a, b ; level
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, c ; species
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
.next
ld hl, wWalkBikeSurfState
@@ -1802,7 +1934,7 @@ RodResponse: ; e28d (3:628d)
; checks if fishing is possible and if so, runs initialization code common to all rods
; unsets carry if fishing is possible, sets carry if not
FishingInit: ; e2b4 (3:62b4)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jr z,.notInBattle
scf ; can't fish during battle
@@ -1830,7 +1962,7 @@ ItemUseOaksParcel: ; e2de (3:62de)
jp ItemUseNotYoursToUse
ItemUseItemfinder: ; e2e1 (3:62e1)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
call ItemUseReloadOverworldData
@@ -1858,7 +1990,7 @@ ItemfinderFoundNothingText: ; e312 (3:6312)
db "@"
ItemUsePPUp: ; e317 (3:6317)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
@@ -1895,7 +2027,7 @@ ItemUsePPRestore: ; e31e (3:631e)
ld [wPlayerMoveListIndex],a
jr nz,.chooseMon
ld hl,wPartyMon1Moves
- ld bc,44
+ ld bc, wPartyMon2 - wPartyMon1
call GetSelectedMoveOffset
push hl
ld a,[hl]
@@ -1928,7 +2060,7 @@ ItemUsePPRestore: ; e31e (3:631e)
pop af
ld [wWhichPokemon],a
call GBPalWhiteOut
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
jp RemoveUsedItem
.afterRestoringPP ; after using a (Max) Ether/Elixir
ld a,[wWhichPokemon]
@@ -1937,7 +2069,7 @@ ItemUsePPRestore: ; e31e (3:631e)
cp b ; is the pokemon whose PP was restored active in battle?
jr nz,.skipUpdatingInBattleData
ld hl,wPartyMon1PP
- ld bc,44
+ ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
ld de,wBattleMonPP
ld bc,4
@@ -1959,12 +2091,12 @@ ItemUsePPRestore: ; e31e (3:631e)
ld [wMonDataLocation],a
call GetMaxPP
ld hl,wPartyMon1Moves
- ld bc,44
+ ld bc, wPartyMon2 - wPartyMon1
call GetSelectedMoveOffset
- ld bc,21
+ ld bc, wPartyMon1PP - wPartyMon1Moves
add hl,bc ; hl now points to move's PP
- ld a,[wd11e]
- ld b,a ; b = max PP
+ ld a,[wMaxPP]
+ ld b,a
ld a,[wPPRestoreItem]
cp a,MAX_ETHER
jr z,.fullyRestorePP
@@ -2009,7 +2141,7 @@ ItemUsePPRestore: ; e31e (3:631e)
.elixirLoop
push bc
ld hl,wPartyMon1Moves
- ld bc,44
+ ld bc, wPartyMon2 - wPartyMon1
call GetSelectedMoveOffset
ld a,[hl]
and a ; does the current slot have a move?
@@ -2032,7 +2164,7 @@ ItemUsePPRestore: ; e31e (3:631e)
call ItemUseNoEffect
.itemNotUsed
call GBPalWhiteOut
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
pop af
xor a
ld [wActionResultOrTookBattleTurn],a ; item use failed
@@ -2063,7 +2195,7 @@ UnusableItem: ; e476 (3:6476)
jp ItemUseNotTime
ItemUseTMHM: ; e479 (3:6479)
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,ItemUseNotTime
ld a,[wcf91]
@@ -2105,16 +2237,16 @@ ItemUseTMHM: ; e479 (3:6479)
push af
.chooseMon
ld hl,wcf4b
- ld de,wd036
+ ld de,wTempMoveNameBuffer
ld bc,14
- call CopyData
+ call CopyData ; save the move name because DisplayPartyMenu will overwrite it
ld a,$ff
ld [wUpdateSpritesEnabled],a
ld a,TMHM_PARTY_MENU
ld [wPartyMenuTypeOrMessageID],a
call DisplayPartyMenu
push af
- ld hl,wd036
+ ld hl,wTempMoveNameBuffer
ld de,wcf4b
ld bc,14
call CopyData
@@ -2125,7 +2257,7 @@ ItemUseTMHM: ; e479 (3:6479)
pop af
call GBPalWhiteOutWithDelay3
call ClearSprites
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
jp LoadScreenTilesFromBuffer1 ; restore saved screen
.checkIfAbleToLearnMove
predef CanLearnTM ; check if the pokemon can learn the move
@@ -2201,11 +2333,11 @@ ItemUseNotYoursToUse: ; e586 (3:6586)
jr ItemUseFailed
ThrowBallAtTrainerMon: ; e58b (3:658b)
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call LoadScreenTilesFromBuffer1 ; restore saved screen
call Delay3
ld a,TOSS_ANIM
- ld [W_ANIMATIONID],a
+ ld [wAnimationID],a
predef MoveAnimation ; do animation
ld hl,ThrowBallAtTrainerMonText1
call PrintText
@@ -2283,20 +2415,17 @@ GotOffBicycleText: ; e5fc (3:65fc)
; also, when a PP Up is used, it increases the current PP by one PP Up bonus
; INPUT:
; [wWhichPokemon] = index of pokemon in party
-; [wd11e] = mode
-; 0: Pokemon Center healing
-; 1: using a PP Up
; [wCurrentMenuItem] = index of move (when using a PP Up)
RestoreBonusPP: ; e606 (3:6606)
ld hl,wPartyMon1Moves
- ld bc,44
+ ld bc, wPartyMon2 - wPartyMon1
ld a,[wWhichPokemon]
call AddNTimes
push hl
ld de,wNormalMaxPPList - 1
predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wNormalMaxPPList
pop hl
- ld c,21
+ ld c, wPartyMon1PP - wPartyMon1Moves
ld b,0
add hl,bc ; hl now points to move 1 PP
ld de,wNormalMaxPPList
@@ -2307,7 +2436,7 @@ RestoreBonusPP: ; e606 (3:6606)
ld a,b
cp a,5 ; reached the end of the pokemon's moves?
ret z ; if so, return
- ld a,[wd11e]
+ ld a,[wUsingPPUp]
dec a ; using a PP Up?
jr nz,.skipMenuItemIDCheck
; if using a PP Up, check if this is the move it's being used on
@@ -2329,8 +2458,6 @@ RestoreBonusPP: ; e606 (3:6606)
; INPUT:
; [de] = normal max PP
; [hl] = move PP
-; [wd11e] = max number of times to add bonus
-; set to 1 when using a PP Up, set to 255 otherwise
AddBonusPP: ; e642 (3:6642)
push bc
ld a,[de] ; normal max PP of move
@@ -2358,9 +2485,9 @@ AddBonusPP: ; e642 (3:6642)
.addAmount
add b
ld b,a
- ld a,[wd11e]
- dec a
- jr z,.done
+ ld a,[wUsingPPUp]
+ dec a ; is the player using a PP Up right now?
+ jr z,.done ; if so, only add the bonus once
dec c
jr nz,.loop
.done
@@ -2379,7 +2506,7 @@ AddBonusPP: ; e642 (3:6642)
; 04: player's in-battle pokemon
; [wCurrentMenuItem] = move index
; OUTPUT:
-; [wd11e] = max PP
+; [wMaxPP] = max PP
GetMaxPP: ; e677 (3:6677)
ld a,[wMonDataLocation]
and a
@@ -2407,7 +2534,7 @@ GetMaxPP: ; e677 (3:6677)
dec a
push hl
ld hl,Moves
- ld bc,6
+ ld bc,MoveEnd - Moves
call AddNTimes
ld de,wcd6d
ld a,BANK(Moves)
@@ -2432,12 +2559,12 @@ GetMaxPP: ; e677 (3:6677)
ld l,e
inc hl ; hl = wcd73
ld [hl],a
- xor a
- ld [wd11e],a ; no limit on PP Up amount
+ xor a ; add the bonus for the existing PP Up count
+ ld [wUsingPPUp],a
call AddBonusPP ; add bonus PP from PP Ups
ld a,[hl]
and a,%00111111 ; mask out the PP Up count
- ld [wd11e],a ; store max PP
+ ld [wMaxPP],a ; store max PP
ret
GetSelectedMoveOffset: ; e6e3 (3:66e3)
@@ -2560,7 +2687,7 @@ IsKeyItem_: ; e764 (3:6764)
INCLUDE "data/key_items.asm"
SendNewMonToBox: ; e7a4 (3:67a4)
- ld de, W_NUMINBOX
+ ld de, wNumInBox
ld a, [de]
inc a
ld [de], a
@@ -2578,30 +2705,30 @@ SendNewMonToBox: ; e7a4 (3:67a4)
jr nz, .asm_e7b1
call GetMonHeader
ld hl, wBoxMonOT
- ld bc, 11
- ld a, [W_NUMINBOX]
+ ld bc, NAME_LENGTH
+ ld a, [wNumInBox]
dec a
jr z, .asm_e7ee
dec a
call AddNTimes
push hl
- ld bc, 11
+ ld bc, NAME_LENGTH
add hl, bc
ld d, h
ld e, l
pop hl
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
dec a
ld b, a
.asm_e7db
push bc
push hl
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
pop hl
ld d, h
ld e, l
- ld bc, -$b
+ ld bc, -NAME_LENGTH
add hl, bc
pop bc
dec b
@@ -2609,33 +2736,33 @@ SendNewMonToBox: ; e7a4 (3:67a4)
.asm_e7ee
ld hl, wPlayerName
ld de, wBoxMonOT
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
dec a
jr z, .asm_e82a
ld hl, wBoxMonNicks
- ld bc, 11
+ ld bc, NAME_LENGTH
dec a
call AddNTimes
push hl
- ld bc, 11
+ ld bc, NAME_LENGTH
add hl, bc
ld d, h
ld e, l
pop hl
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
dec a
ld b, a
.asm_e817
push bc
push hl
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
pop hl
ld d, h
ld e, l
- ld bc, -$b
+ ld bc, -NAME_LENGTH
add hl, bc
pop bc
dec b
@@ -2645,7 +2772,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld a, NAME_MON_SCREEN
ld [wNamingScreenType], a
predef AskName
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
dec a
jr z, .asm_e867
ld hl, wBoxMons
@@ -2658,7 +2785,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld d, h
ld e, l
pop hl
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
dec a
ld b, a
.asm_e854
@@ -2689,7 +2816,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
ld [de], a
inc de
push de
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld d, a
callab CalcExperience
pop de
@@ -2729,12 +2856,12 @@ SendNewMonToBox: ; e7a4 (3:67a4)
; used for surfing and fishing
; unsets carry if it is, sets carry if not
IsNextTileShoreOrWater: ; e8b8 (3:68b8)
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
ld hl, WaterTilesets
ld de,1
call IsInArray
jr nc, .notShoreOrWater
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
cp SHIP_PORT ; Vermilion Dock tileset
ld a, [wTileInFrontOfPlayer] ; tile in front of player
jr z, .skipShoreTiles ; if it's the Vermilion Dock tileset
@@ -2761,7 +2888,7 @@ ReadSuperRodData: ; e8ea (3:68ea)
; return e = 2 if no fish on this map
; return e = 1 if a bite, bc = level,species
; return e = 0 if no bite
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld de, 3 ; each fishing group is three bytes wide
ld hl, SuperRodData
call IsInArray
diff --git a/engine/items/tms.asm b/engine/items/tms.asm
index 23912b34..7d00f7f3 100755
--- a/engine/items/tms.asm
+++ b/engine/items/tms.asm
@@ -3,7 +3,7 @@ CanLearnTM: ; 1373e (4:773e)
ld a, [wcf91]
ld [wd0b5], a
call GetMonHeader
- ld hl, W_MONHLEARNSET
+ ld hl, wMonHLearnset
push hl
ld a, [wMoveNum]
ld b, a
diff --git a/engine/learn_move.asm b/engine/learn_move.asm
index 88dedd3d..ede8a542 100755
--- a/engine/learn_move.asm
+++ b/engine/learn_move.asm
@@ -4,8 +4,8 @@ LearnMove: ; 6e43 (1:6e43)
ld hl, wPartyMonNicks
call GetPartyMonName
ld hl, wcd6d
- ld de, wd036
- ld bc, 11
+ ld de, wLearnMoveMonName
+ ld bc, NAME_LENGTH
call CopyData
DontAbandonLearning: ; 6e5b (1:6e5b)
@@ -16,13 +16,13 @@ DontAbandonLearning: ; 6e5b (1:6e5b)
ld d, h
ld e, l
ld b, NUM_MOVES
-.asm_6e6b
+.findEmptyMoveSlotLoop
ld a, [hl]
and a
- jr z, .asm_6e8b
+ jr z, .next
inc hl
dec b
- jr nz, .asm_6e6b
+ jr nz, .findEmptyMoveSlotLoop
push de
call TryingToLearn
pop de
@@ -35,7 +35,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b)
call PrintText
pop de
pop hl
-.asm_6e8b
+.next
ld a, [wMoveNum]
ld [hl], a
ld bc, wPartyMon1PP - wPartyMon1Moves
@@ -44,7 +44,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b)
push de
dec a
ld hl, Moves
- ld bc, $6
+ ld bc, MoveEnd - Moves
call AddNTimes
ld de, wBuffer
ld a, BANK(Moves)
@@ -53,7 +53,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b)
pop de
pop hl
ld [hl], a
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
jp z, PrintLearnedMove
ld a, [wWhichPokemon]
@@ -86,13 +86,13 @@ AbandonLearning: ; 6eda (1:6eda)
jp nz, DontAbandonLearning
ld hl, DidNotLearnText
call PrintText
- ld b, $0
+ ld b, 0
ret
PrintLearnedMove: ; 6efe (1:6efe)
ld hl, LearnedMove1Text
call PrintText
- ld b, $1
+ ld b, 1
ret
TryingToLearn: ; 6f07 (1:6f07)
@@ -108,7 +108,7 @@ TryingToLearn: ; 6f07 (1:6f07)
ld a, [wCurrentMenuItem]
rra
ret c
- ld bc, - NUM_MOVES
+ ld bc, -NUM_MOVES
add hl, bc
push hl
ld de, wMoves
@@ -116,13 +116,13 @@ TryingToLearn: ; 6f07 (1:6f07)
call CopyData
callab FormatMovesString
pop hl
-.asm_6f39
+.loop
push hl
ld hl, WhichMoveToForgetText
call PrintText
coord hl, 4, 7
- ld b, $4
- ld c, $e
+ ld b, 4
+ ld c, 14
call TextBoxBorder
coord hl, 6, 8
ld de, wMovesString
@@ -155,12 +155,12 @@ TryingToLearn: ; 6f07 (1:6f07)
call LoadScreenTilesFromBuffer1
pop af
pop hl
- bit 1, a
- jr nz, .asm_6fab
+ bit 1, a ; pressed b
+ jr nz, .cancel
push hl
ld a, [wCurrentMenuItem]
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [hl]
push af
@@ -169,17 +169,17 @@ TryingToLearn: ; 6f07 (1:6f07)
pop bc
pop de
ld a, d
- jr c, .asm_6fa2
+ jr c, .hm
pop hl
add hl, bc
and a
ret
-.asm_6fa2
+.hm
ld hl, HMCantDeleteText
call PrintText
pop hl
- jr .asm_6f39
-.asm_6fab
+ jr .loop
+.cancel
scf
ret
diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm
index f4e45247..1189d2f0 100755
--- a/engine/load_pokedex_tiles.asm
+++ b/engine/load_pokedex_tiles.asm
@@ -3,7 +3,7 @@ LoadPokedexTilePatterns: ; 17840 (5:7840)
call LoadHpBarAndStatusTilePatterns
ld de,PokedexTileGraphics
ld hl,vChars2 + $600
- lb bc, BANK(PokedexTileGraphics), $12
+ lb bc, BANK(PokedexTileGraphics), (PokedexTileGraphicsEnd - PokedexTileGraphics) / $10
call CopyVideoData
ld de,PokeballTileGraphics
ld hl,vChars2 + $720
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
index 072a19d3..d367bdb5 100644
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -212,7 +212,7 @@ BillsPCDeposit: ; 215ac (8:55ac)
call PrintText
jp BillsPCMenu
.partyLargeEnough
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
cp MONS_PER_BOX
jr nz, .boxNotFull
ld hl, BoxFullText
@@ -254,7 +254,7 @@ BillsPCDeposit: ; 215ac (8:55ac)
jp BillsPCMenu
BillsPCWithdraw: ; 21618 (8:5618)
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
and a
jr nz, .boxNotEmpty
ld hl, NoMonText
@@ -268,7 +268,7 @@ BillsPCWithdraw: ; 21618 (8:5618)
call PrintText
jp BillsPCMenu
.partyNotFull
- ld hl, W_NUMINBOX
+ ld hl, wNumInBox
call DisplayMonListMenu
jp c, BillsPCMenu
call DisplayDepositWithdrawMenu
@@ -291,14 +291,14 @@ BillsPCWithdraw: ; 21618 (8:5618)
jp BillsPCMenu
BillsPCRelease: ; 21673 (8:5673)
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
and a
jr nz, .loop
ld hl, NoMonText
call PrintText
jp BillsPCMenu
.loop
- ld hl, W_NUMINBOX
+ ld hl, wNumInBox
call DisplayMonListMenu
jp c, BillsPCMenu
ld hl, OnceReleasedText
@@ -450,7 +450,7 @@ DisplayDepositWithdrawMenu: ; 2174b (8:574b)
predef StatusScreen2
call LoadScreenTilesFromBuffer1
call ReloadTilesetTilePatterns
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call LoadGBPal
jr .loop
@@ -515,7 +515,7 @@ CableClubLeftGameboy:: ; 5824 (8:5825)
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
cp SPRITE_FACING_RIGHT
ret nz
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp TRADE_CENTER
ld a, LINK_STATE_START_TRADE
jr z, .next
@@ -532,7 +532,7 @@ CableClubRightGameboy:: ; 5845 (8:5845)
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
cp SPRITE_FACING_LEFT
ret nz
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp TRADE_CENTER
ld a, LINK_STATE_START_TRADE
jr z, .next
diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm
index 3e28bc93..630c6c23 100755
--- a/engine/menu/diploma.asm
+++ b/engine/menu/diploma.asm
@@ -55,8 +55,8 @@ DisplayDiploma: ; 566e2 (15:66e2)
call EnableLCD
callba LoadTrainerInfoTextBoxTiles
- ld b, $8
- call GoPAL_SET
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
call Delay3
call GBPalNormal
ld a, $90
diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm
index 21c3f9e7..7c31d346 100755
--- a/engine/menu/league_pc.asm
+++ b/engine/menu/league_pc.asm
@@ -10,7 +10,7 @@ PKMNLeaguePC: ; 0x7657e
push af
xor a
ld [hTilesetType], a
- ld [W_SPRITEFLIPPED], a
+ ld [wSpriteFlipped], a
ld [wUpdateSpritesEnabled], a
ld [wHoFTeamIndex2], a
ld [wHoFTeamNo], a
@@ -47,7 +47,7 @@ PKMNLeaguePC: ; 0x7657e
res 6, [hl]
call GBPalWhiteOutWithDelay3
call ClearScreen
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
jp GBPalNormal
LeaguePCShowTeam: ; 765e5 (1d:65e5)
@@ -86,15 +86,15 @@ LeaguePCShowMon: ; 76610 (1d:6610)
ld [wcf91], a
ld [wd0b5], a
ld [wBattleMonSpecies2], a
- ld [wcf1d], a
+ ld [wWholeScreenPaletteMonSpecies], a
ld a, [hli]
ld [wHoFMonLevel], a
ld de, wcd6d
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
- ld b, $0B
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
ld c, 0
- call GoPAL_SET
+ call RunPaletteCommand
coord hl, 12, 5
call GetMonHeader
call LoadFrontSpriteByMonIndex
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
index f99e5b80..75458c5e 100755
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -20,11 +20,11 @@ MainMenu: ; 5af2 (1:5af2)
ld [hli],a
ld [hli],a
ld [hl],a
- ld [W_ANIMATIONID],a
+ ld [wDefaultMap],a
ld hl,wd72e
res 6,[hl]
call ClearScreen
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call LoadTextBoxTilePatterns
call LoadFontTilePatterns
ld hl,wd730
@@ -61,7 +61,7 @@ MainMenu: ; 5af2 (1:5af2)
ld [wTopMenuItemX],a
inc a
ld [wTopMenuItemY],a
- ld a,$B
+ ld a,A_BUTTON | B_BUTTON | START
ld [wMenuWatchedKeys],a
ld a,[wSaveFileStatus]
ld [wMaxMenuItem],a
@@ -90,7 +90,7 @@ MainMenu: ; 5af2 (1:5af2)
jp .mainMenuLoop
.choseContinue
call DisplayContinueGameInfo
- ld hl,wd126
+ ld hl,wCurrentMapScriptFlags
set 5,[hl]
.inputLoop
xor a
@@ -114,7 +114,7 @@ MainMenu: ; 5af2 (1:5af2)
ld a,[wNumHoFTeams]
and a
jp z,SpecialEnterMap
- ld a,[W_CURMAP] ; map ID
+ ld a,[wCurMap] ; map ID
cp a,HALL_OF_FAME
jp nz,SpecialEnterMap
xor a
@@ -128,7 +128,7 @@ InitOptions: ; 5bff (1:5bff)
ld a,1 ; no delay
ld [wLetterPrintingDelayFlags],a
ld a,3 ; medium speed
- ld [W_OPTIONS],a
+ ld [wOptions],a
ret
LinkMenu: ; 5c0a (1:5c0a)
@@ -150,7 +150,7 @@ LinkMenu: ; 5c0a (1:5c0a)
ld de, CableClubOptionsText
call PlaceString
xor a
- ld [wcd37], a
+ ld [wUnusedCD37], a
ld [wd72d], a
ld hl, wTopMenuItemY
ld a, $7
@@ -163,7 +163,8 @@ LinkMenu: ; 5c0a (1:5c0a)
ld a, $2
ld [hli], a
inc a
- ld [hli], a
+ ; ld a, A_BUTTON | B_BUTTON
+ ld [hli], a ; wMenuWatchedKeys
xor a
ld [hl], a
.waitForInputLoop
@@ -268,7 +269,7 @@ LinkMenu: ; 5c0a (1:5c0a)
call DelayFrames
ld hl, wd732
res 1, [hl]
- ld a, [W_ANIMATIONID]
+ ld a, [wDefaultMap]
ld [wDestinationMap], a
call SpecialWarpIn
ld c, 20
@@ -391,11 +392,11 @@ PrintSaveScreenText: ; 5def (1:5def)
PrintNumBadges: ; 5e2f (1:5e2f)
push hl
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
ld b, $1
call CountSetBits
pop hl
- ld de, wd11e
+ ld de, wNumSetBits
lb bc, 1, 2
jp PrintNumber
@@ -405,17 +406,17 @@ PrintNumOwnedMons: ; 5e42 (1:5e42)
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
pop hl
- ld de, wd11e
+ ld de, wNumSetBits
lb bc, 1, 3
jp PrintNumber
PrintPlayTime: ; 5e55 (1:5e55)
- ld de, W_PLAYTIMEHOURS + 1
+ ld de, wPlayTimeHours
lb bc, 1, 3
call PrintNumber
ld [hl], $6d
inc hl
- ld de, W_PLAYTIMEMINUTES + 1
+ ld de, wPlayTimeMinutes
lb bc, LEADING_ZEROES | 1, 2
jp PrintNumber
@@ -625,13 +626,13 @@ SetOptionsFromCursorPositions: ; 601f (1:601f)
res 6,d
.storeOptions
ld a,d
- ld [W_OPTIONS],a
+ ld [wOptions],a
ret
; reads the options variable and places menu cursors in the correct positions within the options menu
SetCursorPositionsFromOptions: ; 604c (1:604c)
ld hl,TextSpeedOptionData + 1
- ld a,[W_OPTIONS]
+ ld a,[wOptions]
ld c,a
and a,$3f
push bc
@@ -689,7 +690,7 @@ CheckForPlayerNameInSRAM: ; 609e (1:609e)
ld a, $1
ld [MBC1SRamBankingMode], a
ld [MBC1SRamBank], a
- ld b, $b
+ ld b, NAME_LENGTH
ld hl, sPlayerName
.loop
ld a, [hli]
diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm
index 967f11e8..41f63095 100755
--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -2,7 +2,7 @@ AskName: ; 64eb (1:64eb)
call SaveScreenTilesToBuffer1
call GetPredefRegisters
push hl
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
coord hl, 0, 0
ld b, 4
@@ -30,7 +30,7 @@ AskName: ; 64eb (1:64eb)
ld a, NAME_MON_SCREEN
ld [wNamingScreenType], a
call DisplayNamingScreen
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
jr nz, .inBattle
call ReloadMapSpriteTilePatterns
@@ -46,7 +46,7 @@ AskName: ; 64eb (1:64eb)
ld d, h
ld e, l
ld hl, wcd6d
- ld bc, 11
+ ld bc, NAME_LENGTH
jp CopyData
DoYouWantToNicknameText: ; 0x6557
@@ -67,13 +67,13 @@ DisplayNameRaterScreen: ; 655c (1:655c)
cp "@"
jr z, .playerCancelled
ld hl, wPartyMonNicks
- ld bc, 11
+ ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld e, l
ld d, h
ld hl, wBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
and a
ret
@@ -88,8 +88,8 @@ DisplayNamingScreen: ; 6596 (1:6596)
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
- ld b, $8
- call GoPAL_SET
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
call LoadHpBarAndStatusTilePatterns
call LoadEDTile
callba LoadMonPartySpriteGfx
@@ -158,18 +158,18 @@ DisplayNamingScreen: ; 6596 (1:6596)
.submitNickname
pop de
ld hl, wcf4b
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
call GBPalWhiteOutWithDelay3
call ClearScreen
call ClearSprites
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call GBPalNormal
xor a
- ld [W_SUBANIMTRANSFORM], a
+ ld [wAnimCounter], a
ld hl, wd730
res 6, [hl]
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
jp z, LoadTextBoxTilePatterns
jpab LoadHudTilePatterns
@@ -326,11 +326,14 @@ DisplayNamingScreen: ; 6596 (1:6596)
LoadEDTile: ; 675b (1:675b)
ld de, ED_Tile
ld hl, vFont + $700
- ld bc, $1
+ ld bc, (ED_TileEnd - ED_Tile) / $8
+ ; to fix the graphical bug on poor emulators
+ ;lb bc, BANK(ED_Tile), (ED_TileEnd - ED_Tile) / $8
jp CopyVideoDataDouble
ED_Tile: ; 6767 (1:6767)
INCBIN "gfx/ED_tile.1bpp"
+ED_TileEnd:
PrintAlphabet: ; 676f (1:676f)
xor a
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm
index 42ab553a..f3e1a138 100755
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -29,13 +29,13 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
cp a,SWAP_MONS_PARTY_MENU
jp z,.printMessage
call ErasePartyMenuCursors
- callba SendBlkPacket_PartyMenu
+ callba InitPartyMenuBlkPacket
coord hl, 3, 0
ld de,wPartySpecies
xor a
ld c,a
ld [hPartyMonIndex],a
- ld [wcf2d],a
+ ld [wWhichPartyMenuHPBar],a
.loop
ld a,[de]
cp a,$FF ; reached the terminator?
@@ -96,7 +96,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
ld a,[hFlags_0xFFF6]
res 0,a
ld [hFlags_0xFFF6],a
- call SetPartyMenuHealthBarColor ; color the HP bar (on SGB)
+ call SetPartyMenuHPBarColor ; color the HP bar (on SGB)
pop hl
jr .printLevel
.teachMoveMenu
@@ -150,7 +150,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
ld l,a
ld de,wcd6d
ld a,BANK(EvosMovesPointerTable)
- ld bc,13
+ ld bc,Mon133_EvosEnd - Mon133_EvosMoves
call FarCopyData
ld hl,wcd6d
ld de,.notAbleToEvolveText
@@ -188,8 +188,8 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
.notAbleToEvolveText
db "NOT ABLE@"
.afterDrawingMonEntries
- ld b,$0A
- call GoPAL_SET
+ ld b, SET_PAL_PARTY_MENU
+ call RunPaletteCommand
.printMessage
ld hl,wd730
ld a,[hl]
@@ -311,15 +311,15 @@ RareCandyText: ; 12ec0 (4:6ec0)
db $06
db "@"
-SetPartyMenuHealthBarColor: ; 12ec7 (4:6ec7)
- ld hl, wcf1f
- ld a, [wcf2d]
+SetPartyMenuHPBarColor: ; 12ec7 (4:6ec7)
+ ld hl, wPartyMenuHPBarColors
+ ld a, [wWhichPartyMenuHPBar]
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
call GetHealthBarColor
- ld b, $fc
- call GoPAL_SET
- ld hl, wcf2d
+ ld b, UPDATE_PARTY_MENU_BLK_PACKET
+ call RunPaletteCommand
+ ld hl, wWhichPartyMenuHPBar
inc [hl]
ret
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index ead2c359..a58523e8 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -12,8 +12,8 @@ ShowPokedexMenu: ; 40000 (10:4000)
ld [wd11e],a
ld [hJoy7],a
.setUpGraphics
- ld b,$08
- call GoPAL_SET
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
callab LoadPokedexTilePatterns
.doPokemonListMenu
ld hl,wTopMenuItemY
@@ -27,7 +27,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
inc hl
ld a,6
ld [hli],a ; max menu item ID
- ld [hl],%00110011 ; menu watched keys (Left, Right, B button, A button)
+ ld [hl],D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON
call HandlePokedexListMenu
jr c,.goToSideMenu ; if the player chose a pokemon from the list
.exitPokedex
@@ -41,7 +41,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
pop af
ld [wListScrollOffset],a
call GBPalWhiteOutWithDelay3
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
jp ReloadMapData
.goToSideMenu
call HandlePokedexSideMenu
@@ -88,6 +88,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
inc hl
ld a,3
ld [hli],a ; max menu item ID
+ ;ld a, A_BUTTON | B_BUTTON
ld [hli],a ; menu watched keys (A button and B button)
xor a
ld [hli],a ; old menu item ID
@@ -169,14 +170,14 @@ HandlePokedexListMenu: ; 40111 (10:4111)
ld hl,wPokedexSeen
ld b,wPokedexSeenEnd - wPokedexSeen
call CountSetBits
- ld de,wd11e
+ ld de, wNumSetBits
coord hl, 16, 3
lb bc, 1, 3
call PrintNumber ; print number of seen pokemon
ld hl,wPokedexOwned
ld b,wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
- ld de,wd11e
+ ld de, wNumSetBits
coord hl, 16, 6
lb bc, 1, 3
call PrintNumber ; print number of owned pokemon
@@ -397,14 +398,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld hl,wd72c
set 1,[hl]
ld a,$33 ; 3/7 volume
- ld [$ff24],a
+ ld [rNR50],a
call GBPalWhiteOut ; zero all palettes
call ClearScreen
ld a,[wd11e] ; pokemon ID
ld [wcf91],a
push af
- ld b,04
- call GoPAL_SET
+ ld b, SET_PAL_POKEDEX
+ call RunPaletteCommand
pop af
ld [wd11e],a
ld a,[hTilesetType]
@@ -560,13 +561,13 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [hTilesetType],a
call GBPalWhiteOut
call ClearScreen
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call LoadTextBoxTilePatterns
call GBPalNormal
ld hl,wd72c
res 1,[hl]
ld a,$77 ; max volume
- ld [$ff24],a
+ ld [rNR50],a
ret
HeightWeightText: ; 40448 (10:4448)
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
index 2bf932ba..434a1943 100755
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -13,7 +13,7 @@ CeladonPrizeMenu: ; 5271b (14:671b)
xor a
ld [wCurrentMenuItem],a
ld [wLastMenuItem],a
- ld a,$03
+ ld a,A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys],a
ld a,$03
ld [wMaxMenuItem],a
@@ -78,7 +78,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
ld e,a
inc hl
push hl
- ld hl,W_PRIZE1
+ ld hl,wPrize1
call CopyString
pop hl
ld a,[hli]
@@ -90,34 +90,34 @@ GetPrizeMenuId: ; 5278e (14:678e)
ld a,[wWhichPrizeWindow]
cp a,$02 ;is TM_menu?
jr nz,.putMonName
- ld a,[W_PRIZE1]
+ ld a,[wPrize1]
ld [wd11e],a
call GetItemName
coord hl, 2, 4
call PlaceString
- ld a,[W_PRIZE2]
+ ld a,[wPrize2]
ld [wd11e],a
call GetItemName
coord hl, 2, 6
call PlaceString
- ld a,[W_PRIZE3]
+ ld a,[wPrize3]
ld [wd11e],a
call GetItemName
coord hl, 2, 8
call PlaceString
jr .putNoThanksText
.putMonName
- ld a,[W_PRIZE1]
+ ld a,[wPrize1]
ld [wd11e],a
call GetMonName
coord hl, 2, 4
call PlaceString
- ld a,[W_PRIZE2]
+ ld a,[wPrize2]
ld [wd11e],a
call GetMonName
coord hl, 2, 6
call PlaceString
- ld a,[W_PRIZE3]
+ ld a,[wPrize3]
ld [wd11e],a
call GetMonName
coord hl, 2, 8
@@ -191,7 +191,7 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
ld [wWhichPrize],a
ld d,0
ld e,a
- ld hl,W_PRIZE1
+ ld hl,wPrize1
add hl,de
ld a,[hl]
ld [wd11e],a
@@ -300,7 +300,7 @@ GetPrizeMonLevel: ; 52977 (14:6977)
jr .loop
.matchFound
ld a,[hl]
- ld [W_CURENEMYLVL],a
+ ld [wCurEnemyLVL],a
ret
INCLUDE "data/prize_mon_levels.asm"
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index f061fbf6..34c21da0 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -57,7 +57,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
inc hl
ld a,b
ld [hli],a ; max menu item ID
- ld a,%00000011 ; A button, B button
+ ld a,A_BUTTON | B_BUTTON
ld [hli],a ; menu watched keys
xor a
ld [hl],a
@@ -117,7 +117,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
ld a,[hli]
ld h,[hl]
ld l,a
- ld a,[W_OBTAINEDBADGES] ; badges obtained
+ ld a,[wObtainedBadges] ; badges obtained
jp [hl]
.outOfBattleMovePointers
dw .cut
@@ -160,7 +160,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
.surf
bit 4,a ; does the player have the Soul Badge?
jp z,.newBadgeRequired
- callba CheckForForcedBikeSurf
+ callba IsSurfingAllowed
ld hl,wd728
bit 1,[hl]
res 1,[hl]
@@ -297,7 +297,7 @@ ErasePartyMenuCursors: ; 132ed (4:72ed)
ItemMenuLoop: ; 132fc (4:72fc)
call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
StartMenu_Item: ; 13302 (4:7302)
ld a,[wLinkState]
@@ -354,7 +354,7 @@ StartMenu_Item: ; 13302 (4:7302)
inc hl
inc a ; a = 1
ld [hli],a ; max menu item ID
- ld a,%00000011 ; A button, B button
+ ld a,A_BUTTON | B_BUTTON
ld [hli],a ; menu watched keys
xor a
ld [hl],a ; old menu item id
@@ -506,14 +506,14 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
ld [hTilesetType],a
call DrawTrainerInfo
predef DrawBadges ; draw badges
- ld b,$0d
- call GoPAL_SET
+ ld b, SET_PAL_TRAINER_CARD
+ call RunPaletteCommand
call GBPalNormal
call WaitForTextScrollButtonPress ; wait for button press
call GBPalWhiteOut
call LoadFontTilePatterns
call LoadScreenTilesFromBuffer2 ; restore saved screen
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call ReloadMapData
call LoadGBPal
pop af
@@ -601,17 +601,17 @@ DrawTrainerInfo: ; 1349a (4:749a)
ld c,$e3
call PrintBCDNumber
coord hl, 9, 6
- ld de,W_PLAYTIMEHOURS + 1 ; hours
+ ld de,wPlayTimeHours ; hours
lb bc, LEFT_ALIGN | 1, 3
call PrintNumber
ld [hl],$d6 ; colon tile ID
inc hl
- ld de,W_PLAYTIMEMINUTES + 1 ; minutes
+ ld de,wPlayTimeMinutes ; minutes
lb bc, LEADING_ZEROES | 1, 2
jp PrintNumber
TrainerInfo_FarCopyData: ; 1357f (4:757f)
- ld a,$0b
+ ld a,BANK(TrainerInfoTextBoxTileGraphics)
jp FarCopyData2
TrainerInfo_NameMoneyTimeText: ; 13584 (4:7584)
@@ -813,36 +813,36 @@ SwitchPartyMon_InitVarOrSwapData: ; 13653 (4:7653)
call SkipFixedLengthTextEntries
push hl
ld de, wSwitchPartyMonTempBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMonOT
ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries
pop de
push hl
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
pop de
ld hl, wSwitchPartyMonTempBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMonNicks
ld a, [wCurrentMenuItem]
call SkipFixedLengthTextEntries
push hl
ld de, wSwitchPartyMonTempBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wPartyMonNicks
ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries
pop de
push hl
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
pop de
ld hl, wSwitchPartyMonTempBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wMenuItemToSwap]
ld [wSwappedMenuItem], a
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm
index d8a504bb..d07cc026 100755
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -71,7 +71,7 @@ StatusScreen: ; 12953 (4:6953)
; mon is in a box or daycare
ld a, [wLoadedMonBoxLevel]
ld [wLoadedMonLevel], a
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld hl, wLoadedMonHPExp - 1
ld de, wLoadedMonStats
ld b, $1
@@ -80,7 +80,7 @@ StatusScreen: ; 12953 (4:6953)
ld hl, wd72c
set 1, [hl]
ld a, $33
- ld [$ff24], a ; Reduce the volume
+ ld [rNR50], a ; Reduce the volume
call GBPalWhiteOutWithDelay3
call ClearScreen
call UpdateSprites
@@ -99,7 +99,7 @@ StatusScreen: ; 12953 (4:6953)
call CopyVideoDataDouble ; ─┘
ld de, PTile
ld hl, vChars2 + $720
- lb bc, BANK(PTile), $01
+ lb bc, BANK(PTile), (PTileEnd - PTile) / $8
call CopyVideoDataDouble ; P (for PP), inline
ld a, [hTilesetType]
push af
@@ -121,10 +121,10 @@ StatusScreen: ; 12953 (4:6953)
call PlaceString ; "TYPE1/"
coord hl, 11, 3
predef DrawHP
- ld hl, wcf25
+ ld hl, wStatusScreenHPBarColor
call GetHealthBarColor
- ld b, $3
- call GoPAL_SET ; SGB palette
+ ld b, SET_PAL_STATUS_SCREEN
+ call RunPaletteCommand
coord hl, 16, 6
ld de, wLoadedMonStatus
call PrintStatusCondition
@@ -138,7 +138,7 @@ StatusScreen: ; 12953 (4:6953)
call PlaceString ; "STATUS/"
coord hl, 14, 2
call PrintLevel ; Pokémon level
- ld a, [W_MONHDEXNUM]
+ ld a, [wMonHIndex]
ld [wd11e], a
ld [wd0b5], a
predef IndexToPokedex
@@ -196,13 +196,13 @@ OTPointers: ; 12a95 (4:6a95)
dw wPartyMonOT
dw wEnemyMonOT
dw wBoxMonOT
- dw W_DAYCAREMONOT
+ dw wDayCareMonOT
NamePointers2: ; 12a9d (4:6a9d)
dw wPartyMonNicks
dw wEnemyMonNicks
dw wBoxMonNicks
- dw W_DAYCAREMONNAME
+ dw wDayCareMonName
Type1Text: ; 12aa5 (4:6aa5)
db "TYPE1/", $4e
@@ -242,6 +242,7 @@ DrawLineBox: ; 0x12ac7
PTile: ; 12adc (4:6adc) ; This is a single 1bpp "P" tile
INCBIN "gfx/p_tile.1bpp"
+PTileEnd:
PrintStatsBox: ; 12ae4 (4:6ae4)
ld a, d
@@ -371,7 +372,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call PrintNumber
ld a, "/"
ld [hli], a
- ld de, wd11e
+ ld de, wMaxPP
lb bc, 1, 2
call PrintNumber
pop hl
@@ -416,7 +417,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call StatusScreen_ClearName
coord hl, 9, 1
call StatusScreen_ClearName
- ld a, [W_MONHDEXNUM]
+ ld a, [wMonHIndex]
ld [wd11e], a
call GetMonName
coord hl, 9, 1
@@ -430,7 +431,7 @@ StatusScreen2: ; 12b57 (4:6b57)
ld hl, wd72c
res 1, [hl]
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
call GBPalWhiteOut
jp ClearScreen
diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm
index e7f9d2df..185151cb 100755
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -5,15 +5,15 @@ AnimatePartyMon_ForceSpeed1: ; 716f7 (1c:56f7)
inc a
jr GetAnimationSpeed
-; wcf1f contains the party mon's health bar colors
+; wPartyMenuHPBarColors contains the party mon's health bar colors
; 0: green
; 1: yellow
; 2: red
AnimatePartyMon: ; 716ff (1c:56ff)
- ld hl, wcf1f
+ ld hl, wPartyMenuHPBarColors
ld a, [wCurrentMenuItem]
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [hl]
@@ -42,7 +42,7 @@ GetAnimationSpeed: ; 7170a (1c:570a)
jp DelayFrame
.resetSprites
push bc
- ld hl, wcc5b
+ ld hl, wMonPartySpritesSavedOAM
ld de, wOAMBuffer
ld bc, $60
call CopyData
@@ -86,7 +86,7 @@ GetAnimationSpeed: ; 7170a (1c:570a)
; that each frame lasts for green HP, yellow HP, and red HP in order.
; On the naming screen, the yellow HP speed is always used.
PartyMonSpeeds: ; 71769 (1c:5769)
- db $05,$10,$20
+ db 5, 16, 32
LoadMonPartySpriteGfx: ; 7176c (1c:576c)
; Load mon party sprite tile patterns into VRAM during V-blank.
@@ -372,7 +372,7 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
; Write the OAM blocks for the first animation frame into the OAM buffer and
-; make a copy at wcc5b.
+; make a copy at wMonPartySpritesSavedOAM.
push af
ld c, $10
ld h, wOAMBuffer / $100
@@ -392,7 +392,7 @@ WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
; we can flip back to it from the second frame by copying it back.
.makeCopy
ld hl, wOAMBuffer
- ld de, wcc5b
+ ld de, wMonPartySpritesSavedOAM
ld bc, $60
jp CopyData
diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm
index 98499d7f..c4d35639 100755
--- a/engine/oak_speech.asm
+++ b/engine/oak_speech.asm
@@ -1,7 +1,7 @@
SetDefaultNames: ; 60ca (1:60ca)
ld a, [wLetterPrintingDelayFlags]
push af
- ld a, [W_OPTIONS]
+ ld a, [wOptions]
push af
ld a, [wd732]
push af
@@ -16,7 +16,7 @@ SetDefaultNames: ; 60ca (1:60ca)
pop af
ld [wd732], a
pop af
- ld [W_OPTIONS], a
+ ld [wOptions], a
pop af
ld [wLetterPrintingDelayFlags], a
ld a, [wOptionsInitialized]
@@ -24,11 +24,11 @@ SetDefaultNames: ; 60ca (1:60ca)
call z, InitOptions
ld hl, NintenText
ld de, wPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, SonyText
- ld de, W_RIVALNAME
- ld bc, 11
+ ld de, wRivalName
+ ld bc, NAME_LENGTH
jp CopyData
OakSpeech: ; 6115 (1:6115)
@@ -48,7 +48,7 @@ OakSpeech: ; 6115 (1:6115)
ld a,1
ld [wItemQuantity],a
call AddItemToInventory ; give one potion
- ld a,[W_ANIMATIONID]
+ ld a,[wDefaultMap]
ld [wDestinationMap],a
call SpecialWarpIn
xor a
@@ -129,12 +129,12 @@ OakSpeech: ; 6115 (1:6115)
ld a,[H_LOADEDROMBANK]
push af
ld a, BANK(Music_PalletTown)
- ld [wc0ef],a
- ld [wc0f0],a
- ld a,$A
- ld [wMusicHeaderPointer],a
+ ld [wAudioROMBank],a
+ ld [wAudioSavedROMBank],a
+ ld a, 10
+ ld [wAudioFadeOutControl],a
ld a,$FF
- ld [wc0ee],a
+ ld [wNewSoundID],a
call PlaySound ; stop music
pop af
ld [H_LOADEDROMBANK],a
@@ -215,8 +215,8 @@ IntroDisplayPicCenteredOrUpperRight: ; 62a4 (1:62a4)
push bc
ld a,b
call UncompressSpriteFromDE
- ld hl,S_SPRITEBUFFER1
- ld de,S_SPRITEBUFFER0
+ ld hl,sSpriteBuffer1
+ ld de,sSpriteBuffer0
ld bc,$310
call CopyData
ld de,vFrontPic
diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm
index 50e3708c..9b5622b8 100755
--- a/engine/oak_speech2.asm
+++ b/engine/oak_speech2.asm
@@ -40,11 +40,11 @@ ChooseRivalName: ; 69a4 (1:69a4)
jr z, .customName
ld hl, DefaultNamesRivalList
call GetDefaultName
- ld de, W_RIVALNAME
+ ld de, wRivalName
call OakSpeechSlidePicLeft
jr .done
.customName
- ld hl, W_RIVALNAME
+ ld hl, wRivalName
ld a, NAME_RIVAL_SCREEN
ld [wNamingScreenType], a
call DisplayNamingScreen
@@ -73,7 +73,7 @@ OakSpeechSlidePicLeft: ; 69ec (1:69ec)
call DelayFrames
pop de
ld hl, wcd6d
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
call Delay3
coord hl, 12, 4
@@ -177,7 +177,7 @@ DisplayIntroNameTextBox: ; 6a6c (1:6a6c)
ld [wLastMenuItem], a
inc a
ld [wTopMenuItemX], a
- ld [wMenuWatchedKeys], a
+ ld [wMenuWatchedKeys], a ; A_BUTTON
inc a
ld [wTopMenuItemY], a
inc a
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm
index cc9fe3a7..49d99575 100755
--- a/engine/overworld/card_key.asm
+++ b/engine/overworld/card_key.asm
@@ -1,6 +1,6 @@
PrintCardKeyText: ; 52673 (14:6673)
ld hl, SilphCoMapList
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, a
.silphCoMapListLoop
ld a, [hli]
@@ -15,7 +15,7 @@ PrintCardKeyText: ; 52673 (14:6673)
cp $24
jr z, .cardKeyDoorInFrontOfPlayer
ld b, a
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SILPH_CO_11F
ret nz
ld a, b
@@ -39,7 +39,7 @@ PrintCardKeyText: ; 52673 (14:6673)
ld a, e
ld c, a
ld [wCardKeyDoorX], a
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SILPH_CO_11F
jr nz, .notSilphCo11F
ld a, $3
@@ -49,7 +49,7 @@ PrintCardKeyText: ; 52673 (14:6673)
.replaceCardKeyDoorTileBlock
ld [wNewTileBlockID], a
predef ReplaceTileBlock
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, SFX_GO_INSIDE
jp PlaySound
@@ -84,9 +84,9 @@ CardKeyFailText: ; 526f8 (14:66f8)
; d = Y
; e = X
GetCoordsInFrontOfPlayer: ; 526fd (14:66fd)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld d, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld e, a
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
and a
diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm
index 5337255c..f7c5e326 100755
--- a/engine/overworld/cinnabar_lab.asm
+++ b/engine/overworld/cinnabar_lab.asm
@@ -5,14 +5,14 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
ld [wCurrentMenuItem], a
ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
- ld a, [wcd37]
+ ld a, [wFilteredBagItemsCount]
dec a
ld [wMaxMenuItem], a
ld a, 2
ld [wTopMenuItemY], a
ld a, 1
ld [wTopMenuItemX], a
- ld a, [wcd37]
+ ld a, [wFilteredBagItemsCount]
dec a
ld bc, 2
ld hl, 3
@@ -29,9 +29,9 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
call HandleMenuInput
bit 1, a ; pressed B?
jr nz, .cancelledGivingFossil
- ld hl, wcc5b
+ ld hl, wFilteredBagItems
ld a, [wCurrentMenuItem]
- ld d, $0
+ ld d, 0
ld e, a
add hl, de
ld a, [hl]
@@ -48,9 +48,9 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
.choseDomeFossil
ld b, KABUTO
.fossilSelected
- ld [W_FOSSILITEM], a
+ ld [wFossilItem], a
ld a, b
- ld [W_FOSSILMON], a
+ ld [wFossilMon], a
call LoadFossilItemAndMonName
ld hl, LabFossil_610ae
call PrintText
@@ -60,7 +60,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006)
jr nz, .cancelledGivingFossil
ld hl, LabFossil_610b3
call PrintText
- ld a, [W_FOSSILITEM]
+ ld a, [wFossilItem]
ld [hItemToRemoveID], a
callba RemoveItemByID
ld hl, LabFossil_610b8
@@ -90,9 +90,9 @@ LabFossil_610bd: ; 610bd (18:50bd)
PrintFossilsInBag: ; 610c2 (18:50c2)
; Prints each fossil in the player's bag on a separate line in the menu.
- ld hl, wcc5b
+ ld hl, wFilteredBagItems
xor a
- ld [hFossilCounter], a
+ ld [hItemCounter], a
.loop
ld a, [hli]
cp $ff
@@ -101,23 +101,23 @@ PrintFossilsInBag: ; 610c2 (18:50c2)
ld [wd11e], a
call GetItemName
coord hl, 2, 2
- ld a, [hFossilCounter]
+ ld a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2
call AddNTimes
ld de, wcd6d
call PlaceString
- ld hl, hFossilCounter
+ ld hl, hItemCounter
inc [hl]
pop hl
jr .loop
; loads the names of the fossil item and the resulting mon
LoadFossilItemAndMonName: ; 610eb (18:50eb)
- ld a, [W_FOSSILMON]
+ ld a, [wFossilMon]
ld [wd11e], a
call GetMonName
call CopyStringToCF4B
- ld a, [W_FOSSILITEM]
+ ld a, [wFossilItem]
ld [wd11e], a
call GetItemName
ret
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm
index 30aedbc1..8a0513b2 100755
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -1,7 +1,7 @@
UsedCut: ; ef54 (3:6f54)
xor a
ld [wActionResultOrTookBattleTurn], a ; initialise to failure value
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
and a ; OVERWORLD
jr z, .overworld
cp GYM
@@ -177,7 +177,7 @@ ReplaceTreeTileBlock: ; f09f (3:709f)
; player (i.e. where the tree is) and replace it with the corresponding tile
; block that doesn't have the tree.
push de
- ld a, [W_CURMAPWIDTH]
+ ld a, [wCurMapWidth]
add 6
ld c, a
ld b, 0
@@ -195,22 +195,22 @@ ReplaceTreeTileBlock: ; f09f (3:709f)
cp SPRITE_FACING_LEFT
jr z, .left
; right
- ld a, [W_XBLOCKCOORD]
+ ld a, [wXBlockCoord]
and a
jr z, .centerTileBlock
jr .rightOfCenter
.down
- ld a, [W_YBLOCKCOORD]
+ ld a, [wYBlockCoord]
and a
jr z, .centerTileBlock
jr .belowCenter
.up
- ld a, [W_YBLOCKCOORD]
+ ld a, [wYBlockCoord]
and a
jr z, .aboveCenter
jr .centerTileBlock
.left
- ld a, [W_XBLOCKCOORD]
+ ld a, [wXBlockCoord]
and a
jr z, .leftOfCenter
jr .centerTileBlock
diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm
index 641c021f..6b0c0464 100755
--- a/engine/overworld/doors.asm
+++ b/engine/overworld/doors.asm
@@ -2,7 +2,7 @@
IsPlayerStandingOnDoorTile: ; 1a609 (6:6609)
push de
ld hl, DoorTileIDPointers
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
ld de, $3
call IsInArray
pop de
diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm
index eb62fee7..05a9cc4e 100755
--- a/engine/overworld/elevator.asm
+++ b/engine/overworld/elevator.asm
@@ -33,7 +33,7 @@ ShakeElevator: ; 7bf15 (1e:7f15)
ld a, SFX_SAFARI_ZONE_PA
call PlayMusic
.musicLoop
- ld a, [wc02a]
+ ld a, [wChannelSoundIDs + CH4]
cp $b9
jr z, .musicLoop
call UpdateSprites
diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm
index ebd441aa..f8665dd6 100755
--- a/engine/overworld/emotion_bubbles.asm
+++ b/engine/overworld/emotion_bubbles.asm
@@ -9,7 +9,7 @@ EmotionBubble: ; 17c47 (5:7c47)
inc hl
ld d, [hl]
ld hl, vChars1 + $780
- lb bc, BANK(EmotionBubblesPointerTable), $04
+ lb bc, BANK(EmotionBubbles), $04
call CopyVideoData
ld a, [wUpdateSpritesEnabled]
push af
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index d3513b0d..bf7130cb 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -1,7 +1,7 @@
AnimateHealingMachine: ; 70433 (1c:4433)
ld de, PokeCenterFlashingMonitorAndHealBall
ld hl, vChars0 + $7c0
- lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03
+ lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles
call CopyVideoData
ld hl, wUpdateSpritesEnabled
ld a, [hl]
@@ -15,44 +15,44 @@ AnimateHealingMachine: ; 70433 (1c:4433)
ld hl, wOAMBuffer + $84
ld de, PokeCenterOAMData
call CopyHealingMachineOAM
- ld a, $4
- ld [wMusicHeaderPointer], a
+ ld a, 4
+ ld [wAudioFadeOutControl], a
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
-.asm_70464
- ld a, [wMusicHeaderPointer]
- and a
- jr nz, .asm_70464
+.waitLoop
+ ld a, [wAudioFadeOutControl]
+ and a ; is fade-out finished?
+ jr nz, .waitLoop ; if not, check again
ld a, [wPartyCount]
ld b, a
-.asm_7046e
+.partyLoop
call CopyHealingMachineOAM
ld a, SFX_HEALING_MACHINE
call PlaySound
ld c, 30
call DelayFrames
dec b
- jr nz, .asm_7046e
- ld a, [wc0ef]
+ jr nz, .partyLoop
+ ld a, [wAudioROMBank]
cp BANK(Audio3_UpdateMusic)
- ld [wc0f0], a
- jr nz, .asm_70495
+ ld [wAudioSavedROMBank], a
+ jr nz, .next
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld a, BANK(Music_PkmnHealed)
- ld [wc0ef], a
-.asm_70495
+ ld [wAudioROMBank], a
+.next
ld a, MUSIC_PKMN_HEALED
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld d, $28
call FlashSprite8Times
-.asm_704a2
- ld a, [wc026]
- cp MUSIC_PKMN_HEALED
- jr z, .asm_704a2
+.waitLoop2
+ ld a, [wChannelSoundIDs]
+ cp MUSIC_PKMN_HEALED ; is the healed music still playing?
+ jr z, .waitLoop2 ; if so, check gain
ld c, 32
call DelayFrames
pop af
diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm
index 1203dd2a..f7f81070 100755
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -51,7 +51,7 @@ HiddenItemBagFullText: ; 76794 (1d:6794)
HiddenCoins: ; 76799 (1d:6799)
ld b, COIN_CASE
- predef IsItemInBag_
+ predef GetQuantityOfItemInBag
ld a, b
and a
ret z
@@ -135,7 +135,7 @@ FindHiddenItemOrCoinsIndex: ; 76857 (1d:6857)
ld d, a
ld a, [wHiddenObjectX]
ld e, a
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, a
ld c, -1
.loop
diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm
index cabfc093..1fc20e5c 100755
--- a/engine/overworld/hidden_objects.asm
+++ b/engine/overworld/hidden_objects.asm
@@ -29,7 +29,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0)
ld b, a
cp $ff
jr z, .noMatch
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp b
jr z, .foundMatchingMap
inc de
@@ -95,30 +95,30 @@ CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01)
cp SPRITE_FACING_RIGHT
jr z, .facingRight
; facing down
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
inc a
jr .upDownCommon
.facingUp
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
dec a
.upDownCommon
cp b
jr nz, .didNotMatch
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp c
jr nz, .didNotMatch
jr .matched
.facingLeft
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
dec a
jr .leftRightCommon
.facingRight
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
inc a
.leftRightCommon
cp c
jr nz, .didNotMatch
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp b
jr nz, .didNotMatch
.matched
diff --git a/engine/overworld/is_player_just_outside_map.asm b/engine/overworld/is_player_just_outside_map.asm
index 24e434b3..e9ba204a 100644
--- a/engine/overworld/is_player_just_outside_map.asm
+++ b/engine/overworld/is_player_just_outside_map.asm
@@ -1,13 +1,13 @@
; returns whether the player is one tile outside the map in Z
IsPlayerJustOutsideMap: ; 128d8 (4:68d8)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_CURMAPHEIGHT]
+ ld a, [wCurMapHeight]
call .compareCoordWithMapDimension
ret z
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld b, a
- ld a, [W_CURMAPWIDTH]
+ ld a, [wCurMapWidth]
.compareCoordWithMapDimension
add a
cp b
diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm
index 6fbe823d..63eecef9 100644
--- a/engine/overworld/item.asm
+++ b/engine/overworld/item.asm
@@ -3,7 +3,7 @@ PickUpItem:
ld a, [hSpriteIndexOrTextID]
ld b, a
- ld hl, W_MISSABLEOBJECTLIST
+ ld hl, wMissableObjectList
.missableObjectsListLoop
ld a, [hli]
cp $ff
@@ -17,7 +17,7 @@ PickUpItem:
ld a, [hl]
ld [$ffdb], a
- ld hl, W_MAPSPRITEEXTRADATA
+ ld hl, wMapSpriteExtraData
ld a, [hSpriteIndexOrTextID]
dec a
add a
diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm
index 5a3bfbe0..b04f6332 100755
--- a/engine/overworld/ledges.asm
+++ b/engine/overworld/ledges.asm
@@ -2,7 +2,7 @@ HandleLedges: ; 1a672 (6:6672)
ld a, [wd736]
bit 6, a ; already jumping down ledge
ret nz
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
and a ; OVERWORLD
ret nz
predef GetTileAndCoordsInFrontOfPlayer
@@ -69,7 +69,7 @@ LedgeTiles: ; 1a6cf (6:66cf)
LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
ld hl, vChars1 + $7f0
ld de, LedgeHoppingShadow
- lb bc, BANK(LedgeHoppingShadow), $01
+ lb bc, BANK(LedgeHoppingShadow), (LedgeHoppingShadowEnd - LedgeHoppingShadow) / $8
call CopyVideoDataDouble
ld a, $9
lb bc, $54, $48 ; b, c = y, x coordinates of shadow
@@ -79,6 +79,7 @@ LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
LedgeHoppingShadow: ; 1a708 (6:6708)
INCBIN "gfx/ledge_hopping_shadow.1bpp"
+LedgeHoppingShadowEnd:
LedgeHoppingShadowOAM: ; 1a710 (6:6710)
db $FF,$10,$FF,$20
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index 33411dfc..bdd3320b 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -30,12 +30,12 @@ InitMapSprites: ; 1785b (5:785b)
; InitOutsideMapSprites.
; Loads tile pattern data for sprites into VRAM.
LoadMapSpriteTilePatterns: ; 17871 (5:7871)
- ld a,[W_NUMSPRITES]
+ ld a,[wNumSprites]
and a ; are there any sprites?
jr nz,.spritesExist
ret
.spritesExist
- ld c,a ; c = [W_NUMSPRITES]
+ ld c,a ; c = [wNumSprites]
ld b,$10 ; number of sprite slots
ld hl,wSpriteStateData2 + $0d
xor a
@@ -251,7 +251,7 @@ ReadSpriteSheetData: ; 17971 (5:7971)
; Loads sprite set for outside maps (cities and routes) and sets VRAM slots.
; sets carry if the map is a city or route, unsets carry if not
InitOutsideMapSprites: ; 1797b (5:797b)
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)?
ret nc ; if not, return
ld hl,MapSpriteSets
@@ -267,12 +267,12 @@ InitOutsideMapSprites: ; 1797b (5:797b)
ld a,[wFontLoaded]
bit 0,a ; reloading upper half of tile patterns after displaying text?
jr nz,.loadSpriteSet ; if so, forcibly reload the sprite set
- ld a,[W_SPRITESETID]
+ ld a,[wSpriteSetID]
cp b ; has the sprite set ID changed?
jr z,.skipLoadingSpriteSet ; if not, don't load it again
.loadSpriteSet
ld a,b
- ld [W_SPRITESETID],a
+ ld [wSpriteSetID],a
dec a
ld b,a
sla a
@@ -291,7 +291,7 @@ InitOutsideMapSprites: ; 1797b (5:797b)
ld hl,wSpriteStateData2 + $0d
ld a,SPRITE_RED
ld [hl],a
- ld bc,W_SPRITESET
+ ld bc,wSpriteSet
; Load the sprite set into RAM.
; This loop also fills $C2XD (sprite picture ID) where X is from $0 to $A
; with picture ID's. This is done so that LoadMapSpriteTilePatterns will
@@ -317,13 +317,13 @@ InitOutsideMapSprites: ; 1797b (5:797b)
ld [hl],a ; $C2XD (sprite picture ID)
dec b
jr nz,.zeroRemainingSlotsLoop
- ld a,[W_NUMSPRITES]
+ ld a,[wNumSprites]
push af ; save number of sprites
ld a,11 ; 11 sprites in sprite set
- ld [W_NUMSPRITES],a
+ ld [wNumSprites],a
call LoadMapSpriteTilePatterns
pop af
- ld [W_NUMSPRITES],a ; restore number of sprites
+ ld [wNumSprites],a ; restore number of sprites
ld hl,wSpriteStateData2 + $1e
ld b,$0f
; The VRAM tile pattern slots that LoadMapSpriteTilePatterns set are in the
@@ -352,7 +352,7 @@ InitOutsideMapSprites: ; 1797b (5:797b)
and a ; is the sprite slot used?
jr z,.skipGettingPictureIndex ; if the sprite slot is not used
ld b,a ; b = picture ID
- ld de,W_SPRITESET
+ ld de,wSpriteSet
; Loop to find the index of the sprite's picture ID within the sprite set.
.getPictureIndexLoop
inc c
@@ -399,10 +399,10 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a)
ld b,a
jr z,.eastWestDivide
.northSouthDivide
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
jr .compareCoord
.eastWestDivide
- ld a,[W_XCOORD]
+ ld a,[wXCoord]
.compareCoord
cp b
jr c,.loadSpriteSetID
@@ -415,7 +415,7 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a)
; Route 20 is a special case because the two map sections have a more complex
; shape instead of the map simply being split horizontally or vertically.
.route20
- ld hl,W_XCOORD
+ ld hl,wXCoord
ld a,[hl]
cp a,$2b
ld a,$01
@@ -430,7 +430,7 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a)
jr nc,.next
ld b,$0d
.next
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
cp b
ld a,$0a
ret c
diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm
index be10fd69..c89406d1 100644
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -89,7 +89,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
; bit set by later logic.
ld a, [hTilePlayerStandingOn]
ld c, a
- ld a, [W_GRASSTILE]
+ ld a, [wGrassTile]
cp c
ld a, $0
jr nz, .next2
@@ -114,7 +114,7 @@ UpdateNPCSprite: ; 4ed1 (1:4ed1)
swap a
dec a
add a
- ld hl, W_MAPSPRITEDATA
+ ld hl, wMapSpriteData
add l
ld l, a
ld a, [hl] ; read movement byte 2
@@ -133,8 +133,8 @@ UpdateNPCSprite: ; 4ed1 (1:4ed1)
ld l, a
inc l
ld a, [hl] ; c1x1
- bit 7, a
- jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80
+ bit 7, a ; is the face player flag set?
+ jp nz, MakeNPCFacePlayer
ld b, a
ld a, [wFontLoaded]
bit 0, a
@@ -400,10 +400,15 @@ notYetMoving: ; 5073 (1:5073)
ld [hl], $0 ; c1x8 = 0 (walk animation frame)
jp UpdateSpriteImage
-InitializeSpriteFacingDirection: ; 507f (1:507f)
+MakeNPCFacePlayer: ; 507f (1:507f)
+; Make an NPC face the player if the player has spoken to him or her.
+
+; Check if the behaviour of the NPC facing the player when spoken to is
+; disabled. This is only done when rubbing the S.S. Anne captain's back.
ld a, [wd72d]
bit 5, a
jr nz, notYetMoving
+
res 7, [hl]
ld a, [wPlayerDirection]
bit PLAYER_DIR_BIT_UP, a
@@ -448,7 +453,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd)
ld a, [H_CURRENTSPRITEOFFSET]
add $4
ld l, a
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
ld a, [hl] ; c2x4 (Y position + 4)
sub b ; relative to player position
@@ -457,7 +462,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd)
dec h
ld [hli], a ; c1x4 (screen Y position)
inc h
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld b, a
ld a, [hli] ; c2x6 (X position + 4)
sub b ; relative to player position
@@ -483,7 +488,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
add $4
ld l, a
ld b, [hl] ; c2x4: Y pos (+4)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp b
jr z, .skipYVisibilityTest
jr nc, .spriteInvisible ; above screen region
@@ -493,7 +498,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
.skipYVisibilityTest
inc l
ld b, [hl] ; c2x5: X pos (+4)
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp b
jr z, .skipXVisibilityTest
jr nc, .spriteInvisible ; left of screen region
@@ -537,7 +542,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc)
ld a, [H_CURRENTSPRITEOFFSET]
add $7
ld l, a
- ld a, [W_GRASSTILE]
+ ld a, [wGrassTile]
cp c
ld a, $0
jr nz, .notInGrass
@@ -585,9 +590,9 @@ CanWalkOntoTile: ; 516e (1:516e)
and a
ret
.notScripted
- ld a, [W_TILESETCOLLISIONPTR]
+ ld a, [wTileSetCollisionPtr]
ld l, a
- ld a, [W_TILESETCOLLISIONPTR+1]
+ ld a, [wTileSetCollisionPtr+1]
ld h, a
.tilePassableLoop
ld a, [hli]
diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm
index 0c01e38c..719c8835 100755
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -52,7 +52,7 @@ PalletMovementScriptPointerTable: ; 1a442 (6:6442)
dw PalletMovementScript_Done
PalletMovementScript_OakMoveLeft: ; 1a44c (6:644c)
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
sub $a
ld [wNumStepsToTake], a
jr z, .playerOnLeftTile
@@ -79,7 +79,7 @@ PalletMovementScript_OakMoveLeft: ; 1a44c (6:644c)
ld a, $3
ld [wNPCMovementScriptFunctionNum], a
.done
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
set 1, [hl]
ld a, $fc
ld [wJoyIgnore], a
@@ -163,10 +163,10 @@ PewterMuseumGuyMovementScriptPointerTable: ; 1a510 (6:6510)
PewterMovementScript_WalkToMuseum: ; 1a514 (6:6514)
ld a, BANK(Music_MuseumGuy)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, MUSIC_MUSEUM_GUY
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld a, [wSpriteIndex]
swap a
@@ -219,10 +219,10 @@ PewterGymGuyMovementScriptPointerTable: ; 1a57d (6:657d)
PewterMovementScript_WalkToGym: ; 1a581 (6:6581)
ld a, BANK(Music_MuseumGuy)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, MUSIC_MUSEUM_GUY
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld a, [wSpriteIndex]
swap a
@@ -267,7 +267,7 @@ RLEList_PewterGymGuy: ; 1a5da (6:65da)
db $FF
FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp POKEMONTOWER_7
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them
ld hl, RivalIDs
@@ -286,7 +286,7 @@ FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7)
jp SetSpriteMovementBytesToFF
RivalIDs: ; 1a605 (6:6605)
- db SONY1 + $c8
- db SONY2 + $c8
- db SONY3 + $c8
+ db OPP_SONY1
+ db OPP_SONY2
+ db OPP_SONY3
db $ff
diff --git a/engine/overworld/oaks_aide.asm b/engine/overworld/oaks_aide.asm
index 00f6ea82..8ac456d2 100755
--- a/engine/overworld/oaks_aide.asm
+++ b/engine/overworld/oaks_aide.asm
@@ -4,45 +4,45 @@ OaksAideScript: ; 0x59035
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_59086
+ jr nz, .choseNo
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
- ld a, [wd11e]
- ld [$ffdd], a
+ ld a, [wNumSetBits]
+ ld [hOaksAideNumMonsOwned], a
ld b, a
- ld a, [$ffdb]
+ ld a, [hOaksAideRequirement]
cp b
- jr z, .asm_59059
- jr nc, .asm_5907c
-.asm_59059
+ jr z, .giveItem
+ jr nc, .notEnoughOwnedMons
+.giveItem
ld hl, OaksAideHereYouGoText
call PrintText
- ld a, [$ffdc]
+ ld a, [hOaksAideRewardItem]
ld b, a
ld c, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bagFull
ld hl, OaksAideGotItemText
call PrintText
ld a, $1
- jr .asm_5908e
-.BagFull
+ jr .done
+.bagFull
ld hl, OaksAideNoRoomText
call PrintText
xor a
- jr .asm_5908e
-.asm_5907c
+ jr .done
+.notEnoughOwnedMons
ld hl, OaksAideUhOhText
call PrintText
ld a, $80
- jr .asm_5908e
-.asm_59086
+ jr .done
+.choseNo
ld hl, OaksAideComeBackText
call PrintText
ld a, $ff
-.asm_5908e
- ld [$ffdb], a
+.done
+ ld [hOaksAideResult], a
ret
OaksAideHiText: ; 59091 (16:5091)
diff --git a/engine/overworld/pewter_guys.asm b/engine/overworld/pewter_guys.asm
index 4ac60e00..543dac91 100755
--- a/engine/overworld/pewter_guys.asm
+++ b/engine/overworld/pewter_guys.asm
@@ -17,9 +17,9 @@ PewterGuys: ; 37ca1 (d:7ca1)
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
.findMatchingCoordsLoop
ld a, [hli]
diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm
index 74762b00..de36eeaf 100755
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -5,7 +5,7 @@ EnterMapAnim: ; 70510 (1c:4510)
call Delay3
push hl
call GBFadeInFromWhite
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
bit 7, [hl] ; used fly out of battle?
res 7, [hl]
jr nz, .flyAnimation
@@ -350,7 +350,7 @@ GetPlayerTeleportAnimFrameDelay: ; 7077f (1c:477f)
IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787)
ld b, 0
ld hl, .warpPadAndHoleData
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
ld c, a
.loop
ld a, [hli]
diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm
index 5b2e4cbb..f302d994 100755
--- a/engine/overworld/pokecenter.asm
+++ b/engine/overworld/pokecenter.asm
@@ -24,12 +24,12 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
predef HealParty
callba AnimateHealingMachine ; do the healing machine animation
xor a
- ld [wMusicHeaderPointer], a
- ld a, [wc0f0]
- ld [wc0ef], a
- ld a, [wd35b]
- ld [wcfca], a
- ld [wc0ee], a
+ ld [wAudioFadeOutControl], a
+ ld a, [wAudioSavedROMBank]
+ ld [wAudioROMBank], a
+ ld a, [wMapMusicSoundID]
+ ld [wLastMusicSoundID], a
+ ld [wNewSoundID], a
call PlaySound
ld hl, PokemonFightingFitText
call PrintText
diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm
index 1dccd026..e631bbfa 100755
--- a/engine/overworld/ssanne.asm
+++ b/engine/overworld/ssanne.asm
@@ -85,8 +85,9 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
LoadSmokeTile: ; 79fd4 (1e:5fd4)
ld de, SSAnneSmokePuffTile
- lb bc, BANK(SSAnneSmokePuffTile), $01
+ lb bc, BANK(SSAnneSmokePuffTile), (SSAnneSmokePuffTileEnd - SSAnneSmokePuffTile) / $10
jp CopyVideoData
SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)
INCBIN "gfx/ss_anne_smoke_puff.2bpp"
+SSAnneSmokePuffTileEnd:
diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm
index 7d2ec0dd..66ae20ce 100755
--- a/engine/overworld/trainers.asm
+++ b/engine/overworld/trainers.asm
@@ -291,7 +291,7 @@ CheckSpriteCanSeePlayer: ; 569af (15:69af)
; tests if the player is in front of the sprite (rather than behind it)
CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp POWER_PLANT
jp z, .engage ; bypass this for power plant to get voltorb fake items to work
ld a, [wTrainerSpriteOffset]
diff --git a/engine/palettes.asm b/engine/palettes.asm
index a325e0a3..94466533 100755
--- a/engine/palettes.asm
+++ b/engine/palettes.asm
@@ -1,49 +1,49 @@
-Func_71ddf: ; 71ddf (1c:5ddf)
+_RunPaletteCommand: ; 71ddf (1c:5ddf)
call GetPredefRegisters
ld a, b
cp $ff
- jr nz, .asm_71dea
- ld a, [wcf1c]
-.asm_71dea
- cp $fc
- jp z, Func_71fc2
+ jr nz, .next
+ ld a, [wDefaultPaletteCommand] ; use default command if command ID is $ff
+.next
+ cp UPDATE_PARTY_MENU_BLK_PACKET
+ jp z, UpdatePartyMenuBlkPacket
ld l, a
- ld h, $0
+ ld h, 0
add hl, hl
- ld de, PointerTable_71f73
+ ld de, SetPalFunctions
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, Func_72156
+ ld de, SendSGBPackets
push de
jp [hl]
-SendPalPacket_Black: ; 71dff (1c:5dff)
+SetPal_BattleBlack: ; 71dff (1c:5dff)
ld hl, PalPacket_Black
ld de, BlkPacket_Battle
ret
; uses PalPacket_Empty to build a packet based on mon IDs and health color
-BuildBattlePalPacket: ; 71e06 (1c:5e06)
+SetPal_Battle: ; 71e06 (1c:5e06)
ld hl, PalPacket_Empty
- ld de, wcf2d
+ ld de, wPalPacket
ld bc, $10
call CopyData
- ld a, [W_PLAYERBATTSTATUS3]
+ ld a, [wPlayerBattleStatus3]
ld hl, wBattleMonSpecies
call DeterminePaletteID
ld b, a
- ld a, [W_ENEMYBATTSTATUS3]
+ ld a, [wEnemyBattleStatus3]
ld hl, wEnemyMonSpecies2
call DeterminePaletteID
ld c, a
- ld hl, wcf2e
- ld a, [wcf1d]
+ ld hl, wPalPacket + 1
+ ld a, [wPlayerHPBarColor]
add PAL_GREENBAR
ld [hli], a
inc hl
- ld a, [wcf1e]
+ ld a, [wEnemyHPBarColor]
add PAL_GREENBAR
ld [hli], a
inc hl
@@ -52,21 +52,21 @@ BuildBattlePalPacket: ; 71e06 (1c:5e06)
inc hl
ld a, c
ld [hl], a
- ld hl, wcf2d
+ ld hl, wPalPacket
ld de, BlkPacket_Battle
- ld a, $1
- ld [wcf1c], a
+ ld a, SET_PAL_BATTLE
+ ld [wDefaultPaletteCommand], a
ret
-SendPalPacket_TownMap: ; 71e48 (1c:5e48)
+SetPal_TownMap: ; 71e48 (1c:5e48)
ld hl, PalPacket_TownMap
ld de, BlkPacket_WholeScreen
ret
; uses PalPacket_Empty to build a packet based the mon ID
-BuildStatusScreenPalPacket: ; 71e4f (1c:5e4f)
+SetPal_StatusScreen: ; 71e4f (1c:5e4f)
ld hl, PalPacket_Empty
- ld de, wcf2d
+ ld de, wPalPacket
ld bc, $10
call CopyData
ld a, [wcf91]
@@ -76,75 +76,75 @@ BuildStatusScreenPalPacket: ; 71e4f (1c:5e4f)
.pokemon
call DeterminePaletteIDOutOfBattle
push af
- ld hl, wcf2e
- ld a, [wcf25]
+ ld hl, wPalPacket + 1
+ ld a, [wStatusScreenHPBarColor]
add PAL_GREENBAR
ld [hli], a
inc hl
pop af
ld [hl], a
- ld hl, wcf2d
+ ld hl, wPalPacket
ld de, BlkPacket_StatusScreen
ret
-SendPalPacket_PartyMenu: ; 71e7b (1c:5e7b)
+SetPal_PartyMenu: ; 71e7b (1c:5e7b)
ld hl, PalPacket_PartyMenu
- ld de, wcf2e
+ ld de, wPartyMenuBlkPacket
ret
-SendPalPacket_Pokedex: ; 71e82 (1c:5e82)
+SetPal_Pokedex: ; 71e82 (1c:5e82)
ld hl, PalPacket_Pokedex
- ld de, wcf2d
+ ld de, wPalPacket
ld bc, $10
call CopyData
ld a, [wcf91]
call DeterminePaletteIDOutOfBattle
- ld hl, wcf30
+ ld hl, wPalPacket + 3
ld [hl], a
- ld hl, wcf2d
+ ld hl, wPalPacket
ld de, BlkPacket_Pokedex
ret
-SendPalPacket_Slots: ; 71e9f (1c:5e9f)
+SetPal_Slots: ; 71e9f (1c:5e9f)
ld hl, PalPacket_Slots
ld de, BlkPacket_Slots
ret
-SendPalPacket_Titlescreen: ; 71ea6 (1c:5ea6)
+SetPal_TitleScreen: ; 71ea6 (1c:5ea6)
ld hl, PalPacket_Titlescreen
ld de, BlkPacket_Titlescreen
ret
; used mostly for menus and the Oak intro
-SendPalPacket_Generic: ; 71ead (1c:5ead)
+SetPal_Generic: ; 71ead (1c:5ead)
ld hl, PalPacket_Generic
ld de, BlkPacket_WholeScreen
ret
-SendPalPacket_NidorinoIntro: ; 71eb4 (1c:5eb4)
+SetPal_NidorinoIntro: ; 71eb4 (1c:5eb4)
ld hl, PalPacket_NidorinoIntro
ld de, BlkPacket_NidorinoIntro
ret
-SendPalPacket_GameFreakIntro: ; 71ebb (1c:5ebb)
+SetPal_GameFreakIntro: ; 71ebb (1c:5ebb)
ld hl, PalPacket_GameFreakIntro
ld de, BlkPacket_GameFreakIntro
- ld a, $8
- ld [wcf1c], a
+ ld a, SET_PAL_GENERIC
+ ld [wDefaultPaletteCommand], a
ret
; uses PalPacket_Empty to build a packet based on the current map
-BuildOverworldPalPacket: ; 71ec7 (1c:5ec7)
+SetPal_Overworld: ; 71ec7 (1c:5ec7)
ld hl, PalPacket_Empty
- ld de, wcf2d
+ ld de, wPalPacket
ld bc, $10
call CopyData
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
cp CEMETERY
jr z, .PokemonTowerOrAgatha
cp CAVERN
jr z, .caveOrBruno
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp REDS_HOUSE_1F
jr c, .townOrRoute
cp UNKNOWN_DUNGEON_2
@@ -162,12 +162,12 @@ BuildOverworldPalPacket: ; 71ec7 (1c:5ec7)
jr c, .town
ld a, PAL_ROUTE - 1
.town
- inc a ; a town's pallete ID is its map ID + 1
- ld hl, wcf2e
+ inc a ; a town's palette ID is its map ID + 1
+ ld hl, wPalPacket + 1
ld [hld], a
ld de, BlkPacket_WholeScreen
- ld a, $9
- ld [wcf1c], a
+ ld a, SET_PAL_OVERWORLD
+ ld [wDefaultPaletteCommand], a
ret
.PokemonTowerOrAgatha
ld a, PAL_GREYMON - 1
@@ -181,131 +181,143 @@ BuildOverworldPalPacket: ; 71ec7 (1c:5ec7)
; used when a Pokemon is the only thing on the screen
; such as evolution, trading and the Hall of Fame
-SendPokemonPalette_WholeScreen: ; 71f17 (1c:5f17)
+SetPal_PokemonWholeScreen: ; 71f17 (1c:5f17)
push bc
ld hl, PalPacket_Empty
- ld de, wcf2d
+ ld de, wPalPacket
ld bc, $10
call CopyData
pop bc
ld a, c
and a
- ld a, $1e
- jr nz, .asm_71f31
- ld a, [wcf1d]
+ ld a, PAL_BLACK
+ jr nz, .next
+ ld a, [wWholeScreenPaletteMonSpecies]
call DeterminePaletteIDOutOfBattle
-.asm_71f31
- ld [wcf2e], a
- ld hl, wcf2d
+.next
+ ld [wPalPacket + 1], a
+ ld hl, wPalPacket
ld de, BlkPacket_WholeScreen
ret
-BuildTrainerCardPalPacket: ; 71f3b (1c:5f3b)
+SetPal_TrainerCard: ; 71f3b (1c:5f3b)
ld hl, BlkPacket_TrainerCard
- ld de, wcc5b
+ ld de, wTrainerCardBlkPacket
ld bc, $40
call CopyData
- ld de, LoopCounts_71f8f
- ld hl, wcc5d
- ld a, [W_OBTAINEDBADGES]
- ld c, $8
-.asm_71f52
+ ld de, BadgeBlkDataLengths
+ ld hl, wTrainerCardBlkPacket + 2
+ ld a, [wObtainedBadges]
+ ld c, 8
+.badgeLoop
srl a
push af
- jr c, .asm_71f62
+ jr c, .haveBadge
+; The player doens't have the badge, so zero the badge's blk data.
push bc
ld a, [de]
ld c, a
xor a
-.asm_71f5b
+.zeroBadgeDataLoop
ld [hli], a
dec c
- jr nz, .asm_71f5b
+ jr nz, .zeroBadgeDataLoop
pop bc
- jr .asm_71f67
-.asm_71f62
+ jr .nextBadge
+.haveBadge
+; The player does have the badge, so skip past the badge's blk data.
ld a, [de]
-.asm_71f63
+.skipBadgeDataLoop
inc hl
dec a
- jr nz, .asm_71f63
-.asm_71f67
+ jr nz, .skipBadgeDataLoop
+.nextBadge
pop af
inc de
dec c
- jr nz, .asm_71f52
+ jr nz, .badgeLoop
ld hl, PalPacket_TrainerCard
- ld de, wcc5b
+ ld de, wTrainerCardBlkPacket
ret
-PointerTable_71f73: ; 71f73 (1c:5f73)
- dw SendPalPacket_Black
- dw BuildBattlePalPacket
- dw SendPalPacket_TownMap
- dw BuildStatusScreenPalPacket
- dw SendPalPacket_Pokedex
- dw SendPalPacket_Slots
- dw SendPalPacket_Titlescreen
- dw SendPalPacket_NidorinoIntro
- dw SendPalPacket_Generic
- dw BuildOverworldPalPacket
- dw SendPalPacket_PartyMenu
- dw SendPokemonPalette_WholeScreen
- dw SendPalPacket_GameFreakIntro
- dw BuildTrainerCardPalPacket
-
-; each byte is the number of loops to make in .asm_71f5b for each badge
-LoopCounts_71f8f: ; 71f8f (1c:5f8f)
- db $06,$06,$06,$12,$06,$06,$06,$06
+SetPalFunctions: ; 71f73 (1c:5f73)
+ dw SetPal_BattleBlack
+ dw SetPal_Battle
+ dw SetPal_TownMap
+ dw SetPal_StatusScreen
+ dw SetPal_Pokedex
+ dw SetPal_Slots
+ dw SetPal_TitleScreen
+ dw SetPal_NidorinoIntro
+ dw SetPal_Generic
+ dw SetPal_Overworld
+ dw SetPal_PartyMenu
+ dw SetPal_PokemonWholeScreen
+ dw SetPal_GameFreakIntro
+ dw SetPal_TrainerCard
+
+; The length of the blk data of each badge on the Trainer Card.
+; The Rainbow Badge has 3 entries because of its many colors.
+BadgeBlkDataLengths: ; 71f8f (1c:5f8f)
+ db 6 ; Boulder Badge
+ db 6 ; Cascade Badge
+ db 6 ; Thunder Badge
+ db 6 * 3 ; Rainbow Badge
+ db 6 ; Soul Badge
+ db 6 ; Marsh Badge
+ db 6 ; Volcano Badge
+ db 6 ; Earth Badge
DeterminePaletteID: ; 71f97 (1c:5f97)
- bit 3, a ; bit 3 of battle status 3, set if current Pokemon is transformed
- ld a, PAL_GREYMON ; if yes, use Ditto's palette
+ bit Transformed, a ; a is battle status 3
+ ld a, PAL_GREYMON ; if the mon has used Transform, use Ditto's palette
ret nz
ld a, [hl]
DeterminePaletteIDOutOfBattle: ; 71f9d (1c:5f9d)
ld [wd11e], a
- and a
- jr z, .idZero
+ and a ; is the mon index 0?
+ jr z, .skipDexNumConversion
push bc
- predef IndexToPokedex ; turn Pokemon ID number into Pokedex number
+ predef IndexToPokedex
pop bc
ld a, [wd11e]
-.idZero
+.skipDexNumConversion
ld e, a
- ld d, $00
- ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too
+ ld d, 0
+ ld hl, MonsterPalettes ; not just for Pokemon, Trainers use it too
add hl, de
ld a, [hl]
ret
-SendBlkPacket_PartyMenu: ; 71fb6 (1c:5fb6)
+InitPartyMenuBlkPacket: ; 71fb6 (1c:5fb6)
ld hl, BlkPacket_PartyMenu
- ld de, wcf2e
+ ld de, wPartyMenuBlkPacket
ld bc, $30
jp CopyData
-Func_71fc2: ; 71fc2 (1c:5fc2)
- ld hl, wcf1f
- ld a, [wcf2d]
+UpdatePartyMenuBlkPacket: ; 71fc2 (1c:5fc2)
+; Update the blk packet with the palette of the HP bar that is
+; specified in [wWhichPartyMenuHPBar].
+ ld hl, wPartyMenuHPBarColors
+ ld a, [wWhichPartyMenuHPBar]
ld e, a
- ld d, $0
+ ld d, 0
add hl, de
ld e, l
ld d, h
ld a, [de]
and a
- ld e, $5
- jr z, .asm_71fdb
+ ld e, (1 << 2) | 1 ; green
+ jr z, .next
dec a
- ld e, $a
- jr z, .asm_71fdb
- ld e, $f
-.asm_71fdb
+ ld e, (2 << 2) | 2 ; yellow
+ jr z, .next
+ ld e, (3 << 2) | 3 ; red
+.next
push de
- ld hl, wcf37
- ld bc, $6
- ld a, [wcf2d]
+ ld hl, wPartyMenuBlkPacket + 8 + 1
+ ld bc, 6
+ ld a, [wWhichPartyMenuHPBar]
call AddNTimes
pop de
ld [hl], e
@@ -321,11 +333,9 @@ SendSGBPacket: ; 71feb (1c:5feb)
.loop2
; save B for later use
push bc
-; load a non-zero value in $fff9 to disable the routine that checks actual
-; joypad input (said routine, located at $15f, does nothing if $fff9 is not
-; zero)
- ld a,$01
- ld [$fff9],a
+; disable ReadJoypad to prevent it from interfering with sending the packet
+ ld a, 1
+ ld [hDisableJoypadPolling], a
; send RESET signal (P14=LOW, P15=LOW)
xor a
ld [rJOYP],a
@@ -367,7 +377,7 @@ SendSGBPacket: ; 71feb (1c:5feb)
ld a,$30
ld [rJOYP],a
xor a
- ld [$fff9],a
+ ld [hDisableJoypadPolling],a
; wait for about 70000 cycles
call Wait7000
; restore (previously pushed) number of packets
@@ -383,39 +393,39 @@ LoadSGB: ; 7202b (1c:602b)
ld [wOnSGB], a
call CheckSGB
ret nc
- ld a, $1
+ ld a, 1
ld [wOnSGB], a
ld a, [wGBC]
and a
- jr z, .asm_7203f
+ jr z, .notGBC
ret
-.asm_7203f
+.notGBC
di
- call Func_72075
+ call PrepareSuperNintendoVRAMTransfer
ei
- ld a, $1
- ld [wcf2d], a
+ ld a, 1
+ ld [wCopyingSGBTileData], a
ld de, ChrTrnPacket
ld hl, SGBBorderGraphics
- call Func_7210b
+ call CopyGfxToSuperNintendoVRAM
xor a
- ld [wcf2d], a
+ ld [wCopyingSGBTileData], a
ld de, PctTrnPacket
ld hl, BorderPalettes
- call Func_7210b
+ call CopyGfxToSuperNintendoVRAM
xor a
- ld [wcf2d], a
+ ld [wCopyingSGBTileData], a
ld de, PalTrnPacket
ld hl, SuperPalettes
- call Func_7210b
+ call CopyGfxToSuperNintendoVRAM
call ClearVram
ld hl, MaskEnCancelPacket
jp SendSGBPacket
-Func_72075: ; 72075 (1c:6075)
- ld hl, PointerTable_72089
- ld c, $9
-.asm_7207a
+PrepareSuperNintendoVRAMTransfer: ; 72075 (1c:6075)
+ ld hl, .packetPointers
+ ld c, 9
+.loop
push bc
ld a, [hli]
push hl
@@ -426,10 +436,11 @@ Func_72075: ; 72075 (1c:6075)
inc hl
pop bc
dec c
- jr nz, .asm_7207a
+ jr nz, .loop
ret
-PointerTable_72089: ; 72089 (1c:6089)
+.packetPointers
+; Only the first packet is needed.
dw MaskEnFreezePacket
dw DataSnd_72548
dw DataSnd_72558
@@ -441,17 +452,18 @@ PointerTable_72089: ; 72089 (1c:6089)
dw DataSnd_725b8
CheckSGB: ; 7209b (1c:609b)
+; Returns whether the game is running on an SGB in carry.
ld hl, MltReq2Packet
di
call SendSGBPacket
- ld a, $1
- ld [$fff9], a
+ ld a, 1
+ ld [hDisableJoypadPolling], a
ei
call Wait7000
ld a, [rJOYP]
and $3
cp $3
- jr nz, .asm_720fd
+ jr nz, .isSGB
ld a, $20
ld [rJOYP], a
ld a, [rJOYP]
@@ -482,50 +494,50 @@ CheckSGB: ; 7209b (1c:609b)
ld a, [rJOYP]
and $3
cp $3
- jr nz, .asm_720fd
- call Func_72102
+ jr nz, .isSGB
+ call SendMltReq1Packet
and a
ret
-.asm_720fd
- call Func_72102
+.isSGB
+ call SendMltReq1Packet
scf
ret
-Func_72102: ; 72102 (1c:6102)
+SendMltReq1Packet: ; 72102 (1c:6102)
ld hl, MltReq1Packet
call SendSGBPacket
jp Wait7000
-Func_7210b: ; 7210b (1c:610b)
+CopyGfxToSuperNintendoVRAM: ; 7210b (1c:610b)
di
push de
call DisableLCD
ld a, $e4
ld [rBGP], a
ld de, vChars1
- ld a, [wcf2d]
+ ld a, [wCopyingSGBTileData]
and a
- jr z, .asm_72122
- call Func_72188
- jr .asm_72128
-.asm_72122
+ jr z, .notCopyingTileData
+ call CopySGBBorderTiles
+ jr .next
+.notCopyingTileData
ld bc, $1000
call CopyData
-.asm_72128
+.next
ld hl, vBGMap0
ld de, $c
ld a, $80
ld c, $d
-.asm_72132
+.loop
ld b, $14
-.asm_72134
+.innerLoop
ld [hli], a
inc a
dec b
- jr nz, .asm_72134
+ jr nz, .innerLoop
add hl, de
dec c
- jr nz, .asm_72132
+ jr nz, .loop
ld a, $e3
ld [rLCDC], a
pop hl
@@ -548,27 +560,27 @@ Wait7000: ; 7214a (1c:614a)
jr nz, .loop
ret
-Func_72156: ; 72156 (1c:6156)
+SendSGBPackets: ; 72156 (1c:6156)
ld a, [wGBC]
and a
- jr z, .asm_72165
+ jr z, .notGBC
push de
- call Func_7216d
+ call InitGBCPalettes
pop hl
- call Func_72187
+ call EmptyFunc5
ret
-.asm_72165
+.notGBC
push de
call SendSGBPacket
pop hl
jp SendSGBPacket
-Func_7216d: ; 7216d (1c:616d)
- ld a, $80
- ld [$ff68], a
+InitGBCPalettes: ; 7216d (1c:616d)
+ ld a, $80 ; index 0 with auto-increment
+ ld [rBGPI], a
inc hl
ld c, $20
-.asm_72174
+.loop
ld a, [hli]
inc hl
add a
@@ -576,37 +588,48 @@ Func_7216d: ; 7216d (1c:616d)
add a
ld de, SuperPalettes
add e
- jr nc, .asm_72180
+ jr nc, .noCarry
inc d
-.asm_72180
+.noCarry
ld a, [de]
- ld [$ff69], a
+ ld [rBGPD], a
dec c
- jr nz, .asm_72174
+ jr nz, .loop
ret
-Func_72187: ; 72187 (1c:6187)
+EmptyFunc5: ; 72187 (1c:6187)
ret
-Func_72188: ; 72188 (1c:6188)
- ld b, $80
-.asm_7218a
- ld c, $10
-.asm_7218c
+CopySGBBorderTiles: ; 72188 (1c:6188)
+; SGB tile data is stored in a 4BPP planar format.
+; Each tile is 32 bytes. The first 16 bytes contain bit planes 1 and 2, while
+; the second 16 bytes contain bit planes 3 and 4.
+; This function converts 2BPP planar data into this format by mapping
+; 2BPP colors 0-3 to 4BPP colors 0-3. 4BPP colors 4-15 are not used.
+ ld b, 128
+
+.tileLoop
+
+; Copy bit planes 1 and 2 of the tile data.
+ ld c, 16
+.copyLoop
ld a, [hli]
ld [de], a
inc de
dec c
- jr nz, .asm_7218c
- ld c, $10
+ jr nz, .copyLoop
+
+; Zero bit planes 3 and 4.
+ ld c, 16
xor a
-.asm_72195
+.zeroLoop
ld [de], a
inc de
dec c
- jr nz, .asm_72195
+ jr nz, .zeroLoop
+
dec b
- jr nz, .asm_7218a
+ jr nz, .tileLoop
ret
INCLUDE "data/sgb_packets.asm"
diff --git a/engine/play_time.asm b/engine/play_time.asm
index 74da9c59..79deaf5e 100755
--- a/engine/play_time.asm
+++ b/engine/play_time.asm
@@ -3,37 +3,37 @@ TrackPlayTime: ; 18dee (6:4dee)
ld a, [wd732]
bit 0, a
ret z
- ld a, [W_PLAYTIMEMINUTES]
+ ld a, [wPlayTimeMaxed]
and a
ret nz
- ld a, [W_PLAYTIMEFRAMES]
+ ld a, [wPlayTimeFrames]
inc a
- ld [W_PLAYTIMEFRAMES], a
+ ld [wPlayTimeFrames], a
cp 60
ret nz
xor a
- ld [W_PLAYTIMEFRAMES], a
- ld a, [W_PLAYTIMESECONDS]
+ ld [wPlayTimeFrames], a
+ ld a, [wPlayTimeSeconds]
inc a
- ld [W_PLAYTIMESECONDS], a
+ ld [wPlayTimeSeconds], a
cp 60
ret nz
xor a
- ld [W_PLAYTIMESECONDS], a
- ld a, [W_PLAYTIMEMINUTES + 1]
+ ld [wPlayTimeSeconds], a
+ ld a, [wPlayTimeMinutes]
inc a
- ld [W_PLAYTIMEMINUTES + 1], a
+ ld [wPlayTimeMinutes], a
cp 60
ret nz
xor a
- ld [W_PLAYTIMEMINUTES + 1], a
- ld a, [W_PLAYTIMEHOURS + 1]
+ ld [wPlayTimeMinutes], a
+ ld a, [wPlayTimeHours]
inc a
- ld [W_PLAYTIMEHOURS + 1], a
+ ld [wPlayTimeHours], a
cp $ff
ret nz
ld a, $ff
- ld [W_PLAYTIMEMINUTES], a
+ ld [wPlayTimeMaxed], a
ret
CountDownIgnoreInputBitReset: ; 18e36 (6:4e36)
diff --git a/engine/pokedex_rating.asm b/engine/pokedex_rating.asm
index ca88673f..73025f0a 100755
--- a/engine/pokedex_rating.asm
+++ b/engine/pokedex_rating.asm
@@ -2,18 +2,18 @@ DisplayDexRating: ; 44169 (11:4169)
ld hl, wPokedexSeen
ld b, wPokedexSeenEnd - wPokedexSeen
call CountSetBits
- ld a, [wd11e] ; result of CountSetBits (seen count)
- ld [$FFDB], a
+ ld a, [wNumSetBits]
+ ld [hDexRatingNumMonsSeen], a
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
- ld a, [wd11e] ; result of CountSetBits (own count)
- ld [$FFDC], a
+ ld a, [wNumSetBits]
+ ld [hDexRatingNumMonsOwned], a
ld hl, DexRatingsTable
.findRating
ld a, [hli]
ld b, a
- ld a, [$FFDC] ; number of pokemon owned
+ ld a, [hDexRatingNumMonsOwned]
cp b
jr c, .foundRating
inc hl
@@ -24,30 +24,30 @@ DisplayDexRating: ; 44169 (11:4169)
ld h, [hl]
ld l, a ; load text pointer into hl
CheckAndResetEventA EVENT_HALL_OF_FAME_DEX_RATING
- jr nz, .label3
+ jr nz, .hallOfFame
push hl
ld hl, PokedexRatingText_441cc
call PrintText
pop hl
call PrintText
callba PlayPokedexRatingSfx
- jp WaitForTextScrollButtonPress ; wait for button press
-.label3
- ld de, wcc5b
- ld a, [$FFDB]
+ jp WaitForTextScrollButtonPress
+.hallOfFame
+ ld de, wDexRatingNumMonsSeen
+ ld a, [hDexRatingNumMonsSeen]
ld [de], a
inc de
- ld a, [$FFDC]
+ ld a, [hDexRatingNumMonsOwned]
ld [de], a
inc de
-.label4
+.copyRatingTextLoop
ld a, [hli]
- cp a, $50
- jr z, .label5
+ cp a, "@"
+ jr z, .doneCopying
ld [de], a
inc de
- jr .label4
-.label5
+ jr .copyRatingTextLoop
+.doneCopying
ld [de], a
ret
diff --git a/engine/predefs.asm b/engine/predefs.asm
index d8cf030c..16533751 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -80,7 +80,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef LoadTilesetHeader
add_predef LearnMoveFromLevelUp
add_predef LearnMove
- add_predef IsItemInBag_
+ add_predef GetQuantityOfItemInBag
dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0
dbw $03,GiveItem
add_predef ChangeBGPalColor0_4Frames
@@ -121,7 +121,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef SetPartyMonTypes
add_predef CanLearnTM
add_predef TMToMove
- add_predef Func_71ddf
+ add_predef _RunPaletteCommand
add_predef StarterDex ; 46
add_predef _AddPartyMon
add_predef UpdateHPBar2
diff --git a/engine/predefs17_2.asm b/engine/predefs17_2.asm
index a2dac120..c0df7d0a 100755
--- a/engine/predefs17_2.asm
+++ b/engine/predefs17_2.asm
@@ -8,8 +8,8 @@ SetPartyMonTypes: ; 5db5e (17:5b5e)
push hl
call GetMonHeader
pop hl
- ld a, [W_MONHTYPE1]
+ ld a, [wMonHType1]
ld [hli], a
- ld a, [W_MONHTYPE2]
+ ld a, [wMonHType2]
ld [hl], a
ret
diff --git a/engine/predefs7.asm b/engine/predefs7.asm
index bf31772c..c336eaa9 100755
--- a/engine/predefs7.asm
+++ b/engine/predefs7.asm
@@ -19,9 +19,9 @@ DisplayElevatorFloorMenu: ; 1c9c6 (7:49c6)
ld a, b
ld [wListScrollOffset], a
ret c
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 7, [hl]
- ld hl, wcc5b
+ ld hl, wElevatorWarpMaps
ld a, [wWhichPokemon]
add a
ld d, 0
diff --git a/engine/save.asm b/engine/save.asm
index dfc50616..e47be58a 100755
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -57,23 +57,23 @@ LoadSAV0: ; 73623 (1c:7623)
.checkSumsMatched
ld hl, sPlayerName
ld de, wPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, sMainData
- ld de, wPokedexOwned
- ld bc, sSpriteData - sMainData
+ ld de, wMainDataStart
+ ld bc, wMainDataEnd - wMainDataStart
call CopyData
- ld hl, W_CURMAPTILESET
+ ld hl, wCurMapTileset
set 7, [hl]
ld hl, sSpriteData
- ld de, wSpriteStateData1
- ld bc, sPartyData - sSpriteData
+ ld de, wSpriteDataStart
+ ld bc, wSpriteDataEnd - wSpriteDataStart
call CopyData
ld a, [sTilesetType]
ld [hTilesetType], a
ld hl, sCurBoxData
- ld de, W_NUMINBOX
- ld bc, wBoxMonNicksEnd - W_NUMINBOX
+ ld de, wBoxDataStart
+ ld bc, wBoxDataEnd - wBoxDataStart
call CopyData
and a
jp SAVGoodChecksum
@@ -92,8 +92,8 @@ LoadSAV1: ; 73690 (1c:7690)
cp c
jr nz, SAVBadCheckSum
ld hl, sCurBoxData
- ld de, W_NUMINBOX
- ld bc, wBoxMonNicksEnd - W_NUMINBOX
+ ld de, wBoxDataStart
+ ld bc, wBoxDataEnd - wBoxDataStart
call CopyData
and a
jp SAVGoodChecksum
@@ -112,8 +112,8 @@ LoadSAV2: ; 736bd (1c:76bd)
cp c
jp nz, SAVBadCheckSum
ld hl, sPartyData
- ld de, wPartyCount
- ld bc, wPokedexOwned - wPartyCount
+ ld de, wPartyDataStart
+ ld bc, wPartyDataEnd - wPartyDataStart
call CopyData
ld hl, sMainData
ld de, wPokedexOwned
@@ -203,19 +203,19 @@ SaveSAVtoSRAM0: ; 7378c (1c:778c)
ld [MBC1SRamBank], a
ld hl, wPlayerName
ld de, sPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
- ld hl, wPokedexOwned
+ ld hl, wMainDataStart
ld de, sMainData
- ld bc, W_NUMINBOX - wPokedexOwned
+ ld bc, wMainDataEnd - wMainDataStart
call CopyData
- ld hl, wSpriteStateData1
+ ld hl, wSpriteDataStart
ld de, sSpriteData
- ld bc, sPartyData - sSpriteData
+ ld bc, wSpriteDataEnd - wSpriteDataStart
call CopyData
- ld hl, W_NUMINBOX
+ ld hl, wBoxDataStart
ld de, sCurBoxData
- ld bc, wBoxMonNicksEnd - W_NUMINBOX
+ ld bc, wBoxDataEnd - wBoxDataStart
call CopyData
ld a, [hTilesetType]
ld [sTilesetType], a
@@ -235,9 +235,9 @@ SaveSAVtoSRAM1: ; 737e2 (1c:77e2)
ld a, $1
ld [MBC1SRamBankingMode], a
ld [MBC1SRamBank], a
- ld hl, W_NUMINBOX
+ ld hl, wBoxDataStart
ld de, sCurBoxData
- ld bc, wBoxMonNicksEnd - W_NUMINBOX
+ ld bc, wBoxDataEnd - wBoxDataStart
call CopyData
ld hl, sPlayerName
ld bc, sMainDataCheckSum - sPlayerName
@@ -254,9 +254,9 @@ SaveSAVtoSRAM2: ; 7380f (1c:780f)
ld a, $1
ld [MBC1SRamBankingMode], a
ld [MBC1SRamBank], a
- ld hl, wPartyCount
+ ld hl, wPartyDataStart
ld de, sPartyData
- ld bc, wPokedexOwned - wPartyCount
+ ld bc, wPartyDataEnd - wPartyDataStart
call CopyData
ld hl, wPokedexOwned ; pokédex only
ld de, sMainData
@@ -300,7 +300,7 @@ CalcIndividualBoxCheckSums: ; 73863 (1c:7863)
.loop
push bc
push de
- ld bc, wBoxMonNicksEnd - W_NUMINBOX
+ ld bc, wBoxDataEnd - wBoxDataStart
call SAVCheckSum
pop de
ld [de], a
@@ -356,20 +356,20 @@ ChangeBox:: ; 738a1 (1c:78a1)
call HandleMenuInput
ld hl, hFlags_0xFFF6
res 1, [hl]
- bit 1, a
+ bit 1, a ; pressed b
ret nz
call GetBoxSRAMLocation
ld e, l
ld d, h
- ld hl, W_NUMINBOX
+ ld hl, wBoxDataStart
call CopyBoxToOrFromSRAM ; copy old box from WRAM to SRAM
ld a, [wCurrentMenuItem]
set 7, a
ld [wCurrentBoxNum], a
call GetBoxSRAMLocation
- ld de, W_NUMINBOX
+ ld de, wBoxDataStart
call CopyBoxToOrFromSRAM ; copy new box from SRAM to WRAM
- ld hl, W_MAPTEXTPTR
+ ld hl, wMapTextPtr
ld de, wChangeBoxSavedMapTextPointer
ld a, [hli]
ld [de], a
@@ -398,7 +398,7 @@ CopyBoxToOrFromSRAM: ; 7390e (1c:790e)
ld [MBC1SRamBankingMode], a
ld a, b
ld [MBC1SRamBank], a
- ld bc, wBoxMonNicksEnd - W_NUMINBOX
+ ld bc, wBoxDataEnd - wBoxDataStart
call CopyData
pop hl
@@ -580,7 +580,7 @@ GetMonCountsForAllBoxes: ; 73a84 (1c:7a84)
ld c, a
ld b, 0
add hl, bc
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
ld [hl], a
ret
@@ -644,7 +644,7 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
call AddNTimes
ld e, l
ld d, h
- ld hl, wcc5b
+ ld hl, wHallOfFame
ld bc, HOF_TEAM
jr HallOfFame_Copy
@@ -653,7 +653,7 @@ SaveHallOfFameTeams: ; 73b0d (1c:7b0d)
ld de, sHallOfFame
ld bc, HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
call HallOfFame_Copy
- ld hl, wcc5b
+ ld hl, wHallOfFame
ld de, sHallOfFame + HOF_TEAM * (HOF_TEAM_CAPACITY - 1)
ld bc, HOF_TEAM
jr HallOfFame_Copy
@@ -663,7 +663,7 @@ LoadHallOfFameTeams: ; 73b3f (1c:7b3f)
ld bc, HOF_TEAM
ld a, [wHoFTeamIndex]
call AddNTimes
- ld de, wcc5b
+ ld de, wHallOfFame
ld bc, HOF_TEAM
; fallthrough
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index 3b392dde..b2917459 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -21,8 +21,8 @@ PromptUserToPlaySlots: ; 3730e (d:730e)
call GBPalWhiteOutWithDelay3
call LoadSlotMachineTiles
call LoadFontTilePatterns
- ld b, $5
- call GoPAL_SET
+ ld b, SET_PAL_SLOTS
+ call RunPaletteCommand
call GBPalNormal
ld a, $e4
ld [rOBP0], a
@@ -41,7 +41,7 @@ PromptUserToPlaySlots: ; 3730e (d:730e)
call GBPalWhiteOutWithDelay3
ld a, $1
ld [wUpdateSpritesEnabled], a
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
call ReloadMapSpriteTilePatterns
call ReloadTilesetTilePatterns
.done
@@ -411,7 +411,7 @@ SlotMachine_CheckForMatches: ; 37588 (d:7588)
call PrintText
.done
xor a
- ld [wc002], a
+ ld [wMuteAudioAndPauseMusic], a
ret
.rollWheel3DownByOneSymbol
call SlotMachine_AnimWheel3
@@ -654,7 +654,7 @@ SlotMachine_PrintPayoutCoins: ; 3775f (d:775f)
SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b)
ld a, $1
- ld [wc002], a
+ ld [wMuteAudioAndPauseMusic], a
call WaitForSoundToFinish
; Put 1 in the temp coins variable. This value is added to the player's coins
@@ -758,7 +758,7 @@ SlotMachine_AnimWheel1: ; 37813 (d:7813)
ld de, wSlotMachineWheel1Offset
ld hl, wOAMBuffer
ld a, $30
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
jr SlotMachine_AnimWheel
SlotMachine_AnimWheel2: ; 37823 (d:7823)
@@ -766,7 +766,7 @@ SlotMachine_AnimWheel2: ; 37823 (d:7823)
ld de, wSlotMachineWheel2Offset
ld hl, wOAMBuffer + $30
ld a, $50
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
jr SlotMachine_AnimWheel
SlotMachine_AnimWheel3: ; 37833 (d:7833)
@@ -774,11 +774,11 @@ SlotMachine_AnimWheel3: ; 37833 (d:7833)
ld de, wSlotMachineWheel3Offset
ld hl, wOAMBuffer + $60
ld a, $70
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
SlotMachine_AnimWheel: ; 37841 (d:7841)
ld a, $58
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
push de
ld a, [de]
ld d, b
@@ -787,17 +787,17 @@ SlotMachine_AnimWheel: ; 37841 (d:7841)
jr nc, .loop
inc d
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld [hli], a
ld a, [de]
ld [hli], a
ld a, $80
ld [hli], a
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add $8
ld [hli], a
ld a, [de]
@@ -806,9 +806,9 @@ SlotMachine_AnimWheel: ; 37841 (d:7841)
ld a, $80
ld [hli], a
inc de
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
sub $8
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
cp $28
jr nz, .loop
pop de
diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm
index df47275b..cbe19d6d 100755
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -1,6 +1,6 @@
-; copy text of fixed length $b (like player name, rival name, mon names, ...)
+; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...)
CopyFixedLengthText: ; 42b1 (1:42b1)
- ld bc, 11
+ ld bc, NAME_LENGTH
jp CopyData
SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
@@ -8,7 +8,7 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
ld de, wPlayerName
call CopyFixedLengthText
ld hl, SonyText
- ld de, W_RIVALNAME
+ ld de, wRivalName
call CopyFixedLengthText
xor a
ld [hWY], a
@@ -18,8 +18,8 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
ld [hli], a
ld [hl], a
ld a, BANK(Music_TitleScreen)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
DisplayTitleScreen: ; 42dd (1:42dd)
call GBPalWhiteOut
@@ -56,15 +56,8 @@ DisplayTitleScreen: ; 42dd (1:42dd)
ld a, BANK(PokemonLogoGraphics)
call FarCopyData2 ; second chunk
ld hl, Version_GFX
-IF DEF(_RED)
- ld de,vChars2 + $600
- ld bc,$50
-ENDC
-IF DEF(_BLUE)
- ld de,vChars2 + $600 + $10
- ld bc,$50 - $10
-ENDC
-
+ ld de,vChars2 + $600 - (Version_GFXEnd - Version_GFX - $50)
+ ld bc, Version_GFXEnd - Version_GFX
ld a, BANK(Version_GFX)
call FarCopyDataDouble
call ClearBothBGMaps
@@ -141,8 +134,8 @@ ENDC
call LoadScreenTilesFromBuffer2
ld a, vBGMap0 / $100
call TitleScreenCopyTileMapToVRAM
- ld b, $6
- call GoPAL_SET
+ ld b, SET_PAL_TITLE_SCREEN
+ call RunPaletteCommand
call GBPalNormal
ld a, %11100100
ld [rOBP0], a
@@ -219,10 +212,10 @@ ENDC
call Delay3
call WaitForSoundToFinish
ld a, MUSIC_TITLE_SCREEN
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
xor a
- ld [wcc5b], a
+ ld [wUnusedCC5B], a
; Keep scrolling in new mons indefinitely until the user performs input.
.awaitUserInterruptionLoop
@@ -317,7 +310,7 @@ ScrollTitleScreenGameVersion: ; 44cf (1:44cf)
DrawPlayerCharacter: ; 44dd (1:44dd)
ld hl, PlayerCharacterTitleGraphics
ld de, vSprites
- ld bc, $230
+ ld bc, PlayerCharacterTitleGraphicsEnd - PlayerCharacterTitleGraphics
ld a, BANK(PlayerCharacterTitleGraphics)
call FarCopyData2
call ClearSprites
@@ -377,7 +370,7 @@ LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
LoadCopyrightTiles: ; 4541 (1:4541)
ld de, NintendoCopyrightLogoGraphics
ld hl, vChars2 + $600
- lb bc, BANK(NintendoCopyrightLogoGraphics), $1c
+ lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10
call CopyVideoData
coord hl, 2, 7
ld de, CopyrightTextString
diff --git a/engine/town_map.asm b/engine/town_map.asm
index 037a59fa..727197de 100755
--- a/engine/town_map.asm
+++ b/engine/town_map.asm
@@ -7,7 +7,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
push hl
ld a, $1
ld [hJoy7], a
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
push af
ld b, $0
call DrawPlayerOrBirdSprite ; player sprite
@@ -20,7 +20,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
call CopyData
ld hl, vSprites + $40
ld de, TownMapCursor
- lb bc, BANK(TownMapCursor), $04
+ lb bc, BANK(TownMapCursor), (TownMapCursorEnd - TownMapCursor) / $8
call CopyVideoDataDouble
xor a
ld [wWhichTownMapLocation], a
@@ -107,6 +107,7 @@ INCLUDE "data/town_map_order.asm"
TownMapCursor: ; 70f40 (1c:4f40)
INCBIN "gfx/town_map_cursor.1bpp"
+TownMapCursorEnd:
LoadTownMap_Nest: ; 70f60 (1c:4f60)
call LoadTownMap
@@ -144,7 +145,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
call CopyVideoData
ld de, TownMapUpArrow
ld hl, vChars1 + $6d0
- lb bc, BANK(TownMapUpArrow), $01
+ lb bc, BANK(TownMapUpArrow), (TownMapUpArrowEnd - TownMapUpArrow) / $8
call CopyVideoDataDouble
call BuildFlyLocationsList
ld hl, wUpdateSpritesEnabled
@@ -155,7 +156,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
coord hl, 0, 0
ld de, ToText
call PlaceString
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, $0
call DrawPlayerOrBirdSprite
ld hl, wFlyLocationsList
@@ -249,9 +250,9 @@ BuildFlyLocationsList: ; 71070 (1c:5070)
ld hl, wFlyLocationsList - 1
ld [hl], $ff
inc hl
- ld a, [W_TOWNVISITEDFLAG]
+ ld a, [wTownVisitedFlag]
ld e, a
- ld a, [W_TOWNVISITEDFLAG + 1]
+ ld a, [wTownVisitedFlag + 1]
ld d, a
ld bc, SAFFRON_CITY + 1
.loop
@@ -271,6 +272,7 @@ BuildFlyLocationsList: ; 71070 (1c:5070)
TownMapUpArrow: ; 71093 (1c:5093)
INCBIN "gfx/up_arrow.1bpp"
+TownMapUpArrowEnd:
LoadTownMap: ; 7109b (1c:509b)
call GBPalWhiteOutWithDelay3
@@ -283,12 +285,12 @@ LoadTownMap: ; 7109b (1c:509b)
call DisableLCD
ld hl, WorldMapTileGraphics
ld de, vChars2 + $600
- ld bc, $100
+ ld bc, WorldMapTileGraphicsEnd - WorldMapTileGraphics
ld a, BANK(WorldMapTileGraphics)
call FarCopyData2
ld hl, MonNestIcon
ld de, vSprites + $40
- ld bc, $8
+ ld bc, MonNestIconEnd - MonNestIcon
ld a, BANK(MonNestIcon)
call FarCopyDataDouble
coord hl, 0, 0
@@ -312,8 +314,8 @@ LoadTownMap: ; 7109b (1c:509b)
jr .nextTile
.done
call EnableLCD
- ld b, $2
- call GoPAL_SET
+ ld b, SET_PAL_TOWN_MAP
+ call RunPaletteCommand
call Delay3
call GBPalNormal
xor a
@@ -336,7 +338,7 @@ ExitTownMap: ; 711ab (1c:51ab)
call LoadPlayerSpriteGraphics
call LoadFontTilePatterns
call UpdateSprites
- jp GoPAL_SET_CF1C
+ jp RunDefaultPaletteCommand
DrawPlayerOrBirdSprite: ; 711c4 (1c:51c4)
; a = map number
@@ -403,7 +405,7 @@ DisplayWildLocations: ; 711ef (1c:51ef)
call PlaceString
jr .done
.drawPlayerSprite
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, $0
call DrawPlayerOrBirdSprite
.done
@@ -442,8 +444,12 @@ WritePlayerOrBirdSpriteOAM: ; 7126d (1c:526d)
WriteTownMapSpriteOAM: ; 71279 (1c:5279)
push hl
+
+; Subtract 4 from c (X coord) and 4 from b (Y coord). However, the carry from c
+; is added to b, so the net result is that only 3 is subtracted from b.
lb hl, -4, -4
- add hl, bc ; subtract 4 from c (X coord) and 4 from b (Y coord)
+ add hl, bc
+
ld b, h
ld c, l
pop hl
@@ -467,14 +473,14 @@ WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
xor a
ld [hli], a
inc d
- ld a, $8
+ ld a, 8
add c
ld c, a
dec e
jr nz, .innerLoop
pop bc
pop de
- ld a, $8
+ ld a, 8
add b
ld b, a
dec d
@@ -582,6 +588,7 @@ INCLUDE "text/map_names.asm"
MonNestIcon: ; 716be (1c:56be)
INCBIN "gfx/mon_nest_icon.1bpp"
+MonNestIconEnd:
TownMapSpriteBlinkingAnimation: ; 716c6 (1c:56c6)
ld a, [wAnimCounter]
diff --git a/engine/trade.asm b/engine/trade.asm
index 1a0e5f61..1642e729 100755
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -18,14 +18,14 @@ ExternalClockTradeAnim: ; 410f3 (10:50f3)
ld de, ExternalClockTradeFuncSequence
TradeAnimCommon: ; 41102 (10:5102)
- ld a, [W_OPTIONS]
+ ld a, [wOptions]
push af
ld a, [hSCY]
push af
ld a, [hSCX]
push af
xor a
- ld [W_OPTIONS], a
+ ld [wOptions], a
ld [hSCY], a
ld [hSCX], a
push de
@@ -53,7 +53,7 @@ TradeAnimCommon: ; 41102 (10:5102)
pop af
ld [hSCY], a
pop af
- ld [W_OPTIONS], a
+ ld [wOptions], a
ret
addtradefunc: MACRO
@@ -149,7 +149,7 @@ Trade_Delay80: ; 41191 (10:5191)
Trade_ClearTileMap: ; 41196 (10:5196)
coord hl, 0, 0
- ld bc, 20 * 18
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
jp FillMemory
@@ -158,12 +158,12 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
call DisableLCD
ld hl, TradingAnimationGraphics
ld de, vChars2 + $310
- ld bc, $310
+ ld bc, TradingAnimationGraphicsEnd - TradingAnimationGraphics
ld a, BANK(TradingAnimationGraphics)
call FarCopyData2
ld hl, TradingAnimationGraphics2
ld de, vSprites + $7c0
- ld bc, $40
+ ld bc, TradingAnimationGraphics2End - TradingAnimationGraphics2
ld a, BANK(TradingAnimationGraphics2)
call FarCopyData2
ld hl, vBGMap0
@@ -190,7 +190,7 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
call GetMonName
ld hl, wcd6d
ld de, wcf4b
- ld bc, $b
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wTradedEnemyMonSpecies]
ld [wd11e], a
@@ -204,15 +204,15 @@ Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b)
Trade_SwapNames: ; 41217 (10:5217)
ld hl, wPlayerName
ld de, wBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wLinkEnemyTrainerName
ld de, wPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wBuffer
ld de, wLinkEnemyTrainerName
- ld bc, 11
+ ld bc, NAME_LENGTH
jp CopyData
Trade_Cleanup: ; 4123b (10:523b)
@@ -268,8 +268,8 @@ Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298)
call Trade_ClearTileMap
ld b, vBGMap0 / $100
call CopyScreenTileBufferToVRAM
- ld b, $8
- call GoPAL_SET
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
; This function call is pointless. It just copies blank tiles to VRAM that was
; already filled with blank tiles.
@@ -383,9 +383,9 @@ Trade_AnimLeftToRight: ; 41376 (10:5376)
ld a, $e4
ld [rOBP0], a
ld a, $54
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, $1c
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, [wLeftGBMonSpecies]
ld [wMonPartySpriteSpecies], a
call Trade_WriteCircledMonOAM
@@ -415,9 +415,9 @@ Trade_AnimRightToLeft: ; 413c6 (10:53c6)
xor a
ld [wTradedMonMovingRight], a
ld a, $64
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, $44
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, [wRightGBMonSpecies]
ld [wMonPartySpriteSpecies], a
call Trade_WriteCircledMonOAM
@@ -552,14 +552,14 @@ Trade_CopyCableTilesOffScreen: ; 414ae (10:54ae)
; continues when the screen is scrolled.
push hl
coord hl, 0, 4
- call CopyToScreenEdgeTiles
+ call CopyToRedrawRowOrColumnSrcTiles
pop hl
ld a, h
- ld [H_SCREENEDGEREDRAWADDR + 1], a
+ ld [hRedrawRowOrColumnDest + 1], a
ld a, l
- ld [H_SCREENEDGEREDRAWADDR], a
- ld a, REDRAWROW
- ld [H_SCREENEDGEREDRAW], a
+ ld [hRedrawRowOrColumnDest], a
+ ld a, REDRAW_ROW
+ ld [hRedrawRowOrColumnMode], a
ld c, 10
jp DelayFrames
@@ -622,10 +622,10 @@ Trade_AddOffsetsToOAMCoords: ; 41510 (10:5510)
ld hl, wOAMBuffer
ld c, $14
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
add [hl]
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add [hl]
ld [hli], a
inc hl
@@ -657,9 +657,9 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525)
lb bc, -4, 0 ; move left
.doAnim
ld a, b
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, c
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld d, $4
.loop
call Trade_AddOffsetsToOAMCoords
@@ -727,10 +727,10 @@ Trade_CircleOAM3: ; 4159c (10:559c)
Trade_LoadMonSprite: ; 415a4 (10:55a4)
ld [wcf91], a
ld [wd0b5], a
- ld [wcf1d], a
- ld b, $b
- ld c, $0
- call GoPAL_SET
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ ld c, 0
+ call RunPaletteCommand
ld a, [H_AUTOBGTRANSFERENABLED]
xor $1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -847,7 +847,7 @@ TradeforText: ; 41671 (10:5671)
db "@"
Trade_ShowAnimation: ; 41676 (10:5676)
- ld [W_ANIMATIONID], a
+ ld [wAnimationID], a
xor a
- ld [wcc5b], a
+ ld [wAnimationType], a
predef_jump MoveAnimation
diff --git a/home.asm b/home.asm
index 2753307b..2090e599 100644
--- a/home.asm
+++ b/home.asm
@@ -240,7 +240,7 @@ DrawHPBar:: ; 1336 (0:1336)
; loads pokemon data from one of multiple sources to wLoadedMon
-; loads base stats to W_MONHDEXNUM
+; loads base stats to wMonHeader
; INPUT:
; [wWhichPokemon] = index of pokemon within party/box
; [wMonDataLocation] = source
@@ -251,7 +251,7 @@ DrawHPBar:: ; 1336 (0:1336)
; OUTPUT:
; [wcf91] = pokemon ID
; wLoadedMon = base address of pokemon data
-; W_MONHDEXNUM = base address of base stats
+; wMonHeader = base address of base stats
LoadMonData:: ; 1372 (0:1372)
jpab LoadMonData_
@@ -268,7 +268,7 @@ OverwritewMoves:: ; 137a (0:137a)
LoadFlippedFrontSpriteByMonIndex:: ; 1384 (0:1384)
ld a, 1
- ld [W_SPRITEFLIPPED], a
+ ld [wSpriteFlipped], a
LoadFrontSpriteByMonIndex:: ; 1389 (0:1389)
push hl
@@ -304,7 +304,7 @@ LoadFrontSpriteByMonIndex:: ; 1389 (0:1389)
ld [hStartTileID], a
call CopyUncompressedPicToHL
xor a
- ld [W_SPRITEFLIPPED], a
+ ld [wSpriteFlipped], a
pop af
ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a
@@ -332,9 +332,9 @@ GetCryData:: ; 13d9 (0:13d9)
ld a, [hli]
ld b, a ; cry id
ld a, [hli]
- ld [wc0f1], a
+ ld [wFrequencyModifier], a
ld a, [hl]
- ld [wc0f2], a
+ ld [wTempoModifier], a
call BankswitchBack
; Cry headers have 3 channels,
@@ -551,7 +551,7 @@ GetwMoves:: ; 152e (0:152e)
ld a,[hl]
ret
-; copies the base stat data of a pokemon to W_MONHDEXNUM (W_MONHEADER)
+; copies the base stat data of a pokemon to wMonHeader
; INPUT:
; [wd0b5] = pokemon ID
GetMonHeader:: ; 1537 (0:1537)
@@ -586,12 +586,12 @@ GetMonHeader:: ; 1537 (0:1537)
ld bc,MonBaseStatsEnd - MonBaseStats
ld hl,BaseStats
call AddNTimes
- ld de,W_MONHEADER
+ ld de,wMonHeader
ld bc,MonBaseStatsEnd - MonBaseStats
call CopyData
jr .done
.specialID
- ld hl,W_MONHSPRITEDIM
+ ld hl,wMonHSpriteDim
ld [hl],b ; write sprite dimensions
inc hl
ld [hl],e ; write front sprite pointer
@@ -600,13 +600,13 @@ GetMonHeader:: ; 1537 (0:1537)
jr .done
.mew
ld hl,MewBaseStats
- ld de,W_MONHEADER
+ ld de,wMonHeader
ld bc,MonBaseStatsEnd - MonBaseStats
ld a,BANK(MewBaseStats)
call FarCopyData
.done
ld a,[wd0b5]
- ld [W_MONHDEXNUM],a
+ ld [wMonHIndex],a
pop af
ld [wd11e],a
pop hl
@@ -626,10 +626,10 @@ GetPartyMonName2:: ; 15b4 (0:15b4)
GetPartyMonName:: ; 15ba (0:15ba)
push hl
push bc
- call SkipFixedLengthTextEntries ; add 11 to hl, a times
+ call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times
ld de,wcd6d
push de
- ld bc,11
+ ld bc,NAME_LENGTH
call CopyData
pop de
pop bc
@@ -718,12 +718,12 @@ PrintBCDDigit:: ; 1604 (0:1604)
; assumes the corresponding mon header is already loaded
; hl contains offset to sprite pointer ($b for front or $d for back)
UncompressMonSprite:: ; 1627 (0:1627)
- ld bc,W_MONHEADER
+ ld bc,wMonHeader
add hl,bc
ld a,[hli]
- ld [W_SPRITEINPUTPTR],a ; fetch sprite input pointer
+ ld [wSpriteInputPtr],a ; fetch sprite input pointer
ld a,[hl]
- ld [W_SPRITEINPUTPTR+1],a
+ ld [wSpriteInputPtr+1],a
; define (by index number) the bank that a pokemon's image is in
; index = Mew, bank 1
; index = Kabutops fossil, bank $B
@@ -764,9 +764,9 @@ UncompressMonSprite:: ; 1627 (0:1627)
; de: destination location
LoadMonFrontSprite:: ; 1665 (0:1665)
push de
- ld hl, W_MONHFRONTSPRITE - W_MONHEADER
+ ld hl, wMonHFrontSprite - wMonHeader
call UncompressMonSprite
- ld hl, W_MONHSPRITEDIM
+ ld hl, wMonHSpriteDim
ld a, [hli]
ld c, a
pop de
@@ -810,15 +810,15 @@ LoadUncompressedSpriteData:: ; 1672 (0:1672)
ld [H_SPRITEOFFSET], a
xor a
ld [$4000], a
- ld hl, S_SPRITEBUFFER0
+ ld hl, sSpriteBuffer0
call ZeroSpriteBuffer ; zero buffer 0
- ld de, S_SPRITEBUFFER1
- ld hl, S_SPRITEBUFFER0
+ ld de, sSpriteBuffer1
+ ld hl, sSpriteBuffer0
call AlignSpriteDataCentered ; copy and align buffer 1 to 0 (containing the MSB of the 2bpp sprite)
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
call ZeroSpriteBuffer ; zero buffer 1
- ld de, S_SPRITEBUFFER2
- ld hl, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer2
+ ld hl, sSpriteBuffer1
call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite)
pop de
jp InterlaceMergeSpriteBuffers
@@ -869,9 +869,9 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
xor a
ld [$4000], a
push de
- ld hl, S_SPRITEBUFFER2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
- ld de, S_SPRITEBUFFER1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
- ld bc, S_SPRITEBUFFER0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0
+ ld hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
+ ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
+ ld bc, sSpriteBuffer0 + (SPRITEBUFFERSIZE - 1) ; source 1: end of buffer 0
ld a, SPRITEBUFFERSIZE/2 ; $c4
ld [H_SPRITEINTERLACECOUNTER], a
.interlaceLoop
@@ -891,11 +891,11 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
dec a
ld [H_SPRITEINTERLACECOUNTER], a
jr nz, .interlaceLoop
- ld a, [W_SPRITEFLIPPED]
+ ld a, [wSpriteFlipped]
and a
jr z, .notFlipped
ld bc, 2*SPRITEBUFFERSIZE
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
.swapLoop
swap [hl] ; if flipped swap nybbles in all bytes
inc hl
@@ -905,7 +905,7 @@ InterlaceMergeSpriteBuffers:: ; 16ea (0:16ea)
jr nz, .swapLoop
.notFlipped
pop hl
- ld de, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer1
ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied
ld a, [H_LOADEDROMBANK]
ld b, a
@@ -998,27 +998,27 @@ ResetPlayerSpriteData_ClearSpriteData:: ; 28c4 (0:28c4)
xor a
jp FillMemory
-Func_28cb:: ; 28cb (0:28cb)
- ld a, [wMusicHeaderPointer]
+FadeOutAudio:: ; 28cb (0:28cb)
+ ld a, [wAudioFadeOutControl]
and a
jr nz, .asm_28dc
ld a, [wd72c]
bit 1, a
ret nz
ld a, $77
- ld [$ff24], a
+ ld [rNR50], a
ret
.asm_28dc
- ld a, [wcfc9]
+ ld a, [wAudioFadeOutCounter]
and a
- jr z, .asm_28e7
+ jr z, .counterReachedZero
dec a
- ld [wcfc9], a
+ ld [wAudioFadeOutCounter], a
ret
-.asm_28e7
- ld a, [wcfc8]
- ld [wcfc9], a
- ld a, [$ff24]
+.counterReachedZero
+ ld a, [wAudioFadeOutCounterReloadValue]
+ ld [wAudioFadeOutCounter], a
+ ld a, [rNR50]
and a
jr z, .asm_2903
ld b, a
@@ -1031,20 +1031,20 @@ Func_28cb:: ; 28cb (0:28cb)
dec a
swap a
or c
- ld [$ff24], a
+ ld [rNR50], a
ret
.asm_2903
- ld a, [wMusicHeaderPointer]
+ ld a, [wAudioFadeOutControl]
ld b, a
xor a
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
- ld a, [wc0f0]
- ld [wc0ef], a
+ ld a, [wAudioSavedROMBank]
+ ld [wAudioROMBank], a
ld a, b
- ld [wc0ee], a
+ ld [wNewSoundID], a
jp PlaySound
; this function is used to display sign messages, sprite dialog, etc.
@@ -1057,12 +1057,12 @@ DisplayTextID:: ; 2920 (0:2920)
bit 0,[hl]
res 0,[hl]
jr nz,.skipSwitchToMapBank
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
call SwitchToMapRomBank
.skipSwitchToMapBank
ld a,30 ; half a second
ld [H_FRAMECOUNTER],a ; used as joypad poll timer
- ld hl,W_MAPTEXTPTR
+ ld hl,wMapTextPtr
ld a,[hli]
ld h,[hl]
ld l,a ; hl = map text pointer
@@ -1079,7 +1079,7 @@ DisplayTextID:: ; 2920 (0:2920)
jp z,DisplayPlayerBlackedOutText
cp a,TEXT_REPEL_WORE_OFF
jp z,DisplayRepelWoreOffText
- ld a,[W_NUMSPRITES]
+ ld a,[wNumSprites]
ld e,a
ld a,[hSpriteIndexOrTextID] ; sprite ID
cp e
@@ -1093,7 +1093,7 @@ DisplayTextID:: ; 2920 (0:2920)
callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction)
pop bc
pop de
- ld hl,W_MAPSPRITEDATA ; NPC text entries
+ ld hl,wMapSpriteData ; NPC text entries
ld a,[hSpriteIndexOrTextID]
dec a
add a
@@ -1157,7 +1157,7 @@ HoldTextDisplayOpen:: ; 29df (0:29df)
jr nz,HoldTextDisplayOpen
CloseTextDisplay:: ; 29e8 (0:29e8)
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
call SwitchToMapRomBank
ld a,$90
ld [hWY],a ; move the window off the screen
@@ -1292,7 +1292,7 @@ INCLUDE "engine/menu/start_menu.asm"
; hl = address of string of bytes
; b = length of string of bytes
; OUTPUT:
-; [wd11e] = number of set bits
+; [wNumSetBits] = number of set bits
CountSetBits:: ; 2b7f (0:2b7f)
ld c,0
.loop
@@ -1309,7 +1309,7 @@ CountSetBits:: ; 2b7f (0:2b7f)
dec b
jr nz,.loop
ld a,c
- ld [wd11e],a ; store number of set bits
+ ld [wNumSetBits],a
ret
; subtracts the amount the player paid from their money
@@ -1376,7 +1376,7 @@ DisplayListMenuID:: ; 2be6 (0:2be6)
ld [H_AUTOBGTRANSFERENABLED],a ; disable auto-transfer
ld a,1
ld [hJoy7],a ; joypad state update flag
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
and a ; is it the Old Man battle?
jr nz,.specialBattleType
ld a,$01 ; hardcoded bank
@@ -1432,7 +1432,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53)
ld a,1
ld [H_AUTOBGTRANSFERENABLED],a ; enable transfer
call Delay3
- ld a,[W_BATTLETYPE]
+ ld a,[wBattleType]
and a ; is it the Old Man battle?
jr z,.notOldManBattle
.oldManBattle
@@ -2043,7 +2043,7 @@ GetMoveName:: ; 3058 (0:3058)
ReloadMapData:: ; 3071 (0:3071)
ld a,[H_LOADEDROMBANK]
push af
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
call SwitchToMapRomBank
call DisableLCD
call LoadTextBoxTilePatterns
@@ -2059,7 +2059,7 @@ ReloadMapData:: ; 3071 (0:3071)
ReloadTilesetTilePatterns:: ; 3090 (0:3090)
ld a,[H_LOADEDROMBANK]
push af
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
call SwitchToMapRomBank
call DisableLCD
call LoadTilesetTilePatternData
@@ -2202,12 +2202,12 @@ EndNPCMovementScript:: ; 314e (0:314e)
EmptyFunc2:: ; 3156 (0:3156)
ret
-; stores hl in [W_TRAINERHEADERPTR]
+; stores hl in [wTrainerHeaderPtr]
StoreTrainerHeaderPointer:: ; 3157 (0:3157)
ld a, h
- ld [W_TRAINERHEADERPTR], a
+ ld [wTrainerHeaderPtr], a
ld a, l
- ld [W_TRAINERHEADERPTR+1], a
+ ld [wTrainerHeaderPtr+1], a
ret
; executes the current map script from the function pointer array provided in hl.
@@ -2219,16 +2219,16 @@ ExecuteCurMapScriptInTable:: ; 3160 (0:3160)
pop hl
pop af
push hl
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
bit 4, [hl]
res 4, [hl]
jr z, .useProvidedIndex ; test if map script index was overridden manually
- ld a, [W_CURMAPSCRIPT]
+ ld a, [wCurMapScript]
.useProvidedIndex
pop hl
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
call CallFunctionInTable
- ld a, [W_CURMAPSCRIPT]
+ ld a, [wCurMapScript]
ret
LoadGymLeaderAndCityName:: ; 317f (0:317f)
@@ -2238,10 +2238,10 @@ LoadGymLeaderAndCityName:: ; 317f (0:317f)
call CopyData ; load city name
pop hl
ld de, wGymLeaderName
- ld bc, $b
+ ld bc, NAME_LENGTH
jp CopyData ; load gym leader name
-; reads specific information from trainer header (pointed to at W_TRAINERHEADERPTR)
+; reads specific information from trainer header (pointed to at wTrainerHeaderPtr)
; a: offset in header data
; 0 -> flag's bit (into wTrainerHeaderFlagBit)
; 2 -> flag's byte ptr (into hl)
@@ -2253,7 +2253,7 @@ ReadTrainerHeaderInfo:: ; 3193 (0:3193)
push af
ld d, $0
ld e, a
- ld hl, W_TRAINERHEADERPTR
+ ld hl, wTrainerHeaderPtr
ld a, [hli]
ld l, [hl]
ld h, a
@@ -2317,14 +2317,14 @@ TalkToTrainer:: ; 31cc (0:31cc)
call ReadTrainerHeaderInfo ; read end battle text
pop de
call SaveEndBattleTextPointers
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
set 4, [hl] ; activate map script index override (index is set below)
ld hl, wFlags_0xcd60
bit 0, [hl] ; test if player is already engaging the trainer (because the trainer saw the player)
ret nz
; if the player talked to the trainer of his own volition
call EngageMapTrainer
- ld hl, W_CURMAPSCRIPT
+ ld hl, wCurMapScript
inc [hl] ; increment map script index before StartTrainerBattle increments it again (next script function is usually EndTrainerBattle)
jp StartTrainerBattle
@@ -2339,7 +2339,7 @@ CheckFightingMapTrainers:: ; 3219 (0:3219)
ld [wTrainerHeaderFlagBit], a
ret
.trainerEngaging
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
set 3, [hl]
ld [wEmotionBubbleSpriteIndex], a
xor a ; EXCLAMATION_BUBBLE
@@ -2350,7 +2350,7 @@ CheckFightingMapTrainers:: ; 3219 (0:3219)
xor a
ld [hJoyHeld], a
call TrainerWalkUpToPlayer_Bank0
- ld hl, W_CURMAPSCRIPT
+ ld hl, wCurMapScript
inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
ret
@@ -2374,19 +2374,19 @@ StartTrainerBattle:: ; 325d (0:325d)
set 7, [hl]
ld hl, wd72e
set 1, [hl]
- ld hl, W_CURMAPSCRIPT
+ ld hl, wCurMapScript
inc [hl] ; increment map script index (next script function is usually EndTrainerBattle)
ret
EndTrainerBattle:: ; 3275 (0:3275)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
ld hl, wd72d
res 7, [hl]
ld hl, wFlags_0xcd60
res 0, [hl] ; player is no longer engaged by any trainer
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, ResetButtonPressedAndMapScript
ld a, $2
@@ -2395,10 +2395,10 @@ EndTrainerBattle:: ; 3275 (0:3275)
ld c, a
ld b, FLAG_SET
call TrainerFlagAction ; flag trainer as fought
- ld a, [W_ENEMYMONORTRAINERCLASS]
- cp $c8
+ ld a, [wEnemyMonOrTrainerClass]
+ cp 200
jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite)
- ld hl, W_MISSABLEOBJECTLIST
+ ld hl, wMissableObjectList
ld de, $2
ld a, [wSpriteIndex]
call IsInArray ; search for sprite ID
@@ -2418,7 +2418,7 @@ ResetButtonPressedAndMapScript:: ; 32c1 (0:32c1)
ld [hJoyHeld], a
ld [hJoyPressed], a
ld [hJoyReleased], a
- ld [W_CURMAPSCRIPT], a ; reset battle status
+ ld [wCurMapScript], a ; reset battle status
ret
; calls TrainerWalkUpToPlayer
@@ -2428,15 +2428,15 @@ TrainerWalkUpToPlayer_Bank0:: ; 32cf (0:32cf)
; sets opponent type and mon set/lvl based on the engaging trainer data
InitBattleEnemyParameters:: ; 32d7 (0:32d7)
ld a, [wEngagedTrainerClass]
- ld [W_CUROPPONENT], a
- ld [W_ENEMYMONORTRAINERCLASS], a
- cp $c8
+ ld [wCurOpponent], a
+ ld [wEnemyMonOrTrainerClass], a
+ cp 200
ld a, [wEngagedTrainerSet]
jr c, .noTrainer
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
ret
.noTrainer
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ret
GetSpritePosition1:: ; 32ef (0:32ef)
@@ -2521,7 +2521,7 @@ SaveEndBattleTextPointers:: ; 3354 (0:3354)
; loads data of some trainer on the current map and plays pre-battle music
; [wSpriteIndex]: sprite ID of trainer who is engaged
EngageMapTrainer:: ; 336a (0:336a)
- ld hl, W_MAPSPRITEEXTRADATA
+ ld hl, wMapSpriteExtraData
ld d, $0
ld a, [wSpriteIndex]
dec a
@@ -2594,22 +2594,22 @@ CheckIfAlreadyEngaged:: ; 33dd (0:33dd)
PlayTrainerMusic:: ; 33e8 (0:33e8)
ld a, [wEngagedTrainerClass]
- cp $c8 + SONY1
+ cp OPP_SONY1
ret z
- cp $c8 + SONY2
+ cp OPP_SONY2
ret z
- cp $c8 + SONY3
+ cp OPP_SONY3
ret z
- ld a, [W_GYMLEADERNO]
+ ld a, [wGymLeaderNo]
and a
ret nz
xor a
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
ld a, $ff
call PlaySound
ld a, BANK(Music_MeetEvilTrainer)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, [wEngagedTrainerClass]
ld b, a
ld hl, EvilTrainerList
@@ -2634,7 +2634,7 @@ PlayTrainerMusic:: ; 33e8 (0:33e8)
.maleTrainer
ld a, MUSIC_MEET_MALE_TRAINER
.PlaySound
- ld [wc0ee], a
+ ld [wNewSoundID], a
jp PlaySound
INCLUDE "data/trainer_types.asm"
@@ -2706,7 +2706,7 @@ IsItemInBag:: ; 3493 (0:3493)
; set zero flag if item isn't in player's bag
; else reset zero flag
; related to Pokémon Tower and ghosts
- predef IsItemInBag_
+ predef GetQuantityOfItemInBag
ld a,b
and a
ret
@@ -2741,9 +2741,9 @@ SetSpriteImageIndexAfterSettingFacingDirection:: ; 34b9 (0:34b9)
; [wCoordIndex] = if there is match, the matching array index
; sets carry if the coordinates are in the array, clears carry if not
ArePlayerCoordsInArray:: ; 34bf (0:34bf)
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
ld b,a
- ld a,[W_XCOORD]
+ ld a,[wXCoord]
ld c,a
; fallthrough
@@ -2878,7 +2878,7 @@ GetSpriteMovementByte1Pointer:: ; 354e (0:354e)
; returns the sprite movement byte 2 pointer for sprite [H_SPRITEINDEX] in hl
GetSpriteMovementByte2Pointer:: ; 3558 (0:3558)
push de
- ld hl,W_MAPSPRITEDATA
+ ld hl,wMapSpriteData
ld a,[H_SPRITEINDEX]
dec a
add a
@@ -2895,7 +2895,7 @@ GetTrainerInformation:: ; 3566 (0:3566)
jr nz, .linkBattle
ld a, Bank(TrainerPicAndMoneyPointers)
call BankswitchHome
- ld a, [W_TRAINERCLASS]
+ ld a, [wTrainerClass]
dec a
ld hl, TrainerPicAndMoneyPointers
ld bc, $5
@@ -3092,13 +3092,13 @@ LoadFontTilePatterns::
.off
ld hl, FontGraphics
ld de, vFont
- ld bc, $400
+ ld bc, FontGraphicsEnd - FontGraphics
ld a, BANK(FontGraphics)
jp FarCopyDataDouble ; if LCD is off, transfer all at once
.on
ld de, FontGraphics
ld hl, vFont
- lb bc, BANK(FontGraphics), $80
+ lb bc, BANK(FontGraphics), (FontGraphicsEnd - FontGraphics) / $8
jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank
LoadTextBoxTilePatterns::
@@ -3108,13 +3108,13 @@ LoadTextBoxTilePatterns::
.off
ld hl, TextBoxGraphics
ld de, vChars2 + $600
- ld bc, $200
+ ld bc, TextBoxGraphicsEnd - TextBoxGraphics
ld a, BANK(TextBoxGraphics)
jp FarCopyData2 ; if LCD is off, transfer all at once
.on
ld de, TextBoxGraphics
ld hl, vChars2 + $600
- lb bc, BANK(TextBoxGraphics), $20
+ lb bc, BANK(TextBoxGraphics), (TextBoxGraphicsEnd - TextBoxGraphics) / $10
jp CopyVideoData ; if LCD is on, transfer during V-blank
LoadHpBarAndStatusTilePatterns::
@@ -3124,13 +3124,13 @@ LoadHpBarAndStatusTilePatterns::
.off
ld hl, HpBarAndStatusGraphics
ld de, vChars2 + $620
- ld bc, $1e0
+ ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics
ld a, BANK(HpBarAndStatusGraphics)
jp FarCopyData2 ; if LCD is off, transfer all at once
.on
ld de, HpBarAndStatusGraphics
ld hl, vChars2 + $620
- lb bc, BANK(HpBarAndStatusGraphics), $1e
+ lb bc, BANK(HpBarAndStatusGraphics), (HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics) / $10
jp CopyVideoData ; if LCD is on, transfer during V-blank
@@ -3151,7 +3151,7 @@ FillMemory::
UncompressSpriteFromDE:: ; 36eb (0:36eb)
; Decompress pic at a:de.
- ld hl, W_SPRITEINPUTPTR
+ ld hl, wSpriteInputPtr
ld [hl], e
inc hl
ld [hl], d
@@ -3167,7 +3167,7 @@ SaveScreenTilesToBuffer2:: ; 36f4 (0:36f4)
LoadScreenTilesFromBuffer2:: ; 3701 (0:3701)
call LoadScreenTilesFromBuffer2DisableBGTransfer
- ld a, $1
+ ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
ret
@@ -3177,7 +3177,7 @@ LoadScreenTilesFromBuffer2DisableBGTransfer:: ; 3709 (0:3709)
ld [H_AUTOBGTRANSFERENABLED], a
ld hl, wTileMapBackup2
coord de, 0, 0
- ld bc, $168
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData
ret
@@ -3194,7 +3194,7 @@ LoadScreenTilesFromBuffer1:: ; 3725 (0:3725)
coord de, 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call CopyData
- ld a, $1
+ ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
ret
@@ -3217,8 +3217,8 @@ WaitForSoundToFinish:: ; 3748 (0:3748)
and $80
ret nz
push hl
-.asm_374f
- ld hl, wc02a
+.waitLoop
+ ld hl, wChannelSoundIDs + CH4
xor a
or [hl]
inc hl
@@ -3226,7 +3226,7 @@ WaitForSoundToFinish:: ; 3748 (0:3748)
inc hl
inc hl
or [hl]
- jr nz, .asm_374f
+ jr nz, .waitLoop
pop hl
ret
@@ -3264,7 +3264,7 @@ GetName:: ; 376b (0:376b)
jr nz,.otherEntries
;1 = MON_NAMES
call GetMonName
- ld hl,11
+ ld hl,NAME_LENGTH
add hl,de
ld e,l
ld d,h
@@ -3313,9 +3313,9 @@ GetName:: ; 376b (0:376b)
call CopyData
.gotPtr
ld a,e
- ld [wcf8d],a
+ ld [wUnusedCF8D],a
ld a,d
- ld [wcf8e],a
+ ld [wUnusedCF8D + 1],a
pop de
pop bc
pop hl
@@ -3537,7 +3537,7 @@ PrintLetterDelay:: ; 38d3 (0:38d3)
ld a,[wLetterPrintingDelayFlags]
bit 0,a
jr z,.waitOneFrame
- ld a,[W_OPTIONS]
+ ld a,[wOptions]
and $f
ld [H_FRAMECOUNTER],a
jr .checkButtons
@@ -3627,7 +3627,7 @@ CalcStat:: ; 394a (0:394a)
ld a, b
ld d, a
push hl
- ld hl, W_MONHEADER
+ ld hl, wMonHeader
ld b, $0
add hl, bc
ld a, [hl] ; read base value of stat
@@ -3741,7 +3741,7 @@ CalcStat:: ; 394a (0:394a)
ld [H_MULTIPLICAND+1], a
xor a
ld [H_MULTIPLICAND], a
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld [H_MULTIPLIER], a
call Multiply ; ((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level
ld a, [H_MULTIPLICAND]
@@ -3759,7 +3759,7 @@ CalcStat:: ; 394a (0:394a)
cp $1
ld a, 5 ; + 5 for non-HP stat
jr nz, .notHPStat
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld b, a
ld a, [H_MULTIPLICAND+2]
add b
@@ -3825,12 +3825,12 @@ MoveMon:: ; 3a68 (0:3a68)
ld [MBC1RomBank], a
ret
-; skips a text entries, each of size 11 (like trainer name, OT name, rival name, ...)
-; hl: base pointer, will be incremented by $b * a
+; skips a text entries, each of size NAME_LENGTH (like trainer name, OT name, rival name, ...)
+; hl: base pointer, will be incremented by NAME_LENGTH * a
SkipFixedLengthTextEntries:: ; 3a7d (0:3a7d)
and a
ret z
- ld bc, 11
+ ld bc, NAME_LENGTH
.skipLoop
add hl, bc
dec a
@@ -4469,7 +4469,7 @@ RestoreScreenTilesAndReloadTilePatterns:: ; 3dbe (0:3dbe)
call ReloadMapSpriteTilePatterns
call LoadScreenTilesFromBuffer2
call LoadTextBoxTilePatterns
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
jr Delay3
@@ -4499,13 +4499,13 @@ GBPalWhiteOut::
ret
-GoPAL_SET_CF1C:: ; 3ded (0:3ded)
+RunDefaultPaletteCommand:: ; 3ded (0:3ded)
ld b,$ff
-GoPAL_SET:: ; 3def (0:3def)
+RunPaletteCommand:: ; 3def (0:3def)
ld a,[wOnSGB]
and a
ret z
- predef_jump Func_71ddf
+ predef_jump _RunPaletteCommand
GetHealthBarColor::
; Return at hl the palette of
@@ -4531,7 +4531,7 @@ ReloadMapSpriteTilePatterns:: ; 3e08 (0:3e08)
res 0, [hl]
push hl
xor a
- ld [W_SPRITESETID], a
+ ld [wSpriteSetID], a
call DisableLCD
callba InitMapSprites
call EnableLCD
@@ -4565,7 +4565,7 @@ GivePokemon::
ld a, b
ld [wcf91], a
ld a, c
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
jpba _GivePokemon
@@ -4637,7 +4637,7 @@ PrintPredefTextID:: ; 3ef5 (0:3ef5)
call DisplayTextID
RestoreMapTextPointer:: ; 3f05 (0:3f05)
- ld hl, W_MAPTEXTPTR
+ ld hl, wMapTextPtr
ld a, [$ffec]
ld [hli], a
ld a, [$ffec + 1]
@@ -4645,14 +4645,14 @@ RestoreMapTextPointer:: ; 3f05 (0:3f05)
ret
SetMapTextPointer:: ; 3f0f (0:3f0f)
- ld a, [W_MAPTEXTPTR]
+ ld a, [wMapTextPtr]
ld [$ffec], a
- ld a, [W_MAPTEXTPTR + 1]
+ ld a, [wMapTextPtr + 1]
ld [$ffec + 1], a
ld a, l
- ld [W_MAPTEXTPTR], a
+ ld [wMapTextPtr], a
ld a, h
- ld [W_MAPTEXTPTR + 1], a
+ ld [wMapTextPtr + 1], a
ret
TextPredefs::
@@ -4714,9 +4714,9 @@ TextPredefs::
add_tx_pre FightingDojoText_52a1d ; 38
add_tx_pre NewBicycleText ; 39
add_tx_pre IndigoPlateauStatues ; 3A
- add_tx_pre VermilionGymTrashSuccesText1 ; 3B
- add_tx_pre VermilionGymTrashSuccesText2 ; 3C XXX unused
- add_tx_pre VermilionGymTrashSuccesText3 ; 3D
+ add_tx_pre VermilionGymTrashSuccessText1 ; 3B
+ add_tx_pre VermilionGymTrashSuccessText2 ; 3C XXX unused
+ add_tx_pre VermilionGymTrashSuccessText3 ; 3D
add_tx_pre VermilionGymTrashFailText ; 3E
add_tx_pre TownMapText ; 3F
add_tx_pre BookOrSculptureText ; 40
diff --git a/home/audio.asm b/home/audio.asm
index 033f4067..2c46ec7a 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -3,112 +3,139 @@ PlayDefaultMusic:: ; 2307 (0:2307)
xor a
ld c, a
ld d, a
- ld [wcfca], a
- jr Func_2324
+ ld [wLastMusicSoundID], a
+ jr PlayDefaultMusicCommon
-Func_2312:: ; 2312 (0:2312)
- ld c, $a
- ld d, $0
+PlayDefaultMusicFadeOutCurrent:: ; 2312 (0:2312)
+; Fade out the current music and then play the default music.
+ ld c, 10
+ ld d, 0
ld a, [wd72e]
- bit 5, a
- jr z, Func_2324
+ bit 5, a ; has a battle just ended?
+ jr z, PlayDefaultMusicCommon
xor a
- ld [wcfca], a
- ld c, $8
+ ld [wLastMusicSoundID], a
+ ld c, 8
ld d, c
-Func_2324:: ; 2324 (0:2324)
+
+PlayDefaultMusicCommon:: ; 2324 (0:2324)
ld a, [wWalkBikeSurfState]
and a
- jr z, .asm_2343
+ jr z, .walking
cp $2
- jr z, .asm_2332
+ jr z, .surfing
ld a, MUSIC_BIKE_RIDING
- jr .asm_2334
-.asm_2332
+ jr .next
+
+.surfing
ld a, MUSIC_SURFING
-.asm_2334
+
+.next
ld b, a
ld a, d
- and a
+ and a ; should current music be faded out first?
ld a, BANK(Music_BikeRiding)
- jr nz, .asm_233e
- ld [wc0ef], a
-.asm_233e
- ld [wc0f0], a
- jr .asm_234c
-.asm_2343
- ld a, [wd35b]
+ jr nz, .next2
+
+; Only change the audio ROM bank if the current music isn't going to be faded
+; out before the default music begins.
+ ld [wAudioROMBank], a
+
+.next2
+; [wAudioSavedROMBank] will be copied to [wAudioROMBank] after fading out the
+; current music (if the current music is faded out).
+ ld [wAudioSavedROMBank], a
+ jr .next3
+
+.walking
+ ld a, [wMapMusicSoundID]
ld b, a
- call Func_2385
- jr c, .asm_2351
-.asm_234c
- ld a, [wcfca]
- cp b
- ret z
-.asm_2351
+ call CompareMapMusicBankWithCurrentBank
+ jr c, .next4
+
+.next3
+ ld a, [wLastMusicSoundID]
+ cp b ; is the default music already playing?
+ ret z ; if so, do nothing
+
+.next4
ld a, c
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
ld a, b
- ld [wcfca], a
- ld [wc0ee], a
+ ld [wLastMusicSoundID], a
+ ld [wNewSoundID], a
jp PlaySound
-Func_235f:: ; 235f (0:235f)
- ld a, [wc0ef]
+UpdateMusic6Times:: ; 235f (0:235f)
+; This is called when entering a map, before fading out the current music and
+; playing the default music (i.e. the map's music or biking/surfing music).
+ ld a, [wAudioROMBank]
ld b, a
cp BANK(Audio1_UpdateMusic)
jr nz, .checkForAudio2
-.audio1
+
+; audio 1
ld hl, Audio1_UpdateMusic
- jr .asm_2378
+ jr .next
+
.checkForAudio2
cp BANK(Audio2_UpdateMusic)
jr nz, .audio3
-.audio2
+
+; audio 2
ld hl, Audio2_UpdateMusic
- jr .asm_2378
+ jr .next
+
.audio3
ld hl, Audio3_UpdateMusic
-.asm_2378
- ld c, $6
-.asm_237a
+
+.next
+ ld c, 6
+.loop
push bc
push hl
call Bankswitch
pop hl
pop bc
dec c
- jr nz, .asm_237a
+ jr nz, .loop
ret
-Func_2385:: ; 2385 (0:2385)
- ld a, [wd35c]
+CompareMapMusicBankWithCurrentBank:: ; 2385 (0:2385)
+; Compares the map music's audio ROM bank with the current audio ROM bank
+; and updates the audio ROM bank variables.
+; Returns whether the banks are different in carry.
+ ld a, [wMapMusicROMBank]
ld e, a
- ld a, [wc0ef]
+ ld a, [wAudioROMBank]
cp e
- jr nz, .asm_2394
- ld [wc0f0], a
+ jr nz, .differentBanks
+ ld [wAudioSavedROMBank], a
and a
ret
-.asm_2394
- ld a, c
+.differentBanks
+ ld a, c ; this is a fade-out counter value and it's always non-zero
and a
ld a, e
- jr nz, .asm_239c
- ld [wc0ef], a
-.asm_239c
- ld [wc0f0], a
+ jr nz, .next
+; If the fade-counter is non-zero, we don't change the audio ROM bank because
+; it's needed to keep playing the music as it fades out. The FadeOutAudio
+; routine will take care of copying [wAudioSavedROMBank] to [wAudioROMBank]
+; when the music has faded out.
+ ld [wAudioROMBank], a
+.next
+ ld [wAudioSavedROMBank], a
scf
ret
PlayMusic:: ; 23a1 (0:23a1)
ld b, a
- ld [wc0ee], a
+ ld [wNewSoundID], a
xor a
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
ld a, c
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, b
; plays music specified by a. If value is $ff, music is stopped
@@ -117,66 +144,74 @@ PlaySound:: ; 23b1 (0:23b1)
push de
push bc
ld b, a
- ld a, [wc0ee]
+ ld a, [wNewSoundID]
and a
- jr z, .asm_23c8
+ jr z, .next
xor a
- ld [wc02a], a
- ld [wc02b], a
- ld [wc02c], a
- ld [wc02d], a
-.asm_23c8
- ld a, [wMusicHeaderPointer]
- and a
- jr z, .asm_23e3
- ld a, [wc0ee]
- and a
- jr z, .asm_2425
+ ld [wChannelSoundIDs + CH4], a
+ ld [wChannelSoundIDs + CH5], a
+ ld [wChannelSoundIDs + CH6], a
+ ld [wChannelSoundIDs + CH7], a
+.next
+ ld a, [wAudioFadeOutControl]
+ and a ; has a fade-out length been specified?
+ jr z, .noFadeOut
+ ld a, [wNewSoundID]
+ and a ; is the new sound ID 0?
+ jr z, .done ; if so, do nothing
xor a
- ld [wc0ee], a
- ld a, [wcfca]
- cp $ff
- jr nz, .asm_2414
+ ld [wNewSoundID], a
+ ld a, [wLastMusicSoundID]
+ cp $ff ; has the music been stopped?
+ jr nz, .fadeOut ; if not, fade out the current music
+; If it has been stopped, start playing the new music immediately.
xor a
- ld [wMusicHeaderPointer], a
-.asm_23e3
+ ld [wAudioFadeOutControl], a
+.noFadeOut
xor a
- ld [wc0ee], a
+ ld [wNewSoundID], a
ld a, [H_LOADEDROMBANK]
- ld [$ffb9], a
- ld a, [wc0ef]
+ ld [hSavedROMBank], a
+ ld a, [wAudioROMBank]
ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a
- cp BANK(Audio1_9876)
+ cp BANK(Audio1_PlaySound)
jr nz, .checkForAudio2
-.audio1
+
+; audio 1
ld a, b
- call Audio1_9876
- jr .asm_240b
+ call Audio1_PlaySound
+ jr .next2
+
.checkForAudio2
- cp BANK(Audio2_22035)
+ cp BANK(Audio2_PlaySound)
jr nz, .audio3
-.audio2
+
+; audio 2
ld a, b
- call Audio2_22035
- jr .asm_240b
+ call Audio2_PlaySound
+ jr .next2
+
.audio3
ld a, b
- call Audio3_7d8ea
-.asm_240b
- ld a, [$ffb9]
+ call Audio3_PlaySound
+
+.next2
+ ld a, [hSavedROMBank]
ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a
- jr .asm_2425
-.asm_2414
+ jr .done
+
+.fadeOut
ld a, b
- ld [wcfca], a
- ld a, [wMusicHeaderPointer]
- ld [wcfc8], a
- ld [wcfc9], a
+ ld [wLastMusicSoundID], a
+ ld a, [wAudioFadeOutControl]
+ ld [wAudioFadeOutCounterReloadValue], a
+ ld [wAudioFadeOutCounter], a
ld a, b
- ld [wMusicHeaderPointer], a
-.asm_2425
+ ld [wAudioFadeOutControl], a
+
+.done
pop bc
pop de
pop hl
diff --git a/home/init.asm b/home/init.asm
index 624a4d6a..cb5c6583 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -98,8 +98,8 @@ rLCDC_DEFAULT EQU %11100011
predef LoadSGB
ld a, BANK(SFX_Shooting_Star)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, $9c
ld [H_AUTOBGTRANSFERDEST + 1], a
xor a
@@ -127,11 +127,11 @@ ClearVram:
StopAllSounds::
ld a, BANK(Audio1_UpdateMusic)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
xor a
- ld [wMusicHeaderPointer], a
- ld [wc0ee], a
- ld [wcfca], a
+ ld [wAudioFadeOutControl], a
+ ld [wNewSoundID], a
+ ld [wLastMusicSoundID], a
dec a
jp PlaySound
diff --git a/home/overworld.asm b/home/overworld.asm
index f8d6e7e1..e4f58d4a 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -32,7 +32,7 @@ EnterMap::
ld hl, wd72d
res 5, [hl]
call UpdateSprites
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
xor a
@@ -61,7 +61,7 @@ OverworldLoopLessDelay::
ld a,[wd732]
and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp
jp nz,HandleFlyWarpOrDungeonWarp
- ld a,[W_CUROPPONENT]
+ ld a,[wCurOpponent]
and a
jp nz,.newBattle
ld a,[wd730]
@@ -115,17 +115,17 @@ OverworldLoopLessDelay::
jr z,.changeMap
; XXX can this code be reached?
predef LoadSAV
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
ld [wDestinationMap],a
call SpecialWarpIn
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
call SwitchToMapRomBank ; switch to the ROM bank of the current map
- ld hl,W_CURMAPTILESET
+ ld hl,wCurMapTileset
set 7,[hl]
.changeMap
jp EnterMap
.checkForOpponent
- ld a,[W_CUROPPONENT]
+ ld a,[wCurOpponent]
and a
jp nz,.newBattle
jp OverworldLoop
@@ -300,7 +300,7 @@ OverworldLoopLessDelay::
and a
jp nz,WarpFound2
.notSafariZone
- ld a,[W_ISINBATTLE]
+ ld a,[wIsInBattle]
and a
jp nz,CheckWarpsNoCollision
predef ApplyOutOfBattlePoisonDamage ; also increment daycare mon exp
@@ -315,21 +315,21 @@ OverworldLoopLessDelay::
.battleOccurred
ld hl,wd72d
res 6,[hl]
- ld hl,W_FLAGS_D733
+ ld hl,wFlags_D733
res 3,[hl]
- ld hl,wd126
+ ld hl,wCurrentMapScriptFlags
set 5,[hl]
set 6,[hl]
xor a
ld [hJoyHeld],a
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,CINNABAR_GYM
jr nz,.notCinnabarGym
SetEvent EVENT_2A7
.notCinnabarGym
ld hl,wd72e
set 5,[hl]
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,OAKS_LAB
jp z,.noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab
callab AnyPartyAlive
@@ -342,7 +342,7 @@ OverworldLoopLessDelay::
jp EnterMap
.allPokemonFainted
ld a,$ff
- ld [W_ISINBATTLE],a
+ ld [wIsInBattle],a
call RunMapScript
jp HandleBlackOut
@@ -367,7 +367,7 @@ BikeSpeedup:: ; 06a0 (0:06a0)
ld a,[wNPCMovementScriptPointerTableNum]
and a
ret nz
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,ROUTE_17 ; Cycling Road
jr nz,.goFaster
ld a,[hJoyHeld]
@@ -384,9 +384,9 @@ CheckWarpsNoCollision:: ; 06b4 (0:06b4)
ld a,[wNumberOfWarps]
ld b,0
ld c,a
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
ld d,a
- ld a,[W_XCOORD]
+ ld a,[wXCoord]
ld e,a
ld hl,wWarpEntries
CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc)
@@ -412,7 +412,7 @@ CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc)
pop hl
jr nc,CheckWarpsNoCollisionRetry2
; if the extra check passed
- ld a,[W_FLAGS_D733]
+ ld a,[wFlags_D733]
bit 2,a
jr nz,WarpFound1
push de
@@ -433,12 +433,12 @@ CheckWarpsCollision:: ; 0706 (0:0706)
.loop
ld a,[hli] ; Y coordinate of warp
ld b,a
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
cp b
jr nz,.retry1
ld a,[hli] ; X coordinate of warp
ld b,a
- ld a,[W_XCOORD]
+ ld a,[wXCoord]
cp b
jr nz,.retry2
ld a,[hli]
@@ -472,17 +472,17 @@ WarpFound2:: ; 073c (0:073c)
ld a,[wNumberOfWarps]
sub c
ld [wWarpedFromWhichWarp],a ; save ID of used warp
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
ld [wWarpedFromWhichMap],a
call CheckIfInOutsideMap
jr nz,.indoorMaps
; this is for handling "outside" maps that can't have the 0xFF destination map
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
ld [wLastMap],a
- ld a,[W_CURMAPWIDTH]
+ ld a,[wCurMapWidth]
ld [wUnusedD366],a ; not read
ld a,[hWarpDestinationMap]
- ld [W_CURMAP],a
+ ld [wCurMap],a
cp a,ROCK_TUNNEL_1
jr nz,.notRockTunnel
ld a,$06
@@ -497,7 +497,7 @@ WarpFound2:: ; 073c (0:073c)
cp a,$ff
jr z,.goBackOutside
; if not going back to the previous map
- ld [W_CURMAP],a
+ ld [wCurMap],a
callba IsPlayerStandingOnWarpPadOrHole
ld a,[wStandingOnWarpPadOrHole]
dec a ; is the player on a warp pad?
@@ -516,7 +516,7 @@ WarpFound2:: ; 073c (0:073c)
jr .done
.goBackOutside
ld a,[wLastMap]
- ld [W_CURMAP],a
+ ld [wCurMap],a
call PlayMapChangeSound
xor a
ld [wMapPalOffset],a
@@ -534,19 +534,19 @@ ContinueCheckWarpsNoCollisionLoop:: ; 07b5 (0:07b5)
; if no matching warp was found
CheckMapConnections:: ; 07ba (0:07ba)
.checkWestMap
- ld a,[W_XCOORD]
+ ld a,[wXCoord]
cp a,$ff
jr nz,.checkEastMap
- ld a,[W_MAPCONN3PTR]
- ld [W_CURMAP],a
+ ld a,[wMapConn3Ptr]
+ ld [wCurMap],a
ld a,[wWestConnectedMapXAlignment] ; new X coordinate upon entering west map
- ld [W_XCOORD],a
- ld a,[W_YCOORD]
+ ld [wXCoord],a
+ ld a,[wYCoord]
ld c,a
ld a,[wWestConnectedMapYAlignment] ; Y adjustment upon entering west map
add c
ld c,a
- ld [W_YCOORD],a
+ ld [wYCoord],a
ld a,[wWestConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position
ld l,a
ld a,[wWestConnectedMapViewPointer + 1]
@@ -555,10 +555,10 @@ CheckMapConnections:: ; 07ba (0:07ba)
jr z,.savePointer1
.pointerAdjustmentLoop1
ld a,[wWestConnectedMapWidth] ; width of connected map
- add a,$06
+ add a,MAP_BORDER * 2
ld e,a
- ld d,$00
- ld b,$00
+ ld d,0
+ ld b,0
add hl,de
dec c
jr nz,.pointerAdjustmentLoop1
@@ -573,16 +573,16 @@ CheckMapConnections:: ; 07ba (0:07ba)
ld a,[wCurrentMapWidth2] ; map width
cp b
jr nz,.checkNorthMap
- ld a,[W_MAPCONN4PTR]
- ld [W_CURMAP],a
+ ld a,[wMapConn4Ptr]
+ ld [wCurMap],a
ld a,[wEastConnectedMapXAlignment] ; new X coordinate upon entering east map
- ld [W_XCOORD],a
- ld a,[W_YCOORD]
+ ld [wXCoord],a
+ ld a,[wYCoord]
ld c,a
ld a,[wEastConnectedMapYAlignment] ; Y adjustment upon entering east map
add c
ld c,a
- ld [W_YCOORD],a
+ ld [wYCoord],a
ld a,[wEastConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for Y position
ld l,a
ld a,[wEastConnectedMapViewPointer + 1]
@@ -591,10 +591,10 @@ CheckMapConnections:: ; 07ba (0:07ba)
jr z,.savePointer2
.pointerAdjustmentLoop2
ld a,[wEastConnectedMapWidth]
- add a,$06
+ add a,MAP_BORDER * 2
ld e,a
- ld d,$00
- ld b,$00
+ ld d,0
+ ld b,0
add hl,de
dec c
jr nz,.pointerAdjustmentLoop2
@@ -605,19 +605,19 @@ CheckMapConnections:: ; 07ba (0:07ba)
ld [wCurrentTileBlockMapViewPointer + 1],a
jp .loadNewMap
.checkNorthMap
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
cp a,$ff
jr nz,.checkSouthMap
- ld a,[W_MAPCONN1PTR]
- ld [W_CURMAP],a
+ ld a,[wMapConn1Ptr]
+ ld [wCurMap],a
ld a,[wNorthConnectedMapYAlignment] ; new Y coordinate upon entering north map
- ld [W_YCOORD],a
- ld a,[W_XCOORD]
+ ld [wYCoord],a
+ ld a,[wXCoord]
ld c,a
ld a,[wNorthConnectedMapXAlignment] ; X adjustment upon entering north map
add c
ld c,a
- ld [W_XCOORD],a
+ ld [wXCoord],a
ld a,[wNorthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position
ld l,a
ld a,[wNorthConnectedMapViewPointer + 1]
@@ -635,16 +635,16 @@ CheckMapConnections:: ; 07ba (0:07ba)
ld a,[wCurrentMapHeight2]
cp b
jr nz,.didNotEnterConnectedMap
- ld a,[W_MAPCONN2PTR]
- ld [W_CURMAP],a
+ ld a,[wMapConn2Ptr]
+ ld [wCurMap],a
ld a,[wSouthConnectedMapYAlignment] ; new Y coordinate upon entering south map
- ld [W_YCOORD],a
- ld a,[W_XCOORD]
+ ld [wYCoord],a
+ ld a,[wXCoord]
ld c,a
ld a,[wSouthConnectedMapXAlignment] ; X adjustment upon entering south map
add c
ld c,a
- ld [W_XCOORD],a
+ ld [wXCoord],a
ld a,[wSouthConnectedMapViewPointer] ; pointer to upper left corner of map without adjustment for X position
ld l,a
ld a,[wSouthConnectedMapViewPointer + 1]
@@ -658,9 +658,9 @@ CheckMapConnections:: ; 07ba (0:07ba)
ld [wCurrentTileBlockMapViewPointer + 1],a
.loadNewMap ; load the connected map that was entered
call LoadMapHeader
- call Func_2312 ; music
- ld b,$09
- call GoPAL_SET
+ call PlayDefaultMusicFadeOutCurrent
+ ld b, SET_PAL_OVERWORLD
+ call RunPaletteCommand
; Since the sprite set shouldn't change, this will just update VRAM slots at
; $C2XE without loading any tile patterns.
callba InitMapSprites
@@ -687,7 +687,7 @@ PlayMapChangeSound:: ; 08c9 (0:08c9)
CheckIfInOutsideMap:: ; 08e1 (0:08e1)
; If the player is in an outside map (a town or route), set the z flag
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
and a ; most towns/routes have tileset 0 (OVERWORLD)
ret z
cp PLATEAU ; Route 23 / Indigo Plateau
@@ -700,7 +700,7 @@ CheckIfInOutsideMap:: ; 08e1 (0:08e1)
; "function 2" passes when the the tile in front of the player is among a certain set
; sets carry if the check passes, otherwise clears carry
ExtraWarpCheck:: ; 08e9 (0:08e9)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SS_ANNE_3
jr z, .useFunction1
cp ROCKET_HIDEOUT_1
@@ -711,7 +711,7 @@ ExtraWarpCheck:: ; 08e9 (0:08e9)
jr z, .useFunction2
cp ROCK_TUNNEL_1
jr z, .useFunction2
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
and a ; outside tileset (OVERWORLD)
jr z, .useFunction2
cp SHIP ; S.S. Anne tileset
@@ -750,16 +750,16 @@ HandleBlackOut::
ld [MBC1RomBank], a
call ResetStatusAndHalveMoneyOnBlackout
call SpecialWarpIn
- call Func_2312
+ call PlayDefaultMusicFadeOutCurrent
jp SpecialEnterMap
StopMusic::
- ld [wMusicHeaderPointer], a
+ ld [wAudioFadeOutControl], a
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
.wait
- ld a, [wMusicHeaderPointer]
+ ld a, [wAudioFadeOutControl]
and a
jr nz, .wait
jp StopAllSounds
@@ -770,7 +770,7 @@ HandleFlyWarpOrDungeonWarp::
xor a
ld [wBattleResult], a
ld [wWalkBikeSurfState], a
- ld [W_ISINBATTLE], a
+ ld [wIsInBattle], a
ld [wMapPalOffset], a
ld hl, wd732
set 2, [hl] ; fly warp or dungeon warp
@@ -828,13 +828,13 @@ IsBikeRidingAllowed::
; or maps with tilesets in BikeRidingTilesets.
; Return carry if biking is allowed.
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp ROUTE_23
jr z, .allowed
cp INDIGO_PLATEAU
jr z, .allowed
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
ld b, a
ld hl, BikeRidingTilesets
.loop
@@ -854,13 +854,13 @@ INCLUDE "data/bike_riding_tilesets.asm"
; load the tile pattern data of the current tileset into VRAM
LoadTilesetTilePatternData:: ; 09e8 (0:09e8)
- ld a,[W_TILESETGFXPTR]
+ ld a,[wTileSetGFXPtr]
ld l,a
- ld a,[W_TILESETGFXPTR + 1]
+ ld a,[wTileSetGFXPtr + 1]
ld h,a
ld de,vTileset
ld bc,$600
- ld a,[W_TILESETBANK]
+ ld a,[wTileSetBank]
jp FarCopyData2
; this loads the current maps complete tile map (which references blocks, not individual tiles) to C6E8
@@ -881,23 +881,23 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
; load tile map of current map (made of tile block IDs)
; a 3-byte border at the edges of the map is kept so that there is space for map connections
ld hl,wOverworldMap
- ld a,[W_CURMAPWIDTH]
+ ld a,[wCurMapWidth]
ld [hMapWidth],a
- add a,$06 ; border (east and west)
+ add a,MAP_BORDER * 2 ; east and west
ld [hMapStride],a ; map width + border
- ld b,$00
+ ld b,0
ld c,a
; make space for north border (next 3 lines)
add hl,bc
add hl,bc
add hl,bc
- ld c,$03
+ ld c,MAP_BORDER
add hl,bc ; this puts us past the (west) border
- ld a,[W_MAPDATAPTR] ; tile map pointer
+ ld a,[wMapDataPtr] ; tile map pointer
ld e,a
- ld a,[W_MAPDATAPTR + 1]
+ ld a,[wMapDataPtr + 1]
ld d,a ; de = tile map pointer
- ld a,[W_CURMAPHEIGHT]
+ ld a,[wCurMapHeight]
ld b,a
.rowLoop ; copy one row each iteration
push hl
@@ -920,7 +920,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
dec b
jr nz,.rowLoop
.northConnection
- ld a,[W_MAPCONN1PTR]
+ ld a,[wMapConn1Ptr]
cp a,$ff
jr z,.southConnection
call SwitchToMapRomBank
@@ -938,7 +938,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
ld [hNorthSouthConnectedMapWidth],a
call LoadNorthSouthConnectionsTileMap
.southConnection
- ld a,[W_MAPCONN2PTR]
+ ld a,[wMapConn2Ptr]
cp a,$ff
jr z,.westConnection
call SwitchToMapRomBank
@@ -956,7 +956,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
ld [hNorthSouthConnectedMapWidth],a
call LoadNorthSouthConnectionsTileMap
.westConnection
- ld a,[W_MAPCONN3PTR]
+ ld a,[wMapConn3Ptr]
cp a,$ff
jr z,.eastConnection
call SwitchToMapRomBank
@@ -974,7 +974,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
ld [hEastWestConnectedMapWidth],a
call LoadEastWestConnectionsTileMap
.eastConnection
- ld a,[W_MAPCONN4PTR]
+ ld a,[wMapConn4Ptr]
cp a,$ff
jr z,.done
call SwitchToMapRomBank
@@ -995,7 +995,7 @@ LoadTileBlockMap:: ; 09fc (0:09fc)
ret
LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade)
- ld c,$03
+ ld c,MAP_BORDER
.loop
push de
push hl
@@ -1015,8 +1015,8 @@ LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade)
jr nc,.noCarry1
inc h
.noCarry1
- ld a,[W_CURMAPWIDTH]
- add a,$06
+ ld a,[wCurMapWidth]
+ add a,MAP_BORDER * 2
add e
ld e,a
jr nc,.noCarry2
@@ -1029,7 +1029,7 @@ LoadNorthSouthConnectionsTileMap:: ; 0ade (0:0ade)
LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02)
push hl
push de
- ld c,$03
+ ld c,MAP_BORDER
.innerLoop
ld a,[hli]
ld [de],a
@@ -1044,8 +1044,8 @@ LoadEastWestConnectionsTileMap:: ; 0b02 (0:0b02)
jr nc,.noCarry1
inc h
.noCarry1
- ld a,[W_CURMAPWIDTH]
- add a,$06
+ ld a,[wCurMapWidth]
+ add a,MAP_BORDER * 2
add e
ld e,a
jr nc,.noCarry2
@@ -1100,7 +1100,7 @@ IsSpriteOrSignInFrontOfPlayer:: ; 0b23 (0:0b23)
; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC
.extendRangeOverCounter
predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c
- ld hl,W_TILESETTALKINGOVERTILES ; list of tiles that extend talking range (counter tiles)
+ ld hl,wTileSetTalkingOverTiles ; list of tiles that extend talking range (counter tiles)
ld b,3
ld d,$20 ; talking range in pixels (long range)
.counterTilesLoop
@@ -1152,7 +1152,7 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld a,PLAYER_DIR_LEFT
.doneCheckingDirection
ld [wPlayerDirection],a
- ld a,[W_NUMSPRITES] ; number of sprites
+ ld a,[wNumSprites] ; number of sprites
and a
ret z
; if there are sprites
@@ -1190,8 +1190,8 @@ IsSpriteInFrontOfPlayer2:: ; 0b6d (0:0b6d)
ld a,l
and a,$f0
inc a
- ld l,a
- set 7,[hl]
+ ld l,a ; hl = $c1x1
+ set 7,[hl] ; set flag to make the sprite face the player
ld a,e
ld [hSpriteIndexOrTextID],a
ret
@@ -1224,7 +1224,7 @@ CollisionCheckOnLand:: ; 0bd1 (0:0bd1)
call CheckTilePassable
jr nc,.noCollision
.collision
- ld a,[wc02a]
+ ld a,[wChannelSoundIDs + CH4]
cp a,SFX_COLLISION ; check if collision sound is already playing
jr z,.setCarry
ld a,SFX_COLLISION
@@ -1242,7 +1242,7 @@ CheckTilePassable:: ; 0c10 (0:0c10)
predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player
ld a,[wTileInFrontOfPlayer] ; tile in front of player
ld c,a
- ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles
+ ld hl,wTileSetCollisionPtr ; pointer to list of passable tiles
ld a,[hli]
ld h,[hl]
ld l,a ; hl now points to passable tiles
@@ -1284,7 +1284,7 @@ CheckForTilePairCollisions:: ; 0c4a (0:0c4a)
ld a,[wTileInFrontOfPlayer]
ld c,a
.tilePairCollisionLoop
- ld a,[W_CURMAPTILESET] ; tileset number
+ ld a,[wCurMapTileset] ; tileset number
ld b,a
ld a,[hli]
cp a,$ff
@@ -1354,7 +1354,7 @@ TilePairCollisionsWater:: ; 0ca0 (0:0ca0)
LoadCurrentMapView:: ; 0caa (0:0caa)
ld a,[H_LOADEDROMBANK]
push af
- ld a,[W_TILESETBANK] ; tile data ROM bank
+ ld a,[wTileSetBank] ; tile data ROM bank
ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a ; switch to ROM bank that contains tile data
ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view
@@ -1386,8 +1386,8 @@ LoadCurrentMapView:: ; 0caa (0:0caa)
jr nz,.rowInnerLoop
; update tile block map pointer to next row's address
pop de
- ld a,[W_CURMAPWIDTH]
- add a,$06
+ ld a,[wCurMapWidth]
+ add a,MAP_BORDER * 2
add e
ld e,a
jr nc,.noCarry
@@ -1406,19 +1406,19 @@ LoadCurrentMapView:: ; 0caa (0:0caa)
ld hl,wTileMapBackup
ld bc,$0000
.adjustForYCoordWithinTileBlock
- ld a,[W_YBLOCKCOORD]
+ ld a,[wYBlockCoord]
and a
jr z,.adjustForXCoordWithinTileBlock
ld bc,$0030
add hl,bc
.adjustForXCoordWithinTileBlock
- ld a,[W_XBLOCKCOORD]
+ ld a,[wXBlockCoord]
and a
jr z,.copyToVisibleAreaBuffer
ld bc,$0002
add hl,bc
.copyToVisibleAreaBuffer
- coord de, 0, 0 ; base address for the tiles that are directly transfered to VRAM during V-blank
+ coord de, 0, 0 ; base address for the tiles that are directly transferred to VRAM during V-blank
ld b, SCREEN_HEIGHT
.rowLoop2
ld c, SCREEN_WIDTH
@@ -1450,12 +1450,12 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27)
dec [hl]
jr nz,.afterUpdateMapCoords
; if it's the end of the animation, update the player's map coordinates
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
add b
- ld [W_YCOORD],a
- ld a,[W_XCOORD]
+ ld [wYCoord],a
+ ld a,[wXCoord]
add c
- ld [W_XCOORD],a
+ ld [wXCoord],a
.afterUpdateMapCoords
ld a,[wWalkCounter] ; walking animation counter
cp a,$07
@@ -1522,7 +1522,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27)
and a
jr z,.pointlessJump ; mistake?
.pointlessJump
- ld hl,W_XBLOCKCOORD
+ ld hl,wXBlockCoord
ld a,[hl]
add c
ld [hl],a
@@ -1548,7 +1548,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27)
call MoveTileBlockMapPointerWest
jr .updateMapView
.adjustYCoordWithinBlock
- ld hl,W_YBLOCKCOORD
+ ld hl,wYBlockCoord
ld a,[hl]
add b
ld [hl],a
@@ -1560,7 +1560,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27)
ld hl,wYOffsetSinceLastSpecialWarp
inc [hl]
ld de,wCurrentTileBlockMapViewPointer
- ld a,[W_CURMAPWIDTH]
+ ld a,[wCurMapWidth]
call MoveTileBlockMapPointerSouth
jr .updateMapView
.checkForMoveToNorthBlock
@@ -1572,7 +1572,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27)
ld hl,wYOffsetSinceLastSpecialWarp
dec [hl]
ld de,wCurrentTileBlockMapViewPointer
- ld a,[W_CURMAPWIDTH]
+ ld a,[wCurMapWidth]
call MoveTileBlockMapPointerNorth
.updateMapView
call LoadCurrentMapView
@@ -1616,7 +1616,7 @@ AdvancePlayerSprite:: ; 0d27 (0:0d27)
; shift all the sprites in the direction opposite of the player's motion
; so that the player appears to move relative to them
ld hl,wSpriteStateData1 + $14
- ld a,[W_NUMSPRITES] ; number of sprites
+ ld a,[wNumSprites] ; number of sprites
and a ; are there any sprites?
jr z,.done
ld e,a
@@ -1662,7 +1662,7 @@ MoveTileBlockMapPointerWest:: ; 0e6f (0:0e6f)
ret
MoveTileBlockMapPointerSouth:: ; 0e79 (0:0e79)
- add a,$06
+ add a,MAP_BORDER * 2
ld b,a
ld a,[de]
add b
@@ -1675,7 +1675,7 @@ MoveTileBlockMapPointerSouth:: ; 0e79 (0:0e79)
ret
MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85)
- add a,$06
+ add a,MAP_BORDER * 2
ld b,a
ld a,[de]
sub b
@@ -1692,17 +1692,17 @@ MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85)
ScheduleNorthRowRedraw:: ; 0e91 (0:0e91)
coord hl, 0, 0
- call CopyToScreenEdgeTiles
+ call CopyToRedrawRowOrColumnSrcTiles
ld a,[wMapViewVRAMPointer]
- ld [H_SCREENEDGEREDRAWADDR],a
+ ld [hRedrawRowOrColumnDest],a
ld a,[wMapViewVRAMPointer + 1]
- ld [H_SCREENEDGEREDRAWADDR + 1],a
- ld a,REDRAWROW
- ld [H_SCREENEDGEREDRAW],a
+ ld [hRedrawRowOrColumnDest + 1],a
+ ld a,REDRAW_ROW
+ ld [hRedrawRowOrColumnMode],a
ret
-CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6)
- ld de,wScreenEdgeTiles
+CopyToRedrawRowOrColumnSrcTiles:: ; 0ea6 (0:0ea6)
+ ld de,wRedrawRowOrColumnSrcTiles
ld c,2 * SCREEN_WIDTH
.loop
ld a,[hli]
@@ -1714,7 +1714,7 @@ CopyToScreenEdgeTiles:: ; 0ea6 (0:0ea6)
ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2)
coord hl, 0, 16
- call CopyToScreenEdgeTiles
+ call CopyToRedrawRowOrColumnSrcTiles
ld a,[wMapViewVRAMPointer]
ld l,a
ld a,[wMapViewVRAMPointer + 1]
@@ -1724,11 +1724,11 @@ ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2)
ld a,h
and a,$03
or a,$98
- ld [H_SCREENEDGEREDRAWADDR + 1],a
+ ld [hRedrawRowOrColumnDest + 1],a
ld a,l
- ld [H_SCREENEDGEREDRAWADDR],a
- ld a,REDRAWROW
- ld [H_SCREENEDGEREDRAW],a
+ ld [hRedrawRowOrColumnDest],a
+ ld a,REDRAW_ROW
+ ld [hRedrawRowOrColumnMode],a
ret
ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3)
@@ -1742,15 +1742,15 @@ ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3)
add a,18
and a,$1f
or b
- ld [H_SCREENEDGEREDRAWADDR],a
+ ld [hRedrawRowOrColumnDest],a
ld a,[wMapViewVRAMPointer + 1]
- ld [H_SCREENEDGEREDRAWADDR + 1],a
- ld a,REDRAWCOL
- ld [H_SCREENEDGEREDRAW],a
+ ld [hRedrawRowOrColumnDest + 1],a
+ ld a,REDRAW_COL
+ ld [hRedrawRowOrColumnMode],a
ret
ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2)
- ld de,wScreenEdgeTiles
+ ld de,wRedrawRowOrColumnSrcTiles
ld c,SCREEN_HEIGHT
.loop
ld a,[hli]
@@ -1773,20 +1773,20 @@ ScheduleWestColumnRedraw:: ; 0f08 (0:0f08)
coord hl, 0, 0
call ScheduleColumnRedrawHelper
ld a,[wMapViewVRAMPointer]
- ld [H_SCREENEDGEREDRAWADDR],a
+ ld [hRedrawRowOrColumnDest],a
ld a,[wMapViewVRAMPointer + 1]
- ld [H_SCREENEDGEREDRAWADDR + 1],a
- ld a,REDRAWCOL
- ld [H_SCREENEDGEREDRAW],a
+ ld [hRedrawRowOrColumnDest + 1],a
+ ld a,REDRAW_COL
+ ld [hRedrawRowOrColumnMode],a
ret
; function to write the tiles that make up a tile block to memory
; Input: c = tile block ID, hl = destination address
DrawTileBlock:: ; 0f1d (0:0f1d)
push hl
- ld a,[W_TILESETBLOCKSPTR] ; pointer to tiles
+ ld a,[wTileSetBlocksPtr] ; pointer to tiles
ld l,a
- ld a,[W_TILESETBLOCKSPTR + 1]
+ ld a,[wTileSetBlocksPtr + 1]
ld h,a
ld a,c
swap a
@@ -1829,10 +1829,10 @@ JoypadOverworld:: ; 0f4d (0:0f4d)
ld [wSpriteStateData1 + 5],a
call RunMapScript
call Joypad
- ld a,[W_FLAGS_D733]
+ ld a,[wFlags_D733]
bit 3,a ; check if a trainer wants a challenge
jr nz,.notForcedDownwards
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
cp a,ROUTE_17 ; Cycling Road
jr nz,.notForcedDownwards
ld a,[hJoyHeld]
@@ -1915,7 +1915,7 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7)
jr z,.noCollision ; keep surfing
; check if the [land] tile in front of the player is passable
.checkIfNextTileIsPassable
- ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles
+ ld hl,wTileSetCollisionPtr ; pointer to list of passable tiles
ld a,[hli]
ld h,[hl]
ld l,a
@@ -1927,7 +1927,7 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7)
jr z,.stopSurfing ; stop surfing if the tile is passable
jr .loop
.collision
- ld a,[wc02a]
+ ld a,[wChannelSoundIDs + CH4]
cp a,SFX_COLLISION ; check if collision sound is already playing
jr z,.setCarry
ld a,SFX_COLLISION
@@ -1946,7 +1946,7 @@ CollisionCheckOnWater:: ; 0fb7 (0:0fb7)
call PlayDefaultMusic
jr .noCollision
.checkIfVermilionDockTileset
- ld a, [W_CURMAPTILESET] ; tileset
+ ld a, [wCurMapTileset] ; tileset
cp SHIP_PORT ; Vermilion Dock tileset
jr nz, .noCollision ; keep surfing if it's not the boarding platform tile
jr .stopSurfing ; if it is the boarding platform tile, stop surfing
@@ -1966,9 +1966,9 @@ RunMapScript:: ; 101b (0:101b)
pop de
pop hl
call RunNPCMovementScript
- ld a,[W_CURMAP] ; current map number
+ ld a,[wCurMap] ; current map number
call SwitchToMapRomBank ; change to the ROM bank the map's data is in
- ld hl,W_MAPSCRIPTPTR
+ ld hl,wMapScriptPtr
ld a,[hli]
ld h,[hl]
ld l,a
@@ -2012,19 +2012,19 @@ LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063)
; function to load data from the map header
LoadMapHeader:: ; 107c (0:107c)
callba MarkTownVisitedAndLoadMissableObjects
- ld a,[W_CURMAPTILESET]
+ ld a,[wCurMapTileset]
ld [wUnusedD119],a
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
call SwitchToMapRomBank
- ld a,[W_CURMAPTILESET]
+ ld a,[wCurMapTileset]
ld b,a
res 7,a
- ld [W_CURMAPTILESET],a
+ ld [wCurMapTileset],a
ld [hPreviousTileset],a
bit 7,b
ret nz
ld hl,MapHeaderPointers
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
sla a
jr nc,.noCarry1
inc h
@@ -2038,7 +2038,7 @@ LoadMapHeader:: ; 107c (0:107c)
ld h,[hl]
ld l,a ; hl = base of map header
; copy the first 10 bytes (the fixed area) of the map data to D367-D370
- ld de,W_CURMAPTILESET
+ ld de,wCurMapTileset
ld c,$0a
.copyFixedHeaderLoop
ld a,[hli]
@@ -2048,32 +2048,32 @@ LoadMapHeader:: ; 107c (0:107c)
jr nz,.copyFixedHeaderLoop
; initialize all the connected maps to disabled at first, before loading the actual values
ld a,$ff
- ld [W_MAPCONN1PTR],a
- ld [W_MAPCONN2PTR],a
- ld [W_MAPCONN3PTR],a
- ld [W_MAPCONN4PTR],a
+ ld [wMapConn1Ptr],a
+ ld [wMapConn2Ptr],a
+ ld [wMapConn3Ptr],a
+ ld [wMapConn4Ptr],a
; copy connection data (if any) to WRAM
- ld a,[W_MAPCONNECTIONS]
+ ld a,[wMapConnections]
ld b,a
.checkNorth
bit 3,b
jr z,.checkSouth
- ld de,W_MAPCONN1PTR
+ ld de,wMapConn1Ptr
call CopyMapConnectionHeader
.checkSouth
bit 2,b
jr z,.checkWest
- ld de,W_MAPCONN2PTR
+ ld de,wMapConn2Ptr
call CopyMapConnectionHeader
.checkWest
bit 1,b
jr z,.checkEast
- ld de,W_MAPCONN3PTR
+ ld de,wMapConn3Ptr
call CopyMapConnectionHeader
.checkEast
bit 0,b
jr z,.getObjectDataPointer
- ld de,W_MAPCONN4PTR
+ ld de,wMapConn4Ptr
call CopyMapConnectionHeader
.getObjectDataPointer
ld a,[hli]
@@ -2144,7 +2144,7 @@ LoadMapHeader:: ; 107c (0:107c)
bit 5,a ; did a battle happen immediately before this?
jp nz,.finishUp ; if so, skip this because battles don't destroy this data
ld a,[hli]
- ld [W_NUMSPRITES],a ; save the number of sprites
+ ld [wNumSprites],a ; save the number of sprites
push hl
; zero C110-C1FF and C210-C2FF
ld hl,wSpriteStateData1 + $10
@@ -2168,7 +2168,7 @@ LoadMapHeader:: ; 107c (0:107c)
jr nz,.disableSpriteEntriesLoop
pop hl
ld de,wSpriteStateData1 + $10
- ld a,[W_NUMSPRITES] ; number of sprites
+ ld a,[wNumSprites] ; number of sprites
and a ; are there any sprites?
jp z,.finishUp ; if there are no sprites, skip the rest
ld b,a
@@ -2195,7 +2195,7 @@ LoadMapHeader:: ; 107c (0:107c)
push bc
push hl
ld b,$00
- ld hl,W_MAPSPRITEDATA
+ ld hl,wMapSpriteData
add hl,bc
ld a,[hLoadSpriteTemp1]
ld [hli],a ; store movement byte 2 in byte 0 of sprite entry
@@ -2218,7 +2218,7 @@ LoadMapHeader:: ; 107c (0:107c)
ld a,[hli]
ld [hLoadSpriteTemp2],a ; save trainer number (within class)
push hl
- ld hl,W_MAPSPRITEEXTRADATA
+ ld hl,wMapSpriteExtraData
add hl,bc
ld a,[hLoadSpriteTemp1]
ld [hli],a ; store trainer class in byte 0 of the entry
@@ -2230,7 +2230,7 @@ LoadMapHeader:: ; 107c (0:107c)
ld a,[hli]
ld [hLoadSpriteTemp1],a ; save item number
push hl
- ld hl,W_MAPSPRITEEXTRADATA
+ ld hl,wMapSpriteExtraData
add hl,bc
ld a,[hLoadSpriteTemp1]
ld [hli],a ; store item number in byte 0 of the entry
@@ -2240,7 +2240,7 @@ LoadMapHeader:: ; 107c (0:107c)
jr .nextSprite
.regularSprite
push hl
- ld hl,W_MAPSPRITEEXTRADATA
+ ld hl,wMapSpriteExtraData
add hl,bc
; zero both bytes, since regular sprites don't use this extra space
xor a
@@ -2261,13 +2261,13 @@ LoadMapHeader:: ; 107c (0:107c)
predef LoadTilesetHeader
callab LoadWildData
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
- ld a,[W_CURMAPHEIGHT] ; map height in 4x4 tile blocks
+ ld a,[wCurMapHeight] ; map height in 4x4 tile blocks
add a ; double it
ld [wCurrentMapHeight2],a ; store map height in 2x2 tile blocks
- ld a,[W_CURMAPWIDTH] ; map width in 4x4 tile blocks
+ ld a,[wCurMapWidth] ; map width in 4x4 tile blocks
add a ; double it
ld [wCurrentMapWidth2],a ; map width in 2x2 tile blocks
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
ld c,a
ld b,$00
ld a,[H_LOADEDROMBANK]
@@ -2279,9 +2279,9 @@ LoadMapHeader:: ; 107c (0:107c)
add hl,bc
add hl,bc
ld a,[hli]
- ld [wd35b],a ; music 1
+ ld [wMapMusicSoundID],a ; music 1
ld a,[hl]
- ld [wd35c],a ; music 2
+ ld [wMapMusicROMBank],a ; music 2
pop af
ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a
@@ -2313,7 +2313,7 @@ LoadMapData:: ; 1241 (0:1241)
ld [wWalkCounter],a
ld [wUnusedD119],a
ld [wWalkBikeSurfStateCopy],a
- ld [W_SPRITESETID],a
+ ld [wSpriteSetID],a
call LoadTextBoxTilePatterns
call LoadMapHeader
callba InitMapSprites ; load tile pattern data for sprites
@@ -2343,17 +2343,17 @@ LoadMapData:: ; 1241 (0:1241)
ld a,$01
ld [wUpdateSpritesEnabled],a
call EnableLCD
- ld b,$09
- call GoPAL_SET
+ ld b, SET_PAL_OVERWORLD
+ call RunPaletteCommand
call LoadPlayerSpriteGraphics
ld a,[wd732]
and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp
jr nz,.restoreRomBank
- ld a,[W_FLAGS_D733]
+ ld a,[wFlags_D733]
bit 1,a
jr nz,.restoreRomBank
- call Func_235f ; music related
- call Func_2312 ; music related
+ call UpdateMusic6Times
+ call PlayDefaultMusicFadeOutCurrent
.restoreRomBank
pop af
ld [H_LOADEDROMBANK],a
diff --git a/home/pic.asm b/home/pic.asm
index 4bc7b31c..4af12117 100644
--- a/home/pic.asm
+++ b/home/pic.asm
@@ -1,5 +1,5 @@
; bankswitches and runs _UncompressSpriteData
-; bank is given in a, sprite input stream is pointed to in W_SPRITEINPUTPTR
+; bank is given in a, sprite input stream is pointed to in wSpriteInputPtr
UncompressSpriteData:: ; 24fd (0:24fd)
ld b, a
ld a, [H_LOADEDROMBANK]
@@ -19,51 +19,51 @@ UncompressSpriteData:: ; 24fd (0:24fd)
; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop
_UncompressSpriteData:: ; 251a (0:251a)
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
ld c, (2*SPRITEBUFFERSIZE) % $100
ld b, (2*SPRITEBUFFERSIZE) / $100
xor a
call FillMemory ; clear sprite buffer 1 and 2
ld a, $1
- ld [W_SPRITEINPUTBITCOUNTER], a
+ ld [wSpriteInputBitCounter], a
ld a, $3
- ld [W_SPRITEOUTPUTBITOFFSET], a
+ ld [wSpriteOutputBitOffset], a
xor a
- ld [W_SPRITECURPOSX], a
- ld [W_SPRITECURPOSY], a
- ld [W_SPRITELOADFLAGS], a
+ ld [wSpriteCurPosX], a
+ ld [wSpriteCurPosY], a
+ ld [wSpriteLoadFlags], a
call ReadNextInputByte ; first byte of input determines sprite width (high nybble) and height (low nybble) in tiles (8x8 pixels)
ld b, a
and $f
add a
add a
add a
- ld [W_SPRITEHEIGHT], a
+ ld [wSpriteHeight], a
ld a, b
swap a
and $f
add a
add a
add a
- ld [W_SPRITEWITDH], a
+ ld [wSpriteWidth], a
call ReadNextInputBit
- ld [W_SPRITELOADFLAGS], a ; initialite bit1 to 0 and bit0 to the first input bit
- ; this will load two chunks of data to S_SPRITEBUFFER1 and S_SPRITEBUFFER2
+ ld [wSpriteLoadFlags], a ; initialite bit1 to 0 and bit0 to the first input bit
+ ; this will load two chunks of data to sSpriteBuffer1 and sSpriteBuffer2
; bit 0 decides in which one the first chunk is placed
; fall through
-; uncompresses a chunk from the sprite input data stream (pointed to at wd0da) into S_SPRITEBUFFER1 or S_SPRITEBUFFER2
+; uncompresses a chunk from the sprite input data stream (pointed to at wd0da) into sSpriteBuffer1 or sSpriteBuffer2
; each chunk is a 1bpp sprite. A 2bpp sprite consist of two chunks which are merged afterwards
; note that this is an endless loop which is terminated during a call to MoveToNextBufferPosition by manipulating the stack
UncompressSpriteDataLoop:: ; 2556 (0:2556)
- ld hl, S_SPRITEBUFFER1
- ld a, [W_SPRITELOADFLAGS]
+ ld hl, sSpriteBuffer1
+ ld a, [wSpriteLoadFlags]
bit 0, a
jr z, .useSpriteBuffer1 ; check which buffer to use
- ld hl, S_SPRITEBUFFER2
+ ld hl, sSpriteBuffer2
.useSpriteBuffer1
call StoreSpriteOutputPointer
- ld a, [W_SPRITELOADFLAGS]
+ ld a, [wSpriteLoadFlags]
bit 1, a
jr z, .startDecompression ; check if last iteration
call ReadNextInputBit ; if last chunk, read 1-2 bit unpacking mode
@@ -72,7 +72,7 @@ UncompressSpriteDataLoop:: ; 2556 (0:2556)
call ReadNextInputBit ; 1 0 -> mode 1
inc a ; 1 1 -> mode 2
.unpackingMode0
- ld [W_SPRITEUNPACKMODE], a
+ ld [wSpriteUnpackMode], a
.startDecompression
call ReadNextInputBit
and a
@@ -146,69 +146,69 @@ UncompressSpriteDataLoop:: ; 2556 (0:2556)
; also cancels the calling function if the all output is done (by removing the return pointer from stack)
; and calls postprocessing functions according to the unpack mode
MoveToNextBufferPosition:: ; 25d8 (0:25d8)
- ld a, [W_SPRITEHEIGHT]
+ ld a, [wSpriteHeight]
ld b, a
- ld a, [W_SPRITECURPOSY]
+ ld a, [wSpriteCurPosY]
inc a
cp b
jr z, .curColumnDone
- ld [W_SPRITECURPOSY], a
- ld a, [W_SPRITEOUTPUTPTR]
+ ld [wSpriteCurPosY], a
+ ld a, [wSpriteOutputPtr]
inc a
- ld [W_SPRITEOUTPUTPTR], a
+ ld [wSpriteOutputPtr], a
ret nz
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
inc a
- ld [W_SPRITEOUTPUTPTR+1], a
+ ld [wSpriteOutputPtr+1], a
ret
.curColumnDone
xor a
- ld [W_SPRITECURPOSY], a
- ld a, [W_SPRITEOUTPUTBITOFFSET]
+ ld [wSpriteCurPosY], a
+ ld a, [wSpriteOutputBitOffset]
and a
jr z, .bitOffsetsDone
dec a
- ld [W_SPRITEOUTPUTBITOFFSET], a
- ld hl, W_SPRITEOUTPUTPTRCACHED
+ ld [wSpriteOutputBitOffset], a
+ ld hl, wSpriteOutputPtrCached
ld a, [hli]
- ld [W_SPRITEOUTPUTPTR], a
+ ld [wSpriteOutputPtr], a
ld a, [hl]
- ld [W_SPRITEOUTPUTPTR+1], a
+ ld [wSpriteOutputPtr+1], a
ret
.bitOffsetsDone
ld a, $3
- ld [W_SPRITEOUTPUTBITOFFSET], a
- ld a, [W_SPRITECURPOSX]
+ ld [wSpriteOutputBitOffset], a
+ ld a, [wSpriteCurPosX]
add $8
- ld [W_SPRITECURPOSX], a
+ ld [wSpriteCurPosX], a
ld b, a
- ld a, [W_SPRITEWITDH]
+ ld a, [wSpriteWidth]
cp b
jr z, .allColumnsDone
- ld a, [W_SPRITEOUTPUTPTR]
+ ld a, [wSpriteOutputPtr]
ld l, a
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
ld h, a
inc hl
jp StoreSpriteOutputPointer
.allColumnsDone
pop hl
xor a
- ld [W_SPRITECURPOSX], a
- ld a, [W_SPRITELOADFLAGS]
+ ld [wSpriteCurPosX], a
+ ld a, [wSpriteLoadFlags]
bit 1, a
jr nz, .done ; test if there is one more sprite to go
xor $1
set 1, a
- ld [W_SPRITELOADFLAGS], a
+ ld [wSpriteLoadFlags], a
jp UncompressSpriteDataLoop
.done
jp UnpackSprite
-; writes 2 bits (from a) to the output buffer (pointed to from W_SPRITEOUTPUTPTR)
+; writes 2 bits (from a) to the output buffer (pointed to from wSpriteOutputPtr)
WriteSpriteBitsToBuffer:: ; 2649 (0:2649)
ld e, a
- ld a, [W_SPRITEOUTPUTBITOFFSET]
+ ld a, [wSpriteOutputBitOffset]
and a
jr z, .offset0
cp $2
@@ -224,9 +224,9 @@ WriteSpriteBitsToBuffer:: ; 2649 (0:2649)
.offset2
swap e
.offset0
- ld a, [W_SPRITEOUTPUTPTR]
+ ld a, [wSpriteOutputPtr]
ld l, a
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
ld h, a
ld a, [hl]
or e
@@ -235,32 +235,32 @@ WriteSpriteBitsToBuffer:: ; 2649 (0:2649)
; reads next bit from input stream and returns it in a
ReadNextInputBit:: ; 2670 (0:2670)
- ld a, [W_SPRITEINPUTBITCOUNTER]
+ ld a, [wSpriteInputBitCounter]
dec a
jr nz, .curByteHasMoreBitsToRead
call ReadNextInputByte
- ld [W_SPRITEINPUTCURBYTE], a
+ ld [wSpriteInputCurByte], a
ld a, $8
.curByteHasMoreBitsToRead
- ld [W_SPRITEINPUTBITCOUNTER], a
- ld a, [W_SPRITEINPUTCURBYTE]
+ ld [wSpriteInputBitCounter], a
+ ld a, [wSpriteInputCurByte]
rlca
- ld [W_SPRITEINPUTCURBYTE], a
+ ld [wSpriteInputCurByte], a
and $1
ret
; reads next byte from input stream and returns it in a
ReadNextInputByte:: ; 268b (0:268b)
- ld a, [W_SPRITEINPUTPTR]
+ ld a, [wSpriteInputPtr]
ld l, a
- ld a, [W_SPRITEINPUTPTR+1]
+ ld a, [wSpriteInputPtr+1]
ld h, a
ld a, [hli]
ld b, a
ld a, l
- ld [W_SPRITEINPUTPTR], a
+ ld [wSpriteInputPtr], a
ld a, h
- ld [W_SPRITEINPUTPTR+1], a
+ ld [wSpriteInputPtr+1], a
ld a, b
ret
@@ -285,24 +285,24 @@ LengthEncodingOffsetList:: ; 269f (0:269f)
; unpacks the sprite data depending on the unpack mode
UnpackSprite:: ; 26bf (0:26bf)
- ld a, [W_SPRITEUNPACKMODE]
+ ld a, [wSpriteUnpackMode]
cp $2
jp z, UnpackSpriteMode2
and a
jp nz, XorSpriteChunks
- ld hl, S_SPRITEBUFFER1
+ ld hl, sSpriteBuffer1
call SpriteDifferentialDecode
- ld hl, S_SPRITEBUFFER2
+ ld hl, sSpriteBuffer2
; fall through
; decodes differential encoded sprite data
; input bit value 0 preserves the current bit value and input bit value 1 toggles it (starting from initial value 0).
SpriteDifferentialDecode:: ; 26d4 (0:26d4)
xor a
- ld [W_SPRITECURPOSX], a
- ld [W_SPRITECURPOSY], a
+ ld [wSpriteCurPosX], a
+ ld [wSpriteCurPosY], a
call StoreSpriteOutputPointer
- ld a, [W_SPRITEFLIPPED]
+ ld a, [wSpriteFlipped]
and a
jr z, .notFlipped
ld hl, DecodeNybble0TableFlipped
@@ -313,18 +313,18 @@ SpriteDifferentialDecode:: ; 26d4 (0:26d4)
ld de, DecodeNybble1Table
.storeDecodeTablesPointers
ld a, l
- ld [W_SPRITEDECODETABLE0PTR], a
+ ld [wSpriteDecodeTable0Ptr], a
ld a, h
- ld [W_SPRITEDECODETABLE0PTR+1], a
+ ld [wSpriteDecodeTable0Ptr+1], a
ld a, e
- ld [W_SPRITEDECODETABLE1PTR], a
+ ld [wSpriteDecodeTable1Ptr], a
ld a, d
- ld [W_SPRITEDECODETABLE1PTR+1], a
+ ld [wSpriteDecodeTable1Ptr+1], a
ld e, $0 ; last decoded nybble, initialized to 0
.decodeNextByteLoop
- ld a, [W_SPRITEOUTPUTPTR]
+ ld a, [wSpriteOutputPtr]
ld l, a
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
ld h, a
ld a, [hl]
ld b, a
@@ -338,47 +338,47 @@ SpriteDifferentialDecode:: ; 26d4 (0:26d4)
call DifferentialDecodeNybble ; decode low nybble
or d
ld b, a
- ld a, [W_SPRITEOUTPUTPTR]
+ ld a, [wSpriteOutputPtr]
ld l, a
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
ld h, a
ld a, b
ld [hl], a ; write back decoded data
- ld a, [W_SPRITEHEIGHT]
+ ld a, [wSpriteHeight]
add l ; move on to next column
jr nc, .noCarry
inc h
.noCarry
- ld [W_SPRITEOUTPUTPTR], a
+ ld [wSpriteOutputPtr], a
ld a, h
- ld [W_SPRITEOUTPUTPTR+1], a
- ld a, [W_SPRITECURPOSX]
+ ld [wSpriteOutputPtr+1], a
+ ld a, [wSpriteCurPosX]
add $8
- ld [W_SPRITECURPOSX], a
+ ld [wSpriteCurPosX], a
ld b, a
- ld a, [W_SPRITEWITDH]
+ ld a, [wSpriteWidth]
cp b
jr nz, .decodeNextByteLoop ; test if current row is done
xor a
ld e, a
- ld [W_SPRITECURPOSX], a
- ld a, [W_SPRITECURPOSY] ; move on to next row
+ ld [wSpriteCurPosX], a
+ ld a, [wSpriteCurPosY] ; move on to next row
inc a
- ld [W_SPRITECURPOSY], a
+ ld [wSpriteCurPosY], a
ld b, a
- ld a, [W_SPRITEHEIGHT]
+ ld a, [wSpriteHeight]
cp b
jr z, .done ; test if all rows finished
- ld a, [W_SPRITEOUTPUTPTRCACHED]
+ ld a, [wSpriteOutputPtrCached]
ld l, a
- ld a, [W_SPRITEOUTPUTPTRCACHED+1]
+ ld a, [wSpriteOutputPtrCached+1]
ld h, a
inc hl
call StoreSpriteOutputPointer
jr .decodeNextByteLoop
.done
xor a
- ld [W_SPRITECURPOSY], a
+ ld [wSpriteCurPosY], a
ret
; decodes the nybble stored in a. Last decoded data is assumed to be in e (needed to determine if initial value is 0 or 1)
@@ -389,7 +389,7 @@ DifferentialDecodeNybble:: ; 276d (0:276d)
ld c, $1
.evenNumber
ld l, a
- ld a, [W_SPRITEFLIPPED]
+ ld a, [wSpriteFlipped]
and a
jr z, .notFlipped ; determine if initial value is 0 or one
bit 3, e ; if flipped, consider MSB of last data
@@ -399,14 +399,14 @@ DifferentialDecodeNybble:: ; 276d (0:276d)
.selectLookupTable
ld e, l
jr nz, .initialValue1 ; load the appropriate table
- ld a, [W_SPRITEDECODETABLE0PTR]
+ ld a, [wSpriteDecodeTable0Ptr]
ld l, a
- ld a, [W_SPRITEDECODETABLE0PTR+1]
+ ld a, [wSpriteDecodeTable0Ptr+1]
jr .tableLookup
.initialValue1
- ld a, [W_SPRITEDECODETABLE1PTR]
+ ld a, [wSpriteDecodeTable1Ptr]
ld l, a
- ld a, [W_SPRITEDECODETABLE1PTR+1]
+ ld a, [wSpriteDecodeTable1Ptr+1]
.tableLookup
ld h, a
ld a, e
@@ -464,25 +464,25 @@ DecodeNybble1TableFlipped:: ; 27bf (0:27bf)
; combines the two loaded chunks with xor (the chunk loaded second is the destination). The source chunk is differeintial decoded beforehand.
XorSpriteChunks:: ; 27c7 (0:27c7)
xor a
- ld [W_SPRITECURPOSX], a
- ld [W_SPRITECURPOSY], a
+ ld [wSpriteCurPosX], a
+ ld [wSpriteCurPosY], a
call ResetSpriteBufferPointers
- ld a, [W_SPRITEOUTPUTPTR] ; points to buffer 1 or 2, depending on flags
+ ld a, [wSpriteOutputPtr] ; points to buffer 1 or 2, depending on flags
ld l, a
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
ld h, a
call SpriteDifferentialDecode ; decode buffer 1 or 2, depending on flags
call ResetSpriteBufferPointers
- ld a, [W_SPRITEOUTPUTPTR] ; source buffer, points to buffer 1 or 2, depending on flags
+ ld a, [wSpriteOutputPtr] ; source buffer, points to buffer 1 or 2, depending on flags
ld l, a
- ld a, [W_SPRITEOUTPUTPTR+1]
+ ld a, [wSpriteOutputPtr+1]
ld h, a
- ld a, [W_SPRITEOUTPUTPTRCACHED] ; destination buffer, points to buffer 2 or 1, depending on flags
+ ld a, [wSpriteOutputPtrCached] ; destination buffer, points to buffer 2 or 1, depending on flags
ld e, a
- ld a, [W_SPRITEOUTPUTPTRCACHED+1]
+ ld a, [wSpriteOutputPtrCached+1]
ld d, a
.xorChunksLoop
- ld a, [W_SPRITEFLIPPED]
+ ld a, [wSpriteFlipped]
and a
jr z, .notFlipped
push de
@@ -506,24 +506,24 @@ XorSpriteChunks:: ; 27c7 (0:27c7)
xor b
ld [de], a
inc de
- ld a, [W_SPRITECURPOSY]
+ ld a, [wSpriteCurPosY]
inc a
- ld [W_SPRITECURPOSY], a ; go to next row
+ ld [wSpriteCurPosY], a ; go to next row
ld b, a
- ld a, [W_SPRITEHEIGHT]
+ ld a, [wSpriteHeight]
cp b
jr nz, .xorChunksLoop ; test if column finished
xor a
- ld [W_SPRITECURPOSY], a
- ld a, [W_SPRITECURPOSX]
+ ld [wSpriteCurPosY], a
+ ld a, [wSpriteCurPosX]
add $8
- ld [W_SPRITECURPOSX], a ; go to next column
+ ld [wSpriteCurPosX], a ; go to next column
ld b, a
- ld a, [W_SPRITEWITDH]
+ ld a, [wSpriteWidth]
cp b
jr nz, .xorChunksLoop ; test if all columns finished
xor a
- ld [W_SPRITECURPOSX], a
+ ld [wSpriteCurPosX], a
ret
; reverses the bits in the nybble given in register a
@@ -537,26 +537,26 @@ ReverseNybble:: ; 2837 (0:2837)
ld a, [de]
ret
-; resets sprite buffer pointers to buffer 1 and 2, depending on W_SPRITELOADFLAGS
+; resets sprite buffer pointers to buffer 1 and 2, depending on wSpriteLoadFlags
ResetSpriteBufferPointers:: ; 2841 (0:2841)
- ld a, [W_SPRITELOADFLAGS]
+ ld a, [wSpriteLoadFlags]
bit 0, a
jr nz, .buffer2Selected
- ld de, S_SPRITEBUFFER1
- ld hl, S_SPRITEBUFFER2
+ ld de, sSpriteBuffer1
+ ld hl, sSpriteBuffer2
jr .storeBufferPointers
.buffer2Selected
- ld de, S_SPRITEBUFFER2
- ld hl, S_SPRITEBUFFER1
+ ld de, sSpriteBuffer2
+ ld hl, sSpriteBuffer1
.storeBufferPointers
ld a, l
- ld [W_SPRITEOUTPUTPTR], a
+ ld [wSpriteOutputPtr], a
ld a, h
- ld [W_SPRITEOUTPUTPTR+1], a
+ ld [wSpriteOutputPtr+1], a
ld a, e
- ld [W_SPRITEOUTPUTPTRCACHED], a
+ ld [wSpriteOutputPtrCached], a
ld a, d
- ld [W_SPRITEOUTPUTPTRCACHED+1], a
+ ld [wSpriteOutputPtrCached+1], a
ret
; maps each nybble to its reverse
@@ -566,26 +566,26 @@ NybbleReverseTable:: ; 2867 (0:2867)
; combines the two loaded chunks with xor (the chunk loaded second is the destination). Both chunks are differeintial decoded beforehand.
UnpackSpriteMode2:: ; 2877 (0:2877)
call ResetSpriteBufferPointers
- ld a, [W_SPRITEFLIPPED]
+ ld a, [wSpriteFlipped]
push af
xor a
- ld [W_SPRITEFLIPPED], a ; temporarily clear flipped flag for decoding the destination chunk
- ld a, [W_SPRITEOUTPUTPTRCACHED]
+ ld [wSpriteFlipped], a ; temporarily clear flipped flag for decoding the destination chunk
+ ld a, [wSpriteOutputPtrCached]
ld l, a
- ld a, [W_SPRITEOUTPUTPTRCACHED+1]
+ ld a, [wSpriteOutputPtrCached+1]
ld h, a
call SpriteDifferentialDecode
call ResetSpriteBufferPointers
pop af
- ld [W_SPRITEFLIPPED], a
+ ld [wSpriteFlipped], a
jp XorSpriteChunks
; stores hl into the output pointers
StoreSpriteOutputPointer:: ; 2897 (0:2897)
ld a, l
- ld [W_SPRITEOUTPUTPTR], a
- ld [W_SPRITEOUTPUTPTRCACHED], a
+ ld [wSpriteOutputPtr], a
+ ld [wSpriteOutputPtrCached], a
ld a, h
- ld [W_SPRITEOUTPUTPTR+1], a
- ld [W_SPRITEOUTPUTPTRCACHED+1], a
+ ld [wSpriteOutputPtr+1], a
+ ld [wSpriteOutputPtrCached+1], a
ret
diff --git a/home/text.asm b/home/text.asm
index 238af447..a9e7cd60 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -146,7 +146,7 @@ Char52:: ; 0x19f9 player’s name
Char53:: ; 19ff (0:19ff) ; rival’s name
push de
- ld de,W_RIVALNAME
+ ld de,wRivalName
jr FinishDTE
Char5D:: ; 1a05 (0:1a05) ; TRAINER
diff --git a/home/vblank.asm b/home/vblank.asm
index 6abc3756..f69d4a86 100644
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -22,7 +22,7 @@ VBlank::
call AutoBgMapTransfer
call VBlankCopyBgMap
- call RedrawExposedScreenEdge
+ call RedrawRowOrColumn
call VBlankCopy
call VBlankCopyDouble
call UpdateMovingBgTiles
@@ -38,21 +38,21 @@ VBlank::
ld a, [H_VBLANKOCCURRED]
and a
- jr z, .vblanked
+ jr z, .skipZeroing
xor a
ld [H_VBLANKOCCURRED], a
-.vblanked
+.skipZeroing
ld a, [H_FRAMECOUNTER]
and a
- jr z, .decced
+ jr z, .skipDec
dec a
ld [H_FRAMECOUNTER], a
-.decced
- call Func_28cb
+.skipDec
+ call FadeOutAudio
- ld a, [wc0ef] ; music ROM bank
+ ld a, [wAudioROMBank] ; music ROM bank
ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a
@@ -74,7 +74,7 @@ VBlank::
callba TrackPlayTime ; keep track of time played
- ld a, [$fff9]
+ ld a, [hDisableJoypadPolling]
and a
call z, ReadJoypad
diff --git a/home/vcopy.asm b/home/vcopy.asm
index 02caef29..69773cfe 100644
--- a/home/vcopy.asm
+++ b/home/vcopy.asm
@@ -33,23 +33,26 @@ ClearBgMap:: ; 1cf0 (0:1cf0)
jr nz,.loop
ret
-; When the player takes a step, a row or column of 2x2 tile blocks at the edge
-; of the screen toward which they moved is exposed and has to be redrawn.
-; This function does the redrawing.
-RedrawExposedScreenEdge:: ; 1d01 (0:1d01)
- ld a,[H_SCREENEDGEREDRAW]
+RedrawRowOrColumn:: ; 1d01 (0:1d01)
+; This function redraws a BG row of height 2 or a BG column of width 2.
+; One of its main uses is redrawing the row or column that will be exposed upon
+; scrolling the BG when the player takes a step. Redrawing only the exposed
+; row or column is more efficient than redrawing the entire screen.
+; However, this function is also called repeatedly to redraw the whole screen
+; when necessary. It is also used in trade animation and elevator code.
+ ld a,[hRedrawRowOrColumnMode]
and a
ret z
ld b,a
xor a
- ld [H_SCREENEDGEREDRAW],a
+ ld [hRedrawRowOrColumnMode],a
dec b
jr nz,.redrawRow
.redrawColumn
- ld hl,wScreenEdgeTiles
- ld a,[H_SCREENEDGEREDRAWADDR]
+ ld hl,wRedrawRowOrColumnSrcTiles
+ ld a,[hRedrawRowOrColumnDest]
ld e,a
- ld a,[H_SCREENEDGEREDRAWADDR + 1]
+ ld a,[hRedrawRowOrColumnDest + 1]
ld d,a
ld c,SCREEN_HEIGHT
.loop1
@@ -58,7 +61,7 @@ RedrawExposedScreenEdge:: ; 1d01 (0:1d01)
inc de
ld a,[hli]
ld [de],a
- ld a,31
+ ld a,BG_MAP_WIDTH - 1
add e
ld e,a
jr nc,.noCarry
@@ -72,23 +75,24 @@ RedrawExposedScreenEdge:: ; 1d01 (0:1d01)
dec c
jr nz,.loop1
xor a
- ld [H_SCREENEDGEREDRAW],a
+ ld [hRedrawRowOrColumnMode],a
ret
.redrawRow
- ld hl,wScreenEdgeTiles
- ld a,[H_SCREENEDGEREDRAWADDR]
+ ld hl,wRedrawRowOrColumnSrcTiles
+ ld a,[hRedrawRowOrColumnDest]
ld e,a
- ld a,[H_SCREENEDGEREDRAWADDR + 1]
+ ld a,[hRedrawRowOrColumnDest + 1]
ld d,a
push de
- call .drawHalf ; draw upper half
+ call .DrawHalf ; draw upper half
pop de
- ld a,32 ; width of VRAM background map
+ ld a,BG_MAP_WIDTH ; width of VRAM background map
add e
ld e,a
- ; draw lower half
-.drawHalf
- ld c,10
+ ; fall through and draw lower half
+
+.DrawHalf
+ ld c,SCREEN_WIDTH / 2
.loop2
ld a,[hli]
ld [de],a
@@ -113,7 +117,7 @@ RedrawExposedScreenEdge:: ; 1d01 (0:1d01)
; background per V-blank. It cycles through which third it draws.
; This transfer is turned off when walking around the map, but is turned
; on when talking to sprites, battling, using menus, etc. This is because
-; the above function, RedrawExposedScreenEdge, is used when walking to
+; the above function, RedrawRowOrColumn, is used when walking to
; improve efficiency.
AutoBgMapTransfer:: ; 1d57 (0:1d57)
ld a,[H_AUTOBGTRANSFERENABLED]
@@ -302,12 +306,11 @@ VBlankCopyDouble::
VBlankCopy::
-; Copy [H_VBCOPYSIZE] 2bpp tiles
+; Copy [H_VBCOPYSIZE] 2bpp tiles (or 16 * [H_VBCOPYSIZE] tile map entries)
; from H_VBCOPYSRC to H_VBCOPYDEST.
-; Source and destination addresses
-; are updated, so transfer can
-; continue in subsequent calls.
+; Source and destination addresses are updated,
+; so transfer can continue in subsequent calls.
ld a, [H_VBCOPYSIZE]
and a
diff --git a/hram.asm b/hram.asm
index 12806771..f5817fa4 100644
--- a/hram.asm
+++ b/hram.asm
@@ -182,7 +182,9 @@ hJoy5 EQU $FFB5
hJoy6 EQU $FFB6
hJoy7 EQU $FFB7
-H_LOADEDROMBANK EQU $FFB8
+H_LOADEDROMBANK EQU $FFB8
+
+hSavedROMBank EQU $FFB9
; is automatic background transfer during V-blank enabled?
; if nonzero, yes
@@ -240,12 +242,12 @@ H_VBCOPYDOUBLEDEST EQU $FFCE
; 00 = no redraw
; 01 = redraw column
; 02 = redraw row
-H_SCREENEDGEREDRAW EQU $FFD0
+hRedrawRowOrColumnMode EQU $FFD0
-REDRAWCOL EQU 1
-REDRAWROW EQU 2
+REDRAW_COL EQU 1
+REDRAW_ROW EQU 2
-H_SCREENEDGEREDRAWADDR EQU $FFD1
+hRedrawRowOrColumnDest EQU $FFD1
hRandomAdd EQU $FFD3
hRandomSub EQU $FFD4
@@ -267,12 +269,25 @@ hMovingBGTilesCounter1 EQU $FFD8
H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10
-hFossilCounter EQU $FFDB
+hItemCounter EQU $FFDB
hGymGateIndex EQU $FFDB
hGymTrashCanRandNumMask EQU $FFDB
+hDexRatingNumMonsSeen EQU $FFDB
+hDexRatingNumMonsOwned EQU $FFDC
+
+; $00 = bag full
+; $01 = got item
+; $80 = didn't meet required number of owned mons
+; $FF = player cancelled
+hOaksAideResult EQU $FFDB
+
+hOaksAideRequirement EQU $FFDB ; required number of owned mons
+hOaksAideRewardItem EQU $FFDC
+hOaksAideNumMonsOwned EQU $FFDD
+
hItemToRemoveID EQU $FFDB
hItemToRemoveIndex EQU $FFDC
@@ -302,5 +317,7 @@ hFlags_0xFFF6 EQU $FFF6
hFieldMoveMonMenuTopMenuItemX EQU $FFF7
+hDisableJoypadPolling EQU $FFF9
+
hJoyInput EQU $FFF8
diff --git a/macros.asm b/macros.asm
index 20a82007..9efb69e5 100644
--- a/macros.asm
+++ b/macros.asm
@@ -104,6 +104,14 @@ dwCoord: MACRO
dw wTileMap + 20 * \2 + \1
ENDM
+;\1 = r
+;\2 = X
+;\3 = Y
+;\4 = map width
+overworldMapCoord: MACRO
+ ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2)))
+ ENDM
+
;\1 = Map Width
;\2 = Rows above (Y-blocks)
;\3 = X movement (X-blocks)
diff --git a/main.asm b/main.asm
index 3d1119fe..f8871466 100755
--- a/main.asm
+++ b/main.asm
@@ -24,7 +24,7 @@ ResetStatusAndHalveMoneyOnBlackout::
xor a
ld [wBattleResult], a
ld [wWalkBikeSurfState], a
- ld [W_ISINBATTLE], a
+ ld [wIsInBattle], a
ld [wMapPalOffset], a
ld [wNPCMovementScriptFunctionNum], a
ld [hJoyHeld], a
@@ -86,7 +86,7 @@ LoadMonData_:
; 2: boxmon
; 3: daycaremon
; Return monster id at wcf91 and its data at wLoadedMon.
-; Also load base stats at W_MONHDEXNUM for convenience.
+; Also load base stats at wMonHeader for convenience.
ld a, [wDayCareMonSpecies]
ld [wcf91], a
@@ -161,7 +161,7 @@ PrintWaitingText:
coord hl, 3, 10
ld b, $1
ld c, $b
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a
jr z, .asm_4c17
call TextBoxBorder
@@ -284,7 +284,7 @@ DetectCollisionBetweenSprites:
ld [hld], a ; zero [$c1ic] (directions in which collisions occurred)
ld a, [$ff91]
- ld [hld], a ; [$c1ib] = adjusted X coordiate
+ ld [hld], a ; [$c1ib] = adjusted X coordinate
ld a, [$ff90]
ld [hl], a ; [$c1ia] = adjusted Y coordinate
@@ -545,10 +545,10 @@ TestBattle:
; Don't mess around
; with obedience.
ld a, %10000000 ; EARTHBADGE
- ld [W_OBTAINEDBADGES], a
+ ld [wObtainedBadges], a
- ld hl, W_FLAGS_D733
- set 0, [hl]
+ ld hl, wFlags_D733
+ set BIT_TEST_BATTLE, [hl]
; Reset the party.
ld hl, wPartyCount
@@ -562,16 +562,16 @@ TestBattle:
ld a, RHYDON
ld [wcf91], a
ld a, 20
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
xor a
ld [wMonDataLocation], a
- ld [W_CURMAP], a
+ ld [wCurMap], a
call AddPartyMon
; Fight against a
; level 20 Rhydon.
ld a, RHYDON
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
predef InitOpponent
@@ -590,7 +590,7 @@ INCLUDE "engine/cable_club.asm"
LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6)
ld de, TrainerInfoTextBoxTileGraphics
ld hl, vChars2 + $760
- lb bc, BANK(TrainerInfoTextBoxTileGraphics), $09
+ lb bc, BANK(TrainerInfoTextBoxTileGraphics), (TrainerInfoTextBoxTileGraphicsEnd - TrainerInfoTextBoxTileGraphics) / $10
jp CopyVideoData
INCLUDE "engine/menu/main_menu.asm"
@@ -655,7 +655,7 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
jr nz, .notFirstMap
ld hl, FirstMapSpec
.copyWarpData
- ld de, W_CURMAP
+ ld de, wCurMap
ld c, $7
.copyWarpDataLoop
ld a, [hli]
@@ -664,11 +664,11 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
dec c
jr nz, .copyWarpDataLoop
ld a, [hli]
- ld [W_CURMAPTILESET], a
+ ld [wCurMapTileset], a
xor a
jr .done
.notFirstMap
- ld a, [wLastMap]
+ ld a, [wLastMap] ; this value is overwritten before it's ever read
ld hl, wd732
bit 4, [hl] ; used dungeon warp (jumped down hole/waterfall)?
jr nz, .usedDunegonWarp
@@ -683,7 +683,7 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
res 4, [hl]
ld a, [wDungeonWarpDestinationMap]
ld b, a
- ld [W_CURMAP], a
+ ld [wCurMap], a
ld a, [wWhichDungeonWarp]
ld c, a
ld hl, DungeonWarpList
@@ -713,7 +713,7 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
ld a, [wDestinationMap]
.usedFlyWarp
ld b, a
- ld [W_CURMAP], a
+ ld [wCurMap], a
ld hl, FlyWarpDataPtr
.flyWarpDataPtrLoop
ld a, [hli]
@@ -737,7 +737,7 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
dec c
jr nz, .copyWarpDataLoop2
xor a ; OVERWORLD
- ld [W_CURMAPTILESET], a
+ ld [wCurMapTileset], a
.done
ld [wYOffsetSinceLastSpecialWarp], a
ld [wXOffsetSinceLastSpecialWarp], a
@@ -765,7 +765,7 @@ SetIshiharaTeam: ; 64ca (1:64ca)
ld [wcf91], a
inc de
ld a, [de]
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
inc de
call AddPartyMon
jr .loop
@@ -966,7 +966,7 @@ SetLastBlackoutMap:
push hl
ld hl, SafariZoneRestHouses
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, a
.loop
ld a, [hli]
@@ -1082,7 +1082,7 @@ DrawStartMenu: ; 710b (1:710b)
ld c,$08
.drawTextBoxBorder
call TextBoxBorder
- ld a,%11001011 ; bit mask for down, up, start, B, and A buttons
+ ld a,D_DOWN | D_UP | START | B_BUTTON | A_BUTTON
ld [wMenuWatchedKeys],a
ld a,$02
ld [wTopMenuItemY],a ; Y position of first menu choice
@@ -1931,7 +1931,7 @@ _RemovePokemon: ; 7b68 (1:7b68)
ld a, [wRemoveMonFromBox]
and a
jr z, .asm_7b74
- ld hl, W_NUMINBOX
+ ld hl, wNumInBox
.asm_7b74
ld a, [hl]
dec a
@@ -1967,7 +1967,7 @@ _RemovePokemon: ; 7b68 (1:7b68)
.asm_7ba6
ld d, h
ld e, l
- ld bc, 11
+ ld bc, NAME_LENGTH
add hl, bc
ld bc, wPartyMonNicks
ld a, [wRemoveMonFromBox]
@@ -2007,12 +2007,12 @@ _RemovePokemon: ; 7b68 (1:7b68)
jr z, .asm_7bfa
ld hl, wBoxMonNicks
.asm_7bfa
- ld bc, 11
+ ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld d, h
ld e, l
- ld bc, 11
+ ld bc, NAME_LENGTH
add hl, bc
ld bc, wPokedexOwned
ld a, [wRemoveMonFromBox]
@@ -2058,7 +2058,7 @@ ClearVariablesAfterLoadingMapData: ; c335 (3:4335)
xor a
ld [H_AUTOBGTRANSFERENABLED], a
ld [wStepCounter], a
- ld [W_LONEATTACKNO], a
+ ld [wLoneAttackNo], a
ld [hJoyPressed], a
ld [hJoyReleased], a
ld [hJoyHeld], a
@@ -2068,7 +2068,7 @@ ClearVariablesAfterLoadingMapData: ; c335 (3:4335)
ld [hli], a
ld [hl], a
ld hl, wWhichTrade
- ld bc, $1e
+ ld bc, wStandingOnWarpPadOrHole - wWhichTrade
call FillMemory
ret
@@ -2080,11 +2080,11 @@ IsPlayerStandingOnWarp: ; c35f (3:435f)
ld c, a
ld hl, wWarpEntries
.loop
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp [hl]
jr nz, .nextWarp1
inc hl
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp [hl]
jr nz, .nextWarp2
inc hl
@@ -2110,11 +2110,11 @@ CheckForceBikeOrSurf: ; c38b (3:438b)
bit 5, [hl]
ret nz
ld hl, ForcedBikeOrSurfMaps
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld d, a
.loop
ld a, [hli]
@@ -2128,15 +2128,15 @@ CheckForceBikeOrSurf: ; c38b (3:438b)
ld a, [hli]
cp c ;compare x-coord
jr nz, .loop ; incorrect x-coord, check next item
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SEAFOAM_ISLANDS_4
ld a, $2
- ld [W_SEAFOAMISLANDS4CURSCRIPT], a
+ ld [wSeafoamIslands4CurScript], a
jr z, .forceSurfing
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SEAFOAM_ISLANDS_5
ld a, $2
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
jr z, .forceSurfing
;force bike riding
ld hl, wd732
@@ -2171,9 +2171,9 @@ IsPlayerFacingEdgeOfMap: ; c3ff (3:43ff)
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
ld de, .asm_c41e
push de
@@ -2191,7 +2191,7 @@ IsPlayerFacingEdgeOfMap: ; c3ff (3:43ff)
dw .facingRight
.facingDown
- ld a, [W_CURMAPHEIGHT]
+ ld a, [wCurMapHeight]
add a
dec a
cp b
@@ -2211,7 +2211,7 @@ IsPlayerFacingEdgeOfMap: ; c3ff (3:43ff)
jr .resetCarry
.facingRight
- ld a, [W_CURMAPWIDTH]
+ ld a, [wCurMapWidth]
add a
dec a
cp c
@@ -2229,7 +2229,7 @@ IsWarpTileInFrontOfPlayer: ; c44e (3:444e)
push de
push bc
call _GetTileAndCoordsInFrontOfPlayer
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SS_ANNE_5
jr z, .ssAnne5
ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
@@ -2284,7 +2284,7 @@ IsPlayerStandingOnDoorTileOrWarpTile: ; c49d (3:449d)
push bc
callba IsPlayerStandingOnDoorTile
jr c, .done
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
add a
ld c, a
ld b, $0
@@ -2308,7 +2308,7 @@ IsPlayerStandingOnDoorTileOrWarpTile: ; c49d (3:449d)
INCLUDE "data/warp_tile_ids.asm"
PrintSafariZoneSteps: ; c52f (3:452f)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp SAFARI_ZONE_EAST
ret c
cp UNKNOWN_DUNGEON_2
@@ -2327,7 +2327,7 @@ PrintSafariZoneSteps: ; c52f (3:452f)
coord hl, 1, 3
ld de, SafariBallText
call PlaceString
- ld a, [W_NUMSAFARIBALLS]
+ ld a, [wNumSafariBalls]
cp 10
jr nc, .asm_c56d
coord hl, 5, 3
@@ -2335,7 +2335,7 @@ PrintSafariZoneSteps: ; c52f (3:452f)
ld [hl], a
.asm_c56d
coord hl, 6, 3
- ld de, W_NUMSAFARIBALLS
+ ld de, wNumSafariBalls
lb bc, 1, 2
jp PrintNumber
@@ -2349,9 +2349,9 @@ GetTileAndCoordsInFrontOfPlayer: ; c586 (3:4586)
call GetPredefRegisters
_GetTileAndCoordsInFrontOfPlayer: ; c589 (3:4589)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld d, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld e, a
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
and a ; cp SPRITE_FACING_DOWN
@@ -2388,7 +2388,7 @@ _GetTileAndCoordsInFrontOfPlayer: ; c589 (3:4589)
GetTileTwoStepsInFrontOfPlayer: ; c5be (3:45be)
xor a
ld [$ffdb], a
- ld hl, W_YCOORD
+ ld hl, wYCoord
ld a, [hli]
ld d, a
ld e, [hl]
@@ -2435,7 +2435,7 @@ GetTileTwoStepsInFrontOfPlayer: ; c5be (3:45be)
CheckForCollisionWhenPushingBoulder: ; c60b (3:460b)
call GetTileTwoStepsInFrontOfPlayer
- ld hl, W_TILESETCOLLISIONPTR
+ ld hl, wTileSetCollisionPtr
ld a, [hli]
ld h, [hl]
ld l, a
@@ -2471,7 +2471,7 @@ CheckForBoulderCollisionWithSprites: ; c636 (3:4636)
ld [$ffdc], a
ld a, [hl] ; map X position
ld [$ffdd], a
- ld a, [W_NUMSPRITES]
+ ld a, [wNumSprites]
ld c, a
ld de, $f
ld hl, wSpriteStateData2 + $14
@@ -2653,7 +2653,7 @@ LoadTilesetHeader: ; c754 (3:4754)
call GetPredefRegisters
push hl
ld d, 0
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
add a
add a
ld b, a
@@ -2665,7 +2665,7 @@ LoadTilesetHeader: ; c754 (3:4754)
ld e, a
ld hl, Tilesets
add hl, de
- ld de, W_TILESETBANK
+ ld de, wTileSetBank
ld c, $b
.copyTilesetHeaderLoop
ld a, [hli]
@@ -2678,7 +2678,7 @@ LoadTilesetHeader: ; c754 (3:4754)
xor a
ld [$ffd8], a
pop hl
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
push hl
push de
ld hl, DungeonTilesets
@@ -2687,7 +2687,7 @@ LoadTilesetHeader: ; c754 (3:4754)
pop de
pop hl
jr c, .asm_c797
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
ld b, a
ld a, [hPreviousTileset]
cp b
@@ -2697,12 +2697,12 @@ LoadTilesetHeader: ; c754 (3:4754)
cp $ff
jr z, .done
call LoadDestinationWarpPosition
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
and $1
- ld [W_YBLOCKCOORD], a
- ld a, [W_XCOORD]
+ ld [wYBlockCoord], a
+ ld a, [wXCoord]
and $1
- ld [W_XBLOCKCOORD], a
+ ld [wXBlockCoord], a
.done
ret
@@ -2711,7 +2711,7 @@ INCLUDE "data/dungeon_tilesets.asm"
INCLUDE "data/tileset_headers.asm"
IncrementDayCareMonExp: ; c8de (3:48de)
- ld a, [W_DAYCARE_IN_USE]
+ ld a, [wDayCareInUse]
and a
ret z
ld hl, wDayCareMonExp + 2
@@ -2751,13 +2751,16 @@ CanMoveBouldersText: ; cdbb (3:4dbb)
TX_FAR _CanMoveBouldersText
db "@"
-CheckForForcedBikeSurf: ; cdc0 (3:4dc0)
+IsSurfingAllowed: ; cdc0 (3:4dc0)
+; Returns whether surfing is allowed in bit 1 of wd728.
+; Surfing isn't allowed on the Cycling Road or in the lowest level of the
+; Seafoam Islands before the current has been slowed with boulders.
ld hl, wd728
set 1, [hl]
ld a, [wd732]
bit 5, a
- jr nz, .asm_cdec
- ld a, [W_CURMAP]
+ jr nz, .forcedToRideBike
+ ld a, [wCurMap]
cp SEAFOAM_ISLANDS_5
ret nz
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
@@ -2769,7 +2772,7 @@ CheckForForcedBikeSurf: ; cdc0 (3:4dc0)
res 1, [hl]
ld hl, CurrentTooFastText
jp PrintText
-.asm_cdec
+.forcedToRideBike
ld hl, wd728
res 1, [hl]
ld hl, CyclingIsFunText
@@ -2799,7 +2802,7 @@ AddItemToInventory_: ; ce04 (3:4e04)
push de
push hl
push hl
- ld d,50 ; PC box can hold 50 items
+ ld d,PC_ITEM_CAPACITY ; how many items the PC can hold
ld a,wNumBagItems & $FF
cp l
jr nz,.checkIfInventoryFull
@@ -2807,7 +2810,7 @@ AddItemToInventory_: ; ce04 (3:4e04)
cp h
jr nz,.checkIfInventoryFull
; if the destination is the bag
- ld d,20 ; bag can hold 20 items
+ ld d,BAG_ITEM_CAPACITY ; how many items the bag can hold
.checkIfInventoryFull
ld a,[hl]
sub d
@@ -2941,7 +2944,7 @@ RemoveItemFromInventory_: ; ce74 (3:4e74)
LoadWildData: ; ceb8 (3:4eb8)
ld hl,WildDataPointers
- ld a,[W_CURMAP]
+ ld a,[wCurMap]
; get wild data for current map
ld c,a
@@ -2952,11 +2955,11 @@ LoadWildData: ; ceb8 (3:4eb8)
ld h,[hl]
ld l,a ; hl now points to wild data for current map
ld a,[hli]
- ld [W_GRASSRATE],a
+ ld [wGrassRate],a
and a
jr z,.NoGrassData ; if no grass data, skip to surfing data
push hl
- ld de,W_GRASSMONS ; otherwise, load grass data
+ ld de,wGrassMons ; otherwise, load grass data
ld bc,$0014
call CopyData
pop hl
@@ -2964,10 +2967,10 @@ LoadWildData: ; ceb8 (3:4eb8)
add hl,bc
.NoGrassData
ld a,[hli]
- ld [W_WATERRATE],a
+ ld [wWaterRate],a
and a
ret z ; if no water data, we're done
- ld de,W_WATERMONS ; otherwise, load surfing data
+ ld de,wWaterMons ; otherwise, load surfing data
ld bc,$0014
jp CopyData
@@ -2997,7 +3000,7 @@ DrawBadges: ; ea03 (3:6a03)
; Alter these based on owned badges.
ld de, wTempObtainedBadgesBooleans
ld hl, wBadgeOrFaceTiles
- ld a, [W_OBTAINEDBADGES]
+ ld a, [wObtainedBadges]
ld b, a
ld c, 8
.CheckBadge
@@ -3103,7 +3106,7 @@ GymLeaderFaceAndBadgeTileGraphics: ; ea9e (3:6a9e)
ReplaceTileBlock: ; ee9e (3:6e9e)
call GetPredefRegisters
ld hl, wOverworldMap
- ld a, [W_CURMAPWIDTH]
+ ld a, [wCurMapWidth]
add $6
ld e, a
ld d, $0
@@ -3145,7 +3148,7 @@ ReplaceTileBlock: ; ee9e (3:6e9e)
ret c ; return if the replaced tile block is above the map view in memory
RedrawMapView: ; eedc (3:6edc)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
inc a
ret z
ld a, [H_AUTOBGTRANSFERENABLED]
@@ -3156,7 +3159,7 @@ RedrawMapView: ; eedc (3:6edc)
ld [H_AUTOBGTRANSFERENABLED], a
ld [hTilesetType], a ; no flower/water BG tile animations
call LoadCurrentMapView
- call GoPAL_SET_CF1C
+ call RunDefaultPaletteCommand
ld hl, wMapViewVRAMPointer
ld a, [hli]
ld h, [hl]
@@ -3184,7 +3187,7 @@ RedrawMapView: ; eedc (3:6edc)
add hl, de
dec a
jr nz, .calcWRAMAddrLoop
- call CopyToScreenEdgeTiles
+ call CopyToRedrawRowOrColumnSrcTiles
pop hl
ld de, $20
ld a, [$ffbe]
@@ -3196,11 +3199,11 @@ RedrawMapView: ; eedc (3:6edc)
or $98
dec c
jr nz, .calcVRAMAddrLoop
- ld [H_SCREENEDGEREDRAWADDR + 1], a
+ ld [hRedrawRowOrColumnDest + 1], a
ld a, l
- ld [H_SCREENEDGEREDRAWADDR], a
- ld a, REDRAWROW
- ld [H_SCREENEDGEREDRAW], a
+ ld [hRedrawRowOrColumnDest], a
+ ld a, REDRAW_ROW
+ ld [hRedrawRowOrColumnMode], a
call DelayFrame
ld hl, $ffbe
inc [hl]
@@ -3226,16 +3229,16 @@ CompareHLWithBC: ; ef4e (3:6f4e)
INCLUDE "engine/overworld/cut.asm"
MarkTownVisitedAndLoadMissableObjects: ; f113 (3:7113)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
cp ROUTE_1
jr nc, .notInTown
ld c, a
ld b, FLAG_SET
- ld hl, W_TOWNVISITEDFLAG ; mark town as visited (for flying)
+ ld hl, wTownVisitedFlag ; mark town as visited (for flying)
predef FlagActionPredef
.notInTown
ld hl, MapHSPointers
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, $0
ld c, a
add hl, bc
@@ -3268,11 +3271,11 @@ LoadMissableObjects: ; f132 (3:7132)
ld [H_DIVISOR], a
ld b, $2
call Divide ; divide difference by 3, resulting in the global offset (number of missable items before ours)
- ld a, [W_CURMAP]
+ ld a, [wCurMap]
ld b, a
ld a, [H_DIVIDEND+3]
ld c, a ; store global offset in c
- ld de, W_MISSABLEOBJECTLIST
+ ld de, wMissableObjectList
pop hl
.writeMissableObjectsListLoop
ld a, [hli]
@@ -3295,8 +3298,8 @@ LoadMissableObjects: ; f132 (3:7132)
ret
InitializeMissableObjectsFlags: ; f175 (3:7175)
- ld hl, W_MISSABLEOBJECTFLAGS
- ld bc, $20
+ ld hl, wMissableObjectFlags
+ ld bc, wMissableObjectFlagsEnd - wMissableObjectFlags
xor a
call FillMemory ; clear missable objects flags
ld hl, MapHS00
@@ -3311,7 +3314,7 @@ InitializeMissableObjectsFlags: ; f175 (3:7175)
ld a, [hl]
cp Hide
jr nz, .skip
- ld hl, W_MISSABLEOBJECTFLAGS
+ ld hl, wMissableObjectFlags
ld a, [wMissableObjectCounter]
ld c, a
ld b, FLAG_SET
@@ -3329,7 +3332,7 @@ IsObjectHidden: ; f1a6 (3:71a6)
ld a, [H_CURRENTSPRITEOFFSET]
swap a
ld b, a
- ld hl, W_MISSABLEOBJECTLIST
+ ld hl, wMissableObjectList
.loop
ld a, [hli]
cp $ff
@@ -3339,7 +3342,7 @@ IsObjectHidden: ; f1a6 (3:71a6)
jr nz, .loop
ld c, a
ld b, FLAG_TEST
- ld hl, W_MISSABLEOBJECTFLAGS
+ ld hl, wMissableObjectFlags
call MissableObjectFlagAction
ld a, c
and a
@@ -3354,7 +3357,7 @@ IsObjectHidden: ; f1a6 (3:71a6)
; [wMissableObjectIndex]: index of the missable object to be added (global index)
ShowObject: ; f1c8 (3:71c8)
ShowObject2:
- ld hl, W_MISSABLEOBJECTFLAGS
+ ld hl, wMissableObjectFlags
ld a, [wMissableObjectIndex]
ld c, a
ld b, FLAG_RESET
@@ -3364,7 +3367,7 @@ ShowObject2:
; removes missable object (items, leg. pokemon, etc.) from the map
; [wMissableObjectIndex]: index of the missable object to be removed (global index)
HideObject: ; f1d7 (3:71d7)
- ld hl, W_MISSABLEOBJECTFLAGS
+ ld hl, wMissableObjectFlags
ld a, [wMissableObjectIndex]
ld c, a
ld b, FLAG_SET
@@ -3587,7 +3590,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
ld d, h
ld e, l
ld hl, wPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wMonDataLocation]
and a
@@ -3616,7 +3619,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
ld a, [wcf91]
ld [wd0b5], a
call GetMonHeader
- ld hl, W_MONHEADER
+ ld hl, wMonHeader
ld a, [hli]
ld [de], a ; species
inc de
@@ -3655,7 +3658,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
pop hl
push hl
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
and a ; is this a wild mon caught in battle?
jr nz, .copyEnemyMonData
@@ -3710,7 +3713,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
ld [de], a
inc de
.copyMonTypesAndMoves
- ld hl, W_MONHTYPES
+ ld hl, wMonHTypes
ld a, [hli] ; type 1
ld [de], a
inc de
@@ -3719,7 +3722,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
inc de
ld a, [hli] ; catch rate (held item in gen 2)
ld [de], a
- ld hl, W_MONHMOVES
+ ld hl, wMonHMoves
ld a, [hli]
inc de
push de
@@ -3748,7 +3751,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
inc de
ld [de], a
push de
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld d, a
callab CalcExperience
pop de
@@ -3773,10 +3776,10 @@ _AddPartyMon: ; f2e5 (3:72e5)
pop hl
call AddPartyMon_WriteMovePP
inc de
- ld a, [W_CURENEMYLVL]
+ ld a, [wCurEnemyLVL]
ld [de], a
inc de
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
dec a
jr nz, .calcFreshStats
ld hl, wEnemyMonMaxHP
@@ -3808,7 +3811,7 @@ AddPartyMon_WriteMovePP: ; f476 (3:7476)
push de
push bc
ld hl, Moves
- ld bc, $6
+ ld bc, MoveEnd - Moves
call AddNTimes
ld de, wcd6d
ld a, BANK(Moves)
@@ -3858,7 +3861,7 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d)
ld hl, wEnemyMonOT
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData ; write new mon's OT name (from an enemy mon)
ld hl, wPartyMonNicks
ld a, [wPartyCount]
@@ -3869,7 +3872,7 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d)
ld hl, wEnemyMonNicks
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData ; write new mon's nickname (from an enemy mon)
ld a, [wcf91]
ld [wd11e], a
@@ -3896,7 +3899,7 @@ _MoveMon: ; f51e (3:751e)
cp PARTY_TO_DAYCARE
ld hl, wDayCareMon
jr z, .asm_f575
- ld hl, W_NUMINBOX
+ ld hl, wNumInBox
ld a, [hl]
cp MONS_PER_BOX
jr nz, .partyOrBoxNotFull
@@ -3931,7 +3934,7 @@ _MoveMon: ; f51e (3:751e)
jr nz, .skipToNewMonEntry
ld hl, wBoxMons
ld bc, wBoxMon2 - wBoxMon1 ; $21
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
.skipToNewMonEntry
dec a
call AddNTimes
@@ -3974,14 +3977,14 @@ _MoveMon: ; f51e (3:751e)
.asm_f5b4
ld a, [wMoveMonType]
cp PARTY_TO_DAYCARE
- ld de, W_DAYCAREMONOT
+ ld de, wDayCareMonOT
jr z, .asm_f5d3
dec a
ld hl, wPartyMonOT
ld a, [wPartyCount]
jr nz, .asm_f5cd
ld hl, wBoxMonOT
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
.asm_f5cd
dec a
call SkipFixedLengthTextEntries
@@ -3992,7 +3995,7 @@ _MoveMon: ; f51e (3:751e)
ld a, [wMoveMonType]
and a
jr z, .asm_f5e6
- ld hl, W_DAYCAREMONOT
+ ld hl, wDayCareMonOT
cp DAYCARE_TO_PARTY
jr z, .asm_f5ec
ld hl, wPartyMonOT
@@ -4000,18 +4003,18 @@ _MoveMon: ; f51e (3:751e)
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
.asm_f5ec
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wMoveMonType]
cp PARTY_TO_DAYCARE
- ld de, W_DAYCAREMONNAME
+ ld de, wDayCareMonName
jr z, .asm_f611
dec a
ld hl, wPartyMonNicks
ld a, [wPartyCount]
jr nz, .asm_f60b
ld hl, wBoxMonNicks
- ld a, [W_NUMINBOX]
+ ld a, [wNumInBox]
.asm_f60b
dec a
call SkipFixedLengthTextEntries
@@ -4022,7 +4025,7 @@ _MoveMon: ; f51e (3:751e)
ld a, [wMoveMonType]
and a
jr z, .asm_f624
- ld hl, W_DAYCAREMONNAME
+ ld hl, wDayCareMonName
cp DAYCARE_TO_PARTY
jr z, .asm_f62a
ld hl, wPartyMonNicks
@@ -4030,7 +4033,7 @@ _MoveMon: ; f51e (3:751e)
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
.asm_f62a
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
pop hl
ld a, [wMoveMonType]
@@ -4045,7 +4048,7 @@ _MoveMon: ; f51e (3:751e)
call LoadMonData
callba CalcLevelFromExperience
ld a, d
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
pop hl
ld bc, wBoxMon2 - wBoxMon1
add hl, bc
@@ -4173,7 +4176,7 @@ HealParty:
push bc
ld hl, Moves
- ld bc, 6
+ ld bc, MoveEnd - Moves
call AddNTimes
ld de, wcd6d
ld a, BANK(Moves)
@@ -4467,7 +4470,7 @@ InitPlayerData2:
ld hl, wPartyCount
call InitializeEmptyList
- ld hl, W_NUMINBOX
+ ld hl, wNumInBox
call InitializeEmptyList
ld hl, wNumBagItems
call InitializeEmptyList
@@ -4485,7 +4488,7 @@ START_MONEY EQU $3000
ld [wMonDataLocation], a
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
ld [hli], a
ld [hl], a
@@ -4494,8 +4497,8 @@ START_MONEY EQU $3000
ld [hli], a
ld [hl], a
- ld hl, W_GAMEPROGRESSFLAGS
- ld bc, $c8
+ ld hl, wGameProgressFlags
+ ld bc, wGameProgressFlagsEnd - wGameProgressFlags
call FillMemory ; clear all game progress flags
jp InitializeMissableObjectsFlags
@@ -4508,21 +4511,23 @@ InitializeEmptyList:
ret
-IsItemInBag_: ; f8a5 (3:78a5)
+GetQuantityOfItemInBag: ; f8a5 (3:78a5)
+; In: b = item ID
+; Out: b = how many of that item are in the bag
call GetPredefRegisters
ld hl, wNumBagItems
-.asm_f8ab
+.loop
inc hl
ld a, [hli]
cp $ff
- jr z, .asm_f8b7
+ jr z, .notInBag
cp b
- jr nz, .asm_f8ab
+ jr nz, .loop
ld a, [hl]
ld b, a
ret
-.asm_f8b7
- ld b, $0
+.notInBag
+ ld b, 0
ret
FindPathToPlayer: ; f8ba (3:78ba)
@@ -4767,17 +4772,26 @@ SECTION "Graphics", ROMX, BANK[GFX]
PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp"
FontGraphics: INCBIN "gfx/font.1bpp"
+FontGraphicsEnd:
ABTiles: INCBIN "gfx/AB.2bpp"
HpBarAndStatusGraphics: INCBIN "gfx/hp_bar_and_status.2bpp"
+HpBarAndStatusGraphicsEnd:
BattleHudTiles1: INCBIN "gfx/battle_hud1.1bpp"
+BattleHudTiles1End:
BattleHudTiles2: INCBIN "gfx/battle_hud2.1bpp"
BattleHudTiles3: INCBIN "gfx/battle_hud3.1bpp"
+BattleHudTiles3End:
NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.2bpp"
GamefreakLogoGraphics: INCBIN "gfx/gamefreak.2bpp"
+GamefreakLogoGraphicsEnd:
TextBoxGraphics: INCBIN "gfx/text_box.2bpp"
+TextBoxGraphicsEnd:
PokedexTileGraphics: INCBIN "gfx/pokedex.2bpp"
+PokedexTileGraphicsEnd:
WorldMapTileGraphics: INCBIN "gfx/town_map.2bpp"
+WorldMapTileGraphicsEnd:
PlayerCharacterTitleGraphics: INCBIN "gfx/player_title.2bpp"
+PlayerCharacterTitleGraphicsEnd:
SECTION "Battle (bank 4)", ROMX, BANK[$4]
@@ -5337,6 +5351,7 @@ SECTION "Battle (bank B)", ROMX, BANK[$B]
INCLUDE "engine/battle/display_effectiveness.asm"
TrainerInfoTextBoxTileGraphics: INCBIN "gfx/trainer_info.2bpp"
+TrainerInfoTextBoxTileGraphicsEnd:
BlankLeaderNames: INCBIN "gfx/blank_leader_names.2bpp"
CircleTile: INCBIN "gfx/circle_tile.2bpp"
BadgeNumbersTileGraphics: INCBIN "gfx/badge_numbers.2bpp"
@@ -5498,10 +5513,12 @@ INCLUDE "engine/battle/draw_hud_pokeball_gfx.asm"
TradingAnimationGraphics:
INCBIN "gfx/game_boy.2bpp"
INCBIN "gfx/link_cable.2bpp"
+TradingAnimationGraphicsEnd:
TradingAnimationGraphics2:
; Pokeball traveling through the link cable.
INCBIN "gfx/trade2.2bpp"
+TradingAnimationGraphics2End:
INCLUDE "engine/evos_moves.asm"
INCLUDE "engine/battle/moveEffects/heal_effect.asm"
@@ -6487,6 +6504,7 @@ ENDC
IF DEF(_BLUE)
INCBIN "gfx/blue/blueversion.1bpp" ; 8 tiles
ENDC
+Version_GFXEnd:
Dojo_GFX:
Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp"
diff --git a/scripts/agatha.asm b/scripts/agatha.asm
index 1e34c99c..674bbcdc 100755
--- a/scripts/agatha.asm
+++ b/scripts/agatha.asm
@@ -1,33 +1,33 @@
AgathaScript: ; 7642d (1d:642d)
- call AgathaScript_76443
+ call AgathaShowOrHideExitBlock
call EnableAutoTextBoxDrawing
ld hl, AgathaTrainerHeaders
ld de, AgathaScriptPointers
- ld a, [W_AGATHACURSCRIPT]
+ ld a, [wAgathaCurScript]
call ExecuteCurMapScriptInTable
- ld [W_AGATHACURSCRIPT], a
+ ld [wAgathaCurScript], a
ret
-AgathaScript_76443: ; 76443 (1d:6443)
- ld hl, wd126
+AgathaShowOrHideExitBlock: ; 76443 (1d:6443)
+; Blocks or clears the exit to the next room.
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
- jr z, .asm_76457
+ jr z, .blockExitToNextRoom
ld a, $e
- jp AgathaScript_76459
-.asm_76457
+ jp .setExitBlock
+.blockExitToNextRoom
ld a, $3b
-
-AgathaScript_76459: ; 76459 (1d:6459)
+.setExitBlock:
ld [wNewTileBlockID], a
lb bc, 0, 2
predef_jump ReplaceTileBlock
-AgathaScript_76464: ; 76464 (1d:6464)
+ResetAgathaScript: ; 76464 (1d:6464)
xor a
- ld [W_AGATHACURSCRIPT], a
+ ld [wAgathaCurScript], a
ret
AgathaScriptPointers: ; 76469 (1d:6469)
@@ -40,7 +40,8 @@ AgathaScriptPointers: ; 76469 (1d:6469)
AgathaScript4: ; 76473 (1d:6473)
ret
-AgathaScript_76474: ; 76474 (1d:6474)
+AgathaScriptWalkIntoRoom: ; 76474 (1d:6474)
+; Walk six steps upward.
ld hl, wSimulatedJoypadStatesEnd
ld a, D_UP
ld [hli], a
@@ -53,12 +54,12 @@ AgathaScript_76474: ; 76474 (1d:6474)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_AGATHACURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wAgathaCurScript], a
+ ld [wCurMapScript], a
ret
AgathaScript0: ; 76490 (1d:6490)
- ld hl, CoordsData_764d1
+ ld hl, AgathaEntranceCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
@@ -67,25 +68,25 @@ AgathaScript0: ; 76490 (1d:6490)
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
ld a, [wCoordIndex]
- cp $3
- jr c, .asm_764b4
+ cp $3 ; Is player standing one tile above the exit?
+ jr c, .stopPlayerFromLeaving
CheckAndSetEvent EVENT_AUTOWALKED_INTO_AGATHAS_ROOM
- jr z, AgathaScript_76474
-.asm_764b4
+ jr z, AgathaScriptWalkIntoRoom
+.stopPlayerFromLeaving
ld a, $2
ld [hSpriteIndexOrTextID], a
- call DisplayTextID
+ call DisplayTextID ; "Don't run away!"
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_AGATHACURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wAgathaCurScript], a
+ ld [wCurMapScript], a
ret
-CoordsData_764d1: ; 764d1 (1d:64d1)
+AgathaEntranceCoords: ; 764d1 (1d:64d1)
db $0A,$04
db $0A,$05
db $0B,$04
@@ -99,20 +100,20 @@ AgathaScript3: ; 764da (1d:64da)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_AGATHACURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wAgathaCurScript], a
+ ld [wCurMapScript], a
ret
AgathaScript2: ; 764ed (1d:64ed)
call EndTrainerBattle
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
- jp z, AgathaScript_76464
+ jp z, ResetAgathaScript
ld a, $1
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $1
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
AgathaTextPointers: ; 76505 (1d:6505)
diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm
index cf717b43..e639caf9 100755
--- a/scripts/bikeshop.asm
+++ b/scripts/bikeshop.asm
@@ -39,7 +39,7 @@ BikeShopText1: ; 1d745 (7:5745)
xor a
ld [wCurrentMenuItem], a
ld [wLastMenuItem], a
- ld a, $3
+ ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
ld a, $1
ld [wMaxMenuItem], a
@@ -64,16 +64,16 @@ BikeShopText1: ; 1d745 (7:5745)
call PrintText
call HandleMenuInput
bit 1, a
- jr nz, .asm_b7579
+ jr nz, .cancel
ld hl, wd730
res 6, [hl]
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_b7579
- ld hl, BikeShopText_1d81a
+ jr nz, .cancel
+ ld hl, BikeShopCantAffordText
call PrintText
-.asm_b7579
- ld hl, BikeShopText_1d82a
+.cancel
+ ld hl, BikeShopComeAgainText
call PrintText
.Done
jp TextScriptEnd
@@ -93,8 +93,8 @@ BikeShopText_1d815: ; 1d815 (7:5815)
TX_FAR _BikeShopText_1d815
db "@"
-BikeShopText_1d81a: ; 1d81a (7:581a)
- TX_FAR _BikeShopText_1d81a
+BikeShopCantAffordText: ; 1d81a (7:581a)
+ TX_FAR _BikeShopCantAffordText
db "@"
BikeShopText_1d81f: ; 1d81f (7:581f)
@@ -105,8 +105,8 @@ BikeShopText_1d824: ; 1d824 (7:5824)
TX_FAR _BikeShopText_1d824
db $11, "@"
-BikeShopText_1d82a: ; 1d82a (7:582a)
- TX_FAR _BikeShopText_1d82a
+BikeShopComeAgainText: ; 1d82a (7:582a)
+ TX_FAR _BikeShopComeAgainText
db "@"
BikeShopText_1d82f: ; 1d82f (7:582f)
diff --git a/scripts/billshouse.asm b/scripts/billshouse.asm
index 08ac98d6..04d3ee60 100755
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -1,6 +1,6 @@
BillsHouseScript: ; 1e76a (7:676a)
call EnableAutoTextBoxDrawing
- ld a, [W_BILLSHOUSECURSCRIPT]
+ ld a, [wBillsHouseCurScript]
ld hl, BillsHouseScriptPointers
jp CallFunctionInTable
@@ -26,7 +26,7 @@ BillsHouseScript1: ; 1e783 (7:6783)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $2
- ld [W_BILLSHOUSECURSCRIPT], a
+ ld [wBillsHouseCurScript], a
ret
MovementData_1e79c: ; 1e79c (7:679c)
@@ -55,7 +55,7 @@ BillsHouseScript2: ; 1e7a6 (7:67a6)
xor a
ld [wJoyIgnore], a
ld a, $3
- ld [W_BILLSHOUSECURSCRIPT], a
+ ld [wBillsHouseCurScript], a
ret
BillsHouseScript3: ; 1e7c5 (7:67c5)
@@ -84,7 +84,7 @@ BillsHouseScript3: ; 1e7c5 (7:67c5)
ld de, MovementData_1e807
call MoveSprite
ld a, $4
- ld [W_BILLSHOUSECURSCRIPT], a
+ ld [wBillsHouseCurScript], a
ret
MovementData_1e807: ; 1e807 (7:6807)
@@ -104,7 +104,7 @@ BillsHouseScript4: ; 1e80d (7:680d)
SetEvent EVENT_MET_BILL_2 ; this event seems redundant
SetEvent EVENT_MET_BILL
ld a, $0
- ld [W_BILLSHOUSECURSCRIPT], a
+ ld [wBillsHouseCurScript], a
ret
BillsHouseScript5: ; 1e827 (7:6827)
@@ -112,7 +112,7 @@ BillsHouseScript5: ; 1e827 (7:6827)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $0
- ld [W_BILLSHOUSECURSCRIPT], a
+ ld [wBillsHouseCurScript], a
ret
BillsHouseTextPointers: ; 1e834 (7:6834)
@@ -136,7 +136,7 @@ BillsHouseText1: ; 1e83d (7:683d)
ld hl, BillsHouseText_1e86a
call PrintText
ld a, $1
- ld [W_BILLSHOUSECURSCRIPT], a
+ ld [wBillsHouseCurScript], a
jr .asm_1e862
.asm_1e85a
ld hl, BillsHouseText_1e86f
@@ -163,7 +163,7 @@ BillsHouseText2: ; 1e874 (7:6874)
jr nz, .asm_1e8a9
ld hl, BillThankYouText
call PrintText
- lb bc, S_S__TICKET, 1
+ lb bc, S_S_TICKET, 1
call GiveItem
jr nc, .BagFull
ld hl, SSTicketReceivedText
diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm
index 6aa2eaec..eadcd388 100755
--- a/scripts/blueshouse.asm
+++ b/scripts/blueshouse.asm
@@ -1,7 +1,7 @@
BluesHouseScript: ; 19b3b (6:5b3b)
call EnableAutoTextBoxDrawing
ld hl,BluesHouseScriptPointers
- ld a,[W_BLUESHOUSECURSCRIPT]
+ ld a,[wBluesHouseCurScript]
jp CallFunctionInTable
BluesHouseScriptPointers: ; 19b47 (6:5b47)
@@ -13,7 +13,7 @@ BluesHouseScript0: ; 19b4b (6:5b4b)
; trigger the next script
ld a,1
- ld [W_BLUESHOUSECURSCRIPT],a
+ ld [wBluesHouseCurScript],a
ret
BluesHouseScript1: ; 19b56 (6:5b56)
diff --git a/scripts/bruno.asm b/scripts/bruno.asm
index bdfd7e24..82551af6 100755
--- a/scripts/bruno.asm
+++ b/scripts/bruno.asm
@@ -1,33 +1,33 @@
BrunoScript: ; 762d6 (1d:62d6)
- call BrunoScript_762ec
+ call BrunoShowOrHideExitBlock
call EnableAutoTextBoxDrawing
ld hl, BrunoTrainerHeaders
ld de, BrunoScriptPointers
- ld a, [W_BRUNOCURSCRIPT]
+ ld a, [wBrunoCurScript]
call ExecuteCurMapScriptInTable
- ld [W_BRUNOCURSCRIPT], a
+ ld [wBrunoCurScript], a
ret
-BrunoScript_762ec: ; 762ec (1d:62ec)
- ld hl, wd126
+BrunoShowOrHideExitBlock: ; 762ec (1d:62ec)
+; Blocks or clears the exit to the next room.
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
- jr z, .asm_76300
+ jr z, .blockExitToNextRoom
ld a, $5
- jp BrunoScript_76302
-.asm_76300
+ jp .setExitBlock
+.blockExitToNextRoom
ld a, $24
-
-BrunoScript_76302: ; 76302 (1d:6302)
+.setExitBlock
ld [wNewTileBlockID], a
lb bc, 0, 2
predef_jump ReplaceTileBlock
-BrunoScript_7630d: ; 7630d (1d:630d)
+ResetBrunoScript: ; 7630d (1d:630d)
xor a
- ld [W_BRUNOCURSCRIPT], a
+ ld [wBrunoCurScript], a
ret
BrunoScriptPointers: ; 76312 (1d:6312)
@@ -40,7 +40,8 @@ BrunoScriptPointers: ; 76312 (1d:6312)
BrunoScript4: ; 7631c (1d:631c)
ret
-BrunoScript_7631d: ; 7631d (1d:631d)
+BrunoScriptWalkIntoRoom: ; 7631d (1d:631d)
+; Walk six steps upward.
ld hl, wSimulatedJoypadStatesEnd
ld a, D_UP
ld [hli], a
@@ -53,12 +54,12 @@ BrunoScript_7631d: ; 7631d (1d:631d)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_BRUNOCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wBrunoCurScript], a
+ ld [wCurMapScript], a
ret
BrunoScript0: ; 76339 (1d:6339)
- ld hl, CoordsData_7637a
+ ld hl, BrunoEntranceCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
@@ -67,25 +68,25 @@ BrunoScript0: ; 76339 (1d:6339)
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
ld a, [wCoordIndex]
- cp $3
- jr c, .asm_7635d
+ cp $3 ; Is player standing one tile above the exit?
+ jr c, .stopPlayerFromLeaving
CheckAndSetEvent EVENT_AUTOWALKED_INTO_BRUNOS_ROOM
- jr z, BrunoScript_7631d
-.asm_7635d
+ jr z, BrunoScriptWalkIntoRoom
+.stopPlayerFromLeaving
ld a, $2
ld [hSpriteIndexOrTextID], a
- call DisplayTextID
+ call DisplayTextID ; "Don't run away!"
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_BRUNOCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wBrunoCurScript], a
+ ld [wCurMapScript], a
ret
-CoordsData_7637a: ; 7637a (1d:637a)
+BrunoEntranceCoords: ; 7637a (1d:637a)
db $0A,$04
db $0A,$05
db $0B,$04
@@ -99,15 +100,15 @@ BrunoScript3: ; 76383 (1d:6383)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_BRUNOCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wBrunoCurScript], a
+ ld [wCurMapScript], a
ret
BrunoScript2: ; 76396 (1d:6396)
call EndTrainerBattle
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
- jp z, BrunoScript_7630d
+ jp z, ResetBrunoScript
ld a, $1
ld [hSpriteIndexOrTextID], a
jp DisplayTextID
diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm
index 787a2f3d..9a6dcd6d 100755
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -3,11 +3,11 @@ CeladonGameCornerScript: ; 48bbd (12:4bbd)
call CeladonGameCornerScript_48bec
call EnableAutoTextBoxDrawing
ld hl, CeladonGameCornerScriptPointers
- ld a, [W_CELADONGAMECORNERCURSCRIPT]
+ ld a, [wCeladonGameCornerCurScript]
jp CallFunctionInTable
CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
@@ -24,7 +24,7 @@ CeladonGameCornerScript_48bcf: ; 48bcf (12:4bcf)
ret
CeladonGameCornerScript_48bec: ; 48bec (12:4bec)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -38,8 +38,8 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec)
CeladonGameCornerScript_48c07: ; 48c07 (12:4c07)
xor a
ld [wJoyIgnore], a
- ld [W_CELADONGAMECORNERCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCeladonGameCornerCurScript], a
+ ld [wCurMapScript], a
ret
CeladonGameCornerScriptPointers: ; 48c12 (12:4c12)
@@ -51,7 +51,7 @@ CeladonGameCornerScript0: ; 48c18 (12:4c18)
ret
CeladonGameCornerScript1: ; 48c19 (12:4c19)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CeladonGameCornerScript_48c07
ld a, $f0
@@ -63,13 +63,13 @@ CeladonGameCornerScript1: ; 48c19 (12:4c19)
ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF
ld de, MovementData_48c5a
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $6
jr nz, .asm_48c43
ld de, MovementData_48c63
jr .asm_48c4d
.asm_48c43
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $8
jr nz, .asm_48c4d
ld de, MovementData_48c63
@@ -78,7 +78,7 @@ CeladonGameCornerScript1: ; 48c19 (12:4c19)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $2
- ld [W_CELADONGAMECORNERCURSCRIPT], a
+ ld [wCeladonGameCornerCurScript], a
ret
MovementData_48c5a: ; 48c5a (12:4c5a)
@@ -109,11 +109,11 @@ CeladonGameCornerScript2: ; 48c69 (12:4c69)
ld a, HS_GAME_CORNER_ROCKET
ld [wMissableObjectIndex], a
predef HideObject
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
ld a, $0
- ld [W_CELADONGAMECORNERCURSCRIPT], a
+ ld [wCeladonGameCornerCurScript], a
ret
CeladonGameCornerTextPointers: ; 48c8a (12:4c8a)
@@ -424,7 +424,7 @@ CeladonGameCornerText11: ; 48e9d (12:4e9d)
ld [hJoyPressed], a
ld [hJoyReleased], a
ld a, $1
- ld [W_CELADONGAMECORNERCURSCRIPT], a
+ ld [wCeladonGameCornerCurScript], a
jp TextScriptEnd
CeladonGameCornerText_48ece: ; 48ece (12:4ece)
diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm
index 64e85ff7..a9c017d0 100755
--- a/scripts/celadongym.asm
+++ b/scripts/celadongym.asm
@@ -1,14 +1,14 @@
CeladonGymScript: ; 4890a (12:490a)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, CeladonGymScript_48927
call EnableAutoTextBoxDrawing
ld hl, CeladonGymTrainerHeaders
ld de, CeladonGymScriptPointers
- ld a, [W_CELADONGYMCURSCRIPT]
+ ld a, [wCeladonGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_CELADONGYMCURSCRIPT], a
+ ld [wCeladonGymCurScript], a
ret
CeladonGymScript_48927: ; 48927 (12:4927)
@@ -25,8 +25,8 @@ Gym4LeaderName: ; 4893d (12:493d)
CeladonGymText_48943: ; 48943 (12:4943)
xor a
ld [wJoyIgnore], a
- ld [W_CELADONGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCeladonGymCurScript], a
+ ld [wCurMapScript], a
ret
CeladonGymScriptPointers: ; 4894e (12:494e)
@@ -36,7 +36,7 @@ CeladonGymScriptPointers: ; 4894e (12:494e)
dw CeladonGymScript3
CeladonGymScript3: ; 48956 (12:4956)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CeladonGymText_48943
ld a, $f0
@@ -60,7 +60,7 @@ CeladonGymText_48963: ; 48963 (12:4963)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_4898c
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 3, [hl]
ld hl, wBeatGymFlags
set 3, [hl]
@@ -176,10 +176,10 @@ CeladonGymText1: ; 48a11 (12:4a11)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $4
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
ld a, $3
- ld [W_CELADONGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCeladonGymCurScript], a
+ ld [wCurMapScript], a
.asm_48a5b
jp TextScriptEnd
diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm
index 0dadd20a..11a8646d 100755
--- a/scripts/celadonmansion3.asm
+++ b/scripts/celadonmansion3.asm
@@ -30,7 +30,7 @@ DirectorText: ; 487b2 (12:47b2)
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
- ld a, [wd11e]
+ ld a, [wNumSetBits]
cp 150
jr nc, .CompletedDex
ld hl, .GameDesigner
diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm
index 53f1f434..e693d9fe 100755
--- a/scripts/celadonmartelevator.asm
+++ b/scripts/celadonmartelevator.asm
@@ -1,5 +1,5 @@
CeladonMartElevatorScript: ; 48600 (12:4600)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
@@ -35,13 +35,17 @@ CeladonMartElevatorScript_48631: ; 48631 (12:4631)
ld hl, CeladonMartElavatorFloors
call LoadItemList
ld hl, CeldaonMartElevatorWarpMaps
- ld de, wcc5b
- ld bc, $000a
+ ld de, wElevatorWarpMaps
+ ld bc, CeldaonMartElevatorWarpMapsEnd - CeldaonMartElevatorWarpMaps
jp CopyData
CeladonMartElavatorFloors: ; 48643 (12:4643)
db $05 ; num elements in list
- db $56, $57, $58, $59, $5A ; "1F", "2F", "3F", "4F, "5F"
+ db FLOOR_1F
+ db FLOOR_2F
+ db FLOOR_3F
+ db FLOOR_4F
+ db FLOOR_5F
db $FF ; terminator
CeldaonMartElevatorWarpMaps: ; 4864a (12:464a)
@@ -53,6 +57,7 @@ CeldaonMartElevatorWarpMaps: ; 4864a (12:464a)
db $02, CELADON_MART_3
db $02, CELADON_MART_4
db $02, CELADON_MART_5
+CeldaonMartElevatorWarpMapsEnd:
CeladonMartElevatorScript_48654: ; 48654 (12:4654)
jpba ShakeElevator
diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm
index 8eeb5d2b..439ab62e 100755
--- a/scripts/celadonmartroof.asm
+++ b/scripts/celadonmartroof.asm
@@ -1,34 +1,35 @@
CeladonMartRoofScript: ; 483d5 (12:43d5)
jp EnableAutoTextBoxDrawing
-CeladonMartRoofScript_483d8: ; 483d8 (12:43d8)
+CeladonMartRoofScript_GetDrinksInBag: ; 483d8 (12:43d8)
+; construct a list of all drinks in the player's bag
xor a
- ld [wcd37], a
- ld de, wcc5b
+ ld [wFilteredBagItemsCount], a
+ ld de, wFilteredBagItems
ld hl, CeladonMartRoofDrinkList
-.asm_483e2
+.loop
ld a, [hli]
and a
- jr z, .asm_48404
+ jr z, .done
push hl
push de
ld [wd11e], a
ld b, a
- predef IsItemInBag_
+ predef GetQuantityOfItemInBag
pop de
pop hl
ld a, b
and a
- jr z, .asm_483e2
+ jr z, .loop ; if the item isn't in the bag
ld a, [wd11e]
ld [de], a
inc de
push hl
- ld hl, wcd37
+ ld hl, wFilteredBagItemsCount
inc [hl]
pop hl
- jr .asm_483e2
-.asm_48404
+ jr .loop
+.done
ld a, $ff
ld [de], a
ret
@@ -39,92 +40,93 @@ CeladonMartRoofDrinkList: ; 48408 (12:4408)
db LEMONADE
db $00
-CeladonMartRoofScript_4840c: ; 4840c (12:440c)
+CeladonMartRoofScript_GiveDrinkToGirl: ; 4840c (12:440c)
ld hl, wd730
set 6, [hl]
ld hl, CeladonMartRoofText_484ee
call PrintText
xor a
ld [wCurrentMenuItem], a
- ld a, $3
+ ld a, A_BUTTON | B_BUTTON
ld [wMenuWatchedKeys], a
- ld a, [wcd37]
+ ld a, [wFilteredBagItemsCount]
dec a
ld [wMaxMenuItem], a
- ld a, $2
+ ld a, 2
ld [wTopMenuItemY], a
- ld a, $1
+ ld a, 1
ld [wTopMenuItemX], a
- ld a, [wcd37]
+ ld a, [wFilteredBagItemsCount]
dec a
- ld bc, $2
- ld hl, $3
+ ld bc, 2
+ ld hl, 3
call AddNTimes
dec l
ld b, l
- ld c, $c
+ ld c, 12
coord hl, 0, 0
call TextBoxBorder
call UpdateSprites
- call CeladonMartRoofScript_48532
+ call CeladonMartRoofScript_PrintDrinksInBag
ld hl, wd730
res 6, [hl]
call HandleMenuInput
- bit 1, a
+ bit 1, a ; pressed b
ret nz
- ld hl, wcc5b
+ ld hl, wFilteredBagItems
ld a, [wCurrentMenuItem]
- ld d, $0
+ ld d, 0
ld e, a
add hl, de
ld a, [hl]
- ld [$ffdb], a
+ ld [hItemToRemoveID], a
cp FRESH_WATER
- jr z, .asm_484b6
+ jr z, .gaveFreshWater
cp SODA_POP
- jr z, .asm_48492
+ jr z, .gaveSodaPop
+; gave Lemonade
CheckEvent EVENT_GOT_TM49
- jr nz, .asm_484e0
+ jr nz, .alreadyGaveDrink
ld hl, CeladonMartRoofText_48515
call PrintText
call RemoveItemByIDBank12
lb bc, TM_49, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bagFull
ld hl, ReceivedTM49Text
call PrintText
SetEvent EVENT_GOT_TM49
ret
-.asm_48492
+.gaveSodaPop
CheckEvent EVENT_GOT_TM48
- jr nz, .asm_484e0
+ jr nz, .alreadyGaveDrink
ld hl, CeladonMartRoofText_48504
call PrintText
call RemoveItemByIDBank12
lb bc, TM_48, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bagFull
ld hl, CeladonMartRoofText_4850a
call PrintText
SetEvent EVENT_GOT_TM48
ret
-.asm_484b6
+.gaveFreshWater
CheckEvent EVENT_GOT_TM13
- jr nz, .asm_484e0
+ jr nz, .alreadyGaveDrink
ld hl, CeladonMartRoofText_484f3
call PrintText
call RemoveItemByIDBank12
lb bc, TM_13, 1
call GiveItem
- jr nc, .BagFull
+ jr nc, .bagFull
ld hl, CeladonMartRoofText_484f9
call PrintText
SetEvent EVENT_GOT_TM13
ret
-.BagFull
+.bagFull
ld hl, CeladonMartRoofText_48526
jp PrintText
-.asm_484e0
+.alreadyGaveDrink
ld hl, CeladonMartRoofText_4852c
jp PrintText
@@ -181,11 +183,11 @@ CeladonMartRoofText_4852c: ; 4852c (12:452c)
db $0d
db "@"
-CeladonMartRoofScript_48532: ; 48532 (12:4532)
- ld hl, wcc5b
+CeladonMartRoofScript_PrintDrinksInBag: ; 48532 (12:4532)
+ ld hl, wFilteredBagItems
xor a
- ld [$ffdb], a
-.asm_48538
+ ld [hItemCounter], a
+.loop
ld a, [hli]
cp $ff
ret z
@@ -193,15 +195,15 @@ CeladonMartRoofScript_48532: ; 48532 (12:4532)
ld [wd11e], a
call GetItemName
coord hl, 2, 2
- ld a, [$ffdb]
+ ld a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2
call AddNTimes
ld de, wcd6d
call PlaceString
- ld hl, $ffdb
+ ld hl, hItemCounter
inc [hl]
pop hl
- jr .asm_48538
+ jr .loop
CeladonMartRoofTextPointers: ; 4855b (12:455b)
dw CeladonMartRoofText1
@@ -217,24 +219,24 @@ CeladonMartRoofText1: ; 48567 (12:4567)
CeladonMartRoofText2: ; 4856c (12:456c)
TX_ASM
- call CeladonMartRoofScript_483d8
- ld a, [wcd37]
+ call CeladonMartRoofScript_GetDrinksInBag
+ ld a, [wFilteredBagItemsCount]
and a
- jr z, .asm_4858f
- ld a, $1
+ jr z, .noDrinksInBag
+ ld a, 1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, CeladonMartRoofText4
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
- jr nz, .asm_48595
- call CeladonMartRoofScript_4840c
- jr .asm_48595
-.asm_4858f
+ jr nz, .done
+ call CeladonMartRoofScript_GiveDrinkToGirl
+ jr .done
+.noDrinksInBag
ld hl, CeladonMartRoofText3
call PrintText
-.asm_48595
+.done
jp TextScriptEnd
CeladonMartRoofText3: ; 48598 (12:4598)
diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm
index 158a683d..1e8349bc 100755
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -1,13 +1,13 @@
CeruleanCityScript: ; 19480 (6:5480)
call EnableAutoTextBoxDrawing
ld hl, CeruleanCityScriptPointers
- ld a, [W_CERULEANCITYCURSCRIPT]
+ ld a, [wCeruleanCityCurScript]
jp CallFunctionInTable
CeruleanCityScript_1948c: ; 1948c (6:548c)
xor a
ld [wJoyIgnore], a
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
ld a, HS_CERULEAN_RIVAL
ld [wMissableObjectIndex], a
predef_jump HideObject
@@ -20,7 +20,7 @@ CeruleanCityScriptPointers: ; 1949d (6:549d)
dw CeruleanCityScript4
CeruleanCityScript4: ; 194a7 (6:54a7)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CeruleanCityScript_1948c
ld a, $f0
@@ -31,7 +31,7 @@ CeruleanCityScript4: ; 194a7 (6:54a7)
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
ret
CeruleanCityScript0: ; 194c8 (6:54c8)
@@ -65,7 +65,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
and a
jr z, .asm_19512
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
.asm_19512
ld c, BANK(Music_MeetRival)
@@ -75,7 +75,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
ld [hJoyHeld], a
ld a, $f0
ld [wJoyIgnore], a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $14
jr z, .asm_19535
ld a, $1
@@ -93,7 +93,7 @@ CeruleanCityScript0: ; 194c8 (6:54c8)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $1
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
ret
CeruleanCityCoords1: ; 1954f (6:554f)
@@ -134,11 +134,11 @@ CeruleanCityScript1: ; 19567 (6:5567)
ld hl, CeruleanCityText_1966d
ld de, CeruleanCityText_19672
call SaveEndBattleTextPointers
- ld a, SONY1 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY1
+ ld [wCurOpponent], a
; select which team to use during the encounter
- ld a, [W_RIVALSTARTER]
+ ld a, [wRivalStarter]
cp STARTER2
jr nz, .NotSquirtle
ld a, $7
@@ -151,17 +151,17 @@ CeruleanCityScript1: ; 19567 (6:5567)
.Charmander
ld a, $9
.done
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
xor a
ld [hJoyHeld], a
call CeruleanCityScript_1955d
ld a, $2
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
ret
CeruleanCityScript2: ; 195b1 (6:55b1)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CeruleanCityScript_1948c
call CeruleanCityScript_1955d
@@ -172,13 +172,13 @@ CeruleanCityScript2: ; 195b1 (6:55b1)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld a, $1
ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $14
jr nz, .asm_195f0
ld de, CeruleanCityMovement4
@@ -190,7 +190,7 @@ CeruleanCityScript2: ; 195b1 (6:55b1)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $3
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
ret
CeruleanCityMovement3: ; 19600 (6:5600)
@@ -224,7 +224,7 @@ CeruleanCityScript3: ; 19610 (6:5610)
ld [wJoyIgnore], a
call PlayDefaultMusic
ld a, $0
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
ret
CeruleanCityTextPointers: ; 1962d (6:562d)
@@ -294,7 +294,7 @@ CeruleanCityText2: ; 1967c (6:567c)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $4
- ld [W_CERULEANCITYCURSCRIPT], a
+ ld [wCeruleanCityCurScript], a
jp TextScriptEnd
.asm_4ca20
ld hl, CeruleanCityText_196f3
diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm
index ca1c2c7d..4b1514b8 100755
--- a/scripts/ceruleangym.asm
+++ b/scripts/ceruleangym.asm
@@ -1,14 +1,14 @@
CeruleanGymScript: ; 5c6b3 (17:46b3)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, CeruleanGymScript_5c6d0
call EnableAutoTextBoxDrawing
ld hl, CeruleanGymTrainerHeaders
ld de, CeruleanGymScriptPointers
- ld a, [W_CERULEANGYMCURSCRIPT]
+ ld a, [wCeruleanGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_CERULEANGYMCURSCRIPT], a
+ ld [wCeruleanGymCurScript], a
ret
CeruleanGymScript_5c6d0: ; 5c6d0 (17:46d0)
@@ -25,8 +25,8 @@ Gym2LeaderName: ; 5c6e7 (17:46e7)
CeruleanGymScript_5c6ed: ; 5c6ed (17:46ed)
xor a
ld [wJoyIgnore], a
- ld [W_CERULEANGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCeruleanGymCurScript], a
+ ld [wCurMapScript], a
ret
CeruleanGymScriptPointers: ; 5c6f8 (17:46f8)
@@ -36,7 +36,7 @@ CeruleanGymScriptPointers: ; 5c6f8 (17:46f8)
dw CeruleanGymScript3
CeruleanGymScript3: ; 5c700 (17:4700)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CeruleanGymScript_5c6ed
ld a, $f0
@@ -60,7 +60,7 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5c736
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 1, [hl]
ld hl, wBeatGymFlags
set 1, [hl]
@@ -127,11 +127,11 @@ CeruleanGymText1: ; 5c771 (17:4771)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $2
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_CERULEANGYMCURSCRIPT], a
+ ld [wCeruleanGymCurScript], a
.asm_5c7bb
jp TextScriptEnd
diff --git a/scripts/ceruleanhousetrashed.asm b/scripts/ceruleanhousetrashed.asm
index e0a194fe..a1f58684 100755
--- a/scripts/ceruleanhousetrashed.asm
+++ b/scripts/ceruleanhousetrashed.asm
@@ -10,7 +10,7 @@ CeruleanHouseTrashedTextPointers: ; 1d689 (7:5689)
CeruleanHouseTrashedText1: ; 1d68f (7:568f)
TX_ASM
ld b, $e4
- predef IsItemInBag_
+ predef GetQuantityOfItemInBag
and b
jr z, .asm_f8734
ld hl, CeruleanHouseTrashedText_1d6b0
diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm
index 5bbb94a9..c4905d59 100755
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -2,11 +2,11 @@ CinnabarGymScript: ; 7574a (1d:574a)
call CinnabarGymScript_75759
call EnableAutoTextBoxDrawing
ld hl, CinnabarGymScriptPointers
- ld a, [W_CINNABARGYMCURSCRIPT]
+ ld a, [wCinnabarGymCurScript]
jp CallFunctionInTable
CinnabarGymScript_75759: ; 75759 (1d:5759)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
push hl
@@ -30,8 +30,8 @@ Gym7LeaderName: ; 7578b (1d:578b)
CinnabarGymScript_75792: ; 75792 (1d:5792)
xor a
ld [wJoyIgnore], a
- ld [W_CINNABARGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCinnabarGymCurScript], a
+ ld [wCurMapScript], a
ld [wOpponentAfterWrongAnswer], a
ret
@@ -64,8 +64,8 @@ CinnabarGymScript0: ; 757ae (1d:57ae)
.asm_757cb
call MoveSprite
ld a, $1
- ld [W_CINNABARGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCinnabarGymCurScript], a
+ ld [wCurMapScript], a
ret
MovementData_757d7: ; 757d7 (1d:57d7)
@@ -92,7 +92,7 @@ CinnabarGymFlagAction: ; 757f1 (1d:57f1)
predef_jump FlagActionPredef
CinnabarGymScript2: ; 757f6 (1d:57f6)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CinnabarGymScript_75792
ld a, [wTrainerHeaderFlagBit]
@@ -129,12 +129,12 @@ CinnabarGymScript2: ; 757f6 (1d:57f6)
ld [wJoyIgnore], a
ld [wOpponentAfterWrongAnswer], a
ld a, $0
- ld [W_CINNABARGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCinnabarGymCurScript], a
+ ld [wCurMapScript], a
ret
CinnabarGymScript3: ; 7584a (1d:584a)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, CinnabarGymScript_75792
ld a, $f0
@@ -157,7 +157,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_75880
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 6, [hl]
ld hl, wBeatGymFlags
set 6, [hl]
@@ -165,7 +165,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
; deactivate gym trainers
SetEventRange EVENT_BEAT_CINNABAR_GYM_TRAINER_0, EVENT_BEAT_CINNABAR_GYM_TRAINER_6
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
jp CinnabarGymScript_75792
@@ -200,8 +200,8 @@ CinnabarGymScript_758b7: ; 758b7 (1d:58b7)
.asm_758d4
ld a, $3
.asm_758d6
- ld [W_CINNABARGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wCinnabarGymCurScript], a
+ ld [wCurMapScript], a
jp TextScriptEnd
CinnabarGymText1: ; 758df (1d:58df)
@@ -224,7 +224,7 @@ CinnabarGymText1: ; 758df (1d:58df)
ld de, BlaineEndBattleText
call SaveEndBattleTextPointers
ld a, $7
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
jp CinnabarGymScript_758b7
BlaineBattleText: ; 75914 (1d:5914)
diff --git a/scripts/cinnabarisland.asm b/scripts/cinnabarisland.asm
index c06c784c..ce28fa1e 100755
--- a/scripts/cinnabarisland.asm
+++ b/scripts/cinnabarisland.asm
@@ -1,11 +1,11 @@
CinnabarIslandScript: ; 1ca19 (7:4a19)
call EnableAutoTextBoxDrawing
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ResetEvent EVENT_MANSION_SWITCH_ON
ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL
ld hl, CinnabarIslandScriptPointers
- ld a, [W_CINNABARISLANDCURSCRIPT]
+ ld a, [wCinnabarIslandCurScript]
jp CallFunctionInTable
CinnabarIslandScriptPointers: ; 1ca34 (7:4a34)
@@ -16,10 +16,10 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38)
ld b, SECRET_KEY
call IsItemInBag
ret nz
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $4
ret nz
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $12
ret nz
ld a, PLAYER_DIR_UP
@@ -38,7 +38,7 @@ CinnabarIslandScript0: ; 1ca38 (7:4a38)
ld [wSpriteStateData1 + 9], a
ld [wJoyIgnore], a
ld a, $1
- ld [W_CINNABARISLANDCURSCRIPT], a
+ ld [wCinnabarIslandCurScript], a
ret
CinnabarIslandScript1: ; 1ca73 (7:4a73)
@@ -47,7 +47,7 @@ CinnabarIslandScript1: ; 1ca73 (7:4a73)
ret nz
call Delay3
ld a, $0
- ld [W_CINNABARISLANDCURSCRIPT], a
+ ld [wCinnabarIslandCurScript], a
ret
CinnabarIslandTextPointers: ; 1ca81 (7:4a81)
diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm
index 3eabb0bc..4a46e648 100755
--- a/scripts/daycarem.asm
+++ b/scripts/daycarem.asm
@@ -7,7 +7,7 @@ DayCareMTextPointers: ; 56252 (15:6252)
DayCareMText1: ; 56254 (15:6254)
TX_ASM
call SaveScreenTilesToBuffer2
- ld a, [W_DAYCARE_IN_USE]
+ ld a, [wDayCareInUse]
and a
jp nz, .daycareInUse
ld hl, DayCareIntroText
@@ -46,7 +46,7 @@ DayCareMText1: ; 56254 (15:6254)
ld hl, DayCareWillLookAfterMonText
call PrintText
ld a, 1
- ld [W_DAYCARE_IN_USE], a
+ ld [wDayCareInUse], a
ld a, PARTY_TO_DAYCARE
ld [wMoveMonType], a
call MoveMon
@@ -60,7 +60,7 @@ DayCareMText1: ; 56254 (15:6254)
.daycareInUse
xor a
- ld hl, W_DAYCAREMONNAME
+ ld hl, wDayCareMonName
call GetPartyMonName
ld a, DAYCARE_DATA
ld [wMonDataLocation], a
@@ -150,7 +150,7 @@ DayCareMText1: ; 56254 (15:6254)
.enoughMoney
xor a
- ld [W_DAYCARE_IN_USE], a
+ ld [wDayCareInUse], a
ld hl, wDayCareNumLevelsGrown
ld [hli], a
inc hl
diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm
index fa05d486..fb3ea5b4 100755
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -2,16 +2,16 @@ FightingDojoScript: ; 5cd5d (17:4d5d)
call EnableAutoTextBoxDrawing
ld hl, FightingDojoTrainerHeaders
ld de, FightingDojoScriptPointers
- ld a, [W_FIGHTINGDOJOCURSCRIPT]
+ ld a, [wFightingDojoCurScript]
call ExecuteCurMapScriptInTable
- ld [W_FIGHTINGDOJOCURSCRIPT], a
+ ld [wFightingDojoCurScript], a
ret
FightingDojoScript_5cd70: ; 5cd70 (17:4d70)
xor a
ld [wJoyIgnore], a
- ld [W_FIGHTINGDOJOCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wFightingDojoCurScript], a
+ ld [wCurMapScript], a
ret
FightingDojoScriptPointers: ; 5cd7b (17:4d7b)
@@ -32,10 +32,10 @@ FightingDojoScript1: ; 5cd83 (17:4d83)
xor a
ld [hJoyHeld], a
ld [wcf0d], a
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $3
ret nz
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $4
ret nz
ld a, $1
@@ -53,7 +53,7 @@ FightingDojoScript1: ; 5cd83 (17:4d83)
ret
FightingDojoScript3: ; 5cdc6 (17:4dc6)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, FightingDojoScript_5cd70
ld a, [wcf0d]
@@ -76,8 +76,8 @@ FightingDojoScript3: ; 5cdc6 (17:4dc6)
call DisplayTextID
xor a
ld [wJoyIgnore], a
- ld [W_FIGHTINGDOJOCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wFightingDojoCurScript], a
+ ld [wCurMapScript], a
ret
FightingDojoTextPointers: ; 5ce03 (17:4e03)
@@ -148,8 +148,8 @@ FightingDojoText1: ; 5ce44 (17:4e44)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
- ld [W_FIGHTINGDOJOCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wFightingDojoCurScript], a
+ ld [wCurMapScript], a
jr .asm_9dba4
.continue1
ld hl, FightingDojoText_5ce9d
diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm
index 3ec89256..54c3ae1a 100755
--- a/scripts/fuchsiagym.asm
+++ b/scripts/fuchsiagym.asm
@@ -3,13 +3,13 @@ FuchsiaGymScript: ; 7543d (1d:543d)
call EnableAutoTextBoxDrawing
ld hl, FuchsiaGymTrainerHeaders
ld de, FuchsiaGymScriptPointers
- ld a, [W_FUCHSIAGYMCURSCRIPT]
+ ld a, [wFuchsiaGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_FUCHSIAGYMCURSCRIPT], a
+ ld [wFuchsiaGymCurScript], a
ret
FuchsiaGymScript_75453: ; 75453 (1d:5453)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
@@ -26,8 +26,8 @@ Gym5LeaderName: ; 75472 (1d:5472)
FuchsiaGymScript_75477: ; 75477 (1d:5477)
xor a
ld [wJoyIgnore], a
- ld [W_FUCHSIAGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wFuchsiaGymCurScript], a
+ ld [wCurMapScript], a
ret
FuchsiaGymScriptPointers: ; 75482 (1d:5482)
@@ -37,7 +37,7 @@ FuchsiaGymScriptPointers: ; 75482 (1d:5482)
dw FuchsiaGymScript3
FuchsiaGymScript3: ; 7548a (1d:548a)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, FuchsiaGymScript_75477
ld a, $f0
@@ -60,7 +60,7 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_754c0
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 4, [hl]
ld hl, wBeatGymFlags
set 4, [hl]
@@ -167,11 +167,11 @@ FuchsiaGymText1: ; 75534 (1d:5534)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $5
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_FUCHSIAGYMCURSCRIPT], a
+ ld [wFuchsiaGymCurScript], a
.asm_e84c6
jp TextScriptEnd
diff --git a/scripts/gary.asm b/scripts/gary.asm
index 9a3b1582..cd1f75a3 100755
--- a/scripts/gary.asm
+++ b/scripts/gary.asm
@@ -1,13 +1,13 @@
GaryScript: ; 75f1d (1d:5f1d)
call EnableAutoTextBoxDrawing
ld hl, GaryScriptPointers
- ld a, [W_GARYCURSCRIPT]
+ ld a, [wGaryCurScript]
jp CallFunctionInTable
-GaryScript_75f29: ; 75f29 (1d:5f29)
+ResetGaryScript: ; 75f29 (1d:5f29)
xor a
ld [wJoyIgnore], a
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScriptPointers: ; 75f31 (1d:5f31)
@@ -30,16 +30,16 @@ GaryScript1: ; 75f48 (1d:5f48)
ld a, $ff
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEMovement75f63
+ ld de, GaryEntrance_RLEMovement
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $2
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
-RLEMovement75f63: ; 75f63 (1d:5f63)
+GaryEntrance_RLEMovement: ; 75f63 (1d:5f63)
db D_UP,1
db D_RIGHT,1
db D_UP,3
@@ -52,8 +52,8 @@ GaryScript2: ; 75f6a (1d:5f6a)
call Delay3
xor a
ld [wJoyIgnore], a
- ld hl, W_OPTIONS
- res 7, [hl]
+ ld hl, wOptions
+ res 7, [hl] ; Turn on battle animations to make the battle feel more epic.
ld a, $1
ld [hSpriteIndexOrTextID], a
call DisplayTextID
@@ -61,38 +61,38 @@ GaryScript2: ; 75f6a (1d:5f6a)
ld hl, wd72d
set 6, [hl]
set 7, [hl]
- ld hl, GaryText_760f9
- ld de, GaryText_760fe
+ ld hl, GaryDefeatedText
+ ld de, GaryVictoryText
call SaveEndBattleTextPointers
- ld a, SONY3 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY3
+ ld [wCurOpponent], a
; select which team to use during the encounter
- ld a, [W_RIVALSTARTER]
+ ld a, [wRivalStarter]
cp STARTER2
- jr nz, .NotSquirtle
+ jr nz, .NotStarter2
ld a, $1
- jr .done
-.NotSquirtle
+ jr .saveTrainerId
+.NotStarter2
cp STARTER3
- jr nz, .Charmander
+ jr nz, .NotStarter3
ld a, $2
- jr .done
-.Charmander
+ jr .saveTrainerId
+.NotStarter3
ld a, $3
-.done
- ld [W_TRAINERNO], a
+.saveTrainerId
+ ld [wTrainerNo], a
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScript3: ; 75fbb (1d:5fbb)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
- jp z, GaryScript_75f29
+ jp z, ResetGaryScript
call UpdateSprites
SetEvent EVENT_BEAT_CHAMPION_RIVAL
ld a, $f0
@@ -104,7 +104,7 @@ GaryScript3: ; 75fbb (1d:5fbb)
ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF
ld a, $4
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScript4: ; 75fe4 (1d:5fe4)
@@ -115,7 +115,7 @@ GaryScript4: ; 75fe4 (1d:5fe4)
ld a, $2
ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF
- ld de, MovementData_76014
+ ld de, OakEntranceAfterVictoryMovement
ld a, $2
ld [H_SPRITEINDEX], a
call MoveSprite
@@ -123,10 +123,10 @@ GaryScript4: ; 75fe4 (1d:5fe4)
ld [wMissableObjectIndex], a
predef ShowObject
ld a, $5
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
-MovementData_76014: ; 76014 (1d:6014)
+OakEntranceAfterVictoryMovement: ; 76014 (1d:6014)
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
@@ -154,7 +154,7 @@ GaryScript5: ; 7601a (1d:601a)
ld [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld a, $6
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScript6: ; 76047 (1d:6047)
@@ -167,7 +167,7 @@ GaryScript6: ; 76047 (1d:6047)
ld [hSpriteIndexOrTextID], a
call GaryScript_760c8
ld a, $7
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScript7: ; 7605f (1d:605f)
@@ -179,15 +179,15 @@ GaryScript7: ; 7605f (1d:605f)
ld a, $5
ld [hSpriteIndexOrTextID], a
call GaryScript_760c8
- ld de, MovementData_76080
+ ld de, OakExitGaryRoomMovement
ld a, $2
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $8
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
-MovementData_76080: ; 76080 (1d:6080)
+OakExitGaryRoomMovement: ; 76080 (1d:6080)
db NPC_MOVEMENT_UP
db NPC_MOVEMENT_UP
db $FF
@@ -200,23 +200,23 @@ GaryScript8: ; 76083 (1d:6083)
ld [wMissableObjectIndex], a
predef HideObject
ld a, $9
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScript9: ; 76099 (1d:6099)
ld a, $ff
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEMovement760b4
+ ld de, WalkToHallOfFame_RLEMovment
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $a
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
-RLEMovement760b4: ; 760b4 (1d:60b4)
+WalkToHallOfFame_RLEMovment: ; 760b4 (1d:60b4)
db D_UP,4
db D_LEFT,1
db $ff
@@ -228,7 +228,7 @@ GaryScript10: ; 760b9 (1d:60b9)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_GARYCURSCRIPT], a
+ ld [wGaryCurScript], a
ret
GaryScript_760c8: ; 760c8 (1d:60c8)
@@ -249,23 +249,23 @@ GaryTextPointers: ; 760d6 (1d:60d6)
GaryText1: ; 760e0 (1d:60e0)
TX_ASM
CheckEvent EVENT_BEAT_CHAMPION_RIVAL
- ld hl, GaryText_760f4
- jr z, .asm_17e9f
+ ld hl, GaryChampionIntroText
+ jr z, .printText
ld hl, GaryText_76103
-.asm_17e9f
+.printText
call PrintText
jp TextScriptEnd
-GaryText_760f4: ; 760f4 (1d:60f4)
- TX_FAR _GaryText_760f4
+GaryChampionIntroText: ; 760f4 (1d:60f4)
+ TX_FAR _GaryChampionIntroText
db "@"
-GaryText_760f9: ; 760f9 (1d:60f9)
- TX_FAR _GaryText_760f9
+GaryDefeatedText: ; 760f9 (1d:60f9)
+ TX_FAR _GaryDefeatedText
db "@"
-GaryText_760fe: ; 760fe (1d:60fe)
- TX_FAR _GaryText_760fe
+GaryVictoryText: ; 760fe (1d:60fe)
+ TX_FAR _GaryVictoryText
db "@"
GaryText_76103: ; 76103 (1d:6103)
@@ -278,7 +278,7 @@ GaryText2: ; 76108 (1d:6108)
GaryText3: ; 7610d (1d:610d)
TX_ASM
- ld a, [W_PLAYERSTARTER]
+ ld a, [wPlayerStarter]
ld [wd11e], a
call GetMonName
ld hl, GaryText_76120
diff --git a/scripts/halloffameroom.asm b/scripts/halloffameroom.asm
index 1da6d3f5..89b1123e 100755
--- a/scripts/halloffameroom.asm
+++ b/scripts/halloffameroom.asm
@@ -1,13 +1,13 @@
HallofFameRoomScript: ; 5a49e (16:649e)
call EnableAutoTextBoxDrawing
ld hl, HallofFameRoomScriptPointers
- ld a, [W_HALLOFFAMEROOMCURSCRIPT]
+ ld a, [wHallOfFameRoomCurScript]
jp CallFunctionInTable
HallofFameRoomScript_5a4aa: ; 5a4aa (16:64aa)
xor a
ld [wJoyIgnore], a
- ld [W_HALLOFFAMEROOMCURSCRIPT], a
+ ld [wHallOfFameRoomCurScript], a
ret
HallofFameRoomScriptPointers: ; 5a4b2 (16:64b2)
@@ -28,30 +28,30 @@ HallofFameRoomScript2: ; 5a4bb (16:64bb)
predef HallOfFamePC
pop af
ld [wLetterPrintingDelayFlags], a
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
res 1, [hl]
inc hl
set 0, [hl]
xor a
- ld hl, W_LORELEICURSCRIPT
+ ld hl, wLoreleiCurScript
ld [hli], a
ld [hli], a
ld [hl], a
- ld [W_LANCECURSCRIPT], a
- ld [W_HALLOFFAMEROOMCURSCRIPT], a
+ ld [wLanceCurScript], a
+ ld [wHallOfFameRoomCurScript], a
; Elite 4 events
ResetEventRange ELITE4_EVENTS_START, ELITE4_CHAMPION_EVENTS_END, 1
xor a
- ld [W_HALLOFFAMEROOMCURSCRIPT], a
+ ld [wHallOfFameRoomCurScript], a
ld a, PALLET_TOWN
ld [wLastBlackoutMap], a
callba SaveSAVtoSRAM
ld b, 5
-.asm_5a4ff
+.delayLoop
ld c, 600 / 5
call DelayFrames
dec b
- jr nz, .asm_5a4ff
+ jr nz, .delayLoop
call WaitForTextScrollButtonPress
jp Init
@@ -65,7 +65,7 @@ HallofFameRoomScript0: ; 5a50d (16:650d)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $1
- ld [W_HALLOFFAMEROOMCURSCRIPT], a
+ ld [wHallOfFameRoomCurScript], a
ret
RLEMovement5a528: ; 5a528 (16:6528)
@@ -98,7 +98,7 @@ HallofFameRoomScript1: ; 5a52b (16:652b)
ld [wMissableObjectIndex], a
predef HideObject
ld a, $2
- ld [W_HALLOFFAMEROOMCURSCRIPT], a
+ ld [wHallOfFameRoomCurScript], a
ret
HallofFameRoomTextPointers: ; 5a56a (16:656a)
diff --git a/scripts/indigoplateaulobby.asm b/scripts/indigoplateaulobby.asm
index 7655d8c7..e524ed62 100755
--- a/scripts/indigoplateaulobby.asm
+++ b/scripts/indigoplateaulobby.asm
@@ -1,7 +1,7 @@
IndigoPlateauLobbyScript: ; 19c5b (6:5c5b)
call Serial_TryEstablishingExternallyClockedConnection
call EnableAutoTextBoxDrawing
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
diff --git a/scripts/lab4.asm b/scripts/lab4.asm
index f2c4d8d7..7eb6bae8 100755
--- a/scripts/lab4.asm
+++ b/scripts/lab4.asm
@@ -5,12 +5,11 @@ Lab4TextPointers: ; 75d34 (1d:5d34)
dw Lab4Text1
dw Lab4Text2
-Lab4Script_75d38: ; 75d38 (1d:5d38)
+Lab4Script_GetFossilsInBag: ; 75d38 (1d:5d38)
; construct a list of all fossils in the player's bag
-
xor a
- ld [wcd37], a
- ld de, wcc5b
+ ld [wFilteredBagItemsCount], a
+ ld de, wFilteredBagItems
ld hl, FossilsList
.loop
ld a, [hli]
@@ -20,7 +19,7 @@ Lab4Script_75d38: ; 75d38 (1d:5d38)
push de
ld [wd11e], a
ld b, a
- predef IsItemInBag_
+ predef GetQuantityOfItemInBag
pop de
pop hl
ld a, b
@@ -32,7 +31,7 @@ Lab4Script_75d38: ; 75d38 (1d:5d38)
ld [de], a
inc de
push hl
- ld hl, wcd37
+ ld hl, wFilteredBagItemsCount
inc [hl]
pop hl
jr .loop
@@ -53,8 +52,8 @@ Lab4Text1: ; 75d6c (1d:5d6c)
jr nz, .asm_75d96
ld hl, Lab4Text_75dc6
call PrintText
- call Lab4Script_75d38
- ld a, [wcd37]
+ call Lab4Script_GetFossilsInBag
+ ld a, [wFilteredBagItemsCount]
and a
jr z, .asm_75d8d
callba GiveFossilToCinnabarLab
@@ -75,7 +74,7 @@ Lab4Text1: ; 75d6c (1d:5d6c)
ld hl, Lab4Text_75dd5
call PrintText
SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON
- ld a, [W_FOSSILMON]
+ ld a, [wFossilMon]
ld b, a
ld c, 30
call GivePokemon
diff --git a/scripts/lance.asm b/scripts/lance.asm
index e2c43614..c7d21d43 100755
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -1,43 +1,45 @@
LanceScript: ; 5a2ae (16:62ae)
- call LanceScript_5a2c4
+ call LanceShowOrHideEntranceBlocks
call EnableAutoTextBoxDrawing
ld hl, LanceTrainerHeaders
ld de, LanceScriptPointers
- ld a, [W_LANCECURSCRIPT]
+ ld a, [wLanceCurScript]
call ExecuteCurMapScriptInTable
- ld [W_LANCECURSCRIPT], a
+ ld [wLanceCurScript], a
ret
-LanceScript_5a2c4: ; 5a2c4 (16:62c4)
- ld hl, wd126
+LanceShowOrHideEntranceBlocks: ; 5a2c4 (16:62c4)
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_LANCES_ROOM_LOCK_DOOR
- jr nz, .asm_5a2da
+ jr nz, .closeEntrance
+ ; open entrance
ld a, $31
ld b, $32
- jp LanceScript_5a2de
-.asm_5a2da
+ jp LanceSetEntranceBlocks
+.closeEntrance
ld a, $72
ld b, $73
-LanceScript_5a2de: ; 5a2de (16:62de)
+LanceSetEntranceBlocks: ; 5a2de (16:62de)
+; Replaces the tile blocks so the player can't leave.
push bc
ld [wNewTileBlockID], a
lb bc, 6, 2
- call LanceScript_5a2f0
+ call LanceSetEntranceBlock
pop bc
ld a, b
ld [wNewTileBlockID], a
lb bc, 6, 3
-LanceScript_5a2f0: ; 5a2f0 (16:62f0)
+LanceSetEntranceBlock: ; 5a2f0 (16:62f0)
predef_jump ReplaceTileBlock
-LanceScript_5a2f5: ; 5a2f5 (16:62f5)
+ResetLanceScript: ; 5a2f5 (16:62f5)
xor a
- ld [W_LANCECURSCRIPT], a
+ ld [wLanceCurScript], a
ret
LanceScriptPointers: ; 5a2fa (16:62fa)
@@ -53,29 +55,29 @@ LanceScript4: ; 5a304 (16:6304)
LanceScript0: ; 5a305 (16:6305)
CheckEvent EVENT_BEAT_LANCE
ret nz
- ld hl, CoordsData_5a33e
+ ld hl, LanceTriggerMovementCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
ld [hJoyHeld], a
ld a, [wCoordIndex]
- cp $3
- jr nc, .asm_5a325
+ cp $3 ; Is player standing next to Lance's sprite?
+ jr nc, .notStandingNextToLance
ld a, $1
ld [hSpriteIndexOrTextID], a
jp DisplayTextID
-.asm_5a325
- cp $5
- jr z, LanceScript_5a35b
+.notStandingNextToLance
+ cp $5 ; Is player standing on the entrance staircase?
+ jr z, WalkToLance
CheckAndSetEvent EVENT_LANCES_ROOM_LOCK_DOOR
ret nz
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, SFX_GO_INSIDE
call PlaySound
- jp LanceScript_5a2c4
+ jp LanceShowOrHideEntranceBlocks
-CoordsData_5a33e: ; 5a33e (16:633e)
+LanceTriggerMovementCoords: ; 5a33e (16:633e)
db $01,$05
db $02,$06
db $0B,$05
@@ -85,28 +87,29 @@ CoordsData_5a33e: ; 5a33e (16:633e)
LanceScript2: ; 5a349 (16:6349)
call EndTrainerBattle
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
- jp z, LanceScript_5a2f5
+ jp z, ResetLanceScript
ld a, $1
ld [hSpriteIndexOrTextID], a
jp DisplayTextID
-LanceScript_5a35b: ; 5a35b (16:635b)
+WalkToLance: ; 5a35b (16:635b)
+; Moves the player down the hallway to Lance's room.
ld a, $ff
ld [wJoyIgnore], a
ld hl, wSimulatedJoypadStatesEnd
- ld de, RLEList_5a379
+ ld de, WalkToLance_RLEList
call DecodeRLEList
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_LANCECURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wLanceCurScript], a
+ ld [wCurMapScript], a
ret
-RLEList_5a379: ; 5a379 (16:6379)
+WalkToLance_RLEList: ; 5a379 (16:6379)
db D_UP, $0C
db D_LEFT, $0C
db D_DOWN, $07
@@ -120,8 +123,8 @@ LanceScript3: ; 5a382 (16:6382)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_LANCECURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wLanceCurScript], a
+ ld [wCurMapScript], a
ret
LanceTextPointers: ; 5a395 (16:6395)
diff --git a/scripts/lorelei.asm b/scripts/lorelei.asm
index 43eee966..12784964 100755
--- a/scripts/lorelei.asm
+++ b/scripts/lorelei.asm
@@ -1,34 +1,35 @@
LoreleiScript: ; 7617b (1d:617b)
- call LoreleiScript_76191
+ call LoreleiShowOrHideExitBlock
call EnableAutoTextBoxDrawing
ld hl, LoreleiTrainerHeaders
ld de, LoreleiScriptPointers
- ld a, [W_LORELEICURSCRIPT]
+ ld a, [wLoreleiCurScript]
call ExecuteCurMapScriptInTable
- ld [W_LORELEICURSCRIPT], a
+ ld [wLoreleiCurScript], a
ret
-LoreleiScript_76191: ; 76191 (1d:6191)
- ld hl, wd126
+LoreleiShowOrHideExitBlock: ; 76191 (1d:6191)
+; Blocks or clears the exit to the next room.
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
ld hl, wBeatLorelei
set 1, [hl]
CheckEvent EVENT_BEAT_LORELEIS_ROOM_TRAINER_0
- jr z, .asm_761a9
+ jr z, .blockExitToNextRoom
ld a, $5
- jr .asm_761ab
-.asm_761a9
+ jr .setExitBlock
+.blockExitToNextRoom
ld a, $24
-.asm_761ab
+.setExitBlock
ld [wNewTileBlockID], a
lb bc, 0, 2
predef_jump ReplaceTileBlock
-LoreleiScript_761b6: ; 761b6 (1d:61b6)
+ResetLoreleiScript: ; 761b6 (1d:61b6)
xor a
- ld [W_LORELEICURSCRIPT], a
+ ld [wLoreleiCurScript], a
ret
LoreleiScriptPointers: ; 761bb (1d:61bb)
@@ -41,7 +42,8 @@ LoreleiScriptPointers: ; 761bb (1d:61bb)
LoreleiScript4: ; 761c5 (1d:61c5)
ret
-LoreleiScript_761c6: ; 761c6 (1d:61c6)
+LoreleiScriptWalkIntoRoom: ; 761c6 (1d:61c6)
+; Walk six steps upward.
ld hl, wSimulatedJoypadStatesEnd
ld a, D_UP
ld [hli], a
@@ -54,12 +56,12 @@ LoreleiScript_761c6: ; 761c6 (1d:61c6)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_LORELEICURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wLoreleiCurScript], a
+ ld [wCurMapScript], a
ret
LoreleiScript0: ; 761e2 (1d:61e2)
- ld hl, CoordsData_76223
+ ld hl, LoreleiEntranceCoords
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
@@ -68,25 +70,25 @@ LoreleiScript0: ; 761e2 (1d:61e2)
ld [wSimulatedJoypadStatesEnd], a
ld [wSimulatedJoypadStatesIndex], a
ld a, [wCoordIndex]
- cp $3
- jr c, .asm_76206
+ cp $3 ; Is player standing one tile above the exit?
+ jr c, .stopPlayerFromLeaving
CheckAndSetEvent EVENT_AUTOWALKED_INTO_LORELEIS_ROOM
- jr z, LoreleiScript_761c6
-.asm_76206
+ jr z, LoreleiScriptWalkIntoRoom
+.stopPlayerFromLeaving
ld a, $2
ld [hSpriteIndexOrTextID], a
- call DisplayTextID
+ call DisplayTextID ; "Don't run away!"
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_LORELEICURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wLoreleiCurScript], a
+ ld [wCurMapScript], a
ret
-CoordsData_76223: ; 76223 (1d:6223)
+LoreleiEntranceCoords: ; 76223 (1d:6223)
db $0A,$04
db $0A,$05
db $0B,$04
@@ -100,14 +102,15 @@ LoreleiScript3: ; 7622c (1d:622c)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_LORELEICURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wLoreleiCurScript], a
+ ld [wCurMapScript], a
ret
+
LoreleiScript2: ; 7623f (1d:623f)
call EndTrainerBattle
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
- jp z, LoreleiScript_761b6
+ jp z, ResetLoreleiScript
ld a, $1
ld [hSpriteIndexOrTextID], a
jp DisplayTextID
diff --git a/scripts/mansion1.asm b/scripts/mansion1.asm
index bbfb0a0b..d342c295 100755
--- a/scripts/mansion1.asm
+++ b/scripts/mansion1.asm
@@ -3,13 +3,13 @@ Mansion1Script: ; 442af (11:42af)
call EnableAutoTextBoxDrawing
ld hl, Mansion1TrainerHeaders
ld de, Mansion1ScriptPointers
- ld a, [W_MANSION1CURSCRIPT]
+ ld a, [wMansion1CurScript]
call ExecuteCurMapScriptInTable
- ld [W_MANSION1CURSCRIPT], a
+ ld [wMansion1CurScript], a
ret
Mansion1Subscript1: ; 442c5 (11:42c5)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -106,7 +106,7 @@ Mansion1Text4: ; 4435a (11:435a)
jr nz, .asm_4438c
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld hl, MansionSwitchPressedText
call PrintText
diff --git a/scripts/mansion2.asm b/scripts/mansion2.asm
index 22bc2b12..7fe09e4b 100755
--- a/scripts/mansion2.asm
+++ b/scripts/mansion2.asm
@@ -3,13 +3,13 @@ Mansion2Script: ; 51fd8 (14:5fd8)
call EnableAutoTextBoxDrawing
ld hl, Mansion2TrainerHeaders
ld de, Mansion2ScriptPointers
- ld a, [W_MANSION2CURSCRIPT]
+ ld a, [wMansion2CurScript]
call ExecuteCurMapScriptInTable
- ld [W_MANSION2CURSCRIPT], a
+ ld [wMansion2CurScript], a
ret
Mansion2Script_51fee: ; 51fee (14:5fee)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -112,7 +112,7 @@ Mansion2Text5: ; 52087 (14:6087)
jr nz, .asm_520b9
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld hl, Mansion2Text_520c7
call PrintText
diff --git a/scripts/mansion3.asm b/scripts/mansion3.asm
index e49667ef..049bfeef 100755
--- a/scripts/mansion3.asm
+++ b/scripts/mansion3.asm
@@ -3,13 +3,13 @@ Mansion3Script: ; 521ee (14:61ee)
call EnableAutoTextBoxDrawing
ld hl, Mansion3TrainerHeader0
ld de, Mansion3ScriptPointers
- ld a, [W_MANSION3CURSCRIPT]
+ ld a, [wMansion3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_MANSION3CURSCRIPT], a
+ ld [wMansion3CurScript], a
ret
Mansion3Script_52204: ; 52204 (14:6204)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm
index 59ee3704..c506a407 100755
--- a/scripts/mansion4.asm
+++ b/scripts/mansion4.asm
@@ -3,13 +3,13 @@ Mansion4Script: ; 523b9 (14:63b9)
call EnableAutoTextBoxDrawing
ld hl, Mansion4TrainerHeader0
ld de, Mansion4ScriptPointers
- ld a, [W_MANSION4CURSCRIPT]
+ ld a, [wMansion4CurScript]
call ExecuteCurMapScriptInTable
- ld [W_MANSION4CURSCRIPT], a
+ ld [wMansion4CurScript], a
ret
Mansion4Script_523cf: ; 523cf (14:63cf)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/mtmoon1.asm b/scripts/mtmoon1.asm
index 4a5eeae3..98ed2784 100755
--- a/scripts/mtmoon1.asm
+++ b/scripts/mtmoon1.asm
@@ -2,9 +2,9 @@ MtMoon1Script: ; 499c8 (12:59c8)
call EnableAutoTextBoxDrawing
ld hl, MtMoon1TrainerHeader0
ld de, MtMoon1ScriptPointers
- ld a, [W_MTMOON1CURSCRIPT]
+ ld a, [wMtMoon1CurScript]
call ExecuteCurMapScriptInTable
- ld [W_MTMOON1CURSCRIPT], a
+ ld [wMtMoon1CurScript], a
ret
MtMoon1ScriptPointers: ; 499db (12:59db)
diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm
index 84c00981..af2ec1e5 100755
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -2,9 +2,9 @@ MtMoon3Script: ; 49d0b (12:5d0b)
call EnableAutoTextBoxDrawing
ld hl, MtMoon3TrainerHeader0
ld de, MtMoon3ScriptPointers
- ld a, [W_MTMOON3CURSCRIPT]
+ ld a, [wMtMoon3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_MTMOON3CURSCRIPT], a
+ ld [wMtMoon3CurScript], a
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
ret z
ld hl, CoordsData_49d37
@@ -40,8 +40,8 @@ CoordsData_49d37: ; 49d37 (12:5d37)
MtMoon3Script_49d58: ; 49d58 (12:5d58)
xor a
ld [wJoyIgnore], a
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
ret
MtMoon3ScriptPointers: ; 49d63 (12:5d63)
@@ -55,10 +55,10 @@ MtMoon3ScriptPointers: ; 49d63 (12:5d63)
MtMoon3Script0: ; 49d6f (12:5d6f)
CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
jp nz, MtMoon3Script_49d91
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $8
jp nz, MtMoon3Script_49d91
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $d
jp nz, MtMoon3Script_49d91
xor a
@@ -73,7 +73,7 @@ MtMoon3Script_49d91: ; 49d91 (12:5d91)
ret
MtMoon3Script3: ; 49d9a (12:5d9a)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, MtMoon3Script_49d58
call UpdateSprites
@@ -82,8 +82,8 @@ MtMoon3Script3: ; 49d9a (12:5d9a)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
ret
MtMoon3Script4: ; 49dba (12:5dba)
@@ -105,8 +105,8 @@ MtMoon3Script4: ; 49dba (12:5dba)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $5
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
ret
CoordsData_49dea: ; 49dea (12:5dea)
@@ -150,8 +150,8 @@ MtMoon3Script5: ; 49dfb (12:5dfb)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
ret
MtMoon3TextPointers: ; 49e34 (12:5e34)
@@ -228,8 +228,8 @@ MtMoon3Text1: ; 49e79 (12:5e79)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
jr .asm_49ebe
.asm_49eb8
ld hl, MtMoon3Text_49f94
@@ -280,8 +280,8 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)
predef HideObject
SetEvent EVENT_GOT_DOME_FOSSIL
ld a, $4
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
.asm_49f21
jp TextScriptEnd
@@ -308,8 +308,8 @@ MtMoon3Text7: ; 49f29 (12:5f29)
predef HideObject
SetEvent EVENT_GOT_HELIX_FOSSIL
ld a, $4
- ld [W_MTMOON3CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wMtMoon3CurScript], a
+ ld [wCurMapScript], a
.asm_49f61
jp TextScriptEnd
diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm
index ac552c6d..780c3905 100755
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -4,7 +4,7 @@ Museum1FScript: ; 5c0f7 (17:40f7)
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, Museum1FScriptPointers
- ld a, [W_MUSEUM1FCURSCRIPT]
+ ld a, [wMuseum1fCurScript]
jp CallFunctionInTable
Museum1FScriptPointers: ; 5c109 (17:4109)
@@ -12,13 +12,13 @@ Museum1FScriptPointers: ; 5c109 (17:4109)
dw Museum1FScript1
Museum1FScript0: ; 5c10d (17:410d)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $4
ret nz
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $9
jr z, .asm_5c120
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $a
ret nz
.asm_5c120
@@ -40,17 +40,17 @@ Museum1FTextPointers: ; 5c12b (17:412b)
Museum1FText1: ; 5c135 (17:4135)
TX_ASM
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $4
jr nz, .asm_8774b
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $d
jp z, Museum1FScript_5c1f9
jr .asm_b8709
.asm_8774b
cp $3
jr nz, .asm_d49e7
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $c
jp z, Museum1FScript_5c1f9
.asm_d49e7
@@ -120,7 +120,7 @@ Museum1FText1: ; 5c135 (17:4135)
jr Museum1FScriptEnd
.asm_0b094
ld a, $1
- ld [W_MUSEUM1FCURSCRIPT], a
+ ld [wMuseum1fCurScript], a
jr Museum1FScriptEnd
Museum1FScript_5c1f9: ; 5c1f9 (17:41f9)
diff --git a/scripts/namerater.asm b/scripts/namerater.asm
index c2d028ef..42b82b62 100755
--- a/scripts/namerater.asm
+++ b/scripts/namerater.asm
@@ -10,15 +10,15 @@ NameRaterScript_1da15: ; 1da15 (7:5a15)
NameRaterScript_1da20: ; 1da20 (7:5a20)
ld hl, wPartyMonOT
- ld bc, $000b
+ ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerName
- ld c, $b
+ ld c, NAME_LENGTH
call .asm_1da47
jr c, .asm_1da52
ld hl, wPartyMon1OTID
- ld bc, $002c
+ ld bc, wPartyMon2 - wPartyMon1
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerID
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index 996ab754..e308b7b5 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -6,7 +6,7 @@ OaksLabScript: ; 1cb0e (7:4b0e)
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, OaksLabScriptPointers
- ld a, [W_OAKSLABCURSCRIPT]
+ ld a, [wOaksLabCurScript]
jp CallFunctionInTable
OaksLabScriptPointers: ; 1cb28 (7:4b28)
@@ -43,7 +43,7 @@ OaksLabScript0: ; 1cb4e (7:4b4e)
res 4, [hl]
ld a, $1
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript1: ; 1cb6e (7:4b6e)
@@ -53,7 +53,7 @@ OaksLabScript1: ; 1cb6e (7:4b6e)
call MoveSprite
ld a, $2
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OakEntryMovement: ; 1cb7e (7:4b7e)
@@ -74,7 +74,7 @@ OaksLabScript2: ; 1cb82 (7:4b82)
predef ShowObject
ld a, $3
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript3: ; 1cba2 (7:4ba2)
@@ -97,7 +97,7 @@ OaksLabScript3: ; 1cba2 (7:4ba2)
call SetSpriteFacingDirectionAndDelay
ld a, $4
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
PlayerEntryMovementRLE: ; 1cbcf (7:4bcf)
@@ -116,12 +116,12 @@ OaksLabScript4: ; 1cbd2 (7:4bd2)
ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call UpdateSprites
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
res 1, [hl]
call PlayDefaultMusic
ld a, $5
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript5: ; 1cbfd (7:4bfd)
@@ -147,11 +147,11 @@ OaksLabScript5: ; 1cbfd (7:4bfd)
ld [wJoyIgnore], a
ld a, $6
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript6: ; 1cc36 (7:4c36)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $6
ret nz
ld a, $5
@@ -177,7 +177,7 @@ OaksLabScript6: ; 1cc36 (7:4c36)
ld [wPlayerMovingDirection], a
ld a, $7
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript7: ; 1cc72 (7:4c72)
@@ -187,11 +187,11 @@ OaksLabScript7: ; 1cc72 (7:4c72)
call Delay3
ld a, $6
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript8: ; 1cc80 (7:4c80)
- ld a, [W_PLAYERSTARTER]
+ ld a, [wPlayerStarter]
cp STARTER1
jr z, .Charmander
cp STARTER2
@@ -199,7 +199,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
jr .Bulbasaur
.Charmander
ld de, .MiddleBallMovement1
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $4 ; is the player standing below the table?
jr z, .asm_1ccf3
ld de, .MiddleBallMovement2
@@ -223,7 +223,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
.Squirtle
ld de, .RightBallMovement1
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $4 ; is the player standing below the table?
jr z, .asm_1ccf3
ld de, .RightBallMovement2
@@ -249,7 +249,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
.Bulbasaur
ld de, .LeftBallMovement1
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $9 ; is the player standing to the right of the table?
jr nz, .asm_1ccf3
push hl
@@ -285,7 +285,7 @@ OaksLabScript8: ; 1cc80 (7:4c80)
call MoveSprite
ld a, $9
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript9: ; 1cd00 (7:4d00)
@@ -319,7 +319,7 @@ OaksLabScript9: ; 1cd00 (7:4d00)
predef HideObject
call Delay3
ld a, [wRivalStarterTemp]
- ld [W_RIVALSTARTER], a
+ ld [wRivalStarter], a
ld [wcf91], a
ld [wd11e], a
call GetMonName
@@ -336,11 +336,11 @@ OaksLabScript9: ; 1cd00 (7:4d00)
ld [wJoyIgnore], a
ld a, $a
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript10: ; 1cd6d (7:4d6d)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $6
ret nz
ld a, $1
@@ -372,7 +372,7 @@ OaksLabScript10: ; 1cd6d (7:4d6d)
call MoveSprite
ld a, $b
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript11: ; 1cdb9 (7:4db9)
@@ -381,9 +381,9 @@ OaksLabScript11: ; 1cdb9 (7:4db9)
ret nz
; define which team rival uses, and fight it
- ld a, SONY1 + $C8
- ld [W_CUROPPONENT], a
- ld a, [W_RIVALSTARTER]
+ ld a, OPP_SONY1
+ ld [wCurOpponent], a
+ ld a, [wRivalStarter]
cp STARTER2
jr nz, .NotSquirtle
ld a, $1
@@ -396,7 +396,7 @@ OaksLabScript11: ; 1cdb9 (7:4db9)
.Charmander
ld a, $3
.done
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
ld a, $1
ld [wSpriteIndex], a
call GetSpritePosition1
@@ -411,7 +411,7 @@ OaksLabScript11: ; 1cdb9 (7:4db9)
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
ld a, $c
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript12: ; 1ce03 (7:4e03)
@@ -432,7 +432,7 @@ OaksLabScript12: ; 1ce03 (7:4e03)
SetEvent EVENT_BATTLED_RIVAL_IN_OAKS_LAB
ld a, $d
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript13: ; 1ce32 (7:4e32)
@@ -446,19 +446,19 @@ OaksLabScript13: ; 1ce32 (7:4e32)
ld [H_SPRITEINDEX], a
ld de, .RivalExitMovement
call MoveSprite
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $4
; move left or right depending on where the player is standing
- jr nz, .asm_1ce5b
- ld a, $c0
- jr .asm_1ce5d
-.asm_1ce5b
- ld a, $80
-.asm_1ce5d
- ld [wcc5b], a
+ jr nz, .moveLeft
+ ld a, NPC_MOVEMENT_RIGHT
+ jr .next
+.moveLeft
+ ld a, NPC_MOVEMENT_LEFT
+.next
+ ld [wNPCMovementDirections], a
ld a, $e
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
.RivalExitMovement
@@ -481,14 +481,14 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
ld [wJoyIgnore], a
call PlayDefaultMusic ; reset to map music
ld a, $12
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
jr .done
; make the player keep facing the rival as he walks away
.asm_1ce8c
ld a, [wNPCNumScriptedSteps]
cp $5
jr nz, .asm_1cea8
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $4
jr nz, .asm_1cea1
ld a, SPRITE_FACING_RIGHT
@@ -511,7 +511,7 @@ OaksLabScript15: ; 1ceb0 (7:4eb0)
ld [hJoyHeld], a
call EnableAutoTextBoxDrawing
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld a, $15
@@ -535,7 +535,7 @@ OaksLabScript15: ; 1ceb0 (7:4eb0)
call MoveSprite
ld a, $10
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript_1cefd: ; 1cefd (7:4efd)
@@ -612,7 +612,7 @@ OaksLabScript16: ; 1cf12 (7:4f12)
call FillMemory
ld [hl], $ff
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld a, $1
@@ -621,7 +621,7 @@ OaksLabScript16: ; 1cf12 (7:4f12)
call MoveSprite
ld a, $11
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript17: ; 1cfd4 (7:4fd4)
@@ -639,12 +639,12 @@ OaksLabScript17: ; 1cfd4 (7:4fd4)
ld [wMissableObjectIndex], a
predef ShowObject
ld a, $5
- ld [W_PALLETTOWNCURSCRIPT], a
+ ld [wPalletTownCurScript], a
xor a
ld [wJoyIgnore], a
ld a, $12
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
ret
OaksLabScript18: ; 1d009 (7:5009)
@@ -675,7 +675,7 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)
ld [$ffeb], a
ld a, $8
ld [$ffee], a
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $3
jr nz, .asm_1d045
ld a, $4
@@ -695,7 +695,7 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)
ld a, $3
ld [wNPCMovementDirections2Index], a
ld b, $a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $4
jr nz, .asm_1d066
ld a, $40
@@ -714,9 +714,9 @@ OaksLabScript_1d02b: ; 1d02b (7:502b)
OaksLabScript_1d076: ; 1d076 (7:5076)
ld hl, OaksLabTextPointers + $36 ; starts at OaksLabText28
ld a, l
- ld [W_MAPTEXTPTR], a
+ ld [wMapTextPtr], a
ld a, h
- ld [W_MAPTEXTPTR+1], a
+ ld [wMapTextPtr+1], a
ret
OaksLabTextPointers: ; 1d082 (7:5082)
@@ -855,7 +855,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157)
ld [hl], SPRITE_FACING_RIGHT
ld hl, wd730
set 6, [hl]
- predef StarterDex ; StarterDex
+ predef StarterDex
ld hl, wd730
res 6, [hl]
call ReloadMapData
@@ -898,7 +898,7 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3)
and a
jr nz, OaksLabMonChoiceEnd
ld a, [wcf91]
- ld [W_PLAYERSTARTER], a
+ ld [wPlayerStarter], a
ld [wd11e], a
call GetMonName
ld a, [wSpriteIndex]
@@ -925,7 +925,7 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3)
xor a ; PLAYER_PARTY_DATA
ld [wMonDataLocation], a
ld a, 5
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, [wcf91]
ld [wd11e], a
call AddPartyMon
@@ -934,7 +934,7 @@ OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3)
ld a, $fc
ld [wJoyIgnore], a
ld a, $8
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
OaksLabMonChoiceEnd: ; 1d21f (7:521f)
jp TextScriptEnd
@@ -969,8 +969,8 @@ OaksLabText5: ; 1d248 (7:5248)
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
- ld a, [wd11e]
- cp $2
+ ld a, [wNumSetBits]
+ cp 2
jr c, .asm_1d279
CheckEvent EVENT_GOT_POKEDEX
jr z, .asm_1d279
@@ -1013,7 +1013,7 @@ OaksLabText5: ; 1d248 (7:5248)
call PrintText
call OaksLabScript_RemoveParcel
ld a, $f
- ld [W_OAKSLABCURSCRIPT], a
+ ld [wOaksLabCurScript], a
jr .asm_1d2ed
.asm_1d2c8
ld hl, OaksLabAroundWorldText
diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm
index e4c3f135..60238845 100755
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -5,7 +5,7 @@ PalletTownScript: ; 18e5b (6:4e5b)
.next
call EnableAutoTextBoxDrawing
ld hl,PalletTownScriptPointers
- ld a,[W_PALLETTOWNCURSCRIPT]
+ ld a,[wPalletTownCurScript]
jp CallFunctionInTable
PalletTownScriptPointers: ; 18e73 (6:4e73)
@@ -20,7 +20,7 @@ PalletTownScriptPointers: ; 18e73 (6:4e73)
PalletTownScript0: ; 18e81 (6:4e81)
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB
ret nz
- ld a,[W_YCOORD]
+ ld a,[wYCoord]
cp 1 ; is player near north exit?
ret nz
xor a
@@ -39,7 +39,7 @@ PalletTownScript0: ; 18e81 (6:4e81)
; trigger the next script
ld a,1
- ld [W_PALLETTOWNCURSCRIPT],a
+ ld [wPalletTownCurScript],a
ret
PalletTownScript1: ; 18eb2 (6:4eb2)
@@ -56,7 +56,7 @@ PalletTownScript1: ; 18eb2 (6:4eb2)
; trigger the next script
ld a,2
- ld [W_PALLETTOWNCURSCRIPT],a
+ ld [wPalletTownCurScript],a
ret
PalletTownScript2: ; 18ed2 (6:4ed2)
@@ -67,7 +67,7 @@ PalletTownScript2: ; 18ed2 (6:4ed2)
call SetSpriteFacingDirectionAndDelay
call Delay3
ld a,1
- ld [W_YCOORD],a
+ ld [wYCoord],a
ld a,1
ld [hNPCPlayerRelativePosPerspective],a
ld a,1
@@ -86,7 +86,7 @@ PalletTownScript2: ; 18ed2 (6:4ed2)
; trigger the next script
ld a,3
- ld [W_PALLETTOWNCURSCRIPT],a
+ ld [wPalletTownCurScript],a
ret
PalletTownScript3: ; 18f12 (6:4f12)
@@ -116,7 +116,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
; trigger the next script
ld a,4
- ld [W_PALLETTOWNCURSCRIPT],a
+ ld [wPalletTownCurScript],a
ret
PalletTownScript4: ; 18f4b (6:4f4b)
@@ -126,7 +126,7 @@ PalletTownScript4: ; 18f4b (6:4f4b)
; trigger the next script
ld a,5
- ld [W_PALLETTOWNCURSCRIPT],a
+ ld [wPalletTownCurScript],a
ret
PalletTownScript5: ; 18f56 (6:4f56)
diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm
index 66589d52..28fa1cc3 100755
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -1,7 +1,7 @@
PewterCityScript: ; 19237 (6:5237)
call EnableAutoTextBoxDrawing
ld hl, PewterCityScriptPointers
- ld a, [W_PEWTERCITYCURSCRIPT]
+ ld a, [wPewterCityCurScript]
jp CallFunctionInTable
PewterCityScriptPointers: ; 19243 (6:5243)
@@ -15,7 +15,7 @@ PewterCityScriptPointers: ; 19243 (6:5243)
PewterCityScript0: ; 19251 (6:5251)
xor a
- ld [W_MUSEUM1FCURSCRIPT], a
+ ld [wMuseum1fCurScript], a
ResetEvent EVENT_BOUGHT_MUSEUM_TICKET
call PewterCityScript_1925e
ret
@@ -73,7 +73,7 @@ PewterCityScript1: ; 19280 (6:5280)
ld de, MovementData_PewterMuseumGuyExit
call MoveSprite
ld a, $2
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
ret
MovementData_PewterMuseumGuyExit: ; 192ce (6:52ce)
@@ -91,7 +91,7 @@ PewterCityScript2: ; 192d3 (6:52d3)
ld [wMissableObjectIndex], a
predef HideObject
ld a, $3
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
ret
PewterCityScript3: ; 192e9 (6:52e9)
@@ -104,7 +104,7 @@ PewterCityScript3: ; 192e9 (6:52e9)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
ret
PewterCityScript4: ; 19305 (6:5305)
@@ -141,7 +141,7 @@ PewterCityScript4: ; 19305 (6:5305)
ld de, MovementData_PewterGymGuyExit
call MoveSprite
ld a, $5
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
ret
MovementData_PewterGymGuyExit: ; 19353 (6:5353)
@@ -160,7 +160,7 @@ PewterCityScript5: ; 19359 (6:5359)
ld [wMissableObjectIndex], a
predef HideObject
ld a, $6
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
ret
PewterCityScript6: ; 1936f (6:536f)
@@ -173,7 +173,7 @@ PewterCityScript6: ; 1936f (6:536f)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
ret
PewterCityTextPointers: ; 1938b (6:538b)
@@ -226,7 +226,7 @@ PewterCityText3: ; 193b1 (6:53b1)
ld [wSpriteIndex], a
call GetSpritePosition2
ld a, $1
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
.asm_193ee
jp TextScriptEnd
@@ -290,7 +290,7 @@ PewterCityText5: ; 19436 (6:5436)
ld [wSpriteIndex], a
call GetSpritePosition2
ld a, $4
- ld [W_PEWTERCITYCURSCRIPT], a
+ ld [wPewterCityCurScript], a
jp TextScriptEnd
PewterCityText_1945d: ; 1945d (6:545d)
diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm
index 831403bb..52e28cb8 100755
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -1,14 +1,14 @@
PewterGymScript: ; 5c387 (17:4387)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, PewterGymScript_5c3a4
call EnableAutoTextBoxDrawing
ld hl, PewterGymTrainerHeaders
ld de, PewterGymScriptPointers
- ld a, [W_PEWTERGYMCURSCRIPT]
+ ld a, [wPewterGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_PEWTERGYMCURSCRIPT], a
+ ld [wPewterGymCurScript], a
ret
PewterGymScript_5c3a4: ; 5c3a4 (17:43a4)
@@ -25,8 +25,8 @@ Gym1LeaderName: ; 5c3b9 (17:43b9)
PewterGymScript_5c3bf: ; 5c3bf (17:43bf)
xor a
ld [wJoyIgnore], a
- ld [W_PEWTERGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPewterGymCurScript], a
+ ld [wCurMapScript], a
ret
PewterGymScriptPointers: ; 5c3ca (17:43ca)
@@ -36,7 +36,7 @@ PewterGymScriptPointers: ; 5c3ca (17:43ca)
dw PewterGymScript3
PewterGymScript3: ; 5c3d2 (17:43d2)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, PewterGymScript_5c3bf
ld a, $f0
@@ -60,7 +60,7 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5c408
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 0, [hl]
ld hl, wBeatGymFlags
set 0, [hl]
@@ -126,12 +126,12 @@ PewterGymText1: ; 5c44e (17:444e)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $1
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_PEWTERGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPewterGymCurScript], a
+ ld [wCurMapScript], a
.asm_5c49b
jp TextScriptEnd
diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm
index 584878eb..46d4d509 100755
--- a/scripts/pewterpokecenter.asm
+++ b/scripts/pewterpokecenter.asm
@@ -27,7 +27,7 @@ PewterPokecenterText3: ; 5c59b (17:459b)
call DelayFrames
ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections
- ld bc, 4
+ ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
call CopyData
ld a, [wSpriteStateData1 + 3 * $10 + $2]
@@ -50,7 +50,7 @@ PewterPokecenterText3: ; 5c59b (17:459b)
push hl
ld hl, wJigglypuffFacingDirections
ld de, wJigglypuffFacingDirections - 1
- ld bc, 4
+ ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
call CopyData
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
@@ -59,9 +59,9 @@ PewterPokecenterText3: ; 5c59b (17:459b)
ld c, 24
call DelayFrames
- ld a, [wc026]
+ ld a, [wChannelSoundIDs]
ld b, a
- ld a, [wc027]
+ ld a, [wChannelSoundIDs + CH1]
or b
jr nz, .loop
@@ -79,6 +79,7 @@ JigglypuffFacingDirections: ; 5c608 (17:4608)
db $30 | SPRITE_FACING_LEFT
db $30 | SPRITE_FACING_UP
db $30 | SPRITE_FACING_RIGHT
+JigglypuffFacingDirectionsEnd:
PewterPokecenterText4: ; 5c60c (17:460c)
db $f6
diff --git a/scripts/pokemontower2.asm b/scripts/pokemontower2.asm
index a569b60b..b33be016 100755
--- a/scripts/pokemontower2.asm
+++ b/scripts/pokemontower2.asm
@@ -1,14 +1,14 @@
PokemonTower2Script: ; 604f2 (18:44f2)
call EnableAutoTextBoxDrawing
ld hl, PokemonTower2ScriptPointers
- ld a, [W_POKEMONTOWER2CURSCRIPT]
+ ld a, [wPokemonTower2CurScript]
jp CallFunctionInTable
PokemonTower2Script_604fe: ; 604fe (18:44fe)
xor a
ld [wJoyIgnore], a
- ld [W_POKEMONTOWER2CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower2CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower2ScriptPointers: ; 60509 (18:4509)
@@ -23,7 +23,7 @@ PokemonTower2Script0: ; 6050f (18:450f)
call ArePlayerCoordsInArray
ret nc
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
@@ -59,7 +59,7 @@ CoordsData_6055e: ; 6055e (18:455e)
db $0F ; isn't this supposed to end in $ff?
PokemonTower2Script1: ; 60563 (18:4563)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, PokemonTower2Script_604fe
ld a, $f0
@@ -77,12 +77,12 @@ PokemonTower2Script1: ; 60563 (18:4563)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld a, $2
- ld [W_POKEMONTOWER2CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower2CurScript], a
+ ld [wCurMapScript], a
ret
MovementData_605a9: ; 605a9 (18:45a9)
@@ -118,8 +118,8 @@ PokemonTower2Script2: ; 605bb (18:45bb)
ld [wJoyIgnore], a
call PlayDefaultMusic
ld a, $0
- ld [W_POKEMONTOWER2CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower2CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower2TextPointers: ; 605db (18:45db)
@@ -142,11 +142,11 @@ PokemonTower2Text1: ; 605df (18:45df)
ld hl, PokemonTower2Text_60632
ld de, PokemonTower2Text_60637
call SaveEndBattleTextPointers
- ld a, SONY2 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY2
+ ld [wCurOpponent], a
; select which team to use during the encounter
- ld a, [W_RIVALSTARTER]
+ ld a, [wRivalStarter]
cp STARTER2
jr nz, .NotSquirtle
ld a, $4
@@ -159,11 +159,11 @@ PokemonTower2Text1: ; 605df (18:45df)
.Charmander
ld a, $6
.done
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
ld a, $1
- ld [W_POKEMONTOWER2CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower2CurScript], a
+ ld [wCurMapScript], a
.asm_41852
jp TextScriptEnd
diff --git a/scripts/pokemontower3.asm b/scripts/pokemontower3.asm
index a4fbbf18..0c3c6639 100755
--- a/scripts/pokemontower3.asm
+++ b/scripts/pokemontower3.asm
@@ -2,9 +2,9 @@ PokemonTower3Script: ; 606cc (18:46cc)
call EnableAutoTextBoxDrawing
ld hl, PokemonTower3TrainerHeaders
ld de, PokemonTower3ScriptPointers
- ld a, [W_POKEMONTOWER3CURSCRIPT]
+ ld a, [wPokemonTower3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_POKEMONTOWER3CURSCRIPT], a
+ ld [wPokemonTower3CurScript], a
ret
PokemonTower3ScriptPointers: ; 606df (18:46df)
diff --git a/scripts/pokemontower4.asm b/scripts/pokemontower4.asm
index 2638bdc2..bd4cda11 100755
--- a/scripts/pokemontower4.asm
+++ b/scripts/pokemontower4.asm
@@ -2,9 +2,9 @@ PokemonTower4Script: ; 607f6 (18:47f6)
call EnableAutoTextBoxDrawing
ld hl, PokemonTower4TrainerHeaders
ld de, PokemonTower4ScriptPointers
- ld a, [W_POKEMONTOWER4CURSCRIPT]
+ ld a, [wPokemonTower4CurScript]
call ExecuteCurMapScriptInTable
- ld [W_POKEMONTOWER4CURSCRIPT], a
+ ld [wPokemonTower4CurScript], a
ret
PokemonTower4ScriptPointers: ; 60809 (18:4809)
diff --git a/scripts/pokemontower5.asm b/scripts/pokemontower5.asm
index c4e9eed9..6a2f5758 100755
--- a/scripts/pokemontower5.asm
+++ b/scripts/pokemontower5.asm
@@ -2,9 +2,9 @@ PokemonTower5Script: ; 60932 (18:4932)
call EnableAutoTextBoxDrawing
ld hl, PokemonTower5TrainerHeaders
ld de, PokemonTower5ScriptPointers
- ld a, [W_POKEMONTOWER5CURSCRIPT]
+ ld a, [wPokemonTower5CurScript]
call ExecuteCurMapScriptInTable
- ld [W_POKEMONTOWER5CURSCRIPT], a
+ ld [wPokemonTower5CurScript], a
ret
PokemonTower5ScriptPointers: ; 60945 (18:4945)
diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm
index 37ca1b33..7bae81ea 100755
--- a/scripts/pokemontower6.asm
+++ b/scripts/pokemontower6.asm
@@ -2,16 +2,16 @@ PokemonTower6Script: ; 60aef (18:4aef)
call EnableAutoTextBoxDrawing
ld hl, PokemonTower6TrainerHeaders
ld de, PokemonTower6ScriptPointers
- ld a, [W_POKEMONTOWER6CURSCRIPT]
+ ld a, [wPokemonTower6CurScript]
call ExecuteCurMapScriptInTable
- ld [W_POKEMONTOWER6CURSCRIPT], a
+ ld [wPokemonTower6CurScript], a
ret
PokemonTower6Script_60b02: ; 60b02 (18:4b02)
xor a
ld [wJoyIgnore], a
- ld [W_POKEMONTOWER6CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower6CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower6ScriptPointers: ; 60b0d (18:4b0d)
@@ -33,19 +33,19 @@ PokemonTower6Script0: ; 60b17 (18:4b17)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, MAROWAK
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
ld a, 30
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, $4
- ld [W_POKEMONTOWER6CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower6CurScript], a
+ ld [wCurMapScript], a
ret
CoordsData_60b45: ; 60b45 (18:4b45)
db $10,$0A,$FF
PokemonTower6Script4: ; 60b48 (18:4b48)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, PokemonTower6Script_60b02
ld a, $ff
@@ -66,8 +66,8 @@ PokemonTower6Script4: ; 60b48 (18:4b48)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_POKEMONTOWER6CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower6CurScript], a
+ ld [wCurMapScript], a
ret
.asm_60b82
ld a, $1
@@ -80,8 +80,8 @@ PokemonTower6Script4: ; 60b48 (18:4b48)
ld hl, wd730
set 7, [hl]
ld a, $3
- ld [W_POKEMONTOWER6CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower6CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower6Script3: ; 60ba1 (18:4ba1)
@@ -90,8 +90,8 @@ PokemonTower6Script3: ; 60ba1 (18:4ba1)
ret nz
call Delay3
xor a
- ld [W_POKEMONTOWER6CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower6CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower6TextPointers: ; 60bb1 (18:4bb1)
diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm
index a4635aa3..0aebfec2 100755
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -2,16 +2,16 @@ PokemonTower7Script: ; 60d05 (18:4d05)
call EnableAutoTextBoxDrawing
ld hl, PokemonTower7TrainerHeaders
ld de, PokemonTower7ScriptPointers
- ld a, [W_POKEMONTOWER7CURSCRIPT]
+ ld a, [wPokemonTower7CurScript]
call ExecuteCurMapScriptInTable
- ld [W_POKEMONTOWER7CURSCRIPT], a
+ ld [wPokemonTower7CurScript], a
ret
PokemonTower7Script_60d18: ; 60d18 (18:4d18)
xor a
ld [wJoyIgnore], a
- ld [W_POKEMONTOWER7CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower7CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower7ScriptPointers:
@@ -24,7 +24,7 @@ PokemonTower7ScriptPointers:
PokemonTower7Script2: ; 60d23 (18:4d23)
ld hl, wFlags_0xcd60
res 0, [hl]
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, PokemonTower7Script_60d18
call EndTrainerBattle
@@ -35,15 +35,15 @@ PokemonTower7Script2: ; 60d23 (18:4d23)
call DisplayTextID
call PokemonTower7Script_60db6
ld a, $3
- ld [W_POKEMONTOWER7CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower7CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower7Script3: ; 60d56 (18:4d56)
ld a, [wd730]
bit 0, a
ret nz
- ld hl, W_MISSABLEOBJECTLIST
+ ld hl, wMissableObjectList
ld a, [wSpriteIndex]
ld b, a
.missableObjectsListLoop
@@ -59,8 +59,8 @@ PokemonTower7Script3: ; 60d56 (18:4d56)
ld [wTrainerHeaderFlagBit], a
ld [wUnusedDA38], a
ld a, $0
- ld [W_POKEMONTOWER7CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower7CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower7Script4: ; 60d86 (18:4d86)
@@ -80,8 +80,8 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
ld hl, wd72d
set 3, [hl]
ld a, $0
- ld [W_POKEMONTOWER7CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower7CurScript], a
+ ld [wCurMapScript], a
ret
PokemonTower7Script_60db6: ; 60db6 (18:4db6)
@@ -92,9 +92,9 @@ PokemonTower7Script_60db6: ; 60db6 (18:4db6)
ld d, $0
ld e, a
add hl, de
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
.asm_60dcb
ld a, [hli]
@@ -268,8 +268,8 @@ PokemonTower7FujiText:
ld [wMissableObjectIndex], a
predef ShowObject
ld a, $4
- ld [W_POKEMONTOWER7CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wPokemonTower7CurScript], a
+ ld [wCurMapScript], a
jp TextScriptEnd
TowerRescueFujiText:
diff --git a/scripts/powerplant.asm b/scripts/powerplant.asm
index 48f291e1..1470a091 100755
--- a/scripts/powerplant.asm
+++ b/scripts/powerplant.asm
@@ -2,9 +2,9 @@ PowerPlantScript: ; 1e2c6 (7:62c6)
call EnableAutoTextBoxDrawing
ld hl, PowerPlantTrainerHeaders
ld de, PowerPlantScriptPointers
- ld a, [W_POWERPLANTCURSCRIPT]
+ ld a, [wPowerPlantCurScript]
call ExecuteCurMapScriptInTable
- ld [W_POWERPLANTCURSCRIPT], a
+ ld [wPowerPlantCurScript], a
ret
PowerPlantScriptPointers: ; 1e2d9 (7:62d9)
@@ -114,8 +114,8 @@ PowerPlantTrainerHeader8: ; 1e35b (7:635b)
InitVoltorbBattle: ; 1e368 (7:6368)
call TalkToTrainer
- ld a, [W_CURMAPSCRIPT]
- ld [W_POWERPLANTCURSCRIPT], a
+ ld a, [wCurMapScript]
+ ld [wPowerPlantCurScript], a
jp TextScriptEnd
PowerPlantText1: ; 1e374 (7:6374)
diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm
index 09ce97dc..f9c7193f 100755
--- a/scripts/redshouse1f.asm
+++ b/scripts/redshouse1f.asm
@@ -29,14 +29,14 @@ MomHealPokemon: ; 4818a (12:418a)
call ReloadMapData
predef HealParty
ld a, MUSIC_PKMN_HEALED
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
.next
- ld a, [wc026]
+ ld a, [wChannelSoundIDs]
cp MUSIC_PKMN_HEALED
jr z, .next
- ld a, [wd35b]
- ld [wc0ee], a
+ ld a, [wMapMusicSoundID]
+ ld [wNewSoundID], a
call PlaySound
call GBFadeInFromWhite
ld hl, MomHealText2
diff --git a/scripts/redshouse2f.asm b/scripts/redshouse2f.asm
index 2335e6d1..352b7dea 100755
--- a/scripts/redshouse2f.asm
+++ b/scripts/redshouse2f.asm
@@ -1,7 +1,7 @@
RedsHouse2FScript: ; 5c0b0 (17:40b0)
call EnableAutoTextBoxDrawing
ld hl,RedsHouse2FScriptPointers
- ld a,[W_REDSHOUSE2CURSCRIPT]
+ ld a,[wRedsHouse2CurScript]
jp CallFunctionInTable
RedsHouse2FScriptPointers: ; 5c0bc (17:40bc)
@@ -14,7 +14,7 @@ RedsHouse2FScript0: ; 5c0c0 (17:40c0)
ld a,PLAYER_DIR_UP
ld [wPlayerMovingDirection],a
ld a,1
- ld [W_REDSHOUSE2CURSCRIPT],a
+ ld [wRedsHouse2CurScript],a
ret
RedsHouse2FScript1: ; 5c0ce (17:40ce)
diff --git a/scripts/rockethideout1.asm b/scripts/rockethideout1.asm
index 82561577..d821434d 100755
--- a/scripts/rockethideout1.asm
+++ b/scripts/rockethideout1.asm
@@ -3,13 +3,13 @@ RocketHideout1Script: ; 44bca (11:4bca)
call EnableAutoTextBoxDrawing
ld hl, RocketHideout1TrainerHeaders
ld de, RocketHideout1ScriptPointers
- ld a, [W_ROCKETHIDEOUT1CURSCRIPT]
+ ld a, [wRocketHideout1CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROCKETHIDEOUT1CURSCRIPT], a
+ ld [wRocketHideout1CurScript], a
ret
RocketHideout1Script_44be0: ; 44be0 (11:4be0)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/rockethideout2.asm b/scripts/rockethideout2.asm
index f269faef..db266be3 100755
--- a/scripts/rockethideout2.asm
+++ b/scripts/rockethideout2.asm
@@ -2,9 +2,9 @@ RocketHideout2Script: ; 44e27 (11:4e27)
call EnableAutoTextBoxDrawing
ld hl, RocketHideout2TrainerHeaders
ld de, RocketHideout2ScriptPointers
- ld a, [W_ROCKETHIDEOUT2CURSCRIPT]
+ ld a, [wRocketHideout2CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROCKETHIDEOUT2CURSCRIPT], a
+ ld [wRocketHideout2CurScript], a
ret
RocketHideout2ScriptPointers: ; 44e3a (11:4e3a)
@@ -14,9 +14,9 @@ RocketHideout2ScriptPointers: ; 44e3a (11:4e3a)
dw RocketHideout2Script3
RocketHideout2Script0: ; 44e42 (11:4e42)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
ld hl, RocketHideout2ArrowTilePlayerMovement
call DecodeArrowMovementRLE
@@ -30,7 +30,7 @@ RocketHideout2Script0: ; 44e42 (11:4e42)
ld a, $ff
ld [wJoyIgnore], a
ld a, $3
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
ret
;format:
@@ -310,7 +310,7 @@ RocketHideout2Script3: ; 44fc2 (11:4fc2)
ld hl, wd736
res 7, [hl]
ld a, $0
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
ret
LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7)
@@ -323,7 +323,7 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7)
add hl, bc
ld a, [hl]
ld [wSpriteStateData1 + 2], a
- ld a, [W_CURMAPTILESET]
+ ld a, [wCurMapTileset]
cp FACILITY
ld hl, FacilitySpinnerArrows
jr z, .asm_44ff6
diff --git a/scripts/rockethideout3.asm b/scripts/rockethideout3.asm
index 1f6d5b41..82bdd394 100755
--- a/scripts/rockethideout3.asm
+++ b/scripts/rockethideout3.asm
@@ -2,9 +2,9 @@ RocketHideout3Script: ; 45225 (11:5225)
call EnableAutoTextBoxDrawing
ld hl, RocketHideout3TrainerHeaders
ld de, RocketHideout3ScriptPointers
- ld a, [W_ROCKETHIDEOUT3CURSCRIPT]
+ ld a, [wRocketHideout3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROCKETHIDEOUT3CURSCRIPT], a
+ ld [wRocketHideout3CurScript], a
ret
RocketHideout3ScriptPointers: ; 45238 (11:5238)
@@ -14,9 +14,9 @@ RocketHideout3ScriptPointers: ; 45238 (11:5238)
dw RocketHideout3Script3
RocketHideout3Script0: ; 45240 (11:5240)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
ld hl, RocketHideout3ArrowTilePlayerMovement
call DecodeArrowMovementRLE
@@ -30,7 +30,7 @@ RocketHideout3Script0: ; 45240 (11:5240)
ld a, $ff
ld [wJoyIgnore], a
ld a, $3
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
ret
;format:
@@ -140,7 +140,7 @@ RocketHideout3Script3: ; 452e4 (11:452e4)
ld hl, wd736
res 7, [hl]
ld a, $0
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
ret
RocketHideout3TextPointers: ; 452fa (11:52fa)
diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm
index a71e444c..44ae7814 100755
--- a/scripts/rockethideout4.asm
+++ b/scripts/rockethideout4.asm
@@ -3,13 +3,13 @@ RocketHideout4Script: ; 4545d (11:545d)
call EnableAutoTextBoxDrawing
ld hl, RocketHideout4TrainerHeader0
ld de, RocketHideout4ScriptPointers
- ld a, [W_ROCKETHIDEOUT4CURSCRIPT]
+ ld a, [wRocketHideout4CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROCKETHIDEOUT4CURSCRIPT], a
+ ld [wRocketHideout4CurScript], a
ret
RocketHideout4Script_45473: ; 45473 (11:5473)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -33,8 +33,8 @@ RocketHideout4Script_45473: ; 45473 (11:5473)
RocketHideout4Script_454a3: ; 454a3 (11:54a3)
xor a
ld [wJoyIgnore], a
- ld [W_ROCKETHIDEOUT4CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRocketHideout4CurScript], a
+ ld [wCurMapScript], a
ret
RocketHideout4ScriptPointers: ; 454ae (11:54ae)c
@@ -44,7 +44,7 @@ RocketHideout4ScriptPointers: ; 454ae (11:54ae)c
dw RocketHideout4Script3
RocketHideout4Script3: ; 454b6 (11:54b6)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, RocketHideout4Script_454a3
call UpdateSprites
@@ -65,11 +65,11 @@ RocketHideout4Script3: ; 454b6 (11:54b6)
call GBFadeInFromBlack
xor a
ld [wJoyIgnore], a
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, $0
- ld [W_ROCKETHIDEOUT4CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRocketHideout4CurScript], a
+ ld [wCurMapScript], a
ret
RocketHideout4TextPointers: ; 45501 (11:5501)
@@ -133,8 +133,8 @@ RocketHideout4Text1: ; 4553a (11:553a)
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_ROCKETHIDEOUT4CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRocketHideout4CurScript], a
+ ld [wCurMapScript], a
jr .asm_209f0
.asm_545571
ld hl, RocketHideout4Text10
diff --git a/scripts/rockethideoutelevator.asm b/scripts/rockethideoutelevator.asm
index 52c7fad3..c90b0aad 100755
--- a/scripts/rockethideoutelevator.asm
+++ b/scripts/rockethideoutelevator.asm
@@ -1,5 +1,5 @@
RocketHideoutElevatorScript: ; 45710 (11:5710)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
@@ -35,14 +35,16 @@ RocketHideoutElevatorScript_45741: ; 45741 (11:5741)
ld hl, RocketHideoutElavatorFloors
call LoadItemList
ld hl, RocketHideoutElevatorWarpMaps
- ld de, wcc5b
- ld bc, $0006
+ ld de, wElevatorWarpMaps
+ ld bc, RocketHideoutElevatorWarpMapsEnd - RocketHideoutElevatorWarpMaps
call CopyData
ret
RocketHideoutElavatorFloors: ; 45754 (11:5754)
db $03 ; num elements in list
- db $55, $54, $61 ; "B1F", "B2F", "B4F"
+ db FLOOR_B1F
+ db FLOOR_B2F
+ db FLOOR_B4F
db $FF ; terminator
RocketHideoutElevatorWarpMaps: ; 45759 (11:5759)
@@ -52,6 +54,7 @@ RocketHideoutElevatorWarpMaps: ; 45759 (11:5759)
db $04, ROCKET_HIDEOUT_1
db $04, ROCKET_HIDEOUT_2
db $02, ROCKET_HIDEOUT_4
+RocketHideoutElevatorWarpMapsEnd:
RocketHideoutElevatorScript_4575f: ; 4575f (11:575f)
call Delay3
diff --git a/scripts/rocktunnel1.asm b/scripts/rocktunnel1.asm
index d03a5ba1..2b917f91 100755
--- a/scripts/rocktunnel1.asm
+++ b/scripts/rocktunnel1.asm
@@ -2,9 +2,9 @@ RockTunnel1Script: ; 444dc (11:44dc)
call EnableAutoTextBoxDrawing
ld hl, RockTunnel1TrainerHeaders
ld de, RockTunnel1ScriptPointers
- ld a, [W_ROCKTUNNEL1CURSCRIPT]
+ ld a, [wRockTunnel1CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROCKTUNNEL1CURSCRIPT], a
+ ld [wRockTunnel1CurScript], a
ret
RockTunnel1ScriptPointers: ; 444ef (11:44ef)
diff --git a/scripts/rocktunnel2.asm b/scripts/rocktunnel2.asm
index 2082394a..5cc04a2d 100755
--- a/scripts/rocktunnel2.asm
+++ b/scripts/rocktunnel2.asm
@@ -2,9 +2,9 @@ RockTunnel2Script: ; 45feb (11:5feb)
call EnableAutoTextBoxDrawing
ld hl, RockTunnel2TrainerHeaders
ld de, RockTunnel2ScriptPointers
- ld a, [W_ROCKTUNNEL2CURSCRIPT]
+ ld a, [wRockTunnel2CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROCKTUNNEL2CURSCRIPT], a
+ ld [wRockTunnel2CurScript], a
ret
RockTunnel2ScriptPointers: ; 45ffe (11:5ffe)
diff --git a/scripts/route10.asm b/scripts/route10.asm
index 2d5d2ae4..5a501557 100755
--- a/scripts/route10.asm
+++ b/scripts/route10.asm
@@ -2,9 +2,9 @@ Route10Script: ; 59336 (16:5336)
call EnableAutoTextBoxDrawing
ld hl, Route10TrainerHeaders
ld de, Route10ScriptPointers
- ld a, [W_ROUTE10CURSCRIPT]
+ ld a, [wRoute10CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE10CURSCRIPT], a
+ ld [wRoute10CurScript], a
ret
Route10ScriptPointers: ; 59349 (16:5349)
diff --git a/scripts/route11.asm b/scripts/route11.asm
index 3a9f1e0d..d56b7730 100755
--- a/scripts/route11.asm
+++ b/scripts/route11.asm
@@ -2,9 +2,9 @@ Route11Script: ; 5944c (16:544c)
call EnableAutoTextBoxDrawing
ld hl, Route11TrainerHeaders
ld de, Route11ScriptPointers
- ld a, [W_ROUTE11CURSCRIPT]
+ ld a, [wRoute11CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE11CURSCRIPT], a
+ ld [wRoute11CurScript], a
ret
Route11ScriptPointers: ; 5945f (16:545f)
diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm
index 9bae1398..ec543a6a 100755
--- a/scripts/route11gateupstairs.asm
+++ b/scripts/route11gateupstairs.asm
@@ -20,18 +20,18 @@ Route11GateUpstairsText2: ; 4946c (12:546c)
CheckEvent EVENT_GOT_ITEMFINDER, 1
jr c, .asm_4949b
ld a, 30 ; pokemon needed
- ld [$ffdb], a
+ ld [hOaksAideRequirement], a
ld a, ITEMFINDER ; oak's aide reward
- ld [$ffdc], a
+ ld [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
ld h, d
ld l, e
- ld de, wcc5b
- ld bc, $000d
+ ld de, wOaksAideRewardItemName
+ ld bc, ITEM_NAME_LENGTH
call CopyData
- predef OaksAideScript ; call oak's aide script
- ld a, [$ffdb]
+ predef OaksAideScript
+ ld a, [hOaksAideResult]
dec a
jr nz, .asm_494a1
SetEvent EVENT_GOT_ITEMFINDER
diff --git a/scripts/route12.asm b/scripts/route12.asm
index 4057ce03..882e687a 100755
--- a/scripts/route12.asm
+++ b/scripts/route12.asm
@@ -2,16 +2,16 @@ Route12Script: ; 595f3 (16:55f3)
call EnableAutoTextBoxDrawing
ld hl, Route12TrainerHeaders
ld de, Route12ScriptPointers
- ld a, [W_ROUTE12CURSCRIPT]
+ ld a, [wRoute12CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE12CURSCRIPT], a
+ ld [wRoute12CurScript], a
ret
Route12Script_59606: ; 59606 (16:5606)
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE12CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute12CurScript], a
+ ld [wCurMapScript], a
ret
Route12ScriptPointers: ; 59611 (16:5611)
@@ -30,19 +30,19 @@ Route12Script0: ; 59619 (16:5619)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, SNORLAX
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
ld a, 30
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, HS_ROUTE_12_SNORLAX
ld [wMissableObjectIndex], a
predef HideObject
ld a, $3
- ld [W_ROUTE12CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute12CurScript], a
+ ld [wCurMapScript], a
ret
Route12Script3: ; 5964c (16:564c)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jr z, Route12Script_59606
call UpdateSprites
@@ -56,8 +56,8 @@ Route12Script3: ; 5964c (16:564c)
SetEvent EVENT_BEAT_ROUTE12_SNORLAX
call Delay3
ld a, $0
- ld [W_ROUTE12CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute12CurScript], a
+ ld [wCurMapScript], a
ret
Route12TextPointers: ; 59675 (16:5675)
diff --git a/scripts/route13.asm b/scripts/route13.asm
index ab061071..911c15af 100755
--- a/scripts/route13.asm
+++ b/scripts/route13.asm
@@ -2,9 +2,9 @@ Route13Script: ; 5581e (15:581e)
call EnableAutoTextBoxDrawing
ld hl, Route13TrainerHeaders
ld de, Route13ScriptPointers
- ld a, [W_ROUTE13CURSCRIPT]
+ ld a, [wRoute13CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE13CURSCRIPT], a
+ ld [wRoute13CurScript], a
ret
Route13ScriptPointers: ; 55831 (15:5831)
diff --git a/scripts/route14.asm b/scripts/route14.asm
index d65e257f..9970b817 100755
--- a/scripts/route14.asm
+++ b/scripts/route14.asm
@@ -2,9 +2,9 @@ Route14Script: ; 559d3 (15:59d3)
call EnableAutoTextBoxDrawing
ld hl, Route14TrainerHeaders
ld de, Route14ScriptPointers
- ld a, [W_ROUTE14CURSCRIPT]
+ ld a, [wRoute14CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE14CURSCRIPT], a
+ ld [wRoute14CurScript], a
ret
Route14ScriptPointers: ; 559e6 (15:59e6)
diff --git a/scripts/route15.asm b/scripts/route15.asm
index 023f859c..5f58b996 100755
--- a/scripts/route15.asm
+++ b/scripts/route15.asm
@@ -2,9 +2,9 @@ Route15Script: ; 597ae (16:57ae)
call EnableAutoTextBoxDrawing
ld hl, Route15TrainerHeaders
ld de, Route15ScriptPointers
- ld a, [W_ROUTE15CURSCRIPT]
+ ld a, [wRoute15CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE15CURSCRIPT], a
+ ld [wRoute15CurScript], a
ret
Route15ScriptPointers: ; 597c1 (16:57c1)
diff --git a/scripts/route15gateupstairs.asm b/scripts/route15gateupstairs.asm
index cedabdc0..14e3bc5d 100755
--- a/scripts/route15gateupstairs.asm
+++ b/scripts/route15gateupstairs.asm
@@ -10,17 +10,17 @@ Route15GateUpstairsText1: ; 49651 (12:5651)
CheckEvent EVENT_GOT_EXP_ALL
jr nz, .asm_49683
ld a, 50 ; pokemon needed
- ld [$ffdb], a
- ld a, EXP__ALL ; oak's aide reward
- ld [$ffdc], a
+ ld [hOaksAideRequirement], a
+ ld a, EXP_ALL ; oak's aide reward
+ ld [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
ld hl, wcd6d
- ld de, wcc5b
- ld bc, $000d
+ ld de, wOaksAideRewardItemName
+ ld bc, ITEM_NAME_LENGTH
call CopyData
- predef OaksAideScript ; call oak's aide script
- ld a, [$ffdb]
+ predef OaksAideScript
+ ld a, [hOaksAideResult]
cp $1
jr nz, .asm_49689
SetEvent EVENT_GOT_EXP_ALL
diff --git a/scripts/route16.asm b/scripts/route16.asm
index c762c999..1f6ba9a3 100755
--- a/scripts/route16.asm
+++ b/scripts/route16.asm
@@ -2,16 +2,16 @@ Route16Script: ; 59933 (16:5933)
call EnableAutoTextBoxDrawing
ld hl, Route16TrainerHeaders
ld de, Route16ScriptPointers
- ld a, [W_ROUTE16CURSCRIPT]
+ ld a, [wRoute16CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE16CURSCRIPT], a
+ ld [wRoute16CurScript], a
ret
Route16Script_59946: ; 59946 (16:5946)
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE16CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute16CurScript], a
+ ld [wCurMapScript], a
ret
Route16ScriptPointers: ; 59951 (16:5951)
@@ -30,20 +30,20 @@ Route16Script0: ; 59959 (16:5959)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, SNORLAX
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
ld a, 30
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, HS_ROUTE_16_SNORLAX
ld [wMissableObjectIndex], a
predef HideObject
call UpdateSprites
ld a, $3
- ld [W_ROUTE16CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute16CurScript], a
+ ld [wCurMapScript], a
ret
Route16Script3: ; 5998f (16:598f)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, Route16Script_59946
call UpdateSprites
@@ -57,8 +57,8 @@ Route16Script3: ; 5998f (16:598f)
SetEvent EVENT_BEAT_ROUTE16_SNORLAX
call Delay3
ld a, $0
- ld [W_ROUTE16CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute16CurScript], a
+ ld [wCurMapScript], a
ret
Route16TextPointers: ; 599b9 (16:59b9)
diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm
index 801e577e..4bfef638 100755
--- a/scripts/route16gate.asm
+++ b/scripts/route16gate.asm
@@ -2,7 +2,7 @@ Route16GateScript: ; 496be (12:56be)
ld hl, wd732
res 5, [hl]
call EnableAutoTextBoxDrawing
- ld a, [W_ROUTE16GATECURSCRIPT]
+ ld a, [wRoute16GateCurScript]
ld hl, Route16GateScriptPointers
jp CallFunctionInTable
@@ -36,11 +36,11 @@ Route16GateScript0: ; 496d7 (12:56d7)
call FillMemory
call StartSimulatingJoypadStates
ld a, $1
- ld [W_ROUTE16GATECURSCRIPT], a
+ ld [wRoute16GateCurScript], a
ret
.asm_4970e
ld a, $2
- ld [W_ROUTE16GATECURSCRIPT], a
+ ld [wRoute16GateCurScript], a
ret
CoordsData_49714: ; 49714 (12:5714)
@@ -67,7 +67,7 @@ Route16GateScript2: ; 49727 (12:5727)
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_ROUTE16GATECURSCRIPT], a
+ ld [wRoute16GateCurScript], a
ret
Route16GateScript3: ; 49741 (12:5741)
@@ -79,7 +79,7 @@ Route16GateScript3: ; 49741 (12:5741)
ld hl, wd730
res 7, [hl]
ld a, $0
- ld [W_ROUTE16GATECURSCRIPT], a
+ ld [wRoute16GateCurScript], a
ret
Route16GateScript_49755: ; 49755 (12:5755)
diff --git a/scripts/route17.asm b/scripts/route17.asm
index 28c43627..f2a021a7 100755
--- a/scripts/route17.asm
+++ b/scripts/route17.asm
@@ -2,9 +2,9 @@ Route17Script: ; 55b7a (15:5b7a)
call EnableAutoTextBoxDrawing
ld hl, Route17TrainerHeaders
ld de, Route17ScriptPointers
- ld a, [W_ROUTE17CURSCRIPT]
+ ld a, [wRoute17CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE17CURSCRIPT], a
+ ld [wRoute17CurScript], a
ret
Route17ScriptPointers: ; 55b8d (15:5b8d)
diff --git a/scripts/route18.asm b/scripts/route18.asm
index 9a077faf..dcd4b5ee 100755
--- a/scripts/route18.asm
+++ b/scripts/route18.asm
@@ -2,9 +2,9 @@ Route18Script: ; 59ac7 (16:5ac7)
call EnableAutoTextBoxDrawing
ld hl, Route18TrainerHeaders
ld de, Route18ScriptPointers
- ld a, [W_ROUTE18CURSCRIPT]
+ ld a, [wRoute18CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE18CURSCRIPT], a
+ ld [wRoute18CurScript], a
ret
Route18ScriptPointers: ; 59ada (16:5ada)
diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm
index 060a6bbf..c5462686 100755
--- a/scripts/route18gate.asm
+++ b/scripts/route18gate.asm
@@ -2,7 +2,7 @@ Route18GateScript: ; 49876 (12:5876)
ld hl, wd732
res 5, [hl]
call EnableAutoTextBoxDrawing
- ld a, [W_ROUTE18GATECURSCRIPT]
+ ld a, [wRoute18GateCurScript]
ld hl, Route18GateScriptPointers
jp CallFunctionInTable
@@ -36,11 +36,11 @@ Route18GateScript0: ; 4988f (12:588f)
call FillMemory
call StartSimulatingJoypadStates
ld a, $1
- ld [W_ROUTE18GATECURSCRIPT], a
+ ld [wRoute18GateCurScript], a
ret
.asm_498c6
ld a, $2
- ld [W_ROUTE18GATECURSCRIPT], a
+ ld [wRoute18GateCurScript], a
ret
CoordsData_498cc: ; 498cc (12:58cc)
@@ -67,7 +67,7 @@ Route18GateScript2: ; 498df (12:58df)
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_ROUTE18GATECURSCRIPT], a
+ ld [wRoute18GateCurScript], a
ret
Route18GateScript3: ; 498f9 (12:58f9)
@@ -79,7 +79,7 @@ Route18GateScript3: ; 498f9 (12:58f9)
ld hl, wd730
res 7, [hl]
ld a, $0
- ld [W_ROUTE18GATECURSCRIPT], a
+ ld [wRoute18GateCurScript], a
ret
Route18GateTextPointers: ; 4990d (12:590d)
diff --git a/scripts/route19.asm b/scripts/route19.asm
index 4a60e40f..c6aa214e 100755
--- a/scripts/route19.asm
+++ b/scripts/route19.asm
@@ -2,9 +2,9 @@ Route19Script: ; 55d44 (15:5d44)
call EnableAutoTextBoxDrawing
ld hl, Route19TrainerHeaders
ld de, Route19ScriptPointers
- ld a, [W_ROUTE19CURSCRIPT]
+ ld a, [wRoute19CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE19CURSCRIPT], a
+ ld [wRoute19CurScript], a
ret
Route19ScriptPointers: ; 55d57 (15:5d57)
diff --git a/scripts/route20.asm b/scripts/route20.asm
index ce9e6f23..9c5fc387 100755
--- a/scripts/route20.asm
+++ b/scripts/route20.asm
@@ -4,9 +4,9 @@ Route20Script: ; 50ca9 (14:4ca9)
call EnableAutoTextBoxDrawing
ld hl, Route20TrainerHeader0
ld de, Route20ScriptPointers
- ld a, [W_ROUTE20CURSCRIPT]
+ ld a, [wRoute20CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE20CURSCRIPT], a
+ ld [wRoute20CurScript], a
ret
Route20Script_50cc6: ; 50cc6 (14:4cc6)
diff --git a/scripts/route21.asm b/scripts/route21.asm
index 4c8087fd..821cea39 100755
--- a/scripts/route21.asm
+++ b/scripts/route21.asm
@@ -2,9 +2,9 @@ Route21Script: ; 55eeb (15:5eeb)
call EnableAutoTextBoxDrawing
ld hl, Route21TrainerHeaders
ld de, Route21ScriptPointers
- ld a, [W_ROUTE21CURSCRIPT]
+ ld a, [wRoute21CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE21CURSCRIPT], a
+ ld [wRoute21CurScript], a
ret
Route21ScriptPointers: ; 55efe (15:5efe)
diff --git a/scripts/route22.asm b/scripts/route22.asm
index 041f75e6..81da41a1 100755
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -1,7 +1,7 @@
Route22Script: ; 50eb2 (14:4eb2)
call EnableAutoTextBoxDrawing
ld hl, Route22ScriptPointers
- ld a, [W_ROUTE22CURSCRIPT]
+ ld a, [wRoute22CurScript]
jp CallFunctionInTable
Route22ScriptPointers: ; 50ebe (14:4ebe)
@@ -17,12 +17,12 @@ Route22ScriptPointers: ; 50ebe (14:4ebe)
Route22Script_50ece: ; 50ece (14:4ece)
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
Route22Script7: ; 50ed5 (14:4ed5)
ret
Route22Script_50ed6: ; 50ed6 (14:4ed6)
- ld a, [W_RIVALSTARTER]
+ ld a, [wRivalStarter]
ld b, a
.asm_50eda
ld a, [hli]
@@ -32,7 +32,7 @@ Route22Script_50ed6: ; 50ed6 (14:4ed6)
jr .asm_50eda
.asm_50ee1
ld a, [hl]
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
ret
Route22MoveRivalSprite: ; 50ee6 (14:4ee6)
@@ -89,7 +89,7 @@ Route22Script0: ; 50f00 (14:4f00)
and a
jr z, .asm_50f4e
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
.asm_50f4e
ld c, BANK(Music_MeetRival)
@@ -99,7 +99,7 @@ Route22Script0: ; 50f00 (14:4f00)
ld [H_SPRITEINDEX], a
call Route22MoveRivalSprite
ld a, $1
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
Route22Script1: ; 50f62 (14:4f62)
@@ -131,12 +131,12 @@ Route22Script1: ; 50f62 (14:4f62)
ld hl, Route22RivalDefeatedText1
ld de, Route22Text_511bc
call SaveEndBattleTextPointers
- ld a, SONY1 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY1
+ ld [wCurOpponent], a
ld hl, StarterMons_50faf
call Route22Script_50ed6
ld a, $2
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
StarterMons_50faf: ; 50faf (14:4faf)
@@ -146,7 +146,7 @@ StarterMons_50faf: ; 50faf (14:4faf)
db STARTER1,$06
Route22Script2: ; 50fb5 (14:4fb5)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, Route22Script_50ece
ld a, [wSpriteStateData1 + 9]
@@ -168,7 +168,7 @@ Route22Script2: ; 50fb5 (14:4fb5)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld a, [wcf0d]
@@ -180,7 +180,7 @@ Route22Script2: ; 50fb5 (14:4fb5)
call Route22Script_5100d
.asm_51002
ld a, $3
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
Route22Script_51008: ; 51008 (14:5008)
@@ -229,7 +229,7 @@ Route22Script3: ; 5102a (14:502a)
call PlayDefaultMusic
ResetEvents EVENT_1ST_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ld a, $0
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
Route22Script_5104e: ; 5104e (14:504e)
@@ -242,18 +242,18 @@ Route22Script_5104e: ; 5104e (14:504e)
and a
jr z, .skipYVisibilityTesta
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
.skipYVisibilityTesta
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateTempo
ld a, $2
ld [H_SPRITEINDEX], a
call Route22MoveRivalSprite
ld a, $4
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
Route22Script4: ; 51087 (14:5087)
@@ -287,12 +287,12 @@ Route22Script4: ; 51087 (14:5087)
ld hl, Route22RivalDefeatedText2
ld de, Route22Text_511d0
call SaveEndBattleTextPointers
- ld a, SONY2 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY2
+ ld [wCurOpponent], a
ld hl, StarterMons_510d9
call Route22Script_50ed6
ld a, $5
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
StarterMons_510d9: ; 510d9 (14:50d9)
@@ -301,7 +301,7 @@ StarterMons_510d9: ; 510d9 (14:50d9)
db STARTER1,$0c
Route22Script5: ; 510df (14:50df)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, Route22Script_50ece
ld a, $2
@@ -327,7 +327,7 @@ Route22Script5: ; 510df (14:50df)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStartAndTempo
ld a, [wcf0d]
@@ -339,7 +339,7 @@ Route22Script5: ; 510df (14:50df)
call Route22Script_51142
.asm_51137
ld a, $6
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
Route22Script_5113d: ; 5113d (14:513d)
@@ -374,7 +374,7 @@ Route22Script6: ; 51151 (14:5151)
call PlayDefaultMusic
ResetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE
ld a, $7
- ld [W_ROUTE22CURSCRIPT], a
+ ld [wRoute22CurScript], a
ret
Route22TextPointers: ; 51175 (14:5175)
diff --git a/scripts/route22gate.asm b/scripts/route22gate.asm
index 95546a99..53ae8378 100755
--- a/scripts/route22gate.asm
+++ b/scripts/route22gate.asm
@@ -1,9 +1,9 @@
Route22GateScript: ; 1e683 (7:6683)
call EnableAutoTextBoxDrawing
ld hl, Route22GateScriptPointers
- ld a, [W_ROUTE22GATECURSCRIPT]
+ ld a, [wRoute22GateCurScript]
call CallFunctionInTable
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $4
ld a, ROUTE_23
jr c, .asm_1e69a
@@ -49,7 +49,7 @@ Route22GateScript1: ; 1e6cd (7:66cd)
ld [wJoyIgnore], a
call Delay3
ld a, $0
- ld [W_ROUTE22GATECURSCRIPT], a
+ ld [wRoute22GateCurScript], a
Route22GateScript2: ; 1e6de (7:66de)
ret
@@ -58,7 +58,7 @@ Route22GateTextPointers: ; 1e6df (7:66df)
Route22GateText1: ; 1e6e1 (7:66e1)
TX_ASM
- ld a, [W_OBTAINEDBADGES]
+ ld a, [wObtainedBadges]
bit 0, a
jr nz, .asm_1e6f6
ld hl, Route22GateText_1e704
@@ -71,7 +71,7 @@ Route22GateText1: ; 1e6e1 (7:66e1)
call PrintText
ld a, $2
.asm_1e6fe
- ld [W_ROUTE22GATECURSCRIPT], a
+ ld [wRoute22GateCurScript], a
jp TextScriptEnd
Route22GateText_1e704: ; 1e704 (7:6704)
diff --git a/scripts/route23.asm b/scripts/route23.asm
index 35f1b9cb..ca72c9fe 100755
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -2,11 +2,11 @@ Route23Script: ; 511da (14:51da)
call Route23Script_511e9
call EnableAutoTextBoxDrawing
ld hl, Route23ScriptPointers
- ld a, [W_ROUTE23CURSCRIPT]
+ ld a, [wRoute23CurScript]
jp CallFunctionInTable
Route23Script_511e9: ; 511e9 (14:51e9)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
@@ -26,7 +26,7 @@ Route23ScriptPointers: ; 51213 (14:5213)
Route23Script0: ; 51219 (14:5219)
ld hl, YCoordsData_51255
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
ld e, $0
EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK
@@ -40,7 +40,7 @@ Route23Script0: ; 51219 (14:5219)
jr nz, .asm_51224
cp $23
jr nz, .asm_51237
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $e
ret nc
.asm_51237
@@ -128,7 +128,7 @@ Route23Script1: ; 512ec (14:52ec)
ret nz
Route23Script2: ; 512f1 (14:52f1)
ld a, $0
- ld [W_ROUTE23CURSCRIPT], a
+ ld [wRoute23CurScript], a
ret
Route23TextPointers: ; 512f7 (14:52f7)
@@ -190,7 +190,7 @@ Route23Script_51346: ; 51346 (14:5346)
inc a
ld c, a
ld b, FLAG_TEST
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
predef FlagActionPredef
ld a, c
and a
@@ -199,7 +199,7 @@ Route23Script_51346: ; 51346 (14:5346)
call PrintText
call Route23Script_512d8
ld a, $1
- ld [W_ROUTE23CURSCRIPT], a
+ ld [wRoute23CurScript], a
ret
.asm_5136e
ld hl, VictoryRoadGuardText2
@@ -210,7 +210,7 @@ Route23Script_51346: ; 51346 (14:5346)
EventFlagAddress hl, EVENT_PASSED_CASCADEBADGE_CHECK
predef FlagActionPredef
ld a, $2
- ld [W_ROUTE23CURSCRIPT], a
+ ld [wRoute23CurScript], a
ret
Route23Script_51388: ; 51388 (14:5388)
diff --git a/scripts/route24.asm b/scripts/route24.asm
index 6eba1d35..02b439e1 100755
--- a/scripts/route24.asm
+++ b/scripts/route24.asm
@@ -2,16 +2,16 @@ Route24Script: ; 513ad (14:53ad)
call EnableAutoTextBoxDrawing
ld hl, Route24TrainerHeaders
ld de, Route24ScriptPointers
- ld a, [W_ROUTE24CURSCRIPT]
+ ld a, [wRoute24CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE24CURSCRIPT], a
+ ld [wRoute24CurScript], a
ret
Route24Script_513c0: ; 513c0 (14:53c0)
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE24CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute24CurScript], a
+ ld [wCurMapScript], a
ret
Route24ScriptPointers: ; 513cb (14:53cb)
@@ -40,8 +40,8 @@ Route24Script0: ; 513d5 (14:53d5)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $4
- ld [W_ROUTE24CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute24CurScript], a
+ ld [wCurMapScript], a
ret
CoordsData_5140e: ; 5140e (14:540e)
@@ -53,12 +53,12 @@ Route24Script4: ; 51411 (14:5411)
ret nz
call Delay3
ld a, $0
- ld [W_ROUTE24CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute24CurScript], a
+ ld [wCurMapScript], a
ret
Route24Script3: ; 51422 (14:5422)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, Route24Script_513c0
call UpdateSprites
@@ -71,8 +71,8 @@ Route24Script3: ; 51422 (14:5422)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_ROUTE24CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute24CurScript], a
+ ld [wCurMapScript], a
ret
Route24TextPointers: ; 5144b (14:544b)
@@ -170,8 +170,8 @@ Route24Text1: ; 514a4 (14:54a4)
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_ROUTE24CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute24CurScript], a
+ ld [wCurMapScript], a
jp TextScriptEnd
.asm_514f9
ld hl, Route24Text_51530
diff --git a/scripts/route25.asm b/scripts/route25.asm
index 49580ba6..15b52b81 100755
--- a/scripts/route25.asm
+++ b/scripts/route25.asm
@@ -3,13 +3,13 @@ Route25Script: ; 515cb (14:55cb)
call EnableAutoTextBoxDrawing
ld hl, Route25TrainerHeaders
ld de, Route25ScriptPointers
- ld a, [W_ROUTE25CURSCRIPT]
+ ld a, [wRoute25CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE25CURSCRIPT], a
+ ld [wRoute25CurScript], a
ret
Route25Script_515e1: ; 515e1 (14:55e1)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
ret z
diff --git a/scripts/route2gate.asm b/scripts/route2gate.asm
index 789482dc..133d0e7c 100755
--- a/scripts/route2gate.asm
+++ b/scripts/route2gate.asm
@@ -10,17 +10,17 @@ Route2GateText1: ; 5d5db (17:55db)
CheckEvent EVENT_GOT_HM05
jr nz, .asm_5d60d
ld a, 10 ; pokemon needed
- ld [$ffdb], a
+ ld [hOaksAideRequirement], a
ld a, HM_05 ; oak's aide reward
- ld [$ffdc], a
+ ld [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
ld hl, wcd6d
- ld de, wcc5b
- ld bc, $000d
+ ld de, wOaksAideRewardItemName
+ ld bc, ITEM_NAME_LENGTH
call CopyData
- predef OaksAideScript ; call oak's aide script
- ld a, [$ffdb]
+ predef OaksAideScript
+ ld a, [hOaksAideResult]
cp $1
jr nz, .asm_5d613
SetEvent EVENT_GOT_HM05
diff --git a/scripts/route3.asm b/scripts/route3.asm
index 50c4e00d..4640d767 100755
--- a/scripts/route3.asm
+++ b/scripts/route3.asm
@@ -2,9 +2,9 @@ Route3Script: ; 554f8 (15:54f8)
call EnableAutoTextBoxDrawing
ld hl, Route3TrainerHeader0
ld de, Route3ScriptPointers
- ld a, [W_ROUTE3CURSCRIPT]
+ ld a, [wRoute3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE3CURSCRIPT], a
+ ld [wRoute3CurScript], a
ret
Route3ScriptPointers: ; 5550b (15:550b)
diff --git a/scripts/route4.asm b/scripts/route4.asm
index f5bdd9e8..019d5582 100755
--- a/scripts/route4.asm
+++ b/scripts/route4.asm
@@ -2,9 +2,9 @@ Route4Script: ; 55658 (15:5658)
call EnableAutoTextBoxDrawing
ld hl, Route4TrainerHeaders
ld de, Route4ScriptPointers
- ld a, [W_ROUTE4CURSCRIPT]
+ ld a, [wRoute4CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE4CURSCRIPT], a
+ ld [wRoute4CurScript], a
ret
Route4ScriptPointers: ; 5566b (15:566b)
diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm
index 35f3a020..d1b85dff 100755
--- a/scripts/route5gate.asm
+++ b/scripts/route5gate.asm
@@ -1,6 +1,6 @@
Route5GateScript: ; 1df33 (7:5f33)
call EnableAutoTextBoxDrawing
- ld a, [W_ROUTE5GATECURSCRIPT]
+ ld a, [wRoute5GateCurScript]
ld hl, Route5GateScriptPointers
jp CallFunctionInTable
@@ -35,7 +35,7 @@ Route5GateScript0: ; 1df50 (7:5f50)
call DisplayTextID
call Route5GateScript_1df43
ld a, $1
- ld [W_ROUTE5GATECURSCRIPT], a
+ ld [wRoute5GateCurScript], a
ret
.asm_1df82
ld a, $3
@@ -57,7 +57,7 @@ Route5GateScript1: ; 1df94 (7:5f94)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE5GATECURSCRIPT], a
+ ld [wRoute5GateCurScript], a
ret
Route5GateTextPointers: ; 1dfa4 (7:5fa4)
@@ -81,7 +81,7 @@ Route5GateText1: ; 1dfaa (7:5faa)
call PrintText
call Route5GateScript_1df43
ld a, $1
- ld [W_ROUTE5GATECURSCRIPT], a
+ ld [wRoute5GateCurScript], a
jp TextScriptEnd
.asm_768a2
ld hl, Route5GateText3
diff --git a/scripts/route6.asm b/scripts/route6.asm
index e748fed1..cb2b5e65 100755
--- a/scripts/route6.asm
+++ b/scripts/route6.asm
@@ -2,9 +2,9 @@ Route6Script: ; 590b0 (16:50b0)
call EnableAutoTextBoxDrawing
ld hl, Route6TrainerHeaders
ld de, Route6ScriptPointers
- ld a, [W_ROUTE6CURSCRIPT]
+ ld a, [wRoute6CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE6CURSCRIPT], a
+ ld [wRoute6CurScript], a
ret
Route6ScriptPointers: ; 590c3 (16:50c3)
diff --git a/scripts/route6gate.asm b/scripts/route6gate.asm
index a4b6149c..4d3d94d3 100755
--- a/scripts/route6gate.asm
+++ b/scripts/route6gate.asm
@@ -1,7 +1,7 @@
Route6GateScript: ; 1e03d (7:603d)
call EnableAutoTextBoxDrawing
ld hl, Route6GateScriptPointers
- ld a, [W_ROUTE6GATECURSCRIPT]
+ ld a, [wRoute6GateCurScript]
call CallFunctionInTable
ret
@@ -29,7 +29,7 @@ Route6GateScript0: ; 1e04e (7:604e)
call DisplayTextID
call Route6GateScript_1e0a1
ld a, $1
- ld [W_ROUTE6GATECURSCRIPT], a
+ ld [wRoute6GateCurScript], a
ret
.asm_1e080
ld hl, wd728
@@ -49,7 +49,7 @@ Route6GateScript1: ; 1e091 (7:6091)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE6GATECURSCRIPT], a
+ ld [wRoute6GateCurScript], a
ret
Route6GateScript_1e0a1: ; 1e0a1 (7:60a1)
diff --git a/scripts/route7gate.asm b/scripts/route7gate.asm
index b55f813c..af10ccb5 100755
--- a/scripts/route7gate.asm
+++ b/scripts/route7gate.asm
@@ -1,6 +1,6 @@
Route7GateScript: ; 1e100 (7:6100)
call EnableAutoTextBoxDrawing
- ld a, [W_ROUTE7GATECURSCRIPT]
+ ld a, [wRoute7GateCurScript]
ld hl, Route7GateScriptPointers
call CallFunctionInTable
ret
@@ -41,7 +41,7 @@ Route7GateScript0: ; 1e128 (7:6128)
call DisplayTextID
call Route7GateScript_1e111
ld a, $1
- ld [W_ROUTE7GATECURSCRIPT], a
+ ld [wRoute7GateCurScript], a
ret
.asm_1e15a
ld a, $3
@@ -63,8 +63,8 @@ Route7GateScript1: ; 1e16c (7:616c)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE7GATECURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wRoute7GateCurScript], a
+ ld [wCurMapScript], a
ret
Route7GateTextPointers: ; 1e17f (7:617f)
diff --git a/scripts/route8.asm b/scripts/route8.asm
index c734c62d..cfb4f433 100755
--- a/scripts/route8.asm
+++ b/scripts/route8.asm
@@ -2,9 +2,9 @@ Route8Script: ; 591b6 (16:51b6)
call EnableAutoTextBoxDrawing
ld hl, Route8TrainerHeaders
ld de, Route8ScriptPointers
- ld a, [W_ROUTE8CURSCRIPT]
+ ld a, [wRoute8CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE8CURSCRIPT], a
+ ld [wRoute8CurScript], a
ret
Route8ScriptPointers: ; 591c9 (16:51c9)
diff --git a/scripts/route8gate.asm b/scripts/route8gate.asm
index 96bfa875..141c5f4d 100755
--- a/scripts/route8gate.asm
+++ b/scripts/route8gate.asm
@@ -1,7 +1,7 @@
Route8GateScript: ; 1e1c7 (7:61c7)
call EnableAutoTextBoxDrawing
ld hl, Route8GateScriptPointers
- ld a, [W_ROUTE8GATECURSCRIPT]
+ ld a, [wRoute8GateCurScript]
jp CallFunctionInTable
Route8GateScriptPointers: ; 1e1d3 (7:61d3)
@@ -40,7 +40,7 @@ Route8GateScript0: ; 1e1ee (7:61ee)
call DisplayTextID
call Route8GateScript_1e1d7
ld a, $1
- ld [W_ROUTE8GATECURSCRIPT], a
+ ld [wRoute8GateCurScript], a
ret
.asm_1e220
ld hl, wd728
@@ -61,7 +61,7 @@ Route8GateScript1: ; 1e231 (7:6231)
call Delay3
xor a
ld [wJoyIgnore], a
- ld [W_ROUTE8GATECURSCRIPT], a
+ ld [wRoute8GateCurScript], a
ret
Route8GateTextPointers: ; 1e241 (7:6241)
diff --git a/scripts/route9.asm b/scripts/route9.asm
index 9d26ee96..6656cc8a 100755
--- a/scripts/route9.asm
+++ b/scripts/route9.asm
@@ -2,9 +2,9 @@ Route9Script: ; 556bc (15:56bc)
call EnableAutoTextBoxDrawing
ld hl, Route9TrainerHeaders
ld de, Route9ScriptPointers
- ld a, [W_ROUTE9CURSCRIPT]
+ ld a, [wRoute9CurScript]
call ExecuteCurMapScriptInTable
- ld [W_ROUTE9CURSCRIPT], a
+ ld [wRoute9CurScript], a
ret
Route9ScriptPointers: ; 556cf (15:56cf)
diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm
index 4a37f0e6..da9a068e 100644
--- a/scripts/safarizoneentrance-yellow.asm
+++ b/scripts/safarizoneentrance-yellow.asm
@@ -56,7 +56,7 @@
ld a,30
lb hl, (502 / $100), (502 % $100)
.xf1ff2
- ld [W_NUMSAFARIBALLS],a
+ ld [wNumSafariBalls],a
ld a,h
ld [wSafariSteps],a
ld a,l
@@ -67,7 +67,7 @@
SetEvent EVENT_IN_SAFARI_ZONE
ResetEventReuseHL EVENT_SAFARI_GAME_OVER
ld a,3
- ld [W_SAFARIZONEENTRANCECURSCRIPT],a
+ ld [wSafariZoneEntranceCurScript],a
jr .done
.PleaseComeAgain
@@ -78,7 +78,7 @@
ld c,1
call SafariZoneEntranceAutoWalk
ld a,4
- ld [W_SAFARIZONEENTRANCECURSCRIPT],a
+ ld [wSafariZoneEntranceCurScript],a
.done
ret
diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm
index e4e2e2a8..2f8ff34b 100755
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -1,7 +1,7 @@
SafariZoneEntranceScript: ; 751cd (1d:51cd)
call EnableAutoTextBoxDrawing
ld hl, SafariZoneEntranceScriptPointers
- ld a, [W_SAFARIZONEENTRANCECURSCRIPT]
+ ld a, [wSafariZoneEntranceCurScript]
jp CallFunctionInTable
SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
@@ -30,7 +30,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
cp $1
jr z, .asm_7520f
ld a, $2
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
ret
.asm_7520f
ld a, D_RIGHT
@@ -39,7 +39,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld a, $f0
ld [wJoyIgnore], a
ld a, $1
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
ret
.CoordsData_75221: ; 75221 (1d:5221)
@@ -68,7 +68,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
xor a
ld [wJoyIgnore], a
ld a, $5
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
ret
.SafariZoneEntranceScript5
@@ -84,12 +84,12 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [W_NUMSAFARIBALLS], a
+ ld [wNumSafariBalls], a
ld a, D_DOWN
ld c, $3
call SafariZoneEntranceAutoWalk
ld a, $4
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
jr .asm_75286
.asm_7527f
ld a, $5
@@ -104,7 +104,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
ret
.SafariZoneEntranceScript6
@@ -112,7 +112,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
ret nz
call Delay3
ld a, [wcf0d]
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
ret
SafariZoneEntranceAutoWalk:
@@ -181,7 +181,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
ld hl,.MakePaymentText
call PrintText
ld a,30
- ld [W_NUMSAFARIBALLS],a
+ ld [wNumSafariBalls],a
ld a,502 / $100
ld [wSafariSteps],a
ld a, 502 % $100
@@ -192,7 +192,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
SetEvent EVENT_IN_SAFARI_ZONE
ResetEventReuseHL EVENT_SAFARI_GAME_OVER
ld a,3
- ld [W_SAFARIZONEENTRANCECURSCRIPT],a
+ ld [wSafariZoneEntranceCurScript],a
jr .done
.PleaseComeAgain
@@ -203,7 +203,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
ld c,1
call SafariZoneEntranceAutoWalk
ld a,4
- ld [W_SAFARIZONEENTRANCECURSCRIPT],a
+ ld [wSafariZoneEntranceCurScript],a
.done
jp TextScriptEnd
@@ -251,7 +251,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
ld [wcf0d], a
.asm_753b3
ld a, $6
- ld [W_SAFARIZONEENTRANCECURSCRIPT], a
+ ld [wSafariZoneEntranceCurScript], a
jp TextScriptEnd
.SafariZoneEntranceText_753bb
diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm
index 140b1130..aae06103 100755
--- a/scripts/saffrongym.asm
+++ b/scripts/saffrongym.asm
@@ -1,14 +1,14 @@
SaffronGymScript: ; 5d00d (17:500d)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, .extra
call EnableAutoTextBoxDrawing
ld hl, SaffronGymTrainerHeader0
ld de, SaffronGymScriptPointers
- ld a, [W_SAFFRONGYMCURSCRIPT]
+ ld a, [wSaffronGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_SAFFRONGYMCURSCRIPT], a
+ ld [wSaffronGymCurScript], a
ret
.extra
@@ -25,8 +25,8 @@ Gym6LeaderName: ; 5d040 (17:5040)
SaffronGymText_5d048: ; 5d048 (17:5048)
xor a
ld [wJoyIgnore], a
- ld [W_SAFFRONGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wSaffronGymCurScript], a
+ ld [wCurMapScript], a
ret
SaffronGymScriptPointers: ; 5d053 (17:5053)
@@ -36,7 +36,7 @@ SaffronGymScriptPointers: ; 5d053 (17:5053)
dw SaffronGymScript3
SaffronGymScript3: ; 5d05b (17:505b)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, SaffronGymText_5d048
ld a, $f0
@@ -60,7 +60,7 @@ SaffronGymText_5d068: ; 5d068 (17:5068)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5d091
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 5, [hl]
ld hl, wBeatGymFlags
set 5, [hl]
@@ -177,9 +177,9 @@ SaffronGymText1: ; 5d118 (17:5118)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $6
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
ld a, $3
- ld [W_SAFFRONGYMCURSCRIPT], a
+ ld [wSaffronGymCurScript], a
.asm_5d15f
jp TextScriptEnd
diff --git a/scripts/seafoamislands4.asm b/scripts/seafoamislands4.asm
index f7407e48..e3234b0a 100755
--- a/scripts/seafoamislands4.asm
+++ b/scripts/seafoamislands4.asm
@@ -41,7 +41,7 @@ SeafoamIslands4Script: ; 4658d (11:658d)
ret nz
.asm_465ed
ld hl, SeafoamIslands4ScriptPointers
- ld a, [W_SEAFOAMISLANDS4CURSCRIPT]
+ ld a, [wSeafoamIslands4CurScript]
jp CallFunctionInTable
Seafoam4HolesCoords: ; 465f6 (11:65f6)
@@ -58,10 +58,10 @@ SeafoamIslands4ScriptPointers: ; 465fb (11:65fb)
SeafoamIslands4Script0: ; 46603 (11:6603)
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $8
ret nz
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $f
ret nz
ld hl, wSimulatedJoypadStatesEnd
@@ -70,10 +70,10 @@ SeafoamIslands4Script0: ; 46603 (11:6603)
dec a
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
set 2, [hl]
ld a, $1
- ld [W_SEAFOAMISLANDS4CURSCRIPT], a
+ ld [wSeafoamIslands4CurScript], a
ret
RLEMovement46632: ; 46632 (11:6632)
@@ -87,13 +87,13 @@ SeafoamIslands4Script1: ; 46639 (11:6639)
and a
ret nz
ld a, $0
- ld [W_SEAFOAMISLANDS4CURSCRIPT], a
+ ld [wSeafoamIslands4CurScript], a
ret
SeafoamIslands4Script2: ; 46644 (11:6644)
CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE
ret z
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $12
jr z, .asm_4665e
cp $13
@@ -112,11 +112,11 @@ SeafoamIslands4Script2: ; 46644 (11:6644)
ld [wSpriteStateData2 + $06], a
ld hl, wd730
set 7, [hl]
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
set 2, [hl]
ld a, $3
.asm_4667b
- ld [W_SEAFOAMISLANDS4CURSCRIPT], a
+ ld [wSeafoamIslands4CurScript], a
ret
RLEData_4667f: ; 4667f (11:667f)
@@ -137,7 +137,7 @@ SeafoamIslands4Script3: ; 4668f (11:668f)
and a
ret nz
ld a, $0
- ld [W_SEAFOAMISLANDS4CURSCRIPT], a
+ ld [wSeafoamIslands4CurScript], a
ret
SeafoamIslands4TextPointers: ; 4669a (11:669a)
diff --git a/scripts/seafoamislands5.asm b/scripts/seafoamislands5.asm
index 87942ca0..98c27666 100755
--- a/scripts/seafoamislands5.asm
+++ b/scripts/seafoamislands5.asm
@@ -1,12 +1,12 @@
SeafoamIslands5Script: ; 46799 (11:6799)
call EnableAutoTextBoxDrawing
- ld a, [W_SEAFOAMISLANDS5CURSCRIPT]
+ ld a, [wSeafoamIslands5CurScript]
ld hl, SeafoamIslands5ScriptPointers
jp CallFunctionInTable
SeafoamIslands5Script_467a5: ; 467a5 (11:67a5)
xor a
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
ld [wJoyIgnore], a
ret
@@ -18,12 +18,12 @@ SeafoamIslands5ScriptPointers: ; 467ad (11:67ad)
dw SeafoamIslands5Script4
SeafoamIslands5Script4: ; 467b7 (11:67b7)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jr z, SeafoamIslands5Script_467a5
call EndTrainerBattle
ld a, $0
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
ret
SeafoamIslands5Script0: ; 467c7 (11:67c7)
@@ -46,10 +46,10 @@ SeafoamIslands5Script0: ; 467c7 (11:67c7)
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
- ld hl, W_FLAGS_D733
+ ld hl, wFlags_D733
res 2, [hl]
ld a, $1
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
ret
CoordsData_467fe: ; 467fe (11:67fe)
@@ -66,7 +66,7 @@ SeafoamIslands5Script1: ; 46807 (11:6807)
xor a
ld [wJoyIgnore], a
ld a, $0
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
ret
SeafoamIslands5Script2: ; 46816 (11:6816)
@@ -92,7 +92,7 @@ SeafoamIslands5Script2: ; 46816 (11:6816)
call StartSimulatingJoypadStates
ld a, $3
.asm_46849
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
ret
CoordsData_4684d: ; 4684d (11:684d)
@@ -121,7 +121,7 @@ SeafoamIslands5Script3: ; 46860 (11:6860)
and a
ret nz
ld a, $0
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
ret
SeaFoamIslands5Script_46872: ; 46872 (11:6872)
@@ -154,7 +154,7 @@ SeafoamIslands5Text3: ; 46893 (11:6893)
ld hl, SeafoamIslands5TrainerHeader0
call TalkToTrainer
ld a, $4
- ld [W_SEAFOAMISLANDS5CURSCRIPT], a
+ ld [wSeafoamIslands5CurScript], a
jp TextScriptEnd
SeafoamIslands5BattleText2: ; 468a2 (11:68a2)
diff --git a/scripts/silphco10.asm b/scripts/silphco10.asm
index a6f2f860..e254765d 100755
--- a/scripts/silphco10.asm
+++ b/scripts/silphco10.asm
@@ -3,13 +3,13 @@ SilphCo10Script: ; 5a139 (16:6139)
call EnableAutoTextBoxDrawing
ld hl, SilphCo10TrainerHeaders
ld de, SilphCo10ScriptPointers
- ld a, [W_SILPHCO10CURSCRIPT]
+ ld a, [wSilphCo10CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO10CURSCRIPT], a
+ ld [wSilphCo10CurScript], a
ret
SilphCo10Script_5a14f: ; 5a14f (16:614f)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm
index 4c83c20d..10a74853 100755
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -3,13 +3,13 @@ SilphCo11Script: ; 620fa (18:60fa)
call EnableAutoTextBoxDrawing
ld hl, SilphCo11TrainerHeaders
ld de, SilphCo11ScriptPointers
- ld a, [W_SILPHCO11CURSCRIPT]
+ ld a, [wSilphCo11CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO11CURSCRIPT], a
+ ld [wSilphCo11CurScript], a
ret
SilphCo11Script_62110: ; 62110 (18:6110)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -150,8 +150,8 @@ SilphCo11Script_621c4: ; 621c4 (18:61c4)
ld [wJoyIgnore], a
SilphCo11Script_621c8: ; 621c8 (18:61c8)
- ld [W_SILPHCO11CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wSilphCo11CurScript], a
+ ld [wCurMapScript], a
ret
SilphCo11ScriptPointers: ; 621cf (18:61cf)
@@ -205,7 +205,7 @@ SilphCo11Script_6221a: ; 6221a (18:621a)
jp SetSpriteFacingDirectionAndDelay
SilphCo11Script5: ; 62227 (18:6227)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, SilphCo11Script_621c4
ld a, [wcf0d]
diff --git a/scripts/silphco2.asm b/scripts/silphco2.asm
index ecb3b5a5..42a5f3c0 100755
--- a/scripts/silphco2.asm
+++ b/scripts/silphco2.asm
@@ -3,13 +3,13 @@ SilphCo2Script: ; 59cf1 (16:5cf1)
call EnableAutoTextBoxDrawing
ld hl, SilphCo2TrainerHeaders
ld de, SilphCo2ScriptPointers
- ld a, [W_SILPHCO2CURSCRIPT]
+ ld a, [wSilphCo2CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO2CURSCRIPT], a
+ ld [wSilphCo2CurScript], a
ret
SilphCo2Script_59d07: ; 59d07 (16:5d07)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm
index bdaac452..68ae7ed2 100755
--- a/scripts/silphco3.asm
+++ b/scripts/silphco3.asm
@@ -3,13 +3,13 @@ SilphCo3Script: ; 59f5b (16:5f5b)
call EnableAutoTextBoxDrawing
ld hl, SilphCo3TrainerHeaders
ld de, SilphCo3ScriptPointers
- ld a, [W_SILPHCO3CURSCRIPT]
+ ld a, [wSilphCo3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO3CURSCRIPT], a
+ ld [wSilphCo3CurScript], a
ret
SilphCo3Script_59f71: ; 59f71 (16:5f71)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm
index 0dad6f6b..12e04f69 100755
--- a/scripts/silphco4.asm
+++ b/scripts/silphco4.asm
@@ -3,13 +3,13 @@ SilphCo4Script: ; 19d0b (6:5d0b)
call EnableAutoTextBoxDrawing
ld hl, SilphCo4TrainerHeaders
ld de, SilphCo4ScriptPointers
- ld a, [W_SILPHCO4CURSCRIPT]
+ ld a, [wSilphCo4CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO4CURSCRIPT], a
+ ld [wSilphCo4CurScript], a
ret
SilphCo4Script_19d21: ; 19d21 (6:5d21)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm
index 7380f98f..d09848ba 100755
--- a/scripts/silphco5.asm
+++ b/scripts/silphco5.asm
@@ -3,13 +3,13 @@ SilphCo5Script: ; 19f37 (6:5f37)
call EnableAutoTextBoxDrawing
ld hl, SilphCo5TrainerHeaders
ld de, SilphCo5ScriptPointers
- ld a, [W_SILPHCO5CURSCRIPT]
+ ld a, [wSilphCo5CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO5CURSCRIPT], a
+ ld [wSilphCo5CurScript], a
ret
SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco6.asm b/scripts/silphco6.asm
index fa199069..406bc373 100755
--- a/scripts/silphco6.asm
+++ b/scripts/silphco6.asm
@@ -3,13 +3,13 @@ SilphCo6Script: ; 1a1a9 (6:61a9)
call EnableAutoTextBoxDrawing
ld hl, SilphCo6TrainerHeaders
ld de, SilphCo6ScriptPointers
- ld a, [W_SILPHCO6CURSCRIPT]
+ ld a, [wSilphCo6CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO6CURSCRIPT], a
+ ld [wSilphCo6CurScript], a
ret
SilphCo6Script_1a1bf: ; 1a1bf (6:61bf)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco7.asm b/scripts/silphco7.asm
index 525405c7..e5d610fb 100755
--- a/scripts/silphco7.asm
+++ b/scripts/silphco7.asm
@@ -3,13 +3,13 @@ SilphCo7Script: ; 51b61 (14:5b61)
call EnableAutoTextBoxDrawing
ld hl, SilphCo7TrainerHeaders
ld de, SilphCo7ScriptPointers
- ld a, [W_SILPHCO7CURSCRIPT]
+ ld a, [wSilphCo7CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO7CURSCRIPT], a
+ ld [wSilphCo7CurScript], a
ret
SilphCo7Script_51b77: ; 51b77 (14:5b77)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -106,8 +106,8 @@ SilphCo7Text_51c0c: ; 51c0c (14:5c0c)
ld [wJoyIgnore], a
SilphCo7Text_51c10: ; 51c10 (14:5c10)
- ld [W_SILPHCO7CURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wSilphCo7CurScript], a
+ ld [wCurMapScript], a
ret
SilphCo7ScriptPointers: ; 51c17 (14:5c17)
@@ -131,7 +131,7 @@ SilphCo7Script0: ; 51c23 (14:5c23)
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
@@ -183,9 +183,9 @@ SilphCo7Script3: ; 51c82 (14:5c82)
ld hl, SilphCo7Text14
ld de, SilphCo7Text_51ecd
call SaveEndBattleTextPointers
- ld a, SONY2 + $c8
- ld [W_CUROPPONENT], a
- ld a, [W_RIVALSTARTER]
+ ld a, OPP_SONY2
+ ld [wCurOpponent], a
+ ld a, [wRivalStarter]
cp STARTER2
jr nz, .asm_51cb6
ld a, $7
@@ -198,12 +198,12 @@ SilphCo7Script3: ; 51c82 (14:5c82)
.asm_51cbe
ld a, $9
.asm_51cc0
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
ld a, $4
jp SilphCo7Text_51c10
SilphCo7Script4: ; 51cc8 (14:5cc8)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, SilphCo7Text_51c0c
ld a, $f0
@@ -220,7 +220,7 @@ SilphCo7Script4: ; 51cc8 (14:5cc8)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld de, MovementData_51d1d
diff --git a/scripts/silphco8.asm b/scripts/silphco8.asm
index 9ea985a8..86f02b60 100755
--- a/scripts/silphco8.asm
+++ b/scripts/silphco8.asm
@@ -3,13 +3,13 @@ SilphCo8Script: ; 56504 (15:6504)
call EnableAutoTextBoxDrawing
ld hl, SilphCo8TrainerHeader0
ld de, SilphCo8ScriptPointers
- ld a, [W_SILPHCO8CURSCRIPT]
+ ld a, [wSilphCo8CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO8CURSCRIPT], a
+ ld [wSilphCo8CurScript], a
ret
SilphCo8Script_5651a: ; 5651a (15:651a)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphco9.asm b/scripts/silphco9.asm
index 02638459..589a086e 100755
--- a/scripts/silphco9.asm
+++ b/scripts/silphco9.asm
@@ -3,13 +3,13 @@ SilphCo9Script: ; 5d7bb (17:57bb)
call EnableAutoTextBoxDrawing
ld hl, SilphCo9TrainerHeaders
ld de, SilphCo9ScriptPointers
- ld a, [W_SILPHCO9CURSCRIPT]
+ ld a, [wSilphCo9CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SILPHCO9CURSCRIPT], a
+ ld [wSilphCo9CurScript], a
ret
SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
diff --git a/scripts/silphcoelevator.asm b/scripts/silphcoelevator.asm
index 36dbb6d2..386cd2e8 100755
--- a/scripts/silphcoelevator.asm
+++ b/scripts/silphcoelevator.asm
@@ -1,5 +1,5 @@
SilphCoElevatorScript: ; 457c0 (11:57c0)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
@@ -35,14 +35,24 @@ SilphCoElevatorScript_457f1: ; 457f1 (11:57f1)
ld hl, SilphCoElavatorFloors
call LoadItemList
ld hl, SilphCoElevatorWarpMaps
- ld de, wcc5b
- ld bc, $16
+ ld de, wElevatorWarpMaps
+ ld bc, SilphCoElevatorWarpMapsEnd - SilphCoElevatorWarpMaps
call CopyData
ret
SilphCoElavatorFloors: ; 45804 (11:45804)
db $0B ; num elements in list
- db $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F, $60 ; "1F", "2F", "3F", "4F", ... , "11F"
+ db FLOOR_1F
+ db FLOOR_2F
+ db FLOOR_3F
+ db FLOOR_4F
+ db FLOOR_5F
+ db FLOOR_6F
+ db FLOOR_7F
+ db FLOOR_8F
+ db FLOOR_9F
+ db FLOOR_10F
+ db FLOOR_11F
db $FF ; terminator
SilphCoElevatorWarpMaps: ; 45811 (11:45811)
@@ -60,6 +70,7 @@ SilphCoElevatorWarpMaps: ; 45811 (11:45811)
db $02, SILPH_CO_9F
db $02, SILPH_CO_10F
db $01, SILPH_CO_11F
+SilphCoElevatorWarpMapsEnd:
SilphCoElevatorScript_45827: ; 45827 (11:5827)
call Delay3
diff --git a/scripts/ssanne10.asm b/scripts/ssanne10.asm
index 3b53b961..d39b902f 100755
--- a/scripts/ssanne10.asm
+++ b/scripts/ssanne10.asm
@@ -2,9 +2,9 @@ SSAnne10Script: ; 61d55 (18:5d55)
call EnableAutoTextBoxDrawing
ld hl, SSAnne10TrainerHeaders
ld de, SSAnne10ScriptPointers
- ld a, [W_SSANNE10CURSCRIPT]
+ ld a, [wSSAnne10CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SSANNE10CURSCRIPT], a
+ ld [wSSAnne10CurScript], a
ret
SSAnne10ScriptPointers: ; 61d68 (18:5d68)
diff --git a/scripts/ssanne2.asm b/scripts/ssanne2.asm
index b95c5723..fb3d0536 100755
--- a/scripts/ssanne2.asm
+++ b/scripts/ssanne2.asm
@@ -1,13 +1,13 @@
SSAnne2Script: ; 6139f (18:539f)
call EnableAutoTextBoxDrawing
ld hl, SSAnne2ScriptPointers
- ld a, [W_SSANNE2CURSCRIPT]
+ ld a, [wSSAnne2CurScript]
jp CallFunctionInTable
SSAnne2Script_613ab: ; 613ab (18:53ab)
xor a
ld [wJoyIgnore], a
- ld [W_SSANNE2CURSCRIPT], a
+ ld [wSSAnne2CurScript], a
ret
SSAnne2ScriptPointers: ; 613b3 (18:53b3)
@@ -25,7 +25,7 @@ SSAnne2Script0: ; 613be (18:53be)
call ArePlayerCoordsInArray
ret nc
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL
@@ -53,7 +53,7 @@ SSAnne2Script0: ; 613be (18:53be)
.asm_61403
call MoveSprite
ld a, $1
- ld [W_SSANNE2CURSCRIPT], a
+ ld [wSSAnne2CurScript], a
ret
MovementData_6140c: ; 6140c (18:540c)
@@ -71,7 +71,7 @@ CoordsData_61411: ; 61411 (18:5411)
db $FF
SSAnne2Script_61416: ; 61416 (18:5416)
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $25
jr nz, .asm_61426
ld a, PLAYER_DIR_LEFT
@@ -97,11 +97,11 @@ SSAnne2Script1: ; 61430 (18:5430)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
call Delay3
- ld a, SONY2 + $c8
- ld [W_CUROPPONENT], a
+ ld a, OPP_SONY2
+ ld [wCurOpponent], a
; select which team to use during the encounter
- ld a, [W_RIVALSTARTER]
+ ld a, [wRivalStarter]
cp STARTER2
jr nz, .NotSquirtle
ld a, $1
@@ -114,15 +114,15 @@ SSAnne2Script1: ; 61430 (18:5430)
.Charmander
ld a, $3
.done
- ld [W_TRAINERNO], a
+ ld [wTrainerNo], a
call SSAnne2Script_61416
ld a, $2
- ld [W_SSANNE2CURSCRIPT], a
+ ld [wSSAnne2CurScript], a
ret
SSAnne2Script2: ; 6146d (18:546d)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, SSAnne2Script_613ab
call SSAnne2Script_61416
@@ -134,7 +134,7 @@ SSAnne2Script2: ; 6146d (18:546d)
ld a, $2
ld [H_SPRITEINDEX], a
call SetSpriteMovementBytesToFF
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $25
jr nz, .asm_61497
ld de, MovementData_614b9
@@ -146,11 +146,11 @@ SSAnne2Script2: ; 6146d (18:546d)
ld [H_SPRITEINDEX], a
call MoveSprite
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
ld a, $3
- ld [W_SSANNE2CURSCRIPT], a
+ ld [wSSAnne2CurScript], a
ret
MovementData_614b7: ; 614b7 (18:54b7)
@@ -175,7 +175,7 @@ SSAnne2Script3: ; 614be (18:54be)
predef HideObject
call PlayDefaultMusic
ld a, $4
- ld [W_SSANNE2CURSCRIPT], a
+ ld [wSSAnne2CurScript], a
ret
SSAnne2TextPointers: ; 614db (18:54db)
diff --git a/scripts/ssanne5.asm b/scripts/ssanne5.asm
index 76553563..698e9f14 100755
--- a/scripts/ssanne5.asm
+++ b/scripts/ssanne5.asm
@@ -2,9 +2,9 @@ SSAnne5Script: ; 616ae (18:56ae)
call EnableAutoTextBoxDrawing
ld hl, SSAnne5TrainerHeader0
ld de, SSAnne5ScriptPointers
- ld a, [W_SSANNE5CURSCRIPT]
+ ld a, [wSSAnne5CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SSANNE5CURSCRIPT], a
+ ld [wSSAnne5CurScript], a
ret
SSAnne5ScriptPointers: ; 616c1 (18:56c1)
diff --git a/scripts/ssanne7.asm b/scripts/ssanne7.asm
index b99f5bb2..911dac7f 100755
--- a/scripts/ssanne7.asm
+++ b/scripts/ssanne7.asm
@@ -44,21 +44,21 @@ SSAnne7Text1: ; 618ad (18:58ad)
SSAnne7RubText: ; 618ec (18:58ec)
TX_FAR _SSAnne7RubText
TX_ASM
- ld a, [wc0ef]
+ ld a, [wAudioROMBank]
cp BANK(Audio3_UpdateMusic)
- ld [wc0f0], a
+ ld [wAudioSavedROMBank], a
jr nz, .asm_61908
ld a, $ff
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld a, Bank(Music_PkmnHealed)
- ld [wc0ef], a
+ ld [wAudioROMBank], a
.asm_61908
ld a, MUSIC_PKMN_HEALED
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
.asm_61910
- ld a, [wc026]
+ ld a, [wChannelSoundIDs]
cp MUSIC_PKMN_HEALED
jr z, .asm_61910
call PlayDefaultMusic
diff --git a/scripts/ssanne8.asm b/scripts/ssanne8.asm
index 195c9a81..2e7dcf67 100755
--- a/scripts/ssanne8.asm
+++ b/scripts/ssanne8.asm
@@ -2,9 +2,9 @@ SSAnne8Script: ; 61976 (18:5976)
call EnableAutoTextBoxDrawing
ld hl, SSAnne8TrainerHeaders
ld de, SSAnne8ScriptPointers
- ld a, [W_SSANNE8CURSCRIPT]
+ ld a, [wSSAnne8CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SSANNE8CURSCRIPT], a
+ ld [wSSAnne8CurScript], a
ret
SSAnne8ScriptPointers: ; 61989 (18:5989)
diff --git a/scripts/ssanne9.asm b/scripts/ssanne9.asm
index 525a2964..bec4b838 100755
--- a/scripts/ssanne9.asm
+++ b/scripts/ssanne9.asm
@@ -5,9 +5,9 @@ SSAnne9Script: ; 61b4b (18:5b4b)
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, SSAnne9TrainerHeaders
ld de, SSAnne9ScriptPointers
- ld a, [W_SSANNE9CURSCRIPT]
+ ld a, [wSSAnne9CurScript]
call ExecuteCurMapScriptInTable
- ld [W_SSANNE9CURSCRIPT], a
+ ld [wSSAnne9CurScript], a
ret
SSAnne9ScriptPointers: ; 61b64 (18:5b64)
diff --git a/scripts/unknowndungeon3.asm b/scripts/unknowndungeon3.asm
index 42459766..c5818032 100755
--- a/scripts/unknowndungeon3.asm
+++ b/scripts/unknowndungeon3.asm
@@ -2,9 +2,9 @@ UnknownDungeon3Script: ; 45ef0 (11:5ef0)
call EnableAutoTextBoxDrawing
ld hl, UnknownDungeon3TrainerHeaders
ld de, UnknownDungeon3ScriptPointers
- ld a, [W_UNKNOWNDUNGEON3CURSCRIPT]
+ ld a, [wUnknownDungeon3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_UNKNOWNDUNGEON3CURSCRIPT], a
+ ld [wUnknownDungeon3CurScript], a
ret
UnknownDungeon3ScriptPointers: ; 45f03 (11:5f03)
diff --git a/scripts/vermilioncity.asm b/scripts/vermilioncity.asm
index de721a2f..d1516b6a 100755
--- a/scripts/vermilioncity.asm
+++ b/scripts/vermilioncity.asm
@@ -1,6 +1,6 @@
VermilionCityScript: ; 197a1 (6:57a1)
call EnableAutoTextBoxDrawing
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
push hl
@@ -10,7 +10,7 @@ VermilionCityScript: ; 197a1 (6:57a1)
res 5, [hl]
call nz, VermilionCityScript_197c0
ld hl, VermilionCityScriptPointers
- ld a, [W_VERMILIONCITYCURSCRIPT]
+ ld a, [wVermilionCityCurScript]
jp CallFunctionInTable
VermilionCityScript_197c0: ; 197c0 (6:57c0)
@@ -27,7 +27,7 @@ VermilionCityScript_197cb: ; 197cb (6:57cb)
SetEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
ret nz
ld a, $2
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
ret
VermilionCityScriptPointers: ; 197dc (6:57dc)
@@ -52,8 +52,8 @@ VermilionCityScript0: ; 197e6 (6:57e6)
call DisplayTextID
CheckEvent EVENT_SS_ANNE_LEFT
jr nz, .asm_19810
- ld b, S_S__TICKET
- predef IsItemInBag_
+ ld b, S_S_TICKET
+ predef GetQuantityOfItemInBag
ld a, b
and a
ret nz
@@ -64,7 +64,7 @@ VermilionCityScript0: ; 197e6 (6:57e6)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $1
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
ret
CoordsData_19823: ; 19823 (6:5823)
@@ -76,7 +76,7 @@ VermilionCityScript4: ; 19826 (6:5826)
call ArePlayerCoordsInArray
ret c
ld a, $0
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
ret
VermilionCityScript2: ; 19833 (6:5833)
@@ -89,7 +89,7 @@ VermilionCityScript2: ; 19833 (6:5833)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $3
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
ret
VermilionCityScript3: ; 1984e (6:584e)
@@ -100,7 +100,7 @@ VermilionCityScript3: ; 1984e (6:584e)
ld [wJoyIgnore], a
ld [hJoyHeld], a
ld a, $0
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
ret
VermilionCityScript1: ; 1985f (6:585f)
@@ -110,7 +110,7 @@ VermilionCityScript1: ; 1985f (6:585f)
ld c, 10
call DelayFrames
ld a, $0
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
ret
VermilionCityTextPointers: ; 1986f (6:586f)
@@ -170,8 +170,8 @@ VermilionCityText3: ; 198b1 (6:58b1)
.asm_198d0
ld hl, SSAnneWelcomeText9
call PrintText
- ld b, S_S__TICKET
- predef IsItemInBag_
+ ld b, S_S_TICKET
+ predef GetQuantityOfItemInBag
ld a, b
and a
jr nz, .asm_198e9
@@ -182,7 +182,7 @@ VermilionCityText3: ; 198b1 (6:58b1)
ld hl, SSAnneFlashedTicketText
call PrintText
ld a, $4
- ld [W_VERMILIONCITYCURSCRIPT], a
+ ld [wVermilionCityCurScript], a
jr .asm_198fc
.asm_198f6
ld hl, SSAnneNotHereText
diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm
index a65b3603..78ada7cf 100755
--- a/scripts/vermiliondock.asm
+++ b/scripts/vermiliondock.asm
@@ -40,7 +40,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
SetEventForceReuseHL EVENT_SS_ANNE_LEFT
ld a, $ff
ld [wJoyIgnore], a
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_Surfing)
ld a, MUSIC_SURFING
@@ -53,8 +53,8 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
ld b, $9c
call CopyScreenTileBufferToVRAM
coord hl, 0, 10
- ld bc, $0078
- ld a, $14
+ ld bc, SCREEN_WIDTH * 6
+ ld a, $14 ; water tile
call FillMemory
ld a, 1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -106,7 +106,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b)
xor a
ld [rWY], a
ld [hWY], a
- call VermilionDock_1dc94
+ call VermilionDock_EraseSSAnne
ld a, $90
ld [hWY], a
ld a, $1
@@ -178,21 +178,29 @@ VermilionDock_1dc7c: ; 1dc7c (7:5c7c)
jr z, .asm_1dc8e
ret
-VermilionDock_1dc94: ; 1dc94 (7:5c94)
- ld hl, wcc5b
- ld bc, $00b4
- ld a, $14
+VermilionDock_EraseSSAnne: ; 1dc94 (7:5c94)
+; Fill the area the S.S. Anne occupies in BG map 0 with water tiles.
+ ld hl, wVermilionDockTileMapBuffer
+ ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH
+ ld a, $14 ; water tile
call FillMemory
- ld hl, vBGMap0 + 10 * 32
- ld de, wcc5b
- ld bc, $000c
+ ld hl, vBGMap0 + 10 * BG_MAP_WIDTH
+ ld de, wVermilionDockTileMapBuffer
+ ld bc, (6 * BG_MAP_WIDTH) / 16
call CopyVideoData
- ld hl, wOverworldMap + 10 + 7 * VERMILION_DOCK_WIDTH ; 10, 7
- ld a, $d
+
+; Replace the blocks of the lower half of the ship with water blocks. This
+; leaves the upper half alone, but that doesn't matter because replacing any of
+; the blocks is unnecessary because the blocks the ship occupies are south of
+; the player and won't be redrawn when the player automatically walks north and
+; exits the map. This code could be removed without affecting anything.
+ overworldMapCoord hl, 5, 2, VERMILION_DOCK_WIDTH
+ ld a, $d ; water block
ld [hli], a
ld [hli], a
ld [hli], a
ld [hl], a
+
ld a, SFX_SS_ANNE_HORN
call PlaySound
ld c, 120
diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm
index 78a38aec..cd2b5b3c 100755
--- a/scripts/vermiliongym.asm
+++ b/scripts/vermiliongym.asm
@@ -1,5 +1,5 @@
VermilionGymScript: ; 5ca26 (17:4a26)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
push hl
@@ -11,9 +11,9 @@ VermilionGymScript: ; 5ca26 (17:4a26)
call EnableAutoTextBoxDrawing
ld hl, VermilionGymTrainerHeader0
ld de, VermilionGymScriptPointers
- ld a, [W_VERMILIONGYMCURSCRIPT]
+ ld a, [wVermilionGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_VERMILIONGYMCURSCRIPT], a
+ ld [wVermilionGymCurScript], a
ret
VermilionGymScript_5ca4c: ; 5ca4c (17:4a4c)
@@ -44,8 +44,8 @@ VermilionGymScript_5ca6d: ; 5ca6d (17:4a6d)
VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a)
xor a
ld [wJoyIgnore], a
- ld [W_VERMILIONGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wVermilionGymCurScript], a
+ ld [wCurMapScript], a
ret
VermilionGymScriptPointers: ; 5ca95 (17:4a95)
@@ -55,7 +55,7 @@ VermilionGymScriptPointers: ; 5ca95 (17:4a95)
dw VermilionGymScript3
VermilionGymScript3: ; 5ca9d (17:4a9d)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, VermilionGymScript_5ca8a
ld a, $f0
@@ -79,7 +79,7 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_5cad3
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 2, [hl]
ld hl, wBeatGymFlags
set 2, [hl]
@@ -156,12 +156,12 @@ VermilionGymText1: ; 5cb1d (17:4b1d)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $3
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
xor a
ld [hJoyHeld], a
ld a, $3
- ld [W_VERMILIONGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wVermilionGymCurScript], a
+ ld [wCurMapScript], a
.asm_5cb6a
jp TextScriptEnd
diff --git a/scripts/victoryroad1.asm b/scripts/victoryroad1.asm
index 11f5d5db..af0c3c3e 100755
--- a/scripts/victoryroad1.asm
+++ b/scripts/victoryroad1.asm
@@ -1,14 +1,14 @@
VictoryRoad1Script: ; 5da0a (17:5a0a)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
call nz, .next
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad1TrainerHeaders
ld de, VictoryRoad1ScriptPointers
- ld a, [W_VICTORYROAD1CURSCRIPT]
+ ld a, [wVictoryRoad1CurScript]
call ExecuteCurMapScriptInTable
- ld [W_VICTORYROAD1CURSCRIPT], a
+ ld [wVictoryRoad1CurScript], a
ret
.next
CheckEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
@@ -29,7 +29,7 @@ VictoryRoad1Script0: ; 5da40 (17:5a40)
ld hl, CoordsData_5da5c
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
ret
diff --git a/scripts/victoryroad2.asm b/scripts/victoryroad2.asm
index cb956b1c..c1fc6dc7 100755
--- a/scripts/victoryroad2.asm
+++ b/scripts/victoryroad2.asm
@@ -1,18 +1,18 @@
VictoryRoad2Script: ; 5179d (14:579d)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
call nz, VictoryRoad2Script_517c4
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
call nz, VictoryRoad2Script_517c9
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad2TrainerHeaders
ld de, VictoryRoad2ScriptPointers
- ld a, [W_VICTORYROAD2CURSCRIPT]
+ ld a, [wVictoryRoad2CurScript]
call ExecuteCurMapScriptInTable
- ld [W_VICTORYROAD2CURSCRIPT], a
+ ld [wVictoryRoad2CurScript], a
ret
VictoryRoad2Script_517c4: ; 517c4 (14:57c4)
@@ -59,7 +59,7 @@ VictoryRoad2Script0: ; 517f1 (14:57f1)
SetEventReuseHL EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2
ret nz
.asm_51810
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
ret
diff --git a/scripts/victoryroad3.asm b/scripts/victoryroad3.asm
index 22e6813a..4cdf3fb0 100755
--- a/scripts/victoryroad3.asm
+++ b/scripts/victoryroad3.asm
@@ -3,13 +3,13 @@ VictoryRoad3Script: ; 44980 (11:4980)
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad3TrainerHeaders
ld de, VictoryRoad3ScriptPointers
- ld a, [W_VICTORYROAD3CURSCRIPT]
+ ld a, [wVictoryRoad3CurScript]
call ExecuteCurMapScriptInTable
- ld [W_VICTORYROAD3CURSCRIPT], a
+ ld [wVictoryRoad3CurScript], a
ret
VictoryRoad3Script_44996: ; 44996 (11:4996)
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
@@ -36,7 +36,7 @@ VictoryRoad3Script0: ; 449b7 (11:49b7)
ld a, [wCoordIndex]
cp $1
jr nz, .asm_449dc
- ld hl, wd126
+ ld hl, wCurrentMapScriptFlags
set 5, [hl]
SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret
diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm
index 79ad444f..0bbaec0d 100755
--- a/scripts/viridiancity.asm
+++ b/scripts/viridiancity.asm
@@ -1,7 +1,7 @@
ViridianCityScript: ; 18ff1 (6:4ff1)
call EnableAutoTextBoxDrawing
ld hl, ViridianCityScriptPointers
- ld a, [W_VIRIDIANCITYCURSCRIPT]
+ ld a, [wViridianCityCurScript]
jp CallFunctionInTable
ViridianCityScriptPointers: ; 18ffd (6:4ffd)
@@ -17,16 +17,16 @@ ViridianCityScript0: ; 19005 (6:5005)
ViridianCityScript_1900b: ; 1900b (6:500b)
CheckEvent EVENT_VIRIDIAN_GYM_OPEN
ret nz
- ld a, [W_OBTAINEDBADGES]
+ ld a, [wObtainedBadges]
cp %01111111
jr nz, .asm_1901e
SetEvent EVENT_VIRIDIAN_GYM_OPEN
ret
.asm_1901e
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $8
ret nz
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $20
ret nz
ld a, $e
@@ -36,16 +36,16 @@ ViridianCityScript_1900b: ; 1900b (6:500b)
ld [hJoyHeld], a
call ViridianCityScript_190cf
ld a, $3
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
ret
ViridianCityScript_1903d: ; 1903d (6:503d)
CheckEvent EVENT_GOT_POKEDEX
ret nz
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
cp $9
ret nz
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
cp $13
ret nz
ld a, $5
@@ -55,7 +55,7 @@ ViridianCityScript_1903d: ; 1903d (6:503d)
ld [hJoyHeld], a
call ViridianCityScript_190cf
ld a, $3
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
ret
ViridianCityScript1: ; 19062 (6:5062)
@@ -71,14 +71,14 @@ ViridianCityScript1: ; 19062 (6:5062)
ld [wListScrollOffset], a
; set up battle for Old Man
- ld a, $1
- ld [W_BATTLETYPE], a
+ ld a, BATTLE_TYPE_OLD_MAN
+ ld [wBattleType], a
ld a, 5
- ld [W_CURENEMYLVL], a
+ ld [wCurEnemyLVL], a
ld a, WEEDLE
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
ld a, $2
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
ret
ViridianCityScript2: ; 1908f (6:508f)
@@ -98,10 +98,10 @@ ViridianCityScript2: ; 1908f (6:508f)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
- ld [W_BATTLETYPE], a
+ ld [wBattleType], a
ld [wJoyIgnore], a
ld a, $0
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
ret
ViridianCityScript3: ; 190c1 (6:50c1)
@@ -110,7 +110,7 @@ ViridianCityScript3: ; 190c1 (6:50c1)
ret nz
call Delay3
ld a, 0
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
ret
ViridianCityScript_190cf: ; 190cf (6:50cf)
@@ -147,7 +147,7 @@ ViridianCityText1: ; 19102 (6:5102)
ViridianCityText2: ; 19107 (6:5107)
TX_ASM
- ld a, [W_OBTAINEDBADGES]
+ ld a, [wObtainedBadges]
cp %01111111
ld hl, ViridianCityText_19127
jr z, .asm_ae9fe
@@ -222,7 +222,7 @@ ViridianCityText5: ; 1917f (6:517f)
call PrintText
call ViridianCityScript_190cf
ld a, $3
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
jp TextScriptEnd
ViridianCityText_19191: ; 19191 (6:5191)
@@ -281,7 +281,7 @@ ViridianCityText7: ; 191df (6:51df)
ld hl, ViridianCityText_1920f
call PrintText
ld a, $1
- ld [W_VIRIDIANCITYCURSCRIPT], a
+ ld [wViridianCityCurScript], a
jr .asm_2413a
.asm_42f68
ld hl, ViridianCityText_19214
diff --git a/scripts/viridianforest.asm b/scripts/viridianforest.asm
index 892eeef2..3c164046 100755
--- a/scripts/viridianforest.asm
+++ b/scripts/viridianforest.asm
@@ -2,9 +2,9 @@ ViridianForestScript: ; 6110d (18:510d)
call EnableAutoTextBoxDrawing
ld hl, ViridianForestTrainerHeaders
ld de, ViridianForestScriptPointers
- ld a, [W_VIRIDIANFORESTCURSCRIPT]
+ ld a, [wViridianForestCurScript]
call ExecuteCurMapScriptInTable
- ld [W_VIRIDIANFORESTCURSCRIPT], a
+ ld [wViridianForestCurScript], a
ret
ViridianForestScriptPointers: ; 61120 (18:5120)
diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm
index 6cded55d..cdbe939b 100755
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -5,9 +5,9 @@ ViridianGymScript: ; 748a3 (1d:48a3)
call EnableAutoTextBoxDrawing
ld hl, ViridianGymTrainerHeaders
ld de, ViridianGymScriptPointers
- ld a, [W_VIRIDIANGYMCURSCRIPT]
+ ld a, [wViridianGymCurScript]
call ExecuteCurMapScriptInTable
- ld [W_VIRIDIANGYMCURSCRIPT], a
+ ld [wViridianGymCurScript], a
ret
Gym8CityName: ; 748bf (1d:48bf)
@@ -18,8 +18,8 @@ Gym8LeaderName: ; 748cd (1d:48cd)
ViridianGymScript_748d6: ; 748d6 (1d:48d6)
xor a
ld [wJoyIgnore], a
- ld [W_VIRIDIANGYMCURSCRIPT], a
- ld [W_CURMAPSCRIPT], a
+ ld [wViridianGymCurScript], a
+ ld [wCurMapScript], a
ret
ViridianGymScriptPointers: ; 748e1 (1d:48e1)
@@ -30,9 +30,9 @@ ViridianGymScriptPointers: ; 748e1 (1d:48e1)
dw ViridianGymScript4
ViridianGymScript0: ; 748eb (1d:48eb)
- ld a, [W_YCOORD]
+ ld a, [wYCoord]
ld b, a
- ld a, [W_XCOORD]
+ ld a, [wXCoord]
ld c, a
ld hl, ViridianGymArrowTilePlayerMovement
call DecodeArrowMovementRLE
@@ -46,7 +46,7 @@ ViridianGymScript0: ; 748eb (1d:48eb)
ld a, $ff
ld [wJoyIgnore], a
ld a, $4
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
ret
;format:
@@ -125,13 +125,13 @@ ViridianGymScript4: ; 7496b (1d:496b)
ld hl, wd736
res 7, [hl]
ld a, $0
- ld [W_CURMAPSCRIPT], a
+ ld [wCurMapScript], a
ret
.asm_74980
jpba LoadSpinnerArrowTiles
ViridianGymScript3: ; 74988 (1d:4988)
- ld a, [W_ISINBATTLE]
+ ld a, [wIsInBattle]
cp $ff
jp z, ViridianGymScript_748d6
ld a, $f0
@@ -154,7 +154,7 @@ ViridianGymScript3_74995: ; 74995 (1d:4995)
ld [hSpriteIndexOrTextID], a
call DisplayTextID
.asm_749be
- ld hl, W_OBTAINEDBADGES
+ ld hl, wObtainedBadges
set 7, [hl]
ld hl, wBeatGymFlags
set 7, [hl]
@@ -295,9 +295,9 @@ ViridianGymText1: ; 74a69 (1d:4a69)
call EngageMapTrainer
call InitBattleEnemyParameters
ld a, $8
- ld [W_GYMLEADERNO], a
+ ld [wGymLeaderNo], a
ld a, $3
- ld [W_VIRIDIANGYMCURSCRIPT], a
+ ld [wViridianGymCurScript], a
.asm_6dff7
jp TextScriptEnd
diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm
index 5cb6eaea..65d97519 100755
--- a/scripts/viridianmart.asm
+++ b/scripts/viridianmart.asm
@@ -2,7 +2,7 @@ ViridianMartScript: ; 1d46e (7:546e)
call ViridianMartScript_1d47d
call EnableAutoTextBoxDrawing
ld hl, ViridianMartScriptPointers
- ld a, [W_VIRIDIANMARKETCURSCRIPT]
+ ld a, [wViridianMarketCurScript]
jp CallFunctionInTable
ViridianMartScript_1d47d: ; 1d47d (7:547d)
@@ -14,9 +14,9 @@ ViridianMartScript_1d47d: ; 1d47d (7:547d)
ld hl, ViridianMartTextPointers + $a ; starts at ViridianMartText6
.asm_1d48c
ld a, l
- ld [W_MAPTEXTPTR], a
+ ld [wMapTextPtr], a
ld a, h
- ld [W_MAPTEXTPTR+1], a
+ ld [wMapTextPtr+1], a
ret
ViridianMartScriptPointers: ; 1d495 (7:5495)
@@ -36,7 +36,7 @@ ViridianMartScript0: ; 1d49b (7:549b)
ld [wSimulatedJoypadStatesIndex], a
call StartSimulatingJoypadStates
ld a, $1
- ld [W_VIRIDIANMARKETCURSCRIPT], a
+ ld [wViridianMarketCurScript], a
ret
RLEMovement1d4bb: ; 1d4bb (7:54bb)
@@ -56,7 +56,7 @@ ViridianMartScript1: ; 1d4c0 (7:54c0)
call GiveItem
SetEvent EVENT_GOT_OAKS_PARCEL
ld a, $2
- ld [W_VIRIDIANMARKETCURSCRIPT], a
+ ld [wViridianMarketCurScript], a
; fallthrough
ViridianMartScript2: ; 1d4df (7:54df)
ret
diff --git a/sram.asm b/sram.asm
index f0cf6fac..3e7b3e16 100644
--- a/sram.asm
+++ b/sram.asm
@@ -1,8 +1,8 @@
SECTION "Sprite Buffers", SRAM, BANK[0]
-S_SPRITEBUFFER0:: ds SPRITEBUFFERSIZE ; a000
-S_SPRITEBUFFER1:: ds SPRITEBUFFERSIZE ; a188
-S_SPRITEBUFFER2:: ds SPRITEBUFFERSIZE ; a310
+sSpriteBuffer0:: ds SPRITEBUFFERSIZE ; a000
+sSpriteBuffer1:: ds SPRITEBUFFERSIZE ; a188
+sSpriteBuffer2:: ds SPRITEBUFFERSIZE ; a310
ds $100
@@ -12,34 +12,34 @@ sHallOfFame:: ds HOF_TEAM * HOF_TEAM_CAPACITY ; a598
SECTION "Save Data", SRAM, BANK[1]
ds $598
-sPlayerName:: ds 11 ; a598
-sMainData:: ds W_NUMINBOX - wPokedexOwned ; a5a3
-sSpriteData:: ds $200 ; wOAMBuffer - wSpriteStateData1 ; ad2c
-sPartyData:: ds wPokedexOwned - wPartyCount ; af2c
-sCurBoxData:: ds wBoxMonNicksEnd - W_NUMINBOX ; b0c0
+sPlayerName:: ds NAME_LENGTH ; a598
+sMainData:: ds wMainDataEnd - wMainDataStart ; a5a3
+sSpriteData:: ds wSpriteDataEnd - wSpriteDataStart ; ad2c
+sPartyData:: ds wPartyDataEnd - wPartyDataStart ; af2c
+sCurBoxData:: ds wBoxDataEnd - wBoxDataStart ; b0c0
sTilesetType:: ds 1 ; b522
sMainDataCheckSum:: ds 1 ; b523
SECTION "Saved Boxes 1", SRAM, BANK[2]
-sBox1:: ds wBoxMonNicksEnd - W_NUMINBOX ; a000
-sBox2:: ds wBoxMonNicksEnd - W_NUMINBOX ; a462
-sBox3:: ds wBoxMonNicksEnd - W_NUMINBOX ; a8c4
-sBox4:: ds wBoxMonNicksEnd - W_NUMINBOX ; ad26
-sBox5:: ds wBoxMonNicksEnd - W_NUMINBOX ; b188
-sBox6:: ds wBoxMonNicksEnd - W_NUMINBOX ; b5ea
+sBox1:: ds wBoxDataEnd - wBoxDataStart ; a000
+sBox2:: ds wBoxDataEnd - wBoxDataStart ; a462
+sBox3:: ds wBoxDataEnd - wBoxDataStart ; a8c4
+sBox4:: ds wBoxDataEnd - wBoxDataStart ; ad26
+sBox5:: ds wBoxDataEnd - wBoxDataStart ; b188
+sBox6:: ds wBoxDataEnd - wBoxDataStart ; b5ea
sBank2AllBoxesChecksum:: ds 1 ; ba4c
sBank2IndividualBoxChecksums:: ds 6 ; ba4d
SECTION "Saved Boxes 2", SRAM, BANK[3]
-sBox7:: ds wBoxMonNicksEnd - W_NUMINBOX ; a000
-sBox8:: ds wBoxMonNicksEnd - W_NUMINBOX ; a462
-sBox9:: ds wBoxMonNicksEnd - W_NUMINBOX ; a8c4
-sBox10:: ds wBoxMonNicksEnd - W_NUMINBOX ; ad26
-sBox11:: ds wBoxMonNicksEnd - W_NUMINBOX ; b188
-sBox12:: ds wBoxMonNicksEnd - W_NUMINBOX ; b5ea
+sBox7:: ds wBoxDataEnd - wBoxDataStart ; a000
+sBox8:: ds wBoxDataEnd - wBoxDataStart ; a462
+sBox9:: ds wBoxDataEnd - wBoxDataStart ; a8c4
+sBox10:: ds wBoxDataEnd - wBoxDataStart ; ad26
+sBox11:: ds wBoxDataEnd - wBoxDataStart ; b188
+sBox12:: ds wBoxDataEnd - wBoxDataStart ; b5ea
sBank3AllBoxesChecksum:: ds 1 ; ba4c
sBank3IndividualBoxChecksums:: ds 6 ; ba4d
diff --git a/text.asm b/text.asm
index db3e57c5..6555c185 100644
--- a/text.asm
+++ b/text.asm
@@ -1,18 +1,18 @@
TEXT_1 EQU $20
-TEXT_2 EQU $21
-TEXT_3 EQU $22
-TEXT_4 EQU $23
-TEXT_5 EQU $24
-TEXT_6 EQU $25
-TEXT_7 EQU $26
-TEXT_8 EQU $27
-TEXT_9 EQU $28
-TEXT_10 EQU $29
-TEXT_11 EQU $2a
-
-POKEDEX_TEXT EQU $2b
-MOVE_NAMES EQU $2c
+TEXT_2 EQU TEXT_1 + 1
+TEXT_3 EQU TEXT_2 + 1
+TEXT_4 EQU TEXT_3 + 1
+TEXT_5 EQU TEXT_4 + 1
+TEXT_6 EQU TEXT_5 + 1
+TEXT_7 EQU TEXT_6 + 1
+TEXT_8 EQU TEXT_7 + 1
+TEXT_9 EQU TEXT_8 + 1
+TEXT_10 EQU TEXT_9 + 1
+TEXT_11 EQU TEXT_10 + 1
+
+POKEDEX_TEXT EQU TEXT_11 + 1
+MOVE_NAMES EQU POKEDEX_TEXT + 1
INCLUDE "macros.asm"
INCLUDE "hram.asm"
@@ -20,130 +20,130 @@ INCLUDE "hram.asm"
SECTION "Text 1", ROMX, BANK[TEXT_1]
-_CardKeySuccessText1:: ; 80000 (20:4000)
+_CardKeySuccessText1::
text "Bingo!@@"
-_CardKeySuccessText2:: ; 80009 (20:4009)
+_CardKeySuccessText2::
db $0
line "The CARD KEY"
cont "opened the door!"
done
-_CardKeyFailText:: ; 80029 (20:4029)
+_CardKeyFailText::
text "Darn! It needs a"
line "CARD KEY!"
done
-_TrainerNameText:: ; 80045 (20:4045)
+_TrainerNameText::
TX_RAM wcd6d
text ": @@"
-_NoNibbleText:: ; 8004d (20:404d)
+_NoNibbleText::
text "Not even a nibble!"
prompt
-_NothingHereText:: ; 80061 (20:4061)
+_NothingHereText::
text "Looks like there's"
line "nothing here."
prompt
-_ItsABiteText:: ; 80082 (20:4082)
+_ItsABiteText::
text "Oh!"
line "It's a bite!"
prompt
-_ExclamationText:: ; 80093 (20:4093)
+_ExclamationText::
text "!"
done
-_GroundRoseText:: ; 80096 (20:4096)
+_GroundRoseText::
text "Ground rose up"
line "somewhere!"
done
-_BoulderText:: ; 800b1 (20:40b1)
+_BoulderText::
text "This requires"
line "STRENGTH to move!"
done
-_MartSignText:: ; 800d2 (20:40d2)
+_MartSignText::
text "All your item"
line "needs fulfilled!"
cont "#MON MART"
done
-_PokeCenterSignText:: ; 800fc (20:40fc)
+_PokeCenterSignText::
text "Heal Your #MON!"
line "#MON CENTER"
done
-_FoundItemText:: ; 80119 (20:4119)
+_FoundItemText::
text $52, " found"
line "@"
TX_RAM wcf4b
text "!@@"
-_NoMoreRoomForItemText:: ; 8012a (20:412a)
+_NoMoreRoomForItemText::
text "No more room for"
line "items!"
done
-_OaksAideHiText:: ; 80143 (20:4143)
+_OaksAideHiText::
text "Hi! Remember me?"
line "I'm PROF.OAK's"
cont "AIDE!"
para "If you caught @"
- TX_NUM $ffdb, 1, 3
+ TX_NUM hOaksAideRequirement, 1, 3
db $0
line "kinds of #MON,"
cont "I'm supposed to"
cont "give you an"
cont "@"
- TX_RAM wcc5b
+ TX_RAM wOaksAideRewardItemName
text "!"
para "So, ", $52, "! Have"
line "you caught at"
cont "least @"
- TX_NUM $ffdb, 1, 3
+ TX_NUM hOaksAideRequirement, 1, 3
text " kinds of"
cont "#MON?"
done
-_OaksAideUhOhText:: ; 801e4 (20:41e4)
+_OaksAideUhOhText::
text "Let's see..."
line "Uh-oh! You have"
cont "caught only @"
- TX_NUM $ffdd, 1, 3
+ TX_NUM hOaksAideNumMonsOwned, 1, 3
db $0
cont "kinds of #MON!"
para "You need @"
- TX_NUM $ffdb, 1, 3
+ TX_NUM hOaksAideRequirement, 1, 3
text " kinds"
line "if you want the"
cont "@"
- TX_RAM wcc5b
+ TX_RAM wOaksAideRewardItemName
text "."
done
-_OaksAideComeBackText:: ; 80250 (20:4250)
+_OaksAideComeBackText::
text "Oh. I see."
para "When you get @"
- TX_NUM $ffdb, 1, 3
+ TX_NUM hOaksAideRequirement, 1, 3
db $0
line "kinds, come back"
cont "for @"
- TX_RAM wcc5b
+ TX_RAM wOaksAideRewardItemName
text "."
done
-_OaksAideHereYouGoText:: ; 8028c (20:428c)
+_OaksAideHereYouGoText::
text "Great! You have"
line "caught @"
- TX_NUM $ffdd, 1, 3
+ TX_NUM hOaksAideNumMonsOwned, 1, 3
text " kinds "
cont "of #MON!"
cont "Congratulations!"
@@ -151,28 +151,21 @@ _OaksAideHereYouGoText:: ; 8028c (20:428c)
para "Here you go!"
prompt
-_OaksAideGotItemText:: ; 802d9 (20:42d9)
+_OaksAideGotItemText::
text $52, " got the"
line "@"
- TX_RAM wcc5b
+ TX_RAM wOaksAideRewardItemName
text "!@@"
-_OaksAideNoRoomText:: ; 802ec (20:42ec)
+_OaksAideNoRoomText::
text "Oh! I see you"
line "don't have any"
cont "room for the"
cont "@"
- TX_RAM wcc5b
+ TX_RAM wOaksAideRewardItemName
text "."
done
-IF DEF(_YELLOW)
-_NurseChanseyText::
- text "CHANSEY: Chaaan"
- line "sey!"
- done
-ENDC
-
INCLUDE "text/maps/viridian_forest.asm"
INCLUDE "text/maps/mt_moon_1f.asm"
INCLUDE "text/maps/mt_moon_b1f.asm"
@@ -242,16 +235,16 @@ INCLUDE "text/maps/seafoam_islands_b2f.asm"
INCLUDE "text/maps/seafoam_islands_b3f.asm"
INCLUDE "text/maps/seafoam_islands_b4f.asm"
-_AIBattleWithdrawText:: ; 880be (22:40be)
- TX_RAM W_TRAINERNAME
+_AIBattleWithdrawText::
+ TX_RAM wTrainerName
text " with-"
line "drew @"
TX_RAM wEnemyMonNick
text "!"
prompt
-_AIBattleUseItemText:: ; 880d5 (22:40d5)
- TX_RAM W_TRAINERNAME
+_AIBattleUseItemText::
+ TX_RAM wTrainerName
db $0
line "used @"
TX_RAM wcd6d
@@ -261,119 +254,119 @@ _AIBattleUseItemText:: ; 880d5 (22:40d5)
text "!"
prompt
-_TradeWentToText:: ; 880ef (22:40ef)
+_TradeWentToText::
TX_RAM wcf4b
text " went"
line "to @"
- TX_RAM W_GRASSRATE
+ TX_RAM wGrassRate
text "."
done
-_TradeForText:: ; 88103 (22:4103)
+_TradeForText::
text "For ", $52, "'s"
line "@"
TX_RAM wcf4b
text ","
done
-_TradeSendsText:: ; 88112 (22:4112)
- TX_RAM W_GRASSRATE
+_TradeSendsText::
+ TX_RAM wGrassRate
text " sends"
line "@"
TX_RAM wcd6d
text "."
done
-_TradeWavesFarewellText:: ; 88124 (22:4124)
- TX_RAM W_GRASSRATE
+_TradeWavesFarewellText::
+ TX_RAM wGrassRate
text " waves"
line "farewell as"
done
-_TradeTransferredText:: ; 8813b (22:413b)
+_TradeTransferredText::
TX_RAM wcd6d
text " is"
line "transferred."
done
-_TradeTakeCareText:: ; 88150 (22:4150)
+_TradeTakeCareText::
text "Take good care of"
line "@"
TX_RAM wcd6d
text "."
done
-_TradeWillTradeText:: ; 8816a (22:416a)
- TX_RAM W_GRASSRATE
+_TradeWillTradeText::
+ TX_RAM wGrassRate
text " will"
line "trade @"
TX_RAM wcd6d
db $0
done
-_TradeforText:: ; 88180 (22:4180)
+_TradeforText::
text "for ", $52, "'s"
line "@"
TX_RAM wcf4b
text "."
done
-_PlaySlotMachineText:: ; 8818f (22:418f)
+_PlaySlotMachineText::
text "A slot machine!"
line "Want to play?"
done
-_OutOfCoinsSlotMachineText:: ; 881ae (22:41ae)
+_OutOfCoinsSlotMachineText::
text "Darn!"
line "Ran out of coins!"
done
-_BetHowManySlotMachineText:: ; 881c7 (22:41c7)
+_BetHowManySlotMachineText::
text "Bet how many"
line "coins?"
done
-_StartSlotMachineText:: ; 881dc (22:41dc)
+_StartSlotMachineText::
text "Start!"
done
-_NotEnoughCoinsSlotMachineText:: ; 881e4 (22:41e4)
+_NotEnoughCoinsSlotMachineText::
text "Not enough"
line "coins!"
prompt
-_OneMoreGoSlotMachineText:: ; 881f7 (22:41f7)
+_OneMoreGoSlotMachineText::
text "One more "
line "go?"
done
-_LinedUpText:: ; 88206 (22:4206)
+_LinedUpText::
text " lined up!"
line "Scored @"
TX_RAM wcf4b
text " coins!"
done
-_NotThisTimeText:: ; 88226 (22:4226)
+_NotThisTimeText::
text "Not this time!"
prompt
-_YeahText:: ; 88236 (22:4236)
+_YeahText::
text "Yeah!@@"
-_DexSeenOwnedText:: ; 8823e (22:423e)
+_DexSeenOwnedText::
text "#DEX Seen:@"
- TX_NUM wcc5b, 1, 3
+ TX_NUM wDexRatingNumMonsSeen, 1, 3
db $0
line " Owned:@"
- TX_NUM wcc5c, 1, 3
+ TX_NUM wDexRatingNumMonsOwned, 1, 3
db "@"
-_DexRatingText:: ; 88267 (22:4267)
+_DexRatingText::
text "#DEX Rating", $6d
done
-_GymStatueText1:: ; 88275 (22:4275)
+_GymStatueText1::
TX_RAM wGymCityName
db $0
line "#MON GYM"
@@ -385,7 +378,7 @@ _GymStatueText1:: ; 88275 (22:4275)
line $53
done
-_GymStatueText2:: ; 882a5 (22:42a5)
+_GymStatueText2::
TX_RAM wGymCityName
db $0
line "#MON GYM"
@@ -398,14 +391,14 @@ _GymStatueText2:: ; 882a5 (22:42a5)
cont $52
done
-_ViridianCityPokecenterGuyText:: ; 882d7 (22:42d7)
+_ViridianCityPokecenterGuyText::
text "#MON CENTERs"
line "heal your tired,"
cont "hurt or fainted"
cont "#MON!"
done
-_PewterCityPokecenterGuyText:: ; 8830c (22:430c)
+_PewterCityPokecenterGuyText::
text "Yawn!"
para "When JIGGLYPUFF"
@@ -416,7 +409,7 @@ _PewterCityPokecenterGuyText:: ; 8830c (22:430c)
line "Snore..."
done
-_CeruleanPokecenterGuyText:: ; 88353 (22:4353)
+_CeruleanPokecenterGuyText::
text "BILL has lots of"
line "#MON!"
@@ -424,7 +417,7 @@ _CeruleanPokecenterGuyText:: ; 88353 (22:4353)
line "ones too!"
done
-_LavenderPokecenterGuyText:: ; 88386 (22:4386)
+_LavenderPokecenterGuyText::
text "CUBONEs wear"
line "skulls, right?"
@@ -432,36 +425,36 @@ _LavenderPokecenterGuyText:: ; 88386 (22:4386)
line "lot for one!"
done
-_MtMoonPokecenterBenchGuyText:: ; 883c2 (22:43c2)
+_MtMoonPokecenterBenchGuyText::
text "If you have too"
line "many #MON, you"
cont "should store them"
cont "via PC!"
done
-_RockTunnelPokecenterGuyText:: ; 883fc (22:43fc)
+_RockTunnelPokecenterGuyText::
text "I heard that"
line "GHOSTs haunt"
cont "LAVENDER TOWN!"
done
-_UnusedBenchGuyText1:: ; 88426 (22:4426)
+_UnusedBenchGuyText1::
text "I wish I could"
line "catch #MON."
done
-_UnusedBenchGuyText2:: ; 88442 (22:4442)
+_UnusedBenchGuyText2::
text "I'm tired from"
line "all the fun..."
done
-_UnusedBenchGuyText3:: ; 88460 (22:4460)
+_UnusedBenchGuyText3::
text "SILPH's manager"
line "is hiding in the"
cont "SAFARI ZONE."
done
-_VermilionPokecenterGuyText:: ; 8848e (22:448e)
+_VermilionPokecenterGuyText::
text "It is true that a"
line "higher level"
cont "#MON will be"
@@ -477,13 +470,13 @@ _VermilionPokecenterGuyText:: ; 8848e (22:448e)
cont "strong #MON."
done
-_CeladonCityPokecenterGuyText:: ; 88531 (22:4531)
+_CeladonCityPokecenterGuyText::
text "If I had a BIKE,"
line "I would go to"
cont "CYCLING ROAD!"
done
-_FuchsiaCityPokecenterGuyText:: ; 8855f (22:455f)
+_FuchsiaCityPokecenterGuyText::
text "If you're studying "
line "#MON, visit"
cont "the SAFARI ZONE."
@@ -492,7 +485,7 @@ _FuchsiaCityPokecenterGuyText:: ; 8855f (22:455f)
line "of rare #MON."
done
-_CinnabarPokecenterGuyText:: ; 885af (22:45af)
+_CinnabarPokecenterGuyText::
text "#MON can still"
line "learn techniques"
cont "after canceling"
@@ -503,65 +496,65 @@ _CinnabarPokecenterGuyText:: ; 885af (22:45af)
cont "have been learned."
done
-_SaffronCityPokecenterGuyText1:: ; 88621 (22:4621)
+_SaffronCityPokecenterGuyText1::
text "It would be great"
line "if the ELITE FOUR"
cont "came and stomped"
cont "TEAM ROCKET!"
done
-_SaffronCityPokecenterGuyText2:: ; 88664 (22:4664)
+_SaffronCityPokecenterGuyText2::
text "TEAM ROCKET took"
line "off! We can go"
cont "out safely again!"
cont "That's great!"
done
-_CeladonCityHotelText:: ; 886a4 (22:46a4)
+_CeladonCityHotelText::
text "My sis brought me"
line "on this vacation!"
done
-_BookcaseText:: ; 886c9 (22:46c9)
+_BookcaseText::
text "Crammed full of"
line "#MON books!"
done
-_NewBicycleText:: ; 886e6 (22:46e6)
+_NewBicycleText::
text "A shiny new"
line "BICYCLE!"
done
-_PushStartText:: ; 886fc (22:46fc)
+_PushStartText::
text "Push START to"
line "open the MENU!"
done
-_SaveOptionText:: ; 8871a (22:471a)
+_SaveOptionText::
text "The SAVE option is"
line "on the MENU"
cont "screen."
done
-_StrengthsAndWeaknessesText:: ; 88742 (22:4742)
+_StrengthsAndWeaknessesText::
text "All #MON types"
line "have strong and"
cont "weak points"
cont "against others."
done
-_TimesUpText:: ; 8877e (22:477e)
+_TimesUpText::
text "PA: Ding-dong!"
para "Time's up!"
prompt
-_GameOverText:: ; 88798 (22:4798)
+_GameOverText::
text "PA: Your SAFARI"
line "GAME is over!"
done
-_CinnabarGymQuizIntroText:: ; 887b7 (22:47b7)
+_CinnabarGymQuizIntroText::
text "#MON Quiz!"
para "Get it right and"
@@ -580,58 +573,52 @@ _CinnabarGymQuizIntroText:: ; 887b7 (22:47b7)
line "Here we go!"
prompt
-IF DEF(_YELLOW)
- text "#MON Quiz!"
- line "Test your skill!"
- done
-ENDC
-
-_CinnabarQuizQuestionsText1:: ; 8886d (22:486d)
+_CinnabarQuizQuestionsText1::
text "CATERPIE evolves"
line "into BUTTERFREE?"
done
-_CinnabarQuizQuestionsText2:: ; 88890 (22:4890)
+_CinnabarQuizQuestionsText2::
text "There are 9"
line "certified #MON"
cont "LEAGUE BADGEs?"
done
-_CinnabarQuizQuestionsText3:: ; 888bb (22:48bb)
+_CinnabarQuizQuestionsText3::
text "POLIWAG evolves 3"
line "times?"
done
-_CinnabarQuizQuestionsText4:: ; 888d5 (22:48d5)
+_CinnabarQuizQuestionsText4::
text "Are thunder moves"
line "effective against"
cont "ground element-"
cont "type #MON?"
done
-_CinnabarQuizQuestionsText5:: ; 88915 (22:4915)
+_CinnabarQuizQuestionsText5::
text "#MON of the"
line "same kind and"
cont "level are not"
cont "identical?"
done
-_CinnabarQuizQuestionsText6:: ; 88949 (22:4949)
+_CinnabarQuizQuestionsText6::
text "TM28 contains"
line "TOMBSTONER?"
done
-_CinnabarGymQuizCorrectText:: ; 88964 (22:4964)
+_CinnabarGymQuizCorrectText::
text "You're absolutely"
line "correct!"
para "Go on through!@@"
-_CinnabarGymQuizIncorrectText:: ; 8898f (22:498f)
+_CinnabarGymQuizIncorrectText::
text "Sorry! Bad call!"
prompt
-_MagazinesText:: ; 889a1 (22:49a1)
+_MagazinesText::
text "#MON magazines!"
para "#MON notebooks!"
@@ -639,28 +626,28 @@ _MagazinesText:: ; 889a1 (22:49a1)
para "#MON graphs!"
done
-_BillsHouseMonitorText:: ; 889cf (22:49cf)
+_BillsHouseMonitorText::
text "TELEPORTER is"
line "displayed on the"
cont "PC monitor."
done
-_BillsHouseInitiatedText:: ; 889fb (22:49fb)
+_BillsHouseInitiatedText::
text $52, " initiated"
line "TELEPORTER's Cell"
cont "Separator!@@"
-_BillsHousePokemonListText1:: ; 88a25 (22:4a25)
+_BillsHousePokemonListText1::
text "BILL's favorite"
line "#MON list!"
prompt
-_BillsHousePokemonListText2:: ; 88a40 (22:4a40)
+_BillsHousePokemonListText2::
text "Which #MON do"
line "you want to see?"
done
-_OakLabEmailText:: ; 88a60 (22:4a60)
+_OakLabEmailText::
text "There's an e-mail"
line "message here!"
@@ -687,36 +674,36 @@ _OakLabEmailText:: ; 88a60 (22:4a60)
cont "..."
done
-_GameCornerCoinCaseText:: ; 88b5b (22:4b5b)
+_GameCornerCoinCaseText::
text "A COIN CASE is"
line "required!"
done
-_GameCornerNoCoinsText:: ; 88b75 (22:4b75)
+_GameCornerNoCoinsText::
text "You don't have"
line "any coins!"
done
-_GameCornerOutOfOrderText:: ; 88b8f (22:4b8f)
+_GameCornerOutOfOrderText::
text "OUT OF ORDER"
line "This is broken."
done
-_GameCornerOutToLunchText:: ; 88bad (22:4bad)
+_GameCornerOutToLunchText::
text "OUT TO LUNCH"
line "This is reserved."
done
-_GameCornerSomeonesKeysText:: ; 88bcd (22:4bcd)
+_GameCornerSomeonesKeysText::
text "Someone's keys!"
line "They'll be back."
done
-_JustAMomentText:: ; 88bed (22:4bed)
+_JustAMomentText::
text "Just a moment."
done
-TMNotebookText:: ; 88bfd (22:4bfd)
+TMNotebookText::
text "It's a pamphlet"
line "on TMs."
@@ -731,15 +718,15 @@ TMNotebookText:: ; 88bfd (22:4bfd)
para "SILPH CO.@@"
-_TurnPageText:: ; 88c6f (22:4c6f)
+_TurnPageText::
text "Turn the page?"
done
-_ViridianSchoolNotebookText5:: ; 88c7f (22:4c7f)
+_ViridianSchoolNotebookText5::
text "GIRL: Hey! Don't"
line "look at my notes!@@"
-_ViridianSchoolNotebookText1:: ; 88ca3 (22:4ca3)
+_ViridianSchoolNotebookText1::
text "Looked at the"
line "notebook!"
@@ -758,7 +745,7 @@ _ViridianSchoolNotebookText1:: ; 88ca3 (22:4ca3)
cont "#MON trainers."
prompt
-_ViridianSchoolNotebookText2:: ; 88d46 (22:4d46)
+_ViridianSchoolNotebookText2::
text "Second page..."
para "A healthy #MON"
@@ -771,7 +758,7 @@ _ViridianSchoolNotebookText2:: ; 88d46 (22:4d46)
cont "effective!"
prompt
-_ViridianSchoolNotebookText3:: ; 88dbd (22:4dbd)
+_ViridianSchoolNotebookText3::
text "Third page..."
para "#MON trainers"
@@ -784,7 +771,7 @@ _ViridianSchoolNotebookText3:: ; 88dbd (22:4dbd)
cont "at #MON GYMs."
prompt
-_ViridianSchoolNotebookText4:: ; 88e2c (22:4e2c)
+_ViridianSchoolNotebookText4::
text "Fourth page..."
para "The goal for"
@@ -800,33 +787,33 @@ _ViridianSchoolNotebookText4:: ; 88e2c (22:4e2c)
line "#MON LEAGUE!"
prompt
-_FightingDojoText_52a10:: ; 88ec1 (22:4ec1)
+_FightingDojoText_52a10::
text "Enemies on every"
line "side!"
done
-_FightingDojoText_52a1d:: ; 88ed9 (22:4ed9)
+_FightingDojoText_52a1d::
text "What goes around"
line "comes around!"
done
-_FightingDojoText:: ; 88ef9 (22:4ef9)
+_FightingDojoText::
text "FIGHTING DOJO"
done
-_IndigoPlateauHQText:: ; 88f08 (22:4f08)
+_IndigoPlateauHQText::
text "INDIGO PLATEAU"
line "#MON LEAGUE HQ"
done
-_RedBedroomSNESText:: ; 88f27 (22:4f27)
+_RedBedroomSNESText::
text $52, " is"
line "playing the SNES!"
cont "...Okay!"
cont "It's time to go!"
done
-_Route15UpstairsBinocularsText:: ; 88f58 (22:4f58)
+_Route15UpstairsBinocularsText::
text "Looked into the"
line "binoculars..."
@@ -835,41 +822,31 @@ _Route15UpstairsBinocularsText:: ; 88f58 (22:4f58)
cont "toward the sea."
done
-_AerodactylFossilText:: ; 88fa7 (22:4fa7)
+_AerodactylFossilText::
text "AERODACTYL Fossil"
line "A primitive and"
cont "rare #MON."
done
-_KabutopsFossilText:: ; 88fd5 (22:4fd5)
+_KabutopsFossilText::
text "KABUTOPS Fossil"
line "A primitive and"
cont "rare #MON."
done
-IF DEF(_YELLOW)
-_FanClubPicture1Text::
- text "My cute RAPIDASH."
- done
-
-_FanClubPicture2Text::
- text "My beloved FEAROW."
- done
-ENDC
-
-_LinkCableHelpText1:: ; 89001 (22:5001)
+_LinkCableHelpText1::
text "TRAINER TIPS"
para "Using a Game Link"
line "Cable"
prompt
-_LinkCableHelpText2:: ; 89027 (22:5027)
+_LinkCableHelpText2::
text "Which heading do"
line "you want to read?"
done
-_LinkCableInfoText1:: ; 8904b (22:504b)
+_LinkCableInfoText1::
text "When you have"
line "linked your GAME"
cont "BOY with another"
@@ -879,31 +856,31 @@ _LinkCableInfoText1:: ; 8904b (22:504b)
cont "#MON CENTER."
prompt
-_LinkCableInfoText2:: ; 890bd (22:50bd)
+_LinkCableInfoText2::
text "COLOSSEUM lets"
line "you play against"
cont "a friend."
prompt
-_LinkCableInfoText3:: ; 890e8 (22:50e8)
+_LinkCableInfoText3::
text "TRADE CENTER is"
line "used for trading"
cont "#MON."
prompt
-_ViridianSchoolBlackboardText1:: ; 89110 (22:5110)
+_ViridianSchoolBlackboardText1::
text "The blackboard"
line "describes #MON"
cont "STATUS changes"
cont "during battles."
prompt
-_ViridianSchoolBlackboardText2:: ; 8914e (22:514e)
+_ViridianSchoolBlackboardText2::
text "Which heading do"
line "you want to read?"
done
-_ViridianBlackboardSleepText:: ; 89172 (22:5172)
+_ViridianBlackboardSleepText::
text "A #MON can't"
line "attack if it's"
cont "asleep!"
@@ -916,7 +893,7 @@ _ViridianBlackboardSleepText:: ; 89172 (22:5172)
line "wake them up!"
prompt
-_ViridianBlackboardPoisonText:: ; 891de (22:51de)
+_ViridianBlackboardPoisonText::
text "When poisoned, a"
line "#MON's health"
cont "steadily drops."
@@ -928,7 +905,7 @@ _ViridianBlackboardPoisonText:: ; 891de (22:51de)
line "to cure poison!"
prompt
-_ViridianBlackbaordPrlzText:: ; 8924b (22:524b)
+_ViridianBlackboardPrlzText::
text "Paralysis could"
line "make #MON"
cont "moves misfire!"
@@ -940,7 +917,7 @@ _ViridianBlackbaordPrlzText:: ; 8924b (22:524b)
line "for treatment!"
prompt
-_ViridianBlackboardBurnText:: ; 892b5 (22:52b5)
+_ViridianBlackboardBurnText::
text "A burn reduces"
line "power and speed."
cont "It also causes"
@@ -953,7 +930,7 @@ _ViridianBlackboardBurnText:: ; 892b5 (22:52b5)
line "cure a burn!"
prompt
-_ViridianBlackboardFrozenText:: ; 8932f (22:532f)
+_ViridianBlackboardFrozenText::
text "If frozen, a"
line "#MON becomes"
cont "totally immobile!"
@@ -966,12 +943,12 @@ _ViridianBlackboardFrozenText:: ; 8932f (22:532f)
line "thaw out #MON!"
prompt
-_VermilionGymTrashText:: ; 893a7 (22:53a7)
+_VermilionGymTrashText::
text "Nope, there's"
line "only trash here."
done
-_VermilionGymTrashSuccesText1:: ; 893c6 (22:53c6)
+_VermilionGymTrashSuccessText1::
text "Hey! There's a"
line "switch under the"
cont "trash!"
@@ -980,168 +957,168 @@ _VermilionGymTrashSuccesText1:: ; 893c6 (22:53c6)
para "The 1st electric"
line "lock opened!@@"
-_VermilionGymTrashSuccesText2:: ; 89418 (22:5418)
+_VermilionGymTrashSuccessText2::
text "Hey! There's"
line "another switch"
cont "under the trash!"
cont "Turn it on!"
prompt
-_VermilionGymTrashSuccesText3:: ; 89451 (22:5451)
+_VermilionGymTrashSuccessText3::
text "The 2nd electric"
line "lock opened!"
para "The motorized door"
line "opened!@@"
-_VermilionGymTrashFailText:: ; 8948c (22:548c)
+_VermilionGymTrashFailText::
text "Nope! There's"
line "only trash here."
cont "Hey! The electric"
cont "locks were reset!@@"
-_FoundHiddenItemText:: ; 894d0 (22:54d0)
+_FoundHiddenItemText::
text $52, " found"
line "@"
TX_RAM wcd6d
text "!@@"
-_HiddenItemBagFullText:: ; 894e1 (22:54e1)
+_HiddenItemBagFullText::
text "But, ", $52, " has"
line "no more room for"
cont "other items!"
done
-_FoundHiddenCoinsText:: ; 8950b (22:550b)
+_FoundHiddenCoinsText::
text $52, " found"
line "@"
TX_BCD hCoins, $c2
text " coins!@@"
-_FoundHiddenCoins2Text:: ; 89523 (22:5523)
+_FoundHiddenCoins2Text::
text $52, " found"
line "@"
TX_BCD hCoins, $c2
text " coins!@@"
-_DroppedHiddenCoinsText:: ; 8953b (22:553b)
+_DroppedHiddenCoinsText::
db $0
para "Oops! Dropped"
line "some coins!"
done
-_IndigoPlateauStatuesText1:: ; 89557 (22:5557)
+_IndigoPlateauStatuesText1::
text "INDIGO PLATEAU"
prompt
-_IndigoPlateauStatuesText2:: ; 89567 (22:5567)
+_IndigoPlateauStatuesText2::
text "The ultimate goal"
line "of trainers!"
cont "#MON LEAGUE HQ"
done
-_IndigoPlateauStatuesText3:: ; 89596 (22:5596)
+_IndigoPlateauStatuesText3::
text "The highest"
line "#MON authority"
cont "#MON LEAGUE HQ"
done
-_PokemonBooksText:: ; 895c1 (22:55c1)
+_PokemonBooksText::
text "Crammed full of"
line "#MON books!"
done
-_DiglettSculptureText:: ; 895de (22:55de)
+_DiglettSculptureText::
text "It's a sculpture"
line "of DIGLETT."
done
-_ElevatorText:: ; 895fb (22:55fb)
+_ElevatorText::
text "This is an"
line "elevator."
done
-_TownMapText:: ; 89611 (22:5611)
+_TownMapText::
text "A TOWN MAP.@@"
-_PokemonStuffText:: ; 8961f (22:561f)
+_PokemonStuffText::
text "Wow! Tons of"
line "#MON stuff!"
done
-_OutOfSafariBallsText:: ; 89639 (22:5639)
+_OutOfSafariBallsText::
text "PA: Ding-dong!"
para "You are out of"
line "SAFARI BALLs!"
prompt
-_WildRanText:: ; 89666 (22:5666)
+_WildRanText::
text "Wild @"
TX_RAM wEnemyMonNick
db $0
line "ran!"
prompt
-_EnemyRanText:: ; 89677 (22:5677)
+_EnemyRanText::
text "Enemy @"
TX_RAM wEnemyMonNick
db $0
line "ran!"
prompt
-_HurtByPoisonText:: ; 89689 (22:5689)
+_HurtByPoisonText::
text $5a, "'s"
line "hurt by poison!"
prompt
-_HurtByBurnText:: ; 8969d (22:569d)
+_HurtByBurnText::
text $5a, "'s"
line "hurt by the burn!"
prompt
-_HurtByLeechSeedText:: ; 896b3 (22:56b3)
+_HurtByLeechSeedText::
text "LEECH SEED saps"
line $5a, "!"
prompt
-_EnemyMonFaintedText:: ; 0x896c7
+_EnemyMonFaintedText::
text "Enemy @"
TX_RAM wEnemyMonNick
db $0
line "fainted!"
prompt
-_MoneyForWinningText:: ; 896dd (22:56dd)
+_MoneyForWinningText::
text $52, " got ¥@"
TX_BCD wAmountMoneyWon, $c3
db $0
line "for winning!"
prompt
-_TrainerDefeatedText:: ; 896f9 (22:56f9)
+_TrainerDefeatedText::
text $52, " defeated"
line "@"
- TX_RAM W_TRAINERNAME
+ TX_RAM wTrainerName
text "!"
prompt
-_PlayerMonFaintedText:: ; 8970c (22:570c)
+_PlayerMonFaintedText::
TX_RAM wBattleMonNick
db $0
line "fainted!"
prompt
-_UseNextMonText:: ; 8971a (22:571a)
+_UseNextMonText::
text "Use next #MON?"
done
-_Sony1WinText:: ; 8972a (22:572a)
+_Sony1WinText::
text $53, ": Yeah! Am"
line "I great or what?"
prompt
-_PlayerBlackedOutText2:: ; 89748 (22:5748)
+_PlayerBlackedOutText2::
text $52, " is out of"
line "useable #MON!"
@@ -1149,15 +1126,15 @@ _PlayerBlackedOutText2:: ; 89748 (22:5748)
line "out!"
prompt
-_LinkBattleLostText:: ; 89772 (22:5772)
+_LinkBattleLostText::
text $52, " lost to"
line "@"
- TX_RAM W_TRAINERNAME
+ TX_RAM wTrainerName
text "!"
prompt
-_TrainerAboutToUseText:: ; 89784 (22:5784)
- TX_RAM W_TRAINERNAME
+_TrainerAboutToUseText::
+ TX_RAM wTrainerName
text " is"
line "about to use"
cont"@"
@@ -1168,160 +1145,154 @@ _TrainerAboutToUseText:: ; 89784 (22:5784)
line "change #MON?"
done
-_TrainerSentOutText:: ; 897b4 (22:57b4)
- TX_RAM W_TRAINERNAME
+_TrainerSentOutText::
+ TX_RAM wTrainerName
text " sent"
line "out @"
TX_RAM wEnemyMonNick
text "!"
done
-_NoWillText:: ; 897c9 (22:57c9)
+_NoWillText::
text "There's no will"
line "to fight!"
prompt
-_CantEscapeText:: ; 897e3 (22:57e3)
+_CantEscapeText::
text "Can't escape!"
prompt
-_NoRunningText:: ; 897f1 (22:57f1)
+_NoRunningText::
text "No! There's no"
line "running from a"
cont "trainer battle!"
prompt
-_GotAwayText:: ; 8981f (22:581f)
+_GotAwayText::
text "Got away safely!"
prompt
-IF DEF(_YELLOW)
-_RunAwayText::
- text "Hurry, get away!"
- prompt
-ENDC
-
-_ItemsCantBeUsedHereText:: ; 89831 (22:5831)
+_ItemsCantBeUsedHereText::
text "Items can't be"
line "used here."
prompt
-_AlreadyOutText:: ; 8984b (22:584b)
+_AlreadyOutText::
TX_RAM wBattleMonNick
text " is"
line "already out!"
prompt
-_MoveNoPPText:: ; 89860 (22:5860)
+_MoveNoPPText::
text "No PP left for"
line "this move!"
prompt
-_MoveDisabledText:: ; 8987b (22:587b)
+_MoveDisabledText::
text "The move is"
line "disabled!"
prompt
-_NoMovesLeftText:: ; 89892 (22:5892)
+_NoMovesLeftText::
TX_RAM wBattleMonNick
text " has no"
line "moves left!"
done
-_MultiHitText:: ; 898aa (22:58aa)
+_MultiHitText::
text "Hit the enemy"
line "@"
TX_NUM wPlayerNumHits,1,1
text " times!"
prompt
-_ScaredText:: ; 898c7 (22:58c7)
+_ScaredText::
TX_RAM wBattleMonNick
text " is too"
line "scared to move!"
prompt
-_GetOutText:: ; 898e3 (22:58e3)
+_GetOutText::
text "GHOST: Get out..."
line "Get out..."
prompt
-_FastAsleepText:: ; 89901 (22:5901)
+_FastAsleepText::
text $5A
line "is fast asleep!"
prompt
-_WokeUpText:: ; 89914 (22:5914)
+_WokeUpText::
text $5A
line "woke up!"
prompt
-_IsFrozenText:: ; 89920 (22:5920)
+_IsFrozenText::
text $5A
line "is frozen solid!"
prompt
-_FullyParalyzedText:: ; 89934 (22:5934)
+_FullyParalyzedText::
text $5A,"'s"
line "fully paralyzed!"
prompt
-_FlinchedText:: ; 89949 (22:5949)
+_FlinchedText::
text $5A
line "flinched!"
prompt
-_MustRechargeText:: ; 89956 (22:5956)
+_MustRechargeText::
text $5A
line "must recharge!"
prompt
-_DisabledNoMoreText:: ; 89968 (22:5968)
+_DisabledNoMoreText::
text $5A,"'s"
line "disabled no more!"
prompt
-_IsConfusedText:: ; 8997e (22:597e)
+_IsConfusedText::
text $5A
line "is confused!"
prompt
-_HurtItselfText:: ; 8998e (22:598e)
+_HurtItselfText::
text "It hurt itself in"
line "its confusion!"
prompt
-_ConfusedNoMoreText:: ; 899b0 (22:59b0)
+_ConfusedNoMoreText::
text $5A,"'s"
line "confused no more!"
prompt
-_SavingEnergyText:: ; 899c6 (22:59c6)
+_SavingEnergyText::
text $5A
line "is saving energy!"
prompt
-_UnleashedEnergyText:: ; 899db (22:59db)
+_UnleashedEnergyText::
text $5A
line "unleashed energy!"
prompt
-_ThrashingAboutText:: ; 899f0 (22:59f0)
+_ThrashingAboutText::
text $5A,"'s"
line "thrashing about!"
done
-_AttackContinuesText:: ; 89a05 (22:5a05)
+_AttackContinuesText::
text $5A,"'s"
line "attack continues!"
done
-_CantMoveText:: ; 89a1b (22:5a1b)
+_CantMoveText::
text $5A
line "can't move!"
prompt
-_MoveIsDisabledText:: ; 89a29 (22:5a29)
+_MoveIsDisabledText::
text $5a, "'s"
line "@"
TX_RAM wcd6d
@@ -1329,163 +1300,163 @@ _MoveIsDisabledText:: ; 89a29 (22:5a29)
cont "disabled!"
prompt
-_MonName1Text:: ; 89a40 (22:5a40)
+_MonName1Text::
text $5a, "@@"
-_Used1Text:: ; 89a44 (22:5a44)
+_Used1Text::
db $0
line "used @@"
-_Used2Text:: ; 89a4d (22:5a4d)
+_Used2Text::
db $0
line "used @@"
-_InsteadText:: ; 89a56 (22:5a56)
+_InsteadText::
text "instead,"
cont "@@"
-_CF4BText:: ; 89a62 (22:5a62)
+_CF4BText::
TX_RAM wcf4b
text "@"
-_ExclamationPoint1Text:: ; 89a67 (22:5a67)
+_ExclamationPoint1Text::
text "!"
done
-_ExclamationPoint2Text:: ; 89a6a (22:5a6a)
+_ExclamationPoint2Text::
text "!"
done
-_ExclamationPoint3Text:: ; 89a6d (22:5a6d)
+_ExclamationPoint3Text::
text "!"
done
-_ExclamationPoint4Text:: ; 89a70 (22:5a70)
+_ExclamationPoint4Text::
text "!"
done
-_ExclamationPoint5Text:: ; 89a73 (22:5a73)
+_ExclamationPoint5Text::
text "!"
done
-_AttackMissedText:: ; 89a76 (22:5a76)
+_AttackMissedText::
text $5a, "'s"
line "attack missed!"
prompt
-_KeptGoingAndCrashedText:: ; 89a89 (22:5a89)
+_KeptGoingAndCrashedText::
text $5a
line "kept going and"
cont "crashed!"
prompt
-_UnaffectedText:: ; 89aa4 (22:5aa4)
+_UnaffectedText::
text $59, "'s"
line "unaffected!"
prompt
-_DoesntAffectMonText:: ; 89ab4 (22:5ab4)
+_DoesntAffectMonText::
text "It doesn't affect"
line $59, "!"
prompt
-_CriticalHitText:: ; 89ac9 (22:5ac9)
+_CriticalHitText::
text "Critical hit!"
prompt
-_OHKOText:: ; 89ad8 (22:5ad8)
+_OHKOText::
text "One-hit KO!"
prompt
-_LoafingAroundText:: ; 89ae5 (22:5ae5)
+_LoafingAroundText::
TX_RAM wBattleMonNick
text " is"
line "loafing around."
prompt
-_BeganToNapText:: ; 89afd (22:5afd)
+_BeganToNapText::
TX_RAM wBattleMonNick
text " began"
line "to nap!"
prompt
-_WontObeyText:: ; 89b10 (22:5b10)
+_WontObeyText::
TX_RAM wBattleMonNick
text " won't"
line "obey!"
prompt
-_TurnedAwayText:: ; 89b20 (22:5b20)
+_TurnedAwayText::
TX_RAM wBattleMonNick
text " turned"
line "away!"
prompt
-_IgnoredOrdersText:: ; 89b32 (22:5b32)
+_IgnoredOrdersText::
TX_RAM wBattleMonNick
db $0
line "ignored orders!"
prompt
-_SubstituteTookDamageText:: ; 89b47 (22:5b47)
+_SubstituteTookDamageText::
text "The SUBSTITUTE"
line "took damage for"
cont $59, "!"
prompt
-_SubstituteBrokeText:: ; 89b6a (22:5b6a)
+_SubstituteBrokeText::
text $59, "'s"
line "SUBSTITUTE broke!"
prompt
-_BuildingRageText:: ; 89b80 (22:5b80)
+_BuildingRageText::
text $5a, "'s"
line "RAGE is building!"
prompt
-_MirrorMoveFailedText:: ; 89b96 (22:5b96)
+_MirrorMoveFailedText::
text "The MIRROR MOVE"
next "failed!"
prompt
-_HitXTimesText:: ; 89baf (22:5baf)
+_HitXTimesText::
text "Hit @"
TX_NUM wEnemyNumHits, 1, 1
text " times!"
prompt
-_GainedText:: ; 89bc2 (22:5bc2)
+_GainedText::
TX_RAM wcd6d
text " gained"
line "@@"
-_WithExpAllText:: ; 89bd0 (22:5bd0)
+_WithExpAllText::
text "with EXP.ALL,"
cont "@@"
-_BoostedText:: ; 89be1 (22:5be1)
+_BoostedText::
text "a boosted"
cont "@@"
-_ExpPointsText:: ; 89bee (22:5bee)
- TX_NUM wcf4b, 2, 4
+_ExpPointsText::
+ TX_NUM wExpAmountGained, 2, 4
text " EXP. Points!"
prompt
-_GrewLevelText:: ; 89c01 (22:5c01)
+_GrewLevelText::
TX_RAM wcd6d
text " grew"
line "to level @"
- TX_NUM W_CURENEMYLVL, 1, 3
+ TX_NUM wCurEnemyLVL, 1, 3
text "!@@"
-_WildMonAppearedText:: ; 89c1d (22:5c1d)
+_WildMonAppearedText::
text "Wild @"
TX_RAM wEnemyMonNick
db $0
line "appeared!"
prompt
-_HookedMonAttackedText:: ; 89c33 (22:5c33)
+_HookedMonAttackedText::
text "The hooked"
line "@"
TX_RAM wEnemyMonNick
@@ -1493,83 +1464,83 @@ _HookedMonAttackedText:: ; 89c33 (22:5c33)
cont "attacked!"
prompt
-_EnemyAppearedText:: ; 89c4f (22:5c4f)
+_EnemyAppearedText::
TX_RAM wEnemyMonNick
db $0
line "appeared!"
prompt
-_TrainerWantsToFightText:: ; 89c5e (22:5c5e)
- TX_RAM W_TRAINERNAME
+_TrainerWantsToFightText::
+ TX_RAM wTrainerName
text " wants"
line "to fight!"
prompt
-_UnveiledGhostText:: ; 89c73 (22:5c73)
+_UnveiledGhostText::
text "SILPH SCOPE"
line "unveiled the"
cont "GHOST's identity!"
prompt
-_GhostCantBeIDdText:: ; 89c9e (22:5c9e)
+_GhostCantBeIDdText::
text "Darn! The GHOST"
line "can't be ID'd!"
prompt
-_GoText:: ; 89cbc (22:5cbc)
+_GoText::
text "Go! @@"
-_DoItText:: ; 89cc3 (22:5cc3)
+_DoItText::
text "Do it! @@"
-_GetmText:: ; 89ccd (22:5ccd)
+_GetmText::
text "Get'm! @@"
-_EnemysWeakText:: ; 89cd6 (22:5cd6)
+_EnemysWeakText::
text "The enemy's weak!"
line "Get'm! @@"
-_PlayerMon1Text:: ; 89cf0 (22:5cf0)
+_PlayerMon1Text::
TX_RAM wBattleMonNick
text "!"
done
-_PlayerMon2Text:: ; 89cf6 (22:5cf6)
+_PlayerMon2Text::
TX_RAM wBattleMonNick
text " @@"
-_EnoughText:: ; 89cfd (22:5cfd)
+_EnoughText::
text "enough!@@"
-_OKExclamationText:: ; 89d07 (22:5d07)
+_OKExclamationText::
text "OK!@@"
-_GoodText:: ; 89d0d (22:5d0d)
+_GoodText::
text "good!@@"
-_ComeBackText:: ; 89d15 (22:5d15)
+_ComeBackText::
db $0
line "Come back!"
done
-_SuperEffectiveText:: ; 89d22 (22:5d22)
+_SuperEffectiveText::
text "It's super"
line "effective!"
prompt
-_NotVeryEffectiveText:: ; 89d38 (22:5d38)
+_NotVeryEffectiveText::
text "It's not very"
line "effective..."
prompt
-_SafariZoneEatingText:: ; 89d53 (22:5d53)
+_SafariZoneEatingText::
text "Wild @"
TX_RAM wEnemyMonNick
db $0
line "is eating!"
prompt
-_SafariZoneAngryText:: ; 89d6a (22:5d6a)
+_SafariZoneAngryText::
text "Wild @"
TX_RAM wEnemyMonNick
db $0
@@ -1577,59 +1548,48 @@ _SafariZoneAngryText:: ; 89d6a (22:5d6a)
prompt
; money related
-_PickUpPayDayMoneyText:: ; 89d80 (22:5d80)
+_PickUpPayDayMoneyText::
text $52, " picked up"
line "¥@"
TX_BCD wTotalPayDayMoney, $c3
text "!"
prompt
-_ClearSaveDataText:: ; 89d96 (22:5d96)
+_ClearSaveDataText::
text "Clear all saved"
line "data?"
done
-_WhichFloorText:: ; 89dad (22:5dad)
+_WhichFloorText::
text "Which floor do"
line "you want? "
done
-IF DEF(_YELLOW)
-_SleepingPikachuText1::
- text "There isn't any"
- line "response..."
- prompt
-ENDC
-
-_PartyMenuNormalText:: ; 89dc8 (22:5dc8)
+_PartyMenuNormalText::
text "Choose a #MON."
done
-_PartyMenuItemUseText:: ; 89dd8 (22:5dd8)
+_PartyMenuItemUseText::
text "Use item on which"
line "#MON?"
done
-_PartyMenuBattleText:: ; 89df1 (22:5df1)
+_PartyMenuBattleText::
text "Bring out which"
line "#MON?"
done
-_PartyMenuUseTMText:: ; 89e08 (22:5e08)
-IF DEF(_YELLOW)
- text "Teach to which"
-ELSE
+_PartyMenuUseTMText::
text "Use TM on which"
-ENDC
line "#MON?"
done
-_PartyMenuSwapMonText:: ; 89e1f (22:5e1f)
+_PartyMenuSwapMonText::
text "Move #MON"
line "where?"
done
-_PotionText:: ; 89e31 (22:5e31)
+_PotionText::
TX_RAM wcd6d
db $0
line "recovered by @"
@@ -1637,61 +1597,61 @@ _PotionText:: ; 89e31 (22:5e31)
text "!"
done
-_AntidoteText:: ; 89e4b (22:5e4b)
+_AntidoteText::
TX_RAM wcd6d
text " was"
line "cured of poison!"
done
-_ParlyzHealText:: ; 89e65 (22:5e65)
+_ParlyzHealText::
TX_RAM wcd6d
text "'s"
line "rid of paralysis!"
done
-_BurnHealText:: ; 89e7d (22:5e7d)
+_BurnHealText::
TX_RAM wcd6d
text "'s"
line "burn was healed!"
done
-_IceHealText:: ; 89e94 (22:5e94)
+_IceHealText::
TX_RAM wcd6d
text " was"
line "defrosted!"
done
-_AwakeningText:: ; 89ea8 (22:5ea8)
+_AwakeningText::
TX_RAM wcd6d
db $0
line "woke up!"
done
-_FullHealText:: ; 89eb6 (22:5eb6)
+_FullHealText::
TX_RAM wcd6d
text "'s"
line "health returned!"
done
-_ReviveText:: ; 89ecd (22:5ecd)
+_ReviveText::
TX_RAM wcd6d
db $0
line "is revitalized!"
done
-_RareCandyText:: ; 89ee2 (22:5ee2)
+_RareCandyText::
TX_RAM wcd6d
text " grew"
line "to level @"
- TX_NUM W_CURENEMYLVL, $1,$3
+ TX_NUM wCurEnemyLVL, $1,$3
text "!@@"
-_TurnedOnPC1Text:: ; 89efe (22:5efe)
+_TurnedOnPC1Text::
text $52, " turned on"
line "the PC."
prompt
-_AccessedBillsPCText:: ; 89f13 (22:5f13)
+_AccessedBillsPCText::
text "Accessed BILL's"
line "PC."
@@ -1699,7 +1659,7 @@ _AccessedBillsPCText:: ; 89f13 (22:5f13)
line "Storage System."
prompt
-_AccessedSomeonesPCText:: ; 89f45 (22:5f45)
+_AccessedSomeonesPCText::
text "Accessed someone's"
line "PC."
@@ -1707,84 +1667,84 @@ _AccessedSomeonesPCText:: ; 89f45 (22:5f45)
line "Storage System."
prompt
-_AccessedMyPCText:: ; 89f7a (22:5f7a)
+_AccessedMyPCText::
text "Accessed my PC."
para "Accessed Item"
line "Storage System."
prompt
-_TurnedOnPC2Text:: ; 89fa9 (22:5fa9)
+_TurnedOnPC2Text::
text $52, " turned on"
line "the PC."
prompt
-_WhatDoYouWantText:: ; 89fbe (22:5fbe)
+_WhatDoYouWantText::
text "What do you want"
line "to do?"
done
-_WhatToDepositText:: ; 89fd7 (22:5fd7)
+_WhatToDepositText::
text "What do you want"
line "to deposit?"
done
-_DepositHowManyText:: ; 89ff5 (22:5ff5)
+_DepositHowManyText::
text "How many?"
done
-_ItemWasStoredText:: ; 8a000 (22:6000)
+_ItemWasStoredText::
TX_RAM wcd6d
text " was"
line "stored via PC."
prompt
-_NothingToDepositText:: ; 8a018 (22:6018)
+_NothingToDepositText::
text "You have nothing"
line "to deposit."
prompt
-_NoRoomToStoreText:: ; 8a036 (22:6036)
+_NoRoomToStoreText::
text "No room left to"
line "store items."
prompt
-_WhatToWithdrawText:: ; 8a054 (22:6054)
+_WhatToWithdrawText::
text "What do you want"
line "to withdraw?"
done
-_WithdrawHowManyText:: ; 8a073 (22:6073)
+_WithdrawHowManyText::
text "How many?"
done
-_WithdrewItemText:: ; 8a07e (22:607e)
+_WithdrewItemText::
text "Withdrew"
line "@"
TX_RAM wcd6d
text "."
prompt
-_NothingStoredText:: ; 8a08f (22:608f)
+_NothingStoredText::
text "There is nothing"
line "stored."
prompt
-_CantCarryMoreText:: ; 8a0a9 (22:60a9)
+_CantCarryMoreText::
text "You can't carry"
line "any more items."
prompt
-_WhatToTossText:: ; 8a0c9 (22:60c9)
+_WhatToTossText::
text "What do you want"
line "to toss away?"
done
-_TossHowManyText:: ; 8a0e9 (22:60e9)
+_TossHowManyText::
text "How many?"
done
-_AccessedHoFPCText:: ; 8a0f4 (22:60f4)
+_AccessedHoFPCText::
text "Accessed #MON"
line "LEAGUE's site."
@@ -1792,27 +1752,20 @@ _AccessedHoFPCText:: ; 8a0f4 (22:60f4)
line "OF FAME List."
prompt
-IF DEF(_YELLOW)
-_SleepingPikachuText2::
- text "There isn't any"
- line "response..."
- prompt
-ENDC
-
-_SwitchOnText:: ; 0x8a131
+_SwitchOnText::
text "Switch on!"
prompt
-_WhatText:: ; 0x8a13d
+_WhatText::
text "What?"
done
-_DepositWhichMonText:: ; 0x8a144
+_DepositWhichMonText::
text "Deposit which"
line "#MON?"
done
-_MonWasStoredText:: ; 0x8a159
+_MonWasStoredText::
TX_RAM wcf4b
text " was"
line "stored in Box @"
@@ -1820,17 +1773,17 @@ _MonWasStoredText:: ; 0x8a159
text "."
prompt
-_CantDepositLastMonText:: ; 0x8a177
+_CantDepositLastMonText::
text "You can't deposit"
line "the last #MON!"
prompt
-_BoxFullText:: ; 0x8a198
+_BoxFullText::
text "Oops! This Box is"
line "full of #MON."
prompt
-_MonIsTakenOutText:: ; 0x8a1b9
+_MonIsTakenOutText::
TX_RAM wcf4b
text " is"
line "taken out."
@@ -1839,12 +1792,12 @@ _MonIsTakenOutText:: ; 0x8a1b9
text "."
prompt
-_NoMonText:: ; 0x8a1d7
+_NoMonText::
text "What? There are"
line "no #MON here!"
prompt
-_CantTakeMonText:: ; 0x8a1f6
+_CantTakeMonText::
text "You can't take"
line "any more #MON."
@@ -1852,20 +1805,12 @@ _CantTakeMonText:: ; 0x8a1f6
line "first."
prompt
-IF DEF(_YELLOW)
-_PikachuUnhappyText::
- TX_RAM $cd6d
- text "looks"
- line "unhappy about it!"
- prompt
-ENDC
-
-_ReleaseWhichMonText:: ; 0x8a228
+_ReleaseWhichMonText::
text "Release which"
line "#MON?"
done
-_OnceReleasedText:: ; 0x8a23d
+_OnceReleasedText::
text "Once released,"
line "@"
TX_RAM wcf4b
@@ -1873,62 +1818,62 @@ _OnceReleasedText:: ; 0x8a23d
cont "gone forever. OK?"
done
-_MonWasReleasedText:: ; 0x8a268
+_MonWasReleasedText::
TX_RAM wcf4b
text " was"
line "released outside."
cont "Bye @"
-_CF4BExclamationText:: ; 8a288 (22:6288)
+_CF4BExclamationText::
TX_RAM wcf4b
text "!"
prompt
-_RequireCoinCaseText:: ; 8a28e (22:628e)
+_RequireCoinCaseText::
text "A COIN CASE is"
line "required!@@"
-_ExchangeCoinsForPrizesText:: ; 8a2a9 (22:62a9)
+_ExchangeCoinsForPrizesText::
text "We exchange your"
line "coins for prizes."
prompt
-_WhichPrizeText:: ; 8a2cd (22:62cd)
+_WhichPrizeText::
text "Which prize do"
line "you want?"
done
-_HereYouGoText:: ; 8a2e7 (22:62e7)
+_HereYouGoText::
text "Here you go!@@"
-_SoYouWantPrizeText:: ; 8a2f6 (22:62f6)
+_SoYouWantPrizeText::
text "So, you want"
line "@"
TX_RAM wcd6d
text "?"
done
-_SorryNeedMoreCoinsText:: ; 8a30b (22:630b)
+_SorryNeedMoreCoinsText::
text "Sorry, you need"
line "more coins.@@"
-_OopsYouDontHaveEnoughRoomText:: ; 8a329 (22:6329)
+_OopsYouDontHaveEnoughRoomText::
text "Oops! You don't"
line "have enough room.@@"
-_OhFineThenText:: ; 8a34c (22:634c)
+_OhFineThenText::
text "Oh, fine then.@@"
-_GetDexRatedText:: ; 8a35d (22:635d)
+_GetDexRatedText::
text "Want to get your"
line "#DEX rated?"
done
-_ClosedOaksPCText:: ; 8a37b (22:637b)
+_ClosedOaksPCText::
text "Closed link to"
line "PROF.OAK's PC.@@"
-_AccessedOaksPCText:: ; 8a39a (22:639a)
+_AccessedOaksPCText::
text "Accessed PROF."
line "OAK's PC."
@@ -1936,24 +1881,24 @@ _AccessedOaksPCText:: ; 8a39a (22:639a)
line "Rating System."
prompt
-_WhereWouldYouLikeText:: ; 8a3d0 (22:63d0)
+_WhereWouldYouLikeText::
text "Where would you"
line "like to go?"
done
-_PleaseWaitText:: ; 8a3ed (22:63ed)
+_PleaseWaitText::
text "OK, please wait"
line "just a moment."
done
-_LinkCanceledText:: ; 8a40d (22:640d)
+_LinkCanceledText::
text "The link was"
line "canceled."
done
INCLUDE "text/oakspeech.asm"
-_DoYouWantToNicknameText:: ; 0x8a605
+_DoYouWantToNicknameText::
text "Do you want to"
line "give a nickname"
cont "to @"
@@ -1961,18 +1906,18 @@ _DoYouWantToNicknameText:: ; 0x8a605
text "?"
done
-_YourNameIsText:: ; 8a62f (22:662f)
+_YourNameIsText::
text "Right! So your"
line "name is ", $52, "!"
prompt
-_HisNameIsText:: ; 8a64a (22:664a)
+_HisNameIsText::
text "That's right! I"
line "remember now! His"
cont "name is ", $53, "!"
prompt
-_WillBeTradedText:: ; 8a677 (22:6677)
+_WillBeTradedText::
TX_RAM wNameOfPlayerMonToBeTraded
text " and"
line "@"
@@ -1981,126 +1926,14 @@ _WillBeTradedText:: ; 8a677 (22:6677)
cont "be traded."
done
-IF DEF(_YELLOW)
-_Colosseum3MonsText::
- text "You need 3 #MON"
- line "to fight!"
- prompt
-
-_ColosseumMewText::
- text "Sorry, MEW can't"
- line "attend!"
- prompt
-
-_ColosseumDifferentMonsText::
- text "Your #MON must"
- line "all be different!"
- prompt
-
-_ColosseumMaxL55Text::
- text "No #MON can"
- line "exceed L55!"
- prompt
-
-_ColosseumMinL50Text::
- text "All #MON must"
- line "be at least L50!"
- prompt
-
-_ColosseumTotalL155Text::
- text "Your total levels"
- line "exceed 155!"
- prompt
-
-_ColosseumMaxL30Text::
- text "No #MON can"
- line "exceed L30!"
- prompt
-
-_ColosseumMinL25Text::
- text "All #MON must"
- line "be at least L25!"
- prompt
-
-_ColosseumTotalL80Text::
- text "Your total levels"
- line "exceed 80!"
- prompt
-
-_ColosseumMaxL20Text::
- text "No #MON can"
- line "exceed L20!"
- prompt
-
-_ColosseumMinL15Text::
- text "All #MON must"
- line "be at least L15!"
- prompt
-
-_ColosseumTotalL50Text::
- text "Your total levels"
- line "exceed 50!"
- prompt
-
-_ColosseumHeightText::
- TX_RAM $CD6D
- text " is over"
- line "6′8″ tall!"
- prompt
-
-_ColosseumWeightText::
- TX_RAM $CD6D
- text " weighs"
- line "over 44 pounds!"
- prompt
-
-_ColosseumEvolvedText::
- TX_RAM $CD6D
- text " is an"
- line "evolved #MON!"
- prompt
-
-_ColosseumIneligibleText::
- text "Your opponent is"
- line "ineligible."
- prompt
-
-_ColosseumWhereToText::
- text "Where would you"
- line "like to go?"
- prompt
-
-_ColosseumPleaseWaitText::
- text "OK, please wait"
- line "just a moment."
- prompt
-
-_ColosseumCanceledText::
- text "The link was"
- line "canceled."
- prompt
-
-_ColosseumVersionText::
- text "The game versions"
- line "don't match."
- prompt
-ENDC
-
-_Char00Text:: ; 8a696 (22:6696)
+_Char00Text::
TX_NUM hSpriteIndexOrTextID,1,2
text " ERROR."
done
-_Char55Text:: ; 8a6a3 (22:66a3)
+_Char55Text::
text $4B,"@@"
-IF DEF(_YELLOW)
-_NoPokemonText::
- text "There are no"
- line "#MON here!"
- prompt
-ENDC
-
INCLUDE "text/maps/digletts_cave_route_2_entrance.asm"
INCLUDE "text/maps/viridian_forest_exit.asm"
INCLUDE "text/maps/route_2_house.asm"
@@ -2177,28 +2010,28 @@ SECTION "Text 6", ROMX, BANK[TEXT_6]
INCLUDE "text/maps/route_24_2.asm"
INCLUDE "text/maps/route_25.asm"
-_FileDataDestroyedText:: ; 945f1 (25:45f1)
+_FileDataDestroyedText::
text "The file data is"
line "destroyed!"
prompt
-_WouldYouLikeToSaveText:: ; 9460e (25:460e)
+_WouldYouLikeToSaveText::
text "Would you like to"
line "SAVE the game?"
done
-_GameSavedText:: ; 94630 (25:4630)
+_GameSavedText::
text $52, " saved"
line "the game!"
done
-_OlderFileWillBeErasedText:: ; 94643 (25:4643)
+_OlderFileWillBeErasedText::
text "The older file"
line "will be erased to"
cont "save. Okay?"
done
-_WhenYouChangeBoxText:: ; 94671 (25:4671)
+_WhenYouChangeBoxText::
text "When you change a"
line "#MON BOX, data"
cont "will be saved."
@@ -2206,151 +2039,151 @@ _WhenYouChangeBoxText:: ; 94671 (25:4671)
para "Is that okay?"
done
-_ChooseABoxText:: ; 946b0 (25:46b0)
+_ChooseABoxText::
text "Choose a"
line $4a, " BOX.@@"
-_EvolvedText:: ; 946c2 (25:46c2)
+_EvolvedText::
TX_RAM wcf4b
text " evolved"
done
-_IntoText:: ; 946cf (25:46cf)
+_IntoText::
db $0
line "into @"
TX_RAM wcd6d
text "!"
done
-_StoppedEvolvingText:: ; 946dd (25:46dd)
+_StoppedEvolvingText::
text "Huh? @"
TX_RAM wcf4b
db $0
line "stopped evolving!"
prompt
-_IsEvolvingText:: ; 946fb (25:46fb)
+_IsEvolvingText::
text "What? @"
TX_RAM wcf4b
db $0
line "is evolving!"
done
-_FellAsleepText:: ; 94715 (25:4715)
+_FellAsleepText::
text $59
line "fell asleep!"
prompt
-_AlreadyAsleepText:: ; 94725 (25:4725)
+_AlreadyAsleepText::
text $59, "'s"
line "already asleep!"
prompt
-_PoisonedText:: ; 94739 (25:4739)
+_PoisonedText::
text $59
line "was poisoned!"
prompt
-_BadlyPoisonedText:: ; 9474a (25:474a)
+_BadlyPoisonedText::
text $59, "'s"
line "badly poisoned!"
prompt
-_BurnedText:: ; 9475e (25:475e)
+_BurnedText::
text $59
line "was burned!"
prompt
-_FrozenText:: ; 9476d (25:476d)
+_FrozenText::
text $59
line "was frozen solid!"
prompt
-_FireDefrostedText:: ; 94782 (25:4782)
+_FireDefrostedText::
text "Fire defrosted"
line $59, "!"
prompt
-_MonsStatsRoseText:: ; 94795 (25:4795)
+_MonsStatsRoseText::
text $5a, "'s"
line "@"
TX_RAM wcf4b
text "@@"
-_GreatlyRoseText:: ; 947a0 (25:47a0)
+_GreatlyRoseText::
text $4c, "greatly@@"
-_RoseText:: ; 947ab (25:47ab)
+_RoseText::
text " rose!"
prompt
-_MonsStatsFellText:: ; 947b3 (25:47b3)
+_MonsStatsFellText::
text $59, "'s"
line "@"
TX_RAM wcf4b
text "@@"
-_GreatlyFellText:: ; 947be (25:47be)
+_GreatlyFellText::
text $4c, "greatly@@"
-_FellText:: ; 947c9 (25:47c9)
+_FellText::
text " fell!"
prompt
-_RanFromBattleText:: ; 947d1 (25:47d1)
+_RanFromBattleText::
text $5a
line "ran from battle!"
prompt
-_RanAwayScaredText:: ; 947e5 (25:47e5)
+_RanAwayScaredText::
text $59
line "ran away scared!"
prompt
-_WasBlownAwayText:: ; 947f9 (25:47f9)
+_WasBlownAwayText::
text $59
line "was blown away!"
prompt
-_ChargeMoveEffectText:: ; 9480c (25:480c)
+_ChargeMoveEffectText::
text $5a, "@@"
-_MadeWhirlwindText:: ; 94810 (25:4810)
+_MadeWhirlwindText::
db $0
line "made a whirlwind!"
prompt
-_TookInSunlightText:: ; 94824 (25:4824)
+_TookInSunlightText::
db $0
line "took in sunlight!"
prompt
-_LoweredItsHeadText:: ; 94838 (25:4838)
+_LoweredItsHeadText::
db $0
line "lowered its head!"
prompt
-_SkyAttackGlowingText:: ; 9484c (25:484c)
+_SkyAttackGlowingText::
db $0
line "is glowing!"
prompt
-_FlewUpHighText:: ; 9485a (25:485a)
+_FlewUpHighText::
db $0
line "flew up high!"
prompt
-_DugAHoleText:: ; 9486a (25:486a)
+_DugAHoleText::
db $0
line "dug a hole!"
prompt
-_BecameConfusedText:: ; 94878 (25:4878)
+_BecameConfusedText::
text $59
line "became confused!"
prompt
-_MimicLearnedMoveText:: ; 9488c (25:488c)
+_MimicLearnedMoveText::
text $5a
line "learned"
cont "@"
@@ -2358,7 +2191,7 @@ _MimicLearnedMoveText:: ; 9488c (25:488c)
text "!"
prompt
-_MoveWasDisabledText:: ; 9489e (25:489e)
+_MoveWasDisabledText::
text $59, "'s"
line "@"
TX_RAM wcd6d
@@ -2366,101 +2199,101 @@ _MoveWasDisabledText:: ; 9489e (25:489e)
cont "disabled!"
prompt
-_NothingHappenedText:: ; 948b6 (25:48b6)
+_NothingHappenedText::
text "Nothing happened!"
prompt
-_NoEffectText:: ; 948c9 (25:48c9)
+_NoEffectText::
text "No effect!"
prompt
-_ButItFailedText:: ; 948d5 (25:48d5)
+_ButItFailedText::
text "But, it failed! "
prompt
-_DidntAffectText:: ; 948e7 (25:48e7)
+_DidntAffectText::
text "It didn't affect"
line $59, "!"
prompt
-_IsUnaffectedText:: ; 948fb (25:48fb)
+_IsUnaffectedText::
text $59
line "is unaffected!"
prompt
-_ParalyzedMayNotAttackText:: ; 9490d (25:490d)
+_ParalyzedMayNotAttackText::
text $59, "'s"
line "paralyzed! It may"
cont "not attack!"
prompt
-_SubstituteText:: ; 9492f (25:492f)
+_SubstituteText::
text "It created a"
line "SUBSTITUTE!"
prompt
-_HasSubstituteText:: ; 94949 (25:4949)
+_HasSubstituteText::
text $5a
line "has a SUBSTITUTE!"
prompt
-_TooWeakSubstituteText:: ; 9495e (25:495e)
+_TooWeakSubstituteText::
text "Too weak to make"
line "a SUBSTITUTE!"
prompt
-_CoinsScatteredText:: ; 9497e (25:497e)
+_CoinsScatteredText::
text "Coins scattered"
line "everywhere!"
prompt
-_GettingPumpedText:: ; 9499b (25:499b)
+_GettingPumpedText::
text $5a, "'s"
line "getting pumped!"
prompt
-_WasSeededText:: ; 949af (25:49af)
+_WasSeededText::
text $59
line "was seeded!"
prompt
-_EvadedAttackText:: ; 949be (25:49be)
+_EvadedAttackText::
text $59
line "evaded attack!"
prompt
-_HitWithRecoilText:: ; 949d0 (25:49d0)
+_HitWithRecoilText::
text $5a, "'s"
line "hit with recoil!"
prompt
-_ConvertedTypeText:: ; 949e5 (25:49e5)
+_ConvertedTypeText::
text "Converted type to"
line $59, "'s!"
prompt
-_StatusChangesEliminatedText:: ; 949fc (25:49fc)
+_StatusChangesEliminatedText::
text "All STATUS changes"
line "are eliminated!"
prompt
-_StartedSleepingEffect:: ; 94a20 (25:4a20)
+_StartedSleepingEffect::
text $5a
line "started sleeping!"
done
-_FellAsleepBecameHealthyText:: ; 94a35 (25:4a35)
+_FellAsleepBecameHealthyText::
text $5a
line "fell asleep and"
cont "became healthy!"
done
-_RegainedHealthText:: ; 94a58 (25:4a58)
+_RegainedHealthText::
text $5a
line "regained health!"
prompt
-_TransformedText:: ; 94a6c (25:4a6c)
+_TransformedText::
text $5a
line "transformed into"
cont "@"
@@ -2468,37 +2301,37 @@ _TransformedText:: ; 94a6c (25:4a6c)
text "!"
prompt
-_LightScreenProtectedText:: ; 94a87 (25:4a87)
+_LightScreenProtectedText::
text $5a, "'s"
line "protected against"
cont "special attacks!"
prompt
-_ReflectGainedArmorText:: ; 94aae (25:4aae)
+_ReflectGainedArmorText::
text $5a
line "gained armor!"
prompt
-_ShroudedInMistText:: ; 94abf (25:4abf)
+_ShroudedInMistText::
text $5a, "'s"
line "shrouded in mist!"
prompt
-_SuckedHealthText:: ; 94ad5 (25:4ad5)
+_SuckedHealthText::
text "Sucked health from"
line $59, "!"
prompt
-_DreamWasEatenText:: ; 94aec (25:4aec)
+_DreamWasEatenText::
text $59, "'s"
line "dream was eaten!"
prompt
-_TradeCenterText1:: ; 94b01 (25:4b01)
+_TradeCenterText1::
text "!"
done
-_ColosseumText1:: ; 94b04 (25:4b04)
+_ColosseumText1::
text "!"
done
@@ -2602,18 +2435,18 @@ INCLUDE "text/maps/silph_co_1f.asm"
INCLUDE "text/maps/saffron_pokecenter.asm"
INCLUDE "text/maps/mr_psychics_house.asm"
-_PokemartGreetingText:: ; a259c (28:659c)
+_PokemartGreetingText::
text "Hi there!"
next "May I help you?"
done
-_PokemonFaintedText:: ; a25b7 (28:65b7)
+_PokemonFaintedText::
TX_RAM wcd6d
db $0
line "fainted!"
done
-_PlayerBlackedOutText:: ; a25c5 (28:65c5)
+_PlayerBlackedOutText::
text $52, " is out of"
line "useable #MON!"
@@ -2621,16 +2454,16 @@ _PlayerBlackedOutText:: ; a25c5 (28:65c5)
line "out!"
prompt
-_RepelWoreOffText:: ; a25ef (28:65ef)
+_RepelWoreOffText::
text "REPEL's effect"
line "wore off."
done
-_PokemartBuyingGreetingText:: ; a2608 (28:6608)
+_PokemartBuyingGreetingText::
text "Take your time."
done
-_PokemartTellBuyPriceText:: ; a2619 (28:6619)
+_PokemartTellBuyPriceText::
TX_RAM wcf4b
text "?"
line "That will be"
@@ -2639,73 +2472,73 @@ _PokemartTellBuyPriceText:: ; a2619 (28:6619)
text ". OK?"
done
-_PokemartBoughtItemText:: ; a2639 (28:6639)
+_PokemartBoughtItemText::
text "Here you are!"
line "Thank you!"
prompt
-_PokemartNotEnoughMoneyText:: ; a2653 (28:6653)
+_PokemartNotEnoughMoneyText::
text "You don't have"
line "enough money."
prompt
-_PokemartItemBagFullText:: ; a2670 (28:6670)
+_PokemartItemBagFullText::
text "You can't carry"
line "any more items."
prompt
-_PokemonSellingGreetingText:: ; a2690 (28:6690)
+_PokemonSellingGreetingText::
text "What would you"
line "like to sell?"
done
-_PokemartTellSellPriceText:: ; a26ae (28:66ae)
+_PokemartTellSellPriceText::
text "I can pay you"
line "¥@"
TX_BCD hMoney, $c3
text " for that."
done
-_PokemartItemBagEmptyText:: ; a26cf (28:66cf)
+_PokemartItemBagEmptyText::
text "You don't have"
line "anything to sell."
prompt
-_PokemartUnsellableItemText:: ; a26f0 (28:66f0)
+_PokemartUnsellableItemText::
text "I can't put a"
line "price on that."
prompt
-_PokemartThankYouText:: ; a270d (28:670d)
+_PokemartThankYouText::
text "Thank you!"
done
-_PokemartAnythingElseText:: ; a2719 (28:6719)
+_PokemartAnythingElseText::
text "Is there anything"
line "else I can do?"
done
-_LearnedMove1Text:: ; a273b (28:673b)
- TX_RAM wd036
+_LearnedMove1Text::
+ TX_RAM wLearnMoveMonName
text " learned"
line "@"
TX_RAM wcf4b
text "!@@"
-_WhichMoveToForgetText:: ; a2750 (28:6750)
+_WhichMoveToForgetText::
text "Which move should"
next "be forgotten?"
done
-_AbandonLearningText:: ; a2771 (28:6771)
+_AbandonLearningText::
text "Abandon learning"
line "@"
TX_RAM wcf4b
text "?"
done
-_DidNotLearnText:: ; a278a (28:678a)
- TX_RAM wd036
+_DidNotLearnText::
+ TX_RAM wLearnMoveMonName
db $0
line "did not learn"
cont "@"
@@ -2713,8 +2546,8 @@ _DidNotLearnText:: ; a278a (28:678a)
text "!"
prompt
-_TryingToLearnText:: ; a27a4 (28:67a4)
- TX_RAM wd036
+_TryingToLearnText::
+ TX_RAM wLearnMoveMonName
text " is"
line "trying to learn"
cont "@"
@@ -2722,7 +2555,7 @@ _TryingToLearnText:: ; a27a4 (28:67a4)
text "!"
para "But, @"
- TX_RAM wd036
+ TX_RAM wLearnMoveMonName
db $0
line "can't learn more"
cont "than 4 moves!"
@@ -2734,16 +2567,16 @@ _TryingToLearnText:: ; a27a4 (28:67a4)
text "?"
done
-_OneTwoAndText:: ; a2819 (28:6819)
+_OneTwoAndText::
text "1, 2 and...@@"
-_PoofText:: ; a2827 (28:6827)
+_PoofText::
text " Poof!@@"
-_ForgotAndText:: ; a2830 (28:6830)
+_ForgotAndText::
db $0
para "@"
- TX_RAM wd036
+ TX_RAM wLearnMoveMonName
text " forgot"
line "@"
TX_RAM wcd6d
@@ -2752,12 +2585,12 @@ _ForgotAndText:: ; a2830 (28:6830)
para "And..."
prompt
-_HMCantDeleteText:: ; a284d (28:684d)
+_HMCantDeleteText::
text "HM techniques"
line "can't be deleted!"
prompt
-_PokemonCenterWelcomeText:: ; a286d (28:686d)
+_PokemonCenterWelcomeText::
text "Welcome to our"
line "#MON CENTER!"
@@ -2766,40 +2599,40 @@ _PokemonCenterWelcomeText:: ; a286d (28:686d)
cont "perfect health!"
prompt
-_ShallWeHealYourPokemonText:: ; a28b4 (28:68b4)
+_ShallWeHealYourPokemonText::
text "Shall we heal your"
line "#MON?"
done
-_NeedYourPokemonText:: ; a28ce (28:68ce)
+_NeedYourPokemonText::
text "OK. We'll need"
line "your #MON."
done
-_PokemonFightingFitText:: ; a28e8 (28:68e8)
+_PokemonFightingFitText::
text "Thank you!"
line "Your #MON are"
cont "fighting fit!"
prompt
-_PokemonCenterFarewellText:: ; a2910 (28:6910)
+_PokemonCenterFarewellText::
text "We hope to see"
line "you again!"
done
-_CableClubNPCAreaReservedFor2FriendsLinkedByCableText:: ; a292b (28:692b)
+_CableClubNPCAreaReservedFor2FriendsLinkedByCableText::
text "This area is"
line "reserved for 2"
cont "friends who are"
cont "linked by cable."
done
-_CableClubNPCWelcomeText:: ; a2969 (28:6969)
+_CableClubNPCWelcomeText::
text "Welcome to the"
line "Cable Club!"
done
-_CableClubNPCPleaseApplyHereHaveToSaveText:: ; a2985 (28:6985)
+_CableClubNPCPleaseApplyHereHaveToSaveText::
text "Please apply here."
para "Before opening"
@@ -2807,10 +2640,10 @@ _CableClubNPCPleaseApplyHereHaveToSaveText:: ; a2985 (28:6985)
cont "to save the game."
done
-_CableClubNPCPleaseWaitText:: ; a29cc (28:69cc)
+_CableClubNPCPleaseWaitText::
text "Please wait.@@"
-_CableClubNPCLinkClosedBecauseOfInactivityText:: ; a29db (28:69db)
+_CableClubNPCLinkClosedBecauseOfInactivityText::
text "The link has been"
line "closed because of"
cont "inactivity."
@@ -2823,86 +2656,86 @@ _CableClubNPCLinkClosedBecauseOfInactivityText:: ; a29db (28:69db)
SECTION "Text 10", ROMX, BANK[TEXT_10]
-_CableClubNPCPleaseComeAgainText:: ; a4000 (29:4000)
+_CableClubNPCPleaseComeAgainText::
text "Please come again!"
done
-_CableClubNPCMakingPreparationsText:: ; a4014 (29:4014)
+_CableClubNPCMakingPreparationsText::
text "We're making"
line "preparations."
cont "Please wait."
done
-_UsedStrengthText:: ; a403c (29:403c)
+_UsedStrengthText::
TX_RAM wcd6d
text " used"
line "STRENGTH.@@"
-_CanMoveBouldersText:: ; a4051 (29:4051)
+_CanMoveBouldersText::
TX_RAM wcd6d
text " can"
line "move boulders."
prompt
-_CurrentTooFastText:: ; a4069 (29:4069)
+_CurrentTooFastText::
text "The current is"
line "much too fast!"
prompt
-_CyclingIsFunText:: ; a4088 (29:4088)
+_CyclingIsFunText::
text "Cycling is fun!"
line "Forget SURFing!"
prompt
-_FlashLightsAreaText:: ; a40a9 (29:40a9)
+_FlashLightsAreaText::
text "A blinding FLASH"
line "lights the area!"
prompt
-_WarpToLastPokemonCenterText:: ; a40cc (29:40cc)
+_WarpToLastPokemonCenterText::
text "Warp to the last"
line "#MON CENTER."
done
-_CannotUseTeleportNowText:: ; a40eb (29:40eb)
+_CannotUseTeleportNowText::
TX_RAM wcd6d
text " can't"
line "use TELEPORT now."
prompt
-_CannotFlyHereText:: ; a4107 (29:4107)
+_CannotFlyHereText::
TX_RAM wcd6d
text " can't"
line "FLY here."
prompt
-_NotHealthyEnoughText:: ; a411b (29:411b)
+_NotHealthyEnoughText::
text "Not healthy"
line "enough."
prompt
-_NewBadgeRequiredText:: ; a4130 (29:4130)
+_NewBadgeRequiredText::
text "No! A new BADGE"
line "is required."
prompt
-_CannotUseItemsHereText:: ; a414e (29:414e)
+_CannotUseItemsHereText::
text "You can't use items"
line "here."
prompt
-_CannotGetOffHereText:: ; a4168 (29:4168)
+_CannotGetOffHereText::
text "You can't get off"
line "here."
prompt
-_GotMonText:: ; a4180 (29:4180)
+_GotMonText::
text $52, " got"
line "@"
TX_RAM wcd6d
text "!@@"
-_SetToBoxText:: ; a418f (29:418f)
+_SetToBoxText::
text "There's no more"
line "room for #MON!"
cont "@"
@@ -2914,7 +2747,7 @@ _SetToBoxText:: ; a418f (29:418f)
text " on PC!"
done
-_BoxIsFullText:: ; a41d6 (29:41d6)
+_BoxIsFullText::
text "There's no more"
line "room for #MON!"
@@ -2937,7 +2770,7 @@ INCLUDE "text/maps/fuchsia_city.asm"
INCLUDE "text/maps/cinnabar_island.asm"
INCLUDE "text/maps/saffron_city.asm"
-_ItemUseBallText00:: ; a6729 (29:6729)
+_ItemUseBallText00::
text "It dodged the"
line "thrown BALL!"
@@ -2945,67 +2778,67 @@ _ItemUseBallText00:: ; a6729 (29:6729)
line "can't be caught!"
prompt
-_ItemUseBallText01:: ; a675f (29:675f)
+_ItemUseBallText01::
text "You missed the"
line "#MON!"
prompt
-_ItemUseBallText02:: ; a6775 (29:6775)
+_ItemUseBallText02::
text "Darn! The #MON"
line "broke free!"
prompt
-_ItemUseBallText03:: ; a6791 (29:6791)
+_ItemUseBallText03::
text "Aww! It appeared"
line "to be caught! "
prompt
-_ItemUseBallText04:: ; a67b2 (29:67b2)
+_ItemUseBallText04::
text "Shoot! It was so"
line "close too!"
prompt
-_ItemUseBallText05:: ; a67cf (29:67cf)
+_ItemUseBallText05::
text "All right!"
line "@"
TX_RAM wEnemyMonNick
text " was"
cont "caught!@@"
-_ItemUseBallText07:: ; a67ee (29:67ee)
+_ItemUseBallText07::
TX_RAM wBoxMonNicks
text " was"
line "transferred to"
cont "BILL's PC!"
prompt
-_ItemUseBallText08:: ; a6810 (29:6810)
+_ItemUseBallText08::
TX_RAM wBoxMonNicks
text " was"
line "transferred to"
cont "someone's PC!"
prompt
-_ItemUseBallText06:: ; a6835 (29:6835)
+_ItemUseBallText06::
text "New #DEX data"
line "will be added for"
cont "@"
TX_RAM wEnemyMonNick
text "!@@"
-_SurfingGotOnText:: ; a685e (29:685e)
+_SurfingGotOnText::
text $52, " got on"
line "@"
TX_RAM wcd6d
text "!"
prompt
-_SurfingNoPlaceToGetOffText:: ; a686f (29:686f)
+_SurfingNoPlaceToGetOffText::
text "There's no place"
line "to get off!"
prompt
-_VitaminStatRoseText:: ; a688c (29:688c)
+_VitaminStatRoseText::
TX_RAM wcd6d
text "'s"
line "@"
@@ -3013,22 +2846,22 @@ _VitaminStatRoseText:: ; a688c (29:688c)
text " rose."
prompt
-_VitaminNoEffectText:: ; a689e (29:689e)
+_VitaminNoEffectText::
text "It won't have any"
line "effect."
prompt
-_ThrewBaitText:: ; a68b8 (29:68b8)
+_ThrewBaitText::
text $52, " threw"
line "some BAIT."
done
-_ThrewRockText:: ; a68cc (29:68cc)
+_ThrewRockText::
text $52, " threw a"
line "ROCK."
done
-_PlayedFluteNoEffectText:: ; a68dd (29:68dd)
+_PlayedFluteNoEffectText::
text "Played the #"
line "FLUTE."
@@ -3036,68 +2869,68 @@ _PlayedFluteNoEffectText:: ; a68dd (29:68dd)
line "catchy tune!"
prompt
-_FluteWokeUpText:: ; a690c (29:690c)
+_FluteWokeUpText::
text "All sleeping"
line "#MON woke up."
prompt
-_PlayedFluteHadEffectText:: ; a6928 (29:6928)
+_PlayedFluteHadEffectText::
text $52, " played the"
line "# FLUTE.@@"
-_CoinCaseNumCoinsText:: ; a6940 (29:6940)
+_CoinCaseNumCoinsText::
text "Coins"
line "@"
TX_BCD wPlayerCoins, $c2
text " "
prompt
-_ItemfinderFoundItemText:: ; a694f (29:694f)
+_ItemfinderFoundItemText::
text "Yes! ITEMFINDER"
line "indicates there's"
cont "an item nearby."
prompt
-_ItemfinderFoundNothingText:: ; a6981 (29:6981)
+_ItemfinderFoundNothingText::
text "Nope! ITEMFINDER"
line "isn't responding."
prompt
-_RaisePPWhichTechniqueText:: ; a69a4 (29:69a4)
+_RaisePPWhichTechniqueText::
text "Raise PP of which"
line "technique?"
done
-_RestorePPWhichTechniqueText:: ; a69c2 (29:69c2)
+_RestorePPWhichTechniqueText::
text "Restore PP of"
line "which technique?"
done
-_PPMaxedOutText:: ; a69e2 (29:69e2)
+_PPMaxedOutText::
TX_RAM wcf4b
text "'s PP"
line "is maxed out."
prompt
-_PPIncreasedText:: ; a69f9 (29:69f9)
+_PPIncreasedText::
TX_RAM wcf4b
text "'s PP"
line "increased."
prompt
-_PPRestoredText:: ; a6a0d (29:6a0d)
+_PPRestoredText::
text "PP was restored."
prompt
-_BootedUpTMText:: ; a6a1f (29:6a1f)
+_BootedUpTMText::
text "Booted up a TM!"
prompt
-_BootedUpHMText:: ; a6a30 (29:6a30)
+_BootedUpHMText::
text "Booted up an HM!"
prompt
-_TeachMachineMoveText:: ; a6a42 (29:6a42)
+_TeachMachineMoveText::
text "It contained"
line "@"
TX_RAM wcf4b
@@ -3109,7 +2942,7 @@ _TeachMachineMoveText:: ; a6a42 (29:6a42)
line "to a #MON?"
done
-_MonCannotLearnMachineMoveText:: ; a6a6e (29:6a6e)
+_MonCannotLearnMachineMoveText::
TX_RAM wcd6d
text " is not"
line "compatible with"
@@ -3123,44 +2956,44 @@ _MonCannotLearnMachineMoveText:: ; a6a6e (29:6a6e)
text "."
prompt
-_ItemUseNotTimeText:: ; a6aa6 (29:6aa6)
+_ItemUseNotTimeText::
text "OAK: ", $52, "!"
line "This isn't the"
cont "time to use that! "
prompt
-_ItemUseNotYoursToUseText:: ; a6ad0 (29:6ad0)
+_ItemUseNotYoursToUseText::
text "This isn't yours"
line "to use!"
prompt
-_ItemUseNoEffectText:: ; a6ae9 (29:6ae9)
+_ItemUseNoEffectText::
text "It won't have any"
line "effect."
prompt
-_ThrowBallAtTrainerMonText1:: ; a6b03 (29:6b03)
+_ThrowBallAtTrainerMonText1::
text "The trainer"
line "blocked the BALL!"
prompt
-_ThrowBallAtTrainerMonText2:: ; a6b22 (29:6b22)
+_ThrowBallAtTrainerMonText2::
text "Don't be a thief!"
prompt
-_NoCyclingAllowedHereText:: ; a6b34 (29:6b34)
+_NoCyclingAllowedHereText::
text "No cycling"
next "allowed here."
prompt
-_NoSurfingHereText:: ; a6b4e (29:6b4e)
+_NoSurfingHereText::
text "No SURFing on"
line "@"
TX_RAM wcd6d
text " here!"
prompt
-_BoxFullCannotThrowBallText:: ; a6b69 (29:6b69)
+_BoxFullCannotThrowBallText::
text "The #MON BOX"
line "is full! Can't"
cont "use that item!"
@@ -3169,51 +3002,51 @@ _BoxFullCannotThrowBallText:: ; a6b69 (29:6b69)
SECTION "Text 11", ROMX, BANK[TEXT_11]
-_ItemUseText001:: ; a8000 (2a:4000)
+_ItemUseText001::
text $52," used@@"
-_ItemUseText002:: ; a8009 (2a:4009)
+_ItemUseText002::
TX_RAM wcf4b
text "!"
done
-_GotOnBicycleText1:: ; a800f (2a:400f)
+_GotOnBicycleText1::
text $52, " got on the@@"
-_GotOnBicycleText2:: ; a801e (2a:401e)
+_GotOnBicycleText2::
TX_RAM wcf4b
text "!"
prompt
-_GotOffBicycleText1:: ; a8024 (2a:4024)
+_GotOffBicycleText1::
text $52, " got off@@"
-_GotOffBicycleText2:: ; a8030 (2a:4030)
+_GotOffBicycleText2::
text "the @"
TX_RAM wcf4b
text "."
prompt
-_ThrewAwayItemText:: ; a803c (2a:403c)
+_ThrewAwayItemText::
text "Threw away"
line "@"
TX_RAM wcd6d
text "."
prompt
-_IsItOKToTossItemText:: ; a804f (2a:404f)
+_IsItOKToTossItemText::
text "Is it OK to toss"
line "@"
TX_RAM wcf4b
text "?"
prompt
-_TooImportantToTossText:: ; a8068 (2a:4068)
+_TooImportantToTossText::
text "That's too impor-"
line "tant to toss!"
prompt
-_AlreadyKnowsText:: ; a8088 (2a:4088)
+_AlreadyKnowsText::
TX_RAM wcd6d
text " knows"
line "@"
@@ -3221,12 +3054,12 @@ _AlreadyKnowsText:: ; a8088 (2a:4088)
text "!"
prompt
-_ConnectCableText:: ; a809a (2a:409a)
+_ConnectCableText::
text "Okay, connect the"
line "cable like so!"
prompt
-_TradedForText:: ; a80bc (2a:40bc)
+_TradedForText::
text $52, " traded"
line "@"
TX_RAM wInGameTradeGiveMonName
@@ -3235,7 +3068,7 @@ _TradedForText:: ; a80bc (2a:40bc)
TX_RAM wInGameTradeReceiveMonName
text "!@@"
-_WannaTrade1Text:: ; a80d8 (2a:40d8)
+_WannaTrade1Text::
text "I'm looking for"
line "@"
TX_RAM wInGameTradeGiveMonName
@@ -3247,12 +3080,12 @@ _WannaTrade1Text:: ; a80d8 (2a:40d8)
text "? "
done
-_NoTrade1Text:: ; a810b (2a:410b)
+_NoTrade1Text::
text "Awww!"
line "Oh well..."
done
-_WrongMon1Text:: ; a811d (2a:411d)
+_WrongMon1Text::
text "What? That's not"
line "@"
TX_RAM wInGameTradeGiveMonName
@@ -3262,18 +3095,18 @@ _WrongMon1Text:: ; a811d (2a:411d)
line "come back here!"
done
-_Thanks1Text:: ; a8155 (2a:4155)
+_Thanks1Text::
text "Hey thanks!"
done
-_AfterTrade1Text:: ; a8162 (2a:4162)
+_AfterTrade1Text::
text "Isn't my old"
line "@"
TX_RAM wInGameTradeReceiveMonName
text " great?"
done
-_WannaTrade2Text:: ; a817c (2a:417c)
+_WannaTrade2Text::
text "Hello there! Do"
line "you want to trade"
@@ -3285,12 +3118,12 @@ _WannaTrade2Text:: ; a817c (2a:417c)
text "?"
done
-_NoTrade2Text:: ; a81b5 (2a:41b5)
+_NoTrade2Text::
text "Well, if you"
line "don't want to..."
done
-_WrongMon2Text:: ; a81d3 (2a:41d3)
+_WrongMon2Text::
text "Hmmm? This isn't"
line "@"
TX_RAM wInGameTradeGiveMonName
@@ -3300,28 +3133,20 @@ _WrongMon2Text:: ; a81d3 (2a:41d3)
line "you get one."
done
-_Thanks2Text:: ; a8209 (2a:4209)
+_Thanks2Text::
text "Thanks!"
done
-_AfterTrade2Text:: ; a8212 (2a:4212)
-IF DEF(_YELLOW)
- text "Hello there! Your"
- line "old @"
- TX_RAM wcd13
- db " is"
- cont "magnificent!"
-ELSE
+_AfterTrade2Text::
text "The @"
TX_RAM wInGameTradeGiveMonName
text " you"
line "traded to me"
para "went and evolved!"
-ENDC
done
-_WannaTrade3Text:: ; a8240 (2a:4240)
+_WannaTrade3Text::
text "Hi! Do you have"
line "@"
TX_RAM wInGameTradeGiveMonName
@@ -3333,11 +3158,11 @@ _WannaTrade3Text:: ; a8240 (2a:4240)
text "?"
done
-_NoTrade3Text:: ; a8274 (2a:4274)
+_NoTrade3Text::
text "That's too bad."
done
-_WrongMon3Text:: ; a8284 (2a:4284)
+_WrongMon3Text::
text "...This is no"
line "@"
TX_RAM wInGameTradeGiveMonName
@@ -3347,15 +3172,11 @@ _WrongMon3Text:: ; a8284 (2a:4284)
line "trade it with me!"
done
-_Thanks3Text:: ; a82bc (2a:42bc)
-IF DEF(_YELLOW)
- text "Thanks, pal!"
-ELSE
+_Thanks3Text::
text "Thanks pal!"
-ENDC
done
-_AfterTrade3Text:: ; a82c9 (2a:42c9)
+_AfterTrade3Text::
text "How is my old"
line "@"
TX_RAM wInGameTradeReceiveMonName
@@ -3367,12 +3188,12 @@ _AfterTrade3Text:: ; a82c9 (2a:42c9)
line "doing great!"
done
-_NothingToCutText:: ; a82f8 (2a:42f8)
+_NothingToCutText::
text "There isn't"
line "anything to CUT!"
prompt
-_UsedCutText:: ; a8315 (2a:4315)
+_UsedCutText::
TX_RAM wcd6d
text " hacked"
line "away with CUT!"
@@ -3387,4 +3208,3 @@ INCLUDE "text/pokedex.asm"
SECTION "Move Names", ROMX, BANK[MOVE_NAMES]
INCLUDE "text/move_names.asm"
-
diff --git a/text/maps/agatha.asm b/text/maps/agatha.asm
index e78aeeab..158dbb63 100644
--- a/text/maps/agatha.asm
+++ b/text/maps/agatha.asm
@@ -1,4 +1,4 @@
-_AgathaBeforeBattleText:: ; 8686b (21:686b)
+_AgathaBeforeBattleText::
text "I am AGATHA of"
line "the ELITE FOUR!"
@@ -22,17 +22,13 @@ _AgathaBeforeBattleText:: ; 8686b (21:686b)
cont "trainer fights!"
done
-_AgathaEndBattleText:: ; 86970 (21:6970)
-IF DEF(_YELLOW)
- text "Woo-hoo!"
-ELSE
+_AgathaEndBattleText::
text "Oh ho!"
-ENDC
line "You're something"
cont "special, child!"
prompt
-_AgathaAfterBattleText:: ; 86998 (21:6998)
+_AgathaAfterBattleText::
text "You win! I see"
line "what the old duff"
cont "sees in you now!"
@@ -42,7 +38,7 @@ _AgathaAfterBattleText:: ; 86998 (21:6998)
cont "along now, child!"
done
-_AgathaDontRunAwayText:: ; 869fd (21:69fd)
+_AgathaDontRunAwayText::
text "Someone's voice:"
line "Don't run away!"
done
diff --git a/text/maps/bike_shop.asm b/text/maps/bike_shop.asm
index 5f2c3f45..3247e0e3 100644
--- a/text/maps/bike_shop.asm
+++ b/text/maps/bike_shop.asm
@@ -1,4 +1,4 @@
-_BikeShopText_1d810:: ; 98e03 (26:4e03)
+_BikeShopText_1d810::
text "Hi! Welcome to"
line "our BIKE SHOP."
@@ -6,17 +6,17 @@ _BikeShopText_1d810:: ; 98e03 (26:4e03)
line "the BIKE for you!"
prompt
-_BikeShopText_1d815:: ; 98e45 (26:4e45)
+_BikeShopText_1d815::
text "It's a cool BIKE!"
line "Do you want it?"
done
-_BikeShopText_1d81a:: ; 98e67 (26:4e67)
+_BikeShopCantAffordText::
text "Sorry! You can't"
line "afford it!"
prompt
-_BikeShopText_1d81f:: ; 98e83 (26:4e83)
+_BikeShopText_1d81f::
text "Oh, that's..."
para "A BIKE VOUCHER!"
@@ -24,17 +24,17 @@ _BikeShopText_1d81f:: ; 98e83 (26:4e83)
para "OK! Here you go!"
prompt
-_BikeShopText_1d824:: ; 98eb2 (26:4eb2)
+_BikeShopText_1d824::
text $52, " exchanged"
line "the BIKE VOUCHER"
cont "for a BICYCLE.@@"
-_BikeShopText_1d82a:: ; 98ee0 (26:4ee0)
+_BikeShopComeAgainText::
text "Come back again"
line "some time!"
done
-_BikeShopText_1d82f:: ; 98efc (26:4efc)
+_BikeShopText_1d82f::
text "How do you like"
line "your new BICYCLE?"
@@ -43,12 +43,12 @@ _BikeShopText_1d82f:: ; 98efc (26:4efc)
cont "and in caves!"
done
-_BikeShopText_1d834:: ; 98f4d (26:4f4d)
+_BikeShopText_1d834::
text "You better make"
line "room for this!"
done
-_BikeShopText_1d843:: ; 98f6d (26:4f6d)
+_BikeShopText_1d843::
text "A plain city BIKE"
line "is good enough"
cont "for me!"
@@ -58,13 +58,13 @@ _BikeShopText_1d843:: ; 98f6d (26:4f6d)
cont "on an MTB!"
done
-_BikeShopText_1d85c:: ; 98fc1 (26:4fc1)
+_BikeShopText_1d85c::
text "These BIKEs are"
line "cool, but they're"
cont "way expensive!"
done
-_BikeShopText_1d861:: ; 98ff2 (26:4ff2)
+_BikeShopText_1d861::
text "Wow. Your BIKE is"
line "really cool!"
done
diff --git a/text/maps/bills_house.asm b/text/maps/bills_house.asm
index 3ec1e3f3..83f92a64 100644
--- a/text/maps/bills_house.asm
+++ b/text/maps/bills_house.asm
@@ -1,11 +1,4 @@
-IF DEF(_YELLOW)
-_BillsHouseDontLeaveText::
- text "Whoa, don't go"
- line "anywhere, wait!"
- done
-ENDC
-
-_BillsHouseText_1e865:: ; 8d267 (23:5267)
+_BillsHouseText_1e865::
text "Hiya! I'm a"
line "#MON..."
cont "...No I'm not!"
@@ -26,7 +19,7 @@ _BillsHouseText_1e865:: ; 8d267 (23:5267)
line "Help me out here!"
done
-_BillsHouseText_1e86a:: ; 8d345 (23:5345)
+_BillsHouseText_1e86a::
text "When I'm in the"
line "TELEPORTER, go to"
cont "my PC and run the"
@@ -34,7 +27,7 @@ _BillsHouseText_1e86a:: ; 8d345 (23:5345)
cont "System!"
done
-_BillsHouseText_1e86f:: ; 8d391 (23:5391)
+_BillsHouseText_1e86f::
text "No!? Come on, you"
line "gotta help a guy"
cont "in deep trouble!"
@@ -44,7 +37,7 @@ _BillsHouseText_1e86f:: ; 8d391 (23:5391)
cont "OK? All right!"
prompt
-_BillThankYouText:: ; 8d3f5 (23:53f5)
+_BillThankYouText::
text "BILL: Yeehah!"
line "Thanks, bud! I"
cont "owe you one!"
@@ -60,18 +53,18 @@ _BillThankYouText:: ; 8d3f5 (23:53f5)
cont "maybe this'll do."
prompt
-_SSTicketReceivedText:: ; 8d499 (23:5499)
+_SSTicketReceivedText::
text $52, " received"
line "an @"
TX_RAM wcf4b
text "!@@"
-_SSTicketNoRoomText:: ; 8d4b0 (23:54b0)
+_SSTicketNoRoomText::
text "You've got too"
line "much stuff, bud!"
done
-_BillsHouseText_1e8cb:: ; 8d4d0 (23:54d0)
+_BillsHouseText_1e8cb::
text "That cruise ship,"
line "S.S.ANNE, is in"
cont "VERMILION CITY."
@@ -86,7 +79,7 @@ _BillsHouseText_1e8cb:: ; 8d4d0 (23:54d0)
cont "instead of me?"
done
-_BillsHouseText_1e8da:: ; 8d57f (23:557f)
+_BillsHouseText_1e8da::
text "BILL: Look, bud,"
line "just check out"
cont "some of my rare"
diff --git a/text/maps/blues_house.asm b/text/maps/blues_house.asm
index a5b155f2..147b23fb 100644
--- a/text/maps/blues_house.asm
+++ b/text/maps/blues_house.asm
@@ -29,19 +29,11 @@ _DaisyUseMapText::
done
_BluesHouseText2::
-IF DEF(_YELLOW)
- text "Spending time"
- line "with your #MON"
- cont "makes them more"
- cont "friendly to you."
- done
-ELSE
text "#MON are living"
line "things! If they"
cont "get tired, give"
cont "them a rest!"
done
-ENDC
_BluesHouseText3::
text "It's a big map!"
diff --git a/text/maps/bruno.asm b/text/maps/bruno.asm
index 70421db2..ddcbdb59 100644
--- a/text/maps/bruno.asm
+++ b/text/maps/bruno.asm
@@ -1,4 +1,4 @@
-_BrunoBeforeBattleText:: ; 86749 (21:6749)
+_BrunoBeforeBattleText::
text "I am BRUNO of"
line "the ELITE FOUR!"
@@ -20,18 +20,18 @@ _BrunoBeforeBattleText:: ; 86749 (21:6749)
para "Hoo hah!"
done
-_BrunoEndBattleText:: ; 86805 (21:6805)
+_BrunoEndBattleText::
text "Why?"
line "How could I lose?"
prompt
-_BrunoAfterBattleText:: ; 8681d (21:681d)
+_BrunoAfterBattleText::
text "My job is done!"
line "Go face your next"
cont "challenge!"
done
-_BrunoDontRunAwayText:: ; 8684b (21:684b)
+_BrunoDontRunAwayText::
text "Someone's voice:"
line "Don't run away!"
done
diff --git a/text/maps/celadon_city.asm b/text/maps/celadon_city.asm
index 6a02d125..ab78e9d6 100644
--- a/text/maps/celadon_city.asm
+++ b/text/maps/celadon_city.asm
@@ -1,33 +1,25 @@
-_CeladonCityText1:: ; a59fb (29:59fb)
+_CeladonCityText1::
text "I got my KOFFING"
-IF DEF(_YELLOW)
- line "from my friend!"
-
- para "We get along now,"
- line "because I was"
- cont "very nice to it!"
-ELSE
line "in CINNABAR!"
para "It's nice, but it"
line "breathes poison"
cont "when it's angry!"
-ENDC
done
-_CeladonCityText2:: ; a5a4b (29:5a4b)
+_CeladonCityText2::
text "Heheh! This GYM"
line "is great! It's"
cont "full of women!"
done
-_CeladonCityText3:: ; a5a79 (29:5a79)
+_CeladonCityText3::
text "The GAME CORNER"
line "is bad for our"
cont "city's image!"
done
-_CeladonCityText4:: ; a5aa6 (29:5aa6)
+_CeladonCityText4::
text "Moan! I blew it"
line "all at the slots!"
@@ -36,7 +28,7 @@ _CeladonCityText4:: ; a5aa6 (29:5aa6)
cont "coins for prizes!"
done
-_TM41PreText:: ; a5afd (29:5afd)
+_TM41PreText::
text "Hello, there!"
para "I've seen you,"
@@ -47,13 +39,13 @@ _TM41PreText:: ; a5afd (29:5afd)
line "dropping by!"
prompt
-_ReceivedTM41Text:: ; a5b5a (29:5b5a)
+_ReceivedTM41Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM41ExplanationText:: ; a5b6e (29:5b6e)
+_TM41ExplanationText::
text "TM41 teaches"
line "SOFTBOILED!"
@@ -64,12 +56,12 @@ _TM41ExplanationText:: ; a5b6e (29:5b6e)
line "CHANSEY!"
done
-_TM41NoRoomText:: ; a5bb8 (29:5bb8)
+_TM41NoRoomText::
text "Oh, your pack is"
line "full of items!"
done
-_CeladonCityText6:: ; a5bd9 (29:5bd9)
+_CeladonCityText6::
text "This is my trusted"
line "pal, POLIWRATH!"
@@ -78,21 +70,21 @@ _CeladonCityText6:: ; a5bd9 (29:5bd9)
cont "used WATER STONE!"
done
-_CeladonCityText7:: ; a5c30 (29:5c30)
+_CeladonCityText7::
text "POLIWRATH: Ribi"
line "ribit!@@"
-_CeladonCityText8:: ; a5c49 (29:5c49)
+_CeladonCityText8::
text "What are you"
line "staring at?"
done
-_CeladonCityText9:: ; a5c63 (29:5c63)
+_CeladonCityText9::
text "Keep out of TEAM"
line "ROCKET's way!"
done
-_CeladonCityText10:: ; a5c82 (29:5c82)
+_CeladonCityText10::
text "TRAINER TIPS"
para "X ACCURACY boosts"
@@ -108,36 +100,32 @@ _CeladonCityText10:: ; a5c82 (29:5c82)
cont "STORE!"
done
-_CeladonCityText11:: ; a5d18 (29:5d18)
+_CeladonCityText11::
text "CELADON CITY"
line "The City of"
cont "Rainbow Dreams"
done
-_CeladonCityText13:: ; a5d41 (29:5d41)
+_CeladonCityText13::
text "CELADON CITY"
line "#MON GYM"
cont "LEADER: ERIKA"
-IF DEF(_YELLOW)
- para "The Nature-Loving"
-ELSE
para "The Nature Loving"
-ENDC
line "Princess!"
done
-_CeladonCityText14:: ; a5d82 (29:5d82)
+_CeladonCityText14::
text "CELADON MANSION"
done
-_CeladonCityText15:: ; a5d93 (29:5d93)
+_CeladonCityText15::
text "Find what you"
line "need at CELADON"
cont "DEPT. STORE!"
done
-_CeladonCityText16:: ; a5dbf (29:5dbf)
+_CeladonCityText16::
text "TRAINER TIPS"
para "GUARD SPEC."
@@ -151,19 +139,15 @@ _CeladonCityText16:: ; a5dbf (29:5dbf)
cont "STORE!"
done
-_CeladonCityText17:: ; a5e3e (29:5e3e)
+_CeladonCityText17::
text "Coins exchanged"
line "for prizes!"
cont "PRIZE EXCHANGE"
done
-_CeladonCityText18:: ; a5e6a (29:5e6a)
+_CeladonCityText18::
text "ROCKET GAME CORNER"
line "The playground"
-IF DEF(_YELLOW)
- cont "for grownups!"
-ELSE
cont "for grown-ups!"
-ENDC
done
diff --git a/text/maps/celadon_dept_store_1f.asm b/text/maps/celadon_dept_store_1f.asm
index 7751343b..cf343206 100644
--- a/text/maps/celadon_dept_store_1f.asm
+++ b/text/maps/celadon_dept_store_1f.asm
@@ -1,4 +1,4 @@
-_CeladonMart1Text1:: ; 9c672 (27:4672)
+_CeladonMart1Text1::
text "Hello! Welcome to"
line "CELADON DEPT."
cont "STORE."
@@ -8,7 +8,7 @@ _CeladonMart1Text1:: ; 9c672 (27:4672)
cont "the store layout."
done
-_CeladonMart1Text2:: ; 9c6cd (27:46cd)
+_CeladonMart1Text2::
text "1F: SERVICE"
line " COUNTER"
@@ -25,7 +25,7 @@ _CeladonMart1Text2:: ; 9c6cd (27:46cd)
line "VENDING MACHINES"
done
-_CeladonMart1Text3:: ; 9c752 (27:4752)
+_CeladonMart1Text3::
text "1F: SERVICE"
line " COUNTER"
done
diff --git a/text/maps/celadon_dept_store_2f.asm b/text/maps/celadon_dept_store_2f.asm
index 88fe9ff8..b1345a05 100644
--- a/text/maps/celadon_dept_store_2f.asm
+++ b/text/maps/celadon_dept_store_2f.asm
@@ -1,4 +1,4 @@
-_CeladonMart2Text3:: ; 9c76b (27:476b)
+_CeladonMart2Text3::
text "SUPER REPEL keeps"
line "weak #MON at"
cont "bay..."
@@ -7,13 +7,13 @@ _CeladonMart2Text3:: ; 9c76b (27:476b)
line "powerful REPEL!"
done
-_CeladonMart2Text4:: ; 9c7b2 (27:47b2)
+_CeladonMart2Text4::
text "For long outings,"
line "you should buy"
cont "REVIVE."
done
-_CeladonMart2Text5:: ; 9c7dc (27:47dc)
+_CeladonMart2Text5::
text "Top Grade Items"
line "for Trainers!"
diff --git a/text/maps/celadon_dept_store_3f.asm b/text/maps/celadon_dept_store_3f.asm
index 289ed1d4..d98b4998 100644
--- a/text/maps/celadon_dept_store_3f.asm
+++ b/text/maps/celadon_dept_store_3f.asm
@@ -1,4 +1,4 @@
-_TM18PreReceiveText:: ; 9c814 (27:4814)
+_TM18PreReceiveText::
text "Oh, hi! I finally"
line "finished #MON!"
@@ -7,25 +7,25 @@ _TM18PreReceiveText:: ; 9c814 (27:4814)
cont "useful!"
prompt
-_ReceivedTM18Text:: ; 9c85a (27:485a)
+_ReceivedTM18Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM18ExplanationText:: ; 9c86e (27:486e)
+_TM18ExplanationText::
text "TM18 is COUNTER!"
line "Not like the one"
cont "I'm leaning on,"
cont "mind you!"
done
-_TM18NoRoomText:: ; 9c8aa (27:48aa)
+_TM18NoRoomText::
text "Your pack is full"
line "of items!"
done
-_CeladonMart3Text2:: ; 9c8c7 (27:48c7)
+_CeladonMart3Text2::
text "Captured #MON"
line "are registered"
cont "with an ID No."
@@ -35,7 +35,7 @@ _CeladonMart3Text2:: ; 9c8c7 (27:48c7)
cont "caught it!"
done
-_CeladonMart3Text3:: ; 9c92d (27:492d)
+_CeladonMart3Text3::
text "All right!"
para "My buddy's going"
@@ -44,7 +44,7 @@ _CeladonMart3Text3:: ; 9c92d (27:492d)
cont "GRAVELER!"
done
-_CeladonMart3Text4:: ; 9c975 (27:4975)
+_CeladonMart3Text4::
text "Come on GRAVELER!"
para "I love GRAVELER!"
@@ -57,42 +57,42 @@ _CeladonMart3Text4:: ; 9c975 (27:4975)
cont "#MON!"
done
-_CeladonMart3Text5:: ; 9c9d5 (27:49d5)
+_CeladonMart3Text5::
text "You can identify"
line "#MON you got"
cont "in trades by"
cont "their ID Numbers!"
done
-_CeladonMart3Text6:: ; 9ca13 (27:4a13)
+_CeladonMart3Text6::
text "It's an SNES!"
done
-_CeladonMart3Text7:: ; 9ca21 (27:4a21)
+_CeladonMart3Text7::
text "An RPG! There's"
line "no time for that!"
done
-_CeladonMart3Text9:: ; 9ca43 (27:4a43)
+_CeladonMart3Text9::
text "A sports game!"
line "Dad'll like that!"
done
-_CeladonMart3Text11:: ; 9ca64 (27:4a64)
+_CeladonMart3Text11::
text "A puzzle game!"
line "Looks addictive!"
done
-_CeladonMart3Text13:: ; 9ca85 (27:4a85)
+_CeladonMart3Text13::
text "A fighting game!"
line "Looks tough!"
done
-_CeladonMart3Text14:: ; 9caa4 (27:4aa4)
+_CeladonMart3Text14::
text "3F: TV GAME SHOP"
done
-_CeladonMart3Text15:: ; 9cab6 (27:4ab6)
+_CeladonMart3Text15::
text "Red and Blue!"
line "Both are #MON!"
done
diff --git a/text/maps/celadon_dept_store_4f.asm b/text/maps/celadon_dept_store_4f.asm
index de33021b..2fca6106 100644
--- a/text/maps/celadon_dept_store_4f.asm
+++ b/text/maps/celadon_dept_store_4f.asm
@@ -1,19 +1,10 @@
-_CeladonMart4Text2:: ; 9cad4 (27:4ad4)
+_CeladonMart4Text2::
text "I'm getting a"
-IF DEF(_YELLOW)
- line "gift for COPYCAT"
- cont "in CERULEAN CITY."
-
- para "It's got to be a"
- line "# DOLL. They"
- cont "are trendy!"
-ELSE
line "# DOLL for my"
cont "girl friend!"
-ENDC
done
-_CeladonMart4Text3:: ; 9cafd (27:4afd)
+_CeladonMart4Text3::
text "I heard something"
line "useful."
@@ -23,7 +14,7 @@ _CeladonMart4Text3:: ; 9cafd (27:4afd)
cont "with a # DOLL!"
done
-_CeladonMart4Text4:: ; 9cb56 (27:4b56)
+_CeladonMart4Text4::
text "Express yourself"
line "with gifts!"
diff --git a/text/maps/celadon_dept_store_5f.asm b/text/maps/celadon_dept_store_5f.asm
index 630a56a5..a2bb97f6 100644
--- a/text/maps/celadon_dept_store_5f.asm
+++ b/text/maps/celadon_dept_store_5f.asm
@@ -1,4 +1,4 @@
-_CeladonMart5Text1:: ; 9ddff (27:5dff)
+_CeladonMart5Text1::
text "#MON ability"
line "enhancers can be"
cont "bought only here."
@@ -11,7 +11,7 @@ _CeladonMart5Text1:: ; 9ddff (27:5dff)
line "increase SPEED."
done
-_CeladonMart5Text2:: ; 9de79 (27:5e79)
+_CeladonMart5Text2::
text "I'm here for"
line "#MON ability"
cont "enhancers."
@@ -23,7 +23,7 @@ _CeladonMart5Text2:: ; 9de79 (27:5e79)
line "DEFENSE!"
done
-_CeladonMart5Text5:: ; 9ded6 (27:5ed6)
+_CeladonMart5Text5::
text "5F: DRUG STORE"
done
diff --git a/text/maps/celadon_dept_store_roof.asm b/text/maps/celadon_dept_store_roof.asm
index f2eef613..5099509f 100644
--- a/text/maps/celadon_dept_store_roof.asm
+++ b/text/maps/celadon_dept_store_roof.asm
@@ -1,9 +1,9 @@
-_CeladonMartRoofText_484ee:: ; 9cbb5 (27:4bb5)
+_CeladonMartRoofText_484ee::
text "Give her which"
line "drink?"
done
-_CeladonMartRoofText_484f3:: ; 9cbcc (27:4bcc)
+_CeladonMartRoofText_484f3::
text "Yay!"
para "FRESH WATER!"
@@ -13,13 +13,13 @@ _CeladonMartRoofText_484f3:: ; 9cbcc (27:4bcc)
para "You can have this"
line "from me!@@"
-_CeladonMartRoofText_484f9:: ; 9cc06 (27:4c06)
+_CeladonMartRoofText_484f9::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_CeladonMartRoofText_484fe:: ; 9cc1a (27:4c1a)
+_CeladonMartRoofText_484fe::
db $0
para "@"
TX_RAM wcf4b
@@ -29,7 +29,7 @@ _CeladonMartRoofText_484fe:: ; 9cc1a (27:4c1a)
para "It can freeze the"
line "target sometimes!@@"
-_CeladonMartRoofText_48504:: ; 9cc5a (27:4c5a)
+_CeladonMartRoofText_48504::
text "Yay!"
para "SODA POP!"
@@ -39,27 +39,23 @@ _CeladonMartRoofText_48504:: ; 9cc5a (27:4c5a)
para "You can have this"
line "from me!@@"
-_CeladonMartRoofText_4850a:: ; 9cc91 (27:4c91)
+_CeladonMartRoofText_4850a::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_CeladonMartRoofText_4850f:: ; 9cca5 (27:4ca5)
+_CeladonMartRoofText_4850f::
db $0
para "@"
TX_RAM wcf4b
text " contains"
-IF DEF(_YELLOW)
- line "ROCK SLIDE!@@"
-ELSE
line "ROCK SLIDE!"
para "It can spook the"
line "target sometimes!@@"
-ENDC
-_CeladonMartRoofText_48515:: ; 9cce6 (27:4ce6)
+_CeladonMartRoofText_48515::
text "Yay!"
para "LEMONADE!"
@@ -69,25 +65,25 @@ _CeladonMartRoofText_48515:: ; 9cce6 (27:4ce6)
para "You can have this"
line "from me!@@"
-_ReceivedTM49Text:: ; 9cd1d (27:4d1d)
+_ReceivedTM49Text::
text $52, " received"
line "TM49!@@"
-_CeladonMartRoofText_48520:: ; 9cd30 (27:4d30)
+_CeladonMartRoofText_48520::
db $0
para "TM49 contains"
line "TRI ATTACK!@@"
-_CeladonMartRoofText_48526:: ; 9cd4d (27:4d4d)
+_CeladonMartRoofText_48526::
text "You don't have"
line "space for this!@@"
-_CeladonMartRoofText_4852c:: ; 9cd6d (27:4d6d)
+_CeladonMartRoofText_4852c::
text "No thank you!"
line "I'm not thirsty"
cont "after all!@@"
-_CeladonMartRoofText1:: ; 9cd97 (27:4d97)
+_CeladonMartRoofText1::
text "My sister is a"
line "trainer, believe"
cont "it or not."
@@ -97,13 +93,13 @@ _CeladonMartRoofText1:: ; 9cd97 (27:4d97)
cont "drives me nuts!"
done
-_CeladonMartRoofText_48598:: ; 9cdee (27:4dee)
+_CeladonMartRoofText_48598::
text "I'm thirsty!"
line "I want something"
cont "to drink!"
done
-_CeladonMartRoofText4:: ; 9ce16 (27:4e16)
+_CeladonMartRoofText4::
text "I'm thirsty!"
line "I want something"
cont "to drink!"
@@ -111,33 +107,33 @@ _CeladonMartRoofText4:: ; 9ce16 (27:4e16)
para "Give her a drink?"
done
-_CeladonMartRoofText6:: ; 9ce50 (27:4e50)
+_CeladonMartRoofText6::
text "ROOFTOP SQUARE:"
line "VENDING MACHINES"
done
-_VendingMachineText1:: ; 9ce72 (27:4e72)
+_VendingMachineText1::
text "A vending machine!"
line "Here's the menu!"
prompt
-_VendingMachineText4:: ; 9ce96 (27:4e96)
+_VendingMachineText4::
text "Oops, not enough"
line "money!"
done
-_VendingMachineText5:: ; 9ceaf (27:4eaf)
+_VendingMachineText5::
TX_RAM wcf4b
db $0
line "popped out!"
done
-_VendingMachineText6:: ; 9cec0 (27:4ec0)
+_VendingMachineText6::
text "There's no more"
line "room for stuff!"
done
-_VendingMachineText7:: ; 9cee0 (27:4ee0)
+_VendingMachineText7::
text "Not thirsty!"
done
diff --git a/text/maps/celadon_diner.asm b/text/maps/celadon_diner.asm
index 2b4cc321..7f69e67f 100644
--- a/text/maps/celadon_diner.asm
+++ b/text/maps/celadon_diner.asm
@@ -1,24 +1,24 @@
-_CeladonDinerText1:: ; 9df3f (27:5f3f)
+_CeladonDinerText1::
text "Hi!"
para "We're taking a"
line "break now."
done
-_CeladonDinerText2:: ; 9df5d (27:5f5d)
+_CeladonDinerText2::
text "My #MON are"
line "weak, so I often"
cont "have to go to the"
cont "DRUG STORE."
done
-_CeladonDinerText3:: ; 9df99 (27:5f99)
+_CeladonDinerText3::
text "Psst! There's a"
line "basement under"
cont "the GAME CORNER."
done
-_CeladonDinerText4:: ; 9dfc9 (27:5fc9)
+_CeladonDinerText4::
text "Munch..."
para "The man at that"
@@ -26,7 +26,7 @@ _CeladonDinerText4:: ; 9dfc9 (27:5fc9)
cont "at the slots."
done
-_CeladonDinerText_491a7:: ; 9e003 (27:6003)
+_CeladonDinerText_491a7::
text "Go ahead! Laugh!"
para "I'm flat out"
@@ -41,18 +41,18 @@ _CeladonDinerText_491a7:: ; 9e003 (27:6003)
cont "more!"
prompt
-_ReceivedCoinCaseText:: ; 9e07a (27:607a)
+_ReceivedCoinCaseText::
text $52, " received"
line "a @"
TX_RAM wcf4b
text "!@@"
-_CoinCaseNoRoomText:: ; 9e090 (27:6090)
+_CoinCaseNoRoomText::
text "Make room for"
line "this!"
done
-_CeladonDinerText_491b7:: ; 9e0a5 (27:60a5)
+_CeladonDinerText_491b7::
text "I always thought"
line "I was going to"
cont "win it back..."
diff --git a/text/maps/celadon_game_corner.asm b/text/maps/celadon_game_corner.asm
index c08a81b1..b74b04b3 100644
--- a/text/maps/celadon_game_corner.asm
+++ b/text/maps/celadon_game_corner.asm
@@ -1,4 +1,4 @@
-_CeladonGameCornerText1:: ; 9d8d5 (27:58d5)
+_CeladonGameCornerText1::
text "Welcome!"
para "You can exchange"
@@ -7,7 +7,7 @@ _CeladonGameCornerText1:: ; 9d8d5 (27:58d5)
cont "next door."
done
-_CeladonGameCornerText_48d22:: ; 9d91a (27:591a)
+_CeladonGameCornerText_48d22::
text "Welcome to ROCKET"
line "GAME CORNER!"
@@ -19,32 +19,32 @@ _CeladonGameCornerText_48d22:: ; 9d91a (27:591a)
cont "like some?"
done
-_CeladonGameCornerText_48d27:: ; 9d984 (27:5984)
+_CeladonGameCornerText_48d27::
text "Thanks! Here are"
line "your 50 coins!"
done
-_CeladonGameCornerText_48d2c:: ; 9d9a5 (27:59a5)
+_CeladonGameCornerText_48d2c::
text "No? Please come"
line "play sometime!"
done
-_CeladonGameCornerText_48d31:: ; 9d9c5 (27:59c5)
+_CeladonGameCornerText_48d31::
text "You can't afford"
line "the coins!"
done
-_CeladonGameCornerText_48d36:: ; 9d9e1 (27:59e1)
+_CeladonGameCornerText_48d36::
text "Oops! Your COIN"
line "CASE is full."
done
-_CeladonGameCornerText_48d3b:: ; 9da00 (27:5a00)
+_CeladonGameCornerText_48d3b::
text "You don't have a"
line "COIN CASE!"
done
-_CeladonGameCornerText3:: ; 9da1c (27:5a1c)
+_CeladonGameCornerText3::
text "Keep this quiet."
para "It's rumored that"
@@ -52,37 +52,37 @@ _CeladonGameCornerText3:: ; 9da1c (27:5a1c)
cont "by TEAM ROCKET."
done
-_CeladonGameCornerText4:: ; 9da61 (27:5a61)
+_CeladonGameCornerText4::
text "I think these"
line "machines have"
cont "different odds."
done
-_CeladonGameCornerText_48d9c:: ; 9da8e (27:5a8e)
+_CeladonGameCornerText_48d9c::
text "Kid, do you want"
line "to play?"
prompt
-_Received10CoinsText:: ; 9daa9 (27:5aa9)
+_Received10CoinsText::
text $52, " received"
line "10 coins!@@"
-_CeladonGameCornerText_48da7:: ; 9dac0 (27:5ac0)
+_CeladonGameCornerText_48da7::
text "You don't need my"
line "coins!"
done
-_CeladonGameCornerText_48dac:: ; 9dad9 (27:5ad9)
+_CeladonGameCornerText_48dac::
text "Wins seem to come"
line "and go."
done
-_CeladonGameCornerText6:: ; 9daf4 (27:5af4)
+_CeladonGameCornerText6::
text "I'm having a"
line "wonderful time!"
done
-_CeladonGameCornerText_48dca:: ; 9db11 (27:5b11)
+_CeladonGameCornerText_48dca::
text "Hey!"
para "You have better"
@@ -99,7 +99,7 @@ _CeladonGameCornerText_48dca:: ; 9db11 (27:5b11)
cont "be fooled!"
done
-_CeladonGameCornerText_48dcf:: ; 9dbac (27:5bac)
+_CeladonGameCornerText_48dcf::
text "They offer rare"
line "#MON that can"
cont "be exchanged for"
@@ -109,78 +109,78 @@ _CeladonGameCornerText_48dcf:: ; 9dbac (27:5bac)
line "seem to win!"
done
-_CeladonGameCornerText8:: ; 9dc06 (27:5c06)
+_CeladonGameCornerText8::
text "Games are scary!"
line "It's so easy to"
cont "get hooked!"
done
-_CeladonGameCornerText_48e26:: ; 9dc33 (27:5c33)
+_CeladonGameCornerText_48e26::
text "What's up? Want"
line "some coins?"
prompt
-_Received20CoinsText:: ; 9dc4f (27:5c4f)
+_Received20CoinsText::
text $52, " received"
line "20 coins!@@"
-_CeladonGameCornerText_48e31:: ; 9dc66 (27:5c66)
+_CeladonGameCornerText_48e31::
text "You have lots of"
line "coins!"
done
-_CeladonGameCornerText_48e36:: ; 9dc7f (27:5c7f)
+_CeladonGameCornerText_48e36::
text "Darn! I need more"
line "coins for the"
cont "#MON I want!"
done
-_CeladonGameCornerText_48e88:: ; 9dcad (27:5cad)
+_CeladonGameCornerText_48e88::
text "Hey, what? You're"
line "throwing me off!"
cont "Here are some"
cont "coins, shoo!"
prompt
-_CeladonGameCornerText_48e8d:: ; 9dceb (27:5ceb)
+_CeladonGameCornerText_48e8d::
text $52, " received"
line "20 coins!@@"
-_CeladonGameCornerText_48e93:: ; 9dd02 (27:5d02)
+_CeladonGameCornerText_48e93::
text "You've got your"
line "own coins!"
done
-_CeladonGameCornerText_48e98:: ; 9dd1d (27:5d1d)
+_CeladonGameCornerText_48e98::
text "The trick is to"
line "watch the reels"
cont "closely!"
done
-_CeladonGameCornerText_48ece:: ; 9dd47 (27:5d47)
+_CeladonGameCornerText_48ece::
text "I'm guarding this"
line "poster!"
cont "Go away, or else!"
done
-_CeladonGameCornerText_48ed3:: ; 9dd73 (27:5d73)
+_CeladonGameCornerText_48ed3::
text "Dang!"
prompt
-_CeladonGameCornerText_48ed8:: ; 9dd7a (27:5d7a)
+_CeladonGameCornerText_48ed8::
text "Our hideout might"
line "be discovered! I"
cont "better tell BOSS!"
done
-_CeladonGameCornerText_48f09:: ; 9ddb0 (27:5db0)
+_CeladonGameCornerText_48f09::
text "Hey!"
para "A switch behind"
line "the poster!?"
cont "Let's push it!@@"
-_CeladonGameCornerText_48f19:: ; 9dde2 (27:5de2)
+_CeladonGameCornerText_48f19::
text "Oops! Forgot the"
line "COIN CASE!"
done
diff --git a/text/maps/celadon_gym.asm b/text/maps/celadon_gym.asm
index 66452a2c..c076196f 100644
--- a/text/maps/celadon_gym.asm
+++ b/text/maps/celadon_gym.asm
@@ -1,4 +1,4 @@
-_CeladonGymText_48a5e:: ; 9d28f (27:528f)
+_CeladonGymText_48a5e::
text "Hello. Lovely"
line "weather isn't it?"
cont "It's so pleasant."
@@ -25,7 +25,7 @@ _CeladonGymText_48a5e:: ; 9d28f (27:528f)
line "shall not lose."
done
-_CeladonGymText_48a63:: ; 9d3c2 (27:53c2)
+_CeladonGymText_48a63::
text "Oh!"
line "I concede defeat."
@@ -36,7 +36,7 @@ _CeladonGymText_48a63:: ; 9d3c2 (27:53c2)
line "the RAINBOWBADGE."
prompt
-_CeladonGymText_48a68:: ; 9d418 (27:5418)
+_CeladonGymText_48a68::
text "You are cataloging"
line "#MON? I must"
cont "say I'm impressed."
@@ -47,7 +47,7 @@ _CeladonGymText_48a68:: ; 9d418 (27:5418)
cont "unattractive."
done
-_CeladonGymText9:: ; 9d481 (27:5481)
+_CeladonGymText9::
text "The RAINBOWBADGE"
line "will make #MON"
cont "up to L50 obey."
@@ -61,13 +61,13 @@ _CeladonGymText9:: ; 9d481 (27:5481)
line "this with you."
done
-_ReceivedTM21Text:: ; 9d50c (27:550c)
+_ReceivedTM21Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM21ExplanationText:: ; 9d520 (27:5520)
+_TM21ExplanationText::
db $0
para "TM21 contains"
line "MEGA DRAIN."
@@ -78,40 +78,40 @@ _TM21ExplanationText:: ; 9d520 (27:5520)
cont "your #MON!"
done
-_TM21NoRoomText:: ; 9d576 (27:5576)
+_TM21NoRoomText::
text "You should make"
line "room for this."
done
-_CeladonGymBattleText2:: ; 9d596 (27:5596)
+_CeladonGymBattleText2::
text "Hey!"
para "You are not"
line "allowed in here!"
done
-_CeladonGymEndBattleText2:: ; 9d5b9 (27:55b9)
+_CeladonGymEndBattleText2::
text "You're"
line "too rough!"
prompt
-_CeladonGymAfterBattleText2:: ; 9d5cb (27:55cb)
+_CeladonGymAfterBattleText2::
text "Bleaah!"
line "I hope ERIKA"
cont "wipes you out!"
done
-_CeladonGymBattleText3:: ; 9d5f0 (27:55f0)
+_CeladonGymBattleText3::
text "I was getting"
line "bored."
done
-_CeladonGymEndBattleText3:: ; 9d606 (27:5606)
+_CeladonGymEndBattleText3::
text "My"
line "makeup!"
prompt
-_CeladonGymAfterBattleText3:: ; 9d612 (27:5612)
+_CeladonGymAfterBattleText3::
text "Grass-type #MON"
line "are tough against"
cont "the water-type!"
@@ -121,23 +121,23 @@ _CeladonGymAfterBattleText3:: ; 9d612 (27:5612)
cont "ground #MON!"
done
-_CeladonGymBattleText4:: ; 9d675 (27:5675)
+_CeladonGymBattleText4::
text "Aren't you the"
line "peeping Tom?"
done
-_CeladonGymEndBattleText4:: ; 9d691 (27:5691)
+_CeladonGymEndBattleText4::
text "I'm"
line "in shock!"
prompt
-_CeladonGymAfterBattleText4:: ; 9d69f (27:569f)
+_CeladonGymAfterBattleText4::
text "Oh, you weren't"
line "peeping? We get a"
cont "lot of gawkers!"
done
-_CeladonGymBattleText5:: ; 9d6d1 (27:56d1)
+_CeladonGymBattleText5::
text "Look at my grass"
line "#MON!"
@@ -145,11 +145,11 @@ _CeladonGymBattleText5:: ; 9d6d1 (27:56d1)
line "to raise!"
done
-_CeladonGymEndBattleText5:: ; 9d702 (27:5702)
+_CeladonGymEndBattleText5::
text "No!"
prompt
-_CeladonGymAfterBattleText5:: ; 9d707 (27:5707)
+_CeladonGymAfterBattleText5::
text "We only use grass-"
line "type #MON at"
cont "our GYM!"
@@ -159,43 +159,43 @@ _CeladonGymAfterBattleText5:: ; 9d707 (27:5707)
cont "arrangements!"
done
-_CeladonGymBattleText6:: ; 9d762 (27:5762)
+_CeladonGymBattleText6::
text "Don't bring any"
line "bugs or fire"
cont "#MON in here!"
done
-_CeladonGymEndBattleText6:: ; 9d78d (27:578d)
+_CeladonGymEndBattleText6::
text "Oh!"
line "You!"
prompt
-_CeladonGymAfterBattleText6:: ; 9d797 (27:5797)
+_CeladonGymAfterBattleText6::
text "Our LEADER, ERIKA,"
line "might be quiet,"
cont "but she's also"
cont "very skilled!"
done
-_CeladonGymBattleText7:: ; 9d7d7 (27:57d7)
+_CeladonGymBattleText7::
text "Pleased to meet"
line "you. My hobby is"
cont "#MON training."
done
-_CeladonGymEndBattleText7:: ; 9d808 (27:5808)
+_CeladonGymEndBattleText7::
text "Oh!"
line "Splendid!"
prompt
-_CeladonGymAfterBattleText7:: ; 9d817 (27:5817)
+_CeladonGymAfterBattleText7::
text "I have a blind"
line "date coming up."
cont "I have to learn"
cont "to be polite."
done
-_CeladonGymBattleText8:: ; 9d855 (27:5855)
+_CeladonGymBattleText8::
text "Welcome to"
line "CELADON GYM!"
@@ -204,12 +204,12 @@ _CeladonGymBattleText8:: ; 9d855 (27:5855)
cont "girl power!"
done
-_CeladonGymEndBattleText8:: ; 9d897 (27:5897)
+_CeladonGymEndBattleText8::
text "Oh!"
line "Beaten!"
prompt
-_CeladonGymAfterBattleText8:: ; 9d8a4 (27:58a4)
+_CeladonGymAfterBattleText8::
text "I didn't bring my"
line "best #MON!"
diff --git a/text/maps/celadon_hotel.asm b/text/maps/celadon_hotel.asm
index a7b6ade3..c9e8bd8b 100644
--- a/text/maps/celadon_hotel.asm
+++ b/text/maps/celadon_hotel.asm
@@ -1,4 +1,4 @@
-_CeladonHotelText1:: ; 9e18a (27:618a)
+_CeladonHotelText1::
text "#MON? No, this"
line "is a hotel for"
cont "people."
@@ -6,7 +6,7 @@ _CeladonHotelText1:: ; 9e18a (27:618a)
para "We're full up."
done
-_CeladonHotelText2:: ; 9e1bf (27:61bf)
+_CeladonHotelText2::
text "I'm on vacation"
line "with my brother"
cont "and boy friend."
@@ -15,7 +15,7 @@ _CeladonHotelText2:: ; 9e1bf (27:61bf)
line "pretty city!"
done
-_CeladonHotelText3:: ; 9e20e (27:620e)
+_CeladonHotelText3::
text "Why did she bring"
line "her brother?"
done
diff --git a/text/maps/celadon_house.asm b/text/maps/celadon_house.asm
index 1a650a98..c0bb9532 100644
--- a/text/maps/celadon_house.asm
+++ b/text/maps/celadon_house.asm
@@ -1,10 +1,10 @@
-_CeladonHouseText1:: ; 9e0d5 (27:60d5)
+_CeladonHouseText1::
text "Hehehe! The slots"
line "just reel in the"
cont "dough, big time!"
done
-_CeladonHouseText2:: ; 9e10a (27:610a)
+_CeladonHouseText2::
text "CHIEF!"
para "We just shipped"
@@ -12,7 +12,7 @@ _CeladonHouseText2:: ; 9e10a (27:610a)
cont "slot prizes!"
done
-_CeladonHouseText3:: ; 9e13c (27:613c)
+_CeladonHouseText3::
text "Don't touch the"
line "poster at the"
cont "GAME CORNER!"
diff --git a/text/maps/celadon_mansion_1f.asm b/text/maps/celadon_mansion_1f.asm
index 7ea36a1a..953c9c4a 100644
--- a/text/maps/celadon_mansion_1f.asm
+++ b/text/maps/celadon_mansion_1f.asm
@@ -1,7 +1,7 @@
-_CeladonMansion1Text1:: ; 9ceee (27:4eee)
+_CeladonMansion1Text1::
text "MEOWTH: Meow!@@"
-_CeladonMansion1Text2:: ; 9cefe (27:4efe)
+_CeladonMansion1Text2::
text "My dear #MON"
line "keep me company."
@@ -9,15 +9,15 @@ _CeladonMansion1Text2:: ; 9cefe (27:4efe)
line "money home!"
done
-_CeladonMansion1Text3:: ; 9cf3c (27:4f3c)
+_CeladonMansion1Text3::
text "CLEFAIRY: Pi"
line "pippippi!@@"
-_CeladonMansion1Text4:: ; 9cf55 (27:4f55)
+_CeladonMansion1Text4::
text "NIDORAN: Kya"
line "kyaoo!@@"
-_CeladonMansion1Text5:: ; 9cf6b (27:4f6b)
+_CeladonMansion1Text5::
text "CELADON MANSION"
line "Manager's Suite"
done
diff --git a/text/maps/celadon_mansion_2f.asm b/text/maps/celadon_mansion_2f.asm
index 01841716..ecb46da6 100644
--- a/text/maps/celadon_mansion_2f.asm
+++ b/text/maps/celadon_mansion_2f.asm
@@ -1,4 +1,4 @@
-_CeladonMansion2Text1:: ; 9cf8b (27:4f8b)
+_CeladonMansion2Text1::
text "GAME FREAK"
line "Meeting Room"
done
diff --git a/text/maps/celadon_mansion_3f.asm b/text/maps/celadon_mansion_3f.asm
index 06220b23..f761da72 100644
--- a/text/maps/celadon_mansion_3f.asm
+++ b/text/maps/celadon_mansion_3f.asm
@@ -1,15 +1,15 @@
-_ProgrammerText:: ; 9cfa4 (27:4fa4)
+_ProgrammerText::
text "Me? I'm the"
line "programmer!"
done
-_GraphicArtistText:: ; 9cfbc (27:4fbc)
+_GraphicArtistText::
text "I'm the graphic"
line "artist!"
cont "I drew you!"
done
-_WriterText:: ; 9cfe0 (27:4fe0)
+_WriterText::
text "I wrote the story!"
line "Isn't ERIKA cute?"
@@ -20,7 +20,7 @@ _WriterText:: ; 9cfe0 (27:4fe0)
line "I like her!"
done
-_GameDesignerText:: ; 9d03a (27:503a)
+_GameDesignerText::
text "Is that right?"
para "I'm the game"
@@ -34,33 +34,33 @@ _GameDesignerText:: ; 9d03a (27:503a)
line "come tell me!"
done
-_CompletedDexText:: ; 9d0ad (27:50ad)
+_CompletedDexText::
text "Wow! Excellent!"
line "You completed"
cont "your #DEX!"
cont "Congratulations!"
cont "...@@"
-_CeladonMansion3Text5:: ; 9d0ed (27:50ed)
+_CeladonMansion3Text5::
text "It's the game"
line "program! Messing"
cont "with it could bug"
cont "out the game!"
done
-_CeladonMansion3Text6:: ; 9d12c (27:512c)
+_CeladonMansion3Text6::
text "Someone's playing"
line "a game instead of"
cont "working!"
done
-_CeladonMansion3Text7:: ; 9d159 (27:5159)
+_CeladonMansion3Text7::
text "It's the script!"
line "Better not look"
cont "at the ending!"
done
-_CeladonMansion3Text8:: ; 9d189 (27:5189)
+_CeladonMansion3Text8::
text "GAME FREAK"
line "Development Room"
done
diff --git a/text/maps/celadon_mansion_4f_inside.asm b/text/maps/celadon_mansion_4f_inside.asm
index 7268d7be..9749774f 100644
--- a/text/maps/celadon_mansion_4f_inside.asm
+++ b/text/maps/celadon_mansion_4f_inside.asm
@@ -1,4 +1,4 @@
-_CeladonMansion5Text1:: ; 9d1ba (27:51ba)
+_CeladonMansion5Text1::
text "I know everything"
line "about the world"
cont "of #MON in"
diff --git a/text/maps/celadon_mansion_4f_outside.asm b/text/maps/celadon_mansion_4f_outside.asm
index aab4a76f..7053d74a 100644
--- a/text/maps/celadon_mansion_4f_outside.asm
+++ b/text/maps/celadon_mansion_4f_outside.asm
@@ -1,4 +1,4 @@
-_CeladonMansion4Text1:: ; 9d1a6 (27:51a6)
+_CeladonMansion4Text1::
text "I KNOW EVERYTHING!"
done
diff --git a/text/maps/celadon_pokecenter.asm b/text/maps/celadon_pokecenter.asm
index 66feea37..32fa7a6a 100644
--- a/text/maps/celadon_pokecenter.asm
+++ b/text/maps/celadon_pokecenter.asm
@@ -1,11 +1,11 @@
-_CeladonPokecenterText2:: ; 9d226 (27:5226)
+_CeladonPokecenterText2::
text "# FLUTE awakens"
line "#MON with a"
cont "sound that only"
cont "they can hear!"
done
-_CeladonPokecenterText3:: ; 9d262 (27:5262)
+_CeladonPokecenterText3::
text "I rode uphill on"
line "CYCLING ROAD from"
cont "FUCHSIA!"
diff --git a/text/maps/celadon_prize_room.asm b/text/maps/celadon_prize_room.asm
index 7bf1f821..3f96fdfb 100644
--- a/text/maps/celadon_prize_room.asm
+++ b/text/maps/celadon_prize_room.asm
@@ -1,4 +1,4 @@
-_CeladonPrizeRoomText1:: ; 9dee6 (27:5ee6)
+_CeladonPrizeRoomText1::
text "I sure do fancy"
line "that PORYGON!"
@@ -6,7 +6,7 @@ _CeladonPrizeRoomText1:: ; 9dee6 (27:5ee6)
line "win at slots!"
done
-_CeladonPrizeRoomText2:: ; 9df24 (27:5f24)
+_CeladonPrizeRoomText2::
text "I had a major"
line "haul today!"
done
diff --git a/text/maps/cerulean_badge_house.asm b/text/maps/cerulean_badge_house.asm
index d546066a..12c0e5ae 100644
--- a/text/maps/cerulean_badge_house.asm
+++ b/text/maps/cerulean_badge_house.asm
@@ -1,4 +1,4 @@
-_CeruleanHouse2Text_74e77:: ; 990c9 (26:50c9)
+_CeruleanHouse2Text_74e77::
text "#MON BADGEs"
line "are owned only by"
cont "skilled trainers."
@@ -10,7 +10,7 @@ _CeruleanHouse2Text_74e77:: ; 990c9 (26:50c9)
line "amazing secrets!"
prompt
-_CeruleanHouse2Text_74e7c:: ; 9913a (26:513a)
+_CeruleanHouse2Text_74e7c::
text "Now then..."
para "Which of the 8"
@@ -18,30 +18,22 @@ _CeruleanHouse2Text_74e7c:: ; 9913a (26:513a)
cont "describe?"
done
-_CeruleanHouse2Text_74e81:: ; 99170 (26:5170)
-IF DEF(_YELLOW)
- text "Come visit me any-"
-ELSE
+_CeruleanHouse2Text_74e81::
text "Come visit me any"
-ENDC
line "time you wish."
done
-_CeruleanHouse2Text_74e96:: ; 99192 (26:5192)
+_CeruleanHouse2Text_74e96::
text "The ATTACK of all"
line "#MON increases"
cont "a little bit."
para "It also lets you"
-IF DEF(_YELLOW)
- line "use FLASH any-"
-ELSE
line "use FLASH any"
-ENDC
cont "time you desire."
prompt
-_CeruleanHouse2Text_74e9b:: ; 991f2 (26:51f2)
+_CeruleanHouse2Text_74e9b::
text "#MON up to L30"
line "will obey you."
@@ -53,7 +45,7 @@ _CeruleanHouse2Text_74e9b:: ; 991f2 (26:51f2)
cont "of battle."
prompt
-_CeruleanHouse2Text_74ea0:: ; 9925d (26:525d)
+_CeruleanHouse2Text_74ea0::
text "The SPEED of all"
line "#MON increases"
cont "a little bit."
@@ -63,7 +55,7 @@ _CeruleanHouse2Text_74ea0:: ; 9925d (26:525d)
cont "of battle."
prompt
-_CeruleanHouse2Text_74ea5:: ; 992b8 (26:52b8)
+_CeruleanHouse2Text_74ea5::
text "#MON up to L50"
line "will obey you."
@@ -75,7 +67,7 @@ _CeruleanHouse2Text_74ea5:: ; 992b8 (26:52b8)
cont "side of battle."
prompt
-_CeruleanHouse2Text_74eaa:: ; 9932a (26:532a)
+_CeruleanHouse2Text_74eaa::
text "The DEFENSE of all"
line "#MON increases"
cont "a little bit."
@@ -85,7 +77,7 @@ _CeruleanHouse2Text_74eaa:: ; 9932a (26:532a)
cont "of battle."
prompt
-_CeruleanHouse2Text_74eaf:: ; 99388 (26:5388)
+_CeruleanHouse2Text_74eaf::
text "#MON up to L70"
line "will obey you."
@@ -93,13 +85,13 @@ _CeruleanHouse2Text_74eaf:: ; 99388 (26:5388)
line "become unruly!"
prompt
-_CeruleanHouse2Text_74eb4:: ; 993c7 (26:53c7)
+_CeruleanHouse2Text_74eb4::
text "Your #MON's"
line "SPECIAL abilities"
cont "increase a bit."
prompt
-_CeruleanHouse2Text_74eb9:: ; 993f5 (26:53f5)
+_CeruleanHouse2Text_74eb9::
text "All #MON will"
line "obey you!"
prompt
diff --git a/text/maps/cerulean_city.asm b/text/maps/cerulean_city.asm
index f014ee5d..465f1155 100644
--- a/text/maps/cerulean_city.asm
+++ b/text/maps/cerulean_city.asm
@@ -1,4 +1,4 @@
-_CeruleanCityText_19668:: ; a4d2b (29:4d2b)
+_CeruleanCityText_19668::
text $53, ": Yo!"
line $52, "!"
@@ -16,19 +16,19 @@ _CeruleanCityText_19668:: ; a4d2b (29:4d2b)
cont $52, "!"
done
-_CeruleanCityText_1966d:: ; a4dbe (29:4dbe)
+_CeruleanCityText_1966d::
text "Hey!"
line "Take it easy!"
cont "You won already!"
prompt
-_CeruleanCityText_19672:: ; a4de3 (29:4de3)
+_CeruleanCityText_19672::
text "Heh!"
line "You're no match"
cont "for my genius!"
prompt
-_CeruleanCityText_19677:: ; a4e07 (29:4e07)
+_CeruleanCityText_19677::
text $53, ": Hey,"
line "guess what?"
@@ -58,7 +58,7 @@ _CeruleanCityText_19677:: ; a4e07 (29:4e07)
cont "Smell ya later!"
done
-_CeruleanCityText_196d9:: ; a4f27 (29:4f27)
+_CeruleanCityText_196d9::
text "Hey! Stay out!"
line "It's not your"
cont "yard! Huh? Me?"
@@ -68,16 +68,16 @@ _CeruleanCityText_196d9:: ; a4f27 (29:4f27)
cont "you believe me?"
done
-_ReceivedTM28Text:: ; a4f82 (29:4f82)
+_ReceivedTM28Text::
text $52, " recovered"
line "TM28!@@"
-_ReceivedTM28Text2:: ; a4f96 (29:4f96)
+_ReceivedTM28Text2::
db $0
para "I better get"
line "moving! Bye!@@"
-_TM28NoRoomText:: ; a4fb3 (29:4fb3)
+_TM28NoRoomText::
text "Make room for"
line "this!"
@@ -85,25 +85,25 @@ _TM28NoRoomText:: ; a4fb3 (29:4fb3)
line "I give it to you!"
done
-_CeruleanCityText_196ee:: ; a4feb (29:4feb)
+_CeruleanCityText_196ee::
text "Stop!"
line "I give up! I'll"
cont "leave quietly!"
prompt
-_CeruleanCityText_196f3:: ; a5010 (29:5010)
+_CeruleanCityText_196f3::
text "OK! I'll return"
line "the TM I stole!"
prompt
-_CeruleanCityText3:: ; a5030 (29:5030)
+_CeruleanCityText3::
text "You're a trainer"
line "too? Collecting,"
cont "fighting, it's a"
cont "tough life."
done
-_CeruleanCityText4:: ; a506e (29:506e)
+_CeruleanCityText4::
text "That bush in"
line "front of the shop"
cont "is in the way."
@@ -112,23 +112,14 @@ _CeruleanCityText4:: ; a506e (29:506e)
line "way around."
done
-_CeruleanCityText5:: ; a50ba (29:50ba)
+_CeruleanCityText5::
text "You're making an"
line "encyclopedia on"
cont "#MON? That"
cont "sounds amusing."
done
-_CeruleanCityText6:: ; a50f6 (29:50f6)
-IF DEF(_YELLOW)
- text "These poor people"
- line "here were robbed."
-
- para "We're positive"
- line "that TEAM ROCKET"
- cont "is behind this"
- cont "terrible deed."
-ELSE
+_CeruleanCityText6::
text "The people here"
line "were robbed."
@@ -136,57 +127,31 @@ ELSE
line "TEAM ROCKET is"
cont "behind this most"
cont "heinous crime!"
-ENDC
para "Even our POLICE"
-IF DEF(_YELLOW)
- line "FORCE has trouble"
-ELSE
line "force has trouble"
-ENDC
cont "with the ROCKETs!"
done
-_CeruleanCityText_19730:: ; a5188 (29:5188)
-IF DEF(_YELLOW)
- text "OK! ELECTRODE!"
-ELSE
+_CeruleanCityText_19730::
text "OK! SLOWBRO!"
-ENDC
line "Use SONICBOOM!"
-IF DEF(_YELLOW)
- cont "Please ELECTRODE,"
-ELSE
cont "Come on, SLOWBRO"
-ENDC
cont "pay attention!"
done
-_CeruleanCityText_19735:: ; a51c5 (29:51c5)
-IF DEF(_YELLOW)
- text "ELECTRODE, TACKLE!"
-ELSE
+_CeruleanCityText_19735::
text "SLOWBRO punch!"
-ENDC
line "No! You blew it"
cont "again!"
done
-_CeruleanCityText_1973a:: ; a51ec (29:51ec)
-IF DEF(_YELLOW)
- text "ELECTRODE, SWIFT!"
-ELSE
+_CeruleanCityText_1973a::
text "SLOWBRO, WITHDRAW!"
-ENDC
line "No! That's wrong!"
-IF DEF(_YELLOW)
- para "Training #MON"
- line "is difficult!"
-ELSE
para "It's so hard to"
line "control #MON!"
-ENDC
para "Your #MON's"
line "obedience depends"
@@ -194,43 +159,27 @@ ENDC
cont "as a trainer!"
done
-_CeruleanCityText_1976f:: ; a526b (29:526b)
-IF DEF(_YELLOW)
- text "ELECTRODE took a"
-ELSE
+_CeruleanCityText_1976f::
text "SLOWBRO took a"
-ENDC
line "snooze..."
done
-_CeruleanCityText_19774:: ; a5285 (29:5285)
-IF DEF(_YELLOW)
- text "ELECTRODE is"
-ELSE
+_CeruleanCityText_19774::
text "SLOWBRO is"
-ENDC
line "loafing around..."
done
-_CeruleanCityText_19779:: ; a52a3 (29:52a3)
-IF DEF(_YELLOW)
- text "ELECTRODE turned"
-ELSE
+_CeruleanCityText_19779::
text "SLOWBRO turned"
-ENDC
line "away..."
done
-_CeruleanCityText_1977e:: ; a52bb (29:52bb)
-IF DEF(_YELLOW)
- text "ELECTRODE"
-ELSE
+_CeruleanCityText_1977e::
text "SLOWBRO"
-ENDC
line "ignored orders..."
done
-_CeruleanCityText9:: ; a52d6 (29:52d6)
+_CeruleanCityText9::
text "I want a bright"
line "red BICYCLE!"
@@ -239,7 +188,7 @@ _CeruleanCityText9:: ; a52d6 (29:52d6)
cont "get dirty!"
done
-_CeruleanCityText10:: ; a531f (29:531f)
+_CeruleanCityText10::
text "This is CERULEAN"
line "CAVE! Horribly"
cont "strong #MON"
@@ -251,14 +200,14 @@ _CeruleanCityText10:: ; a531f (29:531f)
cont "is allowed in!"
done
-_CeruleanCityText12:: ; a539a (29:539a)
+_CeruleanCityText12::
text "CERULEAN CITY"
line "A Mysterious,"
cont "Blue Aura"
cont "Surrounds It"
done
-_CeruleanCityText13:: ; a53ce (29:53ce)
+_CeruleanCityText13::
text "TRAINER TIPS"
para "Pressing B Button"
@@ -267,13 +216,13 @@ _CeruleanCityText13:: ; a53ce (29:53ce)
cont "process."
done
-_CeruleanCityText16:: ; a541a (29:541a)
+_CeruleanCityText16::
text "Grass and caves"
line "handled easily!"
cont "BIKE SHOP"
done
-_CeruleanCityText17:: ; a5445 (29:5445)
+_CeruleanCityText17::
text "CERULEAN CITY"
line "#MON GYM"
cont "LEADER: MISTY"
diff --git a/text/maps/cerulean_gym.asm b/text/maps/cerulean_gym.asm
index f4234fc4..c5d67004 100644
--- a/text/maps/cerulean_gym.asm
+++ b/text/maps/cerulean_gym.asm
@@ -1,12 +1,7 @@
-_CeruleanGymText_5c7be:: ; 989c1 (26:49c1)
+_CeruleanGymText_5c7be::
text "Hi, you're a new"
line "face!"
-IF DEF(_YELLOW)
- para "What's your policy"
- line "on #MON? What"
- cont "is your approach?"
-ELSE
para "Trainers who want"
line "to turn pro have"
cont "to have a policy"
@@ -15,24 +10,14 @@ ELSE
para "What is your"
line "approach when you"
cont "catch #MON?"
-ENDC
para "My policy is an"
line "all-out offensive"
cont "with water-type"
cont "#MON!"
-
-IF DEF(_YELLOW)
- para "MISTY, the world-"
- line "famous beauty, is"
- cont "your host!"
-
- para "Are you ready,"
- line "sweetie?"
-ENDC
done
-_CeruleanGymText_5c7c3:: ; 98a7b (26:4a7b)
+_CeruleanGymText_5c7c3::
text "TM11 teaches"
line "BUBBLEBEAM!"
@@ -40,7 +25,7 @@ _CeruleanGymText_5c7c3:: ; 98a7b (26:4a7b)
line "aquatic #MON!"
done
-_CeruleanGymText_5c7c8:: ; 98ab0 (26:4ab0)
+_CeruleanGymText_5c7c8::
text "The CASCADEBADGE"
line "makes all #MON"
cont "up to L30 obey!"
@@ -50,11 +35,7 @@ _CeruleanGymText_5c7c8:: ; 98ab0 (26:4ab0)
para "There's more, you"
line "can now use CUT"
-IF DEF(_YELLOW)
- cont "anytime!"
-ELSE
cont "any time!"
-ENDC
para "You can CUT down"
line "small bushes to"
@@ -64,23 +45,18 @@ ENDC
line "my favorite TM!"
done
-_ReceivedTM11Text:: ; 98b7d (26:4b7d)
+_ReceivedTM11Text::
text $52, " received"
line "TM11!@@"
-_CeruleanGymText_5c7d3:: ; 98b90 (26:4b90)
+_CeruleanGymText_5c7d3::
text "You better make"
line "room for this!"
done
-_CeruleanGymText_5c7d8:: ; 98bb0 (26:4bb0)
-IF DEF(_YELLOW)
- text "I can't"
- line "believe I lost!"
-ELSE
+_CeruleanGymText_5c7d8::
text "Wow!"
line "You're too much!"
-ENDC
para "All right!"
@@ -88,38 +64,38 @@ ENDC
line "CASCADEBADGE to"
cont "show you beat me!@@"
-_CeruleanGymBattleText1:: ; 98c05 (26:4c05)
+_CeruleanGymBattleText1::
text "I'm more than good"
line "enough for you!"
para "MISTY can wait!"
done
-_CeruleanGymEndBattleText1:: ; 98c38 (26:4c38)
+_CeruleanGymEndBattleText1::
text "You"
line "overwhelmed me!"
prompt
-_CeruleanGymAfterBattleText1:: ; 98c4d (26:4c4d)
+_CeruleanGymAfterBattleText1::
text "You have to face"
line "other trainers to"
cont "find out how good"
cont "you really are."
done
-_CeruleanGymBattleText2:: ; 98c93 (26:4c93)
+_CeruleanGymBattleText2::
text "Splash!"
para "I'm first up!"
line "Let's do it!"
done
-_CeruleanGymEndBattleText2:: ; 98cb5 (26:4cb5)
+_CeruleanGymEndBattleText2::
text "That"
line "can't be!"
prompt
-_CeruleanGymAfterBattleText2:: ; 98cc4 (26:4cc4)
+_CeruleanGymAfterBattleText2::
text "MISTY is going to"
line "keep improving!"
@@ -127,7 +103,7 @@ _CeruleanGymAfterBattleText2:: ; 98cc4 (26:4cc4)
line "someone like you!"
done
-_CeruleanGymText_5c82a:: ; 98d0a (26:4d0a)
+_CeruleanGymText_5c82a::
text "Yo! Champ in"
line "making!"
@@ -145,15 +121,11 @@ _CeruleanGymText_5c82a:: ; 98d0a (26:4d0a)
line "electricity!"
done
-_CeruleanGymText_5c82f:: ; 98db0 (26:4db0)
+_CeruleanGymText_5c82f::
text "You beat MISTY!"
line "What'd I tell ya?"
-IF DEF(_YELLOW)
- para "You and me, kid,"
-ELSE
para "You and me kid,"
-ENDC
line "we make a pretty"
cont "darn good team!"
done
diff --git a/text/maps/cerulean_mart.asm b/text/maps/cerulean_mart.asm
index 936104ee..8ebe0c32 100644
--- a/text/maps/cerulean_mart.asm
+++ b/text/maps/cerulean_mart.asm
@@ -1,4 +1,4 @@
-_CeruleanMartText2:: ; 99012 (26:5012)
+_CeruleanMartText2::
text "Use REPEL to keep"
line "bugs and weak"
cont "#MON away."
@@ -9,7 +9,7 @@ _CeruleanMartText2:: ; 99012 (26:5012)
cont "for best results!"
done
-_CeruleanMartText3:: ; 9907f (26:507f)
+_CeruleanMartText3::
text "Have you seen any"
line "RARE CANDY?"
diff --git a/text/maps/cerulean_pokecenter.asm b/text/maps/cerulean_pokecenter.asm
index 6cc93144..e7933988 100644
--- a/text/maps/cerulean_pokecenter.asm
+++ b/text/maps/cerulean_pokecenter.asm
@@ -1,4 +1,4 @@
-_CeruleanPokecenterText1:: ; 988e5 (26:48e5)
+_CeruleanPokecenterText1::
text "That BILL!"
para "I heard that"
@@ -7,7 +7,7 @@ _CeruleanPokecenterText1:: ; 988e5 (26:48e5)
cont "rare #MON!"
done
-_CeruleanPokecenterText3:: ; 9892a (26:492a)
+_CeruleanPokecenterText3::
text "Have you heard"
line "about BILL?"
diff --git a/text/maps/cerulean_trade_house.asm b/text/maps/cerulean_trade_house.asm
index c22f24a9..b606613b 100644
--- a/text/maps/cerulean_trade_house.asm
+++ b/text/maps/cerulean_trade_house.asm
@@ -1,43 +1,4 @@
-IF DEF(_YELLOW)
-MelanieText1::
- text "I nursed this"
- line "BULBASAUR back to"
- cont "health."
-
- para "It needs a good"
- line "trainer to take"
- cont "care of it now.@@"
-
-MelanieText2::
- text "I know! Would you"
- line "take care of this"
- cont "BULBASAUR?"
- done
-
-MelanieText3::
- text "Please take care"
- line "of BULBASAUR!@@"
-
-MelanieText4::
- text "Is BULBASAUR"
- line "doing well?@@"
-
-MelanieText5::
- text "Oh..."
- line "That's too bad...@@"
-
-MelanieBulbasaurText::
- text "BULBASAUR: Bubba!"
- line "Zoar!@@"
-
-MelanieOddishText::
- text "ODDISH: Orddissh!@@"
-
-MelanieSandshrewText::
- text "SANDSHREW: Pikii!@@"
-ENDC
-
-_CeruleanHouse1Text1:: ; 9888c (26:488c)
+_CeruleanHouse1Text1::
text "My husband likes"
line "trading #MON."
diff --git a/text/maps/cerulean_trashed_house.asm b/text/maps/cerulean_trashed_house.asm
index 83f87cb8..b23f4507 100644
--- a/text/maps/cerulean_trashed_house.asm
+++ b/text/maps/cerulean_trashed_house.asm
@@ -1,4 +1,4 @@
-_CeruleanTrashedText_1d6ab:: ; 9875c (26:475c)
+_CeruleanTrashedText_1d6ab::
text "Those miserable"
line "ROCKETs!"
@@ -14,7 +14,7 @@ _CeruleanTrashedText_1d6ab:: ; 9875c (26:475c)
line "bundle, it did!"
done
-_CeruleanTrashedText_1d6b0:: ; 987e2 (26:47e2)
+_CeruleanTrashedText_1d6b0::
text "I figure what's"
line "lost is lost!"
@@ -23,14 +23,14 @@ _CeruleanTrashedText_1d6b0:: ; 987e2 (26:47e2)
cont "DIG without a TM!"
done
-_CeruleanHouseTrashedText2:: ; 98834 (26:4834)
+_CeruleanHouseTrashedText2::
text "TEAM ROCKET must"
line "be trying to DIG"
cont "their way into no"
cont "good!"
done
-_CeruleanHouseTrashedText3:: ; 9886f (26:486f)
+_CeruleanHouseTrashedText3::
text "TEAM ROCKET left"
line "a way out!"
done
diff --git a/text/maps/champion.asm b/text/maps/champion.asm
index 19484c23..51258818 100644
--- a/text/maps/champion.asm
+++ b/text/maps/champion.asm
@@ -1,4 +1,4 @@
-_GaryText_760f4:: ; 860e1 (21:60e1)
+_GaryChampionIntroText::
text $53, ": Hey!"
para "I was looking"
@@ -35,7 +35,7 @@ _GaryText_760f4:: ; 860e1 (21:60e1)
cont "in the world!"
done
-_GaryText_760f9:: ; 8623b (21:623b)
+_GaryDefeatedText::
text "NO!"
line "That can't be!"
cont "You beat my best!"
@@ -49,7 +49,7 @@ _GaryText_760f9:: ; 8623b (21:623b)
cont "It's not fair!"
prompt
-_GaryText_760fe:: ; 862b4 (21:62b4)
+_GaryVictoryText::
text "Hahaha!"
line "I won, I won!"
@@ -65,7 +65,7 @@ _GaryText_760fe:: ; 862b4 (21:62b4)
line "Hahaha!"
prompt
-_GaryText_76103:: ; 8632f (21:632f)
+_GaryText_76103::
text "Why?"
line "Why did I lose?"
@@ -81,11 +81,11 @@ _GaryText_76103:: ; 8632f (21:632f)
line "like to admit it."
done
-_GaryText2:: ; 863c1 (21:63c1)
+_GaryText2::
text "OAK: ", $52, "!"
done
-_GaryText_76120:: ; 863ca (21:63ca)
+_GaryText_76120::
text "OAK: So, you won!"
line "Congratulations!"
cont "You're the new"
@@ -103,7 +103,7 @@ _GaryText_76120:: ; 863ca (21:63ca)
line "come of age!"
done
-_GaryText_76125:: ; 86463 (21:6463)
+_GaryText_76125::
text "OAK: ", $53, "! I'm"
line "disappointed!"
@@ -129,7 +129,7 @@ _GaryText_76125:: ; 86463 (21:6463)
cont "a champ again!"
done
-_GaryText_7612a:: ; 86567 (21:6567)
+_GaryText_7612a::
text "OAK: ", $52, "!"
para "You understand"
diff --git a/text/maps/cinnabar_gym.asm b/text/maps/cinnabar_gym.asm
index c3208a84..c8df3fe4 100644
--- a/text/maps/cinnabar_gym.asm
+++ b/text/maps/cinnabar_gym.asm
@@ -1,4 +1,4 @@
-_BlaineBattleText:: ; a0844 (28:4844)
+_BlaineBattleText::
text "Hah!"
para "I am BLAINE! I"
@@ -13,14 +13,14 @@ _BlaineBattleText:: ; a0844 (28:4844)
line "have BURN HEAL!"
done
-_BlaineEndBattleText:: ; a08c7 (28:48c7)
+_BlaineEndBattleText::
text "I have"
line "burnt out!"
para "You have earned"
line "the VOLCANOBADGE!@@"
-_BlaineFireBlastText:: ; a08fd (28:48fd)
+_BlaineFireBlastText::
text "FIRE BLAST is the"
line "ultimate fire"
cont "technique!"
@@ -29,7 +29,7 @@ _BlaineFireBlastText:: ; a08fd (28:48fd)
line "water #MON!"
done
-_BlaineBadgeText:: ; a0946 (28:4946)
+_BlaineBadgeText::
text "Hah!"
para "The VOLCANOBADGE"
@@ -41,13 +41,13 @@ _BlaineBadgeText:: ; a0946 (28:4946)
line "have this too!"
done
-_ReceivedTM38Text:: ; a09a8 (28:49a8)
+_ReceivedTM38Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM38ExplanationText:: ; a09bc (28:49bc)
+_TM38ExplanationText::
db $0
para "TM38 contains"
line "FIRE BLAST!"
@@ -60,23 +60,23 @@ _TM38ExplanationText:: ; a09bc (28:49bc)
cont "good bets!"
done
-_TM38NoRoomText:: ; a0a1e (28:4a1e)
+_TM38NoRoomText::
text "Make room for my"
line "gift!"
done
-_CinnabarGymText_7595f:: ; a0a36 (28:4a36)
+_CinnabarGymText_7595f::
text "Do you know how"
line "hot #MON fire"
cont "breath can get?"
done
-_CinnabarGymText_75964:: ; a0a65 (28:4a65)
+_CinnabarGymText_75964::
text "Yow!"
line "Hot, hot, hot!"
prompt
-_CinnabarGymText_75969:: ; a0a7a (28:4a7a)
+_CinnabarGymText_75969::
text "Fire, or to be"
line "more precise,"
cont "combustion..."
@@ -85,66 +85,66 @@ _CinnabarGymText_75969:: ; a0a7a (28:4a7a)
line "blah..."
done
-_CinnabarGymText_75994:: ; a0ac0 (28:4ac0)
+_CinnabarGymText_75994::
text "I was a thief, but"
line "I became straight"
cont "as a trainer!"
done
-_CinnabarGymText_75999:: ; a0af4 (28:4af4)
+_CinnabarGymText_75999::
text "I"
line "surrender!"
prompt
-_CinnabarGymText_7599e:: ; a0b02 (28:4b02)
+_CinnabarGymText_7599e::
text "I can't help"
line "stealing other"
cont "people's #MON!"
done
-_CinnabarGymText_759c9:: ; a0b2c (28:4b2c)
+_CinnabarGymText_759c9::
text "You can't win!"
line "I have studied"
cont "#MON totally!"
done
-_CinnabarGymText_759ce:: ; a0b58 (28:4b58)
+_CinnabarGymText_759ce::
text "Waah!"
line "My studies!"
prompt
-_CinnabarGymText_759d3:: ; a0b6b (28:4b6b)
+_CinnabarGymText_759d3::
text "My theories are"
line "too complicated"
cont "for you!"
done
-_CinnabarGymText_759fe:: ; a0b95 (28:4b95)
+_CinnabarGymText_759fe::
text "I just like using"
line "fire #MON!"
done
-_CinnabarGymText_75a03:: ; a0bb3 (28:4bb3)
+_CinnabarGymText_75a03::
text "Too hot"
line "to handle!"
prompt
-_CinnabarGymText_75a08:: ; a0bc7 (28:4bc7)
+_CinnabarGymText_75a08::
text "I wish there was"
line "a thief #MON!"
cont "I'd use that!"
done
-_CinnabarGymText_75a33:: ; a0bf4 (28:4bf4)
+_CinnabarGymText_75a33::
text "I know why BLAINE"
line "became a trainer!"
done
-_CinnabarGymText_75a38:: ; a0c19 (28:4c19)
+_CinnabarGymText_75a38::
text "Ow!"
prompt
-_CinnabarGymText_75a3d:: ; a0c1e (28:4c1e)
+_CinnabarGymText_75a3d::
text "BLAINE was lost"
line "in the mountains"
cont "when a fiery bird"
@@ -155,40 +155,40 @@ _CinnabarGymText_75a3d:: ; a0c1e (28:4c1e)
cont "his way down!"
done
-_CinnabarGymText_75a68:: ; a0c90 (28:4c90)
+_CinnabarGymText_75a68::
text "I've been to many"
line "GYMs, but this is"
cont "my favorite!"
done
-_CinnabarGymText_75a6d:: ; a0cc1 (28:4cc1)
+_CinnabarGymText_75a6d::
text "Yowza!"
line "Too hot!"
prompt
-_CinnabarGymText_75a72:: ; a0cd2 (28:4cd2)
+_CinnabarGymText_75a72::
text "Us fire #MON"
line "fans like PONYTA"
cont "and NINETALES!"
done
-_CinnabarGymText_75a9d:: ; a0d00 (28:4d00)
+_CinnabarGymText_75a9d::
text "Fire is weak"
line "against H2O!"
done
-_CinnabarGymText_75aa2:: ; a0d1b (28:4d1b)
+_CinnabarGymText_75aa2::
text "Oh!"
line "Snuffed out!"
prompt
-_CinnabarGymText_75aa7:: ; a0d2d (28:4d2d)
+_CinnabarGymText_75aa7::
text "Water beats fire!"
line "But, fire melts"
cont "ice #MON!"
done
-_CinnabarGymText_75ac2:: ; a0d5a (28:4d5a)
+_CinnabarGymText_75ac2::
text "Yo! Champ in"
line "making!"
@@ -203,7 +203,7 @@ _CinnabarGymText_75ac2:: ; a0d5a (28:4d5a)
line "some BURN HEALs!"
done
-_CinnabarGymText_75ac7:: ; a0dd9 (28:4dd9)
+_CinnabarGymText_75ac7::
text $52, "! You beat"
line "that fire brand!"
done
diff --git a/text/maps/cinnabar_island.asm b/text/maps/cinnabar_island.asm
index 897368d2..d43c4d66 100644
--- a/text/maps/cinnabar_island.asm
+++ b/text/maps/cinnabar_island.asm
@@ -1,37 +1,33 @@
-_CinnabarIslandText8:: ; a61cf (29:61cf)
+_CinnabarIslandText8::
text "The door is"
line "locked..."
done
-_CinnabarIslandText1:: ; a61e6 (29:61e6)
+_CinnabarIslandText1::
text "CINNABAR GYM's"
line "BLAINE is an odd"
cont "man who has lived"
cont "here for decades."
done
-_CinnabarIslandText2:: ; a622a (29:622a)
+_CinnabarIslandText2::
text "Scientists conduct"
line "experiments in"
-IF DEF(_YELLOW)
- cont "the burned-out"
-ELSE
cont "the burned out"
-ENDC
cont "building."
done
-_CinnabarIslandText3:: ; a6266 (29:6266)
+_CinnabarIslandText3::
text "CINNABAR ISLAND"
line "The Fiery Town of"
cont "Burning Desire"
done
-_CinnabarIslandText6:: ; a6298 (29:6298)
+_CinnabarIslandText6::
text "#MON LAB"
done
-_CinnabarIslandText7:: ; a62a2 (29:62a2)
+_CinnabarIslandText7::
text "CINNABAR ISLAND"
line "#MON GYM"
cont "LEADER: BLAINE"
diff --git a/text/maps/cinnabar_lab.asm b/text/maps/cinnabar_lab.asm
index 712b139b..74161166 100644
--- a/text/maps/cinnabar_lab.asm
+++ b/text/maps/cinnabar_lab.asm
@@ -1,4 +1,4 @@
-_Lab1Text1:: ; a0df7 (28:4df7)
+_Lab1Text1::
text "We study #MON"
line "extensively here."
@@ -7,23 +7,23 @@ _Lab1Text1:: ; a0df7 (28:4df7)
cont "for examination."
done
-_Lab1Text2:: ; a0e49 (28:4e49)
+_Lab1Text2::
text "A photo of the"
line "LAB's founder,"
cont "DR.FUJI!"
done
-_Lab1Text3:: ; a0e70 (28:4e70)
+_Lab1Text3::
text "#MON LAB"
line "Meeting Room"
done
-_Lab1Text4:: ; a0e87 (28:4e87)
+_Lab1Text4::
text "#MON LAB"
line "R-and-D Room"
done
-_Lab1Text5:: ; a0e9e (28:4e9e)
+_Lab1Text5::
text "#MON LAB"
line "Testing Room"
done
diff --git a/text/maps/cinnabar_lab_fossil_room.asm b/text/maps/cinnabar_lab_fossil_room.asm
index cdbaca13..38deb1ee 100644
--- a/text/maps/cinnabar_lab_fossil_room.asm
+++ b/text/maps/cinnabar_lab_fossil_room.asm
@@ -1,4 +1,4 @@
-_Lab4Text_75dc6:: ; a10e8 (28:50e8)
+_Lab4Text_75dc6::
text "Hiya!"
para "I am important"
@@ -11,11 +11,11 @@ _Lab4Text_75dc6:: ; a10e8 (28:50e8)
line "fossil for me?"
prompt
-_Lab4Text_75dcb:: ; a1145 (28:5145)
+_Lab4Text_75dcb::
text "No! Is too bad!"
done
-_Lab4Text_75dd0:: ; a1156 (28:5156)
+_Lab4Text_75dd0::
text "I take a little"
line "time!"
@@ -23,7 +23,7 @@ _Lab4Text_75dd0:: ; a1156 (28:5156)
line "little while!"
done
-_Lab4Text_75dd5:: ; a118d (28:518d)
+_Lab4Text_75dd5::
text "Where were you?"
para "Your fossil is"
@@ -35,7 +35,7 @@ _Lab4Text_75dd5:: ; a118d (28:518d)
line "like I think!"
prompt
-_Lab4Text_610ae:: ; a11d6 (28:51d6)
+_Lab4Text_610ae::
text "Oh! That is"
line "@"
TX_RAM wcd6d
@@ -54,7 +54,7 @@ _Lab4Text_610ae:: ; a11d6 (28:51d6)
cont "again!"
done
-_Lab4Text_610b3:: ; a1259 (28:5259)
+_Lab4Text_610b3::
text "So! You hurry and"
line "give me that!"
@@ -64,7 +64,7 @@ _Lab4Text_610b3:: ; a1259 (28:5259)
text "!"
prompt
-_Lab4Text_610b8:: ; a128f (28:528f)
+_Lab4Text_610b8::
text "I take a little"
line "time!"
@@ -72,7 +72,7 @@ _Lab4Text_610b8:: ; a128f (28:528f)
line "little while!"
done
-_Lab4Text_610bd:: ; a12c6 (28:52c6)
+_Lab4Text_610bd::
text "Aiyah! You come"
line "again!"
done
diff --git a/text/maps/cinnabar_lab_metronome_room.asm b/text/maps/cinnabar_lab_metronome_room.asm
index af5dc150..b8034889 100644
--- a/text/maps/cinnabar_lab_metronome_room.asm
+++ b/text/maps/cinnabar_lab_metronome_room.asm
@@ -1,4 +1,4 @@
-_TM35PreReceiveText:: ; a0f09 (28:4f09)
+_TM35PreReceiveText::
text "Tch-tch-tch!"
line "I made a cool TM!"
@@ -6,13 +6,13 @@ _TM35PreReceiveText:: ; a0f09 (28:4f09)
line "kinds of fun!"
prompt
-_ReceivedTM35Text:: ; a0f48 (28:4f48)
+_ReceivedTM35Text::
text $52, " received "
line "@"
TX_RAM wcf4b
text "!@@"
-_TM35ExplanationText:: ; a0f5d (28:4f5d)
+_TM35ExplanationText::
text "Tch-tch-tch!"
line "That's the sound"
cont "of a METRONOME!"
@@ -23,18 +23,18 @@ _TM35ExplanationText:: ; a0f5d (28:4f5d)
cont "it doesn't know!"
done
-_TM35NoRoomText:: ; a0fc7 (28:4fc7)
+_TM35NoRoomText::
text "Your pack is"
line "crammed full!"
done
-_Lab3Text2:: ; a0fe3 (28:4fe3)
+_Lab3Text2::
text "EEVEE can evolve"
line "into 1 of 3 kinds"
cont "of #MON."
done
-_Lab3Text3:: ; a1010 (28:5010)
+_Lab3Text3::
text "There's an e-mail"
line "message!"
@@ -58,7 +58,7 @@ _Lab3Text3:: ; a1010 (28:5010)
para "..."
done
-_Lab3Text5:: ; a10d8 (28:50d8)
+_Lab3Text5::
text "An amber pipe!"
done
diff --git a/text/maps/cinnabar_lab_trade_room.asm b/text/maps/cinnabar_lab_trade_room.asm
index 02571da8..3c0a4bfe 100644
--- a/text/maps/cinnabar_lab_trade_room.asm
+++ b/text/maps/cinnabar_lab_trade_room.asm
@@ -1,4 +1,4 @@
-_Lab2Text1:: ; a0eb5 (28:4eb5)
+_Lab2Text1::
text "I found this very"
line "strange fossil in"
cont "MT.MOON!"
diff --git a/text/maps/cinnabar_mart.asm b/text/maps/cinnabar_mart.asm
index d7c50c9f..44292ca8 100644
--- a/text/maps/cinnabar_mart.asm
+++ b/text/maps/cinnabar_mart.asm
@@ -1,10 +1,10 @@
-_CinnabarMartText2:: ; a139b (28:539b)
+_CinnabarMartText2::
text "Don't they have X"
line "ATTACK? It's good"
cont "for battles!"
done
-_CinnabarMartText3:: ; a13cb (28:53cb)
+_CinnabarMartText3::
text "It never hurts to"
line "have extra items!"
done
diff --git a/text/maps/cinnabar_pokecenter.asm b/text/maps/cinnabar_pokecenter.asm
index 09d9a120..e3e6cca9 100644
--- a/text/maps/cinnabar_pokecenter.asm
+++ b/text/maps/cinnabar_pokecenter.asm
@@ -1,5 +1,5 @@
-_CinnabarPokecenterText2:: ; a12de (28:52de)
-_CinnabarPokecenterText1:: ; a12de (28:52de)
+_CinnabarPokecenterText2::
+_CinnabarPokecenterText1::
text "You can cancel"
line "evolution."
@@ -9,7 +9,7 @@ _CinnabarPokecenterText1:: ; a12de (28:52de)
cont "it the way it is."
done
-_CinnabarPokecenterText3:: ; a133e (28:533e)
+_CinnabarPokecenterText3::
text "Do you have any"
line "friends?"
diff --git a/text/maps/copycats_house_1f.asm b/text/maps/copycats_house_1f.asm
index da99566b..3ec2b151 100644
--- a/text/maps/copycats_house_1f.asm
+++ b/text/maps/copycats_house_1f.asm
@@ -1,11 +1,11 @@
-_CopycatsHouse1FText1:: ; a14f7 (28:54f7)
+_CopycatsHouse1FText1::
text "My daughter is so"
line "self-centered."
cont "She only has a"
cont "few friends."
done
-_CopycatsHouse1FText2:: ; a1535 (28:5535)
+_CopycatsHouse1FText2::
text "My daughter likes"
line "to mimic people."
@@ -15,11 +15,6 @@ _CopycatsHouse1FText2:: ; a1535 (28:5535)
cont "around here!"
done
-_CopycatsHouse1FText3:: ; a1596 (28:5596)
-IF DEF(_YELLOW)
- text "CHANSEY: Chaan"
- line "sey!@@"
-ELSE
+_CopycatsHouse1FText3::
text "CHANSEY: Chaan!"
line "Sii!@@"
-ENDC
diff --git a/text/maps/copycats_house_2f.asm b/text/maps/copycats_house_2f.asm
index 85202aa8..8f59f22f 100644
--- a/text/maps/copycats_house_2f.asm
+++ b/text/maps/copycats_house_2f.asm
@@ -1,4 +1,4 @@
-_CopycatsHouse2FText_5ccd4:: ; a15ad (28:55ad)
+_CopycatsHouse2FText_5ccd4::
text $52, ": Hi! Do"
line "you like #MON?"
@@ -15,7 +15,7 @@ _CopycatsHouse2FText_5ccd4:: ; a15ad (28:55ad)
line "favorite hobby!"
prompt
-_TM31PreReceiveText:: ; a1636 (28:5636)
+_TM31PreReceiveText::
text "Oh wow!"
line "A # DOLL!"
@@ -26,13 +26,13 @@ _TM31PreReceiveText:: ; a1636 (28:5636)
line "this, then!"
prompt
-_ReceivedTM31Text:: ; a1675 (28:5675)
+_ReceivedTM31Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM31ExplanationText1:: ; a1689 (28:5689)
+_TM31ExplanationText1::
db $0
para "TM31 contains my"
line "favorite, MIMIC!"
@@ -40,7 +40,7 @@ _TM31ExplanationText1:: ; a1689 (28:5689)
para "Use it on a good"
line "#MON!@@"
-_TM31ExplanationText2:: ; a16c5 (28:56c5)
+_TM31ExplanationText2::
text $52, ": Hi!"
line "Thanks for TM31!"
@@ -54,11 +54,11 @@ _TM31ExplanationText2:: ; a16c5 (28:56c5)
line "It's a scream!"
done
-_TM31NoRoomText:: ; a1733 (28:5733)
+_TM31NoRoomText::
text "Don't you want"
line "this?@@"
-_CopycatsHouse2FText2:: ; a1749 (28:5749)
+_CopycatsHouse2FText2::
text "DODUO: Giiih!"
para "MIRROR MIRROR ON"
@@ -67,19 +67,19 @@ _CopycatsHouse2FText2:: ; a1749 (28:5749)
cont "OF ALL?"
done
-_CopycatsHouse2FText3:: ; a1792 (28:5792)
+_CopycatsHouse2FText3::
text "This is a rare"
line "#MON! Huh?"
cont "It's only a doll!"
done
-_CopycatsHouse2FText6:: ; a17be (28:57be)
+_CopycatsHouse2FText6::
text "A game with MARIO"
line "wearing a bucket"
cont "on his head!"
done
-_CopycatsHouse2FText_5cd17:: ; a17ef (28:57ef)
+_CopycatsHouse2FText_5cd17::
text "..."
para "My Secrets!"
@@ -91,7 +91,7 @@ _CopycatsHouse2FText_5cd17:: ; a17ef (28:57ef)
cont "CLEFAIRY!"
done
-_CopycatsHouse2FText_5cd1c:: ; a1842 (28:5842)
+_CopycatsHouse2FText_5cd1c::
text "Huh? Can't see!"
done
diff --git a/text/maps/daycare_1.asm b/text/maps/daycare_1.asm
index 02e35344..e2e58c0c 100644
--- a/text/maps/daycare_1.asm
+++ b/text/maps/daycare_1.asm
@@ -1,16 +1,16 @@
-_DayCareIntroText:: ; 8ab95 (22:6b95)
+_DayCareIntroText::
text "I run a DAYCARE."
line "Would you like me"
cont "to raise one of"
cont "your #MON?"
done
-_DayCareWhichMonText:: ; 8abd4 (22:6bd4)
+_DayCareWhichMonText::
text "Which #MON"
line "should I raise?"
prompt
-_DayCareWillLookAfterMonText:: ; 8abf0 (22:6bf0)
+_DayCareWillLookAfterMonText::
text "Fine, I'll look"
line "after @"
TX_RAM wcd6d
@@ -18,12 +18,12 @@ _DayCareWillLookAfterMonText:: ; 8abf0 (22:6bf0)
cont "for a while."
prompt
-_DayCareComeSeeMeInAWhileText:: ; 8ac19 (22:6c19)
+_DayCareComeSeeMeInAWhileText::
text "Come see me in"
line "a while."
done
-_DayCareMonHasGrownText:: ; 8ac32 (22:6c32)
+_DayCareMonHasGrownText::
text "Your @"
TX_RAM wcd6d
db $0
@@ -37,7 +37,7 @@ _DayCareMonHasGrownText:: ; 8ac32 (22:6c32)
para "Aren't I great?"
prompt
-_DayCareOweMoneyText:: ; 8ac7d (22:6c7d)
+_DayCareOweMoneyText::
text "You owe me ¥@"
TX_BCD wDayCareTotalCost, $c2
db $0
@@ -45,14 +45,14 @@ _DayCareOweMoneyText:: ; 8ac7d (22:6c7d)
cont "of this #MON."
done
-_DayCareGotMonBackText:: ; 8acae (22:6cae)
+_DayCareGotMonBackText::
text $52, " got"
line "@"
- TX_RAM W_DAYCAREMONNAME
+ TX_RAM wDayCareMonName
text " back!"
done
-_DayCareMonNeedsMoreTimeText:: ; 8acc1 (22:6cc1)
+_DayCareMonNeedsMoreTimeText::
text "Back already?"
line "Your @"
TX_RAM wcd6d
diff --git a/text/maps/daycare_2.asm b/text/maps/daycare_2.asm
index b5104e60..f0950812 100644
--- a/text/maps/daycare_2.asm
+++ b/text/maps/daycare_2.asm
@@ -1,37 +1,33 @@
-_DayCareAllRightThenText:: ; 8c000 (23:4000)
+_DayCareAllRightThenText::
text "All right then,"
line "@@"
-_DayCareComeAgainText:: ; 8c013 (23:4013)
-IF DEF(_YELLOW)
- text "Come again."
-ELSE
+_DayCareComeAgainText::
text "come again."
-ENDC
done
-_DayCareNoRoomForMonText:: ; 8c020 (23:4020)
+_DayCareNoRoomForMonText::
text "You have no room"
line "for this #MON!"
done
-_DayCareOnlyHaveOneMonText:: ; 8c041 (23:4041)
+_DayCareOnlyHaveOneMonText::
text "You only have one"
line "#MON with you."
done
-_DayCareCantAcceptMonWithHMText:: ; 8c063 (23:4063)
+_DayCareCantAcceptMonWithHMText::
text "I can't accept a"
line "#MON that"
cont "knows an HM move."
done
-_DayCareHeresYourMonText:: ; 8c090 (23:4090)
+_DayCareHeresYourMonText::
text "Thank you! Here's"
line "your #MON!"
prompt
-_DayCareNotEnoughMoneyText:: ; 8c0ad (23:40ad)
+_DayCareNotEnoughMoneyText::
text "Hey, you don't"
line "have enough ¥!"
done
diff --git a/text/maps/digletts_cave_route_11_entrance.asm b/text/maps/digletts_cave_route_11_entrance.asm
index 782fc645..16cdb562 100644
--- a/text/maps/digletts_cave_route_11_entrance.asm
+++ b/text/maps/digletts_cave_route_11_entrance.asm
@@ -1,4 +1,4 @@
-_DiglettsCaveEntRoute11Text1:: ; 8c7f9 (23:47f9)
+_DiglettsCaveEntRoute11Text1::
text "What a surprise!"
line "DIGLETTs dug this"
cont "long tunnel!"
diff --git a/text/maps/digletts_cave_route_2_entrance.asm b/text/maps/digletts_cave_route_2_entrance.asm
index cfa69aa2..f6d5589c 100644
--- a/text/maps/digletts_cave_route_2_entrance.asm
+++ b/text/maps/digletts_cave_route_2_entrance.asm
@@ -1,4 +1,4 @@
-_DiglettsCaveRoute2Text1:: ; 8a6a7 (22:66a7)
+_DiglettsCaveRoute2Text1::
text "I went to ROCK"
line "TUNNEL, but it's"
cont "dark and scary."
diff --git a/text/maps/fan_club.asm b/text/maps/fan_club.asm
index bb1ca0f0..3e251e13 100644
--- a/text/maps/fan_club.asm
+++ b/text/maps/fan_club.asm
@@ -1,35 +1,15 @@
PikachuFanText::
text "Won't you admire"
-IF DEF(_YELLOW)
- line "my CLEFAIRY's"
-ELSE
line "my PIKACHU's"
-ENDC
cont "adorable tail?"
done
PikachuFanBetterText::
-IF DEF(_YELLOW)
- text "Humph! My CLEFAIRY"
-ELSE
text "Humph! My PIKACHU"
-ENDC
line "is twice as cute"
cont "as that one!"
done
-IF DEF(_YELLOW)
-PikachuFanPrintText::
- text "Our CHAIRMAN's new"
- line "hobby is taking"
- cont "#MON photos."
-
- para "He gave me a nice"
- line "PRINT of my cute"
- cont "CLEFAIRY."
- done
-ENDC
-
SeelFanText::
text "I just love my"
line "SEEL!"
@@ -45,22 +25,9 @@ SeelFanBetterText::
line "more attractive!"
done
-IF DEF(_YELLOW)
-SeelFanPrintText::
- text "I'm going to hook"
- line "up the cable to"
- cont "get a photo PRINT"
- cont "of my SEEL!"
- done
-ENDC
-
FanClubPikachuText::
-IF DEF(_YELLOW)
- text "CLEFAIRY: Pippii!"
-ELSE
text "PIKACHU: Chu!"
line "Pikachu!"
-ENDC
done
FanClubSeelText::
@@ -71,14 +38,8 @@ FanClubMeetChairText::
text "I chair the"
line "#MON Fan Club!"
-IF DEF(_YELLOW)
- para "I have more than"
- line "100 #MON. I"
- cont "love them all!"
-ELSE
para "I have collected"
line "over 100 #MON!"
-ENDC
para "I'm very fussy"
line "when it comes to"
@@ -86,13 +47,8 @@ ENDC
para "So..."
-IF DEF(_YELLOW)
- para "Did you come to"
- line "hear me brag"
-ELSE
para "Did you come"
line "visit to hear"
-ENDC
cont "about my #MON?"
done
@@ -169,54 +125,19 @@ FanClubBagFullText::
line "this!"
done
-IF DEF(_YELLOW)
-FanClubChairPrintText1::
- text "Hi there, ",$52,"!"
- line "Have you seen my"
- cont "#MON photos?"
-
- para "I have them framed"
- line "up on that wall."
-
- para "Ah, I know!"
-
- para "Would you like me"
- line "to take a photo"
- cont "of your #MON?"
- done
-
-FanClubChairPrintText2::
- text "No? That's really"
- line "disappointing."
- done
-
-FanClubChairPrintText3::
- text "OK, I'm done."
- done
-
-FanClubChairPrintText4::
- text "Maybe we won't"
- line "PRINT this now."
- done
-ENDC
-
-_FanClubText6:: ; 9a948 (26:6948)
-IF DEF(_YELLOW)
- text "Our CHAIRMAN is"
-ELSE
+_FanClubText6::
text "Our Chairman is"
-ENDC
line "very vocal about"
cont "#MON."
done
-_FanClubText7:: ; 9a970 (26:6970)
+_FanClubText7::
text "Let's all listen"
line "politely to other"
cont "trainers!"
done
-_FanClubText8:: ; 9a99d (26:699d)
+_FanClubText8::
text "If someone brags,"
line "brag right back!"
done
diff --git a/text/maps/fighting_dojo.asm b/text/maps/fighting_dojo.asm
index 9cf7ba4e..e8cdfb2e 100644
--- a/text/maps/fighting_dojo.asm
+++ b/text/maps/fighting_dojo.asm
@@ -1,4 +1,4 @@
-_FightingDojoText_5ce8e:: ; a1852 (28:5852)
+_FightingDojoText_5ce8e::
text "Grunt!"
para "I am the KARATE"
@@ -12,12 +12,12 @@ _FightingDojoText_5ce8e:: ; a1852 (28:5852)
para "Fwaaa!"
done
-_FightingDojoText_5ce93:: ; a18ba (28:58ba)
+_FightingDojoText_5ce93::
text "Hwa!"
line "Arrgh! Beaten!"
prompt
-_FightingDojoText_5ce98:: ; a18cf (28:58cf)
+_FightingDojoText_5ce98::
text "Indeed, I have"
line "lost!"
@@ -34,24 +34,24 @@ _FightingDojoText_5ce98:: ; a18cf (28:58cf)
line "one you like!"
done
-_FightingDojoText_5ce9d:: ; a1972 (28:5972)
+_FightingDojoText_5ce9d::
text "Ho!"
para "Stay and train at"
line "Karate with us!"
done
-_FightingDojoBattleText1:: ; a1999 (28:5999)
+_FightingDojoBattleText1::
text "Hoargh! Take your"
line "shoes off!"
done
-_FightingDojoEndBattleText1:: ; a19b7 (28:59b7)
+_FightingDojoEndBattleText1::
text "I give"
line "up!"
prompt
-_FightingDojoAfterBattleText1:: ; a19c3 (28:59c3)
+_FightingDojoAfterBattleText1::
text "You wait 'til you"
line "see our Master!"
@@ -59,22 +59,22 @@ _FightingDojoAfterBattleText1:: ; a19c3 (28:59c3)
line "compared to him!"
done
-_FightingDojoBattleText2:: ; a1a05 (28:5a05)
+_FightingDojoBattleText2::
text "I hear you're"
line "good! Show me!"
done
-_FightingDojoEndBattleText2:: ; a1a22 (28:5a22)
+_FightingDojoEndBattleText2::
text "Judge!"
line "1 point!"
prompt
-_FightingDojoAfterBattleText2:: ; a1a33 (28:5a33)
+_FightingDojoAfterBattleText2::
text "Our Master is a"
line "pro fighter!"
done
-_FightingDojoBattleText3:: ; a1a51 (28:5a51)
+_FightingDojoBattleText3::
text "Nothing tough"
line "frightens me!"
@@ -82,18 +82,18 @@ _FightingDojoBattleText3:: ; a1a51 (28:5a51)
line "for training!"
done
-_FightingDojoEndBattleText3:: ; a1a8d (28:5a8d)
+_FightingDojoEndBattleText3::
text "Yow!"
line "Stubbed fingers!"
prompt
-_FightingDojoAfterBattleText3:: ; a1aa4 (28:5aa4)
+_FightingDojoAfterBattleText3::
text "The only thing"
line "that frightens us"
cont "is psychic power!"
done
-_FightingDojoBattleText4:: ; a1ad8 (28:5ad8)
+_FightingDojoBattleText4::
text "Hoohah!"
para "You're trespassing"
@@ -101,38 +101,30 @@ _FightingDojoBattleText4:: ; a1ad8 (28:5ad8)
cont "DOJO!"
done
-_FightingDojoEndBattleText4:: ; a1b09 (28:5b09)
+_FightingDojoEndBattleText4::
text "Oof!"
line "I give up!"
prompt
-_FightingDojoAfterBattleText4:: ; a1b1a (28:5b1a)
+_FightingDojoAfterBattleText4::
text "The prime fighters"
line "across the land"
cont "train here."
done
-_WantHitmonleeText:: ; a1b4a (28:5b4a)
+_WantHitmonleeText::
text "You want the"
-IF DEF(_YELLOW)
- line "hard-kicking"
-ELSE
line "hard kicking"
-ENDC
cont "HITMONLEE?"
done
-_WantHitmonchanText:: ; a1b70 (28:5b70)
+_WantHitmonchanText::
text "You want the"
-IF DEF(_YELLOW)
- line "piston-punching"
-ELSE
line "piston punching"
-ENDC
cont "HITMONCHAN?"
done
-_OtherHitmonText:: ; a1b9a (28:5b9a)
+_OtherHitmonText::
text "Better not get"
line "greedy..."
done
diff --git a/text/maps/fuchsia_city.asm b/text/maps/fuchsia_city.asm
index bcb80d0e..3d6fa0c0 100644
--- a/text/maps/fuchsia_city.asm
+++ b/text/maps/fuchsia_city.asm
@@ -1,11 +1,11 @@
-_FuchsiaCityText1:: ; a5e9c (29:5e9c)
+_FuchsiaCityText1::
text "Did you try the"
line "SAFARI GAME? Some"
cont "#MON can only"
cont "be caught there."
done
-_FuchsiaCityText2:: ; a5ede (29:5ede)
+_FuchsiaCityText2::
text "SAFARI ZONE has a"
line "zoo in front of"
cont "the entrance."
@@ -15,71 +15,67 @@ _FuchsiaCityText2:: ; a5ede (29:5ede)
cont "catching #MON."
done
-_FuchsiaCityText3:: ; a5f3e (29:5f3e)
+_FuchsiaCityText3::
text "ERIK: Where's"
line "SARA? I said I'd"
cont "meet her here."
done
-_FuchsiaCityText4:: ; a5f6b (29:5f6b)
+_FuchsiaCityText4::
text "That item ball in"
line "there is really a"
cont "#MON."
done
-_FuchsiaCityText5:: ; a5f96 (29:5f96)
+_FuchsiaCityText5::
text "!"
done
-_FuchsiaCityText11:: ; a5f99 (29:5f99)
+_FuchsiaCityText11::
text "FUCHSIA CITY"
line "Behold! It's"
cont "Passion Pink!"
done
-_FuchsiaCityText13:: ; a5fc1 (29:5fc1)
+_FuchsiaCityText13::
text "SAFARI GAME"
line "#MON-U-CATCH!"
done
-_FuchsiaCityText16:: ; a5fdc (29:5fdc)
+_FuchsiaCityText16::
text "SAFARI ZONE"
line "WARDEN's HOME"
done
-_FuchsiaCityText17:: ; a5ff6 (29:5ff6)
+_FuchsiaCityText17::
text "#MON PARADISE"
line "SAFARI ZONE"
done
-_FuchsiaCityText18:: ; a6011 (29:6011)
+_FuchsiaCityText18::
text "FUCHSIA CITY"
line "#MON GYM"
cont "LEADER: KOGA"
para "The Poisonous"
-IF DEF(_YELLOW)
- line "Ninja Master!"
-ELSE
line "Ninja Master"
-ENDC
done
-_FuchsiaCityChanseyText:: ; a6050 (29:6050)
+_FuchsiaCityChanseyText::
text "Name: CHANSEY"
para "Catching one is"
line "all up to chance."
prompt
-_FuchsiaCityVoltorbText:: ; a6081 (29:6081)
+_FuchsiaCityVoltorbText::
text "Name: VOLTORB"
para "The very image of"
line "a # BALL."
prompt
-_FuchsiaCityKangaskhanText:: ; a60ac (29:60ac)
+_FuchsiaCityKangaskhanText::
text "Name: KANGASKHAN"
para "A maternal #MON"
@@ -88,21 +84,21 @@ _FuchsiaCityKangaskhanText:: ; a60ac (29:60ac)
cont "on its belly."
prompt
-_FuchsiaCitySlowpokeText:: ; a60fd (29:60fd)
+_FuchsiaCitySlowpokeText::
text "Name: SLOWPOKE"
para "Friendly and very"
line "slow moving."
prompt
-_FuchsiaCityLaprasText:: ; a612c (29:612c)
+_FuchsiaCityLaprasText::
text "Name: LAPRAS"
para "A.K.A. the king"
line "of the seas."
prompt
-_FuchsiaCityOmanyteText:: ; a6157 (29:6157)
+_FuchsiaCityOmanyteText::
text "Name: OMANYTE"
para "A #MON that"
@@ -110,7 +106,7 @@ _FuchsiaCityOmanyteText:: ; a6157 (29:6157)
cont "from a fossil."
prompt
-_FuchsiaCityKabutoText:: ; a6191 (29:6191)
+_FuchsiaCityKabutoText::
text "Name: KABUTO"
para "A #MON that"
@@ -118,7 +114,7 @@ _FuchsiaCityKabutoText:: ; a6191 (29:6191)
cont "from a fossil."
prompt
-_FuchsiaCityText_19b2a:: ; a61ca (29:61ca)
+_FuchsiaCityText_19b2a::
text "..."
done
diff --git a/text/maps/fuchsia_fishing_house.asm b/text/maps/fuchsia_fishing_house.asm
index 23d0476b..4f0c98b5 100644
--- a/text/maps/fuchsia_fishing_house.asm
+++ b/text/maps/fuchsia_fishing_house.asm
@@ -1,4 +1,4 @@
-_FuchsiaHouse3Text_561bd:: ; a0695 (28:4695)
+_FuchsiaHouse3Text_561bd::
text "I'm the FISHING"
line "GURU's older"
cont "brother!"
@@ -10,7 +10,7 @@ _FuchsiaHouse3Text_561bd:: ; a0695 (28:4695)
line "fish?"
done
-_FuchsiaHouse3Text_561c2:: ; a06e8 (28:46e8)
+_FuchsiaHouse3Text_561c2::
text "Grand! I like"
line "your style!"
@@ -22,12 +22,12 @@ _FuchsiaHouse3Text_561c2:: ; a06e8 (28:46e8)
TX_RAM wcf4b
text "!@@"
-_FuchsiaHouse3Text_56212:: ; a0737 (28:4737)
+_FuchsiaHouse3Text_56212::
text "Oh... That's so"
line "disappointing..."
done
-_FuchsiaHouse3Text_56217:: ; a0758 (28:4758)
+_FuchsiaHouse3Text_56217::
text "Hello there,"
line $52, "!"
@@ -35,7 +35,7 @@ _FuchsiaHouse3Text_56217:: ; a0758 (28:4758)
line "biting?"
done
-_FuchsiaHouse3Text_5621c:: ; a0782 (28:4782)
+_FuchsiaHouse3Text_5621c::
text "Oh no!"
para "You have no room"
diff --git a/text/maps/fuchsia_gym_1.asm b/text/maps/fuchsia_gym_1.asm
index a877c0a1..3938f9af 100644
--- a/text/maps/fuchsia_gym_1.asm
+++ b/text/maps/fuchsia_gym_1.asm
@@ -1,4 +1,4 @@
-_KogaBeforeBattleText:: ; 9e9b1 (27:69b1)
+_KogaBeforeBattleText::
text "KOGA: Fwahahaha!"
para "A mere child like"
@@ -16,7 +16,7 @@ _KogaBeforeBattleText:: ; 9e9b1 (27:69b1)
cont "techniques!"
done
-_KogaAfterBattleText:: ; 9ea66 (27:6a66)
+_KogaAfterBattleText::
text "Humph!"
line "You have proven"
cont "your worth!"
diff --git a/text/maps/fuchsia_gym_2.asm b/text/maps/fuchsia_gym_2.asm
index 73c9d31e..8b7c84ac 100644
--- a/text/maps/fuchsia_gym_2.asm
+++ b/text/maps/fuchsia_gym_2.asm
@@ -1,4 +1,4 @@
-_KogaExplainToxicText:: ; a0000 (28:4000)
+_KogaExplainToxicText::
text "When afflicted by"
line "TOXIC, #MON"
cont "suffer more and"
@@ -9,7 +9,7 @@ _KogaExplainToxicText:: ; a0000 (28:4000)
line "terrorize foes!"
done
-_FuchsiaGymText9:: ; a0069 (28:4069)
+_FuchsiaGymText9::
text "Now that you have"
line "the SOULBADGE,"
cont "the DEFENSE of"
@@ -24,13 +24,13 @@ _FuchsiaGymText9:: ; a0069 (28:4069)
line "too!"
done
-_ReceivedTM06Text:: ; a00eb (28:40eb)
+_ReceivedTM06Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM06ExplanationText:: ; a00ff (28:40ff)
+_TM06ExplanationText::
db $0
para "TM06 contains"
line "TOXIC!"
@@ -40,12 +40,12 @@ _TM06ExplanationText:: ; a00ff (28:40ff)
cont "400 years old!"
done
-_TM06NoRoomText:: ; a0143 (28:4143)
+_TM06NoRoomText::
text "Make space for"
line "this, child!"
done
-_FuchsiaGymBattleText1:: ; a0160 (28:4160)
+_FuchsiaGymBattleText1::
text "Strength isn't"
line "the key for"
cont "#MON!"
@@ -57,54 +57,54 @@ _FuchsiaGymBattleText1:: ; a0160 (28:4160)
cont "brute strength!"
done
-_FuchsiaGymEndBattleText1:: ; a01c2 (28:41c2)
+_FuchsiaGymEndBattleText1::
text "What?"
line "Extraordinary!"
prompt
-_FuchsiaGymAfterBattleText1:: ; a01d8 (28:41d8)
+_FuchsiaGymAfterBattleText1::
text "So, you mix brawn"
line "with brains?"
cont "Good strategy!"
done
-_FuchsiaGymBattleText2:: ; a0207 (28:4207)
+_FuchsiaGymBattleText2::
text "I wanted to become"
line "a ninja, so I"
cont "joined this GYM!"
done
-_FuchsiaGymEndBattleText2:: ; a023a (28:423a)
+_FuchsiaGymEndBattleText2::
text "I'm done"
line "for!"
prompt
-_FuchsiaGymAfterBattleText2:: ; a0248 (28:4248)
+_FuchsiaGymAfterBattleText2::
text "I will keep on"
line "training under"
cont "KOGA, my ninja"
cont "master!"
done
-_FuchsiaGymBattleText3:: ; a027e (28:427e)
+_FuchsiaGymBattleText3::
text "Let's see you"
line "beat my special"
cont "techniques!"
done
-_FuchsiaGymEndBattleText3:: ; a02a8 (28:42a8)
+_FuchsiaGymEndBattleText3::
text "You"
line "had me fooled!"
prompt
-_FuchsiaGymAfterBattleText3:: ; a02bc (28:42bc)
+_FuchsiaGymAfterBattleText3::
text "I like poison and"
line "sleep techniques,"
cont "as they linger"
cont "after battle!"
done
-_FuchsiaGymBattleText4:: ; a02fe (28:42fe)
+_FuchsiaGymBattleText4::
text "Stop right there!"
para "Our invisible"
@@ -112,12 +112,12 @@ _FuchsiaGymBattleText4:: ; a02fe (28:42fe)
cont "frustrated?"
done
-_FuchsiaGymEndBattleText4:: ; a033a (28:433a)
+_FuchsiaGymEndBattleText4::
text "Whoa!"
line "He's got it!"
prompt
-_FuchsiaGymAfterBattleText4:: ; a034d (28:434d)
+_FuchsiaGymAfterBattleText4::
text "You impressed me!"
line "Here's a hint!"
@@ -126,7 +126,7 @@ _FuchsiaGymAfterBattleText4:: ; a034d (28:434d)
cont "invisible walls!"
done
-_FuchsiaGymBattleText5:: ; a03a1 (28:43a1)
+_FuchsiaGymBattleText5::
text "I also study the"
line "way of the ninja"
cont "with master KOGA!"
@@ -136,16 +136,16 @@ _FuchsiaGymBattleText5:: ; a03a1 (28:43a1)
cont "animals!"
done
-_FuchsiaGymEndBattleText5:: ; a0402 (28:4402)
+_FuchsiaGymEndBattleText5::
text "Awoo!"
prompt
-_FuchsiaGymAfterBattleText5:: ; a0409 (28:4409)
+_FuchsiaGymAfterBattleText5::
text "I still have much"
line "to learn!"
done
-_FuchsiaGymBattleText6:: ; a0426 (28:4426)
+_FuchsiaGymBattleText6::
text "Master KOGA comes"
line "from a long line"
cont "of ninjas!"
@@ -154,12 +154,12 @@ _FuchsiaGymBattleText6:: ; a0426 (28:4426)
line "descend from?"
done
-_FuchsiaGymEndBattleText6:: ; a0470 (28:4470)
+_FuchsiaGymEndBattleText6::
text "Dropped"
line "my balls!"
prompt
-_FuchsiaGymAfterBattleText6:: ; a0483 (28:4483)
+_FuchsiaGymAfterBattleText6::
text "Where there is"
line "light, there is"
cont "shadow!"
@@ -169,7 +169,7 @@ _FuchsiaGymAfterBattleText6:: ; a0483 (28:4483)
cont "choose?"
done
-_FuchsiaGymText_7564e:: ; a04d2 (28:44d2)
+_FuchsiaGymText_7564e::
text "Yo! Champ in"
line "making!"
@@ -186,7 +186,7 @@ _FuchsiaGymText_7564e:: ; a04d2 (28:44d2)
cont "to reach him!"
done
-_FuchsiaGymText_75653:: ; a0574 (28:4574)
+_FuchsiaGymText_75653::
text "It's amazing how"
line "ninja can terrify"
cont "even now!"
diff --git a/text/maps/fuchsia_house.asm b/text/maps/fuchsia_house.asm
index de613e3d..a4b14eb6 100644
--- a/text/maps/fuchsia_house.asm
+++ b/text/maps/fuchsia_house.asm
@@ -1,4 +1,4 @@
-_FuchsiaHouse1Text1:: ; 9e2a3 (27:62a3)
+_FuchsiaHouse1Text1::
text "SAFARI ZONE's"
line "WARDEN is old,"
cont "but still active!"
@@ -7,7 +7,7 @@ _FuchsiaHouse1Text1:: ; 9e2a3 (27:62a3)
line "false, though."
done
-_FuchsiaHouse1Text2:: ; 9e2f3 (27:62f3)
+_FuchsiaHouse1Text2::
text "Hmm? You've met"
line "BILL?"
@@ -18,7 +18,7 @@ _FuchsiaHouse1Text2:: ; 9e2f3 (27:62f3)
cont "even as a child!"
done
-_FuchsiaHouse1Text3:: ; 9e34d (27:634d)
+_FuchsiaHouse1Text3::
text "BILL files his"
line "own #MON data"
cont "on his PC!"
diff --git a/text/maps/fuchsia_mart.asm b/text/maps/fuchsia_mart.asm
index fe05f2af..6764e3a8 100644
--- a/text/maps/fuchsia_mart.asm
+++ b/text/maps/fuchsia_mart.asm
@@ -1,4 +1,4 @@
-_FuchsiaMartText2:: ; 9e22e (27:622e)
+_FuchsiaMartText2::
text "Do you have a"
line "SAFARI ZONE flag?"
@@ -6,7 +6,7 @@ _FuchsiaMartText2:: ; 9e22e (27:622e)
line "or calendars?"
done
-_FuchsiaMartText3:: ; 9e26e (27:626e)
+_FuchsiaMartText3::
text "Did you try X"
line "SPEED? It speeds"
cont "up a #MON in"
diff --git a/text/maps/fuchsia_meeting_room.asm b/text/maps/fuchsia_meeting_room.asm
index cfd7e1c2..1fa81344 100644
--- a/text/maps/fuchsia_meeting_room.asm
+++ b/text/maps/fuchsia_meeting_room.asm
@@ -1,4 +1,4 @@
-_FuchsiaMeetingRoomText1:: ; a05a1 (28:45a1)
+_FuchsiaMeetingRoomText1::
text "We nicknamed the"
line "WARDEN SLOWPOKE."
@@ -6,7 +6,7 @@ _FuchsiaMeetingRoomText1:: ; a05a1 (28:45a1)
line "both look vacant!"
done
-_FuchsiaMeetingRoomText2:: ; a05e6 (28:45e6)
+_FuchsiaMeetingRoomText2::
text "SLOWPOKE is very"
line "knowledgeable"
cont "about #MON!"
@@ -16,7 +16,7 @@ _FuchsiaMeetingRoomText2:: ; a05e6 (28:45e6)
cont "extinct #MON!"
done
-_FuchsiaMeetingRoomText3:: ; a0642 (28:4642)
+_FuchsiaMeetingRoomText3::
text "SLOWPOKE came in,"
line "but I couldn't"
cont "understand him."
diff --git a/text/maps/fuchsia_pokecenter.asm b/text/maps/fuchsia_pokecenter.asm
index 7f9d1221..617c3b84 100644
--- a/text/maps/fuchsia_pokecenter.asm
+++ b/text/maps/fuchsia_pokecenter.asm
@@ -1,4 +1,4 @@
-_FuchsiaPokecenterText1:: ; 9e387 (27:6387)
+_FuchsiaPokecenterText1::
text "You can't win"
line "with just one"
cont "strong #MON."
@@ -8,7 +8,7 @@ _FuchsiaPokecenterText1:: ; 9e387 (27:6387)
cont "them evenly."
done
-_FuchsiaPokecenterText3:: ; 9e3de (27:63de)
+_FuchsiaPokecenterText3::
text "There's a narrow"
line "trail west of"
cont "VIRIDIAN CITY."
diff --git a/text/maps/fujis_house.asm b/text/maps/fujis_house.asm
index b54c55f2..e75d46ea 100644
--- a/text/maps/fujis_house.asm
+++ b/text/maps/fujis_house.asm
@@ -1,16 +1,16 @@
-_LavenderHouse1Text_1d8d1:: ; 99e8d (26:5e8d)
+_LavenderHouse1Text_1d8d1::
text "That's odd, MR.FUJI"
line "isn't here."
cont "Where'd he go?"
done
-_LavenderHouse1Text_1d8d6:: ; 99eba (26:5eba)
+_LavenderHouse1Text_1d8d6::
text "MR.FUJI had been"
line "praying alone for"
cont "CUBONE's mother."
done
-_LavenderHouse1Text_1d8f4:: ; 99eee (26:5eee)
+_LavenderHouse1Text_1d8f4::
text "This is really"
line "MR.FUJI's house."
@@ -21,19 +21,19 @@ _LavenderHouse1Text_1d8f4:: ; 99eee (26:5eee)
cont "orphaned #MON!"
done
-_LavenderHouse1Text_1d8f9:: ; 99f4b (26:5f4b)
+_LavenderHouse1Text_1d8f9::
text "It's so warm!"
line "#MON are so"
cont "nice to hug!"
done
-_LavenderHouse1Text3:: ; 99f72 (26:5f72)
+_LavenderHouse1Text3::
text "PSYDUCK: Gwappa!@@"
-_LavenderHouse1Text4:: ; 99f85 (26:5f85)
+_LavenderHouse1Text4::
text "NIDORINO: Gaoo!@@"
-_LavenderHouse1Text_1d94c:: ; 99f97 (26:5f97)
+_LavenderHouse1Text_1d94c::
text "MR.FUJI: ", $52, "."
para "Your #DEX quest"
@@ -45,13 +45,13 @@ _LavenderHouse1Text_1d94c:: ; 99f97 (26:5f97)
line "help your quest."
prompt
-_ReceivedFluteText:: ; 99ffb (26:5ffb)
+_ReceivedFluteText::
text $52, " received"
line "a @"
TX_RAM wcf4b
text "!@@"
-_FluteExplanationText:: ; 9a011 (26:6011)
+_FluteExplanationText::
db $0
para "Upon hearing #"
line "FLUTE, sleeping"
@@ -62,17 +62,17 @@ _FluteExplanationText:: ; 9a011 (26:6011)
line "sleeping #MON."
done
-_FluteNoRoomText:: ; 9a069 (26:6069)
+_FluteNoRoomText::
text "You must make"
line "room for this!"
done
-_MrFujiAfterFluteText:: ; 9a087 (26:6087)
+_MrFujiAfterFluteText::
text "MR.FUJI: Has my"
line "FLUTE helped you?"
done
-_LavenderHouse1Text6:: ; 9a0aa (26:60aa)
+_LavenderHouse1Text6::
text "#MON Monthly"
line "Grand Prize"
cont "Drawing!"
diff --git a/text/maps/hall_of_fame.asm b/text/maps/hall_of_fame.asm
index cb0cc622..cf79e221 100644
--- a/text/maps/hall_of_fame.asm
+++ b/text/maps/hall_of_fame.asm
@@ -1,10 +1,6 @@
-_HallofFameRoomText1:: ; 85fb5 (21:5fb5)
+_HallofFameRoomText1::
text "OAK: Er-hem!"
-IF DEF(_YELLOW)
- line "Congratulations,"
-ELSE
line "Congratulations"
-ENDC
cont $52, "!"
para "This floor is the"
diff --git a/text/maps/indigo_plateau_lobby.asm b/text/maps/indigo_plateau_lobby.asm
index b4b6d29d..bfac25c3 100644
--- a/text/maps/indigo_plateau_lobby.asm
+++ b/text/maps/indigo_plateau_lobby.asm
@@ -1,4 +1,4 @@
-_IndigoPlateauLobbyText1:: ; a13f0 (28:53f0)
+_IndigoPlateauLobbyText1::
text "Yo! Champ in"
line "making!"
@@ -13,7 +13,7 @@ _IndigoPlateauLobbyText1:: ; a13f0 (28:53f0)
cont "is it! Go for it!"
done
-_IndigoPlateauLobbyText3:: ; a148b (28:548b)
+_IndigoPlateauLobbyText3::
text "From here on, you"
line "face the ELITE"
cont "FOUR one by one!"
diff --git a/text/maps/lance.asm b/text/maps/lance.asm
index 35ef3546..f6890896 100644
--- a/text/maps/lance.asm
+++ b/text/maps/lance.asm
@@ -1,10 +1,6 @@
-_LanceBeforeBattleText:: ; 85d3c (21:5d3c)
+_LanceBeforeBattleText::
text "Ah! I heard about"
-IF DEF(_YELLOW)
- line "you, ", $52, "!"
-ELSE
line "you ", $52, "!"
-ENDC
para "I lead the ELITE"
line "FOUR! You can"
@@ -31,7 +27,7 @@ ENDC
cont "with me, ", $52, "!"
done
-_LanceEndBattleText:: ; 85e64 (21:5e64)
+_LanceEndBattleText::
text "That's it!"
para "I hate to admit"
@@ -39,7 +35,7 @@ _LanceEndBattleText:: ; 85e64 (21:5e64)
cont "#MON master!"
prompt
-_LanceAfterBattleText:: ; 85e9e (21:5e9e)
+_LanceAfterBattleText::
text "I still can't"
line "believe my"
cont "dragons lost to"
diff --git a/text/maps/lavender_house.asm b/text/maps/lavender_house.asm
index 0ae3a1fe..d92f0c68 100644
--- a/text/maps/lavender_house.asm
+++ b/text/maps/lavender_house.asm
@@ -1,7 +1,7 @@
-_LavenderHouse2Text1:: ; 9a238 (26:6238)
+_LavenderHouse2Text1::
text "CUBONE: Kyarugoo!@@"
-_LavenderHouse2Text_1d9dc:: ; 9a24c (26:624c)
+_LavenderHouse2Text_1d9dc::
text "I hate those"
line "horrible ROCKETs!"
@@ -13,7 +13,7 @@ _LavenderHouse2Text_1d9dc:: ; 9a24c (26:624c)
cont "from TEAM ROCKET!"
done
-_LavenderHouse2Text_1d9e1:: ; 9a2b9 (26:62b9)
+_LavenderHouse2Text_1d9e1::
text "The GHOST of"
line "#MON TOWER is"
cont "gone!"
diff --git a/text/maps/lavender_mart.asm b/text/maps/lavender_mart.asm
index 53ebdae3..69b8096f 100644
--- a/text/maps/lavender_mart.asm
+++ b/text/maps/lavender_mart.asm
@@ -1,4 +1,4 @@
-_LavenderMartText2:: ; 9a104 (26:6104)
+_LavenderMartText2::
text "I'm searching for"
line "items that raise"
cont "the abilities of"
@@ -14,13 +14,13 @@ _LavenderMartText2:: ; 9a104 (26:6104)
line "I can get them?"
done
-_LavenderMart_5c953:: ; 9a1b4 (26:61b4)
+_LavenderMart_5c953::
text "You know REVIVE?"
line "It revives any"
cont "fainted #MON!"
done
-_LavenderMart_5c958:: ; 9a1e3 (26:61e3)
+_LavenderMart_5c958::
text "I found a NUGGET"
line "in the mountains."
diff --git a/text/maps/lavender_pokecenter.asm b/text/maps/lavender_pokecenter.asm
index 9f8c3e34..d982fa75 100644
--- a/text/maps/lavender_pokecenter.asm
+++ b/text/maps/lavender_pokecenter.asm
@@ -1,12 +1,12 @@
-_LavenderPokecenterText4:: ; 9940e (26:540e)
-_LavenderPokecenterText2:: ; 9940e (26:540e)
-_LavenderPokecenterText1:: ; 9940e (26:540e)
+_LavenderPokecenterText4::
+_LavenderPokecenterText2::
+_LavenderPokecenterText1::
text "TEAM ROCKET will"
line "do anything for"
cont "the sake of gold!"
done
-_LavenderPokecenterText3:: ; 99442 (26:5442)
+_LavenderPokecenterText3::
text "I saw CUBONE's"
line "mother die trying"
cont "to escape from"
diff --git a/text/maps/lavender_town.asm b/text/maps/lavender_town.asm
index f6485c6f..d3b41ffa 100644
--- a/text/maps/lavender_town.asm
+++ b/text/maps/lavender_town.asm
@@ -1,14 +1,14 @@
-_LavenderTownText_4413c:: ; a5482 (29:5482)
+_LavenderTownText_4413c::
text "Do you believe in"
line "GHOSTs?"
done
-_LavenderTownText_44141:: ; a549d (29:549d)
+_LavenderTownText_44141::
text "Really? So there"
line "are believers..."
done
-_LavenderTownText_44146:: ; a54c0 (29:54c0)
+_LavenderTownText_44146::
text "Hahaha, I guess"
line "not."
@@ -17,7 +17,7 @@ _LavenderTownText_44146:: ; a54c0 (29:54c0)
cont "it's not real."
done
-_LavenderTownText2:: ; a5506 (29:5506)
+_LavenderTownText2::
text "This town is known"
line "as the grave site"
cont "of #MON."
@@ -27,7 +27,7 @@ _LavenderTownText2:: ; a5506 (29:5506)
cont "#MON TOWER."
done
-_LavenderTownText3:: ; a555f (29:555f)
+_LavenderTownText3::
text "GHOSTs appeared"
line "in #MON TOWER."
@@ -37,13 +37,13 @@ _LavenderTownText3:: ; a555f (29:555f)
cont "ROCKETs killed."
done
-_LavenderTownText4:: ; a55bb (29:55bb)
+_LavenderTownText4::
text "LAVENDER TOWN"
line "The Noble Purple"
cont "Town"
done
-_LavenderTownText5:: ; a55e0 (29:55e0)
+_LavenderTownText5::
text "New SILPH SCOPE!"
para "Make the Invisible"
@@ -52,12 +52,12 @@ _LavenderTownText5:: ; a55e0 (29:55e0)
para "SILPH CO."
done
-_LavenderTownText8:: ; a561d (29:561d)
+_LavenderTownText8::
text "LAVENDER VOLUNTEER"
line "#MON HOUSE"
done
-_LavenderTownText9:: ; a563c (29:563c)
+_LavenderTownText9::
text "May the Souls of"
line "#MON Rest Easy"
cont "#MON TOWER"
diff --git a/text/maps/lorelei.asm b/text/maps/lorelei.asm
index 2ec3c74d..91e90b75 100644
--- a/text/maps/lorelei.asm
+++ b/text/maps/lorelei.asm
@@ -1,4 +1,4 @@
-_LoreleiBeforeBattleText:: ; 865ef (21:65ef)
+_LoreleiBeforeBattleText::
text "Welcome to"
line "#MON LEAGUE!"
@@ -21,12 +21,12 @@ _LoreleiBeforeBattleText:: ; 865ef (21:65ef)
line "Are you ready?"
done
-_LoreleiEndBattleText:: ; 866c4 (21:66c4)
+_LoreleiEndBattleText::
text "How"
line "dare you!"
prompt
-_LoreleiAfterBattleText:: ; 866d3 (21:66d3)
+_LoreleiAfterBattleText::
text "You're better"
line "than I thought!"
cont "Go on ahead!"
@@ -36,7 +36,7 @@ _LoreleiAfterBattleText:: ; 866d3 (21:66d3)
cont "LEAGUE power!"
done
-_LoreleiDontRunAwayText:: ; 86729 (21:6729)
+_LoreleiDontRunAwayText::
text "Someone's voice:"
line "Don't run away!"
done
diff --git a/text/maps/mansion_1f.asm b/text/maps/mansion_1f.asm
index 96cc4c21..3ddd5660 100644
--- a/text/maps/mansion_1f.asm
+++ b/text/maps/mansion_1f.asm
@@ -1,30 +1,30 @@
-_Mansion1BattleText2:: ; a07a8 (28:47a8)
+_Mansion1BattleText2::
text "Who are you? There"
line "shouldn't be"
cont "anyone here."
done
-_Mansion1EndBattleText2:: ; a07d5 (28:47d5)
+_Mansion1EndBattleText2::
text "Ouch!"
prompt
-_Mansion1AfterBattleText2:: ; a07dc (28:47dc)
+_Mansion1AfterBattleText2::
text "A key? I don't"
line "know what you're"
cont "talking about."
done
-_MansionSwitchText:: ; a080a (28:480a)
+_MansionSwitchText::
text "A secret switch!"
para "Press it?"
done
-_MansionSwitchPressedText:: ; a0826 (28:4826)
+_MansionSwitchPressedText::
text "Who wouldn't?"
prompt
-_MansionSwitchNotPressedText:: ; a0834 (28:4834)
+_MansionSwitchNotPressedText::
text "Not quite yet!"
done
diff --git a/text/maps/mansion_2f.asm b/text/maps/mansion_2f.asm
index 057e05e2..c7e12408 100644
--- a/text/maps/mansion_2f.asm
+++ b/text/maps/mansion_2f.asm
@@ -1,21 +1,21 @@
-_Mansion2BattleText1:: ; 852b7 (21:52b7)
+_Mansion2BattleText1::
text "I can't get out!"
line "This old place is"
cont "one big puzzle!"
done
-_Mansion2EndBattleText1:: ; 852ea (21:52ea)
+_Mansion2EndBattleText1::
text "Oh no!"
line "My bag of loot!"
prompt
-_Mansion2AfterBattleText1:: ; 85302 (21:5302)
+_Mansion2AfterBattleText1::
text "Switches open and"
line "close alternating"
cont "sets of doors!"
done
-_Mansion2Text3:: ; 85336 (21:5336)
+_Mansion2Text3::
text "Diary: July 5"
line "Guyana,"
cont "South America"
@@ -25,24 +25,24 @@ _Mansion2Text3:: ; 85336 (21:5336)
cont "in the jungle."
done
-_Mansion2Text4:: ; 85389 (21:5389)
+_Mansion2Text4::
text "Diary: July 10"
line "We christened the"
cont "newly discovered"
cont "#MON, MEW."
done
-_Mansion2Text_520c2:: ; 853c7 (21:53c7)
+_Mansion2Text_520c2::
text "A secret switch!"
para "Press it?"
done
-_Mansion2Text_520c7:: ; 853e3 (21:53e3)
+_Mansion2Text_520c7::
text "Who wouldn't?"
prompt
-_Mansion2Text_520cc:: ; 853f1 (21:53f1)
+_Mansion2Text_520cc::
text "Not quite yet!"
done
diff --git a/text/maps/mansion_3f.asm b/text/maps/mansion_3f.asm
index e46532f9..7e48a844 100644
--- a/text/maps/mansion_3f.asm
+++ b/text/maps/mansion_3f.asm
@@ -1,34 +1,34 @@
-_Mansion3BattleText1:: ; 85401 (21:5401)
+_Mansion3BattleText1::
text "This place is"
line "like, huge!"
done
-_Mansion3EndBattleText1:: ; 8541c (21:541c)
+_Mansion3EndBattleText1::
text "Ayah!"
prompt
-_Mansion3AfterBattleText1:: ; 85423 (21:5423)
+_Mansion3AfterBattleText1::
text "I wonder where"
line "my partner went."
done
-_Mansion3BattleText2:: ; 85444 (21:5444)
+_Mansion3BattleText2::
text "My mentor once"
line "lived here."
done
-_Mansion3EndBattleText2:: ; 85460 (21:5460)
+_Mansion3EndBattleText2::
text "Whew!"
line "Overwhelming!"
prompt
-_Mansion3AfterBattleText2:: ; 85475 (21:5475)
+_Mansion3AfterBattleText2::
text "So, you're stuck?"
line "Try jumping off"
cont "over there!"
done
-_Mansion3Text5:: ; 854a3 (21:54a3)
+_Mansion3Text5::
text "Diary: Feb. 6"
line "MEW gave birth."
diff --git a/text/maps/mansion_b1f.asm b/text/maps/mansion_b1f.asm
index 761c2570..78de2abb 100644
--- a/text/maps/mansion_b1f.asm
+++ b/text/maps/mansion_b1f.asm
@@ -1,34 +1,34 @@
-_Mansion4BattleText1:: ; 854df (21:54df)
+_Mansion4BattleText1::
text "Uh-oh. Where am"
line "I now?"
done
-_Mansion4EndBattleText1:: ; 854f7 (21:54f7)
+_Mansion4EndBattleText1::
text "Awooh!"
prompt
-_Mansion4AfterBattleText1:: ; 854ff (21:54ff)
+_Mansion4AfterBattleText1::
text "You can find stuff"
line "lying around."
done
-_Mansion4BattleText2:: ; 85521 (21:5521)
+_Mansion4BattleText2::
text "This place is"
line "ideal for a lab."
done
-_Mansion4EndBattleText2:: ; 85541 (21:5541)
+_Mansion4EndBattleText2::
text "What"
line "was that for?"
prompt
-_Mansion4AfterBattleText2:: ; 85555 (21:5555)
+_Mansion4AfterBattleText2::
text "I like it here!"
line "It's conducive to"
cont "my studies!"
done
-_Mansion4Text7:: ; 85583 (21:5583)
+_Mansion4Text7::
text "Diary; Sept. 1"
line "MEWTWO is far too"
cont "powerful."
diff --git a/text/maps/mr_psychics_house.asm b/text/maps/mr_psychics_house.asm
index ed181eb6..78257980 100644
--- a/text/maps/mr_psychics_house.asm
+++ b/text/maps/mr_psychics_house.asm
@@ -1,17 +1,17 @@
-_TM29PreReceiveText:: ; a24fe (28:64fe)
+_TM29PreReceiveText::
text "...Wait! Don't"
line "say a word!"
para "You wanted this!"
prompt
-_ReceivedTM29Text:: ; a252a (28:652a)
+_ReceivedTM29Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM29ExplanationText:: ; a253e (28:653e)
+_TM29ExplanationText::
text "TM29 is PSYCHIC!"
para "It can lower the"
@@ -19,7 +19,7 @@ _TM29ExplanationText:: ; a253e (28:653e)
cont "abilities."
done
-_TM29NoRoomText:: ; a257c (28:657c)
+_TM29NoRoomText::
text "Where do you plan"
line "to put this?"
done
diff --git a/text/maps/mt_moon_1f.asm b/text/maps/mt_moon_1f.asm
index 0577adf3..761a5240 100644
--- a/text/maps/mt_moon_1f.asm
+++ b/text/maps/mt_moon_1f.asm
@@ -1,123 +1,119 @@
-_MtMoon1BattleText2:: ; 80692 (20:4692)
+_MtMoon1BattleText2::
text "WHOA! You shocked"
line "me! Oh, you're"
cont "just a kid!"
done
-_MtMoon1EndBattleText2:: ; 806bf (20:46bf)
+_MtMoon1EndBattleText2::
text "Wow!"
line "Shocked again!"
prompt
-_MtMoon1AfterBattleText2:: ; 806d4 (20:46d4)
+_MtMoon1AfterBattleText2::
text "Kids like you"
line "shouldn't be"
cont "here!"
done
-_MtMoon1BattleText3:: ; 806f5 (20:46f5)
+_MtMoon1BattleText3::
text "Did you come to"
line "explore too?"
done
-_MtMoon1EndBattleText3:: ; 80713 (20:4713)
+_MtMoon1EndBattleText3::
text "Losing"
line "stinks!"
prompt
-_MtMoon1AfterBattleText3:: ; 80723 (20:4723)
+_MtMoon1AfterBattleText3::
text "I came down here"
line "to show off to"
cont "girls."
done
-_MtMoon1BattleText4:: ; 8074b (20:474b)
+_MtMoon1BattleText4::
text "Wow! It's way"
line "bigger in here"
cont "than I thought!"
done
-_MtMoon1EndBattleText4:: ; 80778 (20:4778)
+_MtMoon1EndBattleText4::
text "Oh!"
line "I lost it!"
prompt
-_MtMoon1AfterBattleText4:: ; 80788 (20:4788)
+_MtMoon1AfterBattleText4::
text "How do you get"
line "out of here?"
done
-_MtMoon1BattleText5:: ; 807a5 (20:47a5)
+_MtMoon1BattleText5::
text "What! Don't sneak"
line "up on me!"
done
-_MtMoon1EndBattleText5:: ; 807c1 (20:47c1)
+_MtMoon1EndBattleText5::
text "My"
line "#MON won't do!"
prompt
-_MtMoon1AfterBattleText5:: ; 807d3 (20:47d3)
+_MtMoon1AfterBattleText5::
text "I have to find"
line "stronger #MON."
done
-_MtMoon1BattleText6:: ; 807f2 (20:47f2)
+_MtMoon1BattleText6::
text "What? I'm waiting"
line "for my friends to"
cont "find me here."
done
-_MtMoon1EndBattleText6:: ; 80824 (20:4824)
+_MtMoon1EndBattleText6::
text "I lost?"
prompt
-_MtMoon1AfterBattleText6:: ; 8082d (20:482d)
+_MtMoon1AfterBattleText6::
text "I heard there are"
line "some very rare"
cont "fossils here."
done
-_MtMoon1BattleText7:: ; 8085d (20:485d)
+_MtMoon1BattleText7::
text "Suspicious men"
line "are in the cave."
cont "What about you?"
done
-_MtMoon1EndBattleText7:: ; 8088e (20:488e)
+_MtMoon1EndBattleText7::
text "You"
line "got me!"
prompt
-_MtMoon1AfterBattleText7:: ; 8089b (20:489b)
+_MtMoon1AfterBattleText7::
text "I saw them! I'm"
line "sure they're from"
cont "TEAM ROCKET!"
done
-_MtMoon1BattleText8:: ; 808c9 (20:48c9)
+_MtMoon1BattleText8::
text "Go through this"
line "cave to get to"
cont "CERULEAN CITY!"
done
-_MtMoon1EndBattleText8:: ; 808f8 (20:48f8)
+_MtMoon1EndBattleText8::
text "I"
line "lost."
prompt
-_MtMoon1AfterBattleText8:: ; 80901 (20:4901)
+_MtMoon1AfterBattleText8::
text "ZUBAT is tough!"
line "But, it can be"
cont "useful if you"
cont "catch one."
done
-_MtMoon1Text14:: ; 8093a (20:493a)
+_MtMoon1Text14::
text "Beware! ZUBAT is"
-IF DEF(_YELLOW)
- line "a bloodsucker!"
-ELSE
line "a blood sucker!"
-ENDC
done
diff --git a/text/maps/mt_moon_b1f.asm b/text/maps/mt_moon_b1f.asm
index 8421fdb0..85cdee66 100644
--- a/text/maps/mt_moon_b1f.asm
+++ b/text/maps/mt_moon_b1f.asm
@@ -1,4 +1,4 @@
-_MtMoonText1:: ; 8095c (20:495c)
+_MtMoonText1::
db $0
done
diff --git a/text/maps/mt_moon_b2f.asm b/text/maps/mt_moon_b2f.asm
index 64823871..462c9d3c 100644
--- a/text/maps/mt_moon_b2f.asm
+++ b/text/maps/mt_moon_b2f.asm
@@ -1,47 +1,24 @@
-IF DEF(_YELLOW)
-_MtMoonJessieJamesText1::
- text "Stop right there!@@"
-
-_MtMoonJessieJamesText2::
- text "That fossil is"
- line "TEAM ROCKET's!"
-
- para "Surrender now, or"
- line "prepare to fight!"
- done
-
-_MtMoonJessieJamesText3::
- text "A"
- line "brat beat us?"
- prompt
-
-_MtMoonJessieJamesText4::
- text "TEAM ROCKET, blast"
- line "off at the speed"
- cont "of light!@@"
-ENDC
-
-_MtMoon3Text_49f24:: ; 8095e (20:495e)
+_MtMoon3Text_49f24::
text "You want the"
line "DOME FOSSIL?"
done
-_MtMoon3Text_49f64:: ; 80979 (20:4979)
+_MtMoon3Text_49f64::
text "You want the"
line "HELIX FOSSIL?"
done
-_MtMoon3Text_49f6f:: ; 80995 (20:4995)
+_MtMoon3Text_49f6f::
text $52, " got the"
line "@"
TX_RAM wcf4b
text "!@@"
-_MtMoon3Text_49f7f:: ; 809a8 (20:49a8)
+_MtMoon3Text_49f7f::
text "Look, you've got"
line "no room for this.@@"
-_MtMoon3Text_49f85:: ; 809cc (20:49cc)
+_MtMoon3Text_49f85::
text "Hey, stop!"
para "I found these"
@@ -49,18 +26,18 @@ _MtMoon3Text_49f85:: ; 809cc (20:49cc)
cont "both mine!"
done
-_MtMoon3Text_49f8a:: ; 80a01 (20:4a01)
+_MtMoon3Text_49f8a::
text "OK!"
line "I'll share!"
prompt
-_MtMoon3Text_49f8f:: ; 80a11 (20:4a11)
+_MtMoon3Text_49f8f::
text "We'll each take"
line "one!"
cont "No being greedy!"
done
-_MtMoon3Text_49f94:: ; 80a37 (20:4a37)
+_MtMoon3Text_49f94::
text "Far away, on"
line "CINNABAR ISLAND,"
cont "there's a #MON"
@@ -71,74 +48,74 @@ _MtMoon3Text_49f94:: ; 80a37 (20:4a37)
cont "fossils."
done
-_MtMoon3Text_49f99:: ; 80a93 (20:4a93)
+_MtMoon3Text_49f99::
text "All right. Then"
line "this is mine!@@"
-_MtMoon3BattleText2:: ; 80ab3 (20:4ab3)
+_MtMoon3BattleText2::
text "TEAM ROCKET will"
line "find the fossils,"
cont "revive and sell"
cont "them for cash!"
done
-_MtMoon3EndBattleText2:: ; 80af6 (20:4af6)
+_MtMoon3EndBattleText2::
text "Urgh!"
line "Now I'm mad!"
prompt
-_MtMoon3AfterBattleText2:: ; 80b09 (20:4b09)
+_MtMoon3AfterBattleText2::
text "You made me mad!"
line "TEAM ROCKET will"
cont "blacklist you!"
done
-_MtMoon3BattleText3:: ; 80b3b (20:4b3b)
+_MtMoon3BattleText3::
text "We, TEAM ROCKET,"
line "are #MON"
cont "gangsters!"
done
-_MtMoon3EndBattleText3:: ; 80b61 (20:4b61)
+_MtMoon3EndBattleText3::
text "I blew"
line "it!"
prompt
-_MtMoon3AfterBattleText3:: ; 80b6d (20:4b6d)
+_MtMoon3AfterBattleText3::
text "Darn it all! My"
line "associates won't"
cont "stand for this!"
done
-_MtMoon3BattleText4:: ; 80b9e (20:4b9e)
+_MtMoon3BattleText4::
text "We're pulling a"
line "big job here!"
cont "Get lost, kid!"
done
-_MtMoon3EndBattleText4:: ; 80bcb (20:4bcb)
+_MtMoon3EndBattleText4::
text "So, you"
line "are good."
prompt
-_MtMoon3AfterBattleText4:: ; 80bde (20:4bde)
+_MtMoon3AfterBattleText4::
text "If you find a"
line "fossil, give it"
cont "to me and scram!"
done
-_MtMoon3BattleText5:: ; 80c0e (20:4c0e)
+_MtMoon3BattleText5::
text "Little kids"
line "should leave"
cont "grown-ups alone!"
done
-_MtMoon3EndBattleText5:: ; 80c39 (20:4c39)
+_MtMoon3EndBattleText5::
text "I'm"
line "steamed!"
prompt
-_MtMoon3AfterBattleText5:: ; 80c46 (20:4c46)
+_MtMoon3AfterBattleText5::
text "#MON lived"
line "here long before"
cont "people came."
diff --git a/text/maps/mt_moon_pokecenter.asm b/text/maps/mt_moon_pokecenter.asm
index 2ae50a13..271008e7 100644
--- a/text/maps/mt_moon_pokecenter.asm
+++ b/text/maps/mt_moon_pokecenter.asm
@@ -1,4 +1,4 @@
-_MtMoonPokecenterText1:: ; 8a8eb (22:68eb)
+_MtMoonPokecenterText1::
text "I've 6 # BALLs"
line "set in my belt."
@@ -6,7 +6,7 @@ _MtMoonPokecenterText1:: ; 8a8eb (22:68eb)
line "carry 6 #MON."
done
-_MtMoonPokecenterText3:: ; 8a929 (22:6929)
+_MtMoonPokecenterText3::
text "TEAM ROCKET"
line "attacks CERULEAN"
cont "citizens..."
@@ -16,7 +16,7 @@ _MtMoonPokecenterText3:: ; 8a929 (22:6929)
cont "news!"
done
-_MtMoonPokecenterText_4935c:: ; 8a976 (22:6976)
+_MtMoonPokecenterText_4935c::
text "MAN: Hello, there!"
line "Have I got a deal"
cont "just for you!"
@@ -27,23 +27,23 @@ _MtMoonPokecenterText_4935c:: ; 8a976 (22:6976)
cont "What do you say?"
done
-_MtMoonPokecenterText_49361:: ; 8a9ec (22:69ec)
+_MtMoonPokecenterText_49361::
text "No? I'm only"
line "doing this as a"
cont "favor to you!"
done
-_MtMoonPokecenterText_49366:: ; 8aa17 (22:6a17)
+_MtMoonPokecenterText_49366::
text "You'll need more"
line "money than that!"
done
-_MtMoonPokecenterText_4936b:: ; 8aa39 (22:6a39)
+_MtMoonPokecenterText_4936b::
text "MAN: Well, I don't"
line "give refunds!"
done
-_MtMoonPokecenterText5:: ; 8aa5a (22:6a5a)
+_MtMoonPokecenterText5::
db $0
done
diff --git a/text/maps/museum_1f.asm b/text/maps/museum_1f.asm
index 7371a312..29b167b5 100644
--- a/text/maps/museum_1f.asm
+++ b/text/maps/museum_1f.asm
@@ -1,8 +1,8 @@
-_Museum1FText_5c21a:: ; 9652c (25:652c)
+_Museum1FText_5c21a::
text "Come again!"
done
-_Museum1FText_5c21f:: ; 96539 (25:6539)
+_Museum1FText_5c21f::
text "It's ¥50 for a"
line "child's ticket."
@@ -10,17 +10,17 @@ _Museum1FText_5c21f:: ; 96539 (25:6539)
line "come in?"
done
-_Museum1FText_5c224:: ; 96572 (25:6572)
+_Museum1FText_5c224::
text "Right, ¥50!"
line "Thank you!"
done
-_Museum1FText_5c229:: ; 9658a (25:658a)
+_Museum1FText_5c229::
text "You don't have"
line "enough money."
prompt
-_Museum1FText_5c22e:: ; 965a7 (25:65a7)
+_Museum1FText_5c22e::
text "You can't sneak"
line "in the back way!"
@@ -29,7 +29,7 @@ _Museum1FText_5c22e:: ; 965a7 (25:65a7)
cont "AMBER is?"
done
-_Museum1FText_5c233:: ; 965f1 (25:65f1)
+_Museum1FText_5c233::
text "There's a lab"
line "somewhere trying"
cont "to resurrect"
@@ -37,28 +37,28 @@ _Museum1FText_5c233:: ; 965f1 (25:65f1)
cont "from AMBER."
done
-_Museum1FText_5c238:: ; 96636 (25:6636)
+_Museum1FText_5c238::
text "AMBER is fossil-"
line "ized tree sap."
done
-_Museum1FText_5c23d:: ; 96657 (25:6657)
+_Museum1FText_5c23d::
text "Please go to the"
line "other side!"
done
-_Museum1FText_5c242:: ; 96675 (25:6675)
+_Museum1FText_5c242::
text "Take plenty of"
line "time to look!"
done
-_Museum1FText_5c251:: ; 96693 (25:6693)
+_Museum1FText_5c251::
text "That is one"
line "magnificent"
cont "fossil!"
done
-_Museum1FText_5c28e:: ; 966b4 (25:66b4)
+_Museum1FText_5c28e::
text "Ssh! I think that"
line "this chunk of"
cont "AMBER contains"
@@ -72,11 +72,7 @@ _Museum1FText_5c28e:: ; 966b4 (25:66b4)
para "But, my colleagues"
line "just ignore me!"
-IF DEF(_YELLOW)
- para "So, I have a favor"
-ELSE
para "So I have a favor"
-ENDC
line "to ask!"
para "Take this to a"
@@ -84,28 +80,28 @@ ENDC
cont "get it examined!"
prompt
-_ReceivedOldAmberText:: ; 96790 (25:6790)
+_ReceivedOldAmberText::
text $52, " received"
line "OLD AMBER!@@"
-_Museum1FText_5c299:: ; 967a8 (25:67a8)
+_Museum1FText_5c299::
text "Ssh! Get the OLD"
line "AMBER checked!"
done
-_Museum1FText_5c29e:: ; 967c9 (25:67c9)
+_Museum1FText_5c29e::
text "You don't have"
line "space for this!"
done
-_Museum1FText_5c2ad:: ; 967e8 (25:67e8)
+_Museum1FText_5c2ad::
text "We are proud of 2"
line "fossils of very"
cont "rare, prehistoric"
cont "#MON!"
done
-_Museum1FText_5c2bc:: ; 96823 (25:6823)
+_Museum1FText_5c2bc::
text "The AMBER is"
line "clear and gold!"
done
diff --git a/text/maps/museum_2f.asm b/text/maps/museum_2f.asm
index 46238725..4f34a249 100644
--- a/text/maps/museum_2f.asm
+++ b/text/maps/museum_2f.asm
@@ -1,11 +1,11 @@
-_Museum2FText1:: ; 96841 (25:6841)
+_Museum2FText1::
text "MOON STONE?"
para "What's so special"
line "about it?"
done
-_Museum2FText2:: ; 96869 (25:6869)
+_Museum2FText2::
text "July 20, 1969!"
para "The 1st lunar"
@@ -15,12 +15,12 @@ _Museum2FText2:: ; 96869 (25:6869)
line "TV to watch it!"
done
-_Museum2FText3:: ; 968b1 (25:68b1)
+_Museum2FText3::
text "We have a space"
line "exhibit now."
done
-_Museum2FText4:: ; 968cf (25:68cf)
+_Museum2FText4::
text "I want a PIKACHU!"
line "It's so cute!"
@@ -28,32 +28,17 @@ _Museum2FText4:: ; 968cf (25:68cf)
line "to catch me one!"
done
-_Museum2FText5:: ; 96911 (25:6911)
+_Museum2FText5::
text "Yeah, a PIKACHU"
line "soon, I promise!"
done
-IF DEF(_YELLOW)
-_Museum2FPikachuText1::
- text "Your PIKACHU looks"
- line "untamed."
- cont "May I have it for"
- cont "my daughter?"
- done
-
-_Museum2FPikachuText2::
- text "I'd like to get"
- line "that PIKACHU off"
- cont "you, but it's too"
- cont "attached to you."
-ENDC
-
-_Museum2FText6:: ; 96933 (25:6933)
+_Museum2FText6::
text "SPACE SHUTTLE"
line "COLUMBIA"
done
-_Museum2FText7:: ; 9694b (25:694b)
+_Museum2FText7::
text "Meteorite that"
line "fell on MT.MOON."
cont "(MOON STONE?)"
diff --git a/text/maps/name_rater.asm b/text/maps/name_rater.asm
index 052a9588..f43aef91 100644
--- a/text/maps/name_rater.asm
+++ b/text/maps/name_rater.asm
@@ -1,4 +1,4 @@
-_NameRaterText_1dab3:: ; 9a308 (26:6308)
+_NameRaterText_1dab3::
text "Hello, hello!"
line "I am the official"
cont "NAME RATER!"
@@ -8,12 +8,12 @@ _NameRaterText_1dab3:: ; 9a308 (26:6308)
cont "your #MON?"
done
-_NameRaterText_1dab8:: ; 9a361 (26:6361)
+_NameRaterText_1dab8::
text "Which #MON"
line "should I look at?"
prompt
-_NameRaterText_1dabd:: ; 9a37f (26:637f)
+_NameRaterText_1dabd::
TX_RAM wcd6d
text ", is it?"
line "That is a decent"
@@ -26,12 +26,12 @@ _NameRaterText_1dabd:: ; 9a37f (26:637f)
para "How about it?"
done
-_NameRaterText_1dac2:: ; 9a3e5 (26:63e5)
+_NameRaterText_1dac2::
text "Fine! What should"
line "we name it?"
prompt
-_NameRaterText_1dac7:: ; 9a404 (26:6404)
+_NameRaterText_1dac7::
text "OK! This #MON"
line "has been renamed"
cont "@"
@@ -42,16 +42,12 @@ _NameRaterText_1dac7:: ; 9a404 (26:6404)
line "name than before!"
done
-_NameRaterText_1dacc:: ; 9a44c (26:644c)
-IF DEF(_YELLOW)
- text "Fine! Come any-"
-ELSE
+_NameRaterText_1dacc::
text "Fine! Come any"
-ENDC
line "time you like!"
done
-_NameRaterText_1dad1:: ; 9a46b (26:646b)
+_NameRaterText_1dad1::
TX_RAM wcd6d
text ", is it?"
line "That is a truly"
diff --git a/text/maps/oaks_lab.asm b/text/maps/oaks_lab.asm
index 58f55b85..9aaac71c 100644
--- a/text/maps/oaks_lab.asm
+++ b/text/maps/oaks_lab.asm
@@ -1,22 +1,10 @@
-_OaksLabGaryText1:: ; 94d5b (25:4d5b)
+_OaksLabGaryText1::
text $53,": Yo"
line $52,"! Gramps"
cont "isn't around!"
-
-IF DEF(_YELLOW)
- para "I ran here 'cos"
- line "he said he had a"
- cont "#MON for me."
-ENDC
done
-_OaksLabText40:: ; 94d79 (25:4d79)
-IF DEF(_YELLOW)
- text $53,": Humph!"
- line "I'll get a better"
- cont "#MON than you!"
- done
-ELSE
+_OaksLabText40::
text $53,": Heh, I"
line "don't need to be"
cont "greedy like you!"
@@ -24,105 +12,74 @@ ELSE
para "Go ahead and"
line "choose, ", $52, "!"
done
-ENDC
-_OaksLabText41:: ; 94dbd (25:4dbd)
-IF DEF(_YELLOW)
- text $53,": Heh, my"
-ELSE
+_OaksLabText41::
text $53,": My"
-ENDC
line "#MON looks a"
cont "lot stronger."
done
-_OaksLabText39:: ; 94ddf (25:4ddf)
-IF DEF(_YELLOW)
- text "That's a #"
- line "BALL. There's a"
- cont "#MON inside!"
- done
-ELSE
+_OaksLabText39::
text "Those are #"
line "BALLs. They"
cont "contain #MON!"
done
-ENDC
-IF DEF(_YELLOW)
-_OaksLabPikachuText::
- text "OAK: Go ahead,"
- line "it's yours!"
- done
-ENDC
-
-_OaksLabCharmanderText:: ; 94e06 (25:4e06)
+_OaksLabCharmanderText::
text "So! You want the"
line "fire #MON,"
cont "CHARMANDER?"
done
-_OaksLabSquirtleText:: ; 94e2f (25:4e2f)
+_OaksLabSquirtleText::
text "So! You want the"
line "water #MON,"
cont "SQUIRTLE?"
done
-_OaksLabBulbasaurText:: ; 94e57 (25:4e57)
+_OaksLabBulbasaurText::
text "So! You want the"
line "plant #MON,"
cont "BULBASAUR?"
done
-_OaksLabMonEnergeticText:: ; 94e80 (25:4e80)
+_OaksLabMonEnergeticText::
text "This #MON is"
line "really energetic!"
prompt
-_OaksLabReceivedMonText:: ; 94ea0 (25:4ea0)
+_OaksLabReceivedMonText::
text $52, " received"
line "a @"
TX_RAM wcd6d
text "!@@"
-_OaksLabLastMonText:: ; 94eb6 (25:4eb6)
+_OaksLabLastMonText::
text "That's PROF.OAK's"
line "last #MON!"
done
-_OaksLabText_1d2f0:: ; 94ed2 (25:4ed2)
+_OaksLabText_1d2f0::
text "OAK: Now, ", $52, ","
line "which #MON do"
cont "you want?"
done
-_OaksLabText_1d2f5:: ; 94ef8 (25:4ef8)
+_OaksLabText_1d2f5::
text "OAK: If a wild"
line "#MON appears,"
cont "your #MON can"
cont "fight against it!"
-
-IF DEF(_YELLOW)
- para "Afterward, go on"
- line "to the next town."
-ENDC
done
-_OaksLabText_1d2fa:: ; 94f36 (25:4f36)
-IF DEF(_YELLOW)
- text "OAK: You should"
- line "talk to it and"
- cont "see how it feels."
- done
-ELSE
+_OaksLabText_1d2fa::
text "OAK: ", $52, ","
line "raise your young"
cont "#MON by making"
cont "it fight!"
done
-ENDC
-_OaksLabDeliverParcelText1:: ; 94f69 (25:4f69)
+_OaksLabDeliverParcelText1::
text "OAK: Oh, ", $52, "!"
para "How is my old"
@@ -141,29 +98,21 @@ _OaksLabDeliverParcelText1:: ; 94f69 (25:4f69)
para $52, " delivered"
line "OAK's PARCEL.@@"
-_OaksLabDeliverParcelText2:: ; 9500f (25:500f)
+_OaksLabDeliverParcelText2::
db $0
para "Ah! This is the"
line "custom # BALL"
cont "I ordered!"
-IF DEF(_YELLOW)
- cont "Thanks, ",$52,"!"
-
- para "By the way, I must"
- line "ask you to do"
- cont "something for me."
-ELSE
cont "Thank you!"
-ENDC
done
-_OaksLabAroundWorldText:: ; 95045 (25:5045)
+_OaksLabAroundWorldText::
text "#MON around the"
line "world wait for"
cont "you, ", $52, "!"
done
-_OaksLabGivePokeballsText1:: ; 9506d (25:506d)
+_OaksLabGivePokeballsText1::
text "OAK: You can't get"
line "detailed data on"
cont "#MON by just"
@@ -177,18 +126,13 @@ _OaksLabGivePokeballsText1:: ; 9506d (25:506d)
para $52, " got 5"
line "# BALLs!@@"
-_OaksLabGivePokeballsText2:: ; 950f2 (25:50f2)
+_OaksLabGivePokeballsText2::
db $0
para "When a wild"
line "#MON appears,"
cont "it's fair game."
-IF DEF(_YELLOW)
- para "Just like I showed"
- line "you, throw a #"
-ELSE
para "Just throw a #"
-ENDC
line "BALL at it and try"
line "to catch it!"
@@ -200,7 +144,7 @@ ENDC
cont "have to be lucky!"
done
-_OaksLabPleaseVisitText:: ; 9519e (25:519e)
+_OaksLabPleaseVisitText::
text "OAK: Come see me"
line "sometimes."
@@ -209,7 +153,7 @@ _OaksLabPleaseVisitText:: ; 9519e (25:519e)
cont "coming along."
done
-_OaksLabText_1d31d:: ; 951e9 (25:51e9)
+_OaksLabText_1d31d::
text "OAK: Good to see "
line "you! How is your "
cont "#DEX coming? "
@@ -217,17 +161,17 @@ _OaksLabText_1d31d:: ; 951e9 (25:51e9)
cont "a look!"
prompt
-_OaksLabText_1d32c:: ; 95236 (25:5236)
+_OaksLabText_1d32c::
text "It's encyclopedia-"
line "like, but the"
cont "pages are blank!"
done
-_OaksLabText8:: ; 95268 (25:5268)
+_OaksLabText8::
text "?"
done
-_OaksLabText_1d340:: ; 9526b (25:526b)
+_OaksLabText_1d340::
text "PROF.OAK is the"
line "authority on"
cont "#MON!"
@@ -237,36 +181,13 @@ _OaksLabText_1d340:: ; 9526b (25:526b)
cont "in high regard!"
done
-_OaksLabRivalWaitingText:: ; 952bb (25:52bb)
+_OaksLabRivalWaitingText::
text $53, ": Gramps!"
line "I'm fed up with"
cont "waiting!"
done
-_OaksLabChooseMonText:: ; 952df (25:52df)
-IF DEF(_YELLOW)
- text "OAK: Hmm? ",$53,"?"
- line "Why are you here"
- cont "already?"
-
- para "I said for you to"
- line "come by later..."
-
- para "Ah, whatever!"
- line "Just wait there."
-
- para "Look, ",$52,"! Do"
- line "you see that ball"
- cont "on the table?"
-
- para "It's called a #"
- line "BALL. It holds a"
- cont "#MON inside."
-
- para "You may have it!"
- line "Go on, take it!"
- done
-ELSE
+_OaksLabChooseMonText::
text "OAK: ", $53, "?"
line "Let me think..."
@@ -293,97 +214,36 @@ ELSE
cont "but you can have"
cont "one! Choose!"
done
-ENDC
-_OaksLabRivalInterjectionText:: ; 953dc (25:53dc)
+_OaksLabRivalInterjectionText::
text $53, ": Hey!"
line "Gramps! What"
cont "about me?"
done
-_OaksLabBePatientText:: ; 953fc (25:53fc)
-IF DEF(_YELLOW)
- text "OAK: Be patient,"
- line $53,", I'll give"
- cont "you one later."
- done
-ELSE
+_OaksLabBePatientText::
text "OAK: Be patient!"
line $53, ", you can"
cont "have one too!"
done
-ENDC
-
-IF DEF(_YELLOW)
-_OaksLabRivalTakesText1::
- text $53,": No way!"
- line $52,", I want"
- cont "this #MON!"
- prompt
-
-_OaksLabRivalTakesText2::
- text $53," snatched"
- line "the #MON!@@"
-
-_OaksLabRivalTakesText3::
- text "OAK: ",$53,"! What"
- line "are you doing?"
- prompt
-
-_OaksLabRivalTakesText4::
- text $53,": Gramps, I"
- line "want this one!"
- prompt
-
-_OaksLabRivalTakesText5::
- text "OAK: But, I... Oh,"
- line "all right then."
- cont "That #MON is"
- cont "yours."
-
- para "I was going to"
- line "give you one"
- cont "anyway..."
-
- para $52,", come over"
- line "here."
- done
-
-_OaksLabOakGivesText::
- text "OAK: ",$52,", this"
- line "is the #MON I"
- cont "caught earlier."
- para "You can have it."
- line "I caught it in"
- cont "the wild and it's"
- cont "not tame yet."
- prompt
-
-_OaksLabReceivedText::
- text $52," received"
- line "a "
- TX_RAM $CD6D
- text "!@@"
-ENDC
-
-_OaksLabLeavingText:: ; 95427 (25:5427)
+_OaksLabLeavingText::
text "OAK: Hey! Don't go"
line "away yet!"
done
-_OaksLabRivalPickingMonText:: ; 95444 (25:5444)
+_OaksLabRivalPickingMonText::
text $53, ": I'll take"
line "this one, then!"
done
-_OaksLabRivalReceivedMonText:: ; 95461 (25:5461)
+_OaksLabRivalReceivedMonText::
text $53, " received"
line "a @"
TX_RAM wcd6d
text "!@@"
-_OaksLabRivalChallengeText:: ; 95477 (25:5477)
+_OaksLabRivalChallengeText::
text $53, ": Wait"
line $52, "!"
cont "Let's check out"
@@ -393,19 +253,19 @@ _OaksLabRivalChallengeText:: ; 95477 (25:5477)
line "you on!"
done
-_OaksLabText_1d3be:: ; 954b6 (25:54b6)
+_OaksLabText_1d3be::
text "WHAT?"
line "Unbelievable!"
cont "I picked the"
cont "wrong #MON!"
prompt
-_OaksLabText_1d3c3:: ; 954e4 (25:54e4)
+_OaksLabText_1d3c3::
text $53, ": Yeah! Am"
line "I great or what?"
prompt
-_OaksLabRivalToughenUpText:: ; 95502 (25:5502)
+_OaksLabRivalToughenUpText::
text $53, ": Okay!"
line "I'll make my"
cont "#MON fight to"
@@ -415,66 +275,22 @@ _OaksLabRivalToughenUpText:: ; 95502 (25:5502)
line "Smell you later!"
done
-IF DEF(_YELLOW)
-_OaksLabPikachuDislikesPokeballsText1::
- text "OAK: What?"
- done
-
-_OaksLabPikachuDislikesPokeballsText2::
- text "OAK: Would you"
- line "look at that!"
-
- para "It's odd, but it"
- line "appears that your"
- cont "PIKACHU dislikes"
- cont "# BALLs."
-
- para "You should just"
- line "keep it with you."
-
- para "That should make"
- line "it happy!"
-
- para "You can talk to it"
- line "and see how it"
- cont "feels about you."
- done
-ENDC
-
-_OaksLabText21:: ; 95551 (25:5551)
+_OaksLabText21::
text $53, ": Gramps!"
done
-_OaksLabText22:: ; 9555d (25:555d)
-IF DEF(_YELLOW)
- text $53,": Gramps,"
- line "my #MON has"
- cont "grown stronger!"
- cont "Check it out!"
- done
-ELSE
+_OaksLabText22::
text $53, ": What did"
line "you call me for?"
done
-ENDC
-_OaksLabText23:: ; 9557b (25:557b)
-IF DEF(_YELLOW)
- text "OAK: Ah, ",$53,","
- line "good timing!"
-
- para "I needed to ask"
- line "both of you to do"
- cont "something for me."
- done
-ELSE
+_OaksLabText23::
text "OAK: Oh right! I"
line "have a request"
cont "of you two."
done
-ENDC
-_OaksLabText24:: ; 955a8 (25:55a8)
+_OaksLabText24::
text "On the desk there"
line "is my invention,"
cont "#DEX!"
@@ -488,7 +304,7 @@ _OaksLabText24:: ; 955a8 (25:55a8)
line "encyclopedia!"
done
-_OaksLabText25:: ; 9562a (25:562a)
+_OaksLabText25::
text "OAK: ", $52, " and"
line $53, "! Take"
cont "these with you!"
@@ -496,7 +312,7 @@ _OaksLabText25:: ; 9562a (25:562a)
para $52, " got"
line "#DEX from OAK!@@"
-_OaksLabText26:: ; 95664 (25:5664)
+_OaksLabText26::
text "To make a complete"
line "guide on all the"
cont "#MON in the"
@@ -519,7 +335,7 @@ _OaksLabText26:: ; 95664 (25:5664)
cont "#MON history!"
done
-_OaksLabText27:: ; 95741 (25:5741)
+_OaksLabText27::
text $53, ": Alright"
line "Gramps! Leave it"
cont "all to me!"
@@ -537,61 +353,61 @@ _OaksLabText27:: ; 95741 (25:5741)
cont $52, "! Hahaha!"
done
-_OaksLabText_1d405:: ; 957eb (25:57eb)
+_OaksLabText_1d405::
text "I study #MON as"
line "PROF.OAK's AIDE."
done
-_OaksLabText_441cc:: ; 9580c (25:580c)
+_OaksLabText_441cc::
text "#DEX comp-"
line "letion is:"
para "@"
- TX_NUM $ffdb, 1, 3
+ TX_NUM hDexRatingNumMonsSeen, 1, 3
text " #MON seen"
line "@"
- TX_NUM $ffdc, 1, 3
+ TX_NUM hDexRatingNumMonsOwned, 1, 3
text " #MON owned"
para "PROF.OAK's"
line "Rating:"
prompt
-_OaksLabText_44201:: ; 95858 (25:5858)
+_OaksLabText_44201::
text "You still have"
line "lots to do."
cont "Look for #MON"
cont "in grassy areas!"
done
-_OaksLabText_44206:: ; 95893 (25:5893)
+_OaksLabText_44206::
text "You're on the"
line "right track! "
cont "Get a FLASH HM"
cont "from my AIDE!"
done
-_OaksLabText_4420b:: ; 958cc (25:58cc)
+_OaksLabText_4420b::
text "You still need"
line "more #MON!"
cont "Try to catch"
cont "other species!"
done
-_OaksLabText_44210:: ; 95903 (25:5903)
+_OaksLabText_44210::
text "Good, you're"
line "trying hard!"
cont "Get an ITEMFINDER"
cont "from my AIDE!"
done
-_OaksLabText_44215:: ; 9593d (25:593d)
+_OaksLabText_44215::
text "Looking good!"
line "Go find my AIDE"
cont "when you get 50!"
done
-_OaksLabText_4421a:: ; 9596d (25:596d)
+_OaksLabText_4421a::
text "You finally got at"
line "least 50 species!"
cont "Be sure to get"
@@ -599,73 +415,64 @@ _OaksLabText_4421a:: ; 9596d (25:596d)
cont "AIDE!"
done
-_OaksLabText_4421f:: ; 959b8 (25:59b8)
-IF DEF(_YELLOW)
- text "Oh! This is get-"
- line "ting even better!"
-ELSE
+_OaksLabText_4421f::
text "Ho! This is geting"
line "even better!"
-ENDC
done
-_OaksLabText_44224:: ; 959d9 (25:59d9)
+_OaksLabText_44224::
text "Very good!"
line "Go fish for some"
cont "marine #MON!"
done
-_OaksLabText_44229:: ; 95a03 (25:5a03)
+_OaksLabText_44229::
text "Wonderful!"
line "Do you like to"
cont "collect things?"
done
-_OaksLabText_4422e:: ; 95a2e (25:5a2e)
+_OaksLabText_4422e::
text "I'm impressed!"
line "It must have been"
cont "difficult to do!"
done
-_OaksLabText_44233:: ; 95a60 (25:5a60)
+_OaksLabText_44233::
text "You finally got at"
line "least 100 species!"
cont "I can't believe"
cont "how good you are!"
done
-_OaksLabText_44238:: ; 95aa8 (25:5aa8)
+_OaksLabText_44238::
text "You even have the"
line "evolved forms of"
cont "#MON! Super!"
done
-_OaksLabText_4423d:: ; 95ad9 (25:5ad9)
+_OaksLabText_4423d::
text "Excellent! Trade"
line "with friends to"
cont "get some more!"
done
-_OaksLabText_44242:: ; 95b0a (25:5b0a)
+_OaksLabText_44242::
text "Outstanding!"
line "You've become a"
cont "real pro at this!"
done
-_OaksLabText_44247:: ; 95b39 (25:5b39)
+_OaksLabText_44247::
text "I have nothing"
line "left to say!"
cont "You're the"
cont "authority now!"
done
-_OaksLabText_4424c:: ; 95b6f (25:5b6f)
+_OaksLabText_4424c::
text "Your #DEX is"
-IF DEF(_YELLOW)
- line "fully complete!"
-ELSE
line "entirely complete!"
-ENDC
cont "Congratulations!"
done
diff --git a/text/maps/pewter_city.asm b/text/maps/pewter_city.asm
index 647832a3..0d7c7de7 100644
--- a/text/maps/pewter_city.asm
+++ b/text/maps/pewter_city.asm
@@ -1,4 +1,4 @@
-_PewterCityText1:: ; a497f (29:497f)
+_PewterCityText1::
text "It's rumored that"
line "CLEFAIRYs came"
cont "from the moon!"
@@ -8,7 +8,7 @@ _PewterCityText1:: ; a497f (29:497f)
cont "fell on MT.MOON."
done
-_PewterCityText2:: ; a49e0 (29:49e0)
+_PewterCityText2::
text "There aren't many"
line "serious #MON"
cont "trainers here!"
@@ -20,24 +20,24 @@ _PewterCityText2:: ; a49e0 (29:49e0)
cont "into it!"
done
-_PewterCityText_193f1:: ; a4a56 (29:4a56)
+_PewterCityText_193f1::
text "Did you check out"
line "the MUSEUM?"
done
-_PewterCityText_193f6:: ; a4a75 (29:4a75)
+_PewterCityText_193f6::
text "Weren't those"
line "fossils from MT."
cont "MOON amazing?"
done
-_PewterCityText_193fb:: ; a4aa2 (29:4aa2)
+_PewterCityText_193fb::
text "Really?"
line "You absolutely"
cont "have to go!"
done
-_PewterCityText13:: ; a4ac6 (29:4ac6)
+_PewterCityText13::
text "It's right here!"
line "You have to pay"
cont "to get in, but"
@@ -45,24 +45,24 @@ _PewterCityText13:: ; a4ac6 (29:4ac6)
cont "See you around!"
done
-_PewterCityText_19427:: ; a4b14 (29:4b14)
+_PewterCityText_19427::
text "Psssst!"
line "Do you know what"
cont "I'm doing?"
done
-_PewterCityText_1942c:: ; a4b38 (29:4b38)
+_PewterCityText_1942c::
text "That's right!"
line "It's hard work!"
done
-_PewterCityText_19431:: ; a4b55 (29:4b55)
+_PewterCityText_19431::
text "I'm spraying REPEL"
line "to keep #MON"
cont "out of my garden!"
done
-_PewterCityText_1945d:: ; a4b87 (29:4b87)
+_PewterCityText_1945d::
text "You're a trainer"
line "right? BROCK's"
cont "looking for new"
@@ -70,13 +70,13 @@ _PewterCityText_1945d:: ; a4b87 (29:4b87)
cont "Follow me!"
done
-_PewterCityText_19462:: ; a4bce (29:4bce)
+_PewterCityText_19462::
text "If you have the"
line "right stuff, go"
cont "take on BROCK!"
done
-_PewterCityText6:: ; a4bfe (29:4bfe)
+_PewterCityText6::
text "TRAINER TIPS"
para "Any #MON that"
@@ -85,7 +85,7 @@ _PewterCityText6:: ; a4bfe (29:4bfe)
cont "short, earns EXP!"
done
-_PewterCityText7:: ; a4c4a (29:4c4a)
+_PewterCityText7::
text "NOTICE!"
para "Thieves have been"
@@ -96,12 +96,12 @@ _PewterCityText7:: ; a4c4a (29:4c4a)
cont "with any info!"
done
-_PewterCityText10:: ; a4cb1 (29:4cb1)
+_PewterCityText10::
text "PEWTER MUSEUM"
line "OF SCIENCE"
done
-_PewterCityText11:: ; a4ccb (29:4ccb)
+_PewterCityText11::
text "PEWTER CITY"
line "#MON GYM"
cont "LEADER: BROCK"
@@ -110,7 +110,7 @@ _PewterCityText11:: ; a4ccb (29:4ccb)
line "#MON Trainer!"
done
-_PewterCityText12:: ; a4d0c (29:4d0c)
+_PewterCityText12::
text "PEWTER CITY"
line "A Stone Gray"
cont "City"
diff --git a/text/maps/pewter_gym_1.asm b/text/maps/pewter_gym_1.asm
index 9f3a1213..1d56065b 100644
--- a/text/maps/pewter_gym_1.asm
+++ b/text/maps/pewter_gym_1.asm
@@ -1,4 +1,4 @@
-_PewterGymText_5c49e:: ; 9697a (25:697a)
+_PewterGymText_5c49e::
text "I'm BROCK!"
line "I'm PEWTER's GYM"
cont "LEADER!"
diff --git a/text/maps/pewter_gym_2.asm b/text/maps/pewter_gym_2.asm
index 433fd649..ff5f7242 100644
--- a/text/maps/pewter_gym_2.asm
+++ b/text/maps/pewter_gym_2.asm
@@ -1,25 +1,8 @@
-_PewterGymText_5c4a3:: ; 98000 (26:4000)
+_PewterGymText_5c4a3::
text "There are all"
line "kinds of trainers"
cont "in the world!"
-IF DEF(_YELLOW)
- para "Some raise #MON"
- line "for fights. Some"
- cont "see them as pets."
-
- para "I'm in training to"
- line "become a #MON"
- cont "breeder."
-
- para "If you take your"
- line "#MON training"
- cont "seriously, go"
- cont "visit the GYM in"
- cont "CERULEAN and test"
- cont "your abilities!"
- done
-ELSE
para "You appear to be"
line "very gifted as a"
cont "#MON trainer!"
@@ -28,18 +11,17 @@ ELSE
line "CERULEAN and test"
cont "your abilities!"
done
-ENDC
-_TM34PreReceiveText:: ; 98092 (26:4092)
+_TM34PreReceiveText::
text "Wait! Take this"
line "with you!"
done
-_ReceivedTM34Text:: ; 980ad (26:40ad)
+_ReceivedTM34Text::
text $52, " received"
line "TM34!@@"
-_TM34ExplanationText:: ; 980c0 (26:40c0)
+_TM34ExplanationText::
db $0
para "A TM contains a"
line "technique that"
@@ -62,12 +44,12 @@ _TM34ExplanationText:: ; 980c0 (26:40c0)
cont "it back double!"
done
-_TM34NoRoomText:: ; 981ab (26:41ab)
+_TM34NoRoomText::
text "You don't have"
line "room for this!"
done
-_PewterGymText_5c4bc:: ; 981c9 (26:41c9)
+_PewterGymText_5c4bc::
text "I took"
line "you for granted."
@@ -78,7 +60,7 @@ _PewterGymText_5c4bc:: ; 981c9 (26:41c9)
para $52, " received"
line "the BOULDERBADGE!@@"
-_PewterGymText_5c4c1:: ; 98232 (26:4232)
+_PewterGymText_5c4c1::
db $0
para "That's an official"
line "#MON LEAGUE"
@@ -90,14 +72,10 @@ _PewterGymText_5c4c1:: ; 98232 (26:4232)
para "The technique"
line "FLASH can now be"
-IF DEF(_YELLOW)
- cont "used anytime!"
-ELSE
cont "used any time!"
-ENDC
prompt
-_PewterGymBattleText1:: ; 982ae (26:42ae)
+_PewterGymBattleText1::
text "Stop right there,"
line "kid!"
@@ -106,7 +84,7 @@ _PewterGymBattleText1:: ; 982ae (26:42ae)
cont "BROCK!"
done
-_PewterGymEndBattleText1:: ; 982f1 (26:42f1)
+_PewterGymEndBattleText1::
text "Darn!"
para "Light years isn't"
@@ -114,13 +92,13 @@ _PewterGymEndBattleText1:: ; 982f1 (26:42f1)
cont "distance!"
prompt
-_PewterGymAfterBattleText1:: ; 98325 (26:4325)
+_PewterGymAfterBattleText1::
text "You're pretty hot,"
line "but not as hot"
cont "as BROCK!"
done
-_PewterGymText_5c515:: ; 98351 (26:4351)
+_PewterGymText_5c515::
text "Hiya! I can tell"
line "you have what it"
cont "takes to become a"
@@ -134,12 +112,12 @@ _PewterGymText_5c515:: ; 98351 (26:4351)
line "to the top!"
done
-_PewterGymText_5c51a:: ; 983dc (26:43dc)
+_PewterGymText_5c51a::
text "All right! Let's"
line "get happening!"
prompt
-_PewterGymText_5c51f:: ; 983fc (26:43fc)
+_PewterGymText_5c51f::
text "The 1st #MON"
line "out in a match is"
cont "at the top of the"
@@ -151,30 +129,14 @@ _PewterGymText_5c51f:: ; 983fc (26:43fc)
cont "made easier!"
done
-_PewterGymText_5c524:: ; 98476 (26:4476)
+_PewterGymText_5c524::
text "It's a free"
line "service! Let's"
cont "get happening!"
prompt
-_PewterGymText_5c529:: ; 9849f (26:449f)
+_PewterGymText_5c529::
text "Just as I thought!"
line "You're #MON"
cont "champ material!"
done
-
-IF DEF(_YELLOW)
-_PewterGymGuyText::
- text "All right! Let's"
- line "get happening!"
-
- para "It will be tough"
- line "for your PIKACHU"
- cont "at this GYM!"
-
- para "Electric attacks"
- line "are harmless to"
- cont "BROCK's ground-"
- cont "type #MON."
- done
-ENDC
diff --git a/text/maps/pewter_house_1.asm b/text/maps/pewter_house_1.asm
index fa5ff179..0fe3e165 100644
--- a/text/maps/pewter_house_1.asm
+++ b/text/maps/pewter_house_1.asm
@@ -1,11 +1,11 @@
-_PewterHouse1Text1:: ; 984ce (26:44ce)
+_PewterHouse1Text1::
text "NIDORAN: Bowbow!@@"
-_PewterHouse1Text2:: ; 984e1 (26:44e1)
+_PewterHouse1Text2::
text "NIDORAN sit!"
done
-_PewterHouse1Text3:: ; 984ef (26:44ef)
+_PewterHouse1Text3::
text "Our #MON's an"
line "outsider, so it's"
cont "hard to handle."
diff --git a/text/maps/pewter_house_2.asm b/text/maps/pewter_house_2.asm
index 1e7b1cd6..34ebc90d 100644
--- a/text/maps/pewter_house_2.asm
+++ b/text/maps/pewter_house_2.asm
@@ -1,4 +1,4 @@
-_PewterHouse2Text1:: ; 98656 (26:4656)
+_PewterHouse2Text1::
text "#MON learn new"
line "techniques as"
cont "they grow!"
@@ -8,7 +8,7 @@ _PewterHouse2Text1:: ; 98656 (26:4656)
cont "the trainer!"
done
-_PewterHouse2Text2:: ; 986ae (26:46ae)
+_PewterHouse2Text2::
text "#MON become"
line "easier to catch"
cont "when they are"
diff --git a/text/maps/pewter_mart.asm b/text/maps/pewter_mart.asm
index 71760b7b..bac57a53 100644
--- a/text/maps/pewter_mart.asm
+++ b/text/maps/pewter_mart.asm
@@ -1,9 +1,5 @@
-_PewterMartText_74cc6:: ; 985ac (26:45ac)
-IF DEF(_YELLOW)
- text "A shady old man"
-ELSE
+_PewterMartText_74cc6::
text "A shady, old man"
-ENDC
line "got me to buy"
cont "this really weird"
cont "fish #MON!"
@@ -12,7 +8,7 @@ ENDC
line "and it cost ¥500!"
done
-_PewterMartText_74cd5:: ; 9860c (26:460c)
+_PewterMartText_74cd5::
text "Good things can"
line "happen if you"
cont "raise #MON"
diff --git a/text/maps/pewter_pokecenter.asm b/text/maps/pewter_pokecenter.asm
index 114fed16..2df5c715 100644
--- a/text/maps/pewter_pokecenter.asm
+++ b/text/maps/pewter_pokecenter.asm
@@ -1,4 +1,4 @@
-_PewterPokecenterText1:: ; 98704 (26:4704)
+_PewterPokecenterText1::
text "What!?"
para "TEAM ROCKET is"
@@ -8,22 +8,7 @@ _PewterPokecenterText1:: ; 98704 (26:4704)
para "Scram!"
done
-IF DEF(_YELLOW)
-_PewterPokecenterText2::
- text "#MON CENTERS"
- line "are wonderful!"
-
- para "They heal #MON"
- line "completely."
-
- para "Even conditions"
- line "like sleep, burn,"
- cont "poison and others"
- cont "are cured."
- done
-ENDC
-
-_PewterPokecenterText5:: ; 98744 (26:4744)
+_PewterPokecenterText5::
text "JIGGLYPUFF: Puu"
line "pupuu!"
done
diff --git a/text/maps/pokemon_league_gate.asm b/text/maps/pokemon_league_gate.asm
index cadfea3b..b817ef81 100644
--- a/text/maps/pokemon_league_gate.asm
+++ b/text/maps/pokemon_league_gate.asm
@@ -1,4 +1,4 @@
-_Route22GateText_1e704:: ; 8cfbb (23:4fbb)
+_Route22GateText_1e704::
text "Only truly skilled"
line "trainers are"
cont "allowed through."
@@ -6,14 +6,14 @@ _Route22GateText_1e704:: ; 8cfbb (23:4fbb)
para "You don't have the"
line "BOULDERBADGE yet!@@"
-_Route22GateText_1e715:: ; 8d012 (23:5012)
+_Route22GateText_1e715::
db $0
para "The rules are"
line "rules. I can't"
cont "let you pass."
done
-_Route22GateText_1e71a:: ; 8d03e (23:503e)
+_Route22GateText_1e71a::
text "Oh! That is the"
line "BOULDERBADGE!"
cont "Go right ahead!@@"
diff --git a/text/maps/pokemon_tower_1f.asm b/text/maps/pokemon_tower_1f.asm
index 124888c0..b9570d18 100644
--- a/text/maps/pokemon_tower_1f.asm
+++ b/text/maps/pokemon_tower_1f.asm
@@ -1,17 +1,17 @@
-_PokemonTower1Text1:: ; 9947f (26:547f)
+_PokemonTower1Text1::
text "#MON TOWER was"
line "erected in the"
cont "memory of #MON"
cont "that had died."
done
-_PokemonTower1Text2:: ; 994bc (26:54bc)
+_PokemonTower1Text2::
text "Did you come to"
line "pay respects?"
cont "Bless you!"
done
-_PokemonTower1Text3:: ; 994e6 (26:54e6)
+_PokemonTower1Text3::
text "I came to pray"
line "for my CLEFAIRY."
@@ -19,12 +19,12 @@ _PokemonTower1Text3:: ; 994e6 (26:54e6)
line "stop crying..."
done
-_PokemonTower1Text4:: ; 99524 (26:5524)
+_PokemonTower1Text4::
text "My GROWLITHE..."
line "Why did you die?"
done
-_PokemonTower1Text5:: ; 99546 (26:5546)
+_PokemonTower1Text5::
text "I am a CHANNELER!"
line "There are spirits"
cont "up to mischief!"
diff --git a/text/maps/pokemon_tower_2f.asm b/text/maps/pokemon_tower_2f.asm
index 6a33e085..e41112a4 100644
--- a/text/maps/pokemon_tower_2f.asm
+++ b/text/maps/pokemon_tower_2f.asm
@@ -1,4 +1,4 @@
-_PokemonTower2Text_6062d:: ; 9957b (26:557b)
+_PokemonTower2Text_6062d::
text $53, ": Hey,"
line $52, "! What"
cont "brings you here?"
@@ -10,7 +10,7 @@ _PokemonTower2Text_6062d:: ; 9957b (26:557b)
cont "Let's go, pal!"
done
-_PokemonTower2Text_60632:: ; 995e5 (26:55e5)
+_PokemonTower2Text_60632::
text "What?"
line "You stinker!"
@@ -18,7 +18,7 @@ _PokemonTower2Text_60632:: ; 995e5 (26:55e5)
line "you too!"
prompt
-_PokemonTower2Text_60637:: ; 99614 (26:5614)
+_PokemonTower2Text_60637::
text $53, ": Well,"
line "look at all your"
cont "wimpy #MON!"
@@ -27,7 +27,7 @@ _PokemonTower2Text_60637:: ; 99614 (26:5614)
line "bit more!"
prompt
-_PokemonTower2Text_6063c:: ; 99657 (26:5657)
+_PokemonTower2Text_6063c::
text "How's your #DEX"
line "coming, pal?"
cont "I just caught a"
@@ -46,7 +46,7 @@ _PokemonTower2Text_6063c:: ; 99657 (26:5657)
para "Smell ya later!"
done
-_PokemonTower2Text2:: ; 9971a (26:571a)
+_PokemonTower2Text2::
text "Even we could not"
line "identify the"
cont "wayward GHOSTs!"
diff --git a/text/maps/pokemon_tower_3f.asm b/text/maps/pokemon_tower_3f.asm
index 267d8ab6..443aecd5 100644
--- a/text/maps/pokemon_tower_3f.asm
+++ b/text/maps/pokemon_tower_3f.asm
@@ -1,45 +1,45 @@
-_PokemonTower3BattleText1:: ; 99776 (26:5776)
+_PokemonTower3BattleText1::
text "Urrg...Awaa..."
line "Huhu...graa.."
done
-_PokemonTower3EndBattleText1:: ; 99794 (26:5794)
+_PokemonTower3EndBattleText1::
text "Hwa!"
line "I'm saved!"
prompt
-_PokemonTower3AfterBattleText1:: ; 997a4 (26:57a4)
+_PokemonTower3AfterBattleText1::
text "The GHOSTs can be"
line "identified by the"
cont "SILPH SCOPE."
done
-_PokemonTower3BattleText2:: ; 997d6 (26:57d6)
+_PokemonTower3BattleText2::
text "Kekeke...."
line "Kwaaah!"
done
-_PokemonTower3EndBattleText2:: ; 997ea (26:57ea)
+_PokemonTower3EndBattleText2::
text "Hmm?"
line "What am I doing?"
prompt
-_PokemonTower3AfterBattleText2:: ; 99801 (26:5801)
+_PokemonTower3AfterBattleText2::
text "Sorry! I was"
line "possessed!"
done
-_PokemonTower3BattleText3:: ; 9981a (26:581a)
+_PokemonTower3BattleText3::
text "Be gone!"
line "Evil spirit!"
done
-_PokemonTower3EndBattleText3:: ; 99831 (26:5831)
+_PokemonTower3EndBattleText3::
text "Whew!"
line "The spirit left!"
prompt
-_PokemonTower3AfterBattleText3:: ; 99849 (26:5849)
+_PokemonTower3AfterBattleText3::
text "My friends were"
line "possessed too!"
done
diff --git a/text/maps/pokemon_tower_4f.asm b/text/maps/pokemon_tower_4f.asm
index cde92b0c..e8fa75b6 100644
--- a/text/maps/pokemon_tower_4f.asm
+++ b/text/maps/pokemon_tower_4f.asm
@@ -1,44 +1,44 @@
-_PokemonTower4BattleText1:: ; 99869 (26:5869)
+_PokemonTower4BattleText1::
text "GHOST! No!"
line "Kwaaah!"
done
-_PokemonTower4EndBattleText1:: ; 9987d (26:587d)
+_PokemonTower4EndBattleText1::
text "Where"
line "is the GHOST?"
prompt
-_PokemonTower4AfterBattleText1:: ; 99892 (26:5892)
+_PokemonTower4AfterBattleText1::
text "I must have been"
line "dreaming..."
done
-_PokemonTower4BattleText2:: ; 998b0 (26:58b0)
+_PokemonTower4BattleText2::
text "Be cursed with"
line "me! Kwaaah!"
done
-_PokemonTower4EndBattleText2:: ; 998cc (26:58cc)
+_PokemonTower4EndBattleText2::
text "What!"
prompt
-_PokemonTower4AfterBattleText2:: ; 998d3 (26:58d3)
+_PokemonTower4AfterBattleText2::
text "We can't crack"
line "the identity of"
cont "the GHOSTs."
done
-_PokemonTower4BattleText3:: ; 998fe (26:58fe)
+_PokemonTower4BattleText3::
text "Huhuhu..."
line "Beat me not!"
done
-_PokemonTower4EndBattleText3:: ; 99916 (26:5916)
+_PokemonTower4EndBattleText3::
text "Huh?"
line "Who? What?"
prompt
-_PokemonTower4AfterBattleText3:: ; 99927 (26:5927)
+_PokemonTower4AfterBattleText3::
text "May the departed"
line "souls of #MON"
cont "rest in peace..."
diff --git a/text/maps/pokemon_tower_5f.asm b/text/maps/pokemon_tower_5f.asm
index 95ce2f4b..bbdc3d84 100644
--- a/text/maps/pokemon_tower_5f.asm
+++ b/text/maps/pokemon_tower_5f.asm
@@ -1,4 +1,4 @@
-_PokemonTower5Text1:: ; 99958 (26:5958)
+_PokemonTower5Text1::
text "Come, child! I"
line "sealed this space"
cont "with white magic!"
@@ -6,63 +6,63 @@ _PokemonTower5Text1:: ; 99958 (26:5958)
para "You can rest here!"
done
-_PokemonTower5BattleText1:: ; 9999f (26:599f)
+_PokemonTower5BattleText1::
text "Give...me..."
line "your...soul..."
done
-_PokemonTower5EndBattleText1:: ; 999bc (26:59bc)
+_PokemonTower5EndBattleText1::
text "Gasp!"
prompt
-_PokemonTower5AfterBattleText1:: ; 999c3 (26:59c3)
+_PokemonTower5AfterBattleText1::
text "I was under"
line "possession!"
done
-_PokemonTower5BattleText2:: ; 999dc (26:59dc)
+_PokemonTower5BattleText2::
text "You...shall..."
line "join...us..."
done
-_PokemonTower5EndBattleText2:: ; 999f9 (26:59f9)
+_PokemonTower5EndBattleText2::
text "What"
line "a nightmare!"
prompt
-_PokemonTower5AfterBattleText2:: ; 99a0c (26:5a0c)
+_PokemonTower5AfterBattleText2::
text "I was possessed!"
done
-_PokemonTower5BattleText3:: ; 99a1e (26:5a1e)
+_PokemonTower5BattleText3::
text "Zombies!"
done
-_PokemonTower5EndBattleText3:: ; 99a28 (26:5a28)
+_PokemonTower5EndBattleText3::
text "Ha?"
prompt
-_PokemonTower5AfterBattleText3:: ; 99a2d (26:5a2d)
+_PokemonTower5AfterBattleText3::
text "I regained my"
line "senses!"
done
-_PokemonTower5BattleText4:: ; 99a44 (26:5a44)
+_PokemonTower5BattleText4::
text "Urgah..."
line "Urff...."
done
-_PokemonTower5EndBattleText4:: ; 99a57 (26:5a57)
+_PokemonTower5EndBattleText4::
text "Whoo!"
prompt
-_PokemonTower5AfterBattleText4:: ; 99a5e (26:5a5e)
+_PokemonTower5AfterBattleText4::
text "I fell to evil"
line "spirits despite"
cont "my training!"
done
-_PokemonTower5Text7:: ; 99a8b (26:5a8b)
+_PokemonTower5Text7::
text "Entered purified,"
line "protected zone!"
diff --git a/text/maps/pokemon_tower_6f.asm b/text/maps/pokemon_tower_6f.asm
index 08eb6b1a..ff8bc73c 100644
--- a/text/maps/pokemon_tower_6f.asm
+++ b/text/maps/pokemon_tower_6f.asm
@@ -1,10 +1,10 @@
-_PokemonTower2Text_60c1f:: ; 99ac8 (26:5ac8)
+_PokemonTower2Text_60c1f::
text "The GHOST was the"
line "restless soul of"
cont "CUBONE's mother!"
done
-_PokemonTower2Text_60c24:: ; 99afc (26:5afc)
+_PokemonTower2Text_60c24::
text "The mother's soul"
line "was calmed."
@@ -12,50 +12,50 @@ _PokemonTower2Text_60c24:: ; 99afc (26:5afc)
line "the afterlife!"
done
-_PokemonTower6BattleText1:: ; 99b38 (26:5b38)
+_PokemonTower6BattleText1::
text "Give...me..."
line "blood..."
done
-_PokemonTower6EndBattleText1:: ; 99b4f (26:5b4f)
+_PokemonTower6EndBattleText1::
text "Groan!"
prompt
-_PokemonTower6AfterBattleText1:: ; 99b57 (26:5b57)
+_PokemonTower6AfterBattleText1::
text "I feel anemic and"
line "weak..."
done
-_PokemonTower6BattleText2:: ; 99b72 (26:5b72)
+_PokemonTower6BattleText2::
text "Urff... Kwaah!"
done
-_PokemonTower6EndBattleText2:: ; 99b82 (26:5b82)
+_PokemonTower6EndBattleText2::
text "Some-"
line "thing fell out!"
prompt
-_PokemonTower6AfterBattleText2:: ; 99b99 (26:5b99)
+_PokemonTower6AfterBattleText2::
text "Hair didn't fall"
line "out! It was an"
cont "evil spirit!"
done
-_PokemonTower6BattleText3:: ; 99bc6 (26:5bc6)
+_PokemonTower6BattleText3::
text "Ke..ke...ke..."
line "ke..ke...ke!!"
done
-_PokemonTower6EndBattleText3:: ; 99be4 (26:5be4)
+_PokemonTower6EndBattleText3::
text "Keee!"
prompt
-_PokemonTower6AfterBattleText3:: ; 99beb (26:5beb)
+_PokemonTower6AfterBattleText3::
text "What's going on"
line "here?"
done
-_PokemonTower6Text6:: ; 99c01 (26:5c01)
+_PokemonTower6Text6::
text "Be gone..."
line "Intruders..."
done
diff --git a/text/maps/pokemon_tower_7f.asm b/text/maps/pokemon_tower_7f.asm
index 2c1449b1..704a71eb 100644
--- a/text/maps/pokemon_tower_7f.asm
+++ b/text/maps/pokemon_tower_7f.asm
@@ -1,30 +1,4 @@
-IF DEF(_YELLOW)
-_PokemonTowerJessieJamesText1::
- text "Stop right there!@@"
-
-_PokemonTowerJessieJamesText2::
- text "Grampa here wanted"
- line "to complain, so"
- cont "we're setting him"
- cont "straight."
-
- para "So render yourself"
- line "invisible, or"
- cont "prepare to fight!"
- done
-
-_PokemonTowerJessieJamesText3::
- text "You"
- line "will regret this!"
- prompt
-
-_PokemonTowerJessieJamesText4::
- text "Looks like TEAM"
- line "ROCKET's blasting"
- cont "off again!@@"
-ENDC
-
-_TowerRescueFujiText:: ; 99c1a (26:5c1a)
+_TowerRescueFujiText::
text "MR.FUJI: Heh? You"
line "came to save me?"
@@ -50,21 +24,21 @@ _TowerRescueFujiText:: ; 99c1a (26:5c1a)
cont "of this tower."
done
-_PokemonTower7BattleText1:: ; 99d31 (26:5d31)
+_PokemonTower7BattleText1::
text "What do you want?"
line "Why are you here?"
done
-_PokemonTower7EndBattleText1:: ; 99d56 (26:5d56)
+_PokemonTower7EndBattleText1::
text "I give up!"
prompt
-_PokemonTower7AfterBattleText1:: ; 99d62 (26:5d62)
+_PokemonTower7AfterBattleText1::
text "I'm not going to"
line "forget this!"
done
-_PokemonTower7BattleText2:: ; 99d80 (26:5d80)
+_PokemonTower7BattleText2::
text "This old guy came"
line "and complained"
cont "about us harming"
@@ -74,12 +48,12 @@ _PokemonTower7BattleText2:: ; 99d80 (26:5d80)
line "over as adults!"
done
-_PokemonTower7EndBattleText2:: ; 99de1 (26:5de1)
+_PokemonTower7EndBattleText2::
text "Please!"
line "No more!"
prompt
-_PokemonTower7AfterBattleText2:: ; 99df3 (26:5df3)
+_PokemonTower7AfterBattleText2::
text "#MON are only"
line "good for making"
cont "money!"
@@ -88,18 +62,17 @@ _PokemonTower7AfterBattleText2:: ; 99df3 (26:5df3)
line "business!"
done
-_PokemonTower7BattleText3:: ; 99e33 (26:5e33)
+_PokemonTower7BattleText3::
text "You're not saving"
line "anyone, kid!"
done
-_PokemonTower7EndBattleText3:: ; 99e52 (26:5e52)
+_PokemonTower7EndBattleText3::
text "Don't"
line "fight us ROCKETs!"
prompt
-_PokemonTower7AfterBattleText3:: ; 99e6a (26:5e6a)
+_PokemonTower7AfterBattleText3::
text "You're not getting"
line "away with this!"
done
-
diff --git a/text/maps/power_plant.asm b/text/maps/power_plant.asm
index 477bf60a..2ea387d7 100644
--- a/text/maps/power_plant.asm
+++ b/text/maps/power_plant.asm
@@ -1,7 +1,7 @@
-_VoltorbBattleText:: ; 8c5e2 (23:45e2)
+_VoltorbBattleText::
text "Bzzzt!"
done
-_ZapdosBattleText:: ; 8c5ea (23:45ea)
+_ZapdosBattleText::
text "Gyaoo!@@"
diff --git a/text/maps/reds_house_1f.asm b/text/maps/reds_house_1f.asm
index 16cf5129..729c5b46 100644
--- a/text/maps/reds_house_1f.asm
+++ b/text/maps/reds_house_1f.asm
@@ -1,11 +1,7 @@
_MomWakeUpText::
text "MOM: Right."
line "All boys leave"
-IF DEF(_YELLOW)
- cont "home someday."
-ELSE
cont "home some day."
-ENDC
cont "It said so on TV."
para "PROF.OAK, next"
@@ -14,22 +10,10 @@ ENDC
done
_MomHealText1::
-IF DEF(_YELLOW)
- text "MOM: ",$52,", if"
- line "your drive your"
- cont "#MON too hard,"
- cont "they'll dislike"
- cont "you."
-
- para "You should take a"
- line "rest."
- prompt
-ELSE
text "MOM: ",$52,"!"
line "You should take a"
cont "quick rest."
prompt
-ENDC
_MomHealText2::
text "MOM: Oh good!"
diff --git a/text/maps/rock_tunnel_b1f.asm b/text/maps/rock_tunnel_b1f.asm
index 4ad2b255..88659e8e 100644
--- a/text/maps/rock_tunnel_b1f.asm
+++ b/text/maps/rock_tunnel_b1f.asm
@@ -1,114 +1,114 @@
-_RockTunnel1BattleText1:: ; 8c33a (23:433a)
+_RockTunnel1BattleText1::
text "This tunnel goes"
line "a long way, kid!"
done
-_RockTunnel1EndBattleText1:: ; 8c35d (23:435d)
+_RockTunnel1EndBattleText1::
text "Doh!"
line "You win!"
prompt
-_RockTunnel1AfterBattleText1:: ; 8c36c (23:436c)
+_RockTunnel1AfterBattleText1::
text "Watch for ONIX!"
line "It can put the"
cont "squeeze on you!"
done
-_RockTunnel1BattleText2:: ; 8c39c (23:439c)
+_RockTunnel1BattleText2::
text "Hmm. Maybe I'm"
line "lost in here..."
done
-_RockTunnel1EndBattleText2:: ; 8c3bb (23:43bb)
+_RockTunnel1EndBattleText2::
text "Ease up!"
line "What am I doing?"
cont "Which way is out?"
prompt
-_RockTunnel1AfterBattleText2:: ; 8c3e8 (23:43e8)
+_RockTunnel1AfterBattleText2::
text "That sleeping"
line "#MON on ROUTE"
cont "12 forced me to"
cont "take this detour."
done
-_RockTunnel1BattleText3:: ; 8c427 (23:4427)
+_RockTunnel1BattleText3::
text "Outsiders like"
line "you need to show"
cont "me some respect!"
done
-_RockTunnel1EndBattleText3:: ; 8c459 (23:4459)
+_RockTunnel1EndBattleText3::
text "I give!"
prompt
-_RockTunnel1AfterBattleText3:: ; 8c462 (23:4462)
+_RockTunnel1AfterBattleText3::
text "You're talented"
line "enough to hike!"
done
-_RockTunnel1BattleText4:: ; 8c482 (23:4482)
+_RockTunnel1BattleText4::
text "#MON fight!"
line "Ready, go!"
done
-_RockTunnel1EndBattleText4:: ; 8c49a (23:449a)
+_RockTunnel1EndBattleText4::
text "Game"
line "over!"
prompt
-_RockTunnel1AfterBattleText4:: ; 8c4a6 (23:44a6)
+_RockTunnel1AfterBattleText4::
text "Oh well, I'll get"
line "a ZUBAT as I go!"
done
-_RockTunnel1BattleText5:: ; 8c4c9 (23:44c9)
+_RockTunnel1BattleText5::
text "Eek! Don't try"
line "anything funny in"
cont "the dark!"
done
-_RockTunnel1EndBattleText5:: ; 8c4f4 (23:44f4)
+_RockTunnel1EndBattleText5::
text "It"
line "was too dark!"
prompt
-_RockTunnel1AfterBattleText5:: ; 8c506 (23:4506)
+_RockTunnel1AfterBattleText5::
text "I saw a MACHOP"
line "in this tunnel!"
done
-_RockTunnel1BattleText6:: ; 8c526 (23:4526)
+_RockTunnel1BattleText6::
text "I came this far"
line "for #MON!"
done
-_RockTunnel1EndBattleText6:: ; 8c541 (23:4541)
+_RockTunnel1EndBattleText6::
text "I'm"
line "out of #MON!"
prompt
-_RockTunnel1AfterBattleText6:: ; 8c552 (23:4552)
+_RockTunnel1AfterBattleText6::
text "You looked cute"
line "and harmless!"
done
-_RockTunnel1BattleText7:: ; 8c571 (23:4571)
+_RockTunnel1BattleText7::
text "You have #MON!"
line "Let's start!"
done
-_RockTunnel1EndBattleText7:: ; 8c58d (23:458d)
+_RockTunnel1EndBattleText7::
text "You"
line "play hard!"
prompt
-_RockTunnel1AfterBattleText7:: ; 8c59d (23:459d)
+_RockTunnel1AfterBattleText7::
text "Whew! I'm all"
line "sweaty now!"
done
-_RockTunnel1Text8:: ; 8c5b7 (23:45b7)
+_RockTunnel1Text8::
text "ROCK TUNNEL"
line "CERULEAN CITY -"
cont "LAVENDER TOWN"
diff --git a/text/maps/rock_tunnel_b2f_1.asm b/text/maps/rock_tunnel_b2f_1.asm
index 47dc2bb9..e859a7f9 100644
--- a/text/maps/rock_tunnel_b2f_1.asm
+++ b/text/maps/rock_tunnel_b2f_1.asm
@@ -1,108 +1,108 @@
-_RockTunnel2BattleText2:: ; 86a1d (21:6a1d)
+_RockTunnel2BattleText2::
text "Hikers leave twigs"
line "as trail markers."
done
-_RockTunnel2EndBattleText2:: ; 86a43 (21:6a43)
+_RockTunnel2EndBattleText2::
text "Ohhh!"
line "I did my best!"
prompt
-_RockTunnel2AfterBattleText2:: ; 86a59 (21:6a59)
+_RockTunnel2AfterBattleText2::
text "I want to go "
line "home!"
done
-_RockTunnel2BattleText3:: ; 86a6e (21:6a6e)
+_RockTunnel2BattleText3::
text "Hahaha! Can you"
line "beat my power?"
done
-_RockTunnel2EndBattleText3:: ; 86a8e (21:6a8e)
+_RockTunnel2EndBattleText3::
text "Oops!"
line "Out-muscled!"
prompt
-_RockTunnel2AfterBattleText3:: ; 86aa2 (21:6aa2)
+_RockTunnel2AfterBattleText3::
text "I go for power"
line "because I hate"
cont "thinking!"
done
-_RockTunnel2BattleText4:: ; 86acb (21:6acb)
+_RockTunnel2BattleText4::
text "You have a"
line "#DEX?"
cont "I want one too!"
done
-_RockTunnel2EndBattleText4:: ; 86aed (21:6aed)
+_RockTunnel2EndBattleText4::
text "Shoot!"
line "I'm so jealous!"
prompt
-_RockTunnel2AfterBattleText4:: ; 86b04 (21:6b04)
+_RockTunnel2AfterBattleText4::
text "When you finish"
line "your #DEX, can"
cont "I have it?"
done
-_RockTunnel2BattleText5:: ; 86b2f (21:6b2f)
+_RockTunnel2BattleText5::
text "Do you know about"
line "costume players?"
done
-_RockTunnel2EndBattleText5:: ; 86b53 (21:6b53)
+_RockTunnel2EndBattleText5::
text "Well,"
line "that's that."
prompt
-_RockTunnel2AfterBattleText5:: ; 86b66 (21:6b66)
+_RockTunnel2AfterBattleText5::
text "Costume players"
line "dress up as"
cont "#MON for fun."
done
-_RockTunnel2BattleText6:: ; 86b91 (21:6b91)
+_RockTunnel2BattleText6::
text "My #MON"
line "techniques will"
cont "leave you crying!"
done
-_RockTunnel2EndBattleText6:: ; 86bbc (21:6bbc)
+_RockTunnel2EndBattleText6::
text "I give!"
line "You're a better"
cont "technician!"
prompt
-_RockTunnel2AfterBattleText6:: ; 86be0 (21:6be0)
+_RockTunnel2AfterBattleText6::
text "In mountains,"
line "you'll often find"
cont "rock-type #MON."
done
-_RockTunnel2BattleText7:: ; 86c10 (21:6c10)
+_RockTunnel2BattleText7::
text "I don't often"
line "come here, but I"
cont "will fight you."
done
-_RockTunnel2EndBattleText7:: ; 86c3f (21:6c3f)
+_RockTunnel2EndBattleText7::
text "Oh!"
line "I lost!"
prompt
-_RockTunnel2AfterBattleText7:: ; 86c4c (21:6c4c)
+_RockTunnel2AfterBattleText7::
text "I like tiny"
line "#MON, big ones"
cont "are too scary!"
done
-_RockTunnel2BattleText8:: ; 86c77 (21:6c77)
+_RockTunnel2BattleText8::
text "Hit me with your"
line "best shot!"
done
-_RockTunnel2EndBattleText8:: ; 86c94 (21:6c94)
+_RockTunnel2EndBattleText8::
text "Fired"
line "away!"
prompt
diff --git a/text/maps/rock_tunnel_b2f_2.asm b/text/maps/rock_tunnel_b2f_2.asm
index e76cdaaf..646ccd02 100644
--- a/text/maps/rock_tunnel_b2f_2.asm
+++ b/text/maps/rock_tunnel_b2f_2.asm
@@ -1,20 +1,20 @@
-_RockTunnel2AfterBattleText8:: ; 88000 (22:4000)
+_RockTunnel2AfterBattleText8::
text "I'll raise my"
line "#MON to beat"
cont "yours, kid!"
done
-_RockTunnel2BattleText9:: ; 88027 (22:4027)
+_RockTunnel2BattleText9::
text "I draw #MON"
line "when I'm home."
done
-_RockTunnel2EndBattleText9:: ; 88042 (22:4042)
+_RockTunnel2EndBattleText9::
text "Whew!"
line "I'm exhausted!"
prompt
-_RockTunnel2AfterBattleText9:: ; 88057 (22:4057)
+_RockTunnel2AfterBattleText9::
text "I'm an artist,"
line "not a fighter."
done
diff --git a/text/maps/rock_tunnel_pokecenter.asm b/text/maps/rock_tunnel_pokecenter.asm
index 715031ff..a5268dd2 100644
--- a/text/maps/rock_tunnel_pokecenter.asm
+++ b/text/maps/rock_tunnel_pokecenter.asm
@@ -1,4 +1,4 @@
-_RockTunnelPokecenterText1:: ; 8c2c0 (23:42c0)
+_RockTunnelPokecenterText1::
text "The element types"
line "of #MON make"
cont "them stronger"
@@ -7,7 +7,7 @@ _RockTunnelPokecenterText1:: ; 8c2c0 (23:42c0)
cont "others!"
done
-_RockTunnelPokecenterText3:: ; 8c316 (23:4316)
+_RockTunnelPokecenterText3::
text "I sold a useless"
line "NUGGET for ¥5000!"
done
diff --git a/text/maps/rocket_hideout_b1f.asm b/text/maps/rocket_hideout_b1f.asm
index bb75bb08..66ac1fbd 100644
--- a/text/maps/rocket_hideout_b1f.asm
+++ b/text/maps/rocket_hideout_b1f.asm
@@ -1,73 +1,73 @@
-_RocketHideout1EndBattleText6:: ; 81f2a (20:5f2a)
+_RocketHideout1EndBattleText6::
text "Why...?@@"
-_RocketHideout1BattleText2:: ; 81f34 (20:5f34)
+_RocketHideout1BattleText2::
text "Who are you? How"
line "did you get here?"
done
-_RocketHideout1EndBattleText2:: ; 81f58 (20:5f58)
+_RocketHideout1EndBattleText2::
text "Oww!"
line "Beaten!"
prompt
-_RocketHideout1AfterBattleTxt2:: ; 81f66 (20:5f66)
+_RocketHideout1AfterBattleTxt2::
text "Are you dissing"
line "TEAM ROCKET?"
done
-_RocketHideout1BattleText3:: ; 81f84 (20:5f84)
+_RocketHideout1BattleText3::
text "You broke into"
line "our operation?"
done
-_RocketHideout1EndBattleText3:: ; 81fa3 (20:5fa3)
+_RocketHideout1EndBattleText3::
text "Burnt!"
prompt
-_RocketHideout1AfterBattleTxt3:: ; 81fab (20:5fab)
+_RocketHideout1AfterBattleTxt3::
text "You're not going"
line "to get away with"
cont "this, brat!"
done
-_RocketHideout1BattleText4:: ; 81fd9 (20:5fd9)
+_RocketHideout1BattleText4::
text "Intruder alert!"
done
-_RocketHideout1EndBattleText4:: ; 81fea (20:5fea)
+_RocketHideout1EndBattleText4::
text "I"
line "can't do it!"
prompt
-_RocketHideout1AfterBattleTxt4:: ; 81ff9 (20:5ff9)
+_RocketHideout1AfterBattleTxt4::
text "SILPH SCOPE?"
line "I don't know"
cont "where it is!"
done
-_RocketHideout1BattleText5:: ; 82020 (20:6020)
+_RocketHideout1BattleText5::
text "Why did you come"
line "here?"
done
-_RocketHideout1EndBattleText5:: ; 82038 (20:6038)
+_RocketHideout1EndBattleText5::
text "This"
line "won't do!"
prompt
-_RocketHideout1AfterBattleTxt5:: ; 82047 (20:6047)
+_RocketHideout1AfterBattleTxt5::
text "OK, I'll talk!"
line "Take the elevator"
cont "to see my BOSS!"
done
-_RocketHideout1BattleText6:: ; 82078 (20:6078)
+_RocketHideout1BattleText6::
text "Are you lost, you"
line "little rat?"
done
-_RocketHideout1AfterBattleTxt6:: ; 82097 (20:6097)
+_RocketHideout1AfterBattleTxt6::
text "Uh-oh, that fight"
line "opened the door!"
done
diff --git a/text/maps/rocket_hideout_b2f.asm b/text/maps/rocket_hideout_b2f.asm
index abbdf646..1b0e9439 100644
--- a/text/maps/rocket_hideout_b2f.asm
+++ b/text/maps/rocket_hideout_b2f.asm
@@ -1,15 +1,15 @@
-_RocketHideout2BattleText2:: ; 820bb (20:60bb)
+_RocketHideout2BattleText2::
text "BOSS said you can"
line "see GHOSTs with"
cont "the SILPH SCOPE!"
done
-_RocketHideout2EndBattleText2:: ; 820ef (20:60ef)
+_RocketHideout2EndBattleText2::
text "I"
line "surrender!"
prompt
-_RocketHideout2AfterBattleTxt2:: ; 820fd (20:60fd)
+_RocketHideout2AfterBattleTxt2::
text "The TEAM ROCKET"
line "HQ has 4 basement"
cont "floors. Can you"
diff --git a/text/maps/rocket_hideout_b3f.asm b/text/maps/rocket_hideout_b3f.asm
index 78f0656b..67bc9c24 100644
--- a/text/maps/rocket_hideout_b3f.asm
+++ b/text/maps/rocket_hideout_b3f.asm
@@ -1,33 +1,33 @@
-_RocketHideout3BattleText2:: ; 82140 (20:6140)
+_RocketHideout3BattleText2::
text "Stop meddling in"
line "TEAM ROCKET's"
cont "affairs!"
done
-_RocketHideout3EndBattleText2:: ; 82168 (20:6168)
+_RocketHideout3EndBattleText2::
text "Oof!"
line "Taken down!"
prompt
-_RocketHideout3AfterBattleTxt2:: ; 8217a (20:617a)
+_RocketHideout3AfterBattleTxt2::
text "SILPH SCOPE?"
line "The machine the"
cont "BOSS stole. It's"
cont "here somewhere."
done
-_RocketHideout3BattleTxt:: ; 821b8 (20:61b8)
+_RocketHideout3BattleTxt::
text "We got word from"
line "upstairs that you"
cont "were coming!"
done
-_RocketHideout3EndBattleText3:: ; 821e9 (20:61e9)
+_RocketHideout3EndBattleText3::
text "What?"
line "I lost? No!"
prompt
-_RocketHide3AfterBattleText3:: ; 821fc (20:61fc)
+_RocketHide3AfterBattleText3::
text "Go ahead and go!"
line "But, you need the"
cont "LIFT KEY to run"
diff --git a/text/maps/rocket_hideout_b4f.asm b/text/maps/rocket_hideout_b4f.asm
index e069e4a9..6d84305a 100644
--- a/text/maps/rocket_hideout_b4f.asm
+++ b/text/maps/rocket_hideout_b4f.asm
@@ -1,40 +1,15 @@
-IF DEF(_YELLOW)
-_RocketHideoutJessieJamesText1::
- text "Not another step,"
- line "brat!@@"
-
-_RocketHideoutJessieJamesText2::
- text "How dare you"
- line "humiliate us at"
- cont "MT.MOON!"
-
- para "It's payback time,"
- line "you brat!"
- done
-
-_RocketHideoutJessieJamesText3::
- text "Such"
- line "a dreadful twerp!"
- prompt
-
-_RocketHideoutJessieJamesText4::
- text "Looks like TEAM"
- line "ROCKET's blasting"
- cont "off again!@@"
-ENDC
-
-_RocketHideout4Text_4557a:: ; 8223e (20:623e)
+_RocketHideout4Text_4557a::
text "So! I must say, I"
line "am impressed you"
cont "got here!"
done
-_RocketHideout4Text_4557f:: ; 8226c (20:626c)
+_RocketHideout4Text_4557f::
text "WHAT!"
line "This cannot be!"
prompt
-_RocketHideout4Text_45584:: ; 82283 (20:6283)
+_RocketHideout4Text_45584::
text "I see that you"
line "raise #MON"
cont "with utmost care."
@@ -51,49 +26,49 @@ _RocketHideout4Text_45584:: ; 82283 (20:6283)
line "again..."
done
-_RocketHideout4BattleText2:: ; 82326 (20:6326)
+_RocketHideout4BattleText2::
text "I know you! You"
line "ruined our plans"
cont "at MT.MOON!"
done
-_RocketHideout4EndBattleText2:: ; 82354 (20:6354)
+_RocketHideout4EndBattleText2::
text "Burned"
line "again!"
prompt
-_RocketHide4AfterBattleText2:: ; 82363 (20:6363)
+_RocketHide4AfterBattleText2::
text "Do you have"
line "something against"
cont "TEAM ROCKET?"
done
-_RocketHideout4BattleText3:: ; 8238f (20:638f)
+_RocketHideout4BattleText3::
text "How can you not"
line "see the beauty of"
cont "our evil?"
done
-_RocketHideout4EndBattleText3:: ; 823bc (20:63bc)
+_RocketHideout4EndBattleText3::
text "Ayaya!"
prompt
-_RocketHide4AfterBattleText3:: ; 823c4 (20:63c4)
+_RocketHide4AfterBattleText3::
text "BOSS! I'm sorry I"
line "failed you!"
done
-_RocketHideout4BattleText4:: ; 823e2 (20:63e2)
+_RocketHideout4BattleText4::
text "The elevator"
line "doesn't work? Who"
cont "has the LIFT KEY?"
done
-_RocketHideout4EndBattleText4:: ; 82413 (20:6413)
+_RocketHideout4EndBattleText4::
text "No!"
prompt
-_RocketHideout4Text_455ec:: ; 82418 (20:6418)
+_RocketHideout4Text_455ec::
text "Oh no! I dropped"
line "the LIFT KEY!"
done
diff --git a/text/maps/rocket_hideout_elevator.asm b/text/maps/rocket_hideout_elevator.asm
index 12fbad6d..c2ce930b 100644
--- a/text/maps/rocket_hideout_elevator.asm
+++ b/text/maps/rocket_hideout_elevator.asm
@@ -1,4 +1,4 @@
-_RocketElevatorText_4578b:: ; 82438 (20:6438)
+_RocketElevatorText_4578b::
text "It appears to"
line "need a key.@@"
diff --git a/text/maps/route_1.asm b/text/maps/route_1.asm
index 99807e3e..e343ea6f 100644
--- a/text/maps/route_1.asm
+++ b/text/maps/route_1.asm
@@ -1,4 +1,4 @@
-_Route1ViridianMartSampleText:: ; 8d5bf (23:55bf)
+_Route1ViridianMartSampleText::
text "Hi! I work at a"
line "#MON MART."
@@ -12,24 +12,24 @@ _Route1ViridianMartSampleText:: ; 8d5bf (23:55bf)
cont "Here you go!"
prompt
-_Route1Text_1cae8:: ; 8d643 (23:5643)
+_Route1Text_1cae8::
text $52, " got"
line "@"
TX_RAM wcf4b
text "!@@"
-_Route1Text_1caee:: ; 8d652 (23:5652)
+_Route1Text_1caee::
text "We also carry"
line "# BALLs for"
cont "catching #MON!"
done
-_Route1Text_1caf3:: ; 8d67c (23:567c)
+_Route1Text_1caf3::
text "You have too much"
line "stuff with you!"
done
-_Route1Text2:: ; 8d69f (23:569f)
+_Route1Text2::
text "See those ledges"
line "along the road?"
@@ -42,7 +42,7 @@ _Route1Text2:: ; 8d69f (23:569f)
cont "quicker that way."
done
-_Route1Text3:: ; 8d720 (23:5720)
+_Route1Text3::
text "ROUTE 1"
line "PALLET TOWN -"
cont "VIRIDIAN CITY"
diff --git a/text/maps/route_10.asm b/text/maps/route_10.asm
index 795f7e69..19d5fa2b 100644
--- a/text/maps/route_10.asm
+++ b/text/maps/route_10.asm
@@ -1,101 +1,97 @@
-_Route10BattleText1:: ; 8e642 (23:6642)
+_Route10BattleText1::
text "Wow, are you a"
line "#MANIAC too?"
cont "Want to see my"
cont "collection?"
done
-_Route10EndBattleText1:: ; 8e67a (23:667a)
+_Route10EndBattleText1::
text "Humph."
line "I'm not angry!"
prompt
-_Route10AfterBattleText1:: ; 8e690 (23:6690)
+_Route10AfterBattleText1::
text "I have more rare"
line "#MON at home!"
done
-_Route10BattleText2:: ; 8e6b0 (23:66b0)
+_Route10BattleText2::
text "Ha-hahah-ah-ha!"
done
-_Route10EndBattleText2:: ; 8e6c1 (23:66c1)
+_Route10EndBattleText2::
text "Ha-haha!"
line "Not laughing!"
cont "Ha-hay fever!"
cont "Haha-ha-choo!"
prompt
-_Route10AfterBattleText2:: ; 8e6f5 (23:66f5)
+_Route10AfterBattleText2::
text "Haha-ha-choo!"
line "Ha-choo!"
cont "Snort! Snivel!"
done
-_Route10BattleText3:: ; 8e71c (23:671c)
-IF DEF(_YELLOW)
- text "Hi, kid, want to"
-ELSE
+_Route10BattleText3::
text "Hi kid, want to"
-ENDC
line "see my #MON?"
done
-_Route10EndBattleText3:: ; 8e73a (23:673a)
+_Route10EndBattleText3::
text "Oh no!"
line "My #MON!"
prompt
-_Route10AfterBattleText3:: ; 8e74b (23:674b)
+_Route10AfterBattleText3::
text "I don't like you"
line "for beating me!"
done
-_Route10BattleText4:: ; 8e76c (23:676c)
+_Route10BattleText4::
text "I've been to a"
line "#MON GYM a few"
cont "times. But, I"
cont "lost each time."
done
-_Route10EndBattleText4:: ; 8e7a8 (23:67a8)
+_Route10EndBattleText4::
text "Ohh!"
line "Blew it again!"
prompt
-_Route10AfterBattleText4:: ; 8e7bd (23:67bd)
+_Route10AfterBattleText4::
text "I noticed some"
line "#MANIACs"
cont "prowling around."
done
-_Route10BattleText5:: ; 8e7e7 (23:67e7)
+_Route10BattleText5::
text "Ah! This mountain"
line "air is delicious!"
done
-_Route10EndBattleText5:: ; 8e80c (23:680c)
+_Route10EndBattleText5::
text "That"
line "cleared my head!"
prompt
-_Route10AfterBattleText5:: ; 8e823 (23:6823)
+_Route10AfterBattleText5::
text "I feel bloated on"
line "mountain air!"
done
-_Route10BattleText6:: ; 8e844 (23:6844)
+_Route10BattleText6::
text "I'm feeling a bit"
line "faint from this"
cont "tough hike."
done
-_Route10EndBattleText6:: ; 8e872 (23:6872)
+_Route10EndBattleText6::
text "I'm"
line "not up to it!"
prompt
-_Route10AfterBattleText6:: ; 8e884 (23:6884)
+_Route10AfterBattleText6::
text "The #MON here"
line "are so chunky!"
cont "There should be a"
@@ -103,12 +99,12 @@ _Route10AfterBattleText6:: ; 8e884 (23:6884)
cont "floral pattern!"
done
-_Route10Text9:: ; 8e8d4 (23:68d4)
-_Route10Text7:: ; 8e8d4 (23:68d4)
+_Route10Text9::
+_Route10Text7::
text "ROCK TUNNEL"
done
-_Route10Text10:: ; 8e8e1 (23:68e1)
+_Route10Text10::
text "POWER PLANT"
done
diff --git a/text/maps/route_11_1.asm b/text/maps/route_11_1.asm
index 0637cad3..e10825e9 100644
--- a/text/maps/route_11_1.asm
+++ b/text/maps/route_11_1.asm
@@ -1,123 +1,123 @@
-_Route11BattleText1:: ; 8e8ee (23:68ee)
+_Route11BattleText1::
text "Win, lose or draw!"
done
-_Route11EndBattleText1:: ; 8e902 (23:6902)
+_Route11EndBattleText1::
text "Atcha!"
line "Didn't go my way!"
prompt
-_Route11AfterBattleText1:: ; 8e91b (23:691b)
+_Route11AfterBattleText1::
text "#MON is life!"
line "And to live is to"
cont "gamble!"
done
-_Route11BattleText2:: ; 8e944 (23:6944)
+_Route11BattleText2::
text "Competition! I"
line "can't get enough!"
done
-_Route11EndBattleText2:: ; 8e965 (23:6965)
+_Route11EndBattleText2::
text "I had"
line "a chance!"
prompt
-_Route11AfterBattleText2:: ; 8e976 (23:6976)
+_Route11AfterBattleText2::
text "You can't be a"
line "coward in the"
cont "world of #MON!"
done
-_Route11BattleText3:: ; 8e9a2 (23:69a2)
+_Route11BattleText3::
text "Let's go, but"
line "don't cheat!"
done
-_Route11EndBattleText3:: ; 8e9bc (23:69bc)
+_Route11EndBattleText3::
text "Huh?"
line "That's not right!"
prompt
-_Route11AfterBattleText3:: ; 8e9d3 (23:69d3)
+_Route11AfterBattleText3::
text "I did my best! I"
line "have no regrets!"
done
-_Route11BattleText4:: ; 8e9f6 (23:69f6)
+_Route11BattleText4::
text "Careful!"
line "I'm laying down"
cont "some cables!"
done
-_Route11EndBattleText4:: ; 8ea1c (23:6a1c)
+_Route11EndBattleText4::
text "That"
line "was electric!"
prompt
-_Route11AfterBattleText4:: ; 8ea30 (23:6a30)
+_Route11AfterBattleText4::
text "Spread the word"
line "to save energy!"
done
-_Route11BattleText5:: ; 8ea51 (23:6a51)
+_Route11BattleText5::
text "I just became a"
line "trainer! But, I"
cont "think I can win!"
done
-_Route11EndBattleText5:: ; 8ea83 (23:6a83)
+_Route11EndBattleText5::
text "My"
line "#MON couldn't!"
prompt
-_Route11AfterBattleText5:: ; 8ea95 (23:6a95)
+_Route11AfterBattleText5::
text "What do you want?"
line "Leave me alone!"
done
-_Route11BattleText6:: ; 8eab8 (23:6ab8)
+_Route11BattleText6::
text "Fwahaha! I have"
line "never lost!"
done
-_Route11EndBattleText6:: ; 8ead5 (23:6ad5)
+_Route11EndBattleText6::
text "My"
line "first loss!"
prompt
-_Route11AfterBattleText6:: ; 8eae5 (23:6ae5)
+_Route11AfterBattleText6::
text "Luck of the draw!"
line "Just luck!"
done
-_Route11BattleText7:: ; 8eb03 (23:6b03)
+_Route11BattleText7::
text "I have never won"
line "before..."
done
-_Route11EndBattleText7:: ; 8eb1f (23:6b1f)
+_Route11EndBattleText7::
text "I saw"
line "this coming..."
prompt
-_Route11AfterBattleText7:: ; 8eb35 (23:6b35)
+_Route11AfterBattleText7::
text "It's just luck."
line "Luck of the draw."
done
-_Route11BattleText8:: ; 8eb57 (23:6b57)
+_Route11BattleText8::
text "I'm the best in"
line "my class!"
done
-_Route11EndBattleText8:: ; 8eb71 (23:6b71)
+_Route11EndBattleText8::
text "Darn!"
line "I need to make my"
cont "#MON stronger!"
prompt
-_Route11AfterBattleText8:: ; 8eb99 (23:6b99)
+_Route11AfterBattleText8::
text "There's a fat"
line "#MON that"
cont "comes down from"
@@ -127,7 +127,7 @@ _Route11AfterBattleText8:: ; 8eb99 (23:6b99)
line "you can get it."
done
-_Route11BattleText9:: ; 8ebee (23:6bee)
+_Route11BattleText9::
text "Watch out for"
line "live wires!"
done
diff --git a/text/maps/route_11_2.asm b/text/maps/route_11_2.asm
index 7edb3f06..537fea42 100644
--- a/text/maps/route_11_2.asm
+++ b/text/maps/route_11_2.asm
@@ -1,29 +1,29 @@
-_Route11EndBattleText9:: ; 90000 (24:4000)
+_Route11EndBattleText9::
text "Whoa!"
line "You spark plug!"
prompt
-_Route11AfterBattleText9:: ; 90017 (24:4017)
+_Route11AfterBattleText9::
text "Well, better get"
line "back to work."
done
-_Route11BattleText10:: ; 90037 (24:4037)
+_Route11BattleText10::
text "My #MON should"
line "be ready by now!"
done
-_Route11EndBattleText10:: ; 90058 (24:4058)
+_Route11EndBattleText10::
text "Too"
line "much, too young!"
prompt
-_Route11AfterBattleText10:: ; 9006e (24:406e)
+_Route11AfterBattleText10::
text "I better go find"
line "stronger ones!"
done
-_Route11Text11:: ; 9008f (24:408f)
+_Route11Text11::
text "DIGLETT's CAVE"
done
diff --git a/text/maps/route_11_gate.asm b/text/maps/route_11_gate.asm
index 46897a38..db9ad871 100644
--- a/text/maps/route_11_gate.asm
+++ b/text/maps/route_11_gate.asm
@@ -1,4 +1,4 @@
-_Route11GateText1:: ; 8c5f3 (23:45f3)
+_Route11GateText1::
text "When you catch"
line "lots of #MON,"
cont "isn't it hard to"
diff --git a/text/maps/route_11_gate_upstairs.asm b/text/maps/route_11_gate_upstairs.asm
index 70c463ec..92eea2fb 100644
--- a/text/maps/route_11_gate_upstairs.asm
+++ b/text/maps/route_11_gate_upstairs.asm
@@ -1,4 +1,4 @@
-_Route11GateUpstairsText_494a3:: ; 8c689 (23:4689)
+_Route11GateUpstairsText_494a3::
text "There are items on"
line "the ground that"
cont "can't be seen."
@@ -28,7 +28,7 @@ _BinocularsNoSnorlaxText::
line "view!"
done
-_Route11GateUpstairsText_494d5:: ; 8c78b (23:478b)
+_Route11GateUpstairsText_494d5::
text "Looked into the"
line "binoculars."
diff --git a/text/maps/route_12.asm b/text/maps/route_12.asm
index 12925104..b0d05a30 100644
--- a/text/maps/route_12.asm
+++ b/text/maps/route_12.asm
@@ -1,144 +1,140 @@
-_Route12Text1:: ; 9009e (24:409e)
+_Route12Text1::
text "A sleeping #MON"
line "blocks the way!"
done
-_Route12Text13:: ; 900bf (24:40bf)
+_Route12Text13::
text "SNORLAX woke up!"
para "It attacked in a"
line "grumpy rage!"
done
-_Route12Text14:: ; 900ef (24:40ef)
+_Route12Text14::
text "SNORLAX calmed"
line "down! With a big"
cont "yawn, it returned"
cont "to the mountains!"
done
-_Route12BattleText1:: ; 90134 (24:4134)
+_Route12BattleText1::
text "Yeah! I got a"
line "bite, here!"
done
-_Route12EndBattleText1:: ; 9014f (24:414f)
+_Route12EndBattleText1::
text "Tch!"
line "Just a small fry!"
prompt
-_Route12AfterBattleText1:: ; 90167 (24:4167)
+_Route12AfterBattleText1::
text "Hang on! My line's"
line "snagged!"
done
-_Route12BattleText2:: ; 90183 (24:4183)
+_Route12BattleText2::
text "Be patient!"
line "Fishing is a"
cont "waiting game!"
done
-_Route12EndBattleText2:: ; 901ab (24:41ab)
+_Route12EndBattleText2::
text "That"
line "one got away!"
prompt
-_Route12AfterBattleText2:: ; 901bf (24:41bf)
+_Route12AfterBattleText2::
text "With a better ROD,"
line "I could catch"
cont "better #MON!"
done
-_Route12BattleText3:: ; 901ee (24:41ee)
+_Route12BattleText3::
text "Have you found a"
line "MOON STONE?"
done
-_Route12EndBattleText3:: ; 9020c (24:420c)
+_Route12EndBattleText3::
text "Oww!"
prompt
-_Route12AfterBattleText3:: ; 90212 (24:4212)
+_Route12AfterBattleText3::
text "I could have made"
line "my #MON evolve"
cont "with MOON STONE!"
done
-_Route12BattleText4:: ; 90245 (24:4245)
+_Route12BattleText4::
text "Electricity is my"
line "specialty!"
done
-_Route12EndBattleText4:: ; 90263 (24:4263)
+_Route12EndBattleText4::
text "Unplugged!"
prompt
-_Route12AfterBattleText4:: ; 9026f (24:426f)
+_Route12AfterBattleText4::
text "Water conducts"
line "electricity, so"
cont "you should zap"
cont "sea #MON!"
done
-_Route12BattleText5:: ; 902a8 (24:42a8)
+_Route12BattleText5::
text "The FISHING FOOL"
line "vs. #MON KID!"
done
-_Route12EndBattleText5:: ; 902c8 (24:42c8)
+_Route12EndBattleText5::
text "Too"
line "much!"
prompt
-_Route12AfterBattleText5:: ; 902d3 (24:42d3)
+_Route12AfterBattleText5::
text "You beat me at"
line "#MON, but I'm"
cont "good at fishing!"
done
-_Route12BattleText6:: ; 90301 (24:4301)
+_Route12BattleText6::
text "I'd rather be"
line "working!"
done
-_Route12EndBattleText6:: ; 90318 (24:4318)
+_Route12EndBattleText6::
text "It's"
line "not easy..."
prompt
-_Route12AfterBattleText6:: ; 90329 (24:4329)
+_Route12AfterBattleText6::
text "It's all right."
line "Losing doesn't"
-IF DEF(_YELLOW)
- cont "bug me anymore."
-ELSE
cont "bug me any more."
-ENDC
done
-_Route12BattleText7:: ; 90358 (24:4358)
+_Route12BattleText7::
text "You never know"
line "what you could"
cont "catch!"
done
-_Route12EndBattleText7:: ; 9037e (24:437e)
+_Route12EndBattleText7::
text "Lost"
line "it!"
prompt
-_Route12AfterBattleText7:: ; 90388 (24:4388)
+_Route12AfterBattleText7::
text "I catch MAGIKARP"
line "all the time, but"
cont "they're so weak!"
done
-_Route12Text11:: ; 903bc (24:43bc)
+_Route12Text11::
text "ROUTE 12 "
line "North to LAVENDER"
done
-_Route12Text12:: ; 903d9 (24:43d9)
+_Route12Text12::
text "SPORT FISHING AREA"
done
diff --git a/text/maps/route_12_gate.asm b/text/maps/route_12_gate.asm
index a384c3bc..246c3eac 100644
--- a/text/maps/route_12_gate.asm
+++ b/text/maps/route_12_gate.asm
@@ -1,4 +1,4 @@
-_Route12GateText1:: ; 8c84a (23:484a)
+_Route12GateText1::
text "There's a lookout"
line "spot upstairs."
done
diff --git a/text/maps/route_12_gate_upstairs.asm b/text/maps/route_12_gate_upstairs.asm
index 3e8fb60c..a9d74099 100644
--- a/text/maps/route_12_gate_upstairs.asm
+++ b/text/maps/route_12_gate_upstairs.asm
@@ -1,22 +1,18 @@
-_TM39PreReceiveText:: ; 8c86b (23:486b)
+_TM39PreReceiveText::
text "My #MON's"
line "ashes are stored"
cont "in #MON TOWER."
para "You can have this"
line "TM. I don't need"
-IF DEF(_YELLOW)
- cont "it anymore..."
-ELSE
cont "it any more..."
-ENDC
prompt
-_ReceivedTM39Text:: ; 8c8c6 (23:48c6)
+_ReceivedTM39Text::
text $52, " received"
line "TM39!@@"
-_TM39ExplanationText:: ; 8c8d9 (23:48d9)
+_TM39ExplanationText::
text "TM39 is a move"
line "called SWIFT."
@@ -26,19 +22,19 @@ _TM39ExplanationText:: ; 8c8d9 (23:48d9)
cont "afford to lose."
done
-_TM39NoRoomText:: ; 8c93c (23:493c)
+_TM39NoRoomText::
text "You don't have"
line "room for this."
done
-_Route12GateUpstairsText_495b8:: ; 8c95a (23:495a)
+_Route12GateUpstairsText_495b8::
text "Looked into the"
line "binoculars."
para "A man fishing!"
done
-_Route12GateUpstairsText_495c4:: ; 8c986 (23:4986)
+_Route12GateUpstairsText_495c4::
text "Looked into the"
line "binoculars."
diff --git a/text/maps/route_12_house.asm b/text/maps/route_12_house.asm
index 8ec4552b..97046b75 100644
--- a/text/maps/route_12_house.asm
+++ b/text/maps/route_12_house.asm
@@ -1,4 +1,4 @@
-_Route12HouseText_564c0:: ; 8c9b3 (23:49b3)
+_Route12HouseText_564c0::
text "I'm the FISHING"
line "GURU's brother!"
@@ -9,7 +9,7 @@ _Route12HouseText_564c0:: ; 8c9b3 (23:49b3)
line "fish?"
done
-_Route12HouseText_564c5:: ; 8ca00 (23:4a00)
+_Route12HouseText_564c5::
text "Grand! I like"
line "your style!"
@@ -21,7 +21,7 @@ _Route12HouseText_564c5:: ; 8ca00 (23:4a00)
TX_RAM wcf4b
text "!@@"
-_Route12HouseText_564ca:: ; 8ca4f (23:4a4f)
+_Route12HouseText_564ca::
db $0
para "Fishing is a way"
line "of life!"
@@ -32,12 +32,12 @@ _Route12HouseText_564ca:: ; 8ca4f (23:4a4f)
cont "one!"
done
-_Route12HouseText_564cf:: ; 8caa1 (23:4aa1)
+_Route12HouseText_564cf::
text "Oh... That's so"
line "disappointing..."
done
-_Route12HouseText_564d4:: ; 8cac2 (23:4ac2)
+_Route12HouseText_564d4::
text "Hello there,"
line $52, "!"
@@ -51,7 +51,7 @@ _Route12HouseText_564d4:: ; 8cac2 (23:4ac2)
line "wherever you can!"
done
-_Route12HouseText_564d9:: ; 8cb38 (23:4b38)
+_Route12HouseText_564d9::
text "Oh no!"
para "I had a gift for"
diff --git a/text/maps/route_13.asm b/text/maps/route_13.asm
index 6f31acbd..c7034eb5 100644
--- a/text/maps/route_13.asm
+++ b/text/maps/route_13.asm
@@ -1,170 +1,170 @@
-_Route13BattleText2:: ; 903ed (24:43ed)
+_Route13BattleText2::
text "My bird #MON"
line "want to scrap!"
done
-_Route13EndBattleText2:: ; 9040a (24:440a)
+_Route13EndBattleText2::
text "My"
line "bird combo lost?"
prompt
-_Route13AfterBattleText2:: ; 9041f (24:441f)
+_Route13AfterBattleText2::
text "My #MON look"
line "happy even though"
cont "they lost."
done
-_Route13BattleText3:: ; 9044a (24:444a)
+_Route13BattleText3::
text "I'm told I'm good"
line "for a kid!"
done
-_Route13EndBattleText3:: ; 90466 (24:4466)
+_Route13EndBattleText3::
text "Ohh!"
line "I lost!"
prompt
-_Route13AfterBattleText3:: ; 90474 (24:4474)
+_Route13AfterBattleText3::
text "I want to become"
line "a good trainer."
cont "I'll train hard."
done
-_Route13BattleText4:: ; 904a6 (24:44a6)
+_Route13BattleText4::
text "Wow! Your BADGEs"
line "are too cool!"
done
-_Route13EndBattleText4:: ; 904c6 (24:44c6)
+_Route13EndBattleText4::
text "Not"
line "enough!"
prompt
-_Route13AfterBattleText4:: ; 904d3 (24:44d3)
+_Route13AfterBattleText4::
text "You got those"
line "BADGEs from GYM"
cont "LEADERs. I know!"
done
-_Route13BattleText5:: ; 90503 (24:4503)
+_Route13BattleText5::
text "My cute #MON"
line "wish to make your"
cont "acquaintance."
done
-_Route13EndBattleText5:: ; 90531 (24:4531)
+_Route13EndBattleText5::
text "Wow!"
line "You totally won!"
prompt
-_Route13AfterBattleText5:: ; 90548 (24:4548)
+_Route13AfterBattleText5::
text "You have to make"
line "#MON fight to"
cont "toughen them up!"
done
-_Route13BattleText6:: ; 90579 (24:4579)
+_Route13BattleText6::
text "I found CARBOS in"
line "a cave once."
done
-_Route13EndBattleText6:: ; 90599 (24:4599)
+_Route13EndBattleText6::
text "Just"
line "messed up!"
prompt
-_Route13AfterBattleText6:: ; 905aa (24:45aa)
+_Route13AfterBattleText6::
text "CARBOS boosted"
line "the SPEED of my"
cont "#MON."
done
-_Route13BattleText7:: ; 905d0 (24:45d0)
+_Route13BattleText7::
text "The wind's blowing"
line "my way!"
done
-_Route13EndBattleText7:: ; 905eb (24:45eb)
+_Route13EndBattleText7::
text "The"
line "wind turned!"
prompt
-_Route13AfterBattleText7:: ; 905fd (24:45fd)
+_Route13AfterBattleText7::
text "I'm beat. I guess"
line "I'll FLY home."
done
-_Route13BattleText8:: ; 9061d (24:461d)
+_Route13BattleText8::
text "Sure, I'll play"
line "with you!"
done
-_Route13EndBattleText8:: ; 90637 (24:4637)
+_Route13EndBattleText8::
text "Oh!"
line "You little brute!"
prompt
-_Route13AfterBattleText8:: ; 9064e (24:464e)
+_Route13AfterBattleText8::
text "I wonder which is"
line "stronger, male or"
cont "female #MON?"
done
-_Route13BattleText9:: ; 90680 (24:4680)
+_Route13BattleText9::
text "Do you want to"
line "#MON with me?"
done
-_Route13EndBattleText9:: ; 9069e (24:469e)
+_Route13EndBattleText9::
text "It's over"
line "already?"
prompt
-_Route13AfterBattleText9:: ; 906b1 (24:46b1)
+_Route13AfterBattleText9::
text "I don't know"
line "anything about"
cont "#MON. I just"
cont "like cool ones!"
done
-_Route13BattleText10:: ; 906ea (24:46ea)
+_Route13BattleText10::
text "What're you"
line "lookin' at?"
done
-_Route13EndBattleText10:: ; 90702 (24:4702)
+_Route13EndBattleText10::
text "Dang!"
line "Stripped gears!"
prompt
-_Route13AfterBattleText10:: ; 90719 (24:4719)
+_Route13AfterBattleText10::
text "Get lost!"
done
-_Route13BattleText11:: ; 90724 (24:4724)
+_Route13BattleText11::
text "I always go with"
line "bird #MON!"
done
-_Route13EndBattleText11:: ; 90741 (24:4741)
+_Route13EndBattleText11::
text "Out"
line "of power!"
prompt
-_Route13AfterBattleText11:: ; 90750 (24:4750)
+_Route13AfterBattleText11::
text "I wish I could"
line "fly like PIDGEY"
cont "and PIDGEOTTO..."
done
-_Route13Text11:: ; 90781 (24:4781)
+_Route13Text11::
text "TRAINER TIPS"
para "Look to the left"
line "of that post!"
done
-_Route13Text12:: ; 907ae (24:47ae)
+_Route13Text12::
text "TRAINER TIPS"
para "Use SELECT to"
@@ -172,7 +172,7 @@ _Route13Text12:: ; 907ae (24:47ae)
cont "the ITEM window!"
done
-_Route13Text13:: ; 907eb (24:47eb)
+_Route13Text13::
text "ROUTE 13"
line "North to SILENCE"
cont "BRIDGE"
diff --git a/text/maps/route_14.asm b/text/maps/route_14.asm
index b542274e..1371b5b0 100644
--- a/text/maps/route_14.asm
+++ b/text/maps/route_14.asm
@@ -1,151 +1,147 @@
-_Route14BattleText1:: ; 9080d (24:480d)
+_Route14BattleText1::
text "You need to use"
line "TMs to teach good"
cont "moves to #MON!"
done
-_Route14EndBattleText1:: ; 9083f (24:483f)
+_Route14EndBattleText1::
text "Not"
line "good enough!"
prompt
-_Route14AfterBattleText1:: ; 90851 (24:4851)
-IF DEF(_YELLOW)
- text "You have some HMs,"
-ELSE
+_Route14AfterBattleText1::
text "You have some HMs"
-ENDC
line "right? #MON"
cont "can't ever forget"
cont "those moves."
done
-_Route14BattleText2:: ; 9088e (24:488e)
+_Route14BattleText2::
text "My bird #MON"
line "should be ready"
cont "for battle."
done
-_Route14EndBattleText2:: ; 908b8 (24:48b8)
+_Route14EndBattleText2::
text "Not"
line "ready yet!"
prompt
-_Route14AfterBattleText2:: ; 908c8 (24:48c8)
+_Route14AfterBattleText2::
text "They need to learn"
line "better moves."
done
-_Route14BattleText3:: ; 908ea (24:48ea)
+_Route14BattleText3::
text "TMs are on sale"
line "in CELADON!"
cont "But, only a few"
cont "people have HMs!"
done
-_Route14EndBattleText3:: ; 90928 (24:4928)
+_Route14EndBattleText3::
text "Aww,"
line "bummer!"
prompt
-_Route14AfterBattleText3:: ; 90936 (24:4936)
+_Route14AfterBattleText3::
text "Teach #MON"
line "moves of the same"
cont "element type for"
cont "more power."
done
-_Route14BattleText4:: ; 90971 (24:4971)
+_Route14BattleText4::
text "Have you taught"
line "your bird #MON"
cont "how to FLY?"
done
-_Route14EndBattleText4:: ; 9099d (24:499d)
+_Route14EndBattleText4::
text "Shot"
line "down in flames!"
prompt
-_Route14AfterBattleText4:: ; 909b3 (24:49b3)
+_Route14AfterBattleText4::
text "Bird #MON are"
line "my true love!"
done
-_Route14BattleText5:: ; 909d0 (24:49d0)
+_Route14BattleText5::
text "Have you heard of"
line "the legendary"
cont "#MON?"
done
-_Route14EndBattleText5:: ; 909f7 (24:49f7)
+_Route14EndBattleText5::
text "Why?"
line "Why'd I lose?"
prompt
-_Route14AfterBattleText5:: ; 90a0a (24:4a0a)
+_Route14AfterBattleText5::
text "The 3 legendary"
line "#MON are all"
cont "birds of prey."
done
-_Route14BattleText6:: ; 90a37 (24:4a37)
+_Route14BattleText6::
text "I'm not into it,"
line "but OK! Let's go!"
done
-_Route14EndBattleText6:: ; 90a59 (24:4a59)
+_Route14EndBattleText6::
text "I"
line "knew it!"
prompt
-_Route14AfterBattleText6:: ; 90a65 (24:4a65)
+_Route14AfterBattleText6::
text "Winning, losing,"
line "it doesn't matter"
cont "in the long run!"
done
-_Route14BattleText7:: ; 90a99 (24:4a99)
+_Route14BattleText7::
text "C'mon, c'mon."
line "Let's go, let's"
cont "go, let's go!"
done
-_Route14EndBattleText7:: ; 90ac1 (24:4ac1)
+_Route14EndBattleText7::
text "Arrg!"
line "Lost! Get lost!"
prompt
-_Route14AfterBattleText7:: ; 90ad8 (24:4ad8)
+_Route14AfterBattleText7::
text "What, what, what?"
line "What do you want?"
done
-_Route14BattleText8:: ; 90afd (24:4afd)
+_Route14BattleText8::
text "Perfect! I need to"
line "burn some time!"
done
-_Route14EndBattleText8:: ; 90b21 (24:4b21)
+_Route14EndBattleText8::
text "What?"
line "You!?"
prompt
-_Route14AfterBattleText8:: ; 90b2e (24:4b2e)
+_Route14AfterBattleText8::
text "Raising #MON"
line "is a drag, man."
done
-_Route14BattleText9:: ; 90b4c (24:4b4c)
+_Route14BattleText9::
text "We ride out here"
line "because there's"
cont "more room!"
done
-_Route14EndBattleText9:: ; 90b78 (24:4b78)
+_Route14EndBattleText9::
text "Wipe out!"
prompt
-_Route14AfterBattleText9:: ; 90b83 (24:4b83)
+_Route14AfterBattleText9::
text "It's cool you"
line "made your #MON"
cont "so strong!"
@@ -154,23 +150,23 @@ _Route14AfterBattleText9:: ; 90b83 (24:4b83)
line "And you know it!"
done
-_Route14BattleText10:: ; 90bcc (24:4bcc)
+_Route14BattleText10::
text "#MON fight?"
line "Cool! Rumble!"
done
-_Route14EndBattleText10:: ; 90be7 (24:4be7)
+_Route14EndBattleText10::
text "Blown"
line "away!"
prompt
-_Route14AfterBattleText10:: ; 90bf4 (24:4bf4)
+_Route14AfterBattleText10::
text "You know who'd"
line "win, you and me"
cont "one on one!"
done
-_Route14Text11:: ; 90c1f (24:4c1f)
+_Route14Text11::
text "ROUTE 14"
line "West to FUCHSIA"
cont "CITY"
diff --git a/text/maps/route_15.asm b/text/maps/route_15.asm
index d217c9a4..1368b3d5 100644
--- a/text/maps/route_15.asm
+++ b/text/maps/route_15.asm
@@ -1,15 +1,15 @@
-_Route15BattleText1:: ; 90c3e (24:4c3e)
+_Route15BattleText1::
text "Let me try out the"
line "#MON I just"
cont "got in a trade!"
done
-_Route15EndBattleText1:: ; 90c6e (24:4c6e)
+_Route15EndBattleText1::
text "Not"
line "good enough!"
prompt
-_Route15AfterBattleText1:: ; 90c80 (24:4c80)
+_Route15AfterBattleText1::
text "You can't change"
line "the nickname of"
cont "any #MON you"
@@ -19,152 +19,152 @@ _Route15AfterBattleText1:: ; 90c80 (24:4c80)
line "Trainer can."
done
-_Route15BattleText2:: ; 90cdd (24:4cdd)
+_Route15BattleText2::
text "You look gentle,"
line "so I think I can"
cont "beat you!"
done
-_Route15EndBattleText2:: ; 90d0a (24:4d0a)
+_Route15EndBattleText2::
text "No,"
line "wrong!"
prompt
-_Route15AfterBattleText2:: ; 90d16 (24:4d16)
+_Route15AfterBattleText2::
text "I'm afraid of"
line "BIKERs, they look"
cont "so ugly and mean!"
done
-_Route15BattleText3:: ; 90d48 (24:4d48)
+_Route15BattleText3::
text "When I whistle, I"
line "can summon bird"
cont "#MON!"
done
-_Route15EndBattleText3:: ; 90d71 (24:4d71)
+_Route15EndBattleText3::
text "Ow!"
line "That's tragic!"
prompt
-_Route15AfterBattleText3:: ; 90d84 (24:4d84)
+_Route15AfterBattleText3::
text "Maybe I'm not cut"
line "out for battles."
done
-_Route15BattleText4:: ; 90da7 (24:4da7)
+_Route15BattleText4::
text "Hmm? My birds are"
line "shivering! You're"
cont "good, aren't you?"
done
-_Route15EndBattleText4:: ; 90ddc (24:4ddc)
+_Route15EndBattleText4::
text "Just"
line "as I thought!"
prompt
-_Route15AfterBattleText4:: ; 90df0 (24:4df0)
+_Route15AfterBattleText4::
text "Did you know moves"
line "like EARTHQUAKE"
cont "don't have any"
cont "effect on birds?"
done
-_Route15BattleText5:: ; 90e33 (24:4e33)
+_Route15BattleText5::
text "Oh, you're a"
line "little cutie!"
done
-_Route15EndBattleText5:: ; 90e4e (24:4e4e)
+_Route15EndBattleText5::
text "You looked"
line "so cute too!"
prompt
-_Route15AfterBattleText5:: ; 90e67 (24:4e67)
+_Route15AfterBattleText5::
text "I forgive you!"
line "I can take it!"
done
-_Route15BattleText6:: ; 90e86 (24:4e86)
+_Route15BattleText6::
text "I raise #MON"
line "because I live"
cont "alone!"
done
-_Route15EndBattleText6:: ; 90eaa (24:4eaa)
+_Route15EndBattleText6::
text "I didn't"
line "ask for this!"
prompt
-_Route15AfterBattleText6:: ; 90ec1 (24:4ec1)
+_Route15AfterBattleText6::
text "I just like going"
line "home to be with"
cont "my #MON!"
done
-_Route15BattleText7:: ; 90eed (24:4eed)
+_Route15BattleText7::
text "Hey kid! C'mon!"
line "I just got these!"
done
-_Route15EndBattleText7:: ; 90f0f (24:4f0f)
+_Route15EndBattleText7::
text "Why"
line "not?"
prompt
-_Route15AfterBattleText7:: ; 90f19 (24:4f19)
+_Route15AfterBattleText7::
text "You only live"
line "once, so I live"
cont "as an outlaw!"
cont "TEAM ROCKET RULES!"
done
-_Route15BattleText8:: ; 90f59 (24:4f59)
+_Route15BattleText8::
text "Fork over all your"
line "cash when you"
cont "lose to me, kid!"
done
-_Route15EndBattleText8:: ; 90f8c (24:4f8c)
+_Route15EndBattleText8::
text "That"
line "can't be true!"
prompt
-_Route15AfterBattleText8:: ; 90fa0 (24:4fa0)
+_Route15AfterBattleText8::
text "I was just joking"
line "about the money!"
done
-_Route15BattleText9:: ; 90fc4 (24:4fc4)
+_Route15BattleText9::
text "What's cool?"
line "Trading #MON!"
done
-_Route15EndBattleText9:: ; 90fdf (24:4fdf)
+_Route15EndBattleText9::
text "I"
line "said trade!"
prompt
-_Route15AfterBattleText9:: ; 90fee (24:4fee)
+_Route15AfterBattleText9::
text "I trade #MON"
line "with my friends!"
done
-_Route15BattleText10:: ; 9100d (24:500d)
+_Route15BattleText10::
text "Want to play with"
line "my #MON?"
done
-_Route15EndBattleText10:: ; 91029 (24:5029)
+_Route15EndBattleText10::
text "I was"
line "too impatient!"
prompt
-_Route15AfterBattleText10:: ; 9103f (24:503f)
+_Route15AfterBattleText10::
text "I'll go train with"
line "weaker people.@@"
-_Route15Text12:: ; 91062 (24:5062)
+_Route15Text12::
text "ROUTE 15"
line "West to FUCHSIA"
cont "CITY"
diff --git a/text/maps/route_15_gate.asm b/text/maps/route_15_gate.asm
index c1bbd8c9..eb4ca6d3 100644
--- a/text/maps/route_15_gate.asm
+++ b/text/maps/route_15_gate.asm
@@ -1,4 +1,4 @@
-_Route15GateText1:: ; 8cb73 (23:4b73)
+_Route15GateText1::
text "Are you working"
line "on a #DEX?"
diff --git a/text/maps/route_15_gate_upstairs.asm b/text/maps/route_15_gate_upstairs.asm
index 7207ecdf..310ecdba 100644
--- a/text/maps/route_15_gate_upstairs.asm
+++ b/text/maps/route_15_gate_upstairs.asm
@@ -1,4 +1,4 @@
-_Route15GateUpstairsText_4968c:: ; 8cbac (23:4bac)
+_Route15GateUpstairsText_4968c::
text "EXP.ALL gives"
line "EXP points to all"
cont "the #MON with"
@@ -15,7 +15,7 @@ _Route15GateUpstairsText_4968c:: ; 8cbac (23:4bac)
cont "store it via PC."
done
-_Route15GateUpstairsText_49698:: ; 8cc65 (23:4c65)
+_Route15GateUpstairsText_49698::
text "Looked into the"
line "binoculars."
diff --git a/text/maps/route_16.asm b/text/maps/route_16.asm
index ec77ec6f..740ef8a1 100644
--- a/text/maps/route_16.asm
+++ b/text/maps/route_16.asm
@@ -1,123 +1,119 @@
-_Route16BattleText1:: ; 91081 (24:5081)
+_Route16BattleText1::
text "What do you want?"
done
-_Route16EndBattleText1:: ; 91094 (24:5094)
+_Route16EndBattleText1::
text "Don't you"
line "dare laugh!"
prompt
-_Route16AfterBattleText1:: ; 910aa (24:50aa)
+_Route16AfterBattleText1::
text "We like just"
line "hanging here,"
cont "what's it to you?"
done
-_Route16BattleText2:: ; 910d7 (24:50d7)
+_Route16BattleText2::
text "Nice BIKE!"
line "Hand it over!"
done
-_Route16EndBattleText2:: ; 910f1 (24:50f1)
-IF DEF(_YELLOW)
- text "Knock-"
-ELSE
+_Route16EndBattleText2::
text "Knock"
-ENDC
line "out!"
prompt
-_Route16AfterBattleText2:: ; 910fd (24:50fd)
+_Route16AfterBattleText2::
text "Forget it, who"
line "needs your BIKE!"
done
-_Route16BattleText3:: ; 9111e (24:511e)
+_Route16BattleText3::
text "Come out and play,"
line "little mouse!"
done
-_Route16EndBattleText3:: ; 91140 (24:5140)
+_Route16EndBattleText3::
text "You"
line "little rat!"
prompt
-_Route16AfterBattleText3:: ; 91151 (24:5151)
+_Route16AfterBattleText3::
text "I hate losing!"
line "Get away from me!"
done
-_Route16BattleText4:: ; 91173 (24:5173)
+_Route16BattleText4::
text "Hey, you just"
line "bumped me!"
done
-_Route16EndBattleText4:: ; 9118d (24:518d)
+_Route16EndBattleText4::
text "Kaboom!"
prompt
-_Route16AfterBattleText4:: ; 91196 (24:5196)
+_Route16AfterBattleText4::
text "You can also get"
line "to FUCHSIA from"
cont "VERMILION using a"
cont "coastal road."
done
-_Route16BattleText5:: ; 911d8 (24:51d8)
+_Route16BattleText5::
text "I'm feeling"
line "hungry and mean!"
done
-_Route16EndBattleText5:: ; 911f5 (24:51f5)
+_Route16EndBattleText5::
text "Bad,"
line "bad, bad!"
prompt
-_Route16AfterBattleText5:: ; 91205 (24:5205)
+_Route16AfterBattleText5::
text "I like my #MON"
line "ferocious! They"
cont "tear up enemies!"
done
-_Route16BattleText6:: ; 91236 (24:5236)
+_Route16BattleText6::
text "Sure, I'll go!"
done
-_Route16EndBattleText6:: ; 91245 (24:5245)
+_Route16EndBattleText6::
text "Don't make"
line "me mad!"
prompt
-_Route16AfterBattleText6:: ; 91258 (24:5258)
+_Route16AfterBattleText6::
text "I like harassing"
line "people with my"
cont "vicious #MON!"
done
-_Route16Text7:: ; 91287 (24:5287)
+_Route16Text7::
text "A sleeping #MON"
line "blocks the way!"
done
-_Route16Text10:: ; 912a8 (24:52a8)
+_Route16Text10::
text "SNORLAX woke up!"
para "It attacked in a"
line "grumpy rage!"
done
-_Route16Text11:: ; 912d8 (24:52d8)
+_Route16Text11::
text "With a big yawn,"
line "SNORLAX returned"
cont "to the mountains!"
done
-_Route16Text8:: ; 9130d (24:530d)
+_Route16Text8::
text "Enjoy the slope!"
line "CYCLING ROAD"
done
-_Route16Text9:: ; 9132c (24:532c)
+_Route16Text9::
text "ROUTE 16"
line "CELADON CITY -"
cont "FUCHSIA CITY"
diff --git a/text/maps/route_16_gate.asm b/text/maps/route_16_gate.asm
index 2d3d5c62..f4f03e2f 100644
--- a/text/maps/route_16_gate.asm
+++ b/text/maps/route_16_gate.asm
@@ -1,22 +1,22 @@
-_Route16GateText_49777:: ; 8cca0 (23:4ca0)
+_Route16GateText_49777::
text "No pedestrians"
line "are allowed on"
cont "CYCLING ROAD!"
done
-_Route16GateText_4977c:: ; 8cccd (23:4ccd)
+_Route16GateText_4977c::
text "CYCLING ROAD is a"
line "downhill course"
cont "by the sea. It's"
cont "a great ride."
done
-_Route16GateText_49781:: ; 8cd0e (23:4d0e)
+_Route16GateText_49781::
text "Excuse me! Wait"
line "up please!"
done
-_Route16GateText2:: ; 8cd2a (23:4d2a)
+_Route16GateText2::
text "How'd you get in?"
line "Good effort!"
done
diff --git a/text/maps/route_16_gate_upstairs.asm b/text/maps/route_16_gate_upstairs.asm
index 26767654..55a49274 100644
--- a/text/maps/route_16_gate_upstairs.asm
+++ b/text/maps/route_16_gate_upstairs.asm
@@ -1,15 +1,15 @@
-_Route16GateUpstairsText_49820:: ; 8cd49 (23:4d49)
+_Route16GateUpstairsText_49820::
text "I'm going for a"
line "ride with my girl"
cont "friend!"
done
-_Route16GateUpstairsText_4982f:: ; 8cd73 (23:4d73)
+_Route16GateUpstairsText_4982f::
text "We're going"
line "riding together!"
done
-_Route16GateUpstairsText_4983b:: ; 8cd90 (23:4d90)
+_Route16GateUpstairsText_4983b::
text "Looked into the"
line "binoculars."
@@ -17,7 +17,7 @@ _Route16GateUpstairsText_4983b:: ; 8cd90 (23:4d90)
line "STORE!"
done
-_Route16GateUpstairsText_49847:: ; 8cdc6 (23:4dc6)
+_Route16GateUpstairsText_49847::
text "Looked into the"
line "binoculars."
diff --git a/text/maps/route_16_house.asm b/text/maps/route_16_house.asm
index c3099049..d84faf38 100644
--- a/text/maps/route_16_house.asm
+++ b/text/maps/route_16_house.asm
@@ -1,4 +1,4 @@
-_Route16HouseText3:: ; 8ce02 (23:4e02)
+_Route16HouseText3::
text "Oh, you found my"
line "secret retreat!"
@@ -8,11 +8,11 @@ _Route16HouseText3:: ; 8ce02 (23:4e02)
cont "to you with this!"
prompt
-_ReceivedHM02Text:: ; 8ce66 (23:4e66)
+_ReceivedHM02Text::
text $52, " received"
line "HM02!@@"
-_HM02ExplanationText:: ; 8ce79 (23:4e79)
+_HM02ExplanationText::
text "HM02 is FLY."
line "It will take you"
cont "back to any town."
@@ -21,12 +21,12 @@ _HM02ExplanationText:: ; 8ce79 (23:4e79)
line "use!"
done
-_HM02NoRoomText:: ; 8cebe (23:4ebe)
+_HM02NoRoomText::
text "You don't have any"
line "room for this."
done
-_Route16HouseText_1e652:: ; 8cee0 (23:4ee0)
+_Route16HouseText_1e652::
text "FEAROW: Kyueen!"
done
diff --git a/text/maps/route_17.asm b/text/maps/route_17.asm
index b053b473..db9bf4d2 100644
--- a/text/maps/route_17.asm
+++ b/text/maps/route_17.asm
@@ -1,164 +1,160 @@
-_Route17BattleText1:: ; 91352 (24:5352)
+_Route17BattleText1::
text "There's no money"
line "in fighting kids!"
done
-_Route17EndBattleText1:: ; 91375 (24:5375)
+_Route17EndBattleText1::
text "Burned"
line "out!"
prompt
-_Route17AfterBattleText1:: ; 91382 (24:5382)
+_Route17AfterBattleText1::
text "Good stuff is"
line "lying around on"
cont "CYCLING ROAD!"
done
-_Route17BattleText2:: ; 913af (24:53af)
+_Route17BattleText2::
text "What do you want,"
line "kiddo?"
done
-_Route17EndBattleText2:: ; 913c9 (24:53c9)
+_Route17EndBattleText2::
text "Whoo!"
prompt
-_Route17AfterBattleText2:: ; 913d0 (24:53d0)
+_Route17AfterBattleText2::
text "I could belly-"
line "bump you outta"
cont "here!"
done
-_Route17BattleText3:: ; 913f5 (24:53f5)
+_Route17BattleText3::
text "You heading to"
line "FUCHSIA?"
done
-_Route17EndBattleText3:: ; 9140e (24:540e)
+_Route17EndBattleText3::
text "Crash and"
line "burn!"
prompt
-_Route17AfterBattleText3:: ; 9141f (24:541f)
+_Route17AfterBattleText3::
text "I love racing"
line "downhill!"
done
-_Route17BattleText4:: ; 91438 (24:5438)
+_Route17BattleText4::
text "We're BIKERs!"
line "Highway stars!"
done
-_Route17EndBattleText4:: ; 91455 (24:5455)
+_Route17EndBattleText4::
text "Smoked!"
prompt
-_Route17AfterBattleText4:: ; 9145e (24:545e)
+_Route17AfterBattleText4::
text "Are you looking"
line "for adventure?"
done
-_Route17BattleText5:: ; 9147e (24:547e)
+_Route17BattleText5::
text "Let VOLTORB"
line "electrify you!"
done
-_Route17EndBattleText5:: ; 9149a (24:549a)
+_Route17EndBattleText5::
text "Grounded"
line "out!"
prompt
-_Route17AfterBattleText5:: ; 914a9 (24:54a9)
+_Route17AfterBattleText5::
text "I got my VOLTORB"
line "at the abandoned"
cont "POWER PLANT."
done
-_Route17BattleText6:: ; 914d9 (24:54d9)
+_Route17BattleText6::
text "My #MON won't"
line "evolve! Why?"
done
-_Route17EndBattleText6:: ; 914f4 (24:54f4)
+_Route17EndBattleText6::
text "Why,"
line "you!"
prompt
-_Route17AfterBattleText6:: ; 914ff (24:54ff)
+_Route17AfterBattleText6::
text "Maybe some #MON"
line "need element"
cont "STONEs to evolve."
done
-_Route17BattleText7:: ; 9152f (24:552f)
+_Route17BattleText7::
text "I need a little"
line "exercise!"
done
-_Route17EndBattleText7:: ; 9154a (24:554a)
+_Route17EndBattleText7::
text "Whew!"
line "Good workout!"
prompt
-_Route17AfterBattleText7:: ; 9155f (24:555f)
+_Route17AfterBattleText7::
text "I'm sure I lost"
line "weight there!"
done
-_Route17BattleText8:: ; 9157d (24:557d)
+_Route17BattleText8::
text "Be a rebel!"
done
-_Route17EndBattleText8:: ; 9158a (24:558a)
+_Route17EndBattleText8::
text "Aaaargh!"
prompt
-_Route17AfterBattleText8:: ; 91594 (24:5594)
+_Route17AfterBattleText8::
text "Be ready to fight"
line "for your beliefs!"
done
-_Route17BattleText9:: ; 915b9 (24:55b9)
+_Route17BattleText9::
text "Nice BIKE!"
line "How's it handle?"
done
-_Route17EndBattleText9:: ; 915d5 (24:55d5)
+_Route17EndBattleText9::
text "Shoot!"
prompt
-_Route17AfterBattleText9:: ; 915dd (24:55dd)
+_Route17AfterBattleText9::
text "The slope makes"
line "it hard to steer!"
done
-_Route17BattleText10:: ; 91600 (24:5600)
-IF DEF(_YELLOW)
- text "Get lost, kid!"
-ELSE
+_Route17BattleText10::
text "Get lost kid!"
-ENDC
line "I'm bushed!"
done
-_Route17EndBattleText10:: ; 9161a (24:561a)
+_Route17EndBattleText10::
text "Are you"
line "satisfied?"
prompt
-_Route17AfterBattleText10:: ; 9162e (24:562e)
+_Route17AfterBattleText10::
text "I need to catch"
line "a few Zs!"
done
-_Route17Text11:: ; 91649 (24:5649)
+_Route17Text11::
text "It's a notice!"
para "Watch out for"
line "discarded items!"
done
-_Route17Text12:: ; 91677 (24:5677)
+_Route17Text12::
text "TRAINER TIPS"
para "All #MON are"
@@ -170,7 +166,7 @@ _Route17Text12:: ; 91677 (24:5677)
cont "different rates."
done
-_Route17Text13:: ; 916d8 (24:56d8)
+_Route17Text13::
text "TRAINER TIPS"
para "Press the A or B"
@@ -179,13 +175,13 @@ _Route17Text13:: ; 916d8 (24:56d8)
cont "slope."
done
-_Route17Text14:: ; 91721 (24:5721)
+_Route17Text14::
text "ROUTE 17"
line "CELADON CITY -"
cont "FUCHSIA CITY"
done
-_Route17Text15:: ; 91747 (24:5747)
+_Route17Text15::
text "It's a notice!"
para "Don't throw the"
@@ -193,7 +189,7 @@ _Route17Text15:: ; 91747 (24:5747)
cont "BALLs instead!"
done
-_Route17Text16:: ; 91782 (24:5782)
+_Route17Text16::
text "CYCLING ROAD"
line "Slope ends here!"
done
diff --git a/text/maps/route_18.asm b/text/maps/route_18.asm
index f8dc798f..31e921bd 100644
--- a/text/maps/route_18.asm
+++ b/text/maps/route_18.asm
@@ -1,57 +1,57 @@
-_Route18BattleText1:: ; 917a1 (24:57a1)
+_Route18BattleText1::
text "I always check"
line "every grassy area"
cont "for new #MON."
done
-_Route18EndBattleText1:: ; 917d1 (24:57d1)
+_Route18EndBattleText1::
text "Tch!"
prompt
-_Route18AfterBattleText1:: ; 917d7 (24:57d7)
+_Route18AfterBattleText1::
text "I wish I had a"
line "BIKE!"
done
-_Route18BattleText2:: ; 917ed (24:57ed)
+_Route18BattleText2::
text "Kurukkoo!"
line "How do you like"
cont "my bird call?"
done
-_Route18EndBattleText2:: ; 91816 (24:5816)
+_Route18EndBattleText2::
text "I"
line "had to bug you!"
prompt
-_Route18AfterBattleText2:: ; 91829 (24:5829)
+_Route18AfterBattleText2::
text "I also collect sea"
line "#MON on"
cont "weekends!"
done
-_Route18BattleText3:: ; 9184f (24:584f)
+_Route18BattleText3::
text "This is my turf!"
line "Get out of here!"
done
-_Route18EndBattleText3:: ; 91872 (24:5872)
+_Route18EndBattleText3::
text "Darn!"
prompt
-_Route18AfterBattleText3:: ; 91879 (24:5879)
+_Route18AfterBattleText3::
text "This is my fave"
line "#MON hunting"
cont "area!"
done
-_Route18Text4:: ; 9189d (24:589d)
+_Route18Text4::
text "ROUTE 18"
line "CELADON CITY -"
cont "FUCHSIA CITY"
done
-_Route18Text5:: ; 918c3 (24:58c3)
+_Route18Text5::
text "CYCLING ROAD"
line "No pedestrians"
cont "permitted!"
diff --git a/text/maps/route_18_gate.asm b/text/maps/route_18_gate.asm
index 0298465d..964a32e5 100644
--- a/text/maps/route_18_gate.asm
+++ b/text/maps/route_18_gate.asm
@@ -1,15 +1,15 @@
-_Route18GateText_49928:: ; 8cef1 (23:4ef1)
+_Route18GateText_49928::
text "You need a BICYCLE"
line "for CYCLING ROAD!"
done
-_Route18GateText_4992d:: ; 8cf17 (23:4f17)
+_Route18GateText_4992d::
text "CYCLING ROAD is"
line "all uphill from"
cont "here."
done
-_Route18GateText_49932:: ; 8cf3e (23:4f3e)
+_Route18GateText_49932::
text "Excuse me!"
done
diff --git a/text/maps/route_18_gate_upstairs.asm b/text/maps/route_18_gate_upstairs.asm
index 59b92e6a..a1778cb6 100644
--- a/text/maps/route_18_gate_upstairs.asm
+++ b/text/maps/route_18_gate_upstairs.asm
@@ -1,4 +1,4 @@
-_Route18GateUpstairsText_49993:: ; 8cf4a (23:4f4a)
+_Route18GateUpstairsText_49993::
text "Looked into the"
line "binoculars."
@@ -6,7 +6,7 @@ _Route18GateUpstairsText_49993:: ; 8cf4a (23:4f4a)
line "the west!"
done
-_Route18GateUpstairsText_4999f:: ; 8cf83 (23:4f83)
+_Route18GateUpstairsText_4999f::
text "Looked into the"
line "binoculars."
diff --git a/text/maps/route_19.asm b/text/maps/route_19.asm
index 9789237c..ae6e7334 100644
--- a/text/maps/route_19.asm
+++ b/text/maps/route_19.asm
@@ -1,156 +1,156 @@
-_Route19BattleText1:: ; 918eb (24:58eb)
+_Route19BattleText1::
text "Have to warm up"
line "before my swim!"
done
-_Route19EndBattleText1:: ; 9190c (24:590c)
+_Route19EndBattleText1::
text "All"
line "warmed up!"
prompt
-_Route19AfterBattleText1:: ; 9191c (24:591c)
+_Route19AfterBattleText1::
text "Thanks, kid! I'm"
line "ready for a swim!"
done
-_Route19BattleText2:: ; 9193f (24:593f)
+_Route19BattleText2::
text "Wait! You'll have"
line "a heart attack!"
done
-_Route19EndBattleText2:: ; 91961 (24:5961)
+_Route19EndBattleText2::
text "Ooh!"
line "That's chilly!"
prompt
-_Route19AfterBattleText2:: ; 91975 (24:5975)
+_Route19AfterBattleText2::
text "Watch out for"
line "TENTACOOL!"
done
-_Route19BattleText3:: ; 9198f (24:598f)
+_Route19BattleText3::
text "I love swimming!"
line "What about you?"
done
-_Route19EndBattleText3:: ; 919b1 (24:59b1)
+_Route19EndBattleText3::
text "Belly"
line "flop!"
prompt
-_Route19AfterBattleText3:: ; 919be (24:59be)
+_Route19AfterBattleText3::
text "I can beat #MON"
line "at swimming!"
done
-_Route19BattleText4:: ; 919dc (24:59dc)
+_Route19BattleText4::
text "What's beyond the"
line "horizon?"
done
-_Route19EndBattleText4:: ; 919f7 (24:59f7)
+_Route19EndBattleText4::
text "Glub!"
prompt
-_Route19AfterBattleText4:: ; 919fe (24:59fe)
+_Route19AfterBattleText4::
text "I see a couple of"
line "islands!"
done
-_Route19BattleText5:: ; 91a1a (24:5a1a)
+_Route19BattleText5::
text "I tried diving"
line "for #MON, but"
cont "it was a no go!"
done
-_Route19EndBattleText5:: ; 91a48 (24:5a48)
+_Route19EndBattleText5::
text "Help!"
prompt
-_Route19AfterBattleText5:: ; 91a4f (24:5a4f)
+_Route19AfterBattleText5::
text "You have to fish"
line "for sea #MON!"
done
-_Route19BattleText6:: ; 91a6f (24:5a6f)
+_Route19BattleText6::
text "I look at the"
line "sea to forget!"
done
-_Route19EndBattleText6:: ; 91a8d (24:5a8d)
+_Route19EndBattleText6::
text "Ooh!"
line "Traumatic!"
prompt
-_Route19AfterBattleText6:: ; 91a9e (24:5a9e)
+_Route19AfterBattleText6::
text "I'm looking at the"
line "sea to forget!"
done
-_Route19BattleText7:: ; 91ac0 (24:5ac0)
+_Route19BattleText7::
text "Oh, I just love"
line "your ride! Can I"
cont "have it if I win?"
done
-_Route19EndBattleText7:: ; 91af4 (24:5af4)
+_Route19EndBattleText7::
text "Oh!"
line "I lost!"
prompt
-_Route19AfterBattleText7:: ; 91b01 (24:5b01)
+_Route19AfterBattleText7::
text "It's still a long"
line "way to go to"
cont "SEAFOAM ISLANDS."
done
-_Route19BattleText8:: ; 91b31 (24:5b31)
+_Route19BattleText8::
text "Swimming's great!"
line "Sunburns aren't!"
done
-_Route19EndBattleText8:: ; 91b53 (24:5b53)
+_Route19EndBattleText8::
text "Shocker!"
prompt
-_Route19AfterBattleText8:: ; 91b5d (24:5b5d)
+_Route19AfterBattleText8::
text "My boy friend"
line "wanted to swim to"
cont "SEAFOAM ISLANDS."
done
-_Route19BattleText9:: ; 91b8f (24:5b8f)
+_Route19BattleText9::
text "These waters are"
line "treacherous!"
done
-_Route19EndBattleText9:: ; 91bae (24:5bae)
+_Route19EndBattleText9::
text "Ooh!"
line "Dangerous!"
prompt
-_Route19AfterBattleText9:: ; 91bbf (24:5bbf)
+_Route19AfterBattleText9::
text "I got a cramp!"
line "Glub, glub..."
done
-_Route19BattleText10:: ; 91bdd (24:5bdd)
+_Route19BattleText10::
text "I swam here, but"
line "I'm tired."
done
-_Route19EndBattleText10:: ; 91bf9 (24:5bf9)
+_Route19EndBattleText10::
text "I'm"
line "exhausted..."
prompt
-_Route19AfterBattleText10:: ; 91c0a (24:5c0a)
+_Route19AfterBattleText10::
text "LAPRAS is so big,"
line "it must keep you"
cont "dry on water."
done
-_Route19Text11:: ; 91c3c (24:5c3c)
+_Route19Text11::
text "SEA ROUTE 19"
line "FUCHSIA CITY -"
cont "SEAFOAM ISLANDS"
diff --git a/text/maps/route_2.asm b/text/maps/route_2.asm
index 51c19737..2419abbe 100644
--- a/text/maps/route_2.asm
+++ b/text/maps/route_2.asm
@@ -1,10 +1,10 @@
-_Route2Text3:: ; 8d745 (23:5745)
+_Route2Text3::
text "ROUTE 2"
line "VIRIDIAN CITY -"
cont "PEWTER CITY"
done
-_Route2Text4:: ; 8d76a (23:576a)
+_Route2Text4::
text "DIGLETT's CAVE"
done
diff --git a/text/maps/route_20.asm b/text/maps/route_20.asm
index 101ef92c..c69dec51 100644
--- a/text/maps/route_20.asm
+++ b/text/maps/route_20.asm
@@ -1,157 +1,157 @@
-_Route20BattleText1:: ; 91c69 (24:5c69)
+_Route20BattleText1::
text "The water is"
line "shallow here."
done
-_Route20EndBattleText1:: ; 91c85 (24:5c85)
+_Route20EndBattleText1::
text "Splash!"
prompt
-_Route20AfterBattleText1:: ; 91c8e (24:5c8e)
+_Route20AfterBattleText1::
text "I wish I could"
line "ride my #MON."
done
-_Route20BattleText2:: ; 91cac (24:5cac)
+_Route20BattleText2::
text "SEAFOAM is a"
line "quiet getaway!"
done
-_Route20EndBattleText2:: ; 91cc9 (24:5cc9)
+_Route20EndBattleText2::
text "Quit it!"
prompt
-_Route20AfterBattleText2:: ; 91cd3 (24:5cd3)
+_Route20AfterBattleText2::
text "There's a huge"
line "cavern underneath"
cont "this island."
done
-_Route20BattleText3:: ; 91d01 (24:5d01)
+_Route20BattleText3::
text "I love floating"
line "with the fishes!"
done
-_Route20EndBattleText3:: ; 91d23 (24:5d23)
+_Route20EndBattleText3::
text "Yowch!"
prompt
-_Route20AfterBattleText3:: ; 91d2b (24:5d2b)
+_Route20AfterBattleText3::
text "Want to float"
line "with me?"
done
-_Route20BattleText4:: ; 91d43 (24:5d43)
+_Route20BattleText4::
text "Are you on"
line "vacation too?"
done
-_Route20EndBattleText4:: ; 91d5d (24:5d5d)
+_Route20EndBattleText4::
text "No"
line "mercy at all!"
prompt
-_Route20AfterBattleText4:: ; 91d6f (24:5d6f)
+_Route20AfterBattleText4::
text "SEAFOAM used to"
line "be one island!"
done
-_Route20BattleText5:: ; 91d8f (24:5d8f)
+_Route20BattleText5::
text "Check out my buff"
line "physique!"
done
-_Route20EndBattleText5:: ; 91dac (24:5dac)
+_Route20EndBattleText5::
text "Wimpy!"
prompt
-_Route20AfterBattleText5:: ; 91db4 (24:5db4)
+_Route20AfterBattleText5::
text "I should've been"
line "buffing up my"
cont "#MON, not me!"
done
-_Route20BattleText6:: ; 91de1 (24:5de1)
+_Route20BattleText6::
text "Why are you"
line "riding a #MON?"
cont "Can't you swim?"
done
-_Route20EndBattleText6:: ; 91e0c (24:5e0c)
+_Route20EndBattleText6::
text "Ouch!"
line "Torpedoed!"
prompt
-_Route20AfterBattleText6:: ; 91e1e (24:5e1e)
+_Route20AfterBattleText6::
text "Riding a #MON"
line "sure looks fun!"
done
-_Route20BattleText7:: ; 91e3d (24:5e3d)
+_Route20BattleText7::
text "I rode my bird"
line "#MON here!"
done
-_Route20EndBattleText7:: ; 91e58 (24:5e58)
+_Route20EndBattleText7::
text "Oh"
line "no!"
prompt
-_Route20AfterBattleText7:: ; 91e60 (24:5e60)
+_Route20AfterBattleText7::
text "My birds can't"
line "FLY me back!"
done
-_Route20BattleText8:: ; 91e7c (24:5e7c)
+_Route20BattleText8::
text "My boy friend gave"
line "me big pearls!"
done
-_Route20EndBattleText8:: ; 91e9f (24:5e9f)
+_Route20EndBattleText8::
text "Don't"
line "touch my pearls!"
prompt
-_Route20AfterBattleText8:: ; 91eb6 (24:5eb6)
+_Route20AfterBattleText8::
text "Will my pearls"
line "grow bigger"
cont "inside CLOYSTER?"
done
-_Route20BattleText9:: ; 91ee3 (24:5ee3)
+_Route20BattleText9::
text "I swam here from"
line "CINNABAR ISLAND!"
done
-_Route20EndBattleText9:: ; 91f06 (24:5f06)
+_Route20EndBattleText9::
text "I'm"
line "so disappointed!"
prompt
-_Route20AfterBattleText9:: ; 91f1b (24:5f1b)
+_Route20AfterBattleText9::
text "#MON have"
line "taken over an"
cont "abandoned mansion"
cont "on CINNABAR!"
done
-_Route20BattleText10:: ; 91f53 (24:5f53)
+_Route20BattleText10::
text "CINNABAR, in the"
line "west, has a LAB"
cont "for #MON."
done
-_Route20EndBattleText10:: ; 91f7f (24:5f7f)
+_Route20EndBattleText10::
text "Wait!"
prompt
-_Route20AfterBattleText10:: ; 91f86 (24:5f86)
+_Route20AfterBattleText10::
text "CINNABAR is a "
line "volcanic island!"
done
-_Route20Text12:: ; 91fa7 (24:5fa7)
-_Route20Text11:: ; 91fa7 (24:5fa7)
+_Route20Text12::
+_Route20Text11::
text "SEAFOAM ISLANDS"
done
diff --git a/text/maps/route_21.asm b/text/maps/route_21.asm
index 032e7c28..d94bdfac 100644
--- a/text/maps/route_21.asm
+++ b/text/maps/route_21.asm
@@ -1,137 +1,137 @@
-_Route21BattleText1:: ; 91fb8 (24:5fb8)
+_Route21BattleText1::
text "You want to know"
line "if the fish are"
cont "biting?"
done
-_Route21EndBattleText1:: ; 91fe2 (24:5fe2)
+_Route21EndBattleText1::
text "Dang!"
prompt
-_Route21AfterBattleText1:: ; 91fe9 (24:5fe9)
+_Route21AfterBattleText1::
text "I can't catch"
line "anything good!"
done
-_Route21BattleText2:: ; 92006 (24:6006)
+_Route21BattleText2::
text "I got a big haul!"
line "Wanna go for it?"
done
-_Route21EndBattleText2:: ; 9202a (24:602a)
+_Route21EndBattleText2::
text "Darn"
line "MAGIKARP!"
prompt
-_Route21AfterBattleText2:: ; 9203a (24:603a)
+_Route21AfterBattleText2::
text "I seem to only"
line "catch MAGIKARP!"
done
-_Route21BattleText3:: ; 9205a (24:605a)
+_Route21BattleText3::
text "The sea cleanses"
line "my body and soul!"
done
-_Route21EndBattleText3:: ; 9207e (24:607e)
+_Route21EndBattleText3::
text "Ayah!"
prompt
-_Route21AfterBattleText3:: ; 92085 (24:6085)
+_Route21AfterBattleText3::
text "I like the"
line "mountains too!"
done
-_Route21BattleText4:: ; 920a0 (24:60a0)
+_Route21BattleText4::
text "What's wrong with"
line "me swimming?"
done
-_Route21EndBattleText4:: ; 920bf (24:60bf)
+_Route21EndBattleText4::
text "Cheap"
line "shot!"
prompt
-_Route21AfterBattleText4:: ; 920cc (24:60cc)
+_Route21AfterBattleText4::
text "I look like what?"
line "A studded inner"
cont "tube? Get lost!"
done
-_Route21BattleText5:: ; 920ff (24:60ff)
+_Route21BattleText5::
text "I caught all my"
line "#MON at sea!"
done
-_Route21EndBattleText5:: ; 9211d (24:611d)
+_Route21EndBattleText5::
text "Diver!!"
line "Down!!"
prompt
-_Route21AfterBattleText5:: ; 9212d (24:612d)
+_Route21AfterBattleText5::
text "Where'd you catch"
line "your #MON?"
done
-_Route21BattleText6:: ; 9214a (24:614a)
+_Route21BattleText6::
text "Right now, I'm in"
line "a triathlon meet!"
done
-_Route21EndBattleText6:: ; 9216e (24:616e)
+_Route21EndBattleText6::
text "Pant..."
line "pant...pant..."
prompt
-_Route21AfterBattleText6:: ; 92186 (24:6186)
+_Route21AfterBattleText6::
text "I'm beat!"
line "But, I still have"
cont "the bike race and"
cont "marathon left!"
done
-_Route21BattleText7:: ; 921c3 (24:61c3)
+_Route21BattleText7::
text "Ahh! Feel the sun"
line "and the wind!"
done
-_Route21EndBattleText7:: ; 921e4 (24:61e4)
+_Route21EndBattleText7::
text "Yow!"
line "I lost!"
prompt
-_Route21AfterBattleText7:: ; 921f2 (24:61f2)
+_Route21AfterBattleText7::
text "I'm sunburnt to a"
line "crisp!"
done
-_Route21BattleText8:: ; 9220b (24:620b)
+_Route21BattleText8::
text "Hey, don't scare"
line "away the fish!"
done
-_Route21EndBattleText8:: ; 9222b (24:622b)
+_Route21EndBattleText8::
text "Sorry!"
line "I didn't mean it!"
prompt
-_Route21AfterBattleText8:: ; 92244 (24:6244)
+_Route21AfterBattleText8::
text "I was just angry"
line "that I couldn't"
cont "catch anything."
done
-_Route21BattleText9:: ; 92275 (24:6275)
+_Route21BattleText9::
text "Keep me company"
line "'til I get a hit!"
done
-_Route21EndBattleText9:: ; 92297 (24:6297)
+_Route21EndBattleText9::
text "That"
line "burned some time."
prompt
-_Route21AfterBattleText9:: ; 922af (24:62af)
+_Route21AfterBattleText9::
text "Oh wait! I got a"
line "bite! Yeah!"
done
diff --git a/text/maps/route_22.asm b/text/maps/route_22.asm
index 9935ce80..2a46d5b4 100644
--- a/text/maps/route_22.asm
+++ b/text/maps/route_22.asm
@@ -1,4 +1,4 @@
-_Route22RivalBeforeBattleText1:: ; 922cd (24:62cd)
+_Route22RivalBeforeBattleText1::
text $53, ": Hey!"
line $52, "!"
@@ -17,7 +17,7 @@ _Route22RivalBeforeBattleText1:: ; 922cd (24:62cd)
cont "get any stronger?"
done
-_Route22RivalAfterBattleText1:: ; 9236f (24:636f)
+_Route22RivalAfterBattleText1::
text "I heard #MON"
line "LEAGUE has many"
cont "tough trainers!"
@@ -31,13 +31,13 @@ _Route22RivalAfterBattleText1:: ; 9236f (24:636f)
cont "a move on!"
done
-_Route22RivalDefeatedText1:: ; 923f4 (24:63f4)
+_Route22RivalDefeatedText1::
text "Awww!"
line "You just lucked"
cont "out!"
prompt
-_Route22Text_511bc:: ; 92410 (24:6410)
+_Route22Text_511bc::
text $53, ": What?"
line "Why do I have 2"
cont "#MON?"
@@ -46,7 +46,7 @@ _Route22Text_511bc:: ; 92410 (24:6410)
cont "some more too!"
prompt
-_Route22RivalBeforeBattleText2:: ; 92450 (24:6450)
+_Route22RivalBeforeBattleText2::
text $53, ": What?"
line $52, "! What a"
cont "surprise to see"
@@ -59,21 +59,15 @@ _Route22RivalBeforeBattleText2:: ; 92450 (24:6450)
line "the BADGEs too?"
cont "That's cool!"
-IF DEF(_YELLOW)
- para "Then I'll whip"
- line "you, ", $52, ", as"
- cont "a warmup for"
-ELSE
para "Then I'll whip you"
line $52, " as a"
cont "warm up for"
-ENDC
cont "#MON LEAGUE!"
para "Come on!"
done
-_Route22RivalAfterBattleText2:: ; 92506 (24:6506)
+_Route22RivalAfterBattleText2::
text "That loosened me"
line "up! I'm ready for"
cont "#MON LEAGUE!"
@@ -86,14 +80,14 @@ _Route22RivalAfterBattleText2:: ; 92506 (24:6506)
cont "here. Smell ya!"
done
-_Route22RivalDefeatedText2:: ; 92583 (24:6583)
+_Route22RivalDefeatedText2::
text "What!?"
para "I was just"
line "careless!"
prompt
-_Route22Text_511d0:: ; 925a0 (24:65a0)
+_Route22Text_511d0::
text $53, ": Hahaha!"
line $52, "! That's"
cont "your best? You're"
@@ -104,7 +98,7 @@ _Route22Text_511d0:: ; 925a0 (24:65a0)
line "more! You loser!"
prompt
-_Route22FrontGateText:: ; 92606 (24:6606)
+_Route22FrontGateText::
text "#MON LEAGUE"
line "Front Gate"
done
diff --git a/text/maps/route_23.asm b/text/maps/route_23.asm
index ab73a363..0807cc91 100644
--- a/text/maps/route_23.asm
+++ b/text/maps/route_23.asm
@@ -1,4 +1,4 @@
-_VictoryRoadGuardText1:: ; 9261e (24:661e)
+_VictoryRoadGuardText1::
text "You can pass here"
line "only if you have"
cont "the @"
@@ -14,7 +14,7 @@ _VictoryRoadGuardText1:: ; 9261e (24:661e)
line "it to get to"
cont "#MON LEAGUE!@@"
-_VictoryRoadGuardText2:: ; 92696 (24:6696)
+_VictoryRoadGuardText2::
text "You can pass here"
line "only if you have"
cont "the @"
@@ -26,13 +26,13 @@ _VictoryRoadGuardText2:: ; 92696 (24:6696)
TX_RAM wcd6d
text "!@@"
-_VictoryRoadGuardText_513a3:: ; 926dd (24:66dd)
+_VictoryRoadGuardText_513a3::
db $0
para "OK then! Please,"
line "go right ahead!"
done
-_Route23Text8:: ; 92700 (24:6700)
+_Route23Text8::
text "VICTORY ROAD GATE"
line "- #MON LEAGUE"
done
diff --git a/text/maps/route_24_1.asm b/text/maps/route_24_1.asm
index 84a6d720..3a8d6d9a 100644
--- a/text/maps/route_24_1.asm
+++ b/text/maps/route_24_1.asm
@@ -1,26 +1,26 @@
-_Route24Text_51510:: ; 92721 (24:6721)
+_Route24Text_51510::
text "Congratulations!"
line "You beat our 5"
cont "contest trainers!@@"
-_Route24Text_51515:: ; 92755 (24:6755)
+_Route24Text_51515::
db $0
para "You just earned a"
line "fabulous prize!"
prompt
-_Route24Text_5151a:: ; 92779 (24:6779)
+_Route24Text_5151a::
text $52, " received"
line "a @"
TX_RAM wcf4b
text "!@@"
-_Route24Text_51521:: ; 9278f (24:678f)
+_Route24Text_51521::
text "You don't have"
line "any room!"
done
-_Route24Text_51526:: ; 927a8 (24:67a8)
+_Route24Text_51526::
text "By the way, would"
line "you like to join"
cont "TEAM ROCKET?"
@@ -46,19 +46,19 @@ _Route24Text_51526:: ; 927a8 (24:67a8)
cont "refuse!"
done
-_Route24Text_5152b:: ; 9288a (24:688a)
+_Route24Text_5152b::
text "Arrgh!"
line "You are good!"
prompt
-_Route24Text_51530:: ; 928a0 (24:68a0)
+_Route24Text_51530::
text "With your ability,"
line "you could become"
cont "a top leader in"
cont "TEAM ROCKET!"
done
-_Route24BattleText1:: ; 928e2 (24:68e2)
+_Route24BattleText1::
text "I saw your feat"
line "from the grass!"
done
diff --git a/text/maps/route_24_2.asm b/text/maps/route_24_2.asm
index 9a7613bb..12a8a59d 100644
--- a/text/maps/route_24_2.asm
+++ b/text/maps/route_24_2.asm
@@ -1,75 +1,75 @@
-_Route24EndBattleText1:: ; 94000 (25:4000)
+_Route24EndBattleText1::
text "I"
line "thought not!"
prompt
-_Route24AfterBattleText1:: ; 94010 (25:4010)
+_Route24AfterBattleText1::
text "I hid because the"
line "people on the"
cont "bridge scared me!"
done
-_Route24BattleText2:: ; 94043 (25:4043)
+_Route24BattleText2::
text "OK! I'm No. 5!"
line "I'll stomp you!"
done
-_Route24EndBattleText2:: ; 94061 (25:4061)
+_Route24EndBattleText2::
text "Whoa!"
line "Too much!"
prompt
-_Route24AfterBattleText2:: ; 94072 (25:4072)
+_Route24AfterBattleText2::
text "I did my best, I"
line "have no regrets!"
done
-_Route24BattleText3:: ; 94095 (25:4095)
+_Route24BattleText3::
text "I'm No. 4!"
line "Getting tired?"
done
-_Route24EndBattleText3:: ; 940af (25:40af)
+_Route24EndBattleText3::
text "I lost"
line "too!"
prompt
-_Route24AfterBattleText3:: ; 940bc (25:40bc)
+_Route24AfterBattleText3::
text "I did my best, so"
line "I've no regrets!"
done
-_Route24BattleText4:: ; 940df (25:40df)
+_Route24BattleText4::
text "Here's No. 3!"
line "I won't be easy!"
done
-_Route24EndBattleText4:: ; 940fd (25:40fd)
+_Route24EndBattleText4::
text "Ow!"
line "Stomped flat!"
prompt
-_Route24AfterBattleText4:: ; 94110 (25:4110)
+_Route24AfterBattleText4::
text "I did my best, I"
line "have no regrets!"
done
-_Route24BattleText5:: ; 94133 (25:4133)
+_Route24BattleText5::
text "I'm second!"
line "Now it's serious!"
done
-_Route24EndBattleText5:: ; 94150 (25:4150)
+_Route24EndBattleText5::
text "How could I"
line "lose?"
prompt
-_Route24AfterBattleText5:: ; 94163 (25:4163)
+_Route24AfterBattleText5::
text "I did my best, I"
line "have no regrets!"
done
-_Route24BattleText6:: ; 94186 (25:4186)
+_Route24BattleText6::
text "This is NUGGET"
line "BRIDGE! Beat us 5"
cont "trainers and win"
@@ -79,12 +79,12 @@ _Route24BattleText6:: ; 94186 (25:4186)
line "what it takes?"
done
-_Route24EndBattleText6:: ; 941e8 (25:41e8)
+_Route24EndBattleText6::
text "Whoo!"
line "Good stuff!"
prompt
-_Route24AfterBattleText6:: ; 941fb (25:41fb)
+_Route24AfterBattleText6::
text "I did my best, I"
line "have no regrets!"
done
diff --git a/text/maps/route_25.asm b/text/maps/route_25.asm
index d73611f2..b89396ea 100644
--- a/text/maps/route_25.asm
+++ b/text/maps/route_25.asm
@@ -1,191 +1,156 @@
-IF DEF(_YELLOW)
-_Route25DamianText1::
- text "I'm not good at"
- line "raising #MON."
-
- para "I should release"
- line "my CHARMANDER"
- cont "because I haven't"
- cont "raised it well..."
-
- para "If you promise me"
- line "you'll care for"
- cont "it, it's yours."
- done
-
-_Route25DamianText2::
- text "Take good care of"
- line "my CHARMANDER!@@"
-
-_Route25DamianText3::
- text "Oh... I'd better"
- line "release it then."
- done
-
-_Route25DamianText4::
- text "How's CHARMANDER"
- line "doing?"
- done
-ENDC
-
-_Route25BattleText1:: ; 9421e (25:421e)
+_Route25BattleText1::
text "Local trainers"
line "come here to"
cont "practice!"
done
-_Route25EndBattleText1:: ; 94245 (25:4245)
+_Route25EndBattleText1::
text "You're"
line "decent."
prompt
-_Route25AfterBattleText1:: ; 94254 (25:4254)
+_Route25AfterBattleText1::
text "All #MON have"
line "weaknesses. It's"
cont "best to raise"
cont "different kinds."
done
-_Route25BattleText2:: ; 94292 (25:4292)
+_Route25BattleText2::
text "Dad took me to a"
line "great party on"
cont "S.S.ANNE at"
cont "VERMILION CITY!"
done
-_Route25EndBattleText2:: ; 942cf (25:42cf)
+_Route25EndBattleText2::
text "I'm"
line "not mad!"
prompt
-_Route25AfterBattleText2:: ; 942dc (25:42dc)
+_Route25AfterBattleText2::
text "On S.S.ANNE, I"
line "saw trainers from"
cont "around the world."
done
-_Route25BattleText3:: ; 94310 (25:4310)
+_Route25BattleText3::
text "I'm a cool guy."
line "I've got a girl"
cont "friend!"
done
-_Route25EndBattleText3:: ; 94337 (25:4337)
+_Route25EndBattleText3::
text "Aww,"
line "darn..."
prompt
-_Route25AfterBattleText3:: ; 94345 (25:4345)
+_Route25AfterBattleText3::
text "Oh well. My girl"
line "will cheer me up."
done
-_Route25BattleText4:: ; 94369 (25:4369)
+_Route25BattleText4::
text "Hi! My boy"
line "friend is cool!"
done
-_Route25EndBattleText4:: ; 94385 (25:4385)
-IF DEF(_YELLOW)
- text "I'm in"
- line "a slump!"
-ELSE
+_Route25EndBattleText4::
text "I was in"
line "bad condition!"
-ENDC
prompt
-_Route25AfterBattleText4:: ; 9439e (25:439e)
+_Route25AfterBattleText4::
text "I wish my guy was"
line "as good as you!"
done
-_Route25BattleText5:: ; 943c1 (25:43c1)
+_Route25BattleText5::
text "I knew I had to"
line "fight you!"
done
-_Route25EndBattleText5:: ; 943dd (25:43dd)
+_Route25EndBattleText5::
text "I knew"
line "I'd lose too!"
prompt
-_Route25AfterBattleText5:: ; 943f2 (25:43f2)
+_Route25AfterBattleText5::
text "If your #MON"
line "gets confused or"
cont "falls asleep,"
cont "switch it!"
done
-_Route25BattleText6:: ; 9442a (25:442a)
+_Route25BattleText6::
text "My friend has a"
line "cute #MON."
cont "I'm so jealous!"
done
-_Route25EndBattleText6:: ; 94455 (25:4455)
+_Route25EndBattleText6::
text "I'm"
line "not so jealous!"
prompt
-_Route25AfterBattleText6:: ; 94469 (25:4469)
+_Route25AfterBattleText6::
text "You came from MT."
line "MOON? May I have"
cont "a CLEFAIRY?"
done
-_Route25BattleText7:: ; 94499 (25:4499)
+_Route25BattleText7::
text "I just got down"
line "from MT.MOON,"
cont "but I'm ready!"
done
-_Route25EndBattleText7:: ; 944c6 (25:44c6)
+_Route25EndBattleText7::
text "You"
line "worked hard!"
prompt
-_Route25AfterBattleText7:: ; 944d8 (25:44d8)
+_Route25AfterBattleText7::
text "Drat!"
line "A ZUBAT bit me"
cont "back in there."
done
-_Route25BattleText8:: ; 944fd (25:44fd)
+_Route25BattleText8::
text "I'm off to see a"
line "#MON collector"
cont "at the cape!"
done
-_Route25EndBattleText8:: ; 9452a (25:452a)
+_Route25EndBattleText8::
text "You"
line "got me."
prompt
-_Route25AfterBattleText8:: ; 94537 (25:4537)
+_Route25AfterBattleText8::
text "The collector has"
line "many rare kinds"
cont "of #MON."
done
-_Route25BattleText9:: ; 94563 (25:4563)
+_Route25BattleText9::
text "You're going to"
line "see BILL? First,"
cont "let's fight!"
done
-_Route25EndBattleText9:: ; 94590 (25:4590)
+_Route25EndBattleText9::
text "You're"
line "something."
prompt
-_Route25AfterBattleText9:: ; 945a2 (25:45a2)
+_Route25AfterBattleText9::
text "The trail below"
line "is a shortcut to"
cont "CERULEAN CITY."
done
-_Route25Text11:: ; 945d3 (25:45d3)
+_Route25Text11::
text "SEA COTTAGE"
line "BILL lives here!"
done
diff --git a/text/maps/route_2_gate.asm b/text/maps/route_2_gate.asm
index e8337a1f..6be23d54 100644
--- a/text/maps/route_2_gate.asm
+++ b/text/maps/route_2_gate.asm
@@ -1,10 +1,10 @@
-_Route2GateText_5d616:: ; 8a7fc (22:67fc)
+_Route2GateText_5d616::
text "The HM FLASH"
line "lights even the"
cont "darkest dungeons."
done
-_Route2GateText2:: ; 8a82c (22:682c)
+_Route2GateText2::
text "Once a #MON"
line "learns FLASH, you"
cont "can get through"
diff --git a/text/maps/route_2_house.asm b/text/maps/route_2_house.asm
index 17028a2a..098a8f3e 100644
--- a/text/maps/route_2_house.asm
+++ b/text/maps/route_2_house.asm
@@ -1,4 +1,4 @@
-_Route2HouseText1:: ; 8a7b8 (22:67b8)
+_Route2HouseText1::
text "A fainted #MON"
line "can't fight. But, "
cont "it can still use "
diff --git a/text/maps/route_3.asm b/text/maps/route_3.asm
index 95612425..f9496c89 100644
--- a/text/maps/route_3.asm
+++ b/text/maps/route_3.asm
@@ -1,4 +1,4 @@
-_Route3Text1:: ; 8d779 (23:5779)
+_Route3Text1::
text "Whew... I better"
line "take a rest..."
cont "Groan..."
@@ -8,143 +8,138 @@ _Route3Text1:: ; 8d779 (23:5779)
cont "lot out of you!"
done
-_Route3BattleText1:: ; 8d7d5 (23:57d5)
+_Route3BattleText1::
text "Hey! I met you in"
line "VIRIDIAN FOREST!"
done
-_Route3EndBattleText1:: ; 8d7f9 (23:57f9)
+_Route3EndBattleText1::
text "You"
line "beat me again!"
prompt
-_Route3AfterBattleText1:: ; 8d80d (23:580d)
+_Route3AfterBattleText1::
text "There are other"
line "kinds of #MON"
cont "than those found"
cont "in the forest!"
done
-_Route3BattleText2:: ; 8d84c (23:584c)
+_Route3BattleText2::
text "Hi! I like shorts!"
line "They're comfy and"
cont "easy to wear!"
done
-_Route3EndBattleText2:: ; 8d87f (23:587f)
+_Route3EndBattleText2::
text "I don't"
line "believe it!"
prompt
-_Route3AfterBattleText2:: ; 8d893 (23:5893)
+_Route3AfterBattleText2::
text "Are you storing"
line "your #MON on"
cont "PC? Each BOX can"
cont "hold 20 #MON!"
done
-_Route3BattleText3:: ; 8d8d0 (23:58d0)
+_Route3BattleText3::
text "You looked at me,"
line "didn't you?"
done
-_Route3EndBattleText3:: ; 8d8ee (23:58ee)
+_Route3EndBattleText3::
text "You're"
line "mean!"
prompt
-_Route3AfterBattleText3:: ; 8d8fb (23:58fb)
+_Route3AfterBattleText3::
text "Quit staring if"
line "you don't want to"
cont "fight!"
done
-_Route3BattleText4:: ; 8d924 (23:5924)
+_Route3BattleText4::
text "Are you a trainer?"
line "Let's fight!"
done
-_Route3EndBattleText4:: ; 8d944 (23:5944)
+_Route3EndBattleText4::
text "If I"
-IF DEF(_YELLOW)
- line "had new #MON,"
- cont "I would've won!"
-ELSE
line "had new #MON I"
cont "would've won!"
-ENDC
prompt
-_Route3AfterBattleText4:: ; 8d966 (23:5966)
+_Route3AfterBattleText4::
text "If a #MON BOX"
line "on the PC gets"
cont "full, just switch"
cont "to another BOX!"
done
-_Route3BattleText5:: ; 8d9a6 (23:59a6)
+_Route3BattleText5::
text "That look you"
line "gave me, it's so"
cont "intriguing!"
done
-_Route3EndBattleText5:: ; 8d9d1 (23:59d1)
+_Route3EndBattleText5::
text "Be nice!"
prompt
-_Route3AfterBattleText5:: ; 8d9db (23:59db)
+_Route3AfterBattleText5::
text "Avoid fights by"
line "not letting"
cont "people see you!"
done
-_Route3BattleText6:: ; 8da08 (23:5a08)
+_Route3BattleText6::
text "Hey! You're not"
line "wearing shorts!"
done
-_Route3EndBattleText6:: ; 8da28 (23:5a28)
+_Route3EndBattleText6::
text "Lost!"
line "Lost! Lost!"
prompt
-_Route3AfterBattleText6:: ; 8da3b (23:5a3b)
+_Route3AfterBattleText6::
text "I always wear"
line "shorts, even in"
cont "winter!"
done
-_Route3BattleText7:: ; 8da62 (23:5a62)
+_Route3BattleText7::
text "You can fight my"
line "new #MON!"
done
-_Route3EndBattleText7:: ; 8da7e (23:5a7e)
+_Route3EndBattleText7::
text "Done"
line "like dinner!"
prompt
-_Route3AfterBattleText7:: ; 8da91 (23:5a91)
+_Route3AfterBattleText7::
text "Trained #MON"
line "are stronger than"
cont "the wild ones!"
done
-_Route3BattleText8:: ; 8dac0 (23:5ac0)
+_Route3BattleText8::
text "Eek! Did you"
line "touch me?"
done
-_Route3EndBattleText8:: ; 8dad8 (23:5ad8)
+_Route3EndBattleText8::
text "That's it?"
prompt
-_Route3AfterBattleText8:: ; 8dae3 (23:5ae3)
+_Route3AfterBattleText8::
text "ROUTE 4 is at the"
line "foot of MT.MOON."
done
-_Route3Text10:: ; 8db07 (23:5b07)
+_Route3Text10::
text "ROUTE 3"
line "MT.MOON AHEAD"
done
diff --git a/text/maps/route_4.asm b/text/maps/route_4.asm
index 15fced31..e49f1b7a 100644
--- a/text/maps/route_4.asm
+++ b/text/maps/route_4.asm
@@ -1,20 +1,20 @@
-_Route4Text1:: ; 8db1e (23:5b1e)
+_Route4Text1::
text "Ouch! I tripped"
line "over a rocky"
cont "#MON, GEODUDE!"
done
-_Route4BattleText1:: ; 8db4b (23:5b4b)
+_Route4BattleText1::
text "I came to get my"
line "mushroom #MON!"
done
-_Route4EndBattleText1:: ; 8db6c (23:5b6c)
+_Route4EndBattleText1::
text "Oh! My cute"
line "mushroom #MON!"
prompt
-_Route4AfterBattleText1:: ; 8db88 (23:5b88)
+_Route4AfterBattleText1::
text "There might not"
line "be any more"
cont "mushrooms here."
@@ -23,12 +23,12 @@ _Route4AfterBattleText1:: ; 8db88 (23:5b88)
line "them all."
done
-_Route4Text5:: ; 8dbcd (23:5bcd)
+_Route4Text5::
text "MT.MOON"
line "Tunnel Entrance"
done
-_Route4Text6:: ; 8dbe6 (23:5be6)
+_Route4Text6::
text "ROUTE 4"
line "MT.MOON -"
cont "CERULEAN CITY"
diff --git a/text/maps/route_5.asm b/text/maps/route_5.asm
index dca94e1f..4fced687 100644
--- a/text/maps/route_5.asm
+++ b/text/maps/route_5.asm
@@ -1,4 +1,4 @@
-_Route5Text1:: ; 8dc07 (23:5c07)
+_Route5Text1::
text "UNDERGROUND PATH"
line "CERULEAN CITY -"
cont "VERMILION CITY"
diff --git a/text/maps/route_6.asm b/text/maps/route_6.asm
index 3a54f461..f98bcaf8 100644
--- a/text/maps/route_6.asm
+++ b/text/maps/route_6.asm
@@ -1,132 +1,96 @@
-IF DEF(_YELLOW)
_Route6BattleText1::
- text "I'm doing this"
- line "out of love."
- cont "Leave me alone!"
- done
-
-_Route6EndBattleText1::
- text "No,"
- line "this can't be..."
- prompt
-
-_Route6AfterBattleText1::
- text "My love will leave"
- line "me in disgust."
- done
-
-_Route6BattleText2::
- text "I'm training for"
- line "my love. Don't"
- cont "bother me!"
- done
-
-_Route6EndBattleText2::
- text "My"
- line "textbook never..."
- prompt
-
-_Route6AfterBattleText2::
- text "Now I understand,"
- line "#MON isn't"
- cont "about calculated"
- cont "numbers."
- done
-ELSE
-_Route6BattleText1:: ; 8dc38 (23:5c38)
text "Who's there?"
line "Quit listening in"
cont "on us!"
done
-_Route6EndBattleText1:: ; 8dc5e (23:5c5e)
+_Route6EndBattleText1::
text "I"
line "just can't win!"
prompt
-_Route6AfterBattleText1:: ; 8dc70 (23:5c70)
+_Route6AfterBattleText1::
text "Whisper..."
line "whisper..."
done
-_Route6BattleText2:: ; 8dc87 (23:5c87)
+_Route6BattleText2::
text "Excuse me! This"
line "is a private"
cont "conversation!"
done
-_Route6EndBattleText2:: ; 8dcb3 (23:5cb3)
+_Route6EndBattleText2::
text "Ugh!"
line "I hate losing!"
prompt
-ENDC
-_Route6BattleText3:: ; 8dcc8 (23:5cc8)
+_Route6BattleText3::
text "There aren't many"
line "bugs out here."
done
-_Route6EndBattleText3:: ; 8dce9 (23:5ce9)
+_Route6EndBattleText3::
text "No!"
line "You're kidding!"
prompt
-_Route6AfterBattleText3:: ; 8dcfd (23:5cfd)
+_Route6AfterBattleText3::
text "I like bugs, so"
line "I'm going back to"
cont "VIRIDIAN FOREST."
done
-_Route6BattleText4:: ; 8dd30 (23:5d30)
+_Route6BattleText4::
text "Huh? You want"
line "to talk to me?"
done
-_Route6EndBattleText4:: ; 8dd4e (23:5d4e)
+_Route6EndBattleText4::
text "I"
line "didn't start it!"
prompt
-_Route6AfterBattleText4:: ; 8dd61 (23:5d61)
+_Route6AfterBattleText4::
text "I should carry"
line "more #MON with"
cont "me for safety."
done
-_Route6BattleText5:: ; 8dd8f (23:5d8f)
+_Route6BattleText5::
text "Me? Well, OK."
line "I'll play!"
done
-_Route6EndBattleText5:: ; 8dda8 (23:5da8)
+_Route6EndBattleText5::
text "Just"
line "didn't work!"
prompt
-_Route6AfterBattleText5:: ; 8ddba (23:5dba)
+_Route6AfterBattleText5::
text "I want to get"
line "stronger! What's"
cont "your secret?"
done
-_Route6BattleText6:: ; 8dde6 (23:5de6)
+_Route6BattleText6::
text "I've never seen"
line "you around!"
cont "Are you good?"
done
-_Route6EndBattleText6:: ; 8de10 (23:5e10)
+_Route6EndBattleText6::
text "You"
line "are too good!"
prompt
-_Route6AfterBattleText6:: ; 8de23 (23:5e23)
+_Route6AfterBattleText6::
text "Are my #MON"
line "weak? Or, am I"
cont "just bad?"
done
-_Route6Text7:: ; 8de49 (23:5e49)
+_Route6Text7::
text "UNDERGROUND PATH"
line "CERULEAN CITY -"
cont "VERMILION CITY"
diff --git a/text/maps/route_7.asm b/text/maps/route_7.asm
index 77c0eb79..24645b90 100644
--- a/text/maps/route_7.asm
+++ b/text/maps/route_7.asm
@@ -1,4 +1,4 @@
-_Route7Text1:: ; 8de7a (23:5e7a)
+_Route7Text1::
text "UNDERGROUND PATH"
line "CELADON CITY -"
cont "LAVENDER TOWN"
diff --git a/text/maps/route_8.asm b/text/maps/route_8.asm
index 62e2aff3..f59feb87 100644
--- a/text/maps/route_8.asm
+++ b/text/maps/route_8.asm
@@ -1,157 +1,153 @@
-_Route8BattleText1:: ; 8dea9 (23:5ea9)
+_Route8BattleText1::
text "You look good at"
line "#MON, but"
cont "how's your chem?"
done
-_Route8EndBattleText1:: ; 8ded5 (23:5ed5)
+_Route8EndBattleText1::
text "Ow!"
line "Meltdown!"
prompt
-_Route8AfterBattleText1:: ; 8dee4 (23:5ee4)
+_Route8AfterBattleText1::
text "I am better at"
line "school than this!"
done
-_Route8BattleText2:: ; 8df06 (23:5f06)
+_Route8BattleText2::
text "All right! Let's"
line "roll the dice!"
done
-_Route8EndBattleText2:: ; 8df26 (23:5f26)
+_Route8EndBattleText2::
text "Drat!"
line "Came up short!"
prompt
-_Route8AfterBattleText2:: ; 8df3c (23:5f3c)
+_Route8AfterBattleText2::
text "Lady Luck's not"
line "with me today!"
done
-_Route8BattleText3:: ; 8df5b (23:5f5b)
+_Route8BattleText3::
text "You need strategy"
line "to win at this!"
done
-_Route8EndBattleText3:: ; 8df7e (23:5f7e)
+_Route8EndBattleText3::
text "It's"
line "not logical!"
prompt
-_Route8AfterBattleText3:: ; 8df90 (23:5f90)
+_Route8AfterBattleText3::
text "Go with GRIMER"
line "first...and..."
cont "...and...then..."
done
-_Route8BattleText4:: ; 8dfc0 (23:5fc0)
+_Route8BattleText4::
text "I like NIDORAN, so"
line "I collect them!"
done
-_Route8EndBattleText4:: ; 8dfe4 (23:5fe4)
+_Route8EndBattleText4::
text "Why? Why??"
prompt
-_Route8AfterBattleText4:: ; 8dff0 (23:5ff0)
+_Route8AfterBattleText4::
text "When #MON grow"
line "up they get ugly!"
cont "They shouldn't"
cont "evolve!"
done
-_Route8BattleText5:: ; 8e028 (23:6028)
+_Route8BattleText5::
text "School is fun, but"
line "so are #MON."
done
-_Route8EndBattleText5:: ; 8e049 (23:6049)
+_Route8EndBattleText5::
text "I'll"
line "stay with school."
prompt
-_Route8AfterBattleText5:: ; 8e060 (23:6060)
+_Route8AfterBattleText5::
text "We're stuck here"
line "because of the"
cont "gates at SAFFRON."
done
-_Route8BattleText6:: ; 8e092 (23:6092)
+_Route8BattleText6::
text "MEOWTH is so cute,"
line "meow, meow, meow!"
done
-_Route8EndBattleText6:: ; 8e0b8 (23:60b8)
+_Route8EndBattleText6::
text "Meow!"
prompt
-_Route8AfterBattleText6:: ; 8e0bf (23:60bf)
+_Route8AfterBattleText6::
text "I think PIDGEY"
line "and RATTATA"
cont "are cute too!"
done
-_Route8BattleText7:: ; 8e0e9 (23:60e9)
+_Route8BattleText7::
text "We must look"
line "silly standing"
cont "here like this!"
done
-_Route8EndBattleText7:: ; 8e116 (23:6116)
+_Route8EndBattleText7::
text "Look what"
line "you did!"
prompt
-_Route8AfterBattleText7:: ; 8e12a (23:612a)
-if DEF(_YELLOW)
- text "SAFFRON's gate-"
-ELSE
+_Route8AfterBattleText7::
text "SAFFRON's gate"
-ENDC
line "keeper won't let"
cont "us through."
cont "He's so mean!"
done
-_Route8BattleText8:: ; 8e162 (23:6162)
+_Route8BattleText8::
text "I'm a rambling,"
line "gambling dude!"
done
-_Route8EndBattleText8:: ; 8e181 (23:6181)
+_Route8EndBattleText8::
text "Missed"
line "the big score!"
prompt
-_Route8AfterBattleText8:: ; 8e198 (23:6198)
+_Route8AfterBattleText8::
text "Gambling and"
line "#MON are like"
cont "eating peanuts!"
cont "Just can't stop!"
done
-_Route8BattleText9:: ; 8e1d4 (23:61d4)
+_Route8BattleText9::
text "What's a cute,"
line "round and fluffy"
cont "#MON?"
done
-_Route8EndBattleText9:: ; 8e1fa (23:61fa)
+_Route8EndBattleText9::
text "Stop!"
para "Don't be so mean"
line "to my CLEFAIRY!"
prompt
-_Route8AfterBattleText9:: ; 8e221 (23:6221)
+_Route8AfterBattleText9::
text "I heard that"
line "CLEFAIRY evolves"
cont "when it's exposed"
cont "to a MOON STONE."
done
-_Route8Text10:: ; 8e262 (23:6262)
+_Route8Text10::
text "UNDERGROUND PATH"
line "CELADON CITY -"
cont "LAVENDER TOWN"
diff --git a/text/maps/route_9.asm b/text/maps/route_9.asm
index 353eb779..c440eca9 100644
--- a/text/maps/route_9.asm
+++ b/text/maps/route_9.asm
@@ -1,91 +1,74 @@
-_Route9BattleText1:: ; 8e291 (23:6291)
+_Route9BattleText1::
text "You have #MON"
line "with you!"
cont "You're mine!"
done
-_Route9EndBattleText1:: ; 8e2b6 (23:62b6)
+_Route9EndBattleText1::
text "You"
line "deceived me!"
prompt
-_Route9AfterBattleText1:: ; 8e2c8 (23:62c8)
+_Route9AfterBattleText1::
text "You need light to"
line "get through that"
cont "dark tunnel ahead."
done
-IF DEF(_YELLOW)
-_Route9BattleTextAJ::
- text "I aim to be the"
- line "ultimate trainer!"
- done
-
-_Route9EndBattleTextAJ::
- text "My"
- line "SANDSHREW lost?"
- prompt
-
-_Route9AfterBattleTextAJ::
- text "I'll restart my"
- line "100-win streak"
- cont "with SANDSHREW."
-ENDC
-
-_Route9BattleText2:: ; 8e2ff (23:62ff)
+_Route9BattleText2::
text "Who's that walking"
line "with those good"
cont "looking #MON?"
done
-_Route9EndBattleText2:: ; 8e330 (23:6330)
+_Route9EndBattleText2::
text "Out"
line "like a light!"
prompt
-_Route9AfterBattleText2:: ; 8e343 (23:6343)
+_Route9AfterBattleText2::
text "Keep walking!"
done
-_Route9BattleText3:: ; 8e352 (23:6352)
+_Route9BattleText3::
text "I'm taking ROCK"
line "TUNNEL to go to"
cont "LAVENDER..."
done
-_Route9EndBattleText3:: ; 8e37e (23:637e)
+_Route9EndBattleText3::
text "Can't"
line "measure up!"
prompt
-_Route9AfterBattleText3:: ; 8e390 (23:6390)
+_Route9AfterBattleText3::
text "Are you off to"
line "ROCK TUNNEL too?"
done
-_Route9BattleText4:: ; 8e3b1 (23:63b1)
+_Route9BattleText4::
text "Don't you dare"
line "condescend me!"
done
-_Route9EndBattleText4:: ; 8e3cf (23:63cf)
+_Route9EndBattleText4::
text "No!"
line "You're too much!"
prompt
-_Route9AfterBattleText4:: ; 8e3e4 (23:63e4)
+_Route9AfterBattleText4::
text "You're obviously"
line "talented! Good"
cont "luck to you!"
done
-_Route9BattleText5:: ; 8e411 (23:6411)
+_Route9BattleText5::
text "Bwahaha!"
line "Great! I was"
cont "bored, eh!"
done
-_Route9EndBattleText5:: ; 8e433 (23:6433)
+_Route9EndBattleText5::
text "Keep it"
line "coming, eh!"
@@ -93,81 +76,81 @@ _Route9EndBattleText5:: ; 8e433 (23:6433)
line "of #MON!"
prompt
-_Route9AfterBattleText5:: ; 8e461 (23:6461)
+_Route9AfterBattleText5::
text "You sure had guts"
line "standing up to me"
cont "there, eh?"
done
-_Route9BattleText6:: ; 8e491 (23:6491)
+_Route9BattleText6::
text "Hahaha!"
line "Aren't you a"
cont "little toughie!"
done
-_Route9EndBattleText6:: ; 8e4b6 (23:64b6)
+_Route9EndBattleText6::
text "What's"
line "that?"
prompt
-_Route9AfterBattleText6:: ; 8e4c3 (23:64c3)
+_Route9AfterBattleText6::
text "Hahaha! Kids"
line "should be tough!"
done
-_Route9BattleText7:: ; 8e4e2 (23:64e2)
+_Route9BattleText7::
text "I got up early"
line "every day to"
cont "raise my #MON"
cont "from cocoons!"
done
-_Route9EndBattleText7:: ; 8e51b (23:651b)
+_Route9EndBattleText7::
text "WHAT?"
para "What a total"
line "waste of time!"
prompt
-_Route9AfterBattleText7:: ; 8e53e (23:653e)
+_Route9AfterBattleText7::
text "I have to collect"
line "more than bugs to"
cont "get stronger..."
done
-_Route9BattleText8:: ; 8e573 (23:6573)
+_Route9BattleText8::
text "Hahahaha!"
line "Come on, dude!"
done
-_Route9EndBattleText8:: ; 8e58d (23:658d)
+_Route9EndBattleText8::
text "Hahahaha!"
line "You beat me fair!"
prompt
-_Route9AfterBattleText8:: ; 8e5aa (23:65aa)
+_Route9AfterBattleText8::
text "Hahahaha!"
line "Us hearty guys"
cont "always laugh!"
done
-_Route9BattleText9:: ; 8e5d2 (23:65d2)
+_Route9BattleText9::
text "Go, my super bug"
line "#MON!"
done
-_Route9EndBattleText9:: ; 8e5ea (23:65ea)
+_Route9EndBattleText9::
text "My"
line "bugs..."
prompt
-_Route9AfterBattleText9:: ; 8e5f6 (23:65f6)
+_Route9AfterBattleText9::
text "If you don't like"
line "bug #MON, you"
cont "bug me!"
done
-_Route9Text11:: ; 8e61e (23:661e)
+_Route9Text11::
text "ROUTE 9"
line "CERULEAN CITY-"
cont "ROCK TUNNEL"
diff --git a/text/maps/safari_zone_center.asm b/text/maps/safari_zone_center.asm
index e12d495f..50ed1e1e 100644
--- a/text/maps/safari_zone_center.asm
+++ b/text/maps/safari_zone_center.asm
@@ -1,8 +1,8 @@
-_SafariZoneCenterText2:: ; 85807 (21:5807)
+_SafariZoneCenterText2::
text "REST HOUSE"
done
-_SafariZoneCenterText3:: ; 85813 (21:5813)
+_SafariZoneCenterText3::
text "TRAINER TIPS"
para "Press the START"
diff --git a/text/maps/safari_zone_east.asm b/text/maps/safari_zone_east.asm
index 0658a09f..78634e4a 100644
--- a/text/maps/safari_zone_east.asm
+++ b/text/maps/safari_zone_east.asm
@@ -1,8 +1,8 @@
-_SafariZoneEastText5:: ; 855e0 (21:55e0)
+_SafariZoneEastText5::
text "REST HOUSE"
done
-_SafariZoneEastText6:: ; 855ec (21:55ec)
+_SafariZoneEastText6::
text "TRAINER TIPS"
para "The remaining time"
@@ -10,7 +10,7 @@ _SafariZoneEastText6:: ; 855ec (21:55ec)
cont "while you walk!"
done
-_SafariZoneEastText7:: ; 8562b (21:562b)
+_SafariZoneEastText7::
text "CENTER AREA"
line "NORTH: AREA 2"
done
diff --git a/text/maps/safari_zone_entrance.asm b/text/maps/safari_zone_entrance.asm
index 79f70ea4..22c179f3 100644
--- a/text/maps/safari_zone_entrance.asm
+++ b/text/maps/safari_zone_entrance.asm
@@ -1,9 +1,9 @@
-_SafariZoneEntranceText1:: ; 9e6c7 (27:66c7)
+_SafariZoneEntranceText1::
text "Welcome to the"
line "SAFARI ZONE!"
done
-SafariZoneEntranceText_9e6e4:: ; 9e6e4 (27:66e4)
+SafariZoneEntranceText_9e6e4::
text "For just ¥500,"
line "you can catch all"
cont "the #MON you"
@@ -12,7 +12,7 @@ SafariZoneEntranceText_9e6e4:: ; 9e6e4 (27:66e4)
para "Would you like to"
line "join the hunt?@@"
-SafariZoneEntranceText_9e747:: ; 9e747 (27:6747)
+SafariZoneEntranceText_9e747::
text "That'll be ¥500"
line "please!"
@@ -23,7 +23,7 @@ SafariZoneEntranceText_9e747:: ; 9e747 (27:6747)
para $52, " received"
line "30 SAFARI BALLs!@@"
-_SafariZoneEntranceText_75360:: ; 9e79f (27:679f)
+_SafariZoneEntranceText_75360::
db $0
para "We'll call you on"
line "the PA when you"
@@ -31,41 +31,41 @@ _SafariZoneEntranceText_75360:: ; 9e79f (27:679f)
cont "or SAFARI BALLs!"
done
-_SafariZoneEntranceText_75365:: ; 9e7e3 (27:67e3)
+_SafariZoneEntranceText_75365::
text "OK! Please come"
line "again!"
done
-_SafariZoneEntranceText_7536a:: ; 9e7fb (27:67fb)
+_SafariZoneEntranceText_7536a::
text "Oops! Not enough"
line "money!"
done
-SafariZoneEntranceText_9e814:: ; 9e814 (27:6814)
+SafariZoneEntranceText_9e814::
text "Leaving early?@@"
-_SafariZoneEntranceText_753bb:: ; 9e825 (27:6825)
+_SafariZoneEntranceText_753bb::
text "Please return any"
line "SAFARI BALLs you"
cont "have left."
done
-_SafariZoneEntranceText_753c0:: ; 9e854 (27:6854)
+_SafariZoneEntranceText_753c0::
text "Good Luck!"
done
-_SafariZoneEntranceText_753c5:: ; 9e860 (27:6860)
+_SafariZoneEntranceText_753c5::
text "Did you get a"
line "good haul?"
cont "Come again!"
done
-_SafariZoneEntranceText_753e6:: ; 9e886 (27:6886)
+_SafariZoneEntranceText_753e6::
text "Hi! Is it your"
line "first time here?"
done
-_SafariZoneEntranceText_753eb:: ; 9e8a7 (27:68a7)
+_SafariZoneEntranceText_753eb::
text "SAFARI ZONE has 4"
line "zones in it."
@@ -87,7 +87,7 @@ _SafariZoneEntranceText_753eb:: ; 9e8a7 (27:68a7)
cont "new #MON!"
done
-_SafariZoneEntranceText_753f0:: ; 9e993 (27:6993)
+_SafariZoneEntranceText_753f0::
text "Sorry, you're a"
line "regular here!"
done
diff --git a/text/maps/safari_zone_north.asm b/text/maps/safari_zone_north.asm
index cdd46333..fdf8b5e8 100644
--- a/text/maps/safari_zone_north.asm
+++ b/text/maps/safari_zone_north.asm
@@ -1,19 +1,19 @@
-_SafariZoneNorthText3:: ; 85646 (21:5646)
+_SafariZoneNorthText3::
text "REST HOUSE"
done
-_SafariZoneNorthText4:: ; 85652 (21:5652)
+_SafariZoneNorthText4::
text "TRAINER TIPS"
para "The SECRET HOUSE"
line "is still ahead!"
done
-_SafariZoneNorthText5:: ; 85681 (21:5681)
+_SafariZoneNorthText5::
text "AREA 2"
done
-_SafariZoneNorthText6:: ; 85689 (21:5689)
+_SafariZoneNorthText6::
text "TRAINER TIPS"
para "#MON hide in"
@@ -24,7 +24,7 @@ _SafariZoneNorthText6:: ; 85689 (21:5689)
cont "flush them out."
done
-_SafariZoneNorthText7:: ; 856df (21:56df)
+_SafariZoneNorthText7::
text "TRAINER TIPS"
para "Win a free HM for"
diff --git a/text/maps/safari_zone_rest_house_1.asm b/text/maps/safari_zone_rest_house_1.asm
index 7fc2d027..2731bdb4 100644
--- a/text/maps/safari_zone_rest_house_1.asm
+++ b/text/maps/safari_zone_rest_house_1.asm
@@ -1,10 +1,10 @@
-_SafariZoneRestHouse1Text1:: ; 85851 (21:5851)
+_SafariZoneRestHouse1Text1::
text "SARA: Where did"
line "my boy friend,"
cont "ERIK, go?"
done
-_SafariZoneRestHouse1Text2:: ; 8587b (21:587b)
+_SafariZoneRestHouse1Text2::
text "I'm catching"
line "#MON to take"
cont "home as gifts!"
diff --git a/text/maps/safari_zone_rest_house_2.asm b/text/maps/safari_zone_rest_house_2.asm
index a93838bb..6cdca9c0 100644
--- a/text/maps/safari_zone_rest_house_2.asm
+++ b/text/maps/safari_zone_rest_house_2.asm
@@ -1,4 +1,4 @@
-_SafariZoneRestHouse2Text1:: ; 85a2f (21:5a2f)
+_SafariZoneRestHouse2Text1::
text "Tossing ROCKs at"
line "#MON might"
cont "make them run,"
@@ -6,13 +6,13 @@ _SafariZoneRestHouse2Text1:: ; 85a2f (21:5a2f)
cont "easier to catch."
done
-_SafariZoneRestHouse2Text2:: ; 85a7a (21:5a7a)
+_SafariZoneRestHouse2Text2::
text "Using BAIT will"
line "make #MON"
cont "easier to catch."
done
-_SafariZoneRestHouse2Text3:: ; 85aa6 (21:5aa6)
+_SafariZoneRestHouse2Text3::
text "I hiked a lot, but"
line "I didn't see any"
cont "#MON I wanted."
diff --git a/text/maps/safari_zone_rest_house_3.asm b/text/maps/safari_zone_rest_house_3.asm
index c424014a..f40c3009 100644
--- a/text/maps/safari_zone_rest_house_3.asm
+++ b/text/maps/safari_zone_rest_house_3.asm
@@ -1,10 +1,10 @@
-_SafariZoneRestHouse3Text1:: ; 85ad9 (21:5ad9)
+_SafariZoneRestHouse3Text1::
text "How many did you"
line "catch? I'm bushed"
cont "from the work!"
done
-_SafariZoneRestHouse3Text2:: ; 85b0b (21:5b0b)
+_SafariZoneRestHouse3Text2::
text "I caught a"
line "CHANSEY!"
@@ -12,7 +12,7 @@ _SafariZoneRestHouse3Text2:: ; 85b0b (21:5b0b)
line "all worthwhile!"
done
-_SafariZoneRestHouse3Text3:: ; 85b40 (21:5b40)
+_SafariZoneRestHouse3Text3::
text "Whew! I'm tired"
line "from all the fun!"
done
diff --git a/text/maps/safari_zone_rest_house_4.asm b/text/maps/safari_zone_rest_house_4.asm
index 1b510bd8..e50c4522 100644
--- a/text/maps/safari_zone_rest_house_4.asm
+++ b/text/maps/safari_zone_rest_house_4.asm
@@ -1,4 +1,4 @@
-_SafariZoneRestHouse4Text1:: ; 85b62 (21:5b62)
+_SafariZoneRestHouse4Text1::
text "You can keep any"
line "item you find on"
cont "the ground here."
@@ -9,14 +9,14 @@ _SafariZoneRestHouse4Text1:: ; 85b62 (21:5b62)
cont "of them at once!"
done
-_SafariZoneRestHouse4Text2:: ; 85bd5 (21:5bd5)
+_SafariZoneRestHouse4Text2::
text "Go to the deepest"
line "part of the"
cont "SAFARI ZONE. You"
cont "will win a prize!"
done
-_SafariZoneRestHouse4Text3:: ; 85c17 (21:5c17)
+_SafariZoneRestHouse4Text3::
text "My EEVEE evolved"
line "into FLAREON!"
diff --git a/text/maps/safari_zone_secret_house.asm b/text/maps/safari_zone_secret_house.asm
index 67b677be..f285a697 100644
--- a/text/maps/safari_zone_secret_house.asm
+++ b/text/maps/safari_zone_secret_house.asm
@@ -1,4 +1,4 @@
-_SecretHouseText_4a350:: ; 858a4 (21:58a4)
+_SecretHouseText_4a350::
text "Ah! Finally!"
para "You're the first"
@@ -14,13 +14,13 @@ _SecretHouseText_4a350:: ; 858a4 (21:58a4)
line "You have won!"
prompt
-_ReceivedHM03Text:: ; 85943 (21:5943)
+_ReceivedHM03Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_HM03ExplanationText:: ; 85957 (21:5957)
+_HM03ExplanationText::
text "HM03 is SURF!"
para "#MON will be"
@@ -37,7 +37,7 @@ _HM03ExplanationText:: ; 85957 (21:5957)
cont "fabulous prize!"
done
-_HM03NoRoomText:: ; 85a02 (21:5a02)
+_HM03NoRoomText::
text "You don't have"
line "room for this"
cont "fabulous prize!"
diff --git a/text/maps/safari_zone_west.asm b/text/maps/safari_zone_west.asm
index ea8d2425..e10df2a3 100644
--- a/text/maps/safari_zone_west.asm
+++ b/text/maps/safari_zone_west.asm
@@ -1,8 +1,8 @@
-_SafariZoneWestText5:: ; 85719 (21:5719)
+_SafariZoneWestText5::
text "REST HOUSE"
done
-_SafariZoneWestText6:: ; 85725 (21:5725)
+_SafariZoneWestText6::
text "REQUEST NOTICE"
para "Please find the"
@@ -15,7 +15,7 @@ _SafariZoneWestText6:: ; 85725 (21:5725)
line "Contact: WARDEN"
done
-_SafariZoneWestText7:: ; 857a3 (21:57a3)
+_SafariZoneWestText7::
text "TRAINER TIPS"
para "Zone Exploration"
@@ -25,7 +25,7 @@ _SafariZoneWestText7:: ; 857a3 (21:57a3)
line "the SECRET HOUSE!"
done
-_SafariZoneWestText8:: ; 857ed (21:57ed)
+_SafariZoneWestText8::
text "AREA 3"
line "EAST: CENTER AREA"
done
diff --git a/text/maps/saffron_city.asm b/text/maps/saffron_city.asm
index cc2c684e..82687181 100644
--- a/text/maps/saffron_city.asm
+++ b/text/maps/saffron_city.asm
@@ -1,60 +1,60 @@
-_SaffronCityText1:: ; a62e7 (29:62e7)
+_SaffronCityText1::
text "What do you want?"
line "Get lost!"
done
-_SaffronCityText2:: ; a6304 (29:6304)
+_SaffronCityText2::
text "BOSS said he'll"
line "take this town!"
done
-_SaffronCityText3:: ; a6324 (29:6324)
+_SaffronCityText3::
text "Get out of the"
line "way!"
done
-_SaffronCityText4:: ; a6339 (29:6339)
+_SaffronCityText4::
text "SAFFRON belongs"
line "to TEAM ROCKET!"
done
-_SaffronCityText5:: ; a635a (29:635a)
+_SaffronCityText5::
text "Being evil makes"
line "me feel so alive!"
done
-_SaffronCityText6:: ; a637e (29:637e)
+_SaffronCityText6::
text "Ow! Watch where"
line "you're walking!"
done
-_SaffronCityText7:: ; a639e (29:639e)
+_SaffronCityText7::
text "With SILPH under"
line "control, we can"
cont "exploit #MON"
cont "around the world!"
done
-_SaffronCityText8:: ; a63df (29:63df)
+_SaffronCityText8::
text "You beat TEAM"
line "ROCKET all alone?"
cont "That's amazing!"
done
-_SaffronCityText9:: ; a640f (29:640f)
+_SaffronCityText9::
text "Yeah! TEAM ROCKET"
line "is gone!"
cont "It's safe to go"
cont "out again!"
done
-_SaffronCityText10:: ; a6445 (29:6445)
+_SaffronCityText10::
text "People should be"
line "flocking back to"
cont "SAFFRON now."
done
-_SaffronCityText11:: ; a6475 (29:6475)
+_SaffronCityText11::
text "I flew here on my"
line "PIDGEOT when I"
cont "read about SILPH."
@@ -64,16 +64,16 @@ _SaffronCityText11:: ; a6475 (29:6475)
cont "media action."
done
-_SaffronCityText12:: ; a64d6 (29:64d6)
+_SaffronCityText12::
text "PIDGEOT: Bi bibii!@@"
-_SaffronCityText13:: ; a64eb (29:64eb)
+_SaffronCityText13::
text "I saw ROCKET"
line "BOSS escaping"
cont "SILPH's building."
done
-_SaffronCityText14:: ; a6518 (29:6518)
+_SaffronCityText14::
text "I'm a security"
line "guard."
@@ -81,7 +81,7 @@ _SaffronCityText14:: ; a6518 (29:6518)
line "don't allow in!"
done
-_SaffronCityText15:: ; a654f (29:654f)
+_SaffronCityText15::
text "..."
line "Snore..."
@@ -89,17 +89,17 @@ _SaffronCityText15:: ; a654f (29:654f)
line "a snooze!"
done
-_SaffronCityText16:: ; a6577 (29:6577)
+_SaffronCityText16::
text "SAFFRON CITY"
line "Shining, Golden"
cont "Land of Commerce"
done
-_SaffronCityText17:: ; a65a6 (29:65a6)
+_SaffronCityText17::
text "FIGHTING DOJO"
done
-_SaffronCityText18:: ; a65b5 (29:65b5)
+_SaffronCityText18::
text "SAFFRON CITY"
line "#MON GYM"
cont "LEADER: SABRINA"
@@ -108,7 +108,7 @@ _SaffronCityText18:: ; a65b5 (29:65b5)
line "Psychic #MON!"
done
-_SaffronCityText20:: ; a65f8 (29:65f8)
+_SaffronCityText20::
text "TRAINER TIPS"
para "FULL HEAL cures"
@@ -120,7 +120,7 @@ _SaffronCityText20:: ; a65f8 (29:65f8)
cont "more convenient."
done
-_SaffronCityText21:: ; a6667 (29:6667)
+_SaffronCityText21::
text "TRAINER TIPS"
para "New GREAT BALL"
@@ -132,17 +132,17 @@ _SaffronCityText21:: ; a6667 (29:6667)
cont "#MON."
done
-_SaffronCityText22:: ; a66c7 (29:66c7)
+_SaffronCityText22::
text "SILPH CO."
line "OFFICE BUILDING"
done
-_SaffronCityText24:: ; a66e2 (29:66e2)
+_SaffronCityText24::
text "MR.PSYCHIC's"
line "HOUSE"
done
-_SaffronCityText25:: ; a66f5 (29:66f5)
+_SaffronCityText25::
text "SILPH's latest"
line "product!"
diff --git a/text/maps/saffron_gates.asm b/text/maps/saffron_gates.asm
index b7db1751..30ad6cbd 100644
--- a/text/maps/saffron_gates.asm
+++ b/text/maps/saffron_gates.asm
@@ -1,17 +1,13 @@
-_SaffronGateText_1dfe7:: ; 8aa5c (22:6a5c)
+_SaffronGateText_1dfe7::
text "I'm on guard duty."
line "Gee, I'm thirsty,"
cont "though!"
-IF DEF(_YELLOW)
- para "Oh, wait there,"
-ELSE
para "Oh wait there,"
-ENDC
line "the road's closed."
done
-_SaffronGateText_8aaa9:: ; 8aaa9 (22:6aa9)
+_SaffronGateText_8aaa9::
text "Whoa, boy!"
line "I'm parched!"
cont "..."
@@ -19,14 +15,10 @@ _SaffronGateText_8aaa9:: ; 8aaa9 (22:6aa9)
cont "this drink?"
cont "Gee, thanks!@@"
-_SaffronGateText_1dff1:: ; 8aaef (22:6aef)
+_SaffronGateText_1dff1::
db $0
para "..."
-IF DEF(_YELLOW)
- line "Glug, glug..."
-ELSE
line "Glug glug..."
-ENDC
cont "..."
cont "Gulp..."
cont "If you want to go"
@@ -38,7 +30,7 @@ ENDC
cont "the other guards!"
done
-_SaffronGateText_1dff6:: ; 8ab74 (22:6b74)
+_SaffronGateText_1dff6::
text "Hi, thanks for"
line "the cool drinks!"
done
diff --git a/text/maps/saffron_gym.asm b/text/maps/saffron_gym.asm
index 3236c7b2..f44baaea 100644
--- a/text/maps/saffron_gym.asm
+++ b/text/maps/saffron_gym.asm
@@ -1,4 +1,4 @@
-_SaffronGymText_5d162:: ; a1bb4 (28:5bb4)
+_SaffronGymText_5d162::
text "I had a vision of"
line "your arrival!"
@@ -16,7 +16,7 @@ _SaffronGymText_5d162:: ; a1bb4 (28:5bb4)
cont "you my powers!"
done
-_SaffronGymText_5d167:: ; a1c73 (28:5c73)
+_SaffronGymText_5d167::
text "I'm"
line "shocked!"
cont "But, a loss is a"
@@ -29,14 +29,14 @@ _SaffronGymText_5d167:: ; a1c73 (28:5c73)
para "You earned the"
line "MARSHBADGE!@@"
-_SaffronGymText_5d16e:: ; a1cdc (28:5cdc)
+_SaffronGymText_5d16e::
text "Everyone has"
line "psychic power!"
cont "People just don't"
cont "realize it!"
done
-_SaffronGymText_5d173:: ; a1d16 (28:5d16)
+_SaffronGymText_5d173::
text "The MARSHBADGE"
line "makes #MON up"
cont "to L70 obey you!"
@@ -54,11 +54,11 @@ _SaffronGymText_5d173:: ; a1d16 (28:5d16)
line "this TM with you!"
done
-ReceivedTM46Text:: ; a1dcd (28:5dcd)
+ReceivedTM46Text::
text $52, " received"
line "TM46!@@"
-_TM46ExplanationText:: ; a1de0 (28:5de0)
+_TM46ExplanationText::
db $0
para "TM46 is PSYWAVE!"
line "It uses powerful"
@@ -66,12 +66,12 @@ _TM46ExplanationText:: ; a1de0 (28:5de0)
cont "inflict damage!"
done
-_TM46NoRoomText:: ; a1e25 (28:5e25)
+_TM46NoRoomText::
text "Your pack is full"
line "of other items!"
done
-_SaffronGymText_5d1e6:: ; a1e48 (28:5e48)
+_SaffronGymText_5d1e6::
text "Yo! Champ in"
line "making!"
@@ -88,7 +88,7 @@ _SaffronGymText_5d1e6:: ; a1e48 (28:5e48)
cont "even aim a punch!"
done
-_SaffronGymText_5d1eb:: ; a1ef0 (28:5ef0)
+_SaffronGymText_5d1eb::
text "Psychic power,"
line "huh?"
@@ -97,18 +97,18 @@ _SaffronGymText_5d1eb:: ; a1ef0 (28:5ef0)
cont "at the slots!"
done
-_SaffronGymBattleText1:: ; a1f33 (28:5f33)
+_SaffronGymBattleText1::
text "SABRINA is younger"
line "than I, but I"
cont "respect her!"
done
-_SaffronGymEndBattleText1:: ; a1f62 (28:5f62)
+_SaffronGymEndBattleText1::
text "Not"
line "good enough!"
prompt
-_SaffronGymAfterBattleText1:: ; a1f74 (28:5f74)
+_SaffronGymAfterBattleText1::
text "In a battle of"
line "equals, the one"
cont "with the stronger"
@@ -119,27 +119,23 @@ _SaffronGymAfterBattleText1:: ; a1f74 (28:5f74)
cont "focus on winning!"
done
-_SaffronGymBattleText2:: ; a1fe0 (28:5fe0)
+_SaffronGymBattleText2::
text "Does our unseen"
line "power scare you?"
done
-_SaffronGymEndBattleText2:: ; a2002 (28:6002)
+_SaffronGymEndBattleText2::
text "I never"
line "foresaw this!"
prompt
-_SaffronGymAfterBattleText2:: ; a2019 (28:6019)
+_SaffronGymAfterBattleText2::
text "Psychic #MON"
-IF DEF(_YELLOW)
- line "fear only bugs!"
-ELSE
line "fear only ghosts"
cont "and bugs!"
-ENDC
done
-_SaffronGymBattleText3:: ; a2042 (28:6042)
+_SaffronGymBattleText3::
text "#MON take on"
line "the appearance of"
cont "their trainers."
@@ -148,52 +144,52 @@ _SaffronGymBattleText3:: ; a2042 (28:6042)
line "be tough, then!"
done
-_SaffronGymEndBattleText3:: ; a2091 (28:6091)
+_SaffronGymEndBattleText3::
text "I knew"
line "it!"
prompt
-_SaffronGymAfterBattleText3:: ; a209d (28:609d)
+_SaffronGymAfterBattleText3::
text "I must teach"
line "better techniques"
cont "to my #MON!"
done
-_SaffronGymBattleText4:: ; a20c9 (28:60c9)
+_SaffronGymBattleText4::
text "You know that"
line "power alone isn't"
cont "enough!"
done
-_SaffronGymEndBattleText4:: ; a20f1 (28:60f1)
+_SaffronGymEndBattleText4::
text "I don't"
line "believe this!"
prompt
-_SaffronGymAfterBattleText4:: ; a2107 (28:6107)
+_SaffronGymAfterBattleText4::
text "SABRINA just wiped"
line "out the KARATE"
cont "MASTER next door!"
done
-_SaffronGymBattleText5:: ; a213c (28:613c)
+_SaffronGymBattleText5::
text "You and I, our"
line "#MON shall"
cont "fight!"
done
-_SaffronGymEndBattleText5:: ; a215e (28:615e)
+_SaffronGymEndBattleText5::
text "I lost"
line "after all!"
prompt
-_SaffronGymAfterBattleText5:: ; a2171 (28:6171)
+_SaffronGymAfterBattleText5::
text "I knew that this"
line "was going to take"
cont "place."
done
-_SaffronGymBattleText6:: ; a219c (28:619c)
+_SaffronGymBattleText6::
text "SABRINA is young,"
line "but she's also"
cont "our LEADER!"
@@ -202,12 +198,12 @@ _SaffronGymBattleText6:: ; a219c (28:619c)
line "her easily!"
done
-_SaffronGymEndBattleText6:: ; a21e4 (28:61e4)
+_SaffronGymEndBattleText6::
text "I lost"
line "my concentration!"
prompt
-_SaffronGymAfterBattleText6:: ; a21fe (28:61fe)
+_SaffronGymAfterBattleText6::
text "There used to be"
line "2 #MON GYMs in"
cont "SAFFRON."
@@ -219,7 +215,7 @@ _SaffronGymAfterBattleText6:: ; a21fe (28:61fe)
cont "creamed them!"
done
-_SaffronGymBattleText7:: ; a2277 (28:6277)
+_SaffronGymBattleText7::
text "SAFFRON #MON"
line "GYM is famous for"
cont "its psychics!"
@@ -229,11 +225,11 @@ _SaffronGymBattleText7:: ; a2277 (28:6277)
cont "I can tell!"
done
-_SaffronGymEndBattleText7:: ; a22ca (28:62ca)
+_SaffronGymEndBattleText7::
text "Arrrgh!"
prompt
-_SaffronGymAfterBattleText7:: ; a22d3 (28:62d3)
+_SaffronGymAfterBattleText7::
text "That's right! I"
line "used telepathy to"
cont "read your mind!"
diff --git a/text/maps/saffron_house.asm b/text/maps/saffron_house.asm
index 9741303a..21ed3b89 100644
--- a/text/maps/saffron_house.asm
+++ b/text/maps/saffron_house.asm
@@ -1,4 +1,4 @@
-_SaffronHouse1Text1:: ; a2305 (28:6305)
+_SaffronHouse1Text1::
text "Thank you for"
line "writing. I hope"
cont "to see you soon!"
@@ -7,16 +7,16 @@ _SaffronHouse1Text1:: ; a2305 (28:6305)
line "at my letter!"
done
-_SaffronHouse1Text2:: ; a2352 (28:6352)
+_SaffronHouse1Text2::
text "PIDGEY: Kurukkoo!@@"
-_SaffronHouse1Text3:: ; a2366 (28:6366)
+_SaffronHouse1Text3::
text "The COPYCAT is"
line "cute! I'm getting"
cont "her a # DOLL!"
done
-_SaffronHouse1Text4:: ; a2395 (28:6395)
+_SaffronHouse1Text4::
text "I was given a PP"
line "UP as a gift."
diff --git a/text/maps/saffron_mart.asm b/text/maps/saffron_mart.asm
index 703e9b0a..29c34a1c 100644
--- a/text/maps/saffron_mart.asm
+++ b/text/maps/saffron_mart.asm
@@ -1,4 +1,4 @@
-_SaffronMartText2:: ; a23e3 (28:63e3)
+_SaffronMartText2::
text "MAX REPEL lasts"
line "longer than SUPER"
cont "REPEL for keeping"
@@ -6,7 +6,7 @@ _SaffronMartText2:: ; a23e3 (28:63e3)
cont "away!"
done
-_SaffronMartText3:: ; a242a (28:642a)
+_SaffronMartText3::
text "REVIVE is costly,"
line "but it revives"
cont "fainted #MON!"
diff --git a/text/maps/saffron_pokecenter.asm b/text/maps/saffron_pokecenter.asm
index 71aad5e6..9202af9b 100644
--- a/text/maps/saffron_pokecenter.asm
+++ b/text/maps/saffron_pokecenter.asm
@@ -1,10 +1,10 @@
-_SaffronPokecenterText1:: ; a248e (28:648e)
+_SaffronPokecenterText1::
text "#MON growth"
line "rates differ from"
cont "specie to specie."
done
-_SaffronPokecenterText3:: ; a24bf (28:64bf)
+_SaffronPokecenterText3::
text "SILPH CO. is very"
line "famous. That's"
cont "why it attracted"
diff --git a/text/maps/school.asm b/text/maps/school.asm
index 9bdd9004..f6041e0d 100644
--- a/text/maps/school.asm
+++ b/text/maps/school.asm
@@ -1,18 +1,10 @@
-_SchoolText1:: ; 95d15 (25:5d15)
+_SchoolText1::
text "Whew! I'm trying"
line "to memorize all"
cont "my notes."
done
-IF DEF(_YELLOW)
-_SchoolText3::
- text "Sis says #MON"
- line "will become tame"
- cont "if you treat them"
- cont "nicely."
-ENDC
-
-_SchoolText2:: ; 95d40 (25:5d40)
+_SchoolText2::
text "Okay!"
para "Be sure to read"
diff --git a/text/maps/seafoam_islands_b4f.asm b/text/maps/seafoam_islands_b4f.asm
index 429f426b..c4649f4f 100644
--- a/text/maps/seafoam_islands_b4f.asm
+++ b/text/maps/seafoam_islands_b4f.asm
@@ -1,13 +1,13 @@
-_SeafoamIslands5BattleText2:: ; 88075 (22:4075)
+_SeafoamIslands5BattleText2::
text "Gyaoo!@@"
-_SeafoamIslands5Text4:: ; 8807e (22:407e)
+_SeafoamIslands5Text4::
text "Boulders might"
line "change the flow"
cont "of water!"
done
-_SeafoamIslands5Text5:: ; 880a8 (22:40a8)
+_SeafoamIslands5Text5::
text "DANGER"
line "Fast current!"
done
diff --git a/text/maps/silph_co_10f.asm b/text/maps/silph_co_10f.asm
index 75aa6003..e916c64a 100644
--- a/text/maps/silph_co_10f.asm
+++ b/text/maps/silph_co_10f.asm
@@ -1,68 +1,42 @@
-_SilphCo10Text_5a1d3:: ; 84d8d (21:4d8d)
+_SilphCo10Text_5a1d3::
text "Waaaaa!"
cont "I'm scared!"
done
-_SilphCo10Text_5a1d8:: ; 84da1 (21:4da1)
+_SilphCo10Text_5a1d8::
text "Please keep quiet"
line "about my crying!"
done
-_SilphCo10BattleText1:: ; 84dc5 (21:4dc5)
+_SilphCo10BattleText1::
text "Welcome to the"
line "10F! So good of"
cont "you to join me!"
done
-_SilphCo10EndBattleText1:: ; 84df5 (21:4df5)
+_SilphCo10EndBattleText1::
text "I'm"
line "stunned!"
prompt
-_SilphCo10AfterBattleText1:: ; 84e02 (21:4e02)
+_SilphCo10AfterBattleText1::
text "Nice try, but the"
line "boardroom is up"
cont "one more floor!"
done
-_SilphCo10BattleText2:: ; 84e35 (21:4e35)
+_SilphCo10BattleText2::
text "Enough of your"
line "silly games!"
done
-_SilphCo10EndBattleText2:: ; 84e52 (21:4e52)
+_SilphCo10EndBattleText2::
text "No"
line "continues left!"
prompt
-_SilphCo10AfterBattleText2:: ; 84e66 (21:4e66)
+_SilphCo10AfterBattleText2::
text "Are you satisfied"
line "with beating me?"
cont "Then go on home!"
done
-
-IF DEF(_YELLOW)
-_SilphCoJessieJamesText1::
- text "Hold it right"
- line "there, brat!@@"
-
-_SilphCoJessieJamesText2::
- text "Our BOSS is in a"
- line "meeting!"
-
- para "You better not"
- line "disturb him!"
- done
-
-_SilphCoJessieJamesText3::
- text "Like"
- line "always..."
- prompt
-
-_SilphCoJessieJamesText4::
- text "TEAM ROCKET, blast"
- line "off at the speed"
- cont "of light!"
-
- para "Again...@@"
-ENDC
diff --git a/text/maps/silph_co_11f.asm b/text/maps/silph_co_11f.asm
index 3dbeee95..2986f3af 100644
--- a/text/maps/silph_co_11f.asm
+++ b/text/maps/silph_co_11f.asm
@@ -1,4 +1,4 @@
-_SilphCoPresidentText:: ; 84e9b (21:4e9b)
+_SilphCoPresidentText::
text "PRESIDENT: Thank"
line "you for saving"
cont "SILPH!"
@@ -19,13 +19,13 @@ _SilphCoPresidentText:: ; 84e9b (21:4e9b)
line "will do!"
prompt
-_ReceivedSilphCoMasterBallText:: ; 84f63 (21:4f63)
+_ReceivedSilphCoMasterBallText::
text $52, " got a"
line "@"
TX_RAM wcf4b
text "!@@"
-_SilphCo10Text_6231c:: ; 84f74 (21:4f74)
+_SilphCo10Text_6231c::
text "PRESIDENT: You"
line "can't buy that"
cont "anywhere!"
@@ -43,12 +43,12 @@ _SilphCo10Text_6231c:: ; 84f74 (21:4f74)
cont "it, though."
done
-_SilphCoMasterBallNoRoomText:: ; 85013 (21:5013)
+_SilphCoMasterBallNoRoomText::
text "You have no"
line "room for this."
done
-_SilphCo11Text2:: ; 8502f (21:502f)
+_SilphCo11Text2::
text "SECRETARY: Thank"
line "you for rescuing"
cont "all of us!"
@@ -57,12 +57,8 @@ _SilphCo11Text2:: ; 8502f (21:502f)
line "courage."
done
-_SilphCo11Text3:: ; 85075 (21:5075)
-IF DEF(_YELLOW)
- text "Ah, ", $52, "!"
-ELSE
+_SilphCo11Text3::
text "Ah ", $52, "!"
-ENDC
line "So we meet again!"
para "The PRESIDENT and"
@@ -74,20 +70,16 @@ ENDC
line "out of grown-up"
cont "matters..."
-IF DEF(_YELLOW)
- para "or, experience a"
-ELSE
para "Or, experience a"
-ENDC
line "world of pain!"
done
-_SilphCo10Text_62330:: ; 85119 (21:5119)
+_SilphCo10Text_62330::
text "Arrgh!!"
line "I lost again!?"
prompt
-_SilphCo10Text_62335:: ; 85131 (21:5131)
+_SilphCo10Text_62335::
text "Blast it all!"
line "You ruined our"
cont "plans for SILPH!"
@@ -104,39 +96,39 @@ _SilphCo10Text_62335:: ; 85131 (21:5131)
line "shall return!"
done
-_SilphCo11BattleText1:: ; 851d6 (21:51d6)
+_SilphCo11BattleText1::
text "Stop right there!"
line "Don't you move!"
done
-_SilphCo11EndBattleText1:: ; 851f8 (21:51f8)
+_SilphCo11EndBattleText1::
text "Don't..."
line "Please!"
prompt
-_SilphCo11AfterBattleText1:: ; 85209 (21:5209)
+_SilphCo11AfterBattleText1::
text "So, you want to"
line "see my BOSS?"
done
-_SilphCo11BattleText2:: ; 85227 (21:5227)
+_SilphCo11BattleText2::
text "Halt! Do you have"
line "an appointment"
cont "with my BOSS?"
done
-_SilphCo11EndBattleText2:: ; 85257 (21:5257)
+_SilphCo11EndBattleText2::
text "Gaah!"
line "Demolished!"
prompt
-_SilphCo11AfterBattleText2:: ; 8526a (21:526a)
+_SilphCo11AfterBattleText2::
text "Watch your step,"
line "my BOSS likes his"
cont "#MON tough!"
done
-_SilphCo10Text_6237b:: ; 8529a (21:529a)
+_SilphCo10Text_6237b::
text "The monitor has"
line "#MON on it!"
done
diff --git a/text/maps/silph_co_1f.asm b/text/maps/silph_co_1f.asm
index fb25635d..ca166d31 100644
--- a/text/maps/silph_co_1f.asm
+++ b/text/maps/silph_co_1f.asm
@@ -1,4 +1,4 @@
-_SilphCo1Text1:: ; a245a (28:645a)
+_SilphCo1Text1::
text "Welcome!"
para "The PRESIDENT is"
diff --git a/text/maps/silph_co_2f.asm b/text/maps/silph_co_2f.asm
index 4437880c..819a08c1 100644
--- a/text/maps/silph_co_2f.asm
+++ b/text/maps/silph_co_2f.asm
@@ -1,4 +1,4 @@
-_SilphCo2Text_59ded:: ; 82454 (20:6454)
+_SilphCo2Text_59ded::
text "Eeek!"
line "No! Stop! Help!"
@@ -9,13 +9,13 @@ _SilphCo2Text_59ded:: ; 82454 (20:6454)
cont "please take this!"
prompt
-_ReceivedTM36Text:: ; 824ba (20:64ba)
+_ReceivedTM36Text::
text $52, " got"
line "@"
TX_RAM wcf4b
text "!@@"
-_TM36ExplanationText:: ; 824c9 (20:64c9)
+_TM36ExplanationText::
text "TM36 is"
line "SELFDESTRUCT!"
@@ -25,58 +25,54 @@ _TM36ExplanationText:: ; 824c9 (20:64c9)
cont "Be careful."
done
-_TM36NoRoomText:: ; 8251c (20:651c)
+_TM36NoRoomText::
text "You don't have any"
line "room for this."
done
-_SilphCo2BattleText1:: ; 8253e (20:653e)
+_SilphCo2BattleText1::
text "Help! I'm a SILPH"
line "employee."
done
-_SilphCo2EndBattleText1:: ; 8255a (20:655a)
+_SilphCo2EndBattleText1::
text "How"
line "did you know I"
cont "was a ROCKET?"
prompt
-_SilphCo2AfterBattleText1:: ; 8257c (20:657c)
+_SilphCo2AfterBattleText1::
text "I work for both"
line "SILPH and TEAM"
cont "ROCKET!"
done
-_SilphCo2BattleText2:: ; 825a4 (20:65a4)
+_SilphCo2BattleText2::
text "It's off limits"
line "here! Go home!"
done
-_SilphCo2EndBattleText2:: ; 825c3 (20:65c3)
+_SilphCo2EndBattleText2::
text "You're"
line "good."
prompt
-_SilphCo2AfterBattleText2:: ; 825d0 (20:65d0)
+_SilphCo2AfterBattleText2::
text "Can you solve the"
line "maze in here?"
done
-_SilphCo2BattleText3:: ; 825f1 (20:65f1)
+_SilphCo2BattleText3::
text "No kids are"
line "allowed in here!"
done
-_SilphCo2EndBattleText3:: ; 8260f (20:660f)
+_SilphCo2EndBattleText3::
text "Tough!"
prompt
-_SilphCo2AfterBattleText3:: ; 82617 (20:6617)
-IF DEF(_YELLOW)
- text "Diamond-shaped"
-ELSE
+_SilphCo2AfterBattleText3::
text "Diamond shaped"
-ENDC
line "tiles are"
cont "teleport blocks!"
@@ -84,16 +80,16 @@ ENDC
line "transporters!"
done
-_SilphCo2BattleText4:: ; 8265f (20:665f)
+_SilphCo2BattleText4::
text "Hey kid! What are"
line "you doing here?"
done
-_SilphCo2EndBattleText4:: ; 82682 (20:6682)
+_SilphCo2EndBattleText4::
text "I goofed!"
prompt
-_SilphCo2AfterBattleText4:: ; 8268d (20:668d)
+_SilphCo2AfterBattleText4::
text "SILPH CO. will"
line "be merged with"
cont "TEAM ROCKET!"
diff --git a/text/maps/silph_co_3f.asm b/text/maps/silph_co_3f.asm
index 25d68018..0374482d 100644
--- a/text/maps/silph_co_3f.asm
+++ b/text/maps/silph_co_3f.asm
@@ -1,42 +1,42 @@
-_SilphCo3Text_59ff9:: ; 826b9 (20:66b9)
+_SilphCo3Text_59ff9::
text "I work for SILPH."
line "What should I do?"
done
-_SilphCo3Text_59ffe:: ; 826de (20:66de)
+_SilphCo3Text_59ffe::
text $52, "! You and"
line "your #MON"
cont "saved us!"
done
-_SilphCo3BattleText1:: ; 826fe (20:66fe)
+_SilphCo3BattleText1::
text "Quit messing with"
line "us, kid!"
done
-_SilphCo3EndBattleText1:: ; 8271a (20:671a)
+_SilphCo3EndBattleText1::
text "I give"
line "up!"
prompt
-_SilphCo3AfterBattleText1:: ; 82726 (20:6726)
+_SilphCo3AfterBattleText1::
text "A hint? You can"
line "open doors with a"
cont "CARD KEY!"
done
-_SilphCo3BattleText2:: ; 82753 (20:6753)
+_SilphCo3BattleText2::
text "I support TEAM"
line "ROCKET more than"
cont "I support SILPH!"
done
-_SilphCo3EndBattleText2:: ; 82785 (20:6785)
+_SilphCo3EndBattleText2::
text "You"
line "really got me!"
prompt
-_SilphCo3AfterBattleText2:: ; 82799 (20:6799)
+_SilphCo3AfterBattleText2::
text "Humph..."
para "TEAM ROCKET said"
diff --git a/text/maps/silph_co_4f.asm b/text/maps/silph_co_4f.asm
index 309da28c..19494482 100644
--- a/text/maps/silph_co_4f.asm
+++ b/text/maps/silph_co_4f.asm
@@ -1,56 +1,56 @@
-_SilphCo4Text_19de0:: ; 827e4 (20:67e4)
+_SilphCo4Text_19de0::
text "Sssh! Can't you"
line "see I'm hiding?"
done
-_SilphCo4Text_19de5:: ; 82803 (20:6803)
+_SilphCo4Text_19de5::
text "Huh? TEAM ROCKET"
line "is gone?"
done
-_SilphCo4BattleText2:: ; 8281e (20:681e)
+_SilphCo4BattleText2::
text "TEAM ROCKET has"
line "taken command of"
cont "SILPH CO.!"
done
-_SilphCo4EndBattleText2:: ; 8284b (20:684b)
+_SilphCo4EndBattleText2::
text "Arrgh!"
prompt
-_SilphCo4AfterBattleText2:: ; 82853 (20:6853)
+_SilphCo4AfterBattleText2::
text "Fwahahaha!"
line "My BOSS has been"
cont "after this place!"
done
-_SilphCo4BattleText3:: ; 82882 (20:6882)
+_SilphCo4BattleText3::
text "My #MON are my"
line "loyal soldiers!"
done
-_SilphCo4EndBattleText3:: ; 828a2 (20:68a2)
+_SilphCo4EndBattleText3::
text "Darn!"
line "You weak #MON!"
prompt
-_SilphCo4AfterBattleText3:: ; 828b8 (20:68b8)
+_SilphCo4AfterBattleText3::
text "The doors are"
line "electronically"
cont "locked! A CARD"
cont "KEY opens them!"
done
-_SilphCo4BattleText4:: ; 828f5 (20:68f5)
+_SilphCo4BattleText4::
text "Intruder spotted!"
done
-_SilphCo4EndBattleText4:: ; 82908 (20:6908)
+_SilphCo4EndBattleText4::
text "Who"
line "are you?"
prompt
-_SilphCo4AfterBattleText4:: ; 82916 (20:6916)
+_SilphCo4AfterBattleText4::
text "I better tell the"
line "BOSS on 11F!"
done
diff --git a/text/maps/silph_co_5f_1.asm b/text/maps/silph_co_5f_1.asm
index 7435c910..dab42539 100644
--- a/text/maps/silph_co_5f_1.asm
+++ b/text/maps/silph_co_5f_1.asm
@@ -1,56 +1,51 @@
-_SilphCo5Text_1a010:: ; 82936 (20:6936)
+_SilphCo5Text_1a010::
text "TEAM ROCKET is"
line "in an uproar over"
cont "some intruder."
cont "That's you right?"
done
-_SilphCo5Text_1a015:: ; 82978 (20:6978)
+_SilphCo5Text_1a015::
text "TEAM ROCKET took"
line "off! You're our"
cont "hero! Thank you!"
done
-_SilphCo5BattleText2:: ; 829aa (20:69aa)
+_SilphCo5BattleText2::
text "I heard a kid was"
line "wandering around."
done
-_SilphCo5EndBattleText2:: ; 829cf (20:69cf)
+_SilphCo5EndBattleText2::
text "Boom!"
prompt
-_SilphCo5AfterBattleText2:: ; 829d6 (20:69d6)
+_SilphCo5AfterBattleText2::
text "It's not smart"
line "to pick a fight"
cont "with TEAM ROCKET!"
done
-_SilphCo5BattleText3:: ; 82a07 (20:6a07)
+_SilphCo5BattleText3::
text "We study #"
line "BALL technology"
cont "on this floor!"
done
-_SilphCo5EndBattleText3:: ; 82a32 (20:6a32)
+_SilphCo5EndBattleText3::
text "Dang!"
line "Blast it!"
prompt
-_SilphCo5AfterBattleText3:: ; 82a43 (20:6a43)
+_SilphCo5AfterBattleText3::
text "We worked on the"
line "ultimate #"
cont "BALL which would"
cont "catch anything!"
done
-_SilphCo5BattleText4:: ; 82a81 (20:6a81)
+_SilphCo5BattleText4::
text "Whaaat? There"
line "shouldn't be any"
-IF DEF(_YELLOW)
- cont "children here!"
-ELSE
cont "children here?"
-ENDC
done
-
diff --git a/text/maps/silph_co_5f_2.asm b/text/maps/silph_co_5f_2.asm
index bb94eb6b..da0c6e6f 100644
--- a/text/maps/silph_co_5f_2.asm
+++ b/text/maps/silph_co_5f_2.asm
@@ -1,32 +1,32 @@
-_SilphCo5EndBattleText4:: ; 84000 (21:4000)
+_SilphCo5EndBattleText4::
text "Oh"
line "goodness!"
prompt
-_SilphCo5AfterBattleText4:: ; 8400e (21:400e)
+_SilphCo5AfterBattleText4::
text "You're only on 5F."
line "It's a long way"
cont "to my BOSS!"
done
-_SilphCo5BattleText5:: ; 8403c (21:403c)
+_SilphCo5BattleText5::
text "Show TEAM ROCKET"
line "a little respect!"
done
-_SilphCo5EndBattleText5:: ; 84060 (21:4060)
+_SilphCo5EndBattleText5::
text "Cough..."
line "Cough..."
prompt
-_SilphCo5AfterBattleText5:: ; 84073 (21:4073)
+_SilphCo5AfterBattleText5::
text "Which reminds me."
para "KOFFING evolves"
line "into WEEZING!"
done
-_SilphCo5Text9:: ; 840a4 (21:40a4)
+_SilphCo5Text9::
text "It's a #MON"
line "REPORT!"
@@ -36,7 +36,7 @@ _SilphCo5Text9:: ; 840a4 (21:40a4)
cont "reality #MON."
done
-_SilphCo5Text10:: ; 840f2 (21:40f2)
+_SilphCo5Text10::
text "It's a #MON"
line "REPORT!"
@@ -45,7 +45,7 @@ _SilphCo5Text10:: ; 840f2 (21:40f2)
cont "been confirmed."
done
-_SilphCo5Text11:: ; 84134 (21:4134)
+_SilphCo5Text11::
text "It's a #MON"
line "REPORT!"
diff --git a/text/maps/silph_co_6f.asm b/text/maps/silph_co_6f.asm
index b3bf71b6..b3a38aa0 100644
--- a/text/maps/silph_co_6f.asm
+++ b/text/maps/silph_co_6f.asm
@@ -1,77 +1,77 @@
-_SilphCo6Text_1a24a:: ; 84176 (21:4176)
+_SilphCo6Text_1a24a::
text "The ROCKETs came"
line "and took over the"
cont "building!"
done
-_SilphCo6Text_1a24f:: ; 841a4 (21:41a4)
+_SilphCo6Text_1a24f::
text "Well, better get"
line "back to work!"
done
-_SilphCo6Text_1a261:: ; 841c4 (21:41c4)
+_SilphCo6Text_1a261::
text "Oh dear, oh dear."
line "Help me please!"
done
-_SilphCo6Text_1a266:: ; 841e7 (21:41e7)
+_SilphCo6Text_1a266::
text "We got engaged!"
line "Heheh!"
done
-_SilphCo6Text_1a278:: ; 841ff (21:41ff)
+_SilphCo6Text_1a278::
text "Look at him! He's"
line "such a coward!"
done
-_SilphCo6Text_1a27d:: ; 84220 (21:4220)
+_SilphCo6Text_1a27d::
text "I feel so sorry"
line "for him, I have"
cont "to marry him!"
done
-_SilphCo6Text_1a28f:: ; 8424f (21:424f)
+_SilphCo6Text_1a28f::
text "TEAM ROCKET is"
line "trying to conquer"
cont "the world with"
cont "#MON!"
done
-_SilphCo6Text_1a294:: ; 84286 (21:4286)
+_SilphCo6Text_1a294::
text "TEAM ROCKET ran"
line "because of you!"
done
-_SilphCo6Text_1a2a6:: ; 842a7 (21:42a7)
+_SilphCo6Text_1a2a6::
text "They must have"
line "targeted SILPH"
cont "for our #MON"
cont "products."
done
-_SilphCo6Text_1a2ab:: ; 842dd (21:42dd)
+_SilphCo6Text_1a2ab::
text "Come work for"
line "SILPH when you"
cont "get older!"
done
-_SilphCo6BattleText2:: ; 84306 (21:4306)
+_SilphCo6BattleText2::
text "I am one of the 4"
line "ROCKET BROTHERS!"
done
-_SilphCo6EndBattleText2:: ; 8432a (21:432a)
+_SilphCo6EndBattleText2::
text "Flame"
line "out!"
prompt
-_SilphCo6AfterBattleText2:: ; 84336 (21:4336)
+_SilphCo6AfterBattleText2::
text "No matter!"
line "My brothers will"
cont "avenge me!"
done
-_SilphCo6BattleText3:: ; 8435e (21:435e)
+_SilphCo6BattleText3::
text "That rotten"
line "PRESIDENT!"
@@ -80,27 +80,27 @@ _SilphCo6BattleText3:: ; 8435e (21:435e)
cont "TIKSI BRANCH!"
done
-_SilphCo6EndBattleText3:: ; 843a4 (21:43a4)
+_SilphCo6EndBattleText3::
text "Shoot!"
prompt
-_SilphCo6AfterBattleText3:: ; 843ac (21:43ac)
+_SilphCo6AfterBattleText3::
text "TIKSI BRANCH?"
line "It's in Russian"
cont "no man's land!"
done
-_SilphCo6BattleText4:: ; 843d8 (21:43d8)
+_SilphCo6BattleText4::
text "You dare betray"
line "TEAM ROCKET?"
done
-_SilphCo6EndBattleText4:: ; 843f6 (21:43f6)
+_SilphCo6EndBattleText4::
text "You"
line "traitor!"
prompt
-_SilphCo6AfterBattleText4:: ; 84404 (21:4404)
+_SilphCo6AfterBattleText4::
text "If you stand for"
line "justice, you"
cont "betray evil!"
diff --git a/text/maps/silph_co_7f.asm b/text/maps/silph_co_7f.asm
index 5b56ad43..f29c16bc 100644
--- a/text/maps/silph_co_7f.asm
+++ b/text/maps/silph_co_7f.asm
@@ -78,82 +78,78 @@ _SilphCo7Text_51e4b::
line "Oh thank you!"
done
-_SilphCo7BattleText1:: ; 846ff (21:46ff)
-IF DEF(_YELLOW)
- text "Aha! I smell a"
-ELSE
+_SilphCo7BattleText1::
text "Oh ho! I smell a"
-ENDC
line "little rat!"
done
-_SilphCo7EndBattleText1:: ; 8471d (21:471d)
+_SilphCo7EndBattleText1::
text "Lights"
line "out!"
prompt
-_SilphCo7AfterBattleText1:: ; 8472a (21:472a)
+_SilphCo7AfterBattleText1::
text "You won't find my"
line "BOSS by just"
cont "scurrying around!"
done
-_SilphCo7BattleText2:: ; 8475b (21:475b)
+_SilphCo7BattleText2::
text "Heheh!"
para "You mistook me for"
line "a SILPH worker?"
done
-_SilphCo7EndBattleText2:: ; 84786 (21:4786)
+_SilphCo7EndBattleText2::
text "I'm"
line "done!"
prompt
-_SilphCo7AfterBattleText2:: ; 84790 (21:4790)
+_SilphCo7AfterBattleText2::
text "Despite your age,"
line "you are a skilled"
cont "trainer!"
done
-_SilphCo7BattleText3:: ; 847be (21:47be)
+_SilphCo7BattleText3::
text "I am one of the 4"
line "ROCKET BROTHERS!"
done
-_SilphCo7EndBattleText3:: ; 847e2 (21:47e2)
+_SilphCo7EndBattleText3::
text "Aack!"
line "Brothers, I lost!"
prompt
-_SilphCo7AfterBattleText3:: ; 847fb (21:47fb)
+_SilphCo7AfterBattleText3::
text "Doesn't matter."
line "My brothers will"
cont "repay the favor!"
done
-_SilphCo7BattleText4:: ; 8482d (21:482d)
+_SilphCo7BattleText4::
text "A child intruder?"
line "That must be you!"
done
-_SilphCo7EndBattleText4:: ; 84852 (21:4852)
+_SilphCo7EndBattleText4::
text "Fine!"
line "I lost!"
prompt
-_SilphCo7AfterBattleText4:: ; 84861 (21:4861)
+_SilphCo7AfterBattleText4::
text "Go on home"
line "before my BOSS"
cont "gets ticked off!"
done
-_SilphCo7Text_51ebe:: ; 8488d (21:488d)
+_SilphCo7Text_51ebe::
text $53, ": What"
line "kept you ", $52, "?"
done
-_SilphCo7Text_51ec3:: ; 848a2 (21:48a2)
+_SilphCo7Text_51ec3::
text $53, ": Hahaha!"
line "I thought you'd"
cont "turn up if I"
@@ -170,17 +166,13 @@ _SilphCo7Text_51ec3:: ; 848a2 (21:48a2)
cont "you got better!"
done
-_SilphCo7Text_51ec8:: ; 8494a (21:494a)
-IF DEF(_YELLOW)
- text "Oh-oh!"
-ELSE
+_SilphCo7Text_51ec8::
text "Oh ho!"
-ENDC
line "So, you are ready"
cont "for BOSS ROCKET!"
prompt
-_SilphCo7Text_51ecd:: ; 84975 (21:4975)
+_SilphCo7Text_51ecd::
text $53, ": How can"
line "I put this?"
@@ -189,7 +181,7 @@ _SilphCo7Text_51ecd:: ; 84975 (21:4975)
cont "with us big boys!"
prompt
-_SilphCo7Text_51ed2:: ; 849bd (21:49bd)
+_SilphCo7Text_51ed2::
text "Well, ", $52, "!"
para "I'm moving on up"
diff --git a/text/maps/silph_co_8f.asm b/text/maps/silph_co_8f.asm
index 900e134f..898c0600 100644
--- a/text/maps/silph_co_8f.asm
+++ b/text/maps/silph_co_8f.asm
@@ -1,56 +1,56 @@
-_SilphCo8Text_565be:: ; 84ac4 (21:4ac4)
+_SilphCo8Text_565be::
text "I wonder if SILPH"
line "is finished..."
done
-_SilphCo8Text_565c3:: ; 84ae6 (21:4ae6)
+_SilphCo8Text_565c3::
text "Thanks for saving"
line "us!"
done
-_SilphCo8BattleText1:: ; 84afd (21:4afd)
+_SilphCo8BattleText1::
text "That's as far as"
line "you'll go!"
done
-_SilphCo8EndBattleText1:: ; 84b18 (21:4b18)
+_SilphCo8EndBattleText1::
text "Not"
line "enough grit!"
prompt
-_SilphCo8AfterBattleText1:: ; 84b2a (21:4b2a)
+_SilphCo8AfterBattleText1::
text "If you don't turn"
line "back, I'll call"
cont "for backup!"
done
-_SilphCo8BattleText2:: ; 84b57 (21:4b57)
+_SilphCo8BattleText2::
text "You're causing us"
line "problems!"
done
-_SilphCo8EndBattleText2:: ; 84b73 (21:4b73)
+_SilphCo8EndBattleText2::
text "Huh?"
line "I lost?"
prompt
-_SilphCo8AfterBattleText2:: ; 84b81 (21:4b81)
+_SilphCo8AfterBattleText2::
text "So, what do you"
line "think of SILPH"
cont "BUILDING's maze?"
done
-_SilphCo8BattleText3:: ; 84bb1 (21:4bb1)
+_SilphCo8BattleText3::
text "I am one of the 4"
line "ROCKET BROTHERS!"
done
-_SilphCo8EndBattleText3:: ; 84bd5 (21:4bd5)
+_SilphCo8EndBattleText3::
text "Whoo!"
line "Oh brothers!"
prompt
-_SilphCo8AfterBattleText3:: ; 84be9 (21:4be9)
+_SilphCo8AfterBattleText3::
text "I'll leave you up"
line "to my brothers!"
done
diff --git a/text/maps/silph_co_9f.asm b/text/maps/silph_co_9f.asm
index 6854b081..f01ffb7b 100644
--- a/text/maps/silph_co_9f.asm
+++ b/text/maps/silph_co_9f.asm
@@ -1,62 +1,62 @@
-_SilphCo9Text_5d8e5:: ; 84c0b (21:4c0b)
+_SilphCo9Text_5d8e5::
text "You look tired!"
line "You should take a"
cont "quick nap!"
prompt
-_SilphCo9Text_5d8ea:: ; 84c39 (21:4c39)
+_SilphCo9Text_5d8ea::
text "Don't give up!"
done
-_SilphCo9Text_5d8ef:: ; 84c48 (21:4c48)
+_SilphCo9Text_5d8ef::
text "Thank you so"
line "much!"
done
-_SilphCo9BattleText1:: ; 84c5c (21:4c5c)
+_SilphCo9BattleText1::
text "Your #MON seem"
line "to adore you, kid!"
done
-_SilphCo9EndBattleText1:: ; 84c7f (21:4c7f)
+_SilphCo9EndBattleText1::
text "Ghaaah!"
prompt
-_SilphCo9AfterBattleText1:: ; 84c88 (21:4c88)
+_SilphCo9AfterBattleText1::
text "If I had started"
line "as a trainer at"
cont "your age..."
done
-_SilphCo9BattleText2:: ; 84cb6 (21:4cb6)
+_SilphCo9BattleText2::
text "Your #MON have"
line "weak points! I"
cont "can nail them!"
done
-_SilphCo9EndBattleText2:: ; 84ce4 (21:4ce4)
+_SilphCo9EndBattleText2::
text "You"
line "hammered me!"
prompt
-_SilphCo9AfterBattleText2:: ; 84cf6 (21:4cf6)
+_SilphCo9AfterBattleText2::
text "Exploiting weak"
line "spots does work!"
cont "Think about"
cont "element types!"
done
-_SilphCo9BattleText3:: ; 84d33 (21:4d33)
+_SilphCo9BattleText3::
text "I am one of the 4"
line "ROCKET BROTHERS!"
done
-_SilphCo9EndBattleText3:: ; 84d57 (21:4d57)
+_SilphCo9EndBattleText3::
text "Warg!"
line "Brothers, I lost!"
prompt
-_SilphCo9AfterBattleText3:: ; 84d70 (21:4d70)
+_SilphCo9AfterBattleText3::
text "My brothers will"
line "avenge me!"
done
diff --git a/text/maps/ss_anne_1.asm b/text/maps/ss_anne_1.asm
index 2236ca52..6032b770 100644
--- a/text/maps/ss_anne_1.asm
+++ b/text/maps/ss_anne_1.asm
@@ -1,4 +1,4 @@
-_SSAnne1Text1:: ; 80c70 (20:4c70)
+_SSAnne1Text1::
text "Bonjour!"
line "I am le waiter on"
cont "this ship!"
@@ -11,7 +11,7 @@ _SSAnne1Text1:: ; 80c70 (20:4c70)
line "silent type!"
done
-_SSAnne1Text2:: ; 80ce6 (20:4ce6)
+_SSAnne1Text2::
text "The passengers"
line "are restless!"
diff --git a/text/maps/ss_anne_10.asm b/text/maps/ss_anne_10.asm
index cf1d0ce5..f1eb8a77 100644
--- a/text/maps/ss_anne_10.asm
+++ b/text/maps/ss_anne_10.asm
@@ -1,88 +1,88 @@
-_SSAnne10Text8:: ; 81aaa (20:5aaa)
+_SSAnne10Text8::
text "MACHOKE: Gwoh!"
line "Goggoh!@@"
-_SSAnne10BattleText1:: ; 81ac3 (20:5ac3)
+_SSAnne10BattleText1::
text "You know what they"
line "say about sailors"
cont "and fighting!"
done
-_SSAnne10EndBattleText1:: ; 81af7 (20:5af7)
+_SSAnne10EndBattleText1::
text "Right!"
line "Good fight, mate!"
prompt
-_SSAnne10AfterBattleText1:: ; 81b11 (20:5b11)
+_SSAnne10AfterBattleText1::
text "Haha! Want to be"
line "a sailor, mate?"
done
-_SSAnne10BattleText2:: ; 81b33 (20:5b33)
+_SSAnne10BattleText2::
text "My sailor's pride"
line "is at stake!"
done
-_SSAnne10EndBattleText2:: ; 81b52 (20:5b52)
+_SSAnne10EndBattleText2::
text "Your"
line "spirit sank me!"
prompt
-_SSAnne10AfterBattleText2:: ; 81b68 (20:5b68)
+_SSAnne10AfterBattleText2::
text "Did you see the"
line "FISHING GURU in"
cont "VERMILION CITY?"
done
-_SSAnne10BattleText3:: ; 81b99 (20:5b99)
+_SSAnne10BattleText3::
text "Us sailors have"
line "#MON too!"
done
-_SSAnne10EndBattleText3:: ; 81bb4 (20:5bb4)
+_SSAnne10EndBattleText3::
text "OK, "
line "you're not bad."
prompt
-_SSAnne10AfterBattleText3:: ; 81bc9 (20:5bc9)
+_SSAnne10AfterBattleText3::
text "We caught all our"
line "#MON while"
cont "out at sea!"
done
-_SSAnne10BattleText4:: ; 81bf3 (20:5bf3)
+_SSAnne10BattleText4::
text "I like feisty"
line "kids like you!@@"
-_SSAnne10EndBattleText4:: ; 81c12 (20:5c12)
+_SSAnne10EndBattleText4::
text "Argh!"
line "Lost it!"
prompt
-_SSAnne10AfterBattleText4:: ; 81c22 (20:5c22)
+_SSAnne10AfterBattleText4::
text "Sea #MON live"
line "in deep water."
cont "You'll need a ROD!"
done
-_SSAnne10BattleText5:: ; 81c52 (20:5c52)
+_SSAnne10BattleText5::
text "Matey, you're"
line "walking the plank"
cont "if you lose!"
done
-_SSAnne10EndBattleText5:: ; 81c7f (20:5c7f)
+_SSAnne10EndBattleText5::
text "Argh!"
line "Beaten by a kid!"
prompt
-_SSAnne10AfterBattleText5:: ; 81c97 (20:5c97)
+_SSAnne10AfterBattleText5::
text "Jellyfish some-"
line "times drift into"
cont "the ship."
done
-_SSAnne10BattleText6:: ; 81cc3 (20:5cc3)
+_SSAnne10BattleText6::
text "Hello stranger!"
line "Stop and chat!"
@@ -90,19 +90,19 @@ _SSAnne10BattleText6:: ; 81cc3 (20:5cc3)
line "are from the sea!"
done
-_SSAnne10EndBattleText6:: ; 81d01 (20:5d01)
+_SSAnne10EndBattleText6::
text "Darn!"
line "I let that one"
cont "get away!"
prompt
-_SSAnne10AfterBattleText6:: ; 81d21 (20:5d21)
+_SSAnne10AfterBattleText6::
text "I was going to"
line "make you my"
cont "assistant too!"
done
-_SSAnne10Text7:: ; 81d4c (20:5d4c)
+_SSAnne10Text7::
text "My buddy, MACHOKE,"
line "is super strong!"
diff --git a/text/maps/ss_anne_2.asm b/text/maps/ss_anne_2.asm
index 0a29f8e6..bd33b9d3 100644
--- a/text/maps/ss_anne_2.asm
+++ b/text/maps/ss_anne_2.asm
@@ -1,4 +1,4 @@
-_SSAnne2Text1:: ; 80d34 (20:4d34)
+_SSAnne2Text1::
text "This ship, she is"
line "a luxury liner"
cont "for trainers!"
@@ -8,7 +8,7 @@ _SSAnne2Text1:: ; 80d34 (20:4d34)
cont "invited trainers!"
done
-_SSAnneRivalBeforeBattleText:: ; 80d9a (20:4d9a)
+_SSAnneRivalBeforeBattleText::
text $53, ": Bonjour!"
line $52, "!"
@@ -31,7 +31,7 @@ _SSAnneRivalBeforeBattleText:: ; 80d9a (20:4d9a)
line "grassy areas!"
done
-_SSAnneRivalDefeatedText:: ; 80e57 (20:4e57)
+_SSAnneRivalDefeatedText::
text "Humph!"
para "At least you're"
@@ -39,7 +39,7 @@ _SSAnneRivalDefeatedText:: ; 80e57 (20:4e57)
cont "#MON!"
prompt
-_SSAnneRivalWonText:: ; 80e81 (20:4e81)
+_SSAnneRivalWonText::
text $52, "! What are"
line "you, seasick?"
@@ -47,7 +47,7 @@ _SSAnneRivalWonText:: ; 80e81 (20:4e81)
line "up, pal!"
prompt
-_SSAnneRivalCaptainText:: ; 80eb6 (20:4eb6)
+_SSAnneRivalCaptainText::
text $53, ": I heard"
line "there was a CUT"
cont "master on board."
diff --git a/text/maps/ss_anne_3.asm b/text/maps/ss_anne_3.asm
index de2c070d..8ac96d88 100644
--- a/text/maps/ss_anne_3.asm
+++ b/text/maps/ss_anne_3.asm
@@ -1,4 +1,4 @@
-_SSAnne3Text1:: ; 80f4b (20:4f4b)
+_SSAnne3Text1::
text "Our CAPTAIN is a"
line "sword master!"
diff --git a/text/maps/ss_anne_5.asm b/text/maps/ss_anne_5.asm
index 2fdc5dd8..b4935f5b 100644
--- a/text/maps/ss_anne_5.asm
+++ b/text/maps/ss_anne_5.asm
@@ -1,50 +1,50 @@
-_SSAnne5Text1:: ; 80f88 (20:4f88)
+_SSAnne5Text1::
text "The party's over."
line "The ship will be"
cont "departing soon."
done
-_SSAnne5Text2:: ; 80fbb (20:4fbb)
+_SSAnne5Text2::
text "Scrubbing decks"
line "is hard work!"
done
-_SSAnne5Text3:: ; 80fda (20:4fda)
+_SSAnne5Text3::
text "Urf. I feel ill."
para "I stepped out to"
line "get some air."
done
-_SSAnne5BattleText1:: ; 8100b (20:500b)
+_SSAnne5BattleText1::
text "Hey matey!"
para "Let's do a little"
line "jig!"
done
-_SSAnne5EndBattleText1:: ; 8102d (20:502d)
+_SSAnne5EndBattleText1::
text "You're"
line "impressive!"
prompt
-_SSAnne5AfterBattleText1:: ; 81040 (20:5040)
+_SSAnne5AfterBattleText1::
text "How many kinds of"
line "#MON do you"
cont "think there are?"
done
-_SSAnne5BattleText2:: ; 81070 (20:5070)
+_SSAnne5BattleText2::
text "Ahoy there!"
line "Are you seasick?"
done
-_SSAnne5EndBattleText2:: ; 8108e (20:508e)
+_SSAnne5EndBattleText2::
text "I was"
line "just careless!"
prompt
-_SSAnne5AfterBattleText2:: ; 810a4 (20:50a4)
+_SSAnne5AfterBattleText2::
text "My Pa said there"
line "are 100 kinds of"
cont "#MON. I think"
diff --git a/text/maps/ss_anne_6.asm b/text/maps/ss_anne_6.asm
index 59828a51..51c941a8 100644
--- a/text/maps/ss_anne_6.asm
+++ b/text/maps/ss_anne_6.asm
@@ -1,20 +1,20 @@
-_SSAnne6Text1:: ; 810e5 (20:50e5)
+_SSAnne6Text1::
text "You, mon petit!"
line "We're busy here!"
cont "Out of the way!"
done
-_SSAnne6Text2:: ; 81116 (20:5116)
+_SSAnne6Text2::
text "I saw an odd ball"
line "in the trash."
done
-_SSAnne6Text3:: ; 81137 (20:5137)
+_SSAnne6Text3::
text "I'm so busy I'm"
line "getting dizzy!"
done
-_SSAnne6Text4:: ; 81155 (20:5155)
+_SSAnne6Text4::
text "Hum-de-hum-de-"
line "ho..."
@@ -23,7 +23,7 @@ _SSAnne6Text4:: ; 81155 (20:5155)
cont "Hum-hum..."
done
-_SSAnne6Text5:: ; 8118e (20:518e)
+_SSAnne6Text5::
text "Did you hear about"
line "SNORLAX?"
@@ -31,7 +31,7 @@ _SSAnne6Text5:: ; 8118e (20:518e)
line "eat and sleep!"
done
-_SSAnne6Text6:: ; 811c9 (20:51c9)
+_SSAnne6Text6::
text "Snivel...Sniff..."
para "I only get to"
@@ -39,33 +39,29 @@ _SSAnne6Text6:: ; 811c9 (20:51c9)
cont "Snivel..."
done
-_SSAnne6Text_61807:: ; 81203 (20:5203)
+_SSAnne6Text_61807::
text "Er-hem! Indeed I"
line "am le CHEF!"
para "Le main course is"
prompt
-_SSAnne6Text_6180c:: ; 81233 (20:5233)
-IF DEF(_YELLOW)
- text "Salade de Salmon!"
-ELSE
+_SSAnne6Text_6180c::
text "Salmon du Salad!"
-ENDC
para "Les guests may"
line "gripe it's fish"
cont "again, however!"
done
-_SSAnne6Text_61811:: ; 81273 (20:5273)
+_SSAnne6Text_61811::
text "Eels au Barbecue!"
para "Les guests will"
line "mutiny, I fear."
done
-_SSAnne6Text_61816:: ; 812a6 (20:52a6)
+_SSAnne6Text_61816::
text "Prime Beef Steak!"
para "But, have I enough"
diff --git a/text/maps/ss_anne_7.asm b/text/maps/ss_anne_7.asm
index 2a770464..4687c421 100644
--- a/text/maps/ss_anne_7.asm
+++ b/text/maps/ss_anne_7.asm
@@ -1,4 +1,4 @@
-_SSAnne7RubText:: ; 812dd (20:52dd)
+_SSAnne7RubText::
text "CAPTAIN: Ooargh..."
line "I feel hideous..."
cont "Urrp! Seasick..."
@@ -10,7 +10,7 @@ _SSAnne7RubText:: ; 812dd (20:52dd)
para "Rub-rub..."
line "Rub-rub...@@"
-_ReceivingHM01Text:: ; 81347 (20:5347)
+_ReceivingHM01Text::
text "CAPTAIN: Whew!"
line "Thank you! I"
cont "feel much better!"
@@ -27,42 +27,34 @@ _ReceivingHM01Text:: ; 81347 (20:5347)
para "Teach it to your"
line "#MON and you"
cont "can see it CUT"
-IF DEF(_YELLOW)
- cont "anytime!"
-ELSE
cont "any time!"
-ENDC
prompt
-_ReceivedHM01Text:: ; 8140d (20:540d)
+_ReceivedHM01Text::
text $52, " got"
line "@"
TX_RAM wcf4b
text "!@@"
-_SSAnne7Text_61932:: ; 8141c (20:541c)
+_SSAnne7Text_61932::
text "CAPTAIN: Whew!"
para "Now that I'm not"
-IF DEF(_YELLOW)
- line "sick anymore, I"
-ELSE
line "sick any more, I"
-ENDC
cont "guess it's time."
done
-_HM01NoRoomText:: ; 8145d (20:545d)
+_HM01NoRoomText::
text "Oh no! You have"
line "no room for this!"
done
-_SSAnne7Text2:: ; 81480 (20:5480)
+_SSAnne7Text2::
text "Yuck! Shouldn't"
line "have looked!"
done
-_SSAnne7Text3:: ; 8149d (20:549d)
+_SSAnne7Text3::
text "How to Conquer"
line "Seasickness..."
cont "The CAPTAIN's"
diff --git a/text/maps/ss_anne_8.asm b/text/maps/ss_anne_8.asm
index c44ad605..393633e3 100644
--- a/text/maps/ss_anne_8.asm
+++ b/text/maps/ss_anne_8.asm
@@ -1,8 +1,8 @@
-_SSAnne8Text8:: ; 814d7 (20:54d7)
+_SSAnne8Text8::
text "WIGGLYTUFF: Puup"
line "pupuu!@@"
-_SSAnne8BattleText1:: ; 814f1 (20:54f1)
+_SSAnne8BattleText1::
text "I travel alone"
line "on my journeys!"
@@ -10,42 +10,42 @@ _SSAnne8BattleText1:: ; 814f1 (20:54f1)
line "only friends!"
done
-_SSAnne8EndBattleText1:: ; 8152e (20:552e)
+_SSAnne8EndBattleText1::
text "My, my"
line "friends..."
prompt
-_SSAnne8AfterBattleText1:: ; 81541 (20:5541)
+_SSAnne8AfterBattleText1::
text "You should be"
line "nice to friends!"
done
-_SSAnne8BattleText2:: ; 81561 (20:5561)
+_SSAnne8BattleText2::
text "You pup! How dare"
line "you barge in!"
done
-_SSAnne8EndBattleText2:: ; 81582 (20:5582)
+_SSAnne8EndBattleText2::
text "Humph!"
line "You rude child!"
prompt
-_SSAnne8AfterBattleText2:: ; 8159a (20:559a)
+_SSAnne8AfterBattleText2::
text "I wish to be left"
line "alone! Get out!"
done
-_SSAnne8BattleText3:: ; 815bd (20:55bd)
+_SSAnne8BattleText3::
text "I love #MON!"
line "Do you?"
done
-_SSAnne8EndBattleText3:: ; 815d3 (20:55d3)
+_SSAnne8EndBattleText3::
text "Wow! "
line "You're great!"
prompt
-_SSAnne8AfterBattleText3:: ; 815e7 (20:55e7)
+_SSAnne8AfterBattleText3::
text "Let me be your"
line "friend, OK?"
@@ -53,19 +53,19 @@ _SSAnne8AfterBattleText3:: ; 815e7 (20:55e7)
line "#MON!"
done
-_SSAnne8BattleText4:: ; 8161b (20:561b)
+_SSAnne8BattleText4::
text "I collected these"
line "#MON from all"
cont "around the world!"
done
-_SSAnne8EndBattleText4:: ; 8164e (20:564e)
+_SSAnne8EndBattleText4::
text "Oh no!"
line "I went around the"
cont "world for these!"
prompt
-_SSAnne8AfterBattleText4:: ; 81679 (20:5679)
+_SSAnne8AfterBattleText4::
text "You hurt my poor"
line "worldly #MON!"
@@ -74,28 +74,28 @@ _SSAnne8AfterBattleText4:: ; 81679 (20:5679)
cont "#MON CENTER!"
done
-_SSAnne8Text5:: ; 816c7 (20:56c7)
+_SSAnne8Text5::
text "Waiter, I would"
line "like a cherry pie"
cont "please!"
done
-_SSAnne8Text6:: ; 816f2 (20:56f2)
+_SSAnne8Text6::
text "A cruise is so"
line "elegant yet cozy!"
done
-_SSAnne8Text7:: ; 81714 (20:5714)
+_SSAnne8Text7::
text "I always travel"
line "with WIGGLYTUFF!"
done
-_SSAnne8Text9:: ; 81736 (20:5736)
+_SSAnne8Text9::
text "We are cruising"
line "around the world."
done
-_SSAnne8Text11:: ; 81759 (20:5759)
+_SSAnne8Text11::
text "Ssh! I'm a GLOBAL"
line "POLICE agent!"
diff --git a/text/maps/ss_anne_9.asm b/text/maps/ss_anne_9.asm
index c96a7581..efdc014a 100644
--- a/text/maps/ss_anne_9.asm
+++ b/text/maps/ss_anne_9.asm
@@ -1,9 +1,5 @@
-_SSAnne9Text_61bf2:: ; 81799 (20:5799)
-IF DEF(_YELLOW)
- text "In all my travels,"
-ELSE
+_SSAnne9Text_61bf2::
text "In all my travels"
-ENDC
line "I've never seen"
cont "any #MON sleep"
cont "like this one!"
@@ -12,19 +8,19 @@ ENDC
line "like this!"
prompt
-_SSAnne9Text_61c01:: ; 817f5 (20:57f5)
+_SSAnne9Text_61c01::
text "Ah yes, I have"
line "seen some #MON"
cont "ferry people"
cont "across the water!"
done
-_SSAnne9Text_61c10:: ; 81833 (20:5833)
+_SSAnne9Text_61c10::
text "#MON can CUT"
line "down small bushes."
done
-_SSAnne9Text_61c1f:: ; 81854 (20:5854)
+_SSAnne9Text_61c1f::
text "Have you gone to"
line "the SAFARI ZONE"
cont "in FUCHSIA CITY?"
@@ -33,51 +29,51 @@ _SSAnne9Text_61c1f:: ; 81854 (20:5854)
line "kinds of #MON!!"
done
-_SSAnne9Text_61c2e:: ; 818a8 (20:58a8)
+_SSAnne9Text_61c2e::
text "Me and my Daddy"
line "think the SAFARI"
cont "ZONE is awesome!"
done
-_SSAnne9Text_61c3d:: ; 818db (20:58db)
+_SSAnne9Text_61c3d::
text "The CAPTAIN looked"
line "really sick and"
cont "pale!"
done
-_SSAnne9Text_61c4c:: ; 81905 (20:5905)
+_SSAnne9Text_61c4c::
text "I hear many people"
line "get seasick!"
done
-_SSAnne9BattleText1:: ; 81926 (20:5926)
+_SSAnne9BattleText1::
text "Competing against"
line "the young keeps"
cont "me youthful."
done
-_SSAnne9EndBattleText1:: ; 81956 (20:5956)
+_SSAnne9EndBattleText1::
text "Good"
line "fight! Ah, I feel"
cont "young again!"
prompt
-_SSAnne9AfterBattleText1:: ; 8197b (20:597b)
+_SSAnne9AfterBattleText1::
text "15 years ago, I"
line "would have won!"
done
-_SSAnne9BattleText2:: ; 8199c (20:599c)
+_SSAnne9BattleText2::
text "Check out what I"
line "fished up!"
done
-_SSAnne9EndBattleText2:: ; 819b9 (20:59b9)
+_SSAnne9EndBattleText2::
text "I'm"
line "all out!"
prompt
-_SSAnne9AfterBattleText2:: ; 819c6 (20:59c6)
+_SSAnne9AfterBattleText2::
text "Party?"
para "The cruise ship's"
@@ -85,33 +81,33 @@ _SSAnne9AfterBattleText2:: ; 819c6 (20:59c6)
cont "over by now."
done
-_SSAnne9BattleText3:: ; 819fc (20:59fc)
+_SSAnne9BattleText3::
text "Which do you like,"
line "a strong or a"
cont "rare #MON?"
done
-_SSAnne9EndBattleText3:: ; 81a29 (20:5a29)
+_SSAnne9EndBattleText3::
text "I must"
line "salute you!"
prompt
-_SSAnne9AfterBattleText3:: ; 81a3d (20:5a3d)
+_SSAnne9AfterBattleText3::
text "I prefer strong"
line "and rare #MON."
done
-_SSAnne9BattleText4:: ; 81a5d (20:5a5d)
+_SSAnne9BattleText4::
text "I never saw you"
line "at the party."
done
-_SSAnne9EndBattleText4:: ; 81a7c (20:5a7c)
+_SSAnne9EndBattleText4::
text "Take"
line "it easy!"
prompt
-_SSAnne9AfterBattleText4:: ; 81a8b (20:5a8b)
+_SSAnne9AfterBattleText4::
text "Oh, I adore your"
line "strong #MON!"
done
diff --git a/text/maps/underground_path_route_6_entrance.asm b/text/maps/underground_path_route_6_entrance.asm
index 67a33b6d..c898d199 100644
--- a/text/maps/underground_path_route_6_entrance.asm
+++ b/text/maps/underground_path_route_6_entrance.asm
@@ -1,4 +1,4 @@
-_UndergrdTunnelEntRoute6Text1:: ; 8c0cb (23:40cb)
+_UndergrdTunnelEntRoute6Text1::
text "People often lose"
line "things in that"
cont "UNDERGROUND PATH."
diff --git a/text/maps/underground_path_route_7_entrance.asm b/text/maps/underground_path_route_7_entrance.asm
index bb35935d..dee62853 100644
--- a/text/maps/underground_path_route_7_entrance.asm
+++ b/text/maps/underground_path_route_7_entrance.asm
@@ -1,4 +1,4 @@
-_UndergroundPathEntRoute7Text1:: ; 8c0ff (23:40ff)
+_UndergroundPathEntRoute7Text1::
text "I heard a sleepy"
line "#MON appeared"
cont "near CELADON CITY."
diff --git a/text/maps/underground_path_route_7_entrance_unused.asm b/text/maps/underground_path_route_7_entrance_unused.asm
index 0c24f9f7..057c7b0c 100644
--- a/text/maps/underground_path_route_7_entrance_unused.asm
+++ b/text/maps/underground_path_route_7_entrance_unused.asm
@@ -1,4 +1,4 @@
-_UGPathRoute7EntranceUnusedText_5d773:: ; 8c132 (23:4132)
+_UGPathRoute7EntranceUnusedText_5d773::
text "I want to shop at"
line "the dept. store"
cont "in CELADON but..."
@@ -8,13 +8,13 @@ _UGPathRoute7EntranceUnusedText_5d773:: ; 8c132 (23:4132)
cont "people there."
done
-_UGPathRoute7EntranceUnusedText_5d778:: ; 8c195 (23:4195)
+_UGPathRoute7EntranceUnusedText_5d778::
text "TEAM ROCKET had a"
line "secret hideout in"
cont "CELADON CITY?"
done
-_UGPathRoute7EntranceUnusedText_5d77d:: ; 8c1c8 (23:41c8)
+_UGPathRoute7EntranceUnusedText_5d77d::
text "You're here to"
line "shop in CELADON?"
@@ -22,7 +22,7 @@ _UGPathRoute7EntranceUnusedText_5d77d:: ; 8c1c8 (23:41c8)
line "and head west!"
done
-_UGPathRoute7EntranceUnusedText_5d782:: ; 8c209 (23:4209)
+_UGPathRoute7EntranceUnusedText_5d782::
text "The UNDERGROUND"
line "PATH goes beneath"
cont "SAFFRON and leads"
diff --git a/text/maps/underground_path_route_8_entrance.asm b/text/maps/underground_path_route_8_entrance.asm
index 8c546cb0..0df1dec9 100644
--- a/text/maps/underground_path_route_8_entrance.asm
+++ b/text/maps/underground_path_route_8_entrance.asm
@@ -1,4 +1,4 @@
-_UndergroundPathEntRoute8Text1:: ; 8c28d (23:428d)
+_UndergroundPathEntRoute8Text1::
text "The dept. store"
line "in CELADON has a"
cont "great selection!"
diff --git a/text/maps/unknown_dungeon_b1f.asm b/text/maps/unknown_dungeon_b1f.asm
index 9af3a6bf..bea7df28 100644
--- a/text/maps/unknown_dungeon_b1f.asm
+++ b/text/maps/unknown_dungeon_b1f.asm
@@ -1,3 +1,3 @@
-_UnknownDungeon3MewtwoText:: ; 85c72 (21:5c72)
+_UnknownDungeon3MewtwoText::
text "Mew!@@"
diff --git a/text/maps/vermilion_city.asm b/text/maps/vermilion_city.asm
index 9c27bf64..07ed1b96 100644
--- a/text/maps/vermilion_city.asm
+++ b/text/maps/vermilion_city.asm
@@ -1,4 +1,4 @@
-_VermilionCityText1:: ; a5668 (29:5668)
+_VermilionCityText1::
text "We're careful"
line "about pollution!"
@@ -7,13 +7,13 @@ _VermilionCityText1:: ; a5668 (29:5668)
cont "toxic sludge!"
done
-_VermilionCityText_198a7:: ; a56b5 (29:56b5)
+_VermilionCityText_198a7::
text "Did you see S.S."
line "ANNE moored in"
cont "the harbor?"
done
-_VermilionCityText_198ac:: ; a56e2 (29:56e2)
+_VermilionCityText_198ac::
text "So, S.S.ANNE has"
line "departed!"
@@ -21,12 +21,12 @@ _VermilionCityText_198ac:: ; a56e2 (29:56e2)
line "about a year."
done
-_SSAnneWelcomeText4:: ; a571d (29:571d)
+_SSAnneWelcomeText4::
text "Welcome to S.S."
line "ANNE!"
done
-_SSAnneWelcomeText9:: ; a5734 (29:5734)
+_SSAnneWelcomeText9::
text "Welcome to S.S."
line "ANNE!"
@@ -34,7 +34,7 @@ _SSAnneWelcomeText9:: ; a5734 (29:5734)
line "have a ticket?"
prompt
-_SSAnneFlashedTicketText:: ; a576c (29:576c)
+_SSAnneFlashedTicketText::
text $52, " flashed"
line "the S.S.TICKET!"
@@ -42,7 +42,7 @@ _SSAnneFlashedTicketText:: ; a576c (29:576c)
line "S.S.ANNE!"
done
-_SSAnneNoTicketText:: ; a57a3 (29:57a3)
+_SSAnneNoTicketText::
text $52, " doesn't"
line "have the needed"
cont "S.S.TICKET."
@@ -53,11 +53,11 @@ _SSAnneNoTicketText:: ; a57a3 (29:57a3)
line "to get aboard."
done
-_SSAnneNotHereText:: ; a57f1 (29:57f1)
+_SSAnneNotHereText::
text "The ship set sail."
done
-_VermilionCityText4:: ; a5805 (29:5805)
+_VermilionCityText4::
text "I'm putting up a"
line "building on this"
cont "plot of land."
@@ -66,18 +66,18 @@ _VermilionCityText4:: ; a5805 (29:5805)
line "tamping the land."
done
-_VermilionCityText5:: ; a5852 (29:5852)
+_VermilionCityText5::
text "MACHOP: Guoh!"
line "Gogogoh!@@"
-_VermilionCityText14:: ; a586b (29:586b)
+_VermilionCityText14::
db $0
para "A MACHOP is"
line "stomping the land"
cont "flat."
done
-_VermilionCityText6:: ; a5891 (29:5891)
+_VermilionCityText6::
text "S.S.ANNE is a"
line "famous luxury"
cont "cruise ship."
@@ -86,13 +86,13 @@ _VermilionCityText6:: ; a5891 (29:5891)
line "once a year."
done
-_VermilionCityText7:: ; a58db (29:58db)
+_VermilionCityText7::
text "VERMILION CITY"
line "The Port of"
cont "Exquisite Sunsets"
done
-_VermilionCityText8:: ; a5909 (29:5909)
+_VermilionCityText8::
text "NOTICE!"
para "ROUTE 12 may be"
@@ -106,13 +106,13 @@ _VermilionCityText8:: ; a5909 (29:5909)
para "VERMILION POLICE"
done
-_VermilionCityText11:: ; a5980 (29:5980)
+_VermilionCityText11::
text "#MON FAN CLUB"
line "All #MON fans"
cont "welcome!"
done
-_VermilionCityText12:: ; a59a6 (29:59a6)
+_VermilionCityText12::
text "VERMILION CITY"
line "#MON GYM"
cont "LEADER: LT.SURGE"
@@ -121,7 +121,7 @@ _VermilionCityText12:: ; a59a6 (29:59a6)
line "American!"
done
-_VermilionCityText13:: ; a59e9 (29:59e9)
+_VermilionCityText13::
text "VERMILION HARBOR"
done
diff --git a/text/maps/vermilion_dock.asm b/text/maps/vermilion_dock.asm
index 17436742..26c556a7 100644
--- a/text/maps/vermilion_dock.asm
+++ b/text/maps/vermilion_dock.asm
@@ -1,3 +1,3 @@
-_VermilionDockText1:: ; 9c50e (27:450e)
+_VermilionDockText1::
db $0, $57
diff --git a/text/maps/vermilion_fishing_house.asm b/text/maps/vermilion_fishing_house.asm
index b1377252..59f730db 100644
--- a/text/maps/vermilion_fishing_house.asm
+++ b/text/maps/vermilion_fishing_house.asm
@@ -1,4 +1,4 @@
-_VermilionHouse2Text_560b1:: ; 9c510 (27:4510)
+_VermilionHouse2Text_560b1::
text "I'm the FISHING"
line "GURU!"
@@ -9,7 +9,7 @@ _VermilionHouse2Text_560b1:: ; 9c510 (27:4510)
line "fish?"
done
-_VermilionHouse2Text_560b6:: ; 9c554 (27:4554)
+_VermilionHouse2Text_560b6::
text "Grand! I like"
line "your style!"
@@ -21,7 +21,7 @@ _VermilionHouse2Text_560b6:: ; 9c554 (27:4554)
TX_RAM wcf4b
text "!@@"
-_VermilionHouse2Text_560bb:: ; 9c5a4 (27:45a4)
+_VermilionHouse2Text_560bb::
db $0
para "Fishing is a way"
line "of life!"
@@ -32,12 +32,12 @@ _VermilionHouse2Text_560bb:: ; 9c5a4 (27:45a4)
cont "one, young one!"
done
-_VermilionHouse2Text_560c0:: ; 9c601 (27:4601)
+_VermilionHouse2Text_560c0::
text "Oh... That's so"
line "disappointing..."
done
-_VermilionHouse2Text_560c5:: ; 9c622 (27:4622)
+_VermilionHouse2Text_560c5::
text "Hello there,"
line $52, "!"
@@ -45,7 +45,7 @@ _VermilionHouse2Text_560c5:: ; 9c622 (27:4622)
line "biting?"
done
-_VermilionHouse2Text_560ca:: ; 9c64c (27:464c)
+_VermilionHouse2Text_560ca::
text "Oh no!"
para "You have no room"
diff --git a/text/maps/vermilion_gym_1.asm b/text/maps/vermilion_gym_1.asm
index dfa45279..f718d899 100644
--- a/text/maps/vermilion_gym_1.asm
+++ b/text/maps/vermilion_gym_1.asm
@@ -1,25 +1,4 @@
-_VermilionGymText_5cb6d:: ; 9aaa5 (26:6aa5)
-IF DEF(_YELLOW)
- text "Ten-hut! Welcome"
- line "to VERMILION GYM!"
-
- para "Will you look at"
- line "that, a pint-size"
- cont "challenger!"
-
- para "Hahaha! You've got"
- line "big and brassy"
- cont "nerves to take me"
- cont "on with your puny"
- cont "power!"
-
- para "A #MON battle"
- line "is war! I'll show"
- cont "you, civilian!"
-
- para "I'll shock you"
- line "into surrender!"
-ELSE
+_VermilionGymText_5cb6d::
text "Hey, kid! What do"
line "you think you're"
cont "doing here?"
@@ -39,5 +18,4 @@ ELSE
para "The same as I'll"
line "do to you!"
-ENDC
done
diff --git a/text/maps/vermilion_gym_2.asm b/text/maps/vermilion_gym_2.asm
index ee7d14ee..e347edb9 100644
--- a/text/maps/vermilion_gym_2.asm
+++ b/text/maps/vermilion_gym_2.asm
@@ -1,4 +1,4 @@
-_VermilionGymText_5cb72:: ; 9c000 (27:4000)
+_VermilionGymText_5cb72::
text "A little word of"
line "advice, kid!"
@@ -10,30 +10,26 @@ _VermilionGymText_5cb72:: ; 9c000 (27:4000)
cont "type #MON!"
done
-_VermilionGymText_5cb77:: ; 9c069 (27:4069)
+_VermilionGymText_5cb77::
text "The THUNDERBADGE"
line "cranks up your"
cont "#MON's SPEED!"
para "It also lets your"
-IF DEF(_YELLOW)
- line "#MON FLY any-"
-ELSE
line "#MON FLY any"
-ENDC
cont "time, kid!"
para "You're special,"
line "kid! Take this!"
done
-_ReceivedTM24Text:: ; 9c0e0 (27:40e0)
+_ReceivedTM24Text::
text $52, " received "
line "@"
TX_RAM wcf4b
text "!@@"
-_TM24ExplanationText:: ; 9c0f5 (27:40f5)
+_TM24ExplanationText::
db $0
para "TM24 contains"
line "THUNDERBOLT!"
@@ -42,12 +38,12 @@ _TM24ExplanationText:: ; 9c0f5 (27:40f5)
line "electric #MON!"
done
-_TM24NoRoomText:: ; 9c130 (27:4130)
+_TM24NoRoomText::
text "Yo kid, make room"
line "in your pack!"
done
-_ReceivedThunderbadgeText:: ; 9c151 (27:4151)
+_ReceivedThunderbadgeText::
text "Whoa!"
para "You're the real"
@@ -57,18 +53,18 @@ _ReceivedThunderbadgeText:: ; 9c151 (27:4151)
line "the THUNDERBADGE!"
prompt
-_VermilionGymBattleText1:: ; 9c194 (27:4194)
+_VermilionGymBattleText1::
text "When I was in the"
line "Army, LT.SURGE"
cont "was my strict CO!"
done
-_VermilionGymEndBattleText1:: ; 9c1c8 (27:41c8)
+_VermilionGymEndBattleText1::
text "Stop!"
line "You're very good!"
prompt
-_VermilionGymAfterBattleText1:: ; 9c1e0 (27:41e0)
+_VermilionGymAfterBattleText1::
text "The door won't"
line "open?"
@@ -76,17 +72,17 @@ _VermilionGymAfterBattleText1:: ; 9c1e0 (27:41e0)
line "was cautious!"
done
-_VermilionGymBattleText2:: ; 9c213 (27:4213)
+_VermilionGymBattleText2::
text "I'm a lightweight,"
line "but I'm good with"
cont "electricity!"
done
-_VermilionGymEndBattleText2:: ; 9c244 (27:4244)
+_VermilionGymEndBattleText2::
text "Fried!"
prompt
-_VermilionGymAfterBattleText2:: ; 9c24c (27:424c)
+_VermilionGymAfterBattleText2::
text "OK, I'll talk!"
para "LT.SURGE said he"
@@ -94,17 +90,17 @@ _VermilionGymAfterBattleText2:: ; 9c24c (27:424c)
cont "inside something!"
done
-_VermilionGymBattleText3:: ; 9c290 (27:4290)
+_VermilionGymBattleText3::
text "This is no place"
line "for kids!"
done
-_VermilionGymEndBattleText3:: ; 9c2ac (27:42ac)
+_VermilionGymEndBattleText3::
text "Wow!"
line "Surprised me!"
prompt
-_VermilionGymAfterBattleText3:: ; 9c2c0 (27:42c0)
+_VermilionGymAfterBattleText3::
text "LT.SURGE set up"
line "double locks!"
cont "Here's a hint!"
@@ -115,7 +111,7 @@ _VermilionGymAfterBattleText3:: ; 9c2c0 (27:42c0)
cont "next to it!"
done
-_VermilionGymText_5cbf4:: ; 9c32b (27:432b)
+_VermilionGymText_5cbf4::
text "Yo! Champ in"
line "making!"
@@ -141,7 +137,7 @@ _VermilionGymText_5cbf4:: ; 9c32b (27:432b)
cont "get to him!"
done
-_VermilionGymText_5cbf9:: ; 9c429 (27:4429)
+_VermilionGymText_5cbf9::
text "Whew! That match"
line "was electric!"
done
diff --git a/text/maps/vermilion_house.asm b/text/maps/vermilion_house.asm
index f05f9487..806a4b8a 100644
--- a/text/maps/vermilion_house.asm
+++ b/text/maps/vermilion_house.asm
@@ -1,14 +1,14 @@
-_VermilionHouse1Text1:: ; 9c449 (27:4449)
+_VermilionHouse1Text1::
text "I'm getting my"
line "PIDGEY to fly a"
cont "letter to SAFFRON"
cont "in the north!"
done
-_VermilionHouse1Text2:: ; 9c488 (27:4488)
+_VermilionHouse1Text2::
text "PIDGEY: Kurukkoo!@@"
-_VermilionHouse1Text3:: ; 9c49c (27:449c)
+_VermilionHouse1Text3::
text "Dear PIPPI, I hope"
line "to see you soon."
diff --git a/text/maps/vermilion_mart.asm b/text/maps/vermilion_mart.asm
index 0fcfbcbb..9acdf905 100644
--- a/text/maps/vermilion_mart.asm
+++ b/text/maps/vermilion_mart.asm
@@ -1,4 +1,4 @@
-_VermilionMartText2:: ; 9a9c1 (26:69c1)
+_VermilionMartText2::
text "There are evil"
line "people who will"
cont "use #MON for"
@@ -15,7 +15,7 @@ _VermilionMartText2:: ; 9a9c1 (26:69c1)
cont "useful."
done
-_VermilionMartText3:: ; 9aa67 (26:6a67)
+_VermilionMartText3::
text "I think #MON"
line "can be good or"
cont "evil. It depends"
diff --git a/text/maps/vermilion_pokecenter.asm b/text/maps/vermilion_pokecenter.asm
index fce00e35..8ba563dc 100644
--- a/text/maps/vermilion_pokecenter.asm
+++ b/text/maps/vermilion_pokecenter.asm
@@ -1,5 +1,5 @@
-_VermilionPokecenterText2:: ; 9a4b2 (26:64b2)
-_VermilionPokecenterText1:: ; 9a4b2 (26:64b2)
+_VermilionPokecenterText2::
+_VermilionPokecenterText1::
text "Even if they are"
line "the same level,"
cont "#MON can have"
@@ -12,7 +12,7 @@ _VermilionPokecenterText1:: ; 9a4b2 (26:64b2)
cont "in the wild."
done
-_VermilionPokecenterText3:: ; 9a539 (26:6539)
+_VermilionPokecenterText3::
text "My #MON was"
line "poisoned! It"
cont "fainted while we"
diff --git a/text/maps/victory_road_1f.asm b/text/maps/victory_road_1f.asm
index b6892f43..ded9afd6 100644
--- a/text/maps/victory_road_1f.asm
+++ b/text/maps/victory_road_1f.asm
@@ -1,31 +1,31 @@
-_VictoryRoad1BattleText1:: ; 85c79 (21:5c79)
+_VictoryRoad1BattleText1::
text "I wonder if you"
line "are good enough"
cont "for me!"
done
-_VictoryRoad1EndBattleText1:: ; 85ca2 (21:5ca2)
+_VictoryRoad1EndBattleText1::
text "I"
line "lost out!"
prompt
-_VictoryRoad1AfterBattleText1:: ; 85caf (21:5caf)
+_VictoryRoad1AfterBattleText1::
text "I never wanted to"
line "lose to anybody!"
done
-_VictoryRoad1BattleText2:: ; 85cd3 (21:5cd3)
+_VictoryRoad1BattleText2::
text "I can see you're"
line "good! Let me see"
cont "exactly how good!"
done
-_VictoryRoad1EndBattleText2:: ; 85d07 (21:5d07)
+_VictoryRoad1EndBattleText2::
text "I"
line "had a chance..."
prompt
-_VictoryRoad1AfterBattleText2:: ; 85d1a (21:5d1a)
+_VictoryRoad1AfterBattleText2::
text "I concede, you're"
line "better than me!"
done
diff --git a/text/maps/victory_road_2f.asm b/text/maps/victory_road_2f.asm
index 5becd811..390d8d54 100644
--- a/text/maps/victory_road_2f.asm
+++ b/text/maps/victory_road_2f.asm
@@ -1,84 +1,84 @@
-_VictoryRoad2BattleText6:: ; 8d06e (23:506e)
+_VictoryRoad2BattleText6::
text "Gyaoo!@@"
-_VictoryRoad2BattleText1:: ; 8d077 (23:5077)
+_VictoryRoad2BattleText1::
text "VICTORY ROAD is"
line "the final test"
cont "for trainers!"
done
-_VictoryRoad2EndBattleText1:: ; 8d0a5 (23:50a5)
+_VictoryRoad2EndBattleText1::
text "Aiyah!"
prompt
-_VictoryRoad2AfterBattleText1:: ; 8d0ad (23:50ad)
+_VictoryRoad2AfterBattleText1::
text "If you get stuck,"
line "try moving some"
cont "boulders around!"
done
-_VictoryRoad2BattleText2:: ; 8d0e1 (23:50e1)
+_VictoryRoad2BattleText2::
text "Ah, so you wish"
line "to challenge the"
cont "ELITE FOUR?"
done
-_VictoryRoad2EndBattleText2:: ; 8d10f (23:510f)
+_VictoryRoad2EndBattleText2::
text "You"
line "got me!"
prompt
-_VictoryRoad2AfterBattleText2:: ; 8d11c (23:511c)
+_VictoryRoad2AfterBattleText2::
text $53, " also came"
line "through here!"
done
-_VictoryRoad2BattleText3:: ; 8d137 (23:5137)
+_VictoryRoad2BattleText3::
text "Come on!"
line "I'll whip you!"
done
-_VictoryRoad2EndBattleText3:: ; 8d14f (23:514f)
+_VictoryRoad2EndBattleText3::
text "I got"
line "whipped!"
prompt
-_VictoryRoad2AfterBattleText3:: ; 8d15f (23:515f)
+_VictoryRoad2AfterBattleText3::
text "You earned the"
line "right to be on"
cont "VICTORY ROAD!"
done
-_VictoryRoad2BattleText4:: ; 8d18c (23:518c)
+_VictoryRoad2BattleText4::
text "If you can get"
line "through here, you"
cont "can go meet the"
cont "ELITE FOUR!"
done
-_VictoryRoad2EndBattleText4:: ; 8d1ca (23:51ca)
+_VictoryRoad2EndBattleText4::
text "No!"
line "Unbelievable!"
prompt
-_VictoryRoad2AfterBattleText4:: ; 8d1dd (23:51dd)
+_VictoryRoad2AfterBattleText4::
text "I can beat you"
line "when it comes to"
cont "knowledge about"
cont "#MON!"
done
-_VictoryRoad2BattleText5:: ; 8d214 (23:5214)
+_VictoryRoad2BattleText5::
text "Is VICTORY ROAD"
line "too tough?"
done
-_VictoryRoad2EndBattleText5:: ; 8d230 (23:5230)
+_VictoryRoad2EndBattleText5::
text "Well"
line "done!"
prompt
-_VictoryRoad2AfterBattleText5:: ; 8d23c (23:523c)
+_VictoryRoad2AfterBattleText5::
text "Many trainers give"
line "up the challenge"
cont "here."
diff --git a/text/maps/victory_road_3f.asm b/text/maps/victory_road_3f.asm
index 01a5841e..66364190 100644
--- a/text/maps/victory_road_3f.asm
+++ b/text/maps/victory_road_3f.asm
@@ -1,62 +1,62 @@
-_VictoryRoad3BattleText2:: ; 81d9b (20:5d9b)
+_VictoryRoad3BattleText2::
text "I heard rumors of"
line "a child prodigy!"
done
-_VictoryRoad3EndBattleText2:: ; 81dbf (20:5dbf)
+_VictoryRoad3EndBattleText2::
text "The"
line "rumors were true!"
prompt
-_VictoryRoad3AfterBattleText2:: ; 81dd6 (20:5dd6)
+_VictoryRoad3AfterBattleText2::
text "You beat GIOVANNI"
line "of TEAM ROCKET?"
done
-_VictoryRoad3BattleText3:: ; 81df9 (20:5df9)
+_VictoryRoad3BattleText3::
text "I'll show you just"
line "how good you are!"
done
-_VictoryRoad3EndBattleText3:: ; 81e1e (20:5e1e)
+_VictoryRoad3EndBattleText3::
text "I'm"
line "furious!"
prompt
-_VictoryRoad3AfterBattleText3:: ; 81e2b (20:5e2b)
+_VictoryRoad3AfterBattleText3::
text "You showed me just"
line "how good I was!"
done
-_VictoryRoad3BattleText4:: ; 81e4f (20:5e4f)
+_VictoryRoad3BattleText4::
text "Only the chosen"
line "can pass here!"
done
-_VictoryRoad3EndBattleText4:: ; 81e6f (20:5e6f)
+_VictoryRoad3EndBattleText4::
text "I"
line "don't believe it!"
prompt
-_VictoryRoad3AfterBattleText4:: ; 81e83 (20:5e83)
+_VictoryRoad3AfterBattleText4::
text "All trainers here"
line "are headed to the"
cont "#MON LEAGUE!"
cont "Be careful!"
done
-_VictoryRoad3BattleText5:: ; 81ec1 (20:5ec1)
+_VictoryRoad3BattleText5::
text "Trainers live to"
line "seek stronger"
cont "opponents!"
done
-_VictoryRoad3EndBattleText5:: ; 81eec (20:5eec)
+_VictoryRoad3EndBattleText5::
text "Oh!"
line "So strong!"
prompt
-_VictoryRoad3AfterBattleText5:: ; 81efc (20:5efc)
+_VictoryRoad3AfterBattleText5::
text "By fighting tough"
line "battles, you get"
cont "stronger!"
diff --git a/text/maps/viridian_city.asm b/text/maps/viridian_city.asm
index 7ff2d71d..feedd017 100644
--- a/text/maps/viridian_city.asm
+++ b/text/maps/viridian_city.asm
@@ -1,4 +1,4 @@
-_ViridianCityText1:: ; a43cc (29:43cc)
+_ViridianCityText1::
text "Those # BALLs"
line "at your waist!"
cont "You have #MON!"
@@ -9,7 +9,7 @@ _ViridianCityText1:: ; a43cc (29:43cc)
cont "time, anywhere!"
done
-_ViridianCityText_19122:: ; a4437 (29:4437)
+_ViridianCityText_19122::
text "This #MON GYM"
line "is always closed."
@@ -17,23 +17,23 @@ _ViridianCityText_19122:: ; a4437 (29:4437)
line "LEADER is?"
done
-_ViridianCityText_19127:: ; a4474 (29:4474)
+_ViridianCityText_19127::
text "VIRIDIAN GYM's"
line "LEADER returned!"
done
-_ViridianCityText_1914d:: ; a4494 (29:4494)
+_ViridianCityText_1914d::
text "You want to know"
line "about the 2 kinds"
cont "of caterpillar"
cont "#MON?"
done
-_ViridianCityText_19152:: ; a44cd (29:44cd)
+_ViridianCityText_19152::
text "Oh, OK then!"
done
-_ViridianCityText_19157:: ; a44db (29:44db)
+_ViridianCityText_19157::
text "CATERPIE has no"
line "poison, but"
cont "WEEDLE does."
@@ -42,14 +42,14 @@ _ViridianCityText_19157:: ; a44db (29:44db)
line "POISON STING!"
done
-_ViridianCityText_19175:: ; a4525 (29:4525)
+_ViridianCityText_19175::
text "Oh Grandpa! Don't"
line "be so mean!"
cont "He hasn't had his"
cont "coffee yet."
done
-_ViridianCityText_1917a:: ; a4560 (29:4560)
+_ViridianCityText_1917a::
text "When I go shop in"
line "PEWTER CITY, I"
cont "have to take the"
@@ -57,7 +57,7 @@ _ViridianCityText_1917a:: ; a4560 (29:4560)
cont "VIRIDIAN FOREST."
done
-_ViridianCityText_19191:: ; a45b5 (29:45b5)
+_ViridianCityText_19191::
text "You can't go"
line "through here!"
@@ -65,7 +65,7 @@ _ViridianCityText_19191:: ; a45b5 (29:45b5)
line "property!"
done
-_ViridianCityText_191ca:: ; a45ea (29:45ea)
+_ViridianCityText_191ca::
text "Yawn!"
line "I must have dozed"
cont "off in the sun."
@@ -82,22 +82,22 @@ _ViridianCityText_191ca:: ; a45ea (29:45ea)
cont "have this TM."
prompt
-_ReceivedTM42Text:: ; a469a (29:469a)
+_ReceivedTM42Text::
text $52, " received"
line "TM42!@@"
-_TM42Explanation:: ; a46ad (29:46ad)
+_TM42Explanation::
text "TM42 contains"
line "DREAM EATER..."
cont "...Snore..."
done
-_TM42NoRoomText:: ; a46d7 (29:46d7)
+_TM42NoRoomText::
text "You have too much"
line "stuff already."
done
-_ViridianCityText_1920a:: ; a46f9 (29:46f9)
+_ViridianCityText_1920a::
text "Ahh, I've had my"
line "coffee now and I"
cont "feel great!"
@@ -109,7 +109,7 @@ _ViridianCityText_1920a:: ; a46f9 (29:46f9)
line "hurry?"
done
-_ViridianCityText_1920f:: ; a4754 (29:4754)
+_ViridianCityText_1920f::
text "I see you're using"
line "a #DEX."
@@ -126,24 +126,24 @@ _ViridianCityText_1920f:: ; a4754 (29:4754)
line "how to then."
done
-_ViridianCityText_19214:: ; a47e6 (29:47e6)
+_ViridianCityText_19214::
text "Time is money..."
line "Go along then."
done
-_ViridianCityText_19219:: ; a4807 (29:4807)
+_ViridianCityText_19219::
text "First, you need"
line "to weaken the"
cont "target #MON."
done
-_ViridianCityText8:: ; a4833 (29:4833)
+_ViridianCityText8::
text "VIRIDIAN CITY "
line "The Eternally"
cont "Green Paradise"
done
-_ViridianCityText9:: ; a4860 (29:4860)
+_ViridianCityText9::
text "TRAINER TIPS"
para "Catch #MON"
@@ -155,7 +155,7 @@ _ViridianCityText9:: ; a4860 (29:4860)
cont "to fight!"
done
-_ViridianCityText10:: ; a48c3 (29:48c3)
+_ViridianCityText10::
text "TRAINER TIPS"
para "The battle moves"
@@ -169,12 +169,12 @@ _ViridianCityText10:: ; a48c3 (29:48c3)
cont "#MON CENTER!"
done
-_ViridianCityText13:: ; a4949 (29:4949)
+_ViridianCityText13::
text "VIRIDIAN CITY"
line "#MON GYM"
done
-_ViridianCityText14:: ; a4961 (29:4961)
+_ViridianCityText14::
text "The GYM's doors"
line "are locked..."
done
diff --git a/text/maps/viridian_forest.asm b/text/maps/viridian_forest.asm
index aa6ab4ab..8eaf7738 100644
--- a/text/maps/viridian_forest.asm
+++ b/text/maps/viridian_forest.asm
@@ -1,4 +1,4 @@
-_ViridianForestText1:: ; 8031d (20:431d)
+_ViridianForestText1::
text "I came here with"
line "some friends!"
@@ -6,57 +6,53 @@ _ViridianForestText1:: ; 8031d (20:431d)
line "#MON fights!"
done
-_ViridianForestBattleText1:: ; 80359 (20:4359)
+_ViridianForestBattleText1::
text "Hey! You have"
line "#MON! Come on!"
-IF DEF(_YELLOW)
- cont "Let's battle 'em!"
-ELSE
cont "Let's battle'em!"
-ENDC
done
-_ViridianForestEndBattleText1:: ; 80387 (20:4387)
+_ViridianForestEndBattleText1::
text "No!"
line "CATERPIE can't"
cont "cut it!"
prompt
-_ViridianFrstAfterBattleText1:: ; 803a2 (20:43a2)
+_ViridianFrstAfterBattleText1::
text "Ssh! You'll scare"
line "the bugs away!"
done
-_ViridianForestBattleText2:: ; 803c3 (20:43c3)
+_ViridianForestBattleText2::
text "Yo! You can't jam"
line "out if you're a"
cont "#MON trainer!"
done
-_ViridianForestEndBattleText2:: ; 803f2 (20:43f2)
+_ViridianForestEndBattleText2::
text "Huh?"
line "I ran out of"
cont "#MON!"
prompt
-_ViridianFrstAfterBattleText2:: ; 8040b (20:440b)
+_ViridianFrstAfterBattleText2::
text "Darn! I'm going"
line "to catch some"
cont "stronger ones!"
done
-_ViridianForestBattleText3:: ; 80438 (20:4438)
+_ViridianForestBattleText3::
text "Hey, wait up!"
line "What's the hurry?"
done
-_ViridianForestEndBattleText3:: ; 80458 (20:4458)
+_ViridianForestEndBattleText3::
text "I"
line "give! You're good"
cont "at this!"
prompt
-_ViridianFrstAfterBattleText3:: ; 80475 (20:4475)
+_ViridianFrstAfterBattleText3::
text "Sometimes, you"
line "can find stuff on"
cont "the ground!"
@@ -66,43 +62,7 @@ _ViridianFrstAfterBattleText3:: ; 80475 (20:4475)
cont "dropped!"
done
-if DEF(_YELLOW)
-_ViridianForestBattleTextPikaGirl::
- text "Hi, do you have a"
- line "PIKACHU?"
- done
-
-_ViridianForestEndBattleTextPikaGirl::
- text "Oh no,"
- line "really?"
- prompt
-
-_ViridianForestAfterBattleTextPikaGirl::
- text "I looked forever,"
- line "but I never found"
- cont "a PIKACHU here!"
- done
-
-_ViridianForestBattleTextSamurai::
- text "I'm gonna be the"
- line "best. You just"
- cont "can't beat me!"
- done
-
-_ViridianForestEndBattleTextSamurai::
- text "After"
- line "all I did..."
- prompt
-
-_ViridianForestAfterBattleTextSamurai::
- text "A METAPOD is cool"
- line "because its"
- cont "attack is its"
- cont "defense!"
- done
-ENDC
-
-_ViridianForestText8:: ; 804c7 (20:44c7)
+_ViridianForestText8::
text "I ran out of #"
line "BALLs to catch"
cont "#MON with!"
@@ -111,7 +71,7 @@ _ViridianForestText8:: ; 804c7 (20:44c7)
line "extras!"
done
-_ViridianForestText9:: ; 8050a (20:450a)
+_ViridianForestText9::
text "TRAINER TIPS"
para "If you want to"
@@ -120,13 +80,13 @@ _ViridianForestText9:: ; 8050a (20:450a)
cont "grassy areas!"
done
-_ViridianForestText10:: ; 80553 (20:4553)
+_ViridianForestText10::
text "For poison, use"
line "ANTIDOTE! Get it"
cont "at #MON MARTs!"
done
-_ViridianForestText11:: ; 80584 (20:4584)
+_ViridianForestText11::
text "TRAINER TIPS"
para "Contact PROF.OAK"
@@ -135,7 +95,7 @@ _ViridianForestText11:: ; 80584 (20:4584)
cont "evaluated!"
done
-_ViridianForestText12:: ; 805c6 (20:45c6)
+_ViridianForestText12::
text "TRAINER TIPS"
para "No stealing of"
@@ -145,7 +105,7 @@ _ViridianForestText12:: ; 805c6 (20:45c6)
cont "#MON!"
done
-_ViridianForestText13:: ; 80613 (20:4613)
+_ViridianForestText13::
text "TRAINER TIPS"
para "Weaken #MON"
@@ -156,7 +116,7 @@ _ViridianForestText13:: ; 80613 (20:4613)
line "they may escape!"
done
-_ViridianForestText14:: ; 80667 (20:4667)
+_ViridianForestText14::
text "LEAVING"
line "VIRIDIAN FOREST"
cont "PEWTER CITY AHEAD"
diff --git a/text/maps/viridian_forest_entrance.asm b/text/maps/viridian_forest_entrance.asm
index 770f2b5b..c1a8df22 100644
--- a/text/maps/viridian_forest_entrance.asm
+++ b/text/maps/viridian_forest_entrance.asm
@@ -1,24 +1,13 @@
-_ViridianForestEntranceText1:: ; 8a868 (22:6868)
+_ViridianForestEntranceText1::
text "Are you going to"
line "VIRIDIAN FOREST?"
cont "Be careful, it's"
cont "a natural maze!"
done
-_ViridianForestEntranceText2:: ; 8a8ab (22:68ab)
-IF DEF(_YELLOW)
- text "You have to roam"
- line "far to get new"
- cont "kinds of #MON."
-
- para "Look for other"
- line "types outside of"
- cont "VIRIDIAN FOREST."
- done
-ELSE
+_ViridianForestEntranceText2::
text "RATTATA may be"
line "small, but its"
cont "bite is wicked!"
cont "Did you get one?"
done
-ENDC
diff --git a/text/maps/viridian_forest_exit.asm b/text/maps/viridian_forest_exit.asm
index e74474e9..04dea7e5 100644
--- a/text/maps/viridian_forest_exit.asm
+++ b/text/maps/viridian_forest_exit.asm
@@ -1,4 +1,4 @@
-_ViridianForestExitText1:: ; 8a6fd (22:66fd)
+_ViridianForestExitText1::
text "Many #MON live"
line "only in forests "
cont "and caves."
@@ -8,7 +8,7 @@ _ViridianForestExitText1:: ; 8a6fd (22:66fd)
cont "different kinds!"
done
-_ViridianForestExitText2:: ; 8a75d (22:675d)
+_ViridianForestExitText2::
text "Have you noticed"
line "the bushes on the"
cont "roadside?"
diff --git a/text/maps/viridian_gym.asm b/text/maps/viridian_gym.asm
index 10a2a597..a308681a 100644
--- a/text/maps/viridian_gym.asm
+++ b/text/maps/viridian_gym.asm
@@ -1,4 +1,4 @@
-_ViridianGymText_74ace:: ; 95e09 (25:5e09)
+_ViridianGymText_74ace::
text "Fwahahaha! This is"
line "my hideout!"
@@ -18,7 +18,7 @@ _ViridianGymText_74ace:: ; 95e09 (25:5e09)
cont "greatest trainer!"
done
-_ViridianGymText_74ad3:: ; 95ed5 (25:5ed5)
+_ViridianGymText_74ad3::
text "Ha!"
line "That was a truly"
cont "intense fight!"
@@ -26,7 +26,7 @@ _ViridianGymText_74ad3:: ; 95ed5 (25:5ed5)
cont "As proof, here is"
cont "the EARTHBADGE!@@"
-_ViridianGymText_74ad9:: ; 95f2b (25:5f2b)
+_ViridianGymText_74ad9::
text "Having lost, I"
line "cannot face my"
cont "underlings!"
@@ -38,14 +38,10 @@ _ViridianGymText_74ad9:: ; 95f2b (25:5f2b)
cont "of #MON!"
para "Let us meet again"
-IF DEF(_YELLOW)
- line "someday!"
-ELSE
line "some day!"
-ENDC
cont "Farewell!@@"
-_ViridianGymText12:: ; 95fcc (25:5fcc)
+_ViridianGymText12::
text "The EARTHBADGE"
line "makes #MON of"
cont "any level obey!"
@@ -63,11 +59,11 @@ _ViridianGymText12:: ; 95fcc (25:5fcc)
cont "LEAGUE challenge!"
done
-_ReceivedTM27Text:: ; 96082 (25:6082)
+_ReceivedTM27Text::
text $52, " received"
line "TM27!@@"
-_TM27ExplanationText:: ; 96095 (25:6095)
+_TM27ExplanationText::
db $0
para "TM27 is FISSURE!"
line "It will take out"
@@ -79,147 +75,143 @@ _TM27ExplanationText:: ; 96095 (25:6095)
cont "too long ago..."
done
-_TM27NoRoomText:: ; 96104 (25:6104)
+_TM27NoRoomText::
text "You do not have"
line "space for this!"
done
-_ViridianGymBattleText1:: ; 96125 (25:6125)
+_ViridianGymBattleText1::
text "Heh! You must be"
line "running out of"
cont "steam by now!"
done
-_ViridianGymEndBattleText1:: ; 96154 (25:6154)
+_ViridianGymEndBattleText1::
text "I"
line "ran out of gas!"
prompt
-_ViridianGymAfterBattleText1:: ; 96167 (25:6167)
+_ViridianGymAfterBattleText1::
text "You need power to"
line "keep up with our"
cont "GYM LEADER!"
done
-_ViridianGymBattleText2:: ; 96197 (25:6197)
+_ViridianGymBattleText2::
text "Rrrroar! I'm"
line "working myself"
cont "into a rage!"
done
-_ViridianGymEndBattleText2:: ; 961c0 (25:61c0)
+_ViridianGymEndBattleText2::
text "Wargh!"
prompt
-_ViridianGymAfterBattleText2:: ; 961c8 (25:61c8)
+_ViridianGymAfterBattleText2::
text "I'm still not"
line "worthy!"
done
-_ViridianGymBattleText3:: ; 961de (25:61de)
+_ViridianGymBattleText3::
text "#MON and I, we"
line "make wonderful"
cont "music together!"
done
-_ViridianGymEndBattleText3:: ; 9620d (25:620d)
+_ViridianGymEndBattleText3::
text "You are in"
line "perfect harmony!"
prompt
-_ViridianGymAfterBattleText3:: ; 9622a (25:622a)
+_ViridianGymAfterBattleText3::
text "Do you know the"
line "identity of our"
cont "GYM LEADER?"
done
-_ViridianGymBattleText4:: ; 96257 (25:6257)
+_ViridianGymBattleText4::
text "Karate is the"
line "ultimate form of"
cont "martial arts!"
done
-_ViridianGymEndBattleText4:: ; 96285 (25:6285)
+_ViridianGymEndBattleText4::
text "Atcho!"
prompt
-_ViridianGymAfterBattleText4:: ; 9628d (25:628d)
+_ViridianGymAfterBattleText4::
text "If my #MON"
line "were as good at"
cont "Karate as I..."
done
-_ViridianGymBattleText5:: ; 962b8 (25:62b8)
+_ViridianGymBattleText5::
text "The truly talented"
line "win with style!"
done
-_ViridianGymEndBattleText5:: ; 962dc (25:62dc)
+_ViridianGymEndBattleText5::
text "I"
line "lost my grip!"
prompt
-_ViridianGymAfterBattleText5:: ; 962ed (25:62ed)
+_ViridianGymAfterBattleText5::
text "The LEADER will"
line "scold me!"
done
-_ViridianGymBattleText6:: ; 96308 (25:6308)
+_ViridianGymBattleText6::
text "I'm the KARATE"
line "KING! Your fate"
cont "rests with me!"
done
-_ViridianGymEndBattleText6:: ; 96336 (25:6336)
+_ViridianGymEndBattleText6::
text "Ayah!"
prompt
-_ViridianGymAfterBattleText6:: ; 9633d (25:633d)
+_ViridianGymAfterBattleText6::
text "#MON LEAGUE?"
line "You? Don't get"
cont "cocky!"
done
-_ViridianGymBattleText7:: ; 96360 (25:6360)
+_ViridianGymBattleText7::
text "Your #MON will"
line "cower at the"
cont "crack of my whip!"
done
-_ViridianGymEndBattleText7:: ; 9638f (25:638f)
+_ViridianGymEndBattleText7::
text "Yowch!"
line "Whiplash!"
prompt
-_ViridianGymAfterBattleText7:: ; 963a1 (25:63a1)
+_ViridianGymAfterBattleText7::
text "Wait! I was just"
line "careless!"
done
-_ViridianGymBattleText8:: ; 963bd (25:63bd)
+_ViridianGymBattleText8::
text "VIRIDIAN GYM was"
line "closed for a long"
cont "time, but now our"
cont "LEADER is back!"
done
-_ViridianGymEndBattleText8:: ; 96403 (25:6403)
+_ViridianGymEndBattleText8::
text "I"
line "was beaten?"
prompt
-_ViridianGymAfterBattleText8:: ; 96412 (25:6412)
-IF DEF(_YELLOW)
- text "You can go on to"
-ELSE
+_ViridianGymAfterBattleText8::
text "You can go onto"
-ENDC
line "#MON LEAGUE"
cont "only by defeating"
cont "our GYM LEADER!"
done
-_ViridianGymText_74bd4:: ; 96451 (25:6451)
+_ViridianGymText_74bd4::
text "Yo! Champ in"
line "making!"
@@ -237,7 +229,7 @@ _ViridianGymText_74bd4:: ; 96451 (25:6451)
cont "#MON!"
done
-_ViridianGymText_74bd9:: ; 964fb (25:64fb)
+_ViridianGymText_74bd9::
text "Blow me away!"
line "GIOVANNI was the"
cont "GYM LEADER here?"
diff --git a/text/maps/viridian_house.asm b/text/maps/viridian_house.asm
index eec10c59..5adf059b 100644
--- a/text/maps/viridian_house.asm
+++ b/text/maps/viridian_house.asm
@@ -1,4 +1,4 @@
-_ViridianHouseText1:: ; 95d71 (25:5d71)
+_ViridianHouseText1::
text "Coming up with"
line "nicknames is fun,"
cont "but hard."
@@ -8,16 +8,16 @@ _ViridianHouseText1:: ; 95d71 (25:5d71)
cont "remember."
done
-_ViridianHouseText2:: ; 95dc7 (25:5dc7)
+_ViridianHouseText2::
text "My Daddy loves"
line "#MON too."
done
-_ViridianHouseText_1d5b1:: ; 95de1 (25:5de1)
+_ViridianHouseText_1d5b1::
text "SPEARY: Tetweet!"
done
-_ViridianHouseText4:: ; 95df3 (25:5df3)
+_ViridianHouseText4::
text "SPEAROW"
line "Name: SPEARY"
done
diff --git a/text/maps/viridian_mart.asm b/text/maps/viridian_mart.asm
index ed3343f1..4b569dfe 100644
--- a/text/maps/viridian_mart.asm
+++ b/text/maps/viridian_mart.asm
@@ -1,5 +1,5 @@
-_ViridianPokeCenterText2:: ; 95ba1 (25:5ba1)
-_ViridianPokeCenterText1:: ; 95ba1 (25:5ba1)
+_ViridianPokeCenterText2::
+_ViridianPokeCenterText1::
text "You can use that"
line "PC in the corner."
@@ -7,7 +7,7 @@ _ViridianPokeCenterText1:: ; 95ba1 (25:5ba1)
line "told me. So kind!"
done
-_ViridianPokeCenterText3:: ; 95be8 (25:5be8)
+_ViridianPokeCenterText3::
text "There's a #MON"
line "CENTER in every"
cont "town ahead."
@@ -16,17 +16,17 @@ _ViridianPokeCenterText3:: ; 95be8 (25:5be8)
line "any money either!"
done
-_ViridianMartText1:: ; 95c36 (25:5c36)
+_ViridianMartText1::
text "Okay! Say hi to"
line "PROF.OAK for me!"
done
-_ViridianMartText4:: ; 95c58 (25:5c58)
+_ViridianMartText4::
text "Hey! You came from"
line "PALLET TOWN?"
done
-ViridianMartParcelQuestText:: ; 95c79 (25:5c79)
+ViridianMartParcelQuestText::
text "You know PROF."
line "OAK, right?"
@@ -37,24 +37,12 @@ ViridianMartParcelQuestText:: ; 95c79 (25:5c79)
para $52, " got"
line "OAK's PARCEL!@@"
-_ViridianMartText2:: ; 95cd5 (25:5cd5)
-IF DEF(_YELLOW)
- text "This shop sells a"
- line "lot of PARLYZ"
- cont "HEALs."
-ELSE
+_ViridianMartText2::
text "This shop sells"
line "many ANTIDOTEs."
-ENDC
done
-_ViridianMartText3:: ; 95cf6 (25:5cf6)
-IF DEF(_YELLOW)
- text "The shop finally"
- line "has some POTIONs"
- cont "in stock."
-ELSE
+_ViridianMartText3::
text "No! POTIONs are"
line "all sold out."
-ENDC
done
diff --git a/text/maps/wardens_house.asm b/text/maps/wardens_house.asm
index a215da34..09ab1443 100644
--- a/text/maps/wardens_house.asm
+++ b/text/maps/wardens_house.asm
@@ -1,4 +1,4 @@
-_WardenGibberishText1:: ; 9e444 (27:6444)
+_WardenGibberishText1::
text "WARDEN: Hif fuff"
line "hefifoo!"
@@ -7,28 +7,28 @@ _WardenGibberishText1:: ; 9e444 (27:6444)
cont "hee fwee!"
done
-_WardenGibberishText2:: ; 9e48b (27:648b)
+_WardenGibberishText2::
text "Ah howhee ho hoo!"
line "Eef ee hafahi ho!"
done
-_WardenGibberishText3:: ; 9e4b0 (27:64b0)
+_WardenGibberishText3::
text "Ha? He ohay heh"
line "ha hoo ee haheh!"
done
-_WardenTeethText1:: ; 9e4d2 (27:64d2)
+_WardenTeethText1::
text $52, " gave the"
line "GOLD TEETH to the"
cont "WARDEN!@@"
-_WardenTeethText2:: ; 9e4f9 (27:64f9)
+_WardenTeethText2::
db $0
para "The WARDEN popped"
line "in his teeth!"
prompt
-_WardenThankYouText:: ; 9e51b (27:651b)
+_WardenThankYouText::
text "WARDEN: Thanks,"
line "kid! No one could"
cont "understand a word"
@@ -41,13 +41,13 @@ _WardenThankYouText:: ; 9e51b (27:651b)
cont "your trouble."
prompt
-_ReceivedHM04Text:: ; 9e5a2 (27:65a2)
+_ReceivedHM04Text::
text $52, " received"
line "@"
TX_RAM wcf4b
text "!@@"
-_HM04ExplanationText:: ; 9e5b6 (27:65b6)
+_HM04ExplanationText::
text "WARDEN: HM04"
line "teaches STRENGTH!"
@@ -67,17 +67,17 @@ _HM04ExplanationText:: ; 9e5b6 (27:65b6)
line "rare SURF HM."
done
-_HM04NoRoomText:: ; 9e67a (27:667a)
+_HM04NoRoomText::
text "Your pack is"
line "stuffed full!"
done
-_FuchsiaHouse2Text_75176:: ; 9e696 (27:6696)
+_FuchsiaHouse2Text_75176::
text "#MON photos"
line "and fossils."
done
-_FuchsiaHouse2Text_7517b:: ; 9e6b0 (27:66b0)
+_FuchsiaHouse2Text_7517b::
text "Old #MON"
line "merchandise."
done
diff --git a/wram.asm b/wram.asm
index c470d6a4..1bc8968d 100755
--- a/wram.asm
+++ b/wram.asm
@@ -50,6 +50,7 @@ battle_struct: MACRO
\1Moves:: ds NUM_MOVES
\1DVs:: ds 2
\1Level:: db
+\1Stats::
\1MaxHP:: dw
\1Attack:: dw
\1Defense:: dw
@@ -61,70 +62,152 @@ ENDM
SECTION "WRAM Bank 0", WRAM0
-wc000:: ds 1
-wc001:: ds 1
-wc002:: ds 1
-wc003:: ds 1
-wc004:: ds 1
-wc005:: ds 1
-wc006:: ds 8
-wc00e:: ds 4
-wc012:: ds 4
-wc016:: ds 16
-wc026:: ds 1
-wc027:: ds 1
-wc028:: ds 2
-wc02a:: ds 1
-wc02b:: ds 1
-wc02c:: ds 1
-wc02d:: ds 1
-wc02e:: ds 8
-wc036:: ds 8
-wc03e:: ds 8
-wc046:: ds 8
-wc04e:: ds 8
-wc056:: ds 8
-wc05e:: ds 8
-wc066:: ds 8
-wc06e:: ds 8
-wc076:: ds 8
-wc07e:: ds 8
-wc086:: ds 8
-wc08e:: ds 8
-wc096:: ds 8
-wc09e:: ds 8
-wc0a6:: ds 8
-wc0ae:: ds 8
-wc0b6:: ds 8
-wc0be:: ds 8
-wc0c6:: ds 8
-wc0ce:: ds 1
-wc0cf:: ds 1
-wc0d0:: ds 1
-wc0d1:: ds 1
-wc0d2:: ds 1
-wc0d3:: ds 1
-wc0d4:: ds 1
-wc0d5:: ds 1
-wc0d6:: ds 8
-wc0de:: ds 8
-wc0e6:: ds 1
-wc0e7:: ds 1
-wc0e8:: ds 1
-wc0e9:: ds 1
-wc0ea:: ds 1
-wc0eb:: ds 1
-wc0ec:: ds 1
-wc0ed:: ds 1
-wc0ee:: ds 1
-wc0ef:: ds 1
-wc0f0:: ds 1
-wc0f1:: ds 1
-wc0f2:: ds 14
+wUnusedC000:: ; c000
+ ds 1
+
+wSoundID:: ; c001
+ ds 1
+
+wMuteAudioAndPauseMusic:: ; c002
+; bit 7: whether sound has been muted
+; all bits: whether the effective is active
+; Store 1 to activate effect (any value in the range [1, 127] works).
+; All audio is muted and music is paused. Sfx continues playing until it
+; ends normally.
+; Store 0 to resume music.
+ ds 1
+
+wDisableChannelOutputWhenSfxEnds:: ; c003
+ ds 1
+
+wStereoPanning:: ; c004
+ ds 1
+
+wSavedVolume:: ; c005
+ ds 1
+
+wChannelCommandPointers:: ; c006
+ ds 16
+
+wChannelReturnAddresses:: ; c016
+ ds 16
+
+wChannelSoundIDs:: ; c026
+ ds 8
+
+wChannelFlags1:: ; c02e
+ ds 8
+
+wChannelFlags2:: ; c036
+ ds 8
+
+wChannelDuties:: ; c03e
+ ds 8
+
+wChannelDutyCycles:: ; c046
+ ds 8
+
+wChannelVibratoDelayCounters:: ; c04e
+; reloaded at the beginning of a note. counts down until the vibrato begins.
+ ds 8
+
+wChannelVibratoExtents:: ; c056
+ ds 8
+
+wChannelVibratoRates:: ; c05e
+; high nybble is rate (counter reload value) and low nybble is counter.
+; time between applications of vibrato.
+ ds 8
+
+wChannelFrequencyLowBytes:: ; c066
+ ds 8
+
+wChannelVibratoDelayCounterReloadValues:: ; c06e
+; delay of the beginning of the vibrato from the start of the note
+ ds 8
+
+wChannelPitchBendLengthModifiers:: ; c076
+ ds 8
+
+wChannelPitchBendFrequencySteps:: ; c07e
+ ds 8
+
+wChannelPitchBendFrequencyStepsFractionalPart:: ; c086
+ ds 8
+
+wChannelPitchBendCurrentFrequencyFractionalPart:: ; c08e
+ ds 8
+
+wChannelPitchBendCurrentFrequencyHighBytes:: ; c096
+ ds 8
+
+wChannelPitchBendCurrentFrequencyLowBytes:: ; c09e
+ ds 8
+
+wChannelPitchBendTargetFrequencyHighBytes:: ; c0a6
+ ds 8
+
+wChannelPitchBendTargetFrequencyLowBytes:: ; c0ae
+ ds 8
+
+wChannelNoteDelayCounters:: ; c0b6
+; Note delays are stored as 16-bit fixed-point numbers where the integer part
+; is 8 bits and the fractional part is 8 bits.
+ ds 8
+
+wChannelLoopCounters:: ; c0be
+ ds 8
+
+wChannelNoteSpeeds:: ; c0c6
+ ds 8
+
+wChannelNoteDelayCountersFractionalPart:: ; c0ce
+ ds 8
+
+wChannelOctaves:: ; c0d6
+ ds 8
+
+wChannelVolumes:: ; c0de
+; also includes fade for hardware channels that support it
+ ds 8
+
+wMusicWaveInstrument::
+ ds 1
+
+wSfxWaveInstrument::
+ ds 1
+
+wMusicTempo:: ; c0e8
+ ds 2
+
+wSfxTempo:: ; c0ea
+ ds 2
+
+wSfxHeaderPointer:: ; c0ec
+ ds 2
+
+wNewSoundID:: ; c0ee
+ ds 1
+
+wAudioROMBank:: ; c0ef
+ ds 1
+
+wAudioSavedROMBank:: ; c0f0
+ ds 1
+
+wFrequencyModifier:: ; c0f1
+ ds 1
+
+wTempoModifier:: ; c0f2
+ ds 1
+
+ ds 13
SECTION "Sprite State Data", WRAM0[$c100]
+wSpriteDataStart::
+
wSpriteStateData1:: ; c100
; data for all sprites on the current map
; holds info for 16 sprites with $10 bytes each
@@ -148,7 +231,7 @@ wSpriteStateData1:: ; c100
ds $10 * $10
-SECTION "Sprite State Data 2", WRAM0[$c200]
+;SECTION "Sprite State Data 2", WRAM0[$c200]
wSpriteStateData2:: ; c200
; more data for all sprites on the current map
@@ -172,6 +255,8 @@ wSpriteStateData2:: ; c200
; C2xF
ds $10 * $10
+wSpriteDataEnd::
+
SECTION "OAM Buffer", WRAM0[$c300]
@@ -203,9 +288,9 @@ wTempPic::
wOverworldMap:: ; c6e8
ds 1300
-wScreenEdgeTiles:: ; cbfc
-; the tiles of the row or column to be redrawn by RedrawExposedScreenEdge
- ds 20 * 2
+wRedrawRowOrColumnSrcTiles:: ; cbfc
+; the tiles of the row or column to be redrawn by RedrawRowOrColumn
+ ds SCREEN_WIDTH * 2
; coordinates of the position of the cursor for the top menu item (id 0)
wTopMenuItemY:: ; cc24
@@ -393,6 +478,29 @@ wNPCMovementScriptBank:: ; cc58
ds 2
+wUnusedCC5B:: ; cc5b
+
+wVermilionDockTileMapBuffer:: ; cc5b
+; 180 bytes
+
+wOaksAideRewardItemName:: ; cc5b
+
+wDexRatingNumMonsSeen:: ; cc5b
+
+wFilteredBagItems:: ; cc5b
+; List of bag items that has been filtered to a certain type of items,
+; such as drinks or fossils.
+
+wElevatorWarpMaps:: ; cc5b
+
+wMonPartySpritesSavedOAM:: ; cc5b
+; Saved copy of OAM for the first frame of the animation to make it easy to
+; flip back from the second frame.
+; $60 bytes
+
+wTrainerCardBlkPacket:: ; cc5b
+; $40 bytes
+
wSlotMachineSevenAndBarModeChance:: ; cc5b
; If a random number greater than this value is generated, then the player is
; allowed to have three 7 symbols or bar symbols line up.
@@ -406,10 +514,13 @@ wAnimationType:: ; cc5b
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
wNPCMovementDirections:: ; cc5b
+ ds 1
+
+wDexRatingNumMonsOwned:: ; cc5c
+ ds 1
-wcc5b:: ds 1 ; these upcoming values below are miscellaneous storage values
-wcc5c:: ds 1 ; used in pokedex evaluation as well
-wcc5d:: ds 1 ; used in pokedex evaluation
+wDexRatingText:: ; cc5d
+ ds 1
wSlotMachineSavedROMBank:: ; cc5e
; ROM back to return to when the player is done with the slot machine
@@ -467,7 +578,12 @@ wPlayerSubstituteHP:: ; ccd7
wEnemySubstituteHP:: ; ccd8
ds 1
-wccd9:: ds 2 ; used in InitBattleVariablesLoop (written to after the loop is finished)
+wTestBattlePlayerSelectedMove:: ; ccd9
+; The player's selected move during a test battle.
+; InitBattleVariables sets it to the move Pound.
+ ds 1
+
+ ds 1
wMoveMenuType:: ; ccdb
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
@@ -507,15 +623,18 @@ wSafariBaitFactor:: ; cce9
ds 1
-wcceb:: ds 1 ; used to save the dvs of a mon when it uses transform
-wccec:: ds 1 ; also used with above case
+wTransformedEnemyMonOriginalDVs:: ; cceb
+ ds 2
wMonIsDisobedient:: ds 1 ; cced
wPlayerDisabledMoveNumber:: ds 1 ; ccee
wEnemyDisabledMoveNumber:: ds 1 ; ccef
-wccf0:: ds 1 ; used as a check if a mon fainted
+wInHandlePlayerMonFainted:: ; ccf0
+; When running in the scope of HandlePlayerMonFainted, it equals 1.
+; When running in the scope of HandleEnemyMonFainted, it equals 0.
+ ds 1
wPlayerUsedMove:: ds 1 ; ccf1
wEnemyUsedMove:: ds 1 ; ccf2
@@ -528,8 +647,13 @@ wPartyFoughtCurrentEnemyFlags:: ; ccf5
; flags that indicate which party members have fought the current enemy mon
flag_array 6
-wccf6:: ds 1 ; used in some hp bar thing
-wPlayerMonMinimized:: ds 1 ; ccf7
+wLowHealthAlarmDisabled:: ; ccf6
+; Whether the low health alarm has been disabled due to the player winning the
+; battle.
+ ds 1
+
+wPlayerMonMinimized:: ; ccf7
+ ds 1
ds 13
@@ -636,7 +760,11 @@ wInGameTradeReceiveMonSpecies::
wNPCMovementDirections2Index:: ; cd37
-wcd37:: ds 1 ; used in list menus, like the fossil lab menu or drink girl menu. Also used in link menu.
+wUnusedCD37:: ; cd37
+
+wFilteredBagItemsCount:: ; cd37
+; number of items in wFilteredBagItems list
+ ds 1
wSimulatedJoypadStatesIndex:: ; cd38
; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1
@@ -1199,26 +1327,56 @@ wOnSGB:: ; cf1b
; if running on SGB, it's 1, else it's 0
ds 1
-wcf1c:: ds 1 ; used with sgb palettes
-wcf1d:: ds 1 ; used when displaying palettes for Pokemon
-wcf1e:: ds 1 ; used to display palettes for HP bar
-wcf1f:: ds 6 ; used to display HP bars in Pokemon Menu (probably palettes)
-wcf25:: ds 8 ; used to display HP bar for Pokemon Status Screen (probably palettes too)
-wcf2d:: ds 1 ; also used to display HP bar for Pokemon Menu (something about HP colour)
-wcf2e:: ds 2 ; more HP bar palette stuff.
-wcf30:: ds 7 ; used with palettes (apparently for Pokedex)
-wcf37:: ds 20 ; used with palletes too (used for Party Menu)
-wcf4b:: ds 1 ; storage buffer for various strings
-wcf4c:: ds 1 ; used with displaying EXP value, probably also overflowed with wcf4b
+wDefaultPaletteCommand:: ; cf1c
+ ds 1
+
+wPlayerHPBarColor:: ; cf1d
+
+wWholeScreenPaletteMonSpecies:: ; cf1d
+; species of the mon whose palette is used for the whole screen
+ ds 1
+
+wEnemyHPBarColor:: ; cf1e
+ ds 1
+
+; 0: green
+; 1: yellow
+; 2: red
+wPartyMenuHPBarColors:: ; cf1f
+ ds 6
+
+wStatusScreenHPBarColor:: ; cf25
+ ds 1
+
+ ds 7
+
+wCopyingSGBTileData:: ; c2fd
+
+wWhichPartyMenuHPBar:: ; cf2d
+
+wPalPacket:: ; cf2d
+ ds 1
+
+wPartyMenuBlkPacket:: ; cf2e
+; $30 bytes
+ ds 29
+
+wExpAmountGained:: ; cf4b
+; 2-byte big-endian number
+; the total amount of exp a mon gained
+
+wcf4b:: ds 2 ; storage buffer for various strings
+
wGainBoostedExp:: ; cf4d
ds 1
+
ds 17
wGymCityName:: ; cf5f
ds 17
wGymLeaderName:: ; cf70
- ds 11
+ ds NAME_LENGTH
wItemList:: ; cf7b
ds 16
@@ -1226,8 +1384,10 @@ wItemList:: ; cf7b
wListPointer:: ; cf8b
ds 2
-wcf8d:: ds 1 ; used in GetMonName
-wcf8e:: ds 1 ; also used in GetMonName (probably as a pointer)
+wUnusedCF8D:: ; cf8d
+; 2 bytes
+; used to store pointers, but never read
+ ds 2
wItemPrices:: ; cf8f
ds 2
@@ -1287,13 +1447,35 @@ wTileInFrontOfPlayer:: ; cfc6
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
-wMusicHeaderPointer:: ; cfc7
-; (the current music channel address - $4000) / 3
+wAudioFadeOutControl:: ; cfc7
+; The desired fade counter reload value is stored here prior to calling
+; PlaySound in order to cause the current music to fade out before the new
+; music begins playing. Storing 0 causes no fade out to occur and the new music
+; to begin immediately.
+; This variable has another use related to fade-out, as well. PlaySound stores
+; the sound ID of the music that should be played after the fade-out is finished
+; in this variable. FadeOutAudio checks if it's non-zero every V-Blank and
+; fades out the current audio if it is. Once it has finished fading out the
+; audio, it zeroes this variable and starts playing the sound ID stored in it.
+ ds 1
+
+wAudioFadeOutCounterReloadValue:: ; cfc8
+ ds 1
+
+wAudioFadeOutCounter:: ; cfc9
ds 1
-wcfc8:: ds 1 ; used with audio
-wcfc9:: ds 1 ; also used with audio
-wcfca:: ds 1 ; also used with audio too
+wLastMusicSoundID:: ; cfca
+; This is used to determine whether the default music is already playing when
+; attempting to play the default music (in order to avoid restarting the same
+; music) and whether the music has already been stopped when attempting to
+; fade out the current music (so that the new music can be begin immediately
+; instead of waiting).
+; It sometimes contains the sound ID of the last music played, but it may also
+; contain $ff (if the music has been stopped) or 0 (because some routines zero
+; it in order to prevent assumptions from being made about the current state of
+; the music).
+ ds 1
wUpdateSpritesEnabled:: ; cfcb
; $00 = causes sprites to be hidden and the value to change to $ff
@@ -1302,29 +1484,29 @@ wUpdateSpritesEnabled:: ; cfcb
; other values aren't used
ds 1
-W_ENEMYMOVENUM:: ; cfcc
+wEnemyMoveNum:: ; cfcc
ds 1
-W_ENEMYMOVEEFFECT:: ; cfcd
+wEnemyMoveEffect:: ; cfcd
ds 1
-W_ENEMYMOVEPOWER:: ; cfce
+wEnemyMovePower:: ; cfce
ds 1
-W_ENEMYMOVETYPE:: ; cfcf
+wEnemyMoveType:: ; cfcf
ds 1
-W_ENEMYMOVEACCURACY:: ; cfd0
+wEnemyMoveAccuracy:: ; cfd0
ds 1
-W_ENEMYMOVEMAXPP:: ; cfd1
+wEnemyMoveMaxPP:: ; cfd1
ds 1
-W_PLAYERMOVENUM:: ; cfd2
+wPlayerMoveNum:: ; cfd2
ds 1
-W_PLAYERMOVEEFFECT:: ; cfd3
+wPlayerMoveEffect:: ; cfd3
ds 1
-W_PLAYERMOVEPOWER:: ; cfd4
+wPlayerMovePower:: ; cfd4
ds 1
-W_PLAYERMOVETYPE:: ; cfd5
+wPlayerMoveType:: ; cfd5
ds 1
-W_PLAYERMOVEACCURACY:: ; cfd6
+wPlayerMoveAccuracy:: ; cfd6
ds 1
-W_PLAYERMOVEMAXPP:: ; cfd7
+wPlayerMoveMaxPP:: ; cfd7
ds 1
@@ -1333,7 +1515,7 @@ wEnemyMonSpecies2:: ; cfd8
wBattleMonSpecies2:: ; cfd9
ds 1
-wEnemyMonNick:: ds 11 ; cfda
+wEnemyMonNick:: ds NAME_LENGTH ; cfda
wEnemyMon:: ; cfe5
; The wEnemyMon struct reaches past 0xcfff,
@@ -1371,11 +1553,11 @@ wEnemyMonBaseStats:: ds 5
wEnemyMonCatchRate:: ds 1
wEnemyMonBaseExp:: ds 1
-wBattleMonNick:: ds 11 ; d009
+wBattleMonNick:: ds NAME_LENGTH ; d009
wBattleMon:: battle_struct wBattleMon ; d014
-W_TRAINERCLASS:: ; d031
+wTrainerClass:: ; d031
ds 1
ds 1
@@ -1383,7 +1565,12 @@ W_TRAINERCLASS:: ; d031
wTrainerPicPointer:: ; d033
ds 2
ds 1
-wd036:: ds 16 ; used as a temporary buffer to print "XXX learned YYY"
+
+wTempMoveNameBuffer:: ; d036
+
+wLearnMoveMonName:: ; d036
+; The name of the mon that is learning a move.
+ ds 16
wTrainerBaseMoney:: ; d046
; 2-byte BCD number
@@ -1395,13 +1582,13 @@ wMissableObjectCounter:: ; d048
ds 1
-W_TRAINERNAME:: ; d04a
+wTrainerName:: ; d04a
; 13 bytes for the letters of the opposing trainer
; the name is terminated with $50 with possible
; unused trailing letters
ds 13
-W_ISINBATTLE:: ; d057
+wIsInBattle:: ; d057
; lost battle, this is -1
; no battle, this is 0
; wild battle, this is 1
@@ -1412,12 +1599,12 @@ wPartyGainExpFlags:: ; d058
; flags that indicate which party members should be be given exp when GainExperience is called
flag_array 6
-W_CUROPPONENT:: ; d059
+wCurOpponent:: ; d059
; in a wild battle, this is the species of pokemon
-; in a trainer battle, this is the trainer class + $C8
+; in a trainer battle, this is the trainer class + 200
ds 1
-W_BATTLETYPE:: ; d05a
+wBattleType:: ; d05a
; in normal battle, this is 0
; in old man battle, this is 1
; in safari battle, this is 2
@@ -1432,12 +1619,12 @@ wDamageMultipliers:: ; d05b
; bit 7: STAB
ds 1
-W_LONEATTACKNO:: ; d05c
+wLoneAttackNo:: ; d05c
; which entry in LoneAttacks to use
-W_GYMLEADERNO:: ; d05c
+wGymLeaderNo:: ; d05c
; it's actually the same thing as ^
ds 1
-W_TRAINERNO:: ; d05d
+wTrainerNo:: ; d05d
; which instance of [youngster, lass, etc] is this?
ds 1
@@ -1448,7 +1635,7 @@ wCriticalHitOrOHKO:: ; d05e
; $ff = failed OHKO
ds 1
-W_MOVEMISSED:: ; d05f
+wMoveMissed:: ; d05f
ds 1
wPlayerStatsToDouble:: ; d060
@@ -1459,7 +1646,7 @@ wPlayerStatsToHalve:: ; d061
; always 0
ds 1
-W_PLAYERBATTSTATUS1:: ; d062
+wPlayerBattleStatus1:: ; d062
; bit 0 - bide
; bit 1 - thrash / petal dance
; bit 2 - attacking multiple times (e.g. double kick)
@@ -1470,7 +1657,7 @@ W_PLAYERBATTSTATUS1:: ; d062
; bit 7 - confusion
ds 1
-W_PLAYERBATTSTATUS2:: ; d063
+wPlayerBattleStatus2:: ; d063
; bit 0 - X Accuracy effect
; bit 1 - protected by "mist"
; bit 2 - focus energy effect
@@ -1480,7 +1667,7 @@ W_PLAYERBATTSTATUS2:: ; d063
; bit 7 - leech seeded
ds 1
-W_PLAYERBATTSTATUS3:: ; d064
+wPlayerBattleStatus3:: ; d064
; bit 0 - toxic
; bit 1 - light screen
; bit 2 - reflect
@@ -1495,23 +1682,24 @@ wEnemyStatsToHalve:: ; d066
; always 0
ds 1
-W_ENEMYBATTSTATUS1:: ; d067
+wEnemyBattleStatus1:: ; d067
ds 1
-W_ENEMYBATTSTATUS2:: ; d068
+wEnemyBattleStatus2:: ; d068
ds 1
-W_ENEMYBATTSTATUS3:: ; d069
+wEnemyBattleStatus3:: ; d069
ds 1
wPlayerNumAttacksLeft::
; when the player is attacking multiple times, the number of attacks left
ds 1
-W_PLAYERCONFUSEDCOUNTER:: ; d06b
+wPlayerConfusedCounter:: ; d06b
ds 1
-W_PLAYERTOXICCOUNTER:: ; d06c
+wPlayerToxicCounter:: ; d06c
ds 1
-W_PLAYERDISABLEDMOVE:: ; d06d
+
+wPlayerDisabledMove:: ; d06d
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
ds 1
@@ -1522,12 +1710,13 @@ wEnemyNumAttacksLeft:: ; d06f
; when the enemy is attacking multiple times, the number of attacks left
ds 1
-W_ENEMYCONFUSEDCOUNTER:: ; d070
+wEnemyConfusedCounter:: ; d070
ds 1
-W_ENEMYTOXICCOUNTER:: ; d071
+wEnemyToxcCounter:: ; d071
ds 1
-W_ENEMYDISABLEDMOVE:: ; d072
+
+wEnemyDisabledMove:: ; d072
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
ds 1
@@ -1560,7 +1749,12 @@ wObjectToShow:: ; d07a
ds 1
-W_ANIMATIONID:: ; d07c
+wDefaultMap:: ; d07c
+; the map you will start at when the debug bit is set
+
+wMenuItemOffset:: ; d07c
+
+wAnimationID:: ; d07c
; ID number of the current battle animation
ds 1
@@ -1580,35 +1774,35 @@ wSavedListScrollOffset:: ; d07e
ds 2
; base coordinates of frame block
-W_BASECOORDX:: ; d081
+wBaseCoordX:: ; d081
ds 1
-W_BASECOORDY:: ; d082
+wBaseCoordY:: ; d082
ds 1
; low health alarm counter/enable
; high bit = enable, others = timer to cycle frequencies
wLowHealthAlarm:: ds 1 ; d083
-W_FBTILECOUNTER:: ; d084
+wFBTileCounter:: ; d084
; counts how many tiles of the current frame block have been drawn
ds 1
wMovingBGTilesCounter2:: ; d085
ds 1
-W_SUBANIMFRAMEDELAY:: ; d086
+wSubAnimFrameDelay:: ; d086
; duration of each frame of the current subanimation in terms of screen refreshes
ds 1
-W_SUBANIMCOUNTER:: ; d087
+wSubAnimCounter:: ; d087
; counts the number of subentries left in the current subanimation
ds 1
-wSaveFileStatus::
+wSaveFileStatus:: ; d088
; 1 = no save file or save file is corrupted
; 2 = save file exists and no corruption has been detected
ds 1
-W_NUMFBTILES:: ; d089
+wNumFBTiles:: ; d089
; number of tiles in current battle animation frame block
ds 1
@@ -1644,7 +1838,7 @@ wSlideMonDelay:: ; d08b
wAnimCounter:: ; d08b
; generic counter variable for various animations
-W_SUBANIMTRANSFORM:: ; d08b
+wSubAnimTransform:: ; d08b
; controls what transformations are applied to the subanimation
; 01: flip horizontally and vertically
; 02: flip horizontally and translate downwards 40 pixels
@@ -1665,7 +1859,7 @@ wEndBattleTextRomBank:: ; d092
ds 1
-W_SUBANIMADDRPTR:: ; d094
+wSubAnimAddrPtr:: ; d094
; the address _of the address_ of the current subanimation entry
ds 2
@@ -1675,7 +1869,7 @@ wSlotMachineAllowMatchesCounter:: ; d096
; the only way it can increase. Winning certain payout amounts will decrement it
; or zero it.
-W_SUBANIMSUBENTRYADDR:: ; d096
+wSubAnimSubEntryAddr:: ; d096
; the address of the current subentry of the current subanimation
ds 2
@@ -1693,20 +1887,17 @@ wTownMapSpriteBlinkingEnabled:: ; d09b
wUnusedD09B:: ; d09b
ds 1
-W_FBDESTADDR:: ; d09c
+wFBDestAddr:: ; d09c
; current destination address in OAM for frame blocks (big endian)
ds 2
-W_FBMODE:: ; d09e
+wFBMode:: ; d09e
; controls how the frame blocks are put together to form frames
; specifically, after finishing drawing the frame block, the frame block's mode determines what happens
; 00: clean OAM buffer and delay
; 02: move onto the next frame block with no delay and no cleaning OAM buffer
; 03: delay, but don't clean OAM buffer
-; 04: delay, without cleaning OAM buffer, and do not advance [W_FBDESTADDR], so that the next frame block will overwrite this one
-; sprite data is written column by column, each byte contains 8 columns (one for ech bit)
-; for 2bpp sprites, pairs of two consecutive bytes (i.e. pairs of consecutive rows of sprite data)
-; contain the upper and lower bit of each of the 8 pixels, respectively
+; 04: delay, without cleaning OAM buffer, and do not advance [wFBDestAddr], so that the next frame block will overwrite this one
ds 1
wLinkCableAnimBulgeToggle:: ; d09f
@@ -1733,50 +1924,50 @@ wSlideMonUpBottomRowLeftTile:: ; d09f
wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank
-W_SPRITECURPOSX:: ; d0a1
+wSpriteCurPosX:: ; d0a1
ds 1
-W_SPRITECURPOSY:: ; d0a2
+wSpriteCurPosY:: ; d0a2
ds 1
-W_SPRITEWITDH:: ; d0a3
+wSpriteWidth:: ; d0a3
ds 1
-W_SPRITEHEIGHT:: ; d0a4
+wSpriteHeight:: ; d0a4
ds 1
-W_SPRITEINPUTCURBYTE:: ; d0a5
+wSpriteInputCurByte:: ; d0a5
; current input byte
ds 1
-W_SPRITEINPUTBITCOUNTER:: ; d0a6
+wSpriteInputBitCounter:: ; d0a6
; bit offset of last read input bit
ds 1
-W_SPRITEOUTPUTBITOFFSET:: ; d0a7; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data)
+wSpriteOutputBitOffset:: ; d0a7; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data)
; 3 -> XX000000 1st column
; 2 -> 00XX0000 2nd column
; 1 -> 0000XX00 3rd column
; 0 -> 000000XX 4th column
ds 1
-W_SPRITELOADFLAGS:: ; d0a8
+wSpriteLoadFlags:: ; d0a8
; bit 0 determines used buffer (0 -> $a188, 1 -> $a310)
; bit 1 loading last sprite chunk? (there are at most 2 chunks per load operation)
ds 1
-W_SPRITEUNPACKMODE:: ; d0a9
+wSpriteUnpackMode:: ; d0a9
ds 1
-W_SPRITEFLIPPED:: ; d0aa
+wSpriteFlipped:: ; d0aa
ds 1
-W_SPRITEINPUTPTR:: ; d0ab
+wSpriteInputPtr:: ; d0ab
; pointer to next input byte
ds 2
-W_SPRITEOUTPUTPTR:: ; d0ad
+wSpriteOutputPtr:: ; d0ad
; pointer to current output byte
ds 2
-W_SPRITEOUTPUTPTRCACHED:: ; d0af
+wSpriteOutputPtrCached:: ; d0af
; used to revert pointer for different bit offsets
ds 2
-W_SPRITEDECODETABLE0PTR:: ; d0b1
+wSpriteDecodeTable0Ptr:: ; d0b1
; pointer to differential decoding table (assuming initial value 0)
ds 2
-W_SPRITEDECODETABLE1PTR:: ; d0b3
+wSpriteDecodeTable1Ptr:: ; d0b3
; pointer to differential decoding table (assuming initial value 1)
ds 2
@@ -1788,46 +1979,49 @@ wNameListType:: ; d0b6
wPredefBank:: ; d0b7
ds 1
-W_MONHEADER:: ; d0b8
-W_MONHDEXNUM:: ; d0b8
+wMonHeader:: ; d0b8
+
+wMonHIndex:: ; d0b8
+; In the ROM base stats data stucture, this is the dex number, but it is
+; overwritten with the internal index number after the header is copied to WRAM.
ds 1
-W_MONHBASESTATS:: ; d0b9
-W_MONHBASEHP:: ; d0b9
+wMonHBaseStats:: ; d0b9
+wMonHBaseHP:: ; d0b9
ds 1
-W_MONHBASEATTACK:: ; d0ba
+wMonHBaseAttack:: ; d0ba
ds 1
-W_MONHBASEDEFENSE:: ; d0bb
+wMonHBaseDefense:: ; d0bb
ds 1
-W_MONHBASESPEED:: ; d0bc
+wMonHBaseSpeed:: ; d0bc
ds 1
-W_MONHBASESPECIAL:: ; d0bd
+wMonHBaseSpecial:: ; d0bd
ds 1
-W_MONHTYPES:: ; d0be
-W_MONHTYPE1:: ; d0be
+wMonHTypes:: ; d0be
+wMonHType1:: ; d0be
ds 1
-W_MONHTYPE2:: ; d0bf
+wMonHType2:: ; d0bf
ds 1
-W_MONHCATCHRATE:: ; d0c0
+wMonHCatchRate:: ; d0c0
ds 1
-W_MONHBASEXP:: ; d0c1
+wMonHBaseEXP:: ; d0c1
ds 1
-W_MONHSPRITEDIM:: ; d0c2
+wMonHSpriteDim:: ; d0c2
ds 1
-W_MONHFRONTSPRITE:: ; d0c3
+wMonHFrontSprite:: ; d0c3
ds 2
-W_MONHBACKSPRITE:: ; d0c5
+wMonHBackSprite:: ; d0c5
ds 2
-W_MONHMOVES:: ; d0c7
- ds 4
+wMonHMoves:: ; d0c7
+ ds NUM_MOVES
-W_MONHGROWTHRATE:: ; d0cb
+wMonHGrowthRate:: ; d0cb
ds 1
-W_MONHLEARNSET:: ; d0cc
+wMonHLearnset:: ; d0cc
; bit field
flag_array 50 + 5
ds 1
@@ -1838,10 +2032,8 @@ wSavedTilesetType:: ; d0d4
ds 2
-W_MONHPADDING:: ; d0d7
-
-W_DAMAGE:: ; d0d7
+wDamage:: ; d0d7
ds 2
ds 2
@@ -1882,6 +2074,25 @@ wFirstMonsNotOutYet:: ; d11d
; which will be the first mon sent out.
ds 1
+wPokeBallCaptureCalcTemp:: ; d11e
+
+; lower nybble: number of shakes
+; upper nybble: number of animations to play
+wPokeBallAnimData:: ; d11e
+
+wUsingPPUp:: ; d11e
+
+wMaxPP:: ; d11e
+
+; 0 for player, non-zero for enemy
+wCalculateWhoseStats:: ; d11e
+
+wTypeEffectiveness:: ; d11e
+
+wMoveType:: ; d11e
+
+wNumSetBits:: ; d11e
+
wd11e:: ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits
wForcePlayerToChooseMon:: ; d11f
@@ -1907,9 +2118,9 @@ wIsKeyItem:: ; d124
wTextBoxID:: ; d125
ds 1
-wd126:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value
+wCurrentMapScriptFlags:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value
-W_CURENEMYLVL:: ; d127
+wCurEnemyLVL:: ; d127
ds 1
wItemListPointer:: ; d128
@@ -1987,11 +2198,11 @@ wNumberOfNoRandomBattleStepsLeft:: ; d13c
; after a battle, you have at least 3 steps before a random battle can occur
ds 1
-W_PRIZE1:: ; d13d
+wPrize1:: ; d13d
ds 1
-W_PRIZE2:: ; d13e
+wPrize2:: ; d13e
ds 1
-W_PRIZE3:: ; d13f
+wPrize3:: ; d13f
ds 1
ds 1
@@ -2036,7 +2247,10 @@ wSavedNPCMovementDirections2Index:: ; d157
ds 1
wPlayerName:: ; d158
- ds 11
+ ds NAME_LENGTH
+
+
+wPartyDataStart::
wPartyCount:: ds 1 ; d163
wPartySpecies:: ds PARTY_LENGTH ; d164
@@ -2050,10 +2264,14 @@ wPartyMon4:: party_struct wPartyMon4 ; d1ef
wPartyMon5:: party_struct wPartyMon5 ; d21b
wPartyMon6:: party_struct wPartyMon6 ; d247
-wPartyMonOT:: ds 11 * PARTY_LENGTH ; d273
-wPartyMonNicks:: ds 11 * PARTY_LENGTH ; d2b5
+wPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d273
+wPartyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d2b5
+
+wPartyDataEnd::
+wMainDataStart::
+
wPokedexOwned:: ; d2f7
flag_array NUM_POKEMON
wPokedexOwnedEnd::
@@ -2067,16 +2285,16 @@ wNumBagItems:: ; d31d
ds 1
wBagItems:: ; d31e
; item, quantity
- ds 20 * 2
+ ds BAG_ITEM_CAPACITY * 2
ds 1 ; end
wPlayerMoney:: ; d347
ds 3 ; BCD
-W_RIVALNAME:: ; d34a
- ds 11
+wRivalName:: ; d34a
+ ds NAME_LENGTH
-W_OPTIONS:: ; d355
+wOptions:: ; d355
; bit 7 = battle animation
; 0: On
; 1: Off
@@ -2089,8 +2307,8 @@ W_OPTIONS:: ; d355
; 5: Slow
ds 1
-W_OBTAINEDBADGES:: ; d356
- ds 1
+wObtainedBadges:: ; d356
+ flag_array 8
ds 1
@@ -2104,33 +2322,36 @@ wLetterPrintingDelayFlags:: ; d358
wPlayerID:: ; d359
ds 2
-wd35b:: ds 1 ; used with audio stuff
-wd35c:: ds 1 ; storage for audio bank for current map?
+wMapMusicSoundID:: ; d35b
+ ds 1
+
+wMapMusicROMBank:: ; d35c
+ ds 1
wMapPalOffset:: ; d35d
; offset subtracted from FadePal4 to get the background and object palettes for the current map
; normally, it is 0. it is 6 when Flash is needed, causing FadePal2 to be used instead of FadePal4
ds 1
-W_CURMAP:: ; d35e
+wCurMap:: ; d35e
ds 1
wCurrentTileBlockMapViewPointer:: ; d35f
; pointer to the upper left corner of the current view in the tile block map
ds 2
-W_YCOORD:: ; d361
+wYCoord:: ; d361
; player’s position on the current map
ds 1
-W_XCOORD:: ; d362
+wXCoord:: ; d362
ds 1
-W_YBLOCKCOORD:: ; d363
+wYBlockCoord:: ; d363
; player's y position (by block)
ds 1
-W_XBLOCKCOORD:: ; d364
+wXBlockCoord:: ; d364
ds 1
wLastMap:: ; d365
@@ -2139,31 +2360,31 @@ wLastMap:: ; d365
wUnusedD366:: ; d366
ds 1
-W_CURMAPTILESET:: ; d367
+wCurMapTileset:: ; d367
ds 1
-W_CURMAPHEIGHT:: ; d368
+wCurMapHeight:: ; d368
; blocks
ds 1
-W_CURMAPWIDTH:: ; d369
+wCurMapWidth:: ; d369
; blocks
ds 1
-W_MAPDATAPTR:: ; d36a
+wMapDataPtr:: ; d36a
ds 2
-W_MAPTEXTPTR:: ; d36c
+wMapTextPtr:: ; d36c
ds 2
-W_MAPSCRIPTPTR:: ; d36e
+wMapScriptPtr:: ; d36e
ds 2
-W_MAPCONNECTIONS:: ; d370
+wMapConnections:: ; d370
; connection byte
ds 1
-W_MAPCONN1PTR:: ; d371
+wMapConn1Ptr:: ; d371
ds 1
wNorthConnectionStripSrc:: ; d372
@@ -2187,7 +2408,7 @@ wNorthConnectedMapXAlignment:: ; d379
wNorthConnectedMapViewPointer:: ; d37a
ds 2
-W_MAPCONN2PTR:: ; d37c
+wMapConn2Ptr:: ; d37c
ds 1
wSouthConnectionStripSrc:: ; d37d
@@ -2211,7 +2432,7 @@ wSouthConnectedMapXAlignment:: ; d384
wSouthConnectedMapViewPointer:: ; d385
ds 2
-W_MAPCONN3PTR:: ; d387
+wMapConn3Ptr:: ; d387
ds 1
wWestConnectionStripSrc:: ; d388
@@ -2235,7 +2456,7 @@ wWestConnectedMapXAlignment:: ; d38f
wWestConnectedMapViewPointer:: ; d390
ds 2
-W_MAPCONN4PTR:: ; d392
+wMapConn4Ptr:: ; d392
ds 1
wEastConnectionStripSrc:: ; d393
@@ -2259,11 +2480,11 @@ wEastConnectedMapXAlignment:: ; d39a
wEastConnectedMapViewPointer:: ; d39b
ds 2
-W_SPRITESET:: ; d39d
+wSpriteSet:: ; d39d
; sprite set for the current map (11 sprite picture ID's)
ds 11
-W_SPRITESETID:: ; d3a8
+wSpriteSetID:: ; d3a8
; sprite set ID for the current map
ds 1
@@ -2302,7 +2523,7 @@ wSignCoords:: ; d4b1
wSignTextIDs:: ; d4d1
ds 16
-W_NUMSPRITES:: ; d4e1
+wNumSprites:: ; d4e1
; number of sprites on the current map
ds 1
@@ -2313,11 +2534,11 @@ wYOffsetSinceLastSpecialWarp:: ; d4e2
wXOffsetSinceLastSpecialWarp:: ; d4e3
ds 1
-W_MAPSPRITEDATA:: ; d4e4
+wMapSpriteData:: ; d4e4
; two bytes per sprite (movement byte 2, text ID)
ds 32
-W_MAPSPRITEEXTRADATA:: ; d504
+wMapSpriteExtraData:: ; d504
; two bytes per sprite (trainer class/item ID, trainer set ID)
ds 32
@@ -2351,24 +2572,24 @@ wPlayerDirection:: ; d52a
; if the player is not moving, the last the direction in which the player moved
ds 1
-W_TILESETBANK:: ; d52b
+wTileSetBank:: ; d52b
ds 1
-W_TILESETBLOCKSPTR:: ; d52c
+wTileSetBlocksPtr:: ; d52c
; maps blocks (4x4 tiles) to tiles
ds 2
-W_TILESETGFXPTR:: ; d52e
+wTileSetGFXPtr:: ; d52e
ds 2
-W_TILESETCOLLISIONPTR:: ; d530
+wTileSetCollisionPtr:: ; d530
; list of all walkable tiles
ds 2
-W_TILESETTALKINGOVERTILES:: ; d532
+wTileSetTalkingOverTiles:: ; d532
ds 3
-W_GRASSTILE:: ; d535
+wGrassTile:: ; d535
ds 1
ds 4
@@ -2377,7 +2598,7 @@ wNumBoxItems:: ; d53a
ds 1
wBoxItems:: ; d53b
; item, quantity
- ds 50 * 2
+ ds PC_ITEM_CAPACITY * 2
ds 1 ; end
wCurrentBoxNum:: ; d5a0
@@ -2395,234 +2616,240 @@ wUnusedD5A3:: ; d5a3
wPlayerCoins:: ; d5a4
ds 2 ; BCD
-W_MISSABLEOBJECTFLAGS:: ; d5a6
+wMissableObjectFlags:: ; d5a6
; bit array of missable objects. set = removed
- ds 39
+ ds 32
+wMissableObjectFlagsEnd::
+
+ ds 7
wd5cd:: ds 1 ; temp copy of c1x2 (sprite facing/anim)
-W_MISSABLEOBJECTLIST:: ; d5ce
+wMissableObjectList:: ; d5ce
; each entry consists of 2 bytes
; * the sprite ID (depending on the current map)
-; * the missable object index (global, used for W_MISSABLEOBJECTFLAGS)
+; * the missable object index (global, used for wMissableObjectFlags)
; terminated with $FF
ds 17 * 2
-W_GAMEPROGRESSFLAGS:: ; d5f0
+wGameProgressFlags:: ; d5f0
; $c8 bytes
ds 0
-W_OAKSLABCURSCRIPT:: ; d5f0
+wOaksLabCurScript:: ; d5f0
ds 1
-W_PALLETTOWNCURSCRIPT:: ; d5f1
+wPalletTownCurScript:: ; d5f1
ds 1
ds 1
-W_BLUESHOUSECURSCRIPT:: ; d5f3
+wBluesHouseCurScript:: ; d5f3
ds 1
-W_VIRIDIANCITYCURSCRIPT:: ; d5f4
+wViridianCityCurScript:: ; d5f4
ds 1
ds 2
-W_PEWTERCITYCURSCRIPT:: ; d5f7
+wPewterCityCurScript:: ; d5f7
ds 1
-W_ROUTE3CURSCRIPT:: ; d5f8
+wRoute3CurScript:: ; d5f8
ds 1
-W_ROUTE4CURSCRIPT:: ; d5f9
+wRoute4CurScript:: ; d5f9
ds 1
ds 1
-W_VIRIDIANGYMCURSCRIPT:: ; d5fb
+wViridianGymCurScript:: ; d5fb
ds 1
-W_PEWTERGYMCURSCRIPT:: ; d5fc
+wPewterGymCurScript:: ; d5fc
ds 1
-W_CERULEANGYMCURSCRIPT:: ; d5fd
+wCeruleanGymCurScript:: ; d5fd
ds 1
-W_VERMILIONGYMCURSCRIPT:: ; d5fe
+wVermilionGymCurScript:: ; d5fe
ds 1
-W_CELADONGYMCURSCRIPT:: ; d5ff
+wCeladonGymCurScript:: ; d5ff
ds 1
-W_ROUTE6CURSCRIPT:: ; d600
+wRoute6CurScript:: ; d600
ds 1
-W_ROUTE8CURSCRIPT:: ; d601
+wRoute8CurScript:: ; d601
ds 1
-W_ROUTE24CURSCRIPT:: ; d602
+wRoute24CurScript:: ; d602
ds 1
-W_ROUTE25CURSCRIPT:: ; d603
+wRoute25CurScript:: ; d603
ds 1
-W_ROUTE9CURSCRIPT:: ; d604
+wRoute9CurScript:: ; d604
ds 1
-W_ROUTE10CURSCRIPT:: ; d605
+wRoute10CurScript:: ; d605
ds 1
-W_MTMOON1CURSCRIPT:: ; d606
+wMtMoon1CurScript:: ; d606
ds 1
-W_MTMOON3CURSCRIPT:: ; d607
+wMtMoon3CurScript:: ; d607
ds 1
-W_SSANNE8CURSCRIPT:: ; d608
+wSSAnne8CurScript:: ; d608
ds 1
-W_SSANNE9CURSCRIPT:: ; d609
+wSSAnne9CurScript:: ; d609
ds 1
-W_ROUTE22CURSCRIPT:: ; d60a
+wRoute22CurScript:: ; d60a
ds 1
ds 1
-W_REDSHOUSE2CURSCRIPT:: ; d60c
+wRedsHouse2CurScript:: ; d60c
ds 1
-W_VIRIDIANMARKETCURSCRIPT:: ; d60d
+wViridianMarketCurScript:: ; d60d
ds 1
-W_ROUTE22GATECURSCRIPT:: ; d60e
+wRoute22GateCurScript:: ; d60e
ds 1
-W_CERULEANCITYCURSCRIPT:: ; d60f
+wCeruleanCityCurScript:: ; d60f
ds 1
ds 7
-W_SSANNE5CURSCRIPT:: ; d617
+wSSAnne5CurScript:: ; d617
ds 1
-W_VIRIDIANFORESTCURSCRIPT:: ; d618
+wViridianForestCurScript:: ; d618
ds 1
-W_MUSEUM1FCURSCRIPT:: ; d619
+wMuseum1fCurScript:: ; d619
ds 1
-W_ROUTE13CURSCRIPT:: ; d61a
+wRoute13CurScript:: ; d61a
ds 1
-W_ROUTE14CURSCRIPT:: ; d61b
+wRoute14CurScript:: ; d61b
ds 1
-W_ROUTE17CURSCRIPT:: ; d61c
+wRoute17CurScript:: ; d61c
ds 1
-W_ROUTE19CURSCRIPT:: ; d61d
+wRoute19CurScript:: ; d61d
ds 1
-W_ROUTE21CURSCRIPT:: ; d61e
+wRoute21CurScript:: ; d61e
ds 1
-W_SAFARIZONEENTRANCECURSCRIPT:: ; d61f
+wSafariZoneEntranceCurScript:: ; d61f
ds 1
-W_ROCKTUNNEL2CURSCRIPT:: ; d620
+wRockTunnel2CurScript:: ; d620
ds 1
-W_ROCKTUNNEL1CURSCRIPT:: ; d621
+wRockTunnel1CurScript:: ; d621
ds 1
ds 1
-W_ROUTE11CURSCRIPT:: ; d623
+wRoute11CurScript:: ; d623
ds 1
-W_ROUTE12CURSCRIPT:: ; d624
+wRoute12CurScript:: ; d624
ds 1
-W_ROUTE15CURSCRIPT:: ; d625
+wRoute15CurScript:: ; d625
ds 1
-W_ROUTE16CURSCRIPT:: ; d626
+wRoute16CurScript:: ; d626
ds 1
-W_ROUTE18CURSCRIPT:: ; d627
+wRoute18CurScript:: ; d627
ds 1
-W_ROUTE20CURSCRIPT:: ; d628
+wRoute20CurScript:: ; d628
ds 1
-W_SSANNE10CURSCRIPT:: ; d629
+wSSAnne10CurScript:: ; d629
ds 1
-W_VERMILIONCITYCURSCRIPT:: ; d62a
+wVermilionCityCurScript:: ; d62a
ds 1
-W_POKEMONTOWER2CURSCRIPT:: ; d62b
+wPokemonTower2CurScript:: ; d62b
ds 1
-W_POKEMONTOWER3CURSCRIPT:: ; d62c
+wPokemonTower3CurScript:: ; d62c
ds 1
-W_POKEMONTOWER4CURSCRIPT:: ; d62d
+wPokemonTower4CurScript:: ; d62d
ds 1
-W_POKEMONTOWER5CURSCRIPT:: ; d62e
+wPokemonTower5CurScript:: ; d62e
ds 1
-W_POKEMONTOWER6CURSCRIPT:: ; d62f
+wPokemonTower6CurScript:: ; d62f
ds 1
-W_POKEMONTOWER7CURSCRIPT:: ; d630
+wPokemonTower7CurScript:: ; d630
ds 1
-W_ROCKETHIDEOUT1CURSCRIPT:: ; d631
+wRocketHideout1CurScript:: ; d631
ds 1
-W_ROCKETHIDEOUT2CURSCRIPT:: ; d632
+wRocketHideout2CurScript:: ; d632
ds 1
-W_ROCKETHIDEOUT3CURSCRIPT:: ; d633
+wRocketHideout3CurScript:: ; d633
ds 1
-W_ROCKETHIDEOUT4CURSCRIPT:: ; d634
+wRocketHideout4CurScript:: ; d634
ds 2
-W_ROUTE6GATECURSCRIPT:: ; d636
+wRoute6GateCurScript:: ; d636
ds 1
-W_ROUTE8GATECURSCRIPT:: ; d637
+wRoute8GateCurScript:: ; d637
ds 2
-W_CINNABARISLANDCURSCRIPT:: ; d639
+wCinnabarIslandCurScript:: ; d639
ds 1
-W_MANSION1CURSCRIPT:: ; d63a
+wMansion1CurScript:: ; d63a
ds 2
-W_MANSION2CURSCRIPT:: ; d63c
+wMansion2CurScript:: ; d63c
ds 1
-W_MANSION3CURSCRIPT:: ; d63d
+wMansion3CurScript:: ; d63d
ds 1
-W_MANSION4CURSCRIPT:: ; d63e
+wMansion4CurScript:: ; d63e
ds 1
-W_VICTORYROAD2CURSCRIPT:: ; d63f
+wVictoryRoad2CurScript:: ; d63f
ds 1
-W_VICTORYROAD3CURSCRIPT:: ; d640
+wVictoryRoad3CurScript:: ; d640
ds 2
-W_FIGHTINGDOJOCURSCRIPT:: ; d642
+wFightingDojoCurScript:: ; d642
ds 1
-W_SILPHCO2CURSCRIPT:: ; d643
+wSilphCo2CurScript:: ; d643
ds 1
-W_SILPHCO3CURSCRIPT:: ; d644
+wSilphCo3CurScript:: ; d644
ds 1
-W_SILPHCO4CURSCRIPT:: ; d645
+wSilphCo4CurScript:: ; d645
ds 1
-W_SILPHCO5CURSCRIPT:: ; d646
+wSilphCo5CurScript:: ; d646
ds 1
-W_SILPHCO6CURSCRIPT:: ; d647
+wSilphCo6CurScript:: ; d647
ds 1
-W_SILPHCO7CURSCRIPT:: ; d648
+wSilphCo7CurScript:: ; d648
ds 1
-W_SILPHCO8CURSCRIPT:: ; d649
+wSilphCo8CurScript:: ; d649
ds 1
-W_SILPHCO9CURSCRIPT:: ; d64a
+wSilphCo9CurScript:: ; d64a
ds 1
-W_HALLOFFAMEROOMCURSCRIPT:: ; d64b
+wHallOfFameRoomCurScript:: ; d64b
ds 1
-W_GARYCURSCRIPT:: ; d64c
+wGaryCurScript:: ; d64c
ds 1
-W_LORELEICURSCRIPT:: ; d64d
+wLoreleiCurScript:: ; d64d
ds 1
-W_BRUNOCURSCRIPT:: ; d64e
+wBrunoCurScript:: ; d64e
ds 1
-W_AGATHACURSCRIPT:: ; d64f
+wAgathaCurScript:: ; d64f
ds 1
-W_UNKNOWNDUNGEON3CURSCRIPT:: ; d650
+wUnknownDungeon3CurScript:: ; d650
ds 1
-W_VICTORYROAD1CURSCRIPT:: ; d651
+wVictoryRoad1CurScript:: ; d651
ds 1
ds 1
-W_LANCECURSCRIPT:: ; d653
+wLanceCurScript:: ; d653
ds 1
ds 4
-W_SILPHCO10CURSCRIPT:: ; d658
+wSilphCo10CurScript:: ; d658
ds 1
-W_SILPHCO11CURSCRIPT:: ; d659
+wSilphCo11CurScript:: ; d659
ds 1
ds 1
-W_FUCHSIAGYMCURSCRIPT:: ; d65b
+wFuchsiaGymCurScript:: ; d65b
ds 1
-W_SAFFRONGYMCURSCRIPT:: ; d65c
+wSaffronGymCurScript:: ; d65c
ds 1
ds 1
-W_CINNABARGYMCURSCRIPT:: ; d65e
+wCinnabarGymCurScript:: ; d65e
ds 1
-W_CELADONGAMECORNERCURSCRIPT:: ; d65f
+wCeladonGameCornerCurScript:: ; d65f
ds 1
-W_ROUTE16GATECURSCRIPT:: ; d660
+wRoute16GateCurScript:: ; d660
ds 1
-W_BILLSHOUSECURSCRIPT:: ; d661
+wBillsHouseCurScript:: ; d661
ds 1
-W_ROUTE5GATECURSCRIPT:: ; d662
+wRoute5GateCurScript:: ; d662
ds 1
-W_POWERPLANTCURSCRIPT:: ; d663
+wPowerPlantCurScript:: ; d663
; overload
ds 0
-W_ROUTE7GATECURSCRIPT:: ; d663
+wRoute7GateCurScript:: ; d663
; overload
ds 1
ds 1
-W_SSANNE2CURSCRIPT:: ; d665
+wSSAnne2CurScript:: ; d665
ds 1
-W_SEAFOAMISLANDS4CURSCRIPT:: ; d666
+wSeafoamIslands4CurScript:: ; d666
ds 1
-W_ROUTE23CURSCRIPT:: ; d667
+wRoute23CurScript:: ; d667
ds 1
-W_SEAFOAMISLANDS5CURSCRIPT:: ; d668
+wSeafoamIslands5CurScript:: ; d668
ds 1
-W_ROUTE18GATECURSCRIPT:: ; d669
+wRoute18GateCurScript:: ; d669
ds 1
- ds 134
+ ds 78
+wGameProgressFlagsEnd::
+
+ ds 56
wObtainedHiddenItemsFlags::
ds 14
@@ -2638,36 +2865,36 @@ wWalkBikeSurfState:: ; d700
ds 10
-W_TOWNVISITEDFLAG:: ; d70b
+wTownVisitedFlag:: ; d70b
flag_array 13
wSafariSteps:: ; d70d
; starts at 502
ds 2
-W_FOSSILITEM:: ; d70f
+wFossilItem:: ; d70f
; item given to cinnabar lab
ds 1
-W_FOSSILMON:: ; d710
+wFossilMon:: ; d710
; mon that will result from the item
ds 1
ds 2
-W_ENEMYMONORTRAINERCLASS:: ; d713
-; trainer classes start at $c8
+wEnemyMonOrTrainerClass:: ; d713
+; trainer classes start at 200
ds 1
wPlayerJumpingYScreenCoordsIndex:: ; d714
ds 1
-W_RIVALSTARTER:: ; d715
+wRivalStarter:: ; d715
ds 1
ds 1
-W_PLAYERSTARTER:: ; d717
+wPlayerStarter:: ; d717
ds 1
wBoulderSpriteIndex:: ; d718
@@ -2702,14 +2929,20 @@ wUnusedD71F:: ; d71f
ds 8
-wd728::
+wd728:: ; d728
; bit 0: using Strength outside of battle
+; bit 1: set by IsSurfingAllowed when surfing's allowed, but the caller resets it after checking the result
+; bit 3: received Old Rod
+; bit 4: received Good Rod
+; bit 5: received Super Rod
+; bit 6: gave one of the Saffron guards a drink
+; bit 7: set by ItemUseCardKey, which is leftover code from a previous implementation of the Card Key
ds 1
ds 1
wBeatGymFlags:: ; d72a
-; redundant because it matches W_OBTAINEDBADGES
+; redundant because it matches wObtainedBadges
; used to determine whether to show name on statue and in two NPC text scripts
ds 1
@@ -2717,16 +2950,36 @@ wBeatGymFlags:: ; d72a
wd72c:: ; d72c
; bit 0: if not set, the 3 minimum steps between random battles have passed
+; bit 1: prevent audio fade out
+ ds 1
+
+wd72d:: ; d72d
+; This variable is used for temporary flags and as the destination map when
+; warping to the Trade Center or Colosseum.
+; bit 0: sprite facing directions have been initialised in the Trade Center
+; bit 3: do scripted warp (used to warp back to Lavender Town from the top of the pokemon tower)
+; bit 4: on a dungeon warp
+; bit 5: don't make NPCs face the player when spoken to
+; Bits 6 and 7 are set by scripts when starting major battles in the storyline,
+; but they do not appear to affect anything. Bit 6 is reset after all battles
+; and bit 7 is reset after trainer battles (but it's only set before trainer
+; battles anyway).
+ ds 1
+
+wd72e:: ; d72e
+; bit 0: the player has received Lapras in the Silph Co. building
+; bit 1: set in various places, but doesn't appear to have an effect
+; bit 2: the player has healed pokemon at a pokemon center at least once
+; bit 3: the player has a received a pokemon from Prof. Oak
+; bit 4: disable battles
+; bit 5: set when a battle ends and when the player blacks out in the overworld due to poison
+; bit 6: using the link feature
+; bit 7: set if scripted NPC movement has been initialised
ds 1
-wd72d:: ds 1 ; misc temp flags? (in some scripts, bit 6 and 7 set after a special battle (e.g. gym leaders) has been won)
- ; also used as a start menu flag
-
-wd72e::
-; bit 7: set if scripted NPC movement has been initialised
- ds 2 ; more temp misc flags, used with npc movement, main menu and other stuff
+ ds 1
-wd730::
+wd730:: ; d730
; bit 0: NPC sprite being moved by script
; bit 5: ignore joypad input
; bit 6: print text with no delay between each letter
@@ -2749,8 +3002,12 @@ wd732:: ; d732
; bit 6: map destination is [wLastBlackoutMap] (usually the last used pokemon center, but could be the player's house)
ds 1
-W_FLAGS_D733:: ; d733
-; bit 4: use variable [W_CURMAPSCRIPT] instead of the provided index for next frame's map script (used to start battle when talking to trainers)
+wFlags_D733:: ; d733
+; bit 0: running a test battle
+; bit 1: prevent music from changing when entering new map
+; bit 2: skip the joypad check in CheckWarpsNoCollision (used for the forced warp down the waterfall in the Seafoam Islands)
+; bit 3: trainer wants to battle
+; bit 4: use variable [wCurMapScript] instead of the provided index for next frame's map script (used to start battle when talking to trainers)
; bit 7: used fly out of battle
ds 1
@@ -2801,15 +3058,26 @@ wEventFlags:: ; d747
wLinkEnemyTrainerName:: ; d887
; linked game's trainer name
-W_GRASSRATE:: ; d887
+wGrassRate:: ; d887
ds 1
-W_GRASSMONS:: ; d888
- ds 20
+wGrassMons:: ; d888
+ ;ds 20
+
+ ds 11
+; Overload wGrassMons
+wSerialEnemyDataBlock:: ; d893
+ ds 9
wEnemyPartyCount:: ds 1 ; d89c
wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89d
+; Overload enemy party data
+wWaterRate:: db ; d8a4
+wWaterMons:: db ; d8a5
+
+ ds wWaterRate - @
+
wEnemyMons:: ; d8a4
wEnemyMon1:: party_struct wEnemyMon1
wEnemyMon2:: party_struct wEnemyMon2
@@ -2818,11 +3086,11 @@ wEnemyMon4:: party_struct wEnemyMon4
wEnemyMon5:: party_struct wEnemyMon5
wEnemyMon6:: party_struct wEnemyMon6
-wEnemyMonOT:: ds 11 * PARTY_LENGTH ; d9ac
-wEnemyMonNicks:: ds 11 * PARTY_LENGTH ; d9ee
+wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d9ac
+wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d9ee
-W_TRAINERHEADERPTR:: ; da30
+wTrainerHeaderPtr:: ; da30
ds 2
ds 6
@@ -2834,51 +3102,59 @@ wOpponentAfterWrongAnswer:: ; da38
wUnusedDA38:: ; da38
ds 1
-W_CURMAPSCRIPT:: ; da39
+wCurMapScript:: ; da39
; index of current map script, mostly used as index for function pointer array
; mostly copied from map-specific map script pointer and wirtten back later
ds 1
- ds 6
+ ds 7
-W_PLAYTIMEHOURS:: ; da40
- ds 2
-W_PLAYTIMEMINUTES:: ; da42
- ds 2
-W_PLAYTIMESECONDS:: ; da44
+wPlayTimeHours:: ; da41
ds 1
-W_PLAYTIMEFRAMES:: ; da45
+wPlayTimeMaxed:: ; da42
+ ds 1
+wPlayTimeMinutes:: ; da43
+ ds 1
+wPlayTimeSeconds:: ; da44
+ ds 1
+wPlayTimeFrames:: ; da45
ds 1
wSafariZoneGameOver:: ; da46
ds 1
-W_NUMSAFARIBALLS:: ; da47
+wNumSafariBalls:: ; da47
ds 1
-W_DAYCARE_IN_USE:: ; da48
+wDayCareInUse:: ; da48
; 0 if no pokemon is in the daycare
; 1 if pokemon is in the daycare
ds 1
-W_DAYCAREMONNAME:: ds 11 ; da49
-W_DAYCAREMONOT:: ds 11 ; da54
+wDayCareMonName:: ds NAME_LENGTH ; da49
+wDayCareMonOT:: ds NAME_LENGTH ; da54
wDayCareMon:: box_struct wDayCareMon ; da5f
+wMainDataEnd::
-W_NUMINBOX:: ds 1 ; da80
+
+wBoxDataStart::
+
+wNumInBox:: ds 1 ; da80
wBoxSpecies:: ds MONS_PER_BOX + 1
wBoxMons::
wBoxMon1:: box_struct wBoxMon1 ; da96
wBoxMon2:: ds box_struct_length * (MONS_PER_BOX + -1) ; dab7
-wBoxMonOT:: ds 11 * MONS_PER_BOX ; dd2a
-wBoxMonNicks:: ds 11 * MONS_PER_BOX ; de06
+wBoxMonOT:: ds NAME_LENGTH * MONS_PER_BOX ; dd2a
+wBoxMonNicks:: ds NAME_LENGTH * MONS_PER_BOX ; de06
wBoxMonNicksEnd:: ; dee2
+wBoxDataEnd::
+
SECTION "Stack", WRAMX[$dfff], BANK[1]
wStack:: ; dfff